shmupX · packages/shmup-engine/src/psx · reverse-engineering status

Dezaemon PSX Parity Map

What @shmupx/shmup-engine/psx decodes of the two PlayStation Dezaemons, and what stands between it and the parity the Saturn map reports. Two games, one memory-card file each: Dezaemon+ (Athena, 1996, SLPS-00335 — the port of the Super Famicom cart) writes its 120 KB raw, and Dezaemon Kids! (1998, SLPS-01503) packs its two sections with the Saturn sequel's own LZSS. Unlike the SFC side, both discs are here, so this is not a statistical reading: every layout below comes out of KIDS.EXE, its play overlay GAMES.bin and MAIN.EXE, and is then held against 165 community saves. What it is not is a consumer — as of 2026-09-12 the parser is a read-only structural pass: nothing is played, mapped into game.json or written back. Canonical notes: packages/shmup-engine/FORMAT-PSX.md. The series’ Nintendo 64 entry has a map of its own — its format is closed, but unlike this one nothing is built.

.sav / .mcr / .gme / .mcs / .psv → memcard.js MC directory · block chain → save-header.js SC frame · Shift-JIS title · icon → Kids! 11-word directory → 2 × Okumura LZSS + 3 byte sums → graphics (4 CG pages) · data (map · scroll · appear · config · records · sprites) · tail ‖ Dezaemon+ the program's 74-entry table → 20 group checksums · graphics · palettes · 5 × 9 stage pieces · global · sound · scores → parsePsxSav → psx:probe report · png · hex · diff ‖ no game.json · no runtime · no write path
Dezaemon Kids! Confirmed 8 regions · container and directory · the four CG pages and the disc's palette bank · map · scroll · appear with its footprint marks · the config header · sprite tables · high scores — 325,584 bytes of the 327,496 a save decodes to, 99.4%, because the graphics are four fifths of it Likely 2 regions · the enemy and boss records · the ship table — 1,816 bytes, 0.6%: both are sliced at a boundary the code gives and read only as far as their fields are named Open 1 region · the settings bytes, of which seven are named — 28 bytes, with 68 more that nothing initialises or reads
Dezaemon+ Confirmed 10 regions · the SC header · two 4bpp texture pages · 24 palette rows · the stage maps and their tile tables · the enemy definitions · the global item and song tables · the settings · high scores · the twenty group checksums — 82,644 of 122,880 bytes, 67.3% Likely 6 regions · scroll · enemy group · appear · stage config · boss group · sound — 38,636 bytes, 31.4%: the program names each array it scatters them into, and the play code reads most of their shapes Open 1 region · the stage sprite-sheet layout — 1,600 bytes, 1.3%

01What remains

The trace landed in one pass (2026-09-11/12) once both discs were in dev-fixtures/: the containers, both directories, every region boundary, the palette bank, a probe that renders stages as the games draw them, and 32 tests over all 165 saves. What follows is what that pass could not settle. MEANING OPEN means the bytes are located at a stride the code gives but their semantics are untraced; NO TRACE means nothing exists yet. Each item ends with what would close it — and for almost all of them that is the same cheap thing, a controlled delta: change one setting in the editor under an emulator, save, and psx:probe diff the two.

  1. 1

    The Kids! option bytesMEANING OPEN

    The tail's settings are 0x1C bytes at +0xA0 — the factory initialiser stops at +0xBB and no instruction anywhere forms an address past it, so the 0x44 bytes after them are uninitialised RAM the saver copies out with the rest — and seven of them have traced readers: screen width, stereo, preset BGM, SE mute, the BGM file number and volume, and +0xB8 bit 0, which is the backdrop colour because it is index 0 of the map CLUT. The rest have structure and no names, including +0xB8 bit 1, which is set in 96 of the 98 saves and in every disc sample and has no reader anywhere. The 0x70-byte config header beside them is now named almost throughout (section 02); what is left there is the first two bytes of each player-ship record, +0x1A, and bits 5-6 of the per-stage flag byte. Closing either needs the editor's settings screen on screen — its labels are drawn from PELON glyph structures, not stored as Shift-JIS strings, so no amount of static reading will produce a name.

  2. 2

    What a Kids! enemy record doesMEANING OPEN

    The five-byte record is traced as far as what its bits feed — movement pattern and variant, hit points, score class, shot timing, fire interval, shot pattern — but byte 3's top bits and byte 4 have no reading at all, and the boss record's three four-byte sub-records are untouched beyond the size class in byte 0. This is now the one place where the two PlayStation games are far apart: Dezaemon+'s own 8-byte definition came out whole (section 02), because its reader splits every field into a table you can follow, while Kids!'s spawner scatters the same work across the object's update path.

  3. 3

    The Dezaemon+ boss definitionMEANING OPEN

    The 60 ordinary enemy definitions are named field by field, but the 32-byte boss definition at +0x1E0 of the same region is not, and neither is the Kids! boss record's trailer. Both games hand their boss to a separate routine with its own state, which is why neither fell out of the work that named the ordinary records.

  4. 4

    Dezaemon+'s sprite-sheet layoutMEANING OPEN

    The 0x140 piece per stage is the chip layout of the stage's 256×320 sprite sheet, which 0x8001C82C blits to VRAM in four sub-blocks — one a plain 16-wide grid, three with interleaved addressing. The geometry is traced; not one byte's meaning is. (It was first taken for the Super Famicom's ODR by analogy, which it is not.) The settings and global blocks beside it, which were open with it, are now named: seven item slots with their effects, sixteen BGM assignments, a score bonus, a charge time, the stage count, a cursor speed, a font bank, the menu track, a stereo flag and four button bitmasks.

  5. 5

    Which tile buffer a save's graphics areMEANING OPEN

    A Dezaemon+ MAP GROUP word is clamped to 1023 by its reader, so it is a ten-bit tile number over the program's four 256×256 tile buffers, while a save carries 64 KB — two of them. Which two is edition-dependent and unresolved: the community saves name buffers 0 and 1, the Select 100 disc's own sample game names 2 and 3, and both render correctly only when the buffer's low bit picks the half of the save's 512-row bitmap. That rule is what the parser uses and what the renders vindicate, but the reason the two populations differ — two builds loading the graphics to different RAM — is inference, not trace.

  6. 6

    The sound streamsMEANING OPEN

    Dezaemon+'s 0x2E00 is sixteen songs of 0x2E0, and the bit layout is read off the unpacker: 16 bars of a 14-bit header and 32 steps of 11 bits, then a 16-bit tail, 734 bytes of the 736 available. What the fields mean — the bar header's 4/2/4/4 bits, the tail's 3/5/4/4, the note table at 0x8007E4EC — is not read, and nothing is synthesised. Kids! keeps no song data in the save at all: its BGM is a file number into the disc.

  7. 7

    The game.json mappingNO TRACE

    The Saturn side has map-to-game.js, and a Dezaemon 2 save becomes a playable level here. Nothing PSX exists: parsePsxSav() stays behind the ./psx subpath and nothing in the editor or the Phaser runtime reads it. The blocker is item 3 — a map is only worth writing when the records it carries are named — not the geometry, which is done for both games.

  8. 8

    Playing oneNO TRACE

    Here the PSX side starts ahead of the SFC and stops short anyway. The launcher has a PlayStation core — static/emulators.json lists mednafen psx under EmulatorJS at /psx/play.html — so unlike a Super Famicom cart, a Dezaemon disc could boot. What is missing is the wiring: no counterpart to /api/dezaemon-disc to hand the player a bring-your-own disc, and no counterpart to static/saturn-saves.js to write a memory-card image into the core's save file. Until one exists, no claim on this page has ever been checked against a running game.

  9. 9

    The write pathNO TRACE

    No PSX writer, and the two games ask for very different work. Dezaemon+ is nearly free: the layout is a table and plusChecksums() already computes what the last 0x28 bytes must be, so a writer is a scatter and a sum. Kids! needs the LZSS encoder — the Saturn's compress.js emits the same stream, so that part exists — plus the three byte sums and the sector padding, which is stale buffer content in a real save and would be zero in a written one. Neither is built.

  10. 10

    A save written by a real sessionNO TRACE

    Every measurement here is of saves the community made with the retail games, which is a far better corpus than the SFC side's single factory image — but it is still all observation. Nothing has been round-tripped: no save has been loaded into an emulator, edited by one setting, saved back and diffed. That one experiment would close most of items 1, 4 and 5 at once, and it is what psx:probe diff was built for.

02Already decoded

Confirmed The code says it and the data agrees — never that a runtime consumes the result, which nothing yet does. "All 98" and "all 67" mean the whole community collection; the discs' own sample games are counted separately where they matter.

FeatureWhat is decoded, and what pins it
ContainerA PlayStation memory card: 128 KB, 16 blocks of 8 KB, block 0 the directory — MC, then fifteen 128-byte frames of status, size, next-block link and a 20-byte file name, each ending in the XOR of its first 127 bytes. Both games write one 15-block file taking the whole card, BISLPS-00335DEZA or BISLPS-01503DEZAKIDS. locateSaves() also peels a DexDrive .gme, a single-save .mcs, a PS3 .psv and bare blocks.
Save headerThe standard SC title frame and one 16×16 4bpp icon with its own CLUT. Kids! writes the user's game name into the Shift-JIS title between 『 』 and bracketedName() reads it back; Dezaemon+'s title is fixed text assembled from five pieces of a template in the program, so its game name exists only as a logo drawn in the graphics.
Kids! directory and checksumsEleven u32 at 0x100: two compressed sizes, three offsets, three byte sums and two sector-padded lengths. Every arithmetic relation and all three checksums hold on all 98 saves. The sums run over the padded span, which matters: the padding is stale staging-buffer content and is non-zero in 96 of them.
Kids! compressionThe Saturn Dezaemon 2's Okumura LZSS, unchanged — src/decompress.js opens every section of every save, and KIDS.EXE carries both halves of the codec (encoder 0x8006C904, decoder 0x8006CD10). The two sections decompress to exactly 262,144 and 64,712 bytes, always, and land in RAM back to back, which is why the disc's thirteen SGM_* sample games are literally those two blocks concatenated.
Kids! graphics and the paletteFour 64 KB Dezaemon 2 CG pages, 256 cells of 16×16 at 8bpp. The colours are not in the save: the bank is G256PAL.CLT in the disc's KIDS_DAT.BIN, 256 RGB555 words that KIDS.EXE uploads as one 256×1 VRAM row, so a pixel byte is the index — no (row<<4)|colour indirection as on the Saturn. Embedded in kids-palette.js; the twin G256PAL2 differs in one word, index 0, which is the backdrop for the map and transparent for sprites.
Kids! stage maps6 × 0x1500: 384 rows of 7 chips, one u16 each. A chip is 32×32 px drawn from the CG cells n, n+1, n+8, n+9 with h- and v-flip bits and a blank bit. Pinned by 530,520 non-blank chips across all 98 saves in which bits 0 and 3 of the cell number are never set — the 2×2 alignment that reading requires and that a flat 16×16 reading would not produce — and by the renders, which come out as real scenery where the flat reading doubles every feature side by side.
Kids! scroll and placementSCROLL is one nibble per 64 px, 192 per stage, indexing 0, 0.25, 1 and 4 px per frame for a vertical game; APPEAR is 6 × 0xD80, 384 rows of 9 slot bytes of present | class | id. Three independent agreements: 384 map rows × 32 px, 192 scroll units × 64 px and 384 appear rows × 32 px are all 12,288 px, the wrap the renderer uses. No nibble above 3 and never two bosses in a stage, over all 588 stage blocks.
Dezaemon+ region tableThe 74-entry scatter/gather table at MAIN.EXE 0x8005A380, reproduced in plus.js; its lengths sum to exactly 0x1E000 and every region is named by the RAM array it loads into. A stage block is 0x223C, not the 0x2240 a byte-stride guess gives.
Dezaemon+ checksumsTwenty u16, one per flag group, accumulated while the file is gathered: cs[flag] += byte × (offset & 0x1F) + entryIndex, plus the entry index again at every 128-byte frame. plusChecksums() reproduces the stored 0x28 bytes of all 67 saves and of none under a 0x2240 stride — which is what makes the table self-proving rather than merely plausible, since the sum depends on each byte's offset inside its own entry. It is also the parser's integrity check: a corrupt save names the group, and the probe names the regions that group covers. One quirk: a byte at an offset that is a multiple of 32 is multiplied by zero, so one byte in 32 is invisible to it.
Dezaemon+ maps and graphics64 KB of 4bpp at a 128-byte pitch — 256 px wide, 512 rows, two texture pages — and 24 palette rows of RGB555, which the draw code picks by what it is drawing (the map takes the stage's own row, enemies 6+stage, the boss 12+stage). A map row is eight chip bytes, a byte of v-flip bits for them, then the same again: 16 chips of 16×16 px. Bit 7 of the flip byte is the leftmost chip — over 43,520 rows the bits belonging to the two columns that never carry a chip are the two that are never set, and the opposite order would put a fifth of the flips on empty chips instead of 4.7%.
Dezaemon+ stage piecesThe nine pieces of a stage block, in file order, each named by its RAM array: MAP, SCROLL, MAP GROUP, ENEMY GROUP, ENEMY DATA, SPRITE LAYOUT, APPEAR, stage config, BOSS GROUP. APPEAR is 256 records of 14 bytes and a 1,024-entry row table; its 0xFF end mark sits in record 1 of all 335 stage blocks, and of 113,756 spawn bytes not one carries a class nibble outside 8-C or D, nor an index past the 60 definitions.
Kids! config and footprintsThe 0x70 header is named almost throughout: scroll direction, font, sound bank, the last-stage and chained-stage flags, point-item values, two ship and two shot records, sixteen four-byte sound entries, and per stage a scroll speed, a background speed and a background set. Every one of the 1,422 BGM files and 520 background files those fields name across the 98 saves exists in the disc's archive — which is what confirms the bank arithmetic and the SIDE/LENGTH rule. And the APPEAR bytes with the present bit clear turn out to be occupancy marks, 0x50 | (dx<<2) | dy: the cell's own offset inside its owner's rectangle. Which way that offset runs depends on the scroll direction, which is why forcing one rule fits 60% and honouring the flag resolves 99.87% of all 105,489 marks.
Dezaemon+ enemy definitionsAll eight bytes of a definition, each field fixed by the table its reader indexes: movement script (0..159), shot pattern (0..19) and fire rate, shot mode, drops-an-item, scale rate and which axes animate, hit points, what happens at the scale limit, hit flags, score, what happens at the end of a turn, animation interval, a depth gate, rotation mode, start and end scale, start trigger, start heading and turn rate. The per-definition config byte lives in the stage's own 0x3C piece at stage*60 + index, not beside the record.
Dezaemon+ global tablesTwo of the eight global pieces were the Super Famicom's names by analogy and are not: the 16 bytes at 0x1B06D are the item table — seven slots of an effect id (set weapon 0-5, bomb, score, power up, speed up, option) and an enable flag, with slot 0 also seeding the starting weapon — and the 16 at 0x1B080 are the BGM assignment, sixteen song numbers for the stages, their bosses, the title, game over, the ending and one preloaded. The three bytes between them are unrelated to each other: a score bonus, a charge time, and the stage count minus one. The eight settings bytes are a cursor speed, a font bank, the menu track, a stereo flag and four button bitmasks — not indices.
Probe tooldeno task psx:probe: report (regions with a confidence, per-stage contents, checksums, high scores with the stage each run reached), png (icon, the graphics bank, the palette bank, and stage maps drawn the way each game draws them — Kids! as 32×32 chips through the disc palette, Dezaemon+ through the stage's tile table), hex (region-aware, and --section reaches inside Kids!'s decompressed sections), diff (which compares those sections, not the compressed bytes), all.
TestsFour files, 32 tests. The synthetic ones always run — a card, a Kids! block packed with the engine's own LZSS encoder, a Dezaemon+ block whose checksums are written the way the game writes them. The fixture-gated ones run the whole collection when it is present: every directory, every checksum, the chip alignment, the scroll range, one boss per stage, and every Dezaemon+ map row's empty first and last column.

03Located but not yet understood

Likely Eleven regions across the two games whose boundaries the program gives and whose contents are read only as far as a field has a name. Every one is sliced at the right offset; none is guessed at from byte statistics.

04No trace at all

Absent What the Saturn pipeline has that the PSX side has no code for, and the two regions nothing has read.