Skip to content

Commit

Permalink
Merge branch 'feature/st_162'
Browse files Browse the repository at this point in the history
Add Stern Star Trek 1.61 LE, 1.62 Pro, and update 1.62 LE.
  • Loading branch information
tomlogic committed Dec 13, 2024
2 parents 14f8a0c + 4a9fa92 commit 9bcfb87
Show file tree
Hide file tree
Showing 5 changed files with 531 additions and 21 deletions.
14 changes: 11 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,10 @@ how to interpret them. They're comprised of the following key/value pairs:
decimal digits of a number. The byte sequence `0x12 0x34` would translate
to the decimal value `1234`. When converting BCD values, treat the
nibbles 0xA to 0xF as 0 numerically, or a space for display purposes.
- `"ch"`: A sequence of 7-bit ASCII characters. If the JSON file has a
`_char_map` key, use bytes from the NV file as indexes into that string
instead of interpreting them as 7-bit ASCII.
- `"ch"`: A sequence of 7-bit ASCII characters that may be shortened by a
null byte (0x00) terminator based on the `"null"` attribute for the entry.
If the JSON file has a `_char_map` key, all bytes (including 0x00) are
indexes into that string.
- `"raw"`: A series of raw bytes, useful for extracting data yet to be
decoded or that requires custom processing.
- `"wpc_rtc"`: A special type for a real-time clock value
Expand All @@ -162,6 +163,12 @@ how to interpret them. They're comprised of the following key/value pairs:
- **offsets**: Alternative to using start/end or start/length when bytes
aren't contiguous. List of offsets to use. Either `start` or `offsets`
are required.
- **null**: Used for `"ch"` encodings to specify null (0x00) byte handling.
For `truncate` and `terminate`, ignore all bytes after the null.
- `"ignore"`: Ignore (skip over) null bytes.
- `"truncate"`: A null can shorten the string, but won't be present for
strings that fill the allotted space.
- `"terminate"`: Null bytes are always present and terminate the string.
- **min** and **max**: Used for adjustments to specify the valid range of
values.
- **default**: Used for adjustments to specify the factory default value.
Expand Down Expand Up @@ -256,3 +263,4 @@ treat a single descriptor as a list of groupings-sized ranges.
- v0.1: Initial Version
- v0.2: Deprecate `packed` attribute in favor of `nibble`.
- v0.3: Deprecate usage of hex strings for `start`, `end` and `offsets`.
Add the `null` attribute for entries with `ch` encoding.
202 changes: 202 additions & 0 deletions st_161h.nv.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,202 @@
{
"_notes": [
"Compiled by Tom Collins, based on st_162h by HorsePin"
],
"_copyright": "Copyright (C)2024 by Tom Collins <[email protected]>",
"_license": "GNU Lesser General Public License v3.0",
"_endian": "little",
"_ramsize": 131118,
"_roms": [
"st_161h"
],
"_fileformat": 0.3,
"_version": 0.1,
"last_game": [
{
"encoding": "int",
"length": 4,
"start": 68108
},
{
"encoding": "int",
"length": 4,
"start": 68112
},
{
"encoding": "int",
"length": 4,
"start": 68116
},
{
"encoding": "int",
"length": 4,
"start": 68120
}
],
"high_scores": [
{
"label": "Grand Champion",
"short_label": "GC",
"initials": {
"encoding": "ch",
"null": "terminate",
"length": 11,
"start": 11904
},
"score": {
"encoding": "int",
"length": 4,
"start": 11928
}
},
{
"label": "High Score #1",
"short_label": "#1",
"initials": {
"encoding": "ch",
"null": "terminate",
"length": 11,
"start": 11936
},
"score": {
"encoding": "int",
"length": 4,
"start": 11960
}
},
{
"label": "High Score #2",
"short_label": "#2",
"initials": {
"encoding": "ch",
"null": "terminate",
"length": 11,
"start": 11968
},
"score": {
"encoding": "int",
"length": 4,
"start": 11992
}
},
{
"label": "High Score #3",
"short_label": "#3",
"initials": {
"encoding": "ch",
"null": "terminate",
"length": 11,
"start": 12000
},
"score": {
"encoding": "int",
"length": 4,
"start": 12024
}
},
{
"label": "High Score #4",
"short_label": "#4",
"initials": {
"encoding": "ch",
"null": "terminate",
"length": 11,
"start": 12032
},
"score": {
"encoding": "int",
"length": 4,
"start": 12056
}
}
],
"mode_champions": [
{
"label": "Combo Champion",
"initials": {
"encoding": "ch",
"null": "terminate",
"length": 11,
"start": 12064
},
"score": {
"encoding": "int",
"length": 4,
"start": 12088,
"suffix": " Combos"
}
},
{
"label": "Warp Champion",
"initials": {
"encoding": "ch",
"null": "terminate",
"length": 11,
"start": 12096
},
"score": {
"encoding": "int",
"length": 4,
"start": 12120,
"suffix": " Warps"
}
},
{
"label": "Medals Champion",
"initials": {
"encoding": "ch",
"null": "terminate",
"length": 11,
"start": 12128
},
"score": {
"encoding": "int",
"length": 4,
"start": 12152,
"suffix": " Medals"
}
}
],
"checksum16": [
{
"start": 11904,
"length": 30,
"label": "Grand Champion"
},
{
"start": 11936,
"length": 30,
"label": "High Score #1"
},
{
"start": 11968,
"length": 30,
"label": "High Score #2"
},
{
"start": 12000,
"length": 30,
"label": "High Score #3"
},
{
"start": 12032,
"length": 30,
"label": "High Score #4"
},
{
"start": 12064,
"length": 30,
"label": "Combo Champion"
},
{
"start": 12096,
"length": 30,
"label": "Warp Champion"
},
{
"start": 12128,
"length": 30,
"label": "Medals Champion"
}
]
}
Loading

0 comments on commit 9bcfb87

Please sign in to comment.