On Mon, 22 Jan 2001, Maarten ter Huurne wrote:
> > If we're going to stick with INI-style syntax (where
> > every sentence have the form XXX=YYY), then there's no need
> > to define which character indicates a comment. If a given
> > line doesn't have a XXX=YYY syntax, then it is a comment.
>
> But then no comment could include an "=" character.
Why not? Let's suppose someone writes a line like that:
-- I thought Machine=MSX2 but actually it is MSX2+
The parser would read the line and extract two strings:
Tag="-- I thought Machine"
Value="MSX2 but actually it is MSX2+"
It will then search for "-- I thought Machine" in the list of
valid tags. When it does not find it, it will just ignore the entire line.
As you can see, equal signs can be safely used inside comments, as long as
you place some identifier in the beginning of line, such as ";" , "//" ,
"--" or any other one.
> We would limit the choice of characters to lower case latin and digits. Note
> that we're talking about the game ID here, the name field can have SJIS
> characters, that's no problem because it's never used as a filename or in a
> URL.
That's ok to me, but the database manager will need a japanese
translator from time to time, to help design the six-letter acronym
for the game. In the case I mentioned earlier, it could be "yumeta",
but "jpgame" would not be acceptable.
> This also allows non-mapped ROMs to be described in this format. Such a
> cartridge simply has no Register statements, but does have Initial
> statements, so you can for example mirror a 16K ROM four times.
I think every ROM cartridge should have generic mapper
description. For instance,
Name="Antartic Adventure"
Banksize=16
Initial[4000]=0
Name="Knightmare"
Banksize=32
Initial[4000]=0
Name="Painter"
Banksize=64
Initial[0000]=0
> > Name="Super Lode Runner"
> > Banksize=16
> > Register[0000]=8000
> > Initial[0000]=0
> > Initial[4000]=0
> > Initial[8000]=0
> > Initial[C000]=0
>
> That's all true, but it's not complete. Super Lode Runner writes to #0000 in
> slot 0, not in the cartridge slot. But the cartridge does switch banks on
> such a write, because it ignores the slot select signal. So writing to #0000
> in any slot is a write to the mapper register.
We could add a flag in the register field:
Register[*0000]=8000
A "*" next to a register address means this particular address
does not process the slot select signal.
> > Name="Nemesis 3"
> > Banksize=8
> > Register[5000-57FF]=4000
>
> Does the actual cartridge have this behaviour? (reacting to all those
> addresses)
Yes, it has. It is cheaper to make cartridges this way,
because you don't have to add extra logic to process the lines A0-A10.
> > Register[B000-B7FF]=B000
> This should be "=A000".
You're right, this was a typo.
> > Initial[A000]=3
> > Extra=SCC
> > Extra=MSX2
>
> As I wrote in the very long mail, I don't think one level of "optional" is
> enough. There should be an indication of how much the option will be missed.
> The emulator can use that info to display warning messages ("game performance
> will be lower because of missing feature 'SCC'") or decide how to trade-off
> options (embedded systems low on memory may not allow all options to be
> enabled at the same time).
What about defining three levels of optionals?
We could make three tags, "Required", "Optional" and "Extra".
Required means the game will not run without it. Optional means
new features are enabled with this hardware. Extra means no new features
are enabled, but game improves performance. This syntax also makes
the tag "Machine" obsolete:
Name="Nemesis 3"
Required=MSX
Optional=SCC
Optional=MSX2
Name="Kyokugen"
Required=MSX2
Optional=MSX Music
Extra=MSX turboR
-- MSX turboR improves speed of the game
-- but introduce no new feature
Detailed message errors describing what happens when each option
is disabled should be stored in the .msx database server, together with
manuals, scans and stuff.
> (about Register[8000-87FF])
> Should we allow any range, or just ranges that can be formed using a bitmask?
Since we allowed Banksize=1, then we should allow any possible
range too. The reason is the same: we never know which strange cartridges
are out there.
> I think those are the only ones used in hardware and they're probably faster
> to implement. We could even modify the syntax accordingly:
> Register[5000/07FF]=XX
I think the syntax Register[5000-57FF] is easier to read.
The emulator should be able to get the bitmask from the range assigned,
an easy task, since all it need to do is (57FF)-(5000)=07FF.
Human readness is key here, we should make syntax easier for the human,
and not for the machine.
> And should we allow that a single mapper register is accessed through two
> separate ranges? For example:
> Register[7000]=7000
> Register[8000]=7000
I see no problem with that. An alternate syntax could be:
Register[7000,8000]=7000
And we could even allow trickier syntax...
Register[7000,8000-87FF,*9000]=7000
... which means there is a register in 7000, lots
of registers in the range 8000-87FF, and a register at 9000 who
does not process slot select.
----------------------------------------------------------------
Ricardo Bittencourt http://www.lsi.usp.br/~ricardo
[EMAIL PROTECTED] "Ricardo is subtle, but malicious he is not"
------ Uniao contra o forward - crie suas proprias piadas ------
--
For info, see http://www.stack.nl/~wynke/MSX/listinfo.html