la serie/

The copy protections

A cartridge writing inside its own space is doing nothing at all: ROM takes no writes, so that instruction looks like dead code. It is not. A pirated cartridge is a copy loaded into RAM, and there the write does land and leaves the game broken somewhere it never returns from.

Whose finding this is

The pattern was identified by Manuel Pazos (@ManuelPazosMSX) in his disassembly of King's Valley (RC-727), where he named the two routines ReadKeys_AC and VRAM_writeAC. What is here is that same pattern, looked for across the 95 cartridges in the series.

28 of the 95 write inside their own space, and all 28 are Konami. The family always repeats the same two, in the same two start-up routines: one puts a pop hl and a ret over a djnz in the presentation chain, the other leaves a zero in the operand of a jp, which in memory turns it into jp 00000h —a dead reset—. That the target is always a djnz or the operand of a jump, and never a gap in the data, is what rules out stray writes.

gamewherewhat it doeswhere it landswhat is there
Contra0x4DDFld (08000h),a0x8000ret — its operand
Contra0x4DE7ld (0a000h),a0xA000ret — its operand
Dunk Shot0x5C63ld (hl),c0x4C52ld hl,0014ah
Dunk Shot0x7E94ld (hl),000h0x6BADjp suelta_sprites — its operand
Dunk Shot0x8B3Fld (hl),000h0x785Bjp suelta_sprites — its operand
Dunk Shot — MSX2 patch0x8B3Fld (hl),000h0x785Bjp suelta_sprites — its operand
Gekitotsu Pennant Race 20x7468ld (08000h),a0x8000call 08178h — its operand
Gekitotsu Pennant Race 20x7495ld (08000h),a0x8000call 08178h — its operand
Gekitotsu Pennant Race 20x7505ld (08000h),a0x8000call 08178h — its operand
Hai no Majutsushi - Mahjong 20x6257ld (08000h),a0x8000ld (hl),000h — its operand
Hai no Majutsushi - Mahjong 20x627Bld (08000h),a0x8000ld (hl),000h — its operand
Hai no Majutsushi - Mahjong 20x62AEld (08000h),a0x8000ld (hl),000h — its operand
Hai no Majutsushi - Mahjong 20x62DAld (08000h),a0x8000ld (hl),000h — its operand
Hai no Majutsushi - Mahjong 20x6307ld (08000h),a0x8000ld (hl),000h — its operand
Hai no Majutsushi - Mahjong 20x632Bld (08000h),a0x8000ld (hl),000h — its operand
Hai no Majutsushi - Mahjong 20x635Eld (08000h),a0x8000ld (hl),000h — its operand
Hai no Majutsushi - Mahjong 20x638Ald (08000h),a0x8000ld (hl),000h — its operand
Hai no Majutsushi - Mahjong 20x63B2ld (08000h),a0x8000ld (hl),000h — its operand
Hai no Majutsushi - Mahjong 20x6055ld (0a000h),a0xA000ret — its operand
Hai no Majutsushi - Mahjong 20x6060ld (0a000h),a0xA000ret — its operand
Hai no Majutsushi - Mahjong 20x627Cld (0a000h),a0xA000ret — its operand
Hai no Majutsushi - Mahjong 20x62ECld (0a000h),a0xA000ret — its operand
Hyper Rally0x79C8ld (06957h),a0x6957ld a,(0e00ah)
Hyper Sports 30x4013ld (0412fh),hl0x412Fdjnz L_413D
Hyper Sports 30x4040ld (0413bh),hl0x413Bjp espera_y_pasa — its operand
King's Valley0x4044ld (hl),a0x40E4djnz tarea_0_dibuja_o_avanza
King's Valley0x409Cld (043c0h),de0x43C0jp nc,cierra_aviso_titulo — its operand
King's Valley II0x6AB6ld (08000h),a0x8000ld ix,0e7c0h — its operand
King's Valley II0x6ADAld (08000h),a0x8000ld ix,0e7c0h — its operand
King's Valley II0x6B0Dld (08000h),a0x8000ld ix,0e7c0h — its operand
King's Valley II0x6B39ld (08000h),a0x8000ld ix,0e7c0h — its operand
King's Valley II0x6B66ld (08000h),a0x8000ld ix,0e7c0h — its operand
King's Valley II0x6B8Ald (08000h),a0x8000ld ix,0e7c0h — its operand
King's Valley II0x6BBDld (08000h),a0x8000ld ix,0e7c0h — its operand
King's Valley II0x6BE5ld (08000h),a0x8000ld ix,0e7c0h — its operand
King's Valley II0x6C0Dld (08000h),a0x8000ld ix,0e7c0h — its operand
King's Valley II0x6C69ld (08000h),a0x8000ld ix,0e7c0h — its operand
King's Valley II0x6C97ld (08000h),a0x8000ld ix,0e7c0h — its operand
King's Valley II0x6CB5ld (08000h),a0x8000jr z,$+26 — its operand
King's Valley II0x6CD9ld (08000h),a0x8000jr z,$+26 — its operand
King's Valley II0x6D0Cld (08000h),a0x8000jr z,$+26 — its operand
King's Valley II0x6D38ld (08000h),a0x8000jr z,$+26 — its operand
King's Valley II0x6D65ld (08000h),a0x8000jr z,$+26 — its operand
King's Valley II0x6D89ld (08000h),a0x8000jr z,$+26 — its operand
King's Valley II0x6DBCld (08000h),a0x8000jr z,$+26 — its operand
King's Valley II0x6DE4ld (08000h),a0x8000jr z,$+26 — its operand
King's Valley II0x6E0Cld (08000h),a0x8000jr z,$+26 — its operand
King's Valley II0x6E68ld (08000h),a0x8000jr z,$+26 — its operand
King's Valley II0x6E96ld (08000h),a0x8000jr z,$+26 — its operand
Knightmare0x4028ld (04112h),hl0x4112djnz L_4120
Knightmare0x4055ld (0411eh),hl0x411Ejp L_4187 — its operand
Konami's Boxing0x470Eld (04f84h),a0x4F84pop af
Konami's Ping Pong0x4013ld (040eeh),a0x40EEdjnz L_40FA
Konami's Ping Pong0x4052ld (040f8h),hl0x40F8jp L_4318 — its operand
Konami's Synthesizer0x56ACld (hl),080h0x8000ret — its operand
Konami's Tennis0x7A31ld (0409ah),a0x409Aret
Konami’s Game Master 20x8E9Eld (08000h),a0x8000ld hl,0f11ah
Konami’s Soccer0x4028ld (0410ah),hl0x410Adjnz escena_presentacion_3
Konami’s Soccer0x4056ld (04116h),hl0x4116jp espera_n_y_avanza_escena — its operand
Metal Gear 2: Solid Snake0x66DFld (08000h),a0x8000ret — its operand
Mopi Ranger0x406Ald (04146h),a0x4146djnz comprueba_el_arranque
Mopi Ranger0x406Fld (04147h),a0x4147djnz comprueba_el_arranque — its operand
Mopi Ranger0x40A5ld (044dfh),de0x44DFjp L_45FF — its operand
Nemesis 20x40ADld (05000h),a0x5000ret — its operand
Nemesis 3 - The Eve of Destruction0x6CD0ld (08000h),a0x8000ret nz — its operand
Nemesis 3 - The Eve of Destruction0x6CF2ld (08000h),a0x8000ret nz — its operand
Nemesis 3 - The Eve of Destruction0x6D0Fld (08000h),a0x8000ret nz — its operand
Nemesis 3 - The Eve of Destruction0x6D2Fld (08000h),a0x8000ret nz — its operand
Parodius0x55B9ld (08000h),a0x8000jr nz,$+9 — its operand
Parodius0x55CBld (08000h),a0x8000jr nz,$+9 — its operand
Parodius0x55E5ld (08000h),a0x8000jr nz,$+9 — its operand
Parodius0x55F6ld (08000h),a0x8000jr nz,$+9 — its operand
Pippols0x4033ld (040c5h),hl0x40C5jp SIGUIENTE_ESTADO — its operand
Q*bert0x4080ld (06000h),a0x6000ret — its operand
Q*bert0x4084ld (08000h),a0x8000ld hl,00000h — its operand
Rastan Saga0x6193ld (077f8h),a0x77F8call dano — its operand
Rastan Saga0x61CBld (077f8h),a0x77F8call dano — its operand
Rastan Saga0x6200ld (077f8h),a0x77F8call dano — its operand
The Goonies0x4022ld (0411ch),hl0x411Cdjnz presentacion_anima
The Goonies0x4050ld (04129h),hl0x4129jp L_41C8 — its operand
The Pro Yakyuu Gekitotsu Pennant Race0x722Dld (08000h),a0x8000ret — its operand
The Pro Yakyuu Gekitotsu Pennant Race0x725Ald (08000h),a0x8000ret — its operand
The Pro Yakyuu Gekitotsu Pennant Race0x72B0ld (08000h),a0x8000ret — its operand
Twin Bee0x4028ld (04195h),hl0x4195djnz L_41A3
Twin Bee0x4055ld (041a1h),hl0x41A1jp empieza_la_escena_siguiente — its operand
Yie Ar Kung-Fu II0x4028ld (0410dh),hl0x410Ddjnz L_411B
Yie Ar Kung-Fu II0x4056ld (04119h),hl0x4119jp L_41FB — its operand

The ones aimed at the BIOS ROM

Page 0 of an MSX is ROM too, so a write there does not land either. But going to the BIOS does not make a write a protection: 5 turn up, and each is either explained or marked as unexplained.

gamewherewhat it doeswhere it landswhat is there
Antarctic Adventure0x4055ldir0x0000BIOS ROM
Dunk Shot0x6F43ld (hl),c0x0022BIOS ROM
Dunk Shot — MSX2 patch0x6F43ld (hl),c0x0022BIOS ROM
Exciting Baseball0xBB8Fld (00012h),a0x0012BIOS ROM
Ganbare Goemon! Karakuri Dōchū0xAAFEld (00075h),a0x0075BIOS ROM

Antarctic Adventure. It is the start-up guard: it copies jp 0000h over the BIOS entry point. A fourth build of the game proves it is a protection: identical save for two bytes, exactly the ones that send that same copy to DESPACHA, inside the cartridge itself.

Dunk Shot. Unexplained.

Dunk Shot — MSX2 patch. Unexplained.

Exciting Baseball. Unexplained.

Ganbare Goemon! Karakuri Dōchū. Unexplained.

The ones checked that carry none

Of Konami's, 34 cartridges write neither to their own space nor to the BIOS: Athletic Land, Cabbage Patch Kids, Circus Charlie, Comic Bakery, F-1 Spirit — The Way to Formula 1, Frogger, Hinotori, Hyper Olympic 1, Hyper Olympic 2, Hyper Sports 1, Hyper Sports 2, King Kong 2: Yomigaeru Densetsu, Konami's Baseball, Konami's Golf, Konami’s Billiards, Konami’s Game Master, Konami’s Mahjong Dojo, Magical Tree, Metal Gear, Monkey Academy, Nemesis / Gradius, Penguin Adventure, Quarth, Road Fighter, Salamander - Operation X, Shalom: Knightmare III, Sky Jaguar, Space Manbow, Super Cobra, The Maze of Galious, The Treasure of Usas, Time Pilot, Vampire Killer, Yie Ar Kung-Fu.

And none of the 34 cartridges that are not Konami's carries any of this (3D Golf Simulation, Bomber Man, Hole in One, Dunk Shot, Hole in One Professional, Casio World Open, Sparkie, Juno First, Crazy Train, Pitfall!, Rastan Saga, Ski Command, Exciting Baseball, Exciting Jockey, Pachinko U.F.O., Car Fighter, Ice World, Iga Ninpouchou, Exoide-Z, Shindobaddo Nanatsu no Bouken, Eagle Fighter, Exoide-Z Area 5, Iga Ninpouchou Mangetsu-jou no Tatakai, Koneko no Daibouken, Moai no Hihou, The Stone of Wisdom, The Seal of Hades, Youkai Yashiki, Issun-boushi no Donnamondai, Game Land, The Maze of Galious — saves on the Yamanooto, Metal Gear — saves on the Yamanooto, Metal Gear 2: Solid Snake — saves on the Yamanooto, Dunk Shot — MSX2 patch). That is the control: if the sweep swallowed coincidences, they would show up there too.

The two MegaROMs, The Pro Yakyuu Gekitotsu Pennant Race (SCC), Gekitotsu Pennant Race 2 (SCC), Metal Gear 2: Solid Snake (SCC), Space Manbow (SCC), Quarth (SCC), King's Valley II (SCC), Parodius (SCC), Nemesis 3 - The Eve of Destruction (SCC), Hai no Majutsushi - Mahjong 2 (SCC), Contra (SCC), Salamander - Operation X (SCC), Nemesis / Gradius (KONAMI), F-1 Spirit — The Way to Formula 1 (SCC), are checked differently: their listing goes bank by bank, so their own space is the whole window, 0x4000–0xBFFF, minus the registers of their mapper, worked out from their own writes. Everything they write there is a bank switch.

What this does NOT say

What actually happens when a copy runs in RAM is not measured: that would mean loading a copy and playing it, and no binary is distributed here. What is claimed is what the listing says: where the write is, where it points and what instruction sits at the target.

Nor are these all of them: the sweep sees writes to a fixed address, and those going through HL or DE loaded just before. One computing its target on the fly would slip past.