Loading files

From NeoGeo Development Wiki
Jump to: navigation, search

BIOS calls BIOSF_LOADFILE ($C00552) and BIOSF_LOADFILEX ($C00564) are used to load files from the CD.

The BIOSF_LOADFILE call displays a loading animation, while BIOSF_LOADFILEX (better name ?) doesn't.

Register A0 needs to point to a block indicating:

  • The filename, ended by a 0 byte
  • The bank number (8bit)
  • An optional pad byte to align:
  • Destination address (32bit)

The destination memory is automatically chosen according to the file's extension.


BIOS RAM adresses for currently loaded sectors, total sectors ?...

Samurai Shodown RPG Loading

Once the bios has handled the initial IPL loading for this game all other loading is handled by the game itself and not the bios calls above. The IPL loads file 'EXT_SYS.PRG' to 0x132000 and all known future 'in game' loading is handled by code in this area. Why the games uses this instead of the bios is not currently known but it may be related to the bios not being able to handle the amount of files stored on the CD disc (3831) or to optimize loading of the many small files used by the game.

This code will need investigating to obtain a full understanding of why it is used over the bios. There may also be other bios routines not related to loading used here too.