Hi people,

        As you may know, I'm developing now a windows version of 
BrMSX (which also run on linux with WINE). BrMSX for windows
will have a lot of new features: one of them is the generalized
file formats.

        I was going to introduce a new generic file format for
msx games, but since the idea behind it is very similar to the
one you're proposing, it better to explain my ideas about it
so we can integrate the projects.

        Being an msx emulator author is not fun these days,
there are too many beginners who never had the msx but want
to it for the first time. To these people, it's too difficult
to understand what's behind .rom, .dsk, .bin, .bas files.
The best solution I found was to create a unified format 
which makes all the others obsolete.

        But how can we do it? My idea is to pack every msx game
inside a .zip file. Zip files can have many types of compression,
one of them (the "inflate" algorithm) is free of patents,
and you can get source code for free in the "zlib" library
(just search for zlib in the web).

        To make the emulator recognize the .zip as an msx game,
you should make two steps: 

        1. renaming the file to a new extension. I suggest .msx, 
this extension was already used in the past, but the software
who used it are discontinued these days. Plus, it's an easy
format to remember (beginners would see an .msx file and recognize
it instantly as an msx game, this would not happen with .erf or
other extensions)
 
        2. including inside the .zip a file named "msxgame.ini",
which will be the "header" of the game. Appending binary data
at the end of existing files is not a good idea: I'm sure
some emulators would not load games with sizes different from
mutiples of 16kb. The msxgame.ini should be an ascii file,
this will make the format more portable, since it would not
rely on endianess of the host emulator, and also ascii files can
be edited easily on any text editor.

        I liked the idea Maarten presented about including the
mapper description inside the file, however I think this cannot
be done in practice. How could we describe extra hardware of the 
game, such as the SCC in F-1 Spirit, or the DAC in konami's mahjong?
It's better to have a number identifing the mapper type, just
like the ones introduced by Marat in fmsx, and make those numbers
standard and well described in some home page.

        I will present two examples of .msx files, we can extend 
and modify them from now on:

---------
1st example: penguin adventure

        It would be inside a file called penguin.msx (which
is of course just penguin.zip renamed). The contents of the
file would be:

        msxgame.ini
        penguin.rom
        sshot.jpg
        cover.jpg

        The contents of msxgame.ini would be:

-- start of msxgame.ini
-- two "-" signs a comment

-- every text field can have language tags, 
-- if none is specified, "english" is assumed as default.
-- for japanese, text would be in shift-jis or similar,
-- I put romanji here for clarity only
Name=(english: "Penguin Adventure", 
      nihongo: "yume tairiku adobentyaa")
Manufacturer="Konami"
Year=1986

-- 1=msx 1, 2=msx 2, 3=msx2+, 4=msx turboR
Machine=1

-- Gametype selects the media of the game
-- "0" means a cartridge gane (rom file)
-- Emulator developers would look in the official .msx file format 
-- home page to know what the number means
Gametype=0

-- ROM selects a file inside the .msx
ROM=penguin.rom

-- "3" means generic konami 8kb without scc
-- Emulator developers would look in the official .msx file format 
-- home page to know what the number means
ROMtype=3

-- except for the ROM and ROMtype tags, every other
-- options is optional, emulator developers should write
-- robust parsers using lex, yacc or similar,
-- who does not crash when a tag is not found

-- the tag below selects a screenshot of the game
-- this can be presented in the "load" menu of the emulator
-- so the user can select the game by clicking on the
-- screenshot of something like that
-- a text emulator like fmsx-unix or brmsx-dos should ignore this tag
-- images should be in jpeg format, since it's a free format
-- with source code available on the web
Screenshot=sshot.jpg

-- Emulators could have an "advanced info" button,
-- where further information about the game is displayed
-- it could have, for instance, a photo of the manual cover,
-- simple instructions for the game, easter eggs 
-- and stuff like that
Cover=cover.jpg
Comment=(english:
"Penguin Adventure is a sequel to the game Antartic Adventure.
In this game, the penguin hero must rescue a golden apple 
to save the dying penguin princess. Use the cursors to control
the penguin, SPACE to jump and M to shoot. F1 is the pause key:
to finish the game, you must press the pause key once, and
only once! In the "level select" screen, press NORIKO to
enable continues.",
        portuguese:
"Penguin Adventure é uma continuação do jogo Antartic Adventure.
Nesse jogo, o herói pingüim precisa resgatar uma maça dourada
para salvar a moribunda princesa pingüim. Use os cursores
para controlar o pingüim, ESPAÇO para pular e M para atirar.
F1 é a tecla de pausa, você precisa pressioná-la uma vez, e não
mais que uma vez, para completar o jogo! Na tela "level select",
digite NORIKO para habilitar continues.")

-- the tag below identifies the one who encapsulated
-- the game inside the .msx package
Author="Ricardo Bittencourt"

--end of msxgame.ini

        ROMtype is not restriced to MegaROMs, it could have
a number to indicate BASIC cartridges, another one to 
0000h cartridges like Theseus (who must be replicated 
at 4000h and 8000h to run). Non-mapped 64kb roms such as
PAINTER.ROM would have its own number also.

        Let's see another example:

---------
2nd example: Aleste 2
        
        The contents of the aleste.msx file would be:

        msxgame.ini
        aleste2a.dsk
        aleste2b.dsk
        aleste2c.dsk
        sshot.jpg
        cover.jpg

-- start of msxgame.ini
Name="Aleste 2"
Manufacturer="Compile"
Year=1989
Machine=2

-- gametype "2" means diskimages (.dsk files)
Gametype=2

-- number of disk images
DSKnumber=3

-- the string behind the file name is the description the disk
-- an emulator could display this name in a combo box
-- to let the used select which disk he wants
DSK[0]=aleste2a.dsk,"Intro disk"
DSK[1]=aleste2b.dsk,"Data 1 disk"
DSK[2]=aleste2c.dsk,"Data 2 disk"

Screenshot=sshot.jpg
Cover=cover.jpg
Comment="Sequel to Aleste 2"
Author="Ricardo Bittencourt"
--end of msxgame.ini

---------
3rd example: Venom Strikes Back

        Contents of venom.msx:

        msxgame.ini
        venom.1
        venom.2
        venom.3
        venom.4
        venom.bas

-- start of msxgame.ini
Name="Venom Strikes Back"

-- let's suppose I didn't know the manufacturer and year
-- of this game, in this case all I need to do is not
-- include the tags Manufacturer and Year in the msxgame.ini
Machine=1

-- "3" means a basic file, the emulator should mount
-- the files selected inside a virtual .dsk 
Gametype=3

-- the first is the executable
-- it would be nice if the emulator inserts 
-- run"venom.bas" in the keyboard buffer.
-- emulator users these days doesn't know to run basic files
Mount=venom.bas,venom.1,venom.2,venom.3,venom.4


-- let's suppose I'm lazy today 
-- I will just not include the screenshots and comments
-- games archivers suchs as MEP and D-MSX webmasters
-- would select the best .msx packages to place
-- in theirs sites and reject the poorly made like this one

Author="Ricardo Bittencourt"
-- end of the msxgame.ini file


----

        The .msx file format home page should have some ANSI C
source code implementing all of this. BrMSX for windows
will implement all these features so I can donate my code
for the project (brmsx is an open source project).

        There is no need for CRC tags in the msxgame.ini,
since the zip encapsulation already provides internal crc
for the contents.

        Let's discuss now this format, any comment or suggestion
is greatly welcomed.

        Ricardo Bittencourt

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

Reply via email to