1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-03 14:34:32 +00:00

Matched some controller files (#178)

* osPfsIsPlug.c and osContSetCh.c OK

* update

* __osPfsGetStatus.c OK

* removed unused asm

* Updated all libultra controller files to use new structs instead of the temporary structs. Added os_pfs.h

* controller updates

* fixed header guard

* Made suggested changes
This commit is contained in:
Lucas Shaw 2020-06-17 04:16:30 -07:00 committed by GitHub
parent 229e0c8629
commit b86edcf92c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
39 changed files with 650 additions and 1001 deletions

View file

@ -1,207 +0,0 @@
/*====================================================================
* os_cont.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_cont.h,v $
$Revision: 1.1 $
$Date: 1998/10/09 08:01:05 $
*---------------------------------------------------------------------*/
#ifndef _OS_CONT_H_
#define _OS_CONT_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 controllers
*/
typedef struct {
u16 type; /* Controller Type */
u8 status; /* Controller status */
u8 errno;
}OSContStatus;
typedef struct {
u16 button;
s8 stick_x; /* -80 <= stick_x <= 80 */
s8 stick_y; /* -80 <= stick_y <= 80 */
u8 errno;
} 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 dataCrc; /* CRC code for data */
u8 errno;
} OSContRamIo;
#endif /* defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS) */
/**************************************************************************
*
* Global definitions
*
*/
/*
* Controllers number
*/
#ifndef _HW_VERSION_1
#define MAXCONTROLLERS 4
#else
#define MAXCONTROLLERS 6
#endif
/* controller errors */
#define CONT_NO_RESPONSE_ERROR 0x8
#define CONT_OVERRUN_ERROR 0x4
#ifdef _HW_VERSION_1
#define CONT_FRAME_ERROR 0x2
#define CONT_COLLISION_ERROR 0x1
#endif
/* Controller type */
#define CONT_ABSOLUTE 0x0001
#define CONT_RELATIVE 0x0002
#define CONT_JOYPORT 0x0004
#define CONT_EEPROM 0x8000
#define CONT_EEP16K 0x4000
#define CONT_TYPE_MASK 0x1f07
#define CONT_TYPE_NORMAL 0x0005
#define CONT_TYPE_MOUSE 0x0002
#define CONT_TYPE_VOICE 0x0100
/* Controller status */
#define CONT_CARD_ON 0x01
#define CONT_CARD_PULL 0x02
#define CONT_ADDR_CRC_ER 0x04
#define CONT_EEPROM_BUSY 0x80
/* Buttons */
#define CONT_A 0x8000
#define CONT_B 0x4000
#define CONT_G 0x2000
#define CONT_START 0x1000
#define CONT_UP 0x0800
#define CONT_DOWN 0x0400
#define CONT_LEFT 0x0200
#define CONT_RIGHT 0x0100
#define CONT_L 0x0020
#define CONT_R 0x0010
#define CONT_E 0x0008
#define CONT_D 0x0004
#define CONT_C 0x0002
#define CONT_F 0x0001
/* Nintendo's official button names */
#define A_BUTTON CONT_A
#define B_BUTTON CONT_B
#define L_TRIG CONT_L
#define R_TRIG CONT_R
#define Z_TRIG CONT_G
#define START_BUTTON CONT_START
#define U_JPAD CONT_UP
#define L_JPAD CONT_LEFT
#define R_JPAD CONT_RIGHT
#define D_JPAD CONT_DOWN
#define U_CBUTTONS CONT_E
#define L_CBUTTONS CONT_C
#define R_CBUTTONS CONT_F
#define D_CBUTTONS CONT_D
/* Controller error number */
#define CONT_ERR_NO_CONTROLLER PFS_ERR_NOPACK /* 1 */
#define CONT_ERR_CONTRFAIL CONT_OVERRUN_ERROR /* 4 */
#define CONT_ERR_INVALID PFS_ERR_INVALID /* 5 */
#define CONT_ERR_DEVICE PFS_ERR_DEVICE /* 11 */
#define CONT_ERR_NOT_READY 12
#define CONT_ERR_VOICE_MEMORY 13
#define CONT_ERR_VOICE_WORD 14
#define CONT_ERR_VOICE_NO_RESPONSE 15
#if defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS)
/**************************************************************************
*
* Macro definitions
*
*/
/**************************************************************************
*
* Extern variables
*
*/
/**************************************************************************
*
* Function prototypes
*
*/
/* Controller interface */
extern s32 osContInit(OSMesgQueue *, u8 *, OSContStatus *);
extern s32 osContReset(OSMesgQueue *, OSContStatus *);
extern s32 osContStartQuery(OSMesgQueue *);
extern s32 osContStartReadData(OSMesgQueue *);
#ifndef _HW_VERSION_1
extern s32 osContSetCh(u8);
#endif
extern void osContGetQuery(OSContStatus *);
extern void osContGetReadData(OSContPad *);
#endif /* defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS) */
#ifdef _LANGUAGE_C_PLUS_PLUS
}
#endif
#endif /* !_OS_CONT_H_ */

View file

@ -19,14 +19,6 @@
* Copyright Laws of the United States.
*====================================================================*/
/*---------------------------------------------------------------------*
Copyright (C) 1998 Nintendo. (Originated by SGI)
$RCSfile: os_message.h,v $
$Revision: 1.1 $
$Date: 1998/10/09 08:01:15 $
*---------------------------------------------------------------------*/
#ifndef _OS_MESSAGE_H_
#define _OS_MESSAGE_H_

View file

@ -2409,28 +2409,28 @@ s16 sins(u16);
// ? func_801004C0(?);
// ? osSpTaskLoad(?);
// ? osSpTaskStartGo(?);
// s32 osSetRumble(unk_controller_t *arg0, u32 vibrate);
// void osSetUpMempakWrite(s32 ctrlridx, pif_data_buffer_t* buf);
// s32 osProbeRumblePak(OSMesgQueue* ctrlrqueue, unk_controller_t *unk_controller, u32 ctrlridx);
// void __osSiCreateAccessQueue();
// void __osSiGetAccess();
// void __osSiRelAccess();
// s32 osContInit(OSMesgQueue *mq, u8 *ctl_present_bitfield, OSContStatus *status);
// void __osContGetInitData(u8 *ctl_present_bitfield, OSContStatus *status);
// void __osPackRequestData(u8 command);
// s32 osContStartReadData(OSMesgQueue *mq);
// void osContGetReadData(OSContPad *pad);
// void __osPackReadData();
s32 osSetRumble(OSPfs* pfs, u32 vibrate);
void osSetUpMempakWrite(s32 channel, OSPifRam* buf);
s32 osProbeRumblePak(OSMesgQueue* ctrlrqueue, OSPfs* pfs, u32 channel);
void __osSiCreateAccessQueue();
void __osSiGetAccess();
void __osSiRelAccess();
s32 osContInit(OSMesgQueue *mq, u8 *ctl_present_bitfield, OSContStatus *status);
void __osContGetInitData(u8 *ctl_present_bitfield, OSContStatus *status);
void __osPackRequestData(u8 poll);
s32 osContStartReadData(OSMesgQueue *mq);
void osContGetReadData(OSContPad* pad);
void __osPackReadData();
// ? guPerspectiveF(?);
// ? guPerspective(?);
// ? __osSpRawStartDma(?);
// s32 __osSiRawStartDma(s32 dir, void *addr);
s32 __osSiRawStartDma(s32 dir, void *addr);
// ? osSpTaskYield(?);
// ? func_801014C0(?);
s32 osPfsReadWriteFile(OSPfs* pfs, s32 file_no, u8 flag, s32 offset, s32 nbytes, u8* data_buffer);
// ? func_80101910(?);
// ? func_801019E0(?);
// ? func_80101AA4(?);
s32 __osPfsGetStatus(OSMesgQueue* queue, s32 channel);
void __osPfsRequestOneChannel(s32 channel, u8 poll);
void __osPfsGetOneChannelData(s32 channel, OSContStatus* contData);
// ? guMtxIdentF(?);
void guLookAtF(MtxF* mf, f32 xEye, f32 yEye, f32 zEye, f32 xAt, f32 yAt, f32 zAt, f32 xUp, f32 yUp, f32 zUp);
void guLookAt(Mtx*, f32 xEye, f32 yEye, f32 zEye, f32 xAt, f32 yAt, f32 zAt, f32 xUp, f32 yUp, f32 zUp);
@ -2472,11 +2472,12 @@ void guOrtho(Mtx*, f32, f32, f32, f32, f32, f32, f32);
f32 cosf(f32);
s16 coss(u16);
void osViSetEvent(OSMesgQueue* mq, OSMesg m, u32 retraceCount);
// ? func_8010499C(?);
// ? func_80104A50(?);
s32 osPfsIsPlug(OSMesgQueue* mq, u8* pattern);
void __osPfsRequestData(u8 poll);
void __osPfsGetInitData(u8 *pattern, OSContStatus* contData);
void guS2DInitBg(uObjBg *bg);
// ? func_80104C80(?);
void func_80104D00(u8 a0);
s32 osContSetCh(u8 ch);
s32 osPfsFileState(OSPfs* pfs, s32 file_no, OSPfsState* state);
s32 osPfsInitPak(OSMesgQueue* mq, OSPfs* pfs, s32 controller_no);
// ? func_80105148(?);
@ -2486,7 +2487,7 @@ s32 osPfsInitPak(OSMesgQueue* mq, OSPfs* pfs, s32 controller_no);
// ? osAiGetLength(?);
void guTranslate(Mtx* m, f32 x, f32 y, f32 z);
// ? func_80105CF0(?);
// s32 osReadMempak(OSMesgQueue* ctrlrqueue, u32 ctrlridx, s16 addr, PIF_mempak_data_t* data)
s32 osReadMempak(OSMesgQueue* ctrlrqueue, s32 channel, u16 addr, u8* data);
u8 osMempakAddrCRC(u16 addr);
u8 osMempakDataCRC(u8* data);
u32 __osSpGetStatus();

View file

@ -13,7 +13,6 @@
#include <ultra64/rdp.h>
#include <ultra64/rsp.h>
#include <ultra64/os_thread.h>
//#include <ultra64/thread.h>
#include <ultra64/convert.h>
#include <ultra64/time.h>
#include <ultra64/os_message.h>

View file

@ -2,10 +2,13 @@
#define _ULTRA64_CONTROLLER_H_
#include <ultra64.h>
#include <PR/os_cont.h>
#include <ultra64/pfs.h>
#include <PR/os_message.h>
#define SIAccessQueueSize 2
#define BLOCKSIZE 32
#define MAXCONTROLLERS 4
#define CONT_CMD_REQUEST_STATUS 0
#define CONT_CMD_READ_BUTTON 1
#define CONT_CMD_READ_MEMPACK 2
@ -34,10 +37,84 @@
#define CONT_CMD_END 0xFE // Indicates end of a command
#define CONT_CMD_EXE 1 // Set pif ram status byte to this to do a command
#define CONT_ERR_NO_CONTROLLER PFS_ERR_NOPACK /* 1 */
#define CONT_ERR_CONTRFAIL CONT_OVERRUN_ERROR /* 4 */
#define CONT_ERR_INVALID PFS_ERR_INVALID /* 5 */
#define CONT_ERR_DEVICE PFS_ERR_DEVICE /* 11 */
#define CONT_ERR_NOT_READY 12
#define CONT_ERR_VOICE_MEMORY 13
#define CONT_ERR_VOICE_WORD 14
#define CONT_ERR_VOICE_NO_RESPONSE 15
#define DIR_STATUS_EMPTY 0
#define DIR_STATUS_UNKNOWN 1
#define DIR_STATUS_OCCUPIED 2
#define PFS_FORCE 1
#define PFS_DELETE 1
#define PFS_LABEL_AREA 7
#define PFS_ERR_NOPACK 1
/* controller errors */
#define CONT_NO_RESPONSE_ERROR 0x8
#define CONT_OVERRUN_ERROR 0x4
/* Controller type */
#define CONT_ABSOLUTE 0x0001
#define CONT_RELATIVE 0x0002
#define CONT_JOYPORT 0x0004
#define CONT_EEPROM 0x8000
#define CONT_EEP16K 0x4000
#define CONT_TYPE_MASK 0x1F07
#define CONT_TYPE_NORMAL 0x0005
#define CONT_TYPE_MOUSE 0x0002
#define CONT_TYPE_VOICE 0x0100
/* Controller status */
#define CONT_CARD_ON 0x01
#define CONT_CARD_PULL 0x02
#define CONT_ADDR_CRC_ER 0x04
#define CONT_EEPROM_BUSY 0x80
/* Buttons */
#define CONT_A 0x8000
#define CONT_B 0x4000
#define CONT_G 0x2000
#define CONT_START 0x1000
#define CONT_UP 0x0800
#define CONT_DOWN 0x0400
#define CONT_LEFT 0x0200
#define CONT_RIGHT 0x0100
#define CONT_L 0x0020
#define CONT_R 0x0010
#define CONT_E 0x0008
#define CONT_D 0x0004
#define CONT_C 0x0002
#define CONT_F 0x0001
/* Nintendo's official button names */
#define A_BUTTON CONT_A
#define B_BUTTON CONT_B
#define L_TRIG CONT_L
#define R_TRIG CONT_R
#define Z_TRIG CONT_G
#define START_BUTTON CONT_START
#define U_JPAD CONT_UP
#define L_JPAD CONT_LEFT
#define R_JPAD CONT_RIGHT
#define D_JPAD CONT_DOWN
#define U_CBUTTONS CONT_E
#define L_CBUTTONS CONT_C
#define R_CBUTTONS CONT_F
#define D_CBUTTONS CONT_D
typedef struct
{
/* 0x00 */ union{
@ -65,88 +142,76 @@ typedef struct
/* 0x03 */ s8 y;
} PadInput; // size = 0x4
typedef struct
{
u8 slot_type; //0xFF for valid command, 0x00 for don't read this controller, 0xFE for end of commands
u8 bytes_send; //normally 1 (command)
u8 status_hi_bytes_rec_lo; //Status errors as defined in os_cont.h; bytes normally 4
u8 command; //0: get status, 1: read buttons, 2: read mempak, 3: write mempak, 4: read eeprom, 5: write eeprom, FF: reset controller
} PIF_header_t;
typedef struct
{
PIF_header_t hdr;
union{
PadInput input;
struct{
u8 ctl_type_lo;
u8 ctl_type_hi;
u8 ctl_status;
u8 dummy;
};
};
} PIF_IO_slot_t;
typedef union
{
u8 bytes[0x27];
struct{
PIF_header_t hdr;
u8 data[0x23]; //Yes, really 0x23 bytes of data
};
} PIF_mempak_wr_t;
typedef struct {
u32 ram[15]; /* RAM */
u32 status;
} OSPifRam;
typedef struct {
u8 data[0x20];
} PIF_mempak_data_t;
u16 type; /* Controller Type */
u8 status; /* Controller status */
u8 errno;
} OSContStatus;
typedef union
{
u8 bytes[0x40];
struct{
u32 words[0xF];
u32 status_control;
};
PIF_IO_slot_t slots[8];
} pif_data_buffer_t;
typedef struct {
u16 button;
s8 stick_x; /* -80 <= stick_x <= 80 */
s8 stick_y; /* -80 <= stick_y <= 80 */
u8 errno;
} OSContPad;
typedef union {
struct {
/* 0x0000 */ u32 unk0; //0x8 is some flag that needs to be set
/* 0x0004 */ OSMesgQueue *ctrlrqueue;
/* 0x0008 */ u32 ctrlridx; //0 to 3
};
u8 bytes[0x68];
} unk_controller_t; // size = 0x68
typedef struct {
void *address; /* Ram pad Address: 11 bits */
u8 databuffer[32]; /* address of the data buffer */
u8 addressCrc; /* CRC code for address */
u8 dataCrc; /* CRC code for data */
u8 errno;
} OSContRamIo;
extern pif_data_buffer_t osPifBuffers[4];
// Original name: __OSContRequesFormat
typedef struct {
u8 align;
u8 txsize;
u8 rxsize;
u8 poll;
u8 typeh;
u8 typel;
u8 status;
u8 align1;
} __OSContRequestHeader;
#define SIAccessQueueSize 2
extern OSMesg osSiMesgBuff[SIAccessQueueSize];
extern OSMesgQueue gOsSiMessageQueue;
extern u32 gOsSiAccessQueueCreated; // = 0
// Original name: __OSContRequesHeaderFormatShort
typedef struct {
u8 txsize;
u8 rxsize;
u8 poll;
u8 typeh;
u8 typel;
u8 status;
} __OSContRequestHeaderAligned;
extern pif_data_buffer_t _osPifInternalBuff;
extern u8 _osCont_lastPollType;
extern u8 _osCont_numControllers; //always 4
extern u32 gOsContInitialized; // = 0
extern OSMesgQueue _osContMesgQueue;
extern OSMesg _osContMesgBuff[4];
// Original Name: __OSContRamReadFormat
typedef struct {
u8 unk_00;
u8 txsize;
u8 rxsize;
u8 poll;
u8 hi;
u8 lo;
u8 data[BLOCKSIZE];
u8 datacrc;
} __OSContRamHeader;
extern s32 osSetRumble(unk_controller_t *arg0, u32 vibrate);
extern void osSetUpMempakWrite(s32 ctrlridx, pif_data_buffer_t* buf);
extern s32 osProbeRumblePak(OSMesgQueue* ctrlrqueue, unk_controller_t *unk_controller, u32 ctrlridx);
extern void __osSiCreateAccessQueue();
extern void __osSiGetAccess();
extern void __osSiRelAccess();
extern s32 osContInit(OSMesgQueue *mq, u8 *ctl_present_bitfield, OSContStatus *status);
extern void __osContGetInitData(u8 *ctl_present_bitfield, OSContStatus *status);
extern void __osPackRequestData(u8 command);
// Original name: __OSContReadFormat
typedef struct {
u8 align;
u8 txsize;
u8 rxsize;
u8 poll;
u16 button;
s8 joyX;
s8 joyY;
} __OSContReadHeader;
extern s32 osContStartReadData(OSMesgQueue *mq);
extern void osContGetReadData(OSContPad *pad);
extern void __osPackReadData();
extern s32 __osSiRawStartDma(s32 dir, void *addr);
#endif //_ULTRA64_CONTROLLER_H_

70
include/ultra64/pfs.h Normal file
View file

@ -0,0 +1,70 @@
#ifndef _ULTRA64_PFS_H_
#define _ULTRA64_PFS_H_
#include <ultra64.h>
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;
/* 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
#define PFS_ONE_PAGE 8
#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
#define PFS_ID_BROKEN 0x4
#define PFS_MOTOR_INITIALIZED 0x8
#define PFS_GBPAK_INITIALIZED 0x10
/* 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*/
#define PFS_ERR_NO_GBCART 12 /* no gb cartridge (64GB-PAK) */
#define PFS_ERR_NEW_GBCART 13 /* gb cartridge may be changed */
#endif

View file

@ -820,11 +820,11 @@ extern s32 gOverlayLogSeverity;
//extern ? D_80134484;
extern s32 gSystemArenaLogSeverity;
//extern ? D_801344C0;
//extern u32 gOsSiAccessQueueCreated = 0;
//extern u32 gOsContInitialized = 0;
extern u32 gOSSiAccessQueueCreated; // = 0;
extern u32 gOSContInitialized; // = 0
//extern ? D_80134CF0;
//extern ? D_80134CF4;
extern s32 D_80134D20;
extern u8 __osPfsInodeCacheBank;
extern s32 __osPfsLastChannel;
//extern ? D_80135130;
//extern ? D_80135158;
//extern ? D_801351A8;
@ -3737,16 +3737,16 @@ extern u32 __osMalloc_FreeBlockTest_Enable;
//extern ? D_801756A0;
//extern ? D_801756A8;
extern Arena gSystemArena;
//extern pif_data_buffer_t osPifBuffers[4];
//extern OSMesg osSiMesgBuff[SIAccessQueueSize];
//extern OSMesgQueue gOsSiMessageQueue;
//extern pif_data_buffer_t _osPifInternalBuff;
extern u8 _osCont_lastPollType;
//extern u8 _osCont_numControllers;
//extern OSMesgQueue _osContMesgQueue;
//extern OSMesg _osContMesgBuff[4];
extern OSPifRam osPifBuffers[MAXCONTROLLERS];
extern OSMesg osSiMesgBuff[SIAccessQueueSize];
extern OSMesgQueue gOSSiMessageQueue;
extern OSPifRam __osPifInternalBuff;
extern u8 __osContLastPoll;
extern u8 __osMaxControllers;
extern OSMesgQueue __osContMesgQueue;
extern OSMesg __osContMesgBuff[4];
//extern ? D_80175860;
extern pif_data_buffer_t pifMempakBuf;
extern OSPifRam pifMempakBuf;
//extern ? D_801759A0;
//extern ? D_801759A4;
//extern ? D_801759A8;
@ -3761,7 +3761,6 @@ extern pif_data_buffer_t pifMempakBuf;
//extern ? D_801759BA;
//extern ? D_801759BC;
//extern ? D_801759BE;
extern u16 gZBuffer[SCREEN_WIDTH * SCREEN_HEIGHT]; // 0x25800 bytes
extern u64 gGfxSPTaskOutputBuffer[0x3000]; // 0x18000 bytes
extern u8 gGfxSPTaskYieldBuffer[OS_YIELD_DATA_SIZE]; // 0xC00 bytes
@ -3770,7 +3769,6 @@ extern GfxPool gGfxPools[2]; // 0x24820 bytes
extern u8 gAudioHeap[0x38000]; // 0x38000 bytes
extern u8 gSystemHeap[];
extern MapMarksData* gMapMarkDataTable[];
//extern ? D_A4040004;
//extern ? D_A4040008;
//extern ? D_A404000C;

View file

@ -1558,7 +1558,7 @@ typedef struct {
/* 0x02AE */ u8 pakType[4]; // 1 if rumble pack, 2 if mempak?
/* 0x02B2 */ volatile u8 rumbleEnable[4];
/* 0x02B6 */ u8 rumbleCounter[4]; // not clear exact meaning
/* 0x02BC */ unk_controller_t unk_controller[4];
/* 0x02BC */ OSPfs pfs[4];
/* 0x045C */ volatile u8 rumbleOffFrames;
/* 0x045D */ volatile u8 rumbleOnFrames;
/* 0x045E */ u8 preNMIShutdown;
@ -1946,30 +1946,6 @@ typedef struct {
/* 0x0C */ F3dzexSetModeMacroValue values[4];
} F3dzexSetModeMacro; // size = 0x2C
typedef struct {
/* 0x00 */ s32 status;
/* 0x04 */ OSMesgQueue* queue;
/* 0x08 */ s32 channel;
/* 0x0C */ u8 id[32];
/* 0x2C */ u8 label[32];
/* 0x4C */ s32 version;
/* 0x50 */ s32 dir_size;
/* 0x54 */ s32 inode_table;
/* 0x58 */ s32 minode_table;
/* 0x5C */ s32 dir_table;
/* 0x60 */ s32 inode_start_page;
/* 0x64 */ u8 banks;
/* 0x65 */ u8 activebank;
} OSPfs; // size = 0x68
typedef struct {
/* 0x00 */ u32 file_size;
/* 0x04 */ u32 game_code;
/* 0x08 */ u16 company_code;
/* 0x0A */ char ext_name[4];
/* 0x0E */ char game_name[16];
} OSPfsState; // size = 0x20
typedef struct {
/* 0x00 */ u16* value;
/* 0x04 */ const char* name;