Stella supports .bin
Genplusgx supports .bin
Stella will erroneously load genesis roms and attempt to run them without any kind of error. =/
Any good way to know which ROM is a atari ROM through file inspection? Or should I just disallow .BIN extension everywhere? (which would suck cause my entire genesis collection is in .BIN)
(Btw, currently making a front-end for libretro)
That used to be a problem for Genesis vs. Game Boy Advance until the GBA community adopted .gba as the standard. Other extensions I've seen:
- VCS: .a26
- MD non-interleaved: .gen
UNIX has less of a problem because content-type isn't so tied to the filename; instead, detect content-type by looking for magic numbers. You could mimic this by writing a short program that looks for "SEGA" or the Nintendo logo data in the appropriate place, verifies each platform's header checksum, etc. and launches the appropriate emulator.
Sounds like I should probably just punt on this for now then and ask people to not use .BIN file roms.
If you're making an emulator front-end, you're in the perfect position to do the sort of magic number detection that I described. Look up each common format's header spec and checksum spec. It's fine to warn the user against .bin, but only if you can't get a positive ID should your program give up and turn this warning into an error.
stella looks like it just looks at the file size itself and figures out what format it is based on that - which obviously won't work in cross-detection. Genesis has SEGA in certain magic spots which it looks for and so in theory I can create a special check inside of stella to make sure its not actually a genesis rom masquerading as a atari rom. But that doesn't solve all the other emulators out there. I feel this is a losing battle. =/
I'd be really surprised if I found a 2600 ROM bigger than 32KiB, or a Genesis ROM smaller than 64 KiB.
Look on the bright side: you don't have to decode .hex files too.
lidnariq wrote:
I'd be really surprised if I found a 2600 ROM bigger than 32KiB, or a Genesis ROM smaller than 64 KiB.
Look on the bright side: you don't have to decode .hex files too.
I'll check that. Good idea!
For the most part, atari games are <= 32k, however there is a 32 in 1 rom which is 64k. The smallest genesis game is ~128k (not including game genie roms). so 64k is a good check
I'll patch stella and upstream it.
Don't rely so heavily on ROM sizes though, since homebrews can be as small or as large as their creators want.
tokumaru wrote:
Don't rely so heavily on ROM sizes though, since homebrews can be as small or as large as their creators want.
This is only for .BIN files. Hopefully homebrew uses better file formats.
The native format for both 2600 and MD ROMs is a raw binary. Homebrews use the exact same type of file formats that commercial games do. The only other viable alternative MD format is .SMD, and...well, just no.
Same with SFC, Game Boy, GBC, and GBA: the executable format is just the raw binary. This is just about creating the needed infrastructure to distinguish which platform a particular raw binary is for. Most of the time it's metadata in the filename, but this doesn't distinguish Atari 2600, Genesis, and early GBA images, all of whose filenames end with ".bin". Fortunately, Genesis and GBA have constants in the first 320 bytes.