-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAll_Practice.asm
More file actions
112 lines (86 loc) · 1.85 KB
/
Copy pathAll_Practice.asm
File metadata and controls
112 lines (86 loc) · 1.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
;=========================================================
; ALL PRACTICE MODE
;=========================================================
!Str_Buf equ $0480
; Last track = 20 (instead of 7)
org $008B4F
CMP #$14
; Last track = 20-1 (instead of 7-1)
org $008B5B
LDA #$13
; Change a BNE to BRA
org $009A63
DB $80
; Load shortcut routine from GP table rather than practice
org $00D619
LDA $00DAC6, x
; "Adjust track name" as in setting the appropriate track number and variation (I/II/III)
org $00AC0D
Adjust_Track_Name:
JSL Adjust_Track_Name_Hijack
NOP
NOP
; Change the track at the title screen to Port Town II
org $0380AE
LDA #$0C
; HOPEFULLY FIX ALL CASES OF WEIRDNESS ON TRACKS 8 TO 15
org $02C33F
JSL Get_Track_Num_x4
org $03915C
JSL Get_Track_Num_x4
org $039171
JSL Get_Track_Num_x4
; FIX THE MASTER ENDINGS
org $039D58
DB 4,9,14 ; SI, WL2, FF
; Freespace - NEW CODE GOES HERE
org $02C1CC
;=========================================================
;=========================================================
Get_Track_Num_x4:
LDX #$00
LDA $53
%Divide($05)
ASL A
ASL A
RTL
;=========================================================
;=========================================================
;=========================================================
Adjust_Track_Name_Hijack:
CMP #$09 ; A = $53 at this point
BCC .one_digit
LDA !Str_Buf
SEC
SBC #$04
STA !Str_Buf ; Move text X starting position 4 pixels to the left
LDY #$FF
- INY
LDA !Str_Buf+3,y
BNE -
; Y is now the offset to the last character in !Str_Buf
- LDA !Str_Buf+3,y
STA !Str_Buf+4,y ; Shift each character right once
DEY
BPL -
PHX
LDX #$00
LDA $53
INC A
%Divide($0A)
PHA
TXA
CLC
ADC #$80 ;
STA !Str_Buf+3
PLA
CLC
ADC #$80
STA !Str_Buf+4
PLX
RTL
.one_digit
ADC #$81 ; += '1'
STA !Str_Buf+3
RTL
;=========================================================