Difference between revisions of "Excitebike"

From NES Hacker Wiki
Jump to: navigation, search
Line 72: Line 72:
  
 
===Code===
 
===Code===
 
 
====Palettes====
 
====Palettes====
 +
93D9-93E0 - Track 1
 +
93EC-93F3 - Track 2
 +
93FF-9406 - Track 3
 +
9412-9419 - Track 4
 +
9425-942C - Track 5
  
 
====Acceleration Code====
 
====Acceleration Code====

Revision as of 13:04, 31 July 2017

Excitebike is a motocross racing game. The game is incredibly short, there are only 5 tracks to master, but you are given the ability to make your own custom tracks to challenge your friends which gives the game a bit more replay value.

Easy Cheats

Icon Addr Val Cmp Description
Icon-Time.png 006A 00 - Time Stays At Zero
Icon-Powerup.png 03B6 00 - Heat Never Rises
Icon-Speed.png C0BC FF 18 Faster Acceleration With A
Icon-Speed.png C0BD FF 3F Faster Acceleration With B
Icon-Speed.png C0D1 05 03 Higher Top Speed With A
Icon-Speed.png C0D2 05 03 Higher Top Speed With B
Icon-Speed.png C0D1 07 03 Super High Top Speed With A
Icon-Speed.png C0D2 07 03 Super High Top Speed With B
Icon-Powerup.png D9A4 00 0F Recover Faster
Icon-Challenge.png C0BC 0C 18 Lower Acceleration With A
Icon-Challenge.png C0BD 1F 3F Lower Acceleration With B
Icon-Challenge.png C0D1 02 03 Lower Top Speed With A
Icon-Challenge.png C0D2 02 03 Lower Top Speed With B
Icon-Challenge.png C0D1 01 03 Super Low Top Speed With A
Icon-Challenge.png C0D2 01 03 Super Low Top Speed With B
How do I use these?

North America / Japan

Excitebike.png

Memory Addresses

004C - Loops between 0-3. Used to know which bike to process this frame.

004F - Racing Flag (00 - At Starting Line, 01 - Racing)

0057 - Laps remaining in design mode

0068 - Time: Minutes
0069 - Time: Seconds
006A - Time: 100ths
006B - Timer Work

0070 - Lane (0-4)

0090 - P1 Speed x1
0091 - P2 Speed x1
0092 - P3 Speed x1
0093 - P4 Speed x1
0094 - P1 Speed x256 (00-04) (Anything above 7 causes screen glitches)
0095 - P2 Speed x256 (00-04)
0096 - P3 Speed x256 (00-04)
0097 - P4 Speed x256 (00-04)

0390 - P1 How far to run back on bike after falling down
0391 - P2 How far to run back on bike after falling down
0392 - P3 How far to run back on bike after falling down
0393 - P4 How far to run back on bike after falling down

03B6 - Heat Level (00-20)

03D1 - Display Minutes
03D2 - Colon
03D3 - Display Seconds: 9x
03D4 - Display Seconds: x9
03D5 - Colon
03D6 - Display 1/100th Seconds: 9x
03D7 - Display 1/100th Seconds: x9

03D9 - Display Minutes
03DA - Colon
03DB - Display Seconds: 9x
03DC - Display Seconds: x9
03DD - Colon
03DE - Display 1/100th Seconds: 9x
03DF - Display 1/100th Seconds: x9


Code

Palettes

93D9-93E0 - Track 1
93EC-93F3 - Track 2
93FF-9406 - Track 3
9412-9419 - Track 4
9425-942C - Track 5

Acceleration Code

; In this block of code, X is bike number being processed. The player is always 0, the three competing bikes are 1, 2, and 3.
; Y is which acceleration button is being pressed, 0 = A, 1 = B
CE29:E4 4C     CPX $004C        ; If X != Current Bike Then
CE2B:D0 18     BNE $CE45        ; Goto $CE45
CE2D:B9 BC C0  LDA $C0BC,Y      ; Load Acceleration rate offset by which button into A
CE30:18        CLC              ; Clear carry flag
CE31:75 90     ADC $90,X        ; Add acceleration rate + current rate to current Bike Speed x1, offset X.
CE33:95 90     STA $90,X        ; Store sum into Bike Speed x1, offset X.
CE35:90 02     BCC $CE39        ; If sum didn't go above $FF Then Goto $CE39
CE37:F6 94     INC $94,X        ; Increment Bike Speed x256, offset X.
CE39:8A        TXA              ; Transfer X to A.
CE3A:D0 09     BNE $CE45        ; If this isn't the player Then Goto $CE45.
CE3C:B5 94     LDA $94,X        ; Load Bike Speed x256, offset X into A.
CE3E:D9 D1 C0  CMP $C0D1,Y      ; If the player has reached max speed Then
CE41:F0 03     BEQ $CE46        ; Goto $CE46
CE43:B0 08     BCS $CE4D        ; 
CE45:60        RTS              ; Return
CE46:B5 90     LDA $90,X        ; 
CE48:D9 CE C0  CMP $C0CE,Y      ; 
CE4B:90 F8     BCC $CE45        ; 
CE4D:B9 CE C0  LDA $C0CE,Y      ; 
CE50:95 90     STA $90,X        ; 
CE52:B9 D1 C0  LDA $C0D1,Y      ; 
CE55:95 94     STA $94,X        ; 
CE57:60        RTS              ; Return

Acceleration Tables

; Other values affect AI racers.
C0BC - 18 - Acceleration rate pressing A.
C0BD - 3F - Acceleration rate pressing B.
C0C3 - 00 - Deceleration while airborne and pushing forward.
C0C4 - 3C - Deceleration while airborne and pulling back.
C0C5 - 1C - Deceleration while airborne and not pushing.
C0C8 - 06 - Rotation while pressing forward on ground.
C0C9 - 02 - Max rotation while airborne and pressing forward.
0C0A - 0A - Wheelie delay.
C0CB - 0B - Max rotation while airborne and pressing back.
C0CE - 20 - Max Speed x1 pressing A.
C0CF - 40 - Max Speed x1 pressing B.
C0D1 - 03 - Max Speed x256 pressing A.
C0D2 - 03 - Max Speed x256 pressing B.

Time 1/100th Second Increment Code

ROM Address: 1F69
DF59:E6 6A     INC $006A       ; Increment the 1/100th second value.

Heat Increment

ROM Address: 23B7
E3A7:EE B6 03  INC $03B6       ; Increment Heat

Recover Code

D9A3:29 0F     AND #$0F        ; Run to bike speed.

Timer Code

DF30:A5 4F     LDA $004F       ; Load Racing Flag
DF32:F0 1D     BEQ $DF51       ; If Not Racing, Leave.
DF34:A5 6B     LDA $006B       ; Load Timer Work into A.
DF36:18        CLC             ; Clear Carry Flag.
DF37:69 10     ADC #$10        ; Add #10 to A
DF39:85 6B     STA $006B       ; Store A into Timer Work
DF3B:A5 6B     LDA $006B       ; Load Timer Work into A
DF3D:C9 0A     CMP #$0A        ; Compare Timer Work With #0A. (Not sure why, as line DF37 will always end up making the Carry Flag get set.)
DF3F:B0 11     BCS $DF52       ; If Carry Flag is True, Goto DF52 (increment timer)
DF41:A2 68     LDX #$68        ; Load Minutes into X.
DF43:20 7F DF  JSR $DF7F       ;
DF46:A2 06     LDX #$06        ; Load X with #06.
; Loop through each value in the Display Time and copy it into the second display time.
DF48:BD D1 03  LDA $03D1,X     ; Load Display Time into A.
DF4B:9D D9 03  STA $03D9,X     ; Store A into Second Display Time.
DF4E:CA        DEX             ; Decrement X
DF4F:10 F7     BPL $DF48       ; Loop until we've updated each time.
DF51:60        RTS

Increment the Timer

DF52:A5 6B     LDA $006B       ; Load Timer Work
DF54:38        SEC
DF55:E9 0A     SBC #$0A
DF57:85 6B     STA $006B
DF59:E6 6A     INC $006A       ; Increment 1/100th of Seconds.
DF5B:A5 6A     LDA $006A
DF5D:C9 64     CMP #$64
DF5F:90 DA     BCC $DF3B
DF61:A9 00     LDA #$00
DF63:85 6A     STA $006A
DF65:E6 69     INC $0069       ; Increment Seconds.
DF67:A5 69     LDA $0069
DF69:C9 3C     CMP #$3C
DF6B:90 CE     BCC $DF3B
DF6D:A9 00     LDA #$00
DF6F:85 69     STA $0069
DF71:E6 68     INC $0068       ; Increment Minutes.
DF73:A5 68     LDA $0068
DF75:C9 09     CMP #$09
DF77:90 C2     BCC $DF3B
DF79:A9 02     LDA #$02
DF7B:85 52     STA $0052
DF7D:D0 C2     BNE $DF41
DF7F:B5 00     LDA $00,X
DF81:48        PHA
DF82:B5 01     LDA $01,X
DF84:48        PHA
DF85:B5 02     LDA $02,X
DF87:20 A2 DF  JSR $DFA2
DF8A:8E D6 03  STX $03D6
DF8D:8D D7 03  STA $03D7
DF90:68        PLA
DF91:20 A2 DF  JSR $DFA2
DF94:8E D3 03  STX $03D3
DF97:8D D4 03  STA $03D4
DF9A:68        PLA
DF9B:20 A2 DF  JSR $DFA2
DF9E:8D D1 03  STA $03D1
DFA1:60        RTS

Text

Excitebike is another game that has very little text. There isn't even an ending or credits. 00 is used as an end of line marker in some areas.

156E-1859 - Game 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=O
19=P
1A=Q
1B=R
1C=S
1D=T
1E=U
1F=V
20=W
21=X
22=Y
23=Z
26=*
3A=©
79=#
f8==
F9='
FA=!
FB=:
FC= 


Europe

Excitebike (E).png

PlayChoice-10

Excitebike (PC10).png

Versus

Excitebike (VS).png