Skip to navigation


Extra tracks: ModifyGameCode (Part 3 of 4)

Name: ModifyGameCode (Part 3 of 4) [Show more] Type: Subroutine Category: Extra tracks Summary: Modify the game code to support the extra track data
Context: See this subroutine in context in the source code References: No direct references to this subroutine in this source file

The code modifications are done in four parts. This is also where the zTrackSegmentI table is built, once the modifications have been done. The routine is padded out to be exactly 40 bytes long, so there's one byte for each inner segment z-coordinate.
.mods3 LDA #LO(HookForward) \ !&24DF = HookForward (address in a JSR STA &24DF \ instruction) LDA #HI(HookForward) STA &24E0 LDA #LO(HookSlopeJump) \ !&45CC = HookSlopeJump (address in a JSR instruction) STA &45CC LDA #HI(HookSlopeJump) STA &45CD LDA #75 \ ?&2772 = 75 (argument in a CMP #75 instruction) STA &2772 LDA #&A9 \ !&1310 = &A9 &88 (LDA #17*8 instruction) STA &1310 LDA #&88 STA &1311 LDA #22 \ Set A = 22 to pass to part 4 JMP mods4 \ Jump to part 4