You've already forked ultrasm64-2
mirror of
https://github.com/HackerN64/ultrasm64-2.git
synced 2026-01-21 10:38:08 -08:00
Refresh 16
This commit is contained in:
@@ -42,7 +42,7 @@
|
||||
#define A_INTERLEAVE 13
|
||||
#define A_SETLOOP 15
|
||||
|
||||
#ifndef VERSION_SH
|
||||
#if !defined(VERSION_SH) && !defined(VERSION_CN)
|
||||
|
||||
#define A_ENVMIXER 3
|
||||
#define A_LOADBUFF 4
|
||||
@@ -642,7 +642,7 @@ typedef short ENVMIX_STATE[40];
|
||||
_a->words.w1 = (uintptr_t)(tr); \
|
||||
}
|
||||
|
||||
#ifdef VERSION_SH
|
||||
#if defined(VERSION_SH) || defined(VERSION_CN)
|
||||
#undef aLoadBuffer
|
||||
#undef aSaveBuffer
|
||||
#undef aMix
|
||||
|
||||
37
include/PR/ique.h
Normal file
37
include/PR/ique.h
Normal file
@@ -0,0 +1,37 @@
|
||||
#ifndef IQUE_H
|
||||
#define IQUE_H
|
||||
|
||||
#include "rcp.h"
|
||||
|
||||
#define MI_SK_EXCEPTION_REG (MI_BASE_REG+0x14)
|
||||
#define MI_SK_WATCHDOG_TIMER (MI_BASE_REG+0x18)
|
||||
|
||||
// Hardware interrupts
|
||||
// 0x40 = NAND DMA, 0x80 = MD, 0x100 = RDB, 0x200 = AES,
|
||||
// 0x400 = PI_ERR, 0x800 = USB0, 0x1000 = USB1, 0x2000 = NAND
|
||||
#define MI_HW_INTR_REG (MI_BASE_REG+0x38)
|
||||
#define MI_HW_INTR_MASK_REG (MI_BASE_REG+0x3C)
|
||||
|
||||
#define PI_CARD_ADDR_REG (PI_BASE_REG+0x48)
|
||||
#define PI_EX_RD_LEN_REG (PI_BASE_REG+0x58)
|
||||
#define PI_EX_WR_LEN_REG (PI_BASE_REG+0x5C)
|
||||
#define PI_MISC_REG (PI_BASE_REG+0x60)
|
||||
|
||||
#if defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS)
|
||||
|
||||
extern u8 *__osBbEepromAddress;
|
||||
extern u32 __osBbEepromSize;
|
||||
extern u32 __osBbFlashAddress;
|
||||
extern u32 __osBbFlashSize;
|
||||
extern u32 __osBbSramAddress;
|
||||
extern u32 __osBbSramSize;
|
||||
extern u32 *__osBbPakAddress[];
|
||||
extern u32 __osBbPakSize;
|
||||
extern u32 __osBbIsBb;
|
||||
extern u32 __osBbHackFlags;
|
||||
|
||||
void skKeepAlive(void);
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -7,7 +7,7 @@ typedef struct
|
||||
{
|
||||
u8 *offset;
|
||||
s32 len;
|
||||
#ifdef VERSION_SH
|
||||
#if defined(VERSION_SH) || defined(VERSION_CN)
|
||||
s8 medium;
|
||||
s8 magic; // tbl: 0x04, otherwise: 0x03
|
||||
|
||||
@@ -32,11 +32,11 @@ typedef struct
|
||||
|
||||
typedef struct
|
||||
{
|
||||
#ifndef VERSION_SH
|
||||
#if !defined(VERSION_SH) && !defined(VERSION_CN)
|
||||
s16 revision;
|
||||
#endif
|
||||
s16 seqCount;
|
||||
#ifdef VERSION_SH
|
||||
#if defined(VERSION_SH) || defined(VERSION_CN)
|
||||
s16 unk2;
|
||||
u8 *data;
|
||||
#if !IS_64_BIT
|
||||
|
||||
112
include/PR/os.h
112
include/PR/os.h
@@ -59,37 +59,6 @@ typedef struct {
|
||||
s32 (*dma)(s32, u32, void *, u32);
|
||||
s32 (*edma)(OSPiHandle *, s32, u32, void *, u32);
|
||||
} OSDevMgr;
|
||||
|
||||
/*
|
||||
* Structure for file system
|
||||
*/
|
||||
|
||||
|
||||
|
||||
typedef struct {
|
||||
int status;
|
||||
OSMesgQueue *queue;
|
||||
int channel;
|
||||
u8 id[32];
|
||||
u8 label[32];
|
||||
int version;
|
||||
int dir_size;
|
||||
int inode_table; /* block location */
|
||||
int minode_table; /* mirrioring inode_table */
|
||||
int dir_table; /* block location */
|
||||
int inode_start_page; /* page # */
|
||||
u8 banks;
|
||||
u8 activebank;
|
||||
} OSPfs;
|
||||
|
||||
|
||||
typedef struct {
|
||||
u32 file_size; /* bytes */
|
||||
u32 game_code;
|
||||
u16 company_code;
|
||||
char ext_name[4];
|
||||
char game_name[16];
|
||||
} OSPfsState;
|
||||
|
||||
/*
|
||||
* Structure for Profiler
|
||||
@@ -116,39 +85,6 @@ typedef struct {
|
||||
#define OS_STATE_RUNNING 4
|
||||
#define OS_STATE_WAITING 8
|
||||
|
||||
/* Events */
|
||||
#ifdef _FINALROM
|
||||
#define OS_NUM_EVENTS 15
|
||||
#else
|
||||
#define OS_NUM_EVENTS 23
|
||||
#endif
|
||||
|
||||
#define OS_EVENT_SW1 0 /* CPU SW1 interrupt */
|
||||
#define OS_EVENT_SW2 1 /* CPU SW2 interrupt */
|
||||
#define OS_EVENT_CART 2 /* Cartridge interrupt: used by rmon */
|
||||
#define OS_EVENT_COUNTER 3 /* Counter int: used by VI/Timer Mgr */
|
||||
#define OS_EVENT_SP 4 /* SP task done interrupt */
|
||||
#define OS_EVENT_SI 5 /* SI (controller) interrupt */
|
||||
#define OS_EVENT_AI 6 /* AI interrupt */
|
||||
#define OS_EVENT_VI 7 /* VI interrupt: used by VI/Timer Mgr */
|
||||
#define OS_EVENT_PI 8 /* PI interrupt: used by PI Manager */
|
||||
#define OS_EVENT_DP 9 /* DP full sync interrupt */
|
||||
#define OS_EVENT_CPU_BREAK 10 /* CPU breakpoint: used by rmon */
|
||||
#define OS_EVENT_SP_BREAK 11 /* SP breakpoint: used by rmon */
|
||||
#define OS_EVENT_FAULT 12 /* CPU fault event: used by rmon */
|
||||
#define OS_EVENT_THREADSTATUS 13 /* CPU thread status: used by rmon */
|
||||
#define OS_EVENT_PRENMI 14 /* Pre NMI interrupt */
|
||||
#ifndef _FINALROM
|
||||
#define OS_EVENT_RDB_READ_DONE 15 /* RDB read ok event: used by rmon */
|
||||
#define OS_EVENT_RDB_LOG_DONE 16 /* read of log data complete */
|
||||
#define OS_EVENT_RDB_DATA_DONE 17 /* read of hostio data complete */
|
||||
#define OS_EVENT_RDB_REQ_RAMROM 18 /* host needs ramrom access */
|
||||
#define OS_EVENT_RDB_FREE_RAMROM 19 /* host is done with ramrom access */
|
||||
#define OS_EVENT_RDB_DBG_DONE 20
|
||||
#define OS_EVENT_RDB_FLUSH_PROF 21
|
||||
#define OS_EVENT_RDB_ACK_PROF 22
|
||||
#endif
|
||||
|
||||
/* Flags for debugging purpose */
|
||||
|
||||
#define OS_FLAG_CPU_BREAK 1 /* Break exception has occurred */
|
||||
@@ -186,12 +122,6 @@ typedef struct {
|
||||
#define OS_PRIORITY_APPMAX 127
|
||||
#define OS_PRIORITY_IDLE 0 /* Must be 0 */
|
||||
|
||||
|
||||
/* Flags to turn blocking on/off when sending/receiving message */
|
||||
|
||||
#define OS_MESG_NOBLOCK 0
|
||||
#define OS_MESG_BLOCK 1
|
||||
|
||||
/* Flags to indicate direction of data transfer */
|
||||
|
||||
#define OS_READ 0 /* device -> RDRAM */
|
||||
@@ -406,42 +336,6 @@ typedef struct {
|
||||
#define R_CBUTTONS CONT_F
|
||||
#define D_CBUTTONS CONT_D
|
||||
|
||||
/* File System size */
|
||||
#define OS_PFS_VERSION 0x0200
|
||||
#define OS_PFS_VERSION_HI (OS_PFS_VERSION >> 8)
|
||||
#define OS_PFS_VERSION_LO (OS_PFS_VERSION & 255)
|
||||
|
||||
#define PFS_FILE_NAME_LEN 16
|
||||
#define PFS_FILE_EXT_LEN 4
|
||||
#define BLOCKSIZE 32 /* bytes */
|
||||
#define PFS_ONE_PAGE 8 /* blocks */
|
||||
#define PFS_MAX_BANKS 62
|
||||
|
||||
/* File System flag */
|
||||
|
||||
#define PFS_READ 0
|
||||
#define PFS_WRITE 1
|
||||
#define PFS_CREATE 2
|
||||
|
||||
/* File System status */
|
||||
#define PFS_INITIALIZED 0x1
|
||||
#define PFS_CORRUPTED 0x2 /* File system was corrupted */
|
||||
|
||||
/* File System error number */
|
||||
|
||||
#define PFS_ERR_NOPACK 1 /* no memory card is plugged or */
|
||||
#define PFS_ERR_NEW_PACK 2 /* ram pack has been changed to a */
|
||||
/* different one */
|
||||
#define PFS_ERR_INCONSISTENT 3 /* need to run Pfschecker */
|
||||
#define PFS_ERR_CONTRFAIL CONT_OVERRUN_ERROR
|
||||
#define PFS_ERR_INVALID 5 /* invalid parameter or file not exist*/
|
||||
#define PFS_ERR_BAD_DATA 6 /* the data read from pack are bad*/
|
||||
#define PFS_DATA_FULL 7 /* no free pages on ram pack */
|
||||
#define PFS_DIR_FULL 8 /* no free directories on ram pack*/
|
||||
#define PFS_ERR_EXIST 9 /* file exists */
|
||||
#define PFS_ERR_ID_FATAL 10 /* dead ram pack */
|
||||
#define PFS_ERR_DEVICE 11 /* wrong device type*/
|
||||
|
||||
/* definition for EEPROM */
|
||||
|
||||
#define EEPROM_MAXBLOCKS 64
|
||||
@@ -739,6 +633,12 @@ extern s32 osMotorInit(OSMesgQueue *, OSPfs *, int);
|
||||
extern s32 osMotorStop(OSPfs *);
|
||||
extern s32 osMotorStart(OSPfs *);
|
||||
|
||||
#ifdef VERSION_CN
|
||||
#define MOTOR_START 1
|
||||
#define MOTOR_STOP 0
|
||||
extern s32 __osMotorAccess(OSPfs *, s32);
|
||||
#endif
|
||||
|
||||
/* Enhanced PI interface */
|
||||
|
||||
extern OSPiHandle *osCartRomInit(void);
|
||||
|
||||
@@ -53,22 +53,22 @@ extern "C" {
|
||||
typedef struct {
|
||||
u16 type; /* Controller Type */
|
||||
u8 status; /* Controller status */
|
||||
u8 errnum;
|
||||
u8 errnum;
|
||||
}OSContStatus;
|
||||
|
||||
typedef struct {
|
||||
u16 button;
|
||||
s8 stick_x; /* -80 <= stick_x <= 80 */
|
||||
s8 stick_y; /* -80 <= stick_y <= 80 */
|
||||
u8 errnum;
|
||||
u8 errnum;
|
||||
} OSContPad;
|
||||
|
||||
typedef struct {
|
||||
void *address; /* Ram pad Address: 11 bits */
|
||||
u8 databuffer[32]; /* address of the data buffer */
|
||||
u8 addressCrc; /* CRC code for address */
|
||||
u8 addressCrc; /* CRC code for address */
|
||||
u8 dataCrc; /* CRC code for data */
|
||||
u8 errnum;
|
||||
u8 errnum;
|
||||
} OSContRamIo;
|
||||
|
||||
|
||||
|
||||
@@ -7,4 +7,12 @@
|
||||
extern void bcopy(const void *, void *, size_t);
|
||||
extern void bzero(void *, size_t);
|
||||
|
||||
/* Printf */
|
||||
|
||||
extern int sprintf(char *s, const char *fmt, ...);
|
||||
extern void osSyncPrintf(const char *fmt, ...);
|
||||
extern void osAsyncPrintf(const char *fmt, ...);
|
||||
extern int osSyncGetChars(char *buf);
|
||||
extern int osAsyncGetChars(char *buf);
|
||||
|
||||
#endif /* !_OS_LIBC_H_ */
|
||||
|
||||
@@ -76,7 +76,10 @@ typedef struct OSMesgQueue_s {
|
||||
*/
|
||||
|
||||
/* Events */
|
||||
#ifdef _FINALROM
|
||||
|
||||
#ifdef BBPLAYER
|
||||
#define OS_NUM_EVENTS 31
|
||||
#elif defined(_FINALROM)
|
||||
#define OS_NUM_EVENTS 15
|
||||
#else
|
||||
#define OS_NUM_EVENTS 23
|
||||
@@ -107,6 +110,16 @@ typedef struct OSMesgQueue_s {
|
||||
#define OS_EVENT_RDB_FLUSH_PROF 21
|
||||
#define OS_EVENT_RDB_ACK_PROF 22
|
||||
#endif
|
||||
#ifdef BBPLAYER
|
||||
#define OS_EVENT_FLASH 23 /* NAND flash operation complete */
|
||||
#define OS_EVENT_AES 24 /* AES */
|
||||
#define OS_EVENT_IDE 25 /* IDE? */
|
||||
#define OS_EVENT_PI_ERR 26 /* PI Error? */
|
||||
#define OS_EVENT_USB0 27 /* USB Controller 0 */
|
||||
#define OS_EVENT_USB1 28 /* USB Controller 1 */
|
||||
#define OS_EVENT_UNK_29 29 /* TODO does this exist at all */
|
||||
#define OS_EVENT_MD 30 /* Related to card */
|
||||
#endif
|
||||
|
||||
/* Flags to turn blocking on/off when sending/receiving message */
|
||||
|
||||
|
||||
75
include/PR/os_motor.h
Normal file
75
include/PR/os_motor.h
Normal file
@@ -0,0 +1,75 @@
|
||||
|
||||
/*---------------------------------------------------------------------*
|
||||
Copyright (C) 1998 Nintendo.
|
||||
|
||||
$RCSfile: os_motor.h,v $
|
||||
$Revision: 1.1 $
|
||||
$Date: 1998/10/09 08:01:15 $
|
||||
*---------------------------------------------------------------------*/
|
||||
|
||||
#ifndef _OS_MOTOR_H_
|
||||
#define _OS_MOTOR_H_
|
||||
|
||||
#ifdef _LANGUAGE_C_PLUS_PLUS
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <PR/ultratypes.h>
|
||||
#include "os_message.h"
|
||||
#include "os_pfs.h"
|
||||
|
||||
|
||||
#if defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS)
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* Type definitions
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#endif /* defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS) */
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* Global definitions
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#if defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS)
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* Macro definitions
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* Extern variables
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* Function prototypes
|
||||
*
|
||||
*/
|
||||
|
||||
/* Rumble PAK interface */
|
||||
|
||||
extern s32 osMotorInit(OSMesgQueue *, OSPfs *, int);
|
||||
extern s32 osMotorStop(OSPfs *);
|
||||
extern s32 osMotorStart(OSPfs *);
|
||||
|
||||
|
||||
#endif /* defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS) */
|
||||
|
||||
#ifdef _LANGUAGE_C_PLUS_PLUS
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* !_OS_MOTOR_H_ */
|
||||
123
include/PR/os_pfs.h
Normal file
123
include/PR/os_pfs.h
Normal file
@@ -0,0 +1,123 @@
|
||||
/*====================================================================
|
||||
* os_pfs.h
|
||||
*
|
||||
* Copyright 1995, Silicon Graphics, Inc.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics,
|
||||
* Inc.; the contents of this file may not be disclosed to third
|
||||
* parties, copied or duplicated in any form, in whole or in part,
|
||||
* without the prior written permission of Silicon Graphics, Inc.
|
||||
*
|
||||
* RESTRICTED RIGHTS LEGEND:
|
||||
* Use, duplication or disclosure by the Government is subject to
|
||||
* restrictions as set forth in subdivision (c)(1)(ii) of the Rights
|
||||
* in Technical Data and Computer Software clause at DFARS
|
||||
* 252.227-7013, and/or in similar or successor clauses in the FAR,
|
||||
* DOD or NASA FAR Supplement. Unpublished - rights reserved under the
|
||||
* Copyright Laws of the United States.
|
||||
*====================================================================*/
|
||||
|
||||
/*---------------------------------------------------------------------*
|
||||
Copyright (C) 1998 Nintendo. (Originated by SGI)
|
||||
|
||||
$RCSfile: os_pfs.h,v $
|
||||
$Revision: 1.1 $
|
||||
$Date: 1998/10/09 08:01:16 $
|
||||
*---------------------------------------------------------------------*/
|
||||
|
||||
#ifndef _OS_PFS_H_
|
||||
#define _OS_PFS_H_
|
||||
|
||||
#ifdef _LANGUAGE_C_PLUS_PLUS
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <PR/ultratypes.h>
|
||||
#include "os_message.h"
|
||||
|
||||
#if defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS)
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* Type definitions
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* Structure for file system
|
||||
*/
|
||||
|
||||
typedef struct {
|
||||
int status;
|
||||
OSMesgQueue *queue;
|
||||
int channel;
|
||||
u8 id[32];
|
||||
u8 label[32];
|
||||
int version;
|
||||
int dir_size;
|
||||
int inode_table; /* block location */
|
||||
int minode_table; /* mirrioring inode_table */
|
||||
int dir_table; /* block location */
|
||||
int inode_start_page; /* page # */
|
||||
u8 banks;
|
||||
u8 activebank;
|
||||
} OSPfs;
|
||||
|
||||
|
||||
typedef struct {
|
||||
u32 file_size; /* bytes */
|
||||
u32 game_code;
|
||||
u16 company_code;
|
||||
char ext_name[4];
|
||||
char game_name[16];
|
||||
} OSPfsState;
|
||||
|
||||
#endif /* defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS) */
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* Global definitions
|
||||
*
|
||||
*/
|
||||
|
||||
/* File System size */
|
||||
#define OS_PFS_VERSION 0x0200
|
||||
#define OS_PFS_VERSION_HI (OS_PFS_VERSION >> 8)
|
||||
#define OS_PFS_VERSION_LO (OS_PFS_VERSION & 255)
|
||||
|
||||
#define PFS_FILE_NAME_LEN 16
|
||||
#define PFS_FILE_EXT_LEN 4
|
||||
#define BLOCKSIZE 32 /* bytes */
|
||||
#define PFS_ONE_PAGE 8 /* blocks */
|
||||
#define PFS_MAX_BANKS 62
|
||||
|
||||
/* File System flag */
|
||||
|
||||
#define PFS_READ 0
|
||||
#define PFS_WRITE 1
|
||||
#define PFS_CREATE 2
|
||||
|
||||
/* File System status */
|
||||
#define PFS_INITIALIZED 0x1
|
||||
#define PFS_CORRUPTED 0x2 /* File system was corrupted */
|
||||
|
||||
/* File System error number */
|
||||
|
||||
#define PFS_ERR_NOPACK 1 /* no memory card is plugged or */
|
||||
#define PFS_ERR_NEW_PACK 2 /* ram pack has been changed to a */
|
||||
#define PFS_ERR_INCONSISTENT 3 /* need to run Pfschecker */
|
||||
#define PFS_ERR_CONTRFAIL CONT_OVERRUN_ERROR
|
||||
#define PFS_ERR_INVALID 5 /* invalid parameter or file not exist*/
|
||||
#define PFS_ERR_BAD_DATA 6 /* the data read from pack are bad*/
|
||||
#define PFS_DATA_FULL 7 /* no free pages on ram pack */
|
||||
#define PFS_DIR_FULL 8 /* no free directories on ram pack*/
|
||||
#define PFS_ERR_EXIST 9 /* file exists*/
|
||||
#define PFS_ERR_ID_FATAL 10 /* dead ram pack */
|
||||
#define PFS_ERR_DEVICE 11 /* wrong device type*/
|
||||
|
||||
#ifdef _LANGUAGE_C_PLUS_PLUS
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -61,7 +61,7 @@ typedef struct {
|
||||
/*0x08*/ void *dramAddr;
|
||||
/*0x0C*/ uintptr_t devAddr;
|
||||
/*0x10*/ size_t size;
|
||||
#if defined(VERSION_EU) || defined(VERSION_SH)
|
||||
#if defined(VERSION_EU) || defined(VERSION_SH) || defined(VERSION_CN)
|
||||
OSPiHandle *piHandle; // from the official definition
|
||||
#endif
|
||||
} OSIoMesg;
|
||||
|
||||
@@ -16,6 +16,8 @@
|
||||
#define OS_STATE_RUNNING 4
|
||||
#define OS_STATE_WAITING 8
|
||||
|
||||
#if defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS)
|
||||
|
||||
/* Types */
|
||||
|
||||
typedef s32 OSPri;
|
||||
@@ -73,3 +75,5 @@ void osStartThread(OSThread *thread);
|
||||
void osStopThread(OSThread *thread);
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -13,7 +13,7 @@ typedef struct OSTimer_str
|
||||
u64 interval;
|
||||
u64 remaining;
|
||||
OSMesgQueue *mq;
|
||||
OSMesg *msg;
|
||||
OSMesg msg;
|
||||
} OSTimer;
|
||||
|
||||
typedef u64 OSTime;
|
||||
|
||||
@@ -4,6 +4,16 @@
|
||||
#include <PR/ultratypes.h>
|
||||
#include <PR/os_message.h>
|
||||
|
||||
//TODO: figure out what this is
|
||||
#define VI_STATE_01 0x01
|
||||
#define VI_STATE_XSCALE_UPDATED 0x02
|
||||
#define VI_STATE_YSCALE_UPDATED 0x04
|
||||
#define VI_STATE_08 0x08 //related to control regs changing
|
||||
#define VI_STATE_10 0x10 //swap buffer
|
||||
#define VI_STATE_BLACK 0x20 //probably related to a black screen
|
||||
#define VI_STATE_REPEATLINE 0x40 //repeat line?
|
||||
#define VI_STATE_FADE 0x80 //fade
|
||||
|
||||
/* Ultra64 Video Interface */
|
||||
|
||||
|
||||
@@ -27,8 +37,7 @@
|
||||
|
||||
/* Types */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
u32 ctrl;
|
||||
u32 width;
|
||||
u32 burst;
|
||||
@@ -40,8 +49,7 @@ typedef struct
|
||||
u32 vCurrent;
|
||||
} OSViCommonRegs;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
u32 origin;
|
||||
u32 yScale;
|
||||
u32 vStart;
|
||||
@@ -49,15 +57,13 @@ typedef struct
|
||||
u32 vIntr;
|
||||
} OSViFieldRegs;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
u8 type;
|
||||
OSViCommonRegs comRegs;
|
||||
OSViFieldRegs fldRegs[2];
|
||||
} OSViMode;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
/* 0x00 */ u16 unk00; //some kind of flags. swap buffer sets to 0x10
|
||||
/* 0x02 */ u16 retraceCount;
|
||||
/* 0x04 */ void* buffer;
|
||||
|
||||
@@ -161,6 +161,7 @@ The Indy development board use cartridge domain 1:
|
||||
#define DEVICE_TYPE_BULK 1 /* ROM bulk */
|
||||
#define DEVICE_TYPE_64DD 2 /* 64 Disk Drive */
|
||||
#define DEVICE_TYPE_SRAM 3 /* SRAM */
|
||||
#define DEVICE_TYPE_INIT 7 /* initial value */
|
||||
|
||||
/*************************************************************************
|
||||
* SP Memory
|
||||
|
||||
94
include/PR/rdb.h
Normal file
94
include/PR/rdb.h
Normal file
@@ -0,0 +1,94 @@
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* $Revision: 1.6 $
|
||||
* $Date: 1997/02/11 08:29:31 $
|
||||
* $Source: /disk6/Master/cvsmdev2/PR/include/rdb.h,v $
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
#ifndef _RDB_H
|
||||
#define _RDB_H
|
||||
|
||||
/* U64 side address */
|
||||
#define RDB_BASE_REG 0xc0000000
|
||||
#define RDB_WRITE_INTR_REG (RDB_BASE_REG + 0x8)
|
||||
#define RDB_READ_INTR_REG (RDB_BASE_REG + 0xc)
|
||||
#define RDB_BASE_VIRTUAL_ADDR 0x80000000
|
||||
|
||||
/* packet type Have six bits, so can have up to 63 types */
|
||||
#define RDB_TYPE_INVALID 0
|
||||
#define RDB_TYPE_GtoH_PRINT 1
|
||||
#define RDB_TYPE_GtoH_FAULT 2
|
||||
#define RDB_TYPE_GtoH_LOG_CT 3
|
||||
#define RDB_TYPE_GtoH_LOG 4
|
||||
#define RDB_TYPE_GtoH_READY_FOR_DATA 5
|
||||
#define RDB_TYPE_GtoH_DATA_CT 6
|
||||
#define RDB_TYPE_GtoH_DATA 7
|
||||
#define RDB_TYPE_GtoH_DEBUG 8
|
||||
#define RDB_TYPE_GtoH_RAMROM 9
|
||||
#define RDB_TYPE_GtoH_DEBUG_DONE 10
|
||||
#define RDB_TYPE_GtoH_DEBUG_READY 11
|
||||
#define RDB_TYPE_GtoH_KDEBUG 12
|
||||
#define RDB_TYPE_GtoH_PROF_DATA 22
|
||||
|
||||
|
||||
#define RDB_TYPE_HtoG_LOG_DONE 13
|
||||
#define RDB_TYPE_HtoG_DEBUG 14
|
||||
#define RDB_TYPE_HtoG_DEBUG_CT 15
|
||||
#define RDB_TYPE_HtoG_DATA 16
|
||||
#define RDB_TYPE_HtoG_DATA_DONE 17
|
||||
#define RDB_TYPE_HtoG_REQ_RAMROM 18
|
||||
#define RDB_TYPE_HtoG_FREE_RAMROM 19
|
||||
#define RDB_TYPE_HtoG_KDEBUG 20
|
||||
#define RDB_TYPE_HtoG_PROF_SIGNAL 21
|
||||
|
||||
|
||||
#define RDB_PROF_ACK_SIG 1
|
||||
#define RDB_PROF_FLUSH_SIG 2
|
||||
#define PROF_BLOCK_SIZE 2048
|
||||
|
||||
#define RDB_LOG_MAX_BLOCK_SIZE 0x8000
|
||||
#define RDB_DATA_MAX_BLOCK_SIZE 0x8000
|
||||
|
||||
|
||||
/* GIO side address */
|
||||
#define GIO_RDB_BASE_REG 0xbf480000
|
||||
#define GIO_RDB_WRITE_INTR_REG (GIO_RDB_BASE_REG + 0x8)
|
||||
#define GIO_RDB_READ_INTR_REG (GIO_RDB_BASE_REG + 0xc)
|
||||
|
||||
/* minor device number */
|
||||
#define GIO_RDB_PRINT_MINOR 1
|
||||
#define GIO_RDB_DEBUG_MINOR 2
|
||||
|
||||
/* interrupt bit */
|
||||
#define GIO_RDB_WRITE_INTR_BIT 0x80000000
|
||||
#define GIO_RDB_READ_INTR_BIT 0x40000000
|
||||
|
||||
/* debug command */
|
||||
#define DEBUG_COMMAND_NULL 0
|
||||
#define DEBUG_COMMAND_MEMORY 1
|
||||
#define DEBUG_COMMAND_REGISTER 2
|
||||
#define DEBUG_COMMAND_INVALID 255
|
||||
|
||||
/* debug state */
|
||||
#define DEBUG_STATE_NULL 0
|
||||
#define DEBUG_STATE_RECEIVE 1
|
||||
#define DEBUG_STATE_INVALID 255
|
||||
|
||||
#if defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS)
|
||||
|
||||
/* Structure for debug port */
|
||||
typedef struct {
|
||||
unsigned type : 2; /* 0: invalid, 1: print, 2: debug */
|
||||
unsigned pad : 4; // CHANGED FROM THE ORIGINAL LIBULTRA HEADER
|
||||
unsigned length : 2; /* 1, 2, or 3 */
|
||||
unsigned char buf[3]; /* character buffer */
|
||||
} rdbPacket;
|
||||
|
||||
extern unsigned int __osRdbWriteOK;
|
||||
extern unsigned int __osRdbSendMessage;
|
||||
|
||||
#endif /* _LANGUAGE_C */
|
||||
|
||||
#endif /* !_RDB_H */
|
||||
@@ -18,7 +18,7 @@
|
||||
/* Flags */
|
||||
#define M_TASK_FLAG0 1
|
||||
#define M_TASK_FLAG1 2
|
||||
#ifdef VERSION_SH
|
||||
#if defined(VERSION_SH) || defined(VERSION_CN)
|
||||
#define M_TASK_FLAG2 4
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#ifndef _ULTRA64_TYPES_H_
|
||||
#define _ULTRA64_TYPES_H_
|
||||
|
||||
#if defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS)
|
||||
|
||||
#ifndef NULL
|
||||
#define NULL (void *)0
|
||||
#endif
|
||||
@@ -42,3 +44,5 @@ typedef ptrdiff_t ssize_t;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user