Chip 'n Dale Rescue Rangers/ROM map: Difference between revisions

From Data Crystal
Jump to navigation Jump to search
(Created page with "=PRG= ==Page 06== ===Function 06:8000=== Cycles through & executes the action script for each non-player object. Intro 8000: LDX #$02 8002: STX $4D ; Set current objec...")
 
m (Lelegofrog moved page Disney's Chip 'n Dale: Rescue Rangers/ROM map to Chip 'n Dale Rescue Rangers/ROM map: title consistency with TCRF)
 
(13 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{rommap}}
=PRG=
=PRG=
==Page 06==
==Page 06==
Line 4: Line 6:
Cycles through & executes the action script for each non-player object.
Cycles through & executes the action script for each non-player object.


Intro
Function calls:
8000: LDX #$02
* [[#Function_06:808E|06:808E]]
8002: STX $4D    ; Set current object to <b>02</b> (skipping over Chip/Dale)
* [[#Function_06:8E15|06:8E15]]
 
* [[#Function_07:F92B|07:F92B]]
Main Loop
8004: LDA $04D0,X
8007: BPL $8082  ; Skip slot if unoccupied (if status flag <b>80</b> is not set)
 
Execute Script
8009: LDY $04E0,X ;
800C: LDA $80A7,Y
800F: STA $00
8011: LDA $810C,Y
8014: STA $01    ; Retrieve address of object's action script from pointer table
8016: LDA #$80
8018: PHA
8019: LDA #$1E
801B: PHA        ; Set return address
801C: JMP ($00)  ; Execute action script
801F: LDA $0570,X
8022: AND #$40
8024: BEQ $8029
 
8026: JSR $8E15
 
8029: LDA $04D0,X
802C: AND #$40
802E: BEQ $8082
 
8030: JSR $F92B
8033: BCS $8082
 
8035: LDA $5E,Y
8038: BNE $8082
 
803A: LDA $54,Y
803D: CMP #$03
803F: BCS $8082
 
8041: LDA $0420,Y
8044: BEQ $804D
 
8046: LDA #$09
8048: STA $54,Y
804B: BNE $8082
 
804D: JSR $808E
8050: LDA $56,Y
8053: BPL $8082
 
8055: AND #$0F
8057: PHA
8058: LDA #$00
805A: STA $56,Y
805D: PLA
805E: TAY
805F: LDA #$80
8061: STA $04D0,Y
8064: LDA #$3E
8066: STA $04E0,Y
8069: LDA #$00
806B: STA $0410,Y
806E: STA $0430,Y
8071: LDA $0420,Y
8074: CMP #$22
8076: BEQ $8082


8078: CMP #$23
===Function 06:8F38===
807A: BEQ $8082
Action Script '''02''' - Robot Dog


807C: SEC
Function calls:
807D: SBC #$09
* [[#Function_07:F000|07:F000]]
807F: STA $0420,Y
* [[#Function_07:F066|07:F066]]
* [[#Function_07:F0FB|07:F0FB]]
* [[#Function_07:F328|07:F328]]
* [[#Function_07:F379|07:F379]]


8082: INC $4D
==Page 07==
8084: LDX $4D
===Function 07:F379===
8086: CPX #$10
'''playAudio(A)'''
8088: BEQ $808D


808A: JMP $8004
Plays audio ID in Accumulator.


808D: RTS        ; Exit function
{{Internal Data}}

Latest revision as of 14:26, 25 June 2024

Chip tiny.png The following article is a ROM map for Chip 'n Dale Rescue Rangers.

PRG

Page 06

Function 06:8000

Cycles through & executes the action script for each non-player object.

Function calls:

Function 06:8F38

Action Script 02 - Robot Dog

Function calls:

Page 07

Function 07:F379

playAudio(A)

Plays audio ID in Accumulator.