DuckTales

From NES Hacker Wiki
Revision as of 15:36, 21 April 2016 by TheAlmightyGuru (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

DuckTales is a platform action game based on the TV series. You control Scrooge McDuck as he travels to far away lands in search of treasures to become the richest duck in the world. Joining Scrooge is the cast of heroes from the television show including Huey, Dewey, Louie, Webbigail, Launchpad McQuack, Bubba, Ms. Beakly, Gizmoduck, and Gyro Gearloose. You will have to fight a multitude of enemies including the villains from the show like the Beagle Brothers, Magica DeSpell, and Flintheart Glomgold. Scrooge uses his cane as a weapon throughout the game, bouncing on monsters, pogoing off dangerous terrain, and smacking rocks at enemies.

Easy Cheats

Icon Addr Val Cmp Description
Icon-Lives.png DB0B 08 02 Start With 9 Lives
Icon-Lives-Infinite.png 0361 09 - Infinite Lives
Icon-HitPoints-Infinite.png 034A 00 - Infinite Hit Points
Icon-Invincible.png 0075 01 - Invincible (Must turn off to end stage)
Icon-Invincible.png 007D 01 - Invulnerable
Icon-Item.png 00A1 01 - Have Remote Control
Icon-Item.png 00A3 06 - Have Both Keys
Icon-Jump.png 07A0 05 - High Jump
Icon-Jump.png 07A0 06 - Super High Jump
Icon-Invincible.png 8BAC 03 01 Magic Coin Lasts Longer
Icon-Time.png 00B0 3C - Infinite Time
Icon-Challenge.png DB0B 00 02 Start With 1 Life
Icon-Challenge.png 0361 00 - 1 Life, No 1-Ups
How do I use these?

North America

Duck Tales.png

Memory Addresses

0026 - Camera X Position
004C - Map X Position
0050 - Normally FF, switches to 01 and 02 while scrolling into a new room.
005F - Damage In Easy Mode
0075 - Magic Coin Flag
0076 - Magic Coin Timeout x1
0077 - Magic Coin Timeout x256
007D - Invincibility Timeout
0095 - Looping Counter (00-FF) - Used for certain events.
00A1 - Remote Control Flag
00A3 - Keys Flag                  It appears that the designers originally intended to
	+02 - Skeleton Key         have more than just the two keys, and possibly one 
	+04 - UFO Key              was removed during development.
00B0 - Split Second Time (01-3C) Upon reaching zero, it resets to 3C and decreases a second (0159)
00B1 - Boss Hit Points
00C8-00CF - Sound effect to play. 88 - No Sound. See Sound Effects Table.
00F6 - Land
	00 - The Amazon
	01 - Transylvania
	02 - African Mines
	03 - The Himalayas
	04 - The Moon
00F9 - Difficulty
	00 - Easy
	01 - Normal
	02 - Hard
0151 - Time: 9xx
0155 - Time: x9x
0159 - Time: xx9
0200-02FF - Sprite Data
0300-031F - Palette
0324 - Money: 9xxxxxx
0325 - Money: x9xxxxx
0326 - Money: xx9xxxx
0327 - Money: xxx9xxx
0328 - Money: xxxx9xx
0329 - Money: xxxxx9x
032A - Money: xxxxxx9
0334 - Total Money: 9xxxxxxx
0335 - Total Money: x9xxxxxx
0336 - Total Money: xx9xxxxx
0337 - Total Money: xxx9xxxx
0338 - Total Money: xxxx9xxx
0339 - Total Money: xxxxx9xx
033A - Total Money: xxxxxx9x
033B - Total Money: xxxxxxx9

Hit Point Ball Struct             Hit Points are based on their palette
 0 - Hit Point 1 Y Position       00 - Red, 01 - Orange
 1 - Hit Point 1 CHR              As long as the first hit point ball is red,
 2 - Hit Point 1 Palette          you can't die from loss of hit points.
 3 - Hit Point 1 X Position       The HP drawing loop stops when an FF is encountered.
0340-0343 - Hit Point 1           You can actually fit a 6th hit point if you 
0344-0347 - Hit Point 2           set the player's lives to FF and adjust the
0348-034B - Hit Point 3           in-between values appropriately.
034C-034F - Hit Point 4
0350-0353 - Hit Point 5

0361 - Lives (00-09)

0370-03EF - Sound Variables
0500-05FF - Name Table?
0600-07FF - Player & Monster Variables
0610 - Player Animation Frame (Changes depending on animation)
0620 - Player Status
	00 - Idle
	01 - Walking
	02 - Jumping
	03 - Ducking
	04 - 
	05 - Injured
	06 - Pogoing
	07 - Ready to Golf
	08 - Landed
	09 - Golfing
	2C - Being Eaten By Flower
	41 - Golfed a Wall
0630 - Player Cycle (Used in various actions)

07A0 - Player Jump Height (04)

07C0 - Player Y Delta

DB0B - Starting Lives (02)

Sound Effects Table

36 - Warning Bell when fewer than 30 seconds remain.

Code

Get Magic Coin

8B9C:4C 12 F8  JMP $F812       ; 
8B9F:A9 00     LDA #$00        ; 
8BA1:85 7D     STA $007D       ; Clear Invincibility Timeout.
8BA3:A9 01     LDA #$01        ; 
8BA5:85 75     STA $0075       ; Set Magic Coin Flag.
8BA7:A9 E0     LDA #$E0        ; 
8BA9:85 76     STA $0076       ; Set Magic Coin Timeout x1
8BAB:A9 01     LDA #$01        ; 
8BAD:85 77     STA $0077       ; Set Magic Coin Timeout x256
8BAF:60        RTS             ; Total amount is 480.

1 Up

8BB0:AD 61 03  LDA $0361       ; Load Lives.
8BB3:C9 09     CMP #$09        ; Compare Lives with #09
8BB5:F0 03     BEQ $8BBA       ; If Lives = 9, Goto 8BBA.
8BB7:EE 61 03  INC $0361       ; Increment Lives.
8BBA:60        RTS

Loss of Life

This code runs every time the player loses a life. There is a lot more that has yet to be disassembled.

DCA5:A9 00     LDA #$00        ; 
DCA7:8D 20 06  STA $0620       ; Wipe out Player Status
DCAA:8D 30 06  STA $0630       ; Wipe out Player Cycle
DCAD:8D 10 06  STA $0610       ; Wipe out Player Animation
DCB0:CE 61 03  DEC $0361       ; Decrease Player Lives
DCB3:20 12 F8  JSR $F812       ; Clear the Palettes of the Hit Point Balls
DCB6:A9 00     LDA #$00        ; 
DCB8:85 50     STA $0050       ; Wipe out $0050
DCBA:20 2C C4  JSR $C42C

Clear the Palettes of the Hit Point Balls

This routine clears all of the Hit Point Balls. It gets called at the beginning of a level and when a player dies.

F812:A0 10     LDY #$10        ; Load Y with $10 (4 hit point balls, 4 bytes each)
F814:A9 00     LDA #$00        ; 
F816:85 5F     STA $005F       ; Wipe out Damage In Easy Mode.
F818:99 42 03  STA $0342,Y     ; Wipe out this Hit Point Ball Palette
F81B:88        DEY
F81C:88        DEY
F81D:88        DEY
F81E:88        DEY             ; Get to the next ball.
F81F:10 F7     BPL $F818       ; Loop until we've cleared all 4 balls.
F821:60        RTS

Time

This routine handles decreasing time.

E2A6:C6 B0     DEC $00B0       ; Decrease Split Second.
E2A8:D0 3C     BNE $E2E6       ; If Split Second above 00, goto $E2E6.
E2AA:A9 3C     LDA #$3C        ; 
E2AC:85 B0     STA $00B0       ; Set Split Second back to #$3C
E2AE:A2 08     LDX #$08        ; Set the X offset for Time Digit to #$08 (Time digits are 4 bytes, so $08, $04, $00)
E2B0:38        SEC             ; 
E2B1:A9 01     LDA #$01        ; A = #$01.
E2B3:85 00     STA $0000       ; Set $0000 to $01.
E2B5:BD 51 01  LDA $0151,X     ; Load A with the digit of Time based on the X Offset.
E2B8:E5 00     SBC $0000       ; Subtract 1 from Time Digit with borrowing.
E2BA:B0 03     BCS $E2BF       ; If Time Digit was above 00, goto $E2BF.
E2BC:69 0A     ADC #$0A        ; Otherwise set the digit back to 9
E2BE:18        CLC             ; Clear Carry Flag
E2BF:9D 51 01  STA $0151,X     ; Set the current Time Digit to its new value.
E2C2:A9 00     LDA #$00        ; Clear A.
E2C4:85 00     STA $0000       ; Clear $0000.
E2C6:CA        DEX             ; 
E2C7:CA        DEX             ; 
E2C8:CA        DEX             ; 
E2C9:CA        DEX             ; Move to the next Time Digit Offset (Subtract by 4 because Time Digits take 4 bytes).
E2CA:10 E9     BPL $E2B5       ; If we're not done, go back to $E2B5.
E2CC:AD 51 01  LDA $0151       ; Load the first Time Digit into A.
E2CF:0D 55 01  ORA $0155       ; OR Second Time Digit with A.
E2D2:0D 59 01  ORA $0159       ; OR Third Time Digit with A.
E2D5:D0 0F     BNE $E2E6       ; 
E2D7:A9 1E     LDA #$1E        ; 
E2D9:8D 51 01  STA $0151       ; 
E2DC:A9 19     LDA #$19        ; 
E2DE:8D 55 01  STA $0155       ; 
E2E1:A9 24     LDA #$24        ; 
E2E3:8D 59 01  STA $0159       ; 
E2E6:AD 51 01  LDA $0151       ; \
E2E9:D0 12     BNE $E2FD       ;   This block checks to see if there are less than 30 seconds 
E2EB:AD 55 01  LDA $0155       ;   remaining, and if there are, it starts playing the warning bell.
E2EE:C9 03     CMP #$03        ; 
E2F0:B0 0B     BCS $E2FD       ; 
E2F2:A5 95     LDA $0095       ; 
E2F4:29 0F     AND #$0F        ; 
E2F6:D0 05     BNE $E2FD       ; 
E2F8:A9 36     LDA #$36        ;  This is the sound effect number to play.
E2FA:20 54 F7  JSR $F754       ; / Set Sound Effect
E2FD:60        RTS

Set Sound Effect

This routine performs the data changes necessary to play a sound effect.

F754:86 00     STX $0000     ; Store X into $0000.
F756:A6 C6     LDX $00C6     ; Load X from $00C6
F758:85 01     STA $0001     ; Store A into $0001.
F75A:B5 C8     LDA $C8,X     ; Load A from $C8 with an offset of X.
F75C:C9 88     CMP #$88      ; Compare A With #$88
F75E:D0 0A     BNE $F76A     ; If A is not #$88, goto $F76A.
F760:A5 01     LDA $0001     ; Return A back to its original value.
F762:95 C8     STA $C8,X     ; Store A into $C8 with an offset of X.
F764:E8        INX           ; Increment X.
F765:8A        TXA           ; Transfer X to A.
F766:29 07     AND #$07      ; And A with #$07.
F768:85 C6     STA $00C6     ; Store $00C6 into A.
F76A:A6 00     LDX $0000     ; Return X back to its original value.
F76C:60        RTS

Unknown

Not sure what this routine is for yet.

FFDE:85 E7     STA $00E7       ; Store A into $00E7
FFE0:AA        TAX             ; Transfer A to X
FFE1:9D E5 FF  STA $FFE5,X     ; Store A into $FFE5, with an offset of X
FFE4:60        RTS

Text

00=0
01=1
02=2
03=3
04=4
05=5
06=6
07=7
08=8
09=9
0A=A
0B=B
0C=C
0D=D
0E=E
0F=F
10=G
11=H
12=I
13=J
14=K
15=L
16=M
17=N
18=-
19=P
1A=Q
1B=R
1C=S
1D=T
1E=U
1F=V
20=W
21=X
22=Y
23=Z
24= 
2C=$
2D='
2E=.
2F=!
C8=/

Japan

Europe

Duck Tales (E).png