Software DIPs: Difference between revisions

From NeoGeo Development Wiki
Jump to navigation Jump to search
mNo edit summary
m (Wording, precisions)
 
(9 intermediate revisions by 3 users not shown)
Line 1: Line 1:
[[File:Softdips.png|thumb|right|A Soft DIPs setup screen.]]
[[File:Softdips.png|thumb|right|A Soft DIPs setup screen.]]


Software DIPs are a list of game-specific parameters, which are only acessible from the MVS [[BIOSes|BIOS]] menu.
Software DIPs are a list of a maximum of 14 game-specific settings. They can be modified from the MVS [[System ROM]] menu, or with system ROM hacks for other systems.


The parameters names and their possible values are stored in the game's [[68k program header]].
The settings names and their possible values are stored in the game's [[68k program header]] in a specific format, read by the system ROM to form a menu.


In [[MVS systems]], they're then stored in the [[battery-backed RAM]]. Location ? BIOS call ?
On the [[MVS]], the settings are saved for each game in the [[backup RAM]].


The AES and CD games have fixed values ?
The settings are copied from backup RAM to [[68k user RAM|user RAM]] to '''BIOS_GAME_DIP''' ($10FD84) just before the game is started up. If no settings are found, they're initialized to the default values.
 
(Does the system ROM check values pulled from the backup RAM against the bounds given by the game ? Can a corrupt backup RAM save make games crash with
out of bounds settings ?)


== Config data description ==
== Config data description ==


All the following informations by [[User:ElBarto|ElBarto]]:
Most of the following information by [[User:ElBarto|ElBarto]]:


{| class="regdef" style="text-align:center;"
{| class="regdef" style="text-align:center;"
| '''0x00'''
| '''0x00'''
| Game Name
| 16 bytes
| Game name, no termination char required.
|-
|-
| '''0x10'''
| '''0x10'''
| Special entry list, see description below
| 6 bytes
| Special settings list, 4 entries. See description below.
|-
|-
| '''0x16'''
| '''0x16'''
| Simple options list, up to 10 entry. 1 byte per entry. Padded with 0x00 for unused options.
| 10 bytes
| Simple settings list, up to 10 entries. See description below.
|-
|-
| '''0x20'''
| '''0x20'''
| Options string table. Strings are 12 bytes long and padded with 0x20 (space).
| x*12 bytes
| String table. Strings are 12 bytes long and padded with 0x20 (space). Max number ?
|}
|}


===Special options list description===
===Special settings list===
 
You can define up to 4 special options.


The first two words can be used to define two "timer options". You can set minutes and seconds. Upper byte defines the amount of minutes and the lower byte the seconds.
The special settings list holds 4 entries: the first 2 are for time settings, and the last 2 are for count settings.


The next byte can be used for a counter, from 00 to 99. The value written is the default one. (value above 0x63 will show some garbage data).
A time setting occupies one word, which defines the default value:
* The upper byte is the minutes (up to 29 ?, in BCD).
* The lower byte is the seconds (in BCD).


The last byte can be used for a counter plus two special values : "WITHOUT" and "INFINITE" (0x00 is without and 0x64 is infinite). The counter will go from 00 to 99 with the text "times" after.
An unused time setting must be set to 0xFFFF.


They all take one string in the strings table for the description.
A count setting occupies one byte, which defines the default value. It can go from 0 to 100 (not in BCD), with 0 displayed as "WITHOUT" and 100 as "INFINITE".
In some versions of the [[system ROM]], "times" is displayed after the value ?


All those options can be disable by entering 0xFF.
An unused count setting must be set to 0xFF.


===Simple options list description===
All special settings use a single string from the strings table, for the setting's name.


Each options consists of 1 byte.
===Simple settings list===


The upper 4 bits specify the default value and the lower 4 bits the number of choices.
Each options occupies one byte.


The only "special" entry list seems to be 0x64. When specified the title is still fetch from the string table but not the choice.
The upper 4 bits define the default value (starts from 0) and the lower 4 bits the number of choices.
[[NAM 1975]] uses it for the CONTINUE configuration.


TODO: See where the bios puts the data (and in which form) in the RAM. Bytes from $10FD84 to $10FD93 ?
A few games have a simple setting entry with a number of choices set to zero, just to show a "▼NEXT PAGE" string on the bottom of the MVS menu.


===Config examples===
==Examples==


<pre>
<pre>
     dc.b    "TEST ROM   "                           ; Game name
     dc.b    "TEST ROM       "                 ; Game name
     dc.b   $FF,$FF,$FF,$FF,$FF,$FF                  ; Special list
     dc.w   $FFFF                              ; Special settings list (none used)
     dc.b    $24,$02,$00,$00,$00,$00,$00,$00,$00,$00   ; Option list
    dc.w    $FFFF
     dc.b    "LIVES      "
    dc.b    $FF,$FF
     dc.b    "1          "
     dc.b    $24                               ; Simple setting 1: 4 choices, default is #2
    dc.b    $02                               ; Simple setting 2: 2 choices, default is #0
    dc.b    $00,$00,$00,$00,$00,$00,$00,$00
    ; String table:
     dc.b    "LIVES      "                     ; Simple setting 1's description
     dc.b    "1          "                     ; Simple setting 1's choices
     dc.b    "2          "
     dc.b    "2          "
     dc.b    "3          "
     dc.b    "3          "
     dc.b    "4          "
     dc.b    "4          "
     dc.b    "HOW TO PLAY "
     dc.b    "HOW TO PLAY "                     ; Simple setting 2's description
     dc.b    "WITH        "
     dc.b    "WITH        "                     ; Simple setting 2's choices
     dc.b    "WITHOUT    "
     dc.b    "WITHOUT    "
</pre>
</pre>
Line 74: Line 86:


<pre>
<pre>
     dc.b    "TEST ROM   "                           ; Game name
     dc.b    "TEST ROM       "                 ; Game name
     dc.b   $42,$20,$20,$42,$42,$64                   ; Special list
     dc.w   $4220                              ; Special setting 1: 42 minutes 20 seconds
     dc.b    $24,$02,$00,$00,$00,$00,$00,$00,$00,$00   ; Option list
    dc.w    $2042                              ; Special setting 2: 20 minutes 42 seconds
     dc.b    "TIMER 1    "
    dc.b    $42                               ; Special setting 3: 66
     dc.b    "TIMER 2    "
    dc.b    $64                               ; Special setting 4: 100 ("INFINITE")
     dc.b    "COUNTER    "
     dc.b    $24                               ; Simple setting 1: 4 choices, default is #2
     dc.b    "COUNTER SPE "
    dc.b    $02                               ; Simple setting 2: 2 choices, default is #0
     dc.b    "LIVES      "
    dc.b    $00,$00,$00,$00,$00,$00,$00,$00
     dc.b    "1          "
     dc.b    "TIMER 1    "                     ; Special setting 1's description
     dc.b    "TIMER 2    "                     ; Special setting 2's description
     dc.b    "COUNTER    "                     ; Special setting 3's description
     dc.b    "COUNTER SPE "                     ; Special setting 4's description
     dc.b    "LIVES      "                     ; Simple setting 1's description
     dc.b    "1          "                     ; Simple setting 1's choices
     dc.b    "2          "
     dc.b    "2          "
     dc.b    "3          "
     dc.b    "3          "
     dc.b    "4          "
     dc.b    "4          "
     dc.b    "HOW TO PLAY "
     dc.b    "HOW TO PLAY "                     ; Simple setting 2's description
     dc.b    "WITH        "
     dc.b    "WITH        "                     ; Simple setting 2's choices
     dc.b    "WITHOUT    "
     dc.b    "WITHOUT    "
</pre>
</pre>
Line 93: Line 110:
[[File:Config_3.png]]
[[File:Config_3.png]]


[[Category:CPUs]]
[[Category:Base system]]

Latest revision as of 07:27, 18 January 2021

File:Softdips.png
A Soft DIPs setup screen.

Software DIPs are a list of a maximum of 14 game-specific settings. They can be modified from the MVS System ROM menu, or with system ROM hacks for other systems.

The settings names and their possible values are stored in the game's 68k program header in a specific format, read by the system ROM to form a menu.

On the MVS, the settings are saved for each game in the backup RAM.

The settings are copied from backup RAM to user RAM to BIOS_GAME_DIP ($10FD84) just before the game is started up. If no settings are found, they're initialized to the default values.

(Does the system ROM check values pulled from the backup RAM against the bounds given by the game ? Can a corrupt backup RAM save make games crash with out of bounds settings ?)

Config data description

Most of the following information by ElBarto:

0x00 16 bytes Game name, no termination char required.
0x10 6 bytes Special settings list, 4 entries. See description below.
0x16 10 bytes Simple settings list, up to 10 entries. See description below.
0x20 x*12 bytes String table. Strings are 12 bytes long and padded with 0x20 (space). Max number ?

Special settings list

The special settings list holds 4 entries: the first 2 are for time settings, and the last 2 are for count settings.

A time setting occupies one word, which defines the default value:

  • The upper byte is the minutes (up to 29 ?, in BCD).
  • The lower byte is the seconds (in BCD).

An unused time setting must be set to 0xFFFF.

A count setting occupies one byte, which defines the default value. It can go from 0 to 100 (not in BCD), with 0 displayed as "WITHOUT" and 100 as "INFINITE". In some versions of the system ROM, "times" is displayed after the value ?

An unused count setting must be set to 0xFF.

All special settings use a single string from the strings table, for the setting's name.

Simple settings list

Each options occupies one byte.

The upper 4 bits define the default value (starts from 0) and the lower 4 bits the number of choices.

A few games have a simple setting entry with a number of choices set to zero, just to show a "▼NEXT PAGE" string on the bottom of the MVS menu.

Examples

    dc.b    "TEST ROM        "                 ; Game name
    dc.w    $FFFF                              ; Special settings list (none used)
    dc.w    $FFFF
    dc.b    $FF,$FF
    dc.b    $24                                ; Simple setting 1: 4 choices, default is #2
    dc.b    $02                                ; Simple setting 2: 2 choices, default is #0
    dc.b    $00,$00,$00,$00,$00,$00,$00,$00
    ; String table:
    dc.b    "LIVES       "                     ; Simple setting 1's description
    dc.b    "1           "                     ; Simple setting 1's choices
    dc.b    "2           "
    dc.b    "3           "
    dc.b    "4           "
    dc.b    "HOW TO PLAY "                     ; Simple setting 2's description
    dc.b    "WITH        "                     ; Simple setting 2's choices
    dc.b    "WITHOUT     "
File:Config 1.png File:Config 2.png
    dc.b    "TEST ROM        "                 ; Game name
    dc.w    $4220                              ; Special setting 1: 42 minutes 20 seconds
    dc.w    $2042                              ; Special setting 2: 20 minutes 42 seconds
    dc.b    $42                                ; Special setting 3: 66
    dc.b    $64                                ; Special setting 4: 100 ("INFINITE")
    dc.b    $24                                ; Simple setting 1: 4 choices, default is #2
    dc.b    $02                                ; Simple setting 2: 2 choices, default is #0
    dc.b    $00,$00,$00,$00,$00,$00,$00,$00
    dc.b    "TIMER 1     "                     ; Special setting 1's description
    dc.b    "TIMER 2     "                     ; Special setting 2's description
    dc.b    "COUNTER     "                     ; Special setting 3's description
    dc.b    "COUNTER SPE "                     ; Special setting 4's description
    dc.b    "LIVES       "                     ; Simple setting 1's description
    dc.b    "1           "                     ; Simple setting 1's choices
    dc.b    "2           "
    dc.b    "3           "
    dc.b    "4           "
    dc.b    "HOW TO PLAY "                     ; Simple setting 2's description
    dc.b    "WITH        "                     ; Simple setting 2's choices
    dc.b    "WITHOUT     "

File:Config 3.png