Commit MetaInfo

Revisionddc25bcb44b34ec09f9a09bdb38b1a010b6c9fa3 (tree)
Time2020-01-01 09:23:52
Authoringlorion <homemicro@ingl...>
Commiteringlorion

Log Message

rom: friendly message on cartridge load error

Change Summary

Incremental Difference

diff -r 6de6f2b684fa -r ddc25bcb44b3 rom/rom.s
--- a/rom/rom.s Wed Jan 01 08:36:02 2020 +0000
+++ b/rom/rom.s Wed Jan 01 00:23:52 2020 +0000
@@ -191,6 +191,7 @@
191191 jsr showchr
192192 lda #$4b
193193 jsr showchr
194+ jsr newline
194195
195196 lda #0
196197 sta $c0
@@ -208,22 +209,22 @@
208209 sta $a5
209210 jsr loadcart
210211 cmp #0
211- beq cart_loaded
212+ beq cloaded
212213 dec $c0
213214 bne try_cart
214215
215-cart_loaded:
216+cloaded:
216217 lda $2a00
217218 cmp #$48
218- bne unloadable_image
219+ bne cartfail
219220 lda $2a01
220221 cmp #$4d
221- bne unloadable_image
222+ bne cartfail
222223 lda $2a02
223- bne unloadable_image
224+ bne cartfail
224225 lda $2a03
225226 cmp #$1
226- bne unloadable_image
227+ bne cartfail
227228
228229 lda $2a04
229230 sta $c0
@@ -246,17 +247,19 @@
246247 sta $a7
247248 jsr loadcart
248249 cmp #0
249- bne unloadable_image
250+ bne cartfail
250251 lda #$aa
251252 sta $2007
252253 jmp ($c0)
253254
254-unloadable_image:
255- lda #$80
256- sta $2000
257- sta $2001
258- sta $2002
259- sta $2003
255+cartfail:
256+ lda #<cartfls
257+ sta SHOWADDR
258+ lda #>cartfls
259+ sta SHOWADDR + 1
260+ lda #CARTFLL
261+ sta SHOWCTR
262+ jsr show
260263 jmp _end
261264
262265 adjcur:
@@ -1137,6 +1140,8 @@
11371140 jmp _end
11381141
11391142 bytess: .byt "bytes"
1143+cartfls: .byt "Could not load cartridge"
1144+CARTFLL = * - cartfls
11401145
11411146 hexits: .byt "0123456789abcdef"
11421147
Show on old repository browser