Galaga (NES) - RAM

From ROM Detectives Wiki
Revision as of 17:12, 15 December 2022 by TheAlmightyGuru (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Label-Main.svgLabel-RAM.svgLabel-ROM.svgLabel-Text.svgLabel-Lua.svg


USA

USA

Galaga - NES - USA.png

Memory Addresses

0048 - Program Counter x1
0049 - Program Counter x256

00B0 - Bullet Flag
00E0 - P1 Score: 9xxxxxx - Functions differently
00E1 - P1 Score: x9xxxxx
00E2 - P1 Score: xx9xxxx
00E3 - P1 Score: xxx9xxx
00E4 - P1 Score: xxxx9xx
00E5 - P1 Score: xxxxx9x
00E6 - P1 Score: xxxxxx9

00E8 - P2 Score: 9xxxxxx - Functions differently
00E9 - P2 Score: x9xxxxx
00EA - P2 Score: xx9xxxx
00EB - P2 Score: xxx9xxx
00EC - P2 Score: xxxx9xx
00ED - P2 Score: xxxxx9x
00EE - P2 Score: xxxxxx9

00F8 - High Score: 9xxxxxx - Functions differently
00F9 - High Score: x9xxxxx
00FA - High Score: xx9xxxx
00FB - High Score: xxx9xxx
00FC - High Score: xxxx9xx
00FD - High Score: xxxxx9x
00FE - High Score: xxxxxx9

0203 - Player X Position

02E0 - Bullet 1 Flag
02E1 - Bullet 1 Y Pos
02E2 - Bullet 1 X Pos

02E8 - Bullet 2 Flag
02E9 - Bullet 2 Y Pos
02EA - Bullet 2 X Pos

Ships For Waiting Player
0300-0309 - Enemies In Place Flag - Row 1
030F - Offset Row 1
0310-0319 - Enemies In Place Flag - Row 2
031F - Offset Row 2
0320-0329 - Enemies In Place Flag - Row 3
032F - Offset Row 3
0330-0339 - Enemies In Place Flag - Row 4
033F - Offset Row 4
0340-0349 - Enemies In Place Flag - Row 5
034F - Offset Row 5

Ships For Current Player
0400-0409 - Enemies In Place Flag - Row 1
040F - Offset Row 1
0410-0419 - Enemies In Place Flag - Row 2
041F - Offset Row 2
0420-0429 - Enemies In Place Flag - Row 3
042F - Offset Row 3
0430-0439 - Enemies In Place Flag - Row 4
043F - Offset Row 4
0440-0449 - Enemies In Place Flag - Row 5
044F - Offset Row 5

0380 - Waiting Player Display Stage 9xx
0381 - Waiting Player Display Stage x9x
0382 - Waiting Player Display Stage xx9
0383 - Waiting Player Stage (00-FF)
0384 - Waiting Player Display Lives 9x
0385 - Waiting Player Display Lives x9
0387 - Waiting Player Lives

0480 - Current Player Display Stage 9xx
0481 - Current Player Display Stage x9x
0482 - Current Player Display Stage xx9
0483 - Current Player Stage (00-FF)
0484 - Current Player Display Lives 9x
0485 - Current Player Display Lives x9
0487 - Current Player Lives

Code

Next Stage

ROM Address: 4DBB
CDAB:AE 83 04  LDX $0483	; Load [Current Stage]
CDAE:E8        INX		; Increment the stage
CDAF:D0 02     BNE $CDB3	; If we've made it to stage 256
CDB1:A2 FC     LDX #$FC	; Go to stage 252. The game loops these stages on repeat until the player dies.
CDB3:8E 83 04  STX $0483	; Store the new (Current Stage)
CDB6:60        RTS		;	

Decrease Lives

CB99:AE 87 04  LDX $0487       ; Load Lives into X
CB9C:86 06     STX $0006       ; Store X into $0006
CB9E:CA        DEX             ; Decrement X
CB9F:8E 87 04  STX $0487       ; Store X into Lives.

Starting Lives

CD4B:A9 03     LDA #$03        ; Load A with $03
CD4D:8D 88 04  STA $0488       ; 
CD50:8D 87 04  STA $0487       ; Store A into Current Player's Lives
CD53:8D 85 04  STA $0485       ; 


Japan

Japan

Galaga - NES - Japan.png


Europe

Europe

Galaga - NES - Europe.png


Famicom Disk System

Famicom Disk System

Galaga - FDS - Japan.png


Namcot Collection

Namcot Collection

256x256px