@henols/c64-re-tools 2.5.0-rc.1 → 2.5.1-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12,6 +12,11 @@
12
12
  ; c64_source_ss_colour_mode: 0 no colour RAM, 1 one colour, 2 a copy of 1000 bytes
13
13
  ; c64_source_ss_colour: the one colour (mode 1)
14
14
  ; c64_source_ss_colours: the address of the 1000 bytes (mode 2)
15
+ ; The show stage of a start screen from a captured stage can also set:
16
+ ; c64_source_ss_call: a routine of the stage, for example the start of the
17
+ ; loading tune. The code calls it with the KERNAL in and the interrupts on,
18
+ ; after the screen shows and before the wait. The interrupts stay on in the
19
+ ; wait, so each read of the keyboard and the joysticks is done with SEI.
15
20
 
16
21
  !ifndef START_SCREEN { START_SCREEN = 1 }
17
22
 
@@ -78,12 +83,23 @@
78
83
  }
79
84
  lda #c64_source_ss_d011
80
85
  sta $d011
86
+ !ifdef c64_source_ss_call {
87
+ lda #$37
88
+ sta $01
89
+ cli
90
+ jsr c64_source_ss_call
91
+ }
81
92
 
82
93
  ; Y is the phase: 0 waits until nothing is pressed, for example the
83
94
  ; RETURN of RUN; 1 waits for a press; 2 waits until it is released.
84
95
  loader_start_screen_wait
85
96
  ldy #0
86
- .poll lda #$ff
97
+ .poll
98
+ !ifdef c64_source_ss_call {
99
+ ; An interrupt of the stage must not write $dc00 between a write and a read.
100
+ sei
101
+ }
102
+ lda #$ff
87
103
  sta $dc00
88
104
  ; No keyboard row is driven: $dc01 gives joystick 1 alone.
89
105
  lda $dc01
@@ -107,12 +123,19 @@ loader_start_screen_wait
107
123
  lda $dc01
108
124
  and .joy
109
125
  bne .down
126
+ !ifdef c64_source_ss_call {
127
+ cli
128
+ }
110
129
  tya
111
130
  beq .settle
112
131
  cmp #2
113
132
  beq loader_start_screen_continue
114
133
  bne .poll
115
- .down cpy #1
134
+ .down
135
+ !ifdef c64_source_ss_call {
136
+ cli
137
+ }
138
+ cpy #1
116
139
  bne .poll
117
140
  iny
118
141
  bne .poll
@@ -130,6 +153,9 @@ loader_start_screen_wait
130
153
  bne .poll
131
154
 
132
155
  loader_start_screen_continue
156
+ !ifdef c64_source_ss_call {
157
+ sei
158
+ }
133
159
  lda .port
134
160
  sta $dc00
135
161
  lda .ddra