#50937 - Mr Snowflake - Sun Aug 14, 2005 7:32 pm
I was wondering if there's a possibility to detect if you burned a rom to a gba flashcard or to a cf card using gbamp. If so, we are able to write a library that makes it possible to use one function to either load from gbfs or cf (fat), which would make homebrew work on both methods.
Edit: Is writing to CF using GBAMP the same as writing to CF from the SuperCard? Prob not, but then is it much of a difference?
#50941 - tepples - Sun Aug 14, 2005 7:51 pm
GBA note: Build your program as multiboot.
To rule out MBV2 or XBOO (on GBA) or FlashMe WMB (on Nintendo DS): Read the byte at 0x08000003. If it does not look like the upper bits of an ARM jump instruction, there is nothing in the Game Pak slot, likely meaning you are using a serial cable or Wi-Fi. Abort.
To rule out a properly built ROM: find_first_gbfs_file(ROM) will return a null pointer only if it finds an appended GBFS file. I have no experience with the GBA MP; you may have to modify find_first_gbfs_file() to prevent it from locking up the card.
Once you have ruled out everything but a GBA MP, you just need to make a wrapper for gbfs_copy_obj() that uses the FAT library.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#50951 - Dwedit - Sun Aug 14, 2005 8:53 pm
If you're using Chishm's filesystem code, CF_IsInserted and FAT_InitFiles will return false if no CF card is inserted into a GBAMP, or if the card itself is not a GBAMP.
_________________
"We are merely sprites that dance at the beck and call of our button pressing overlord."
#50965 - Sebbo - Sun Aug 14, 2005 10:37 pm
i noticed in moonshell that it supports cf and gbfs, maybe look at the code he/they have used? the source is supplied