Skip to content

Commit

Permalink
Fix m3cf DLDI size and remove unneeded branches in sccf
Browse files Browse the repository at this point in the history
  • Loading branch information
RocketRobz committed Nov 25, 2024
1 parent cfe7c19 commit a03e32a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 58 deletions.
2 changes: 1 addition & 1 deletion source/m3cf/source/dldi_header.s
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
.word 0xBF8DA5ED @ Magic number to identify this region
.asciz " Chishm" @ Identifying Magic string (8 bytes with null terminator)
.byte 0x01 @ Version number
.byte DLDI_SIZE_16KB
.byte DLDI_SIZE_4KB
.byte FIX_GOT | FIX_BSS | FIX_GLUE @ Sections to fix
.byte 0x00 @ Space allocated in the application, not important here.

Expand Down
10 changes: 5 additions & 5 deletions source/sccf/source/dldi_header.s
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@
.ascii "SCCF"
.word FEATURE_MEDIUM_CANREAD | FEATURE_MEDIUM_CANWRITE | FEATURE_SLOT_GBA
.word startup @
.word isInserted @
.word readSectors @ Function pointers to standard device driver functions
.word writeSectors @
.word clearStatus @
.word shutdown @
.word _CF_isInserted @
.word _CF_readSectors @ Function pointers to standard device driver functions
.word _CF_writeSectors @
.word _CF_clearStatus @
.word _CF_shutdown @

@---------------------------------------------------------------------------------
_start:
Expand Down
52 changes: 0 additions & 52 deletions source/sccf/source/iointerface.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,55 +102,3 @@ bool startup(void) {
return _CF_startup(&_SCCF_Registers);
}

/*-----------------------------------------------------------------
isInserted
Is a compact flash card inserted?
bool return OUT: true if a CF card is inserted
-----------------------------------------------------------------*/
bool isInserted (void) {
return _CF_isInserted();
}


/*-----------------------------------------------------------------
clearStatus
Tries to make the CF card go back to idle mode
bool return OUT: true if a CF card is idle
-----------------------------------------------------------------*/
bool clearStatus (void) {
return _CF_clearStatus();
}

/*-----------------------------------------------------------------
readSectors
Read 512 byte sector numbered "sector" into "buffer"
u32 sector IN: address of first 512 byte sector on CF card to read
u32 numSectors IN: number of 512 byte sectors to read,
1 to 256 sectors can be read
void* buffer OUT: pointer to 512 byte buffer to store data in
bool return OUT: true if successful
-----------------------------------------------------------------*/
bool readSectors (u32 sector, u32 numSectors, void* buffer) {
return _CF_readSectors(sector, numSectors, buffer);
}

/*-----------------------------------------------------------------
writeSectors
Write 512 byte sector numbered "sector" from "buffer"
u32 sector IN: address of 512 byte sector on CF card to read
u32 numSectors IN: number of 512 byte sectors to read,
1 to 256 sectors can be read
void* buffer IN: pointer to 512 byte buffer to read data from
bool return OUT: true if successful
-----------------------------------------------------------------*/
bool writeSectors (u32 sector, u32 numSectors, void* buffer) {
return _CF_writeSectors(sector, numSectors, buffer);
}

/*-----------------------------------------------------------------
shutdown
shutdown the CF interface
-----------------------------------------------------------------*/
bool shutdown(void) {
return _CF_shutdown();
}

0 comments on commit a03e32a

Please sign in to comment.