Ninja Gaiden

From NES Hacker Wiki
Jump to: navigation, search

Ninja Gaiden is a very popular platform beat-em-up where you play the ninja Ryu. The story unfolds as the game progresses. You are in search of a mystic idol that can summon a demonic force. An evil villain has taken the idol in an attempt to summon the demon, and killed your father in the process. You must fight through several levels with your special ninja powers to stop him.

Easy Cheats

Icon Addr Val Cmp Description
Icon-Lives.png E53B 08 02 Start With 9 Lives
Icon-Lives.png E53B 62 02 Start With 99 Lives
Icon-Lives-Infinite.png 0076 09 - Infinite Lives
Icon-HitPoints.png E53F
E3F5
1A
1A
10
10
Start With More Hit Points (1/2)
Start With More Hit Points (2/2)
Icon-HitPoints-Infinite.png 0065 10 - Infinite Hit Points
Icon-Invincible.png 0095 30 - Invulnerable (After hit)
Icon-Weapon.png 00C9 81 - Have Throwing Star
Icon-Weapon.png 00C9 82 - Have Windmill Star
Icon-Weapon.png 00C9 85 - Have Jump-N-Slash
Icon-Weapon.png 00C9 80 - Have Fire Wheel
Icon-Weapon.png 00C9 84 - Have Fire Ring (Glitched in some areas)
Icon-Ammo.png DBE2 0A 05 Blue Boxes Give Double Ninja Points
Icon-Ammo.png DBE6 14 0A Red Boxes Give Double Ninja Points
Icon-Ammo.png DBE2 63 05 Blue Boxes Give 99 Ninja Points
Icon-Ammo.png DBE6 63 0A Red Boxes Give 99 Ninja Points
Icon-Ammo-Infinite.png 0064 63 - Infinite Ninja Points (Turn off at end of act))
Icon-Ammo.png EF67 01 03 Throwing Star Costs 1
Icon-Ammo.png EFAE 01 05 Windmill Star Costs 1
Icon-Ammo.png ED69
ED0D
01
01
05
05
Jump-N-Slash Costs 1 (1/2)
Jump-N-Slash Costs 1 (2/2)
Icon-Ammo-Infinite.png EF67 00 03 Throwing Star Is Free
Icon-Ammo-Infinite.png EFAE 00 05 Windmill Star Is Free
Icon-Ammo-Infinite.png ED69
ED0D
00
01
05
05
Jump-N-Slash Is Free (1/2)
Jump-N-Slash Is Free (2/2)
Icon-Ammo-Infinite.png EF03 00 05 Fire Wheel Lasts Forever
Icon-Jump.png ED04
EDA8
FB
FB
FC
FC
High Jump (1/2)
High Jump (2/2)
Icon-Time.png F7F0 00 - Infinite Time
Icon-Challenge.png E53B 00 02 Start With 1 Life
Icon-Challenge.png E53F
E3F5
0A
0A
10
10
Start With Fewer Hit Points (1/2)
Start With Fewer Hit Points (2/2)
Icon-Challenge.png E53F
E3F5
01
01
10
10
Start With 1 Hit Point (1/2)
Start With 1 Hit Point (2/2)
How do I use these?

North America

Ninja Gaiden.png

Memory Addresses

0060 - Score x1
0061 - Score x256
0063 - Time
0064 - Ninja Points (00-63)
0065 - Hit Points (00-10)
0066 - Boss Hit Points (00-10)
006D - Level (00-15)
0076 - Lives (00-63)
0089 - Player Y Delta
008A - Player Y Position
0095 - Invincibility Timeout
00C9 - Weapon
	00 - None
	80 - Fire Wheel
	81 - Throwing Star
	82 - Windmill Star
	83 - Hourglass (Unusable)
	84 - Fire Ring
	85 - Jump-N-Slash
04C7 - Seconds Timeout x256
04C8 - Seconds Timeout x1 (Fire Ring / Hourglass)

Code

Increase Ninja Points

This subroutine increases Ninja Points after you get a box.

DBE1:A9 05     LDA #$05         ; Load 5 into A for blue boxes
DBE3:D0 02     BNE $DBE7        
DBE5:A9 0A     LDA #$0A         ; Load 10 into A for red boxes
DBE7:18        CLC
DBE8:65 64     ADC $0064        ; Add A to current Ninja Points.
DBEA:C9 64     CMP #$64         ; Compare A with 100
DBEC:90 02     BCC $DBF0        ; If A > 99
DBEE:A9 63     LDA #$63         ; Set A = 99
DBF0:85 64     STA $0064        ; Store A into Ninja Points
DBF2:A9 13     LDA #$13         ; Load A with #$13.
DBF4:8D 00 06  STA $0600        ; Store A into $0600
DBF7:60        RTS

Reset Hit Points After Dying

E3F4:A9 10     LDA #$10         ;
E3F6:85 65     STA $0065        ; Set Hit Points back to $10

Game Start Code

E53A:A9 02     LDA #$02
E53C:85 76     STA $0076        ; Set Lives to 2
E53E:A9 10     LDA #$10
E540:85 65     STA $0065        ; Set Hit Points to $10
E542:A9 00     LDA #$00

Decrease Time

F7ED:A5 63     LDA $0063        ; Load Time
F7EF:E9 01     SBC #$01         ; Decrease Time by 1
F7F1:85 63     STA $0063        ; Store Time

Load Time

EAC6:A6 6D     LDX $006D        ; Load X with Level.
EAC8:BD B0 AF  LDA $AFB0,X      ; Load A with Time Table, offset by Level.
EACB:85 63     STA $0063        ; Store A into Time.

Standing Jump Code

ECE9:A5 84     LDA $0084        ;
ECEB:29 04     AND #$04
ECED:D0 1D     BNE $ED0C
ECEF:2C B8 04  BIT $04B8        ;
ECF2:30 05     BMI $ECF9
ECF4:A9 0F     LDA #$0F
ECF6:8D 00 06  STA $0600        ;
ECF9:A5 84     LDA $0084        ;
ECFB:09 04     ORA #$04
ECFD:85 84     STA $0084        ;
ECFF:A9 00     LDA #$00
ED01:85 87     STA $0087        ;
ED03:A9 FC     LDA #$FC         ; Load (#FC, -4) into A
ED05:85 89     STA $0089        ; Store A into Player Y Delta
ED07:A9 05     LDA #$05
ED09:4C 2D F6  JMP $F62D
ED0C:60        RTS

Walking Jump Code

ED8D:A5 84     LDA $0084        ; 
ED8F:29 04     AND #$04
ED91:D0 1D     BNE $EDB0        ; 
ED93:2C B8 04  BIT $04B8        ; 
ED96:30 05     BMI $ED9D
ED98:A9 0F     LDA #$0F
ED9A:8D 00 06  STA $0600        ; 
ED9D:A5 84     LDA $0084        ; 
ED9F:09 04     ORA #$04
EDA1:85 84     STA $0084        ; 
EDA3:A9 00     LDA #$00
EDA5:85 87     STA $0087        ; 
EDA7:A9 FC     LDA #$FC         ; Load #FC, -4 into A
EDA9:85 89     STA $0089        ; Store A into Player Y Delta
EDAB:A9 05     LDA #$05         ; 
EDAD:4C 2D F6  JMP $F62D
EDB0:60        RTS

Use Jump-N-Slash Moving Right

ED65:38        SEC              ;
ED66:A5 64     LDA $0064        ; Load Ninja Points
ED68:E9 05     SBC #$05         ; Subtract 5
ED6A:30 11     BMI $ED7D        ; 
ED6C:85 64     STA $0064        ; Store Ninja Points

Use Jump-N-Slash Moving Left

EE09:38        SEC              ;
EE0A:A5 64     LDA $0064        ; Load Ninja Points
EE0C:E9 05     SBC #$05         ; Subtract 5
EE0E:30 11     BMI $EE21        ;
EE10:85 64     STA $0064        ; Store Ninja Points

Use Fire Wheel

EEFF:38        SEC              ;
EF00:A5 64     LDA $0064        ; Load Ninja Points
EF02:E9 05     SBC #$05         ; Subtract 5
EF04:10 01     BPL $EF07        ; Verify player has 5
EF06:60        RTS              ;
EF07:85 64     STA $0064        ; Store Ninja Points

Use Throwing Star

EF63:38        SEC              ;
EF64:A5 64     LDA $0064        ; Load Ninja Points
EF66:E9 03     SBC #$03         ; Subtract 3
EF68:10 01     BPL $EF6B        ; Verify player has 3
EF6A:60        RTS              ;
EF6B:85 64     STA $0064        ; Store Ninja Points

Use Windmill Star

EFAA:38        SEC              ; 
EFAB:A5 64     LDA $0064        ; Load Ninja Points
EFAD:E9 05     SBC #$05         ; Subtract 5
EFAF:10 01     BPL $EFB2        ; 
EFB1:60        RTS              ; 
EFB2:85 64     STA $0064        ; Store Ninja Points