On Saturday 20 January 2001 16:03, you wrote:
> I'm thinking about a nice idea. What about creating a extended .ROM format
> for emulators?
It sounds like a good idea to me.
> I mean a new file format with a header which contains useful data for
> the emulators: complete name of game, manufacturer, CRC, kind of mapper,
> etc.
I think it should also have a new filename extension, because using .ROM will
confuse existing emulators.
How about ERF (Extended ROM Format)? It sounds cool, IMO...
A possible option is to allow the ROM data (not the header) to be compressed.
It saves harddisk/CD-ROM space and you don't have to unpack the file after
you download it. Is there a compression algorithm doesn't have any patent
issues and is either easy to implement or already implemented under a liberal
license (preferably BSD or similar)?
> +0: Signature 'MSX' (3 bytes)
> +3: Generation (1 byte) The MSX type required (0=msx1, 1=msx2 ... just
> like 2Dh position on mainrom)
> +4: Complete name (40 bytes long)
> +44: Manufacturer (22 bytes long)
> +66: Mapper kind (1 byte) msb=MegaROM or not, 7 lsb=mapper number
> +67: 16bit CRC (2 bytes)
> +69 to end: reserved for future aplications ;)
It would also need a format version number, otherwise it's harder to extend
the format.
Other info that would be nice is the year it was released.
Maybe it's a good idea to include a field that states the length of the
header. That way, the header size can be extended without the risk of the
reserved space running out. Also, there is no unused space, so the ROMs are
as small as possible.
About mapper kind: why use a bit flag for indicating non-MegaROM? We could
just give non-MegaROMs numbers just like the MegaROM mappers. There is more
than one non-MegaROM type (I just found out ROMs with BASIC programs are
located at #8000 instead of #4000).
An totally different option is to include the mapper algorithm. This is more
complicated than a mapper number, but it's also more flexible: when a new
mapper type is discovered, the emulator doesn't have to be changed. To
describe the mapper algorithm, a generalized mapper algorithm must be
designed and the specific mapper is described using parameters of the
generalized mapper algorithm.
For example, the Konami non-SCC mapper would look like this:
number of mapper registers: 4
page size: 8K
#4000-#5FFF is selected by mapper register 0
#6000-#7FFF is selected by mapper register 1
#8000-#9FFF is selected by mapper register 2
#A000-#BFFF is selected by mapper register 3
mapper register 0 is written through #4000 in this slot
mapper register 1 is written through #6000 in this slot
mapper register 2 is written through #8000 in this slot
mapper register 3 is written through #A000 in this slot
And the Super Lode Runner mapper would look like this:
number of mapper registers: 1
page size: 16K
#4000-#7FFF is not connected
#8000-#BFFF is selected by mapper register 0
mapper register 0 is written through #0000 in any slot
Maybe it is even possible to extend this approach to include descriptions of
SRAM. That would be really cool, but it may be too complex.
Bye,
Maarten
--
For info, see http://www.stack.nl/~wynke/MSX/listinfo.html