.mods3 LDA #&20 \ ?&2F23 = &20 (opcode for a JSR instruction) STA &2F23 LDA #0 \ ?&231B = 0 (branch offset in a BEQ instruction) STA &231B 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 &10 (LDA #2*8 instruction) STA &1310 LDA #&10 STA &1311 RTS \ Return from the subroutine EQUB &00, &00 \ These bytes pad the routine out to exactly 40 bytes EQUB &00, &00Name: ModifyGameCode (Part 3 of 3) [Show more] Type: Subroutine Category: Extra tracks Summary: Modify the game code to support the extra track dataContext: 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 three 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.
[X]
Subroutine HookSlopeJump (category: Extra tracks)
Jump the car when driving fast over sloping segments