Software DIPs: Difference between revisions

From NeoGeo Development Wiki
Jump to navigation Jump to search
m (BIOS -> system ROM)
m (Wording, precisions)
 
(One intermediate revision by the same user 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 16 game-specific parameters, which are only modifiable from the MVS [[System ROM]] 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]], the settings are saved for each game in the [[backup RAM]] (starting at 0x220) by the system ROM. How is this handled in multislot board ?
On the [[MVS]], the settings are saved for each game in the [[backup RAM]].


The setting values are copied from backup RAM to [[68k user RAM|user RAM]] at '''BIOS_GAME_DIP''' ($10FD84) when USER (0x122) is called.
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.


The AES and CD games have fixed 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'''
| 16 bytes
| 16 bytes
| Game name
| Game name, no termination char required.
|-
|-
| '''0x10'''
| '''0x10'''
| 6 bytes
| 6 bytes
| Special entry list, 4 entries. See description below.
| Special settings list, 4 entries. See description below.
|-
|-
| '''0x16'''
| '''0x16'''
| 10 bytes
| 10 bytes
| Simple options list, up to 10 entries. 1 byte per entry. Padded with 0x00 for unused options.
| Simple settings list, up to 10 entries. See description below.
|-
|-
| '''0x20'''
| '''0x20'''
| x*12 bytes
| x*12 bytes
| Options string table. Strings are 12 bytes long and padded with 0x20 (space). Max number ?
| 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 special settings list holds 4 entries: the first 2 are for time settings, and the last 2 are for count settings.


The first two words can be used to define two timed options. The upper byte defines the minutes and the lower byte the seconds (in BCD), up to 29 minutes and 59 seconds. If not used, specify 0xFFFF.
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 next byte can be used for a selection between 1 and 99. The value written is the default one. (values above 99 will show some garbage data). If not used, specify 0xFF.
An unused time setting must be set to 0xFFFF.


The last byte can be used for the same purpose plus two special values : "WITHOUT" and "INFINITE" (0x00 is without and 0x64 is infinite). The value displayed will go from 00 to 99 with the text "times" after it. If not used, specify 0xFF.
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 these options take one string in the strings table for the description.
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 (starts from 0) and the lower 4 bits the number of choices.
Each options occupies one byte.


==Config examples==
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==


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


<pre>
<pre>
     dc.b    "TEST ROM   "                     ; Game name
     dc.b    "TEST ROM       "                 ; Game name
     dc.b   $42,$20                            ; Special option 1: 42 minutes 20 seconds
     dc.w   $4220                              ; Special setting 1: 42 minutes 20 seconds
     dc.b   $20,$42                            ; Special option 2: 20 minutes 42 seconds
     dc.w   $2042                              ; Special setting 2: 20 minutes 42 seconds
     dc.b    $42                                ; Special option 3: 66
     dc.b    $42                                ; Special setting 3: 66
     dc.b    $64                                ; Special option 4: 100 ("infinite")
     dc.b    $64                                ; Special setting 4: 100 ("INFINITE")
     dc.b    $24                                ; Option 1: 4 choices, default is #2
     dc.b    $24                                ; Simple setting 1: 4 choices, default is #2
     dc.b    $02                                ; Option 2: 2 choices, default is #0
     dc.b    $02                                ; Simple setting 2: 2 choices, default is #0
     dc.b    $00,$00,$00,$00,$00,$00,$00,$00
     dc.b    $00,$00,$00,$00,$00,$00,$00,$00
     dc.b    "TIMER 1    "                    ; Special option 1 description
     dc.b    "TIMER 1    "                    ; Special setting 1's description
     dc.b    "TIMER 2    "                    ; Special option 2 description
     dc.b    "TIMER 2    "                    ; Special setting 2's description
     dc.b    "COUNTER    "                    ; Special option 3 description
     dc.b    "COUNTER    "                    ; Special setting 3's description
     dc.b    "COUNTER SPE "                    ; Special option 4 description
     dc.b    "COUNTER SPE "                    ; Special setting 4's description
     dc.b    "LIVES      "                    ; Option 1 description
     dc.b    "LIVES      "                    ; Simple setting 1's description
     dc.b    "1          "                    ; Option 1 choices
     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 "                    ; Option 2 description
     dc.b    "HOW TO PLAY "                    ; Simple setting 2's description
     dc.b    "WITH        "                    ; Option 2 choices
     dc.b    "WITH        "                    ; Simple setting 2's choices
     dc.b    "WITHOUT    "
     dc.b    "WITHOUT    "
</pre>
</pre>

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