SMS-GCI-Loader/include/gcn.h
sup39 23e5c658ad Add script to build gecko code of GCI Loader
- GCI Loader: gecko-gosub + 06 bin + 04 bl to onReadOptionBlock
- place GCI Loader code at 817FE800 since [817FEEA0, 81800000) is used
  by system
- place buffer at 817F1800 (instead of 817F1000+4) since there seems to
  be some alignment issue
- Assume file size == 0x2000*6 since fileInfo->length seems to be 0
2023-02-11 19:36:44 +09:00

37 lines
833 B
C

#include <stdint.h>
#include "typedefs.h"
#ifndef __GCN_H__
#define __GCN_H__
#define CARD_SLOT_A 0
#define CARD_SLOT_B 1
#define MEM1_START 0x80000000
#define MEM1_END 0x81800000
// The area beyond ArenaHi is used by system
// and should not be modified
// TODO version?
#define ArenaHi 0x817FEEA0
typedef struct CARDFileInfo
{
s32 chan;
s32 fileNo;
s32 offset;
s32 length;
u16 iBlock;
} CARDFileInfo;
s32 CARDOpen(s32 slot, const char *fileName, CARDFileInfo *fileInfo);
s32 CARDRead(CARDFileInfo *fileInfo, void *addr, s32 length, s32 offset);
s32 CARDClose(CARDFileInfo *fileInfo);
s32 CARDUnmount(s32 chan);
// typedef void (*CARDCallback)(s32 chan, s32 result);
// s32 CARDProbeEx(s32 chan, s32 *memSize, s32 *sectorSize);
// s32 CARDMount(s32 chan, void *workArea, CARDCallback detachCallback);
#endif