The routines they share
What they share looks for identical runs of
bytes, so a shared routine only shows up there if it was also assembled at the
same address. Here the listings are compared instruction by instruction: a
block is the instructions from a label to its ret or its
unconditional jump, at least six of them and three that are not
call, jp or ret, with the 16-bit operands
and the names covered, because they change from one cartridge to the next. Two
cartridges share a block if it is in both listings. The labels inside a shared
block give tails that match as well: of those ending at the same instruction only
the longest counts.
These are the 65 Konami disassemblies in the series, measured on 25 October
2026 (Space Manbow, on the 29th) with tools/codigo_comun.py. Of the 2,080
possible pairs, 1,398 share at least one block and
464 share ten or more. A lone six-instruction block can come out the same
without being copied: what says two cartridges carry the same code is sharing a
lot of them.
Like the joystick read in What they share, each repository gave them its own name.
| Instructions | Cartridges | Names | Starts | What they call it |
|---|---|---|---|---|
| 6 | 37 | 12 | ld (NN),a / ld hl,NN / inc (hl) / xor a … | ESPERA_A_Y_ESTADO, ESPERA_Y_SUBE_ESTADO, FIJA_ESPERA_Y_AVANZA, SIGUIENTE_ESTADO, empieza_la_escena_siguiente, escena_siguiente_con_espera_a … and 23 unnamed |
| 7 | 34 | 6 | ld b,(hl) / call NN / inc hl / inc c … | CARGA_REGISTROS_VDP_4647, CARGA_UN_REGISTRO, MANDA_REGISTRO, PREPARA_TITULO_4463, escribe_un_registro_del_vdp, un_registro_del_vdp and 28 unnamed |
| 7 | 31 | 21 | ld c,(hl) / ld (hl),a / xor c / and (hl) … | FLANCO, FLANCOS, MANDOS_FLANCOS, apretado_y_nuevo, guarda_el_mando, guarda_entrada_y_flanco … and 8 unnamed |
| 10 | 30 | 17 | ld hl,NN / ld d,008h / ld c,000h / ld b,(hl) … | CARGA_REGISTROS, CARGA_REGISTROS_VDP, MANDA_LOS_REGISTROS_DEL_VDP, PREPARA_TITULO, VDP_REGISTROS, carga_los_registros … and 4 unnamed |
| 7 | 30 | 10 | ld a,020h / ld (NN),a / ld hl,NN / inc (hl) … | PON_ESPERA_20B, al_estado_siguiente, escena_siguiente, espera_32_y_pasa, espera_treinta_y_dos, espera_treinta_y_dos_y_estado … and 14 unnamed |
| 11 | 27 | 14 | ld d,003h / push bc / push de / call NN … | LLENA_VRAM_3_TERCIOS, RELLENA_3_TERCIOS, RELLENA_TRES, RELLENA_TRES_TERCIOS, filvrm_en_los_tres_tercios, filvrm_tres_tercios … and 2 unnamed |
| 8 | 27 | 19 | ex af,af' / call NN / exx / ld a,(NN) … | FIJA_ESCRITURA, PREPARA_ESCRITURA, PREPARA_ESCRITURA_VRAM, abre_la_vram, abre_para_escribir, arma_la_escritura … and 1 unnamed |
| 9 | 25 | 6 | push bc / push de / call NN / ld de,NN … | BUCLE_RLE_TERCIO, DESC_3_TERCIOS_461E, DESC_TERCIO, RLE_UN_TERCIO, tercio_siguiente, un_tercio_dibujado and 19 unnamed |
| 8 | 25 | 11 | push bc / ld c,a / ld b,008h / rr c … | BITS_AL_REVES, INVIERTE_BITS, bits_al_reves, bits_del_reves, da_la_vuelta_a_los_bits, da_la_vuelta_al_byte … and 5 unnamed |
| 11 | 24 | 7 | ld a,(de) / inc de / ld b,a / inc b … | ROTULO_CARACTER, byte_del_guion, escribe_desde_hl, escribe_letras, lee_un_tile_de_la_lista, lista_a_vram_aqui … and 12 unnamed |
| 11 | 23 | 11 | dec (ix+008h) / ld a,(ix+007h) / dec a / ret m … | ACTUALIZA_CANAL_7D56, ADELANTA_LA_CAIDA, CANAL_ESPECIAL_6129, ENVOLVENTE_ARRANQUE, PASO_APAGA_DOBLE, acelera_la_caida … and 11 unnamed |
| 10 | 23 | 19 | ld b,003h / push bc / push de / call NN … | DESC_3_TERCIOS, DESC_TRES, RLE_TRES_TERCIOS, RLE_VRAM_3_TERCIOS, descomprime_en_los_tres_bancos, descomprime_en_los_tres_tercios … and 1 unnamed |
| 18 | 22 | 15 | ld c,0ffh / ex de,hl / ld e,(hl) / inc hl … | ESCRIBE_ROTULO, bytes_a_vram, dibuja_la_lista, escribe_caracteres, escribe_lista, escribe_rotulo … and 1 unnamed |
| 8 | 22 | 7 | rlca / rlca / rlca / dec d … | COLOCA_EL_BIT_DEL_CANAL, MEZCLA_BITS, PSG_TONO_5F9B, SUMA_BONUS_7C21, canal_desplaza, enciende_o_apaga_el_tono_si_no … and 13 unnamed |
| 8 | 20 | 9 | pop hl / add a,a / call NN / ld e,(hl) … | DESPACHA, SALTA_POR_TABLA, despacha, despacha_por_indice, despacha_por_la_tabla_de_al_lado, despacha_por_tabla … |