Game
Galaga
Namco's 1981 arcade fixed shooter, read through Glenn Neidermeier's commented source.
On this page
The atlas reads Galaga through Glenn Neidermeier’s commented Z80 source, which reassembles the program ROMs of MAME’s galaga set, Namco rev. B1. Labels and comments cited here are his.
Galaga awards fighters at two operator-set scores and, with most settings, at every interval after1. Every fourth stage is a challenging stage2.
Mechanics
| Mechanic | Kind | How |
|---|---|---|
| Extra life | Repeating | fighters at two DIP-set scores, then at every multiple of the second, such as 20,000, 70,000, and every 70,000 |
| Bonus stage | Scheduled | every fourth stage is a challenging stage |
Every claim about this game, by concept (2)
References
- ^ abGalaga awards extra fighters at a first and a second score set by DIP switches, and with some settings again at every interval after the second, the interval being the second score: one setting gives 20,000, 70,000, and every 70,000 points. The three switches index one of two 8-entry tables, picked by bit 2 of the starting-fighter setting. In the first, five settings repeat, two award only the first two scores, and one awards none; in the second, every first score is 30,000, three settings repeat, four award at most the first two, and one awards none. The source reassembles MAME's
galagaset, Namco rev. B.Codeneiderm/arcaderevisedHow we know
1995; Bonus Ships Awarded (DSWB) ⋮ 1997; 0x20 20-60-60 ON ON OFF 1 1998; 0x10 20-70-70 ON OFF ON 2 ⋮ 2002; 0x18 20-60 OFF OFF ON 6 2003; 0x38 30-80 OFF OFF OFF 7 2004; 0x00 None ON ON ON 0 2005; Bonus config displayed in following format: 2006; 1ST BONUS X0000 PTS 2007; 2ND BONUS XX0000 PTS 2008; AND EVERY XX0000 PTS
galag/galagao_ASxxx/rom0/gg1-4.s lines 1995–2008 at 248be0d · upstream ↗ 2010l_38AB: 2011 ld hl,#_sfr_dsw4 ; bonus levels ⋮ 2023 and #0x07 2024 jp z,l_392D ⋮ 2026 ld c,a 2027 ld a,(b_mchn_cfg_nships) ; Bonus levels depend upon number of fighters starting. 2028 and #0x04 ; note: num_ships = mchn_cfg_nships + 1 2029 add a,a 2030 add a,c ; add dsw value 2031 add a,a ; a:=a*2 ... use as offset into table 2032 ld hl,#str_3AA4 ; bonus config data 2033 rst 0x10 ; HL += A...A==2,C,4,6,E,8,A ⋮
galag/galagao_ASxxx/rom0/gg1-4.s lines 2010–2036 at 248be0d · upstream ↗ 2529str_3AA4: 2530 .db 0xFF,0xFF ;; NO BONUS SHIPS GIVEN WITH THIS SETTING 2531 .db 0x02,0x06 2532 .db 0x02,0x07 2533 .db 0x02,0x08 2534 .db 0x03,0x0A 2535 .db 0x03,0x0C 2536 .db 0x02,0x06 + 0x80 ;; bit-7 means there's no 'and-every' bonus 2537 .db 0x03,0x08 + 0x80 ;; bit-7 means there's no 'and-every' bonus ⋮ 2540str_3AB4: 2541 .db 0xFF,0xFF,0x03,0x0A,0x03,0x0C,0x03,0x0F,0x03,0x8A,0x03,0x8C,0x03,0x8F,0x03,0xFF
galag/galagao_ASxxx/rom0/gg1-4.s lines 2529–2541 at 248be0d · upstream ↗ 265; if bit 7 is set, the third bonus award does not applygalag/galagao_ASxxx/rom0/game_ctrl.s lines 265–267 at 248be0d · upstream ↗ ; looks like a bonus may be awarded. … ; actv_plyr_state[0x1E] += mchn_cfg_bonus[1] … ; sound-fx count/enable registers, bonus ship awarded sound (set non-zero) … ; new spare ship added
galag/galagao_ASxxx/rom0/game_ctrl.s#L1196-L1213 · upstream ↗ The following binary files (Namco rev. B):
README.md#L16 · upstream ↗ Checked against the evidence by its author, an AI model, 2026-10-25.
Checked by a second AI model, 2026-10-21.
Revised after a check by a second AI model, 2026-10-25.
- ^Every fourth stage of Galaga is a challenging stage: at each stage's start
stg_init_splashadds 1 to the stage counter and stores (counter + 1) mod 4, and a 0 there marks a challenge, so the counter values 3, 7, 11, … bring one.Codeneiderm/arcadeHow we know
180;; stg_splash_scrn() ⋮ 183;; Increments stage_ctr (and dedicated challenge stage %4 indicator) ⋮ 191; plyr_state_active.stage_ctr++ 192 ld hl,#ds_plyr_actv +_b_stgctr ; ++ 193 inc (hl) ⋮ 195; plyr_state_active.not_chllng_stg = *HL & 0x03 ... gives 0 for challenge stage 196 ld a,(hl) 197 inc a 198 and #0x03 199 ld (ds_plyr_actv +_b_not_chllg_stg),a ; ==(stg_ctr+1)%4 ...i.e. 0 if challenge stage
galag/galagao_ASxxx/rom0/task_man.s lines 178–202 at 248be0d · upstream ↗ 1443; challenge stage e.g. 3,8,10 etc. 8 unique challenge stages.galag/galagao_ASxxx/rom0/gg1-3.s line 1443 at 248be0d · upstream ↗ Checked against the evidence by its author, an AI model, 2026-10-21.
Checked by a second AI model, 2026-10-21.
Sources
Code
- Neidermeier, Glenn. 2026. “Gyaraga: commented and compilable Galaga source.” Commit 248be0d. neiderm/arcade @ 248be0d · licence, all uses