> > 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...

How about .MSX, eh? It's a very logical extension but it isn't used by any
format yet.


> 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.

Definately a yes.
I suggest to using a 'option' system.

So:
byte 0-3: "MSX",<version>
byte 4-5: total header length (is also the ROM offset)
byte 6-7: checksum
byte 8: <option code> <option length> [<option data>]
...
byte n: <option code: end>

The processor reads the <option code> byte, checks if it's known (if yes,
updates the ROM info database). Unknown option codes can be skipped. The
<option length> includes the code and length byte (so the minimum length is
2).

Suggested option codes:
#00 - null (used for padding purposes)
#01 - end of option list.

I don't like the 16 bit CRC, it's too complex. I actually prefer a "the
16-bit one's complement of the one's complement sum of all 16-bit words in
the file. For purposes of computing the checksum, the value of the checksum
field is zero" (standard TCP/IP checksum). It's quite nifty.

Also, I think it's useful to include the minimum mapper size with the
options. So, here are some more options. If I specify a lenght it
excludes the option and size byte, so you should add 2 to it.

General information:
#10: Generation, length 1 (0=msx1, 1=msx2, 2=msx2+, 3=turboR)
#11: ROM mapper type, length 1 (to be specified)
#12: ROM size, length 1 (nr. of segments)
#13: Required RAM size, length 1 (nr. of mapper segments)
#15: Extended ROM mapper Type, variable length (the custom mapper
        format Maarten described)

Additional hardware required/preferred:
#20: Video chips supported, variable length (0=TMS9918, 1=v9938, 2=v9948,
3=v9958, 4=v9990, if a chip is compatible with another one the other one
should not be specified)
#21: Music chips supported, variable length (list of chips used, 0=PSG,
1=SCC, 2=SCC+, 3=FM-PAC, 4=MSX-Audio, 5=MSX-Audio with sample RAM,
6=MoonSound)
#25: PAC required, length 0 ((FM-)PAC SRAM required if option is given)
#26: Advram required, length 0 (Advram is required if option is given)

ROM information:
#30: Complete name, variable length (ASCIIZ-string)
#31: Manufacturer, variable length (ASCIIZ-string)
#32: Release date, length 4 (BCD, format ddmmyyyy)
#33: Comments, variable length (ASCIIZ string)

The ASCIIZ strings must ofcourse include the terminating zero.
But for all of this goes: be liberal in what you accept and be be
conservative in what you set.

About putting this at the end of the file: no, I think this is not a good
idea, it's not a logical place. About compatibility issues, it is very easy
to filter the header out, so if anyone wants to use an emulator which is not
updated to at least recognize the format and ignore the header, they can use
a simple tool which will be all too easy to create (load the file, then save
it starting at offset <header length>). People who put .MSX files online can
put (for example) MSX2ROM.EXE with it.

By the way, I think it's a good idea also to apply this same format to disk
images (however I suggest a different extension).


~Grauw





--
For info, see http://www.stack.nl/~wynke/MSX/listinfo.html

Reply via email to