Skip to content

Commit 4db1aac

Browse files
committed
Simplification of video subcommand, new subcommand stop
(To be documented)
1 parent 20eee43 commit 4db1aac

File tree

1 file changed

+14
-28
lines changed

1 file changed

+14
-28
lines changed

src/video.s

+14-28
Original file line numberDiff line numberDiff line change
@@ -297,39 +297,22 @@ update_extra:
297297
; attribute col update
298298
and #$07
299299
tax
300+
mov n3, {attribute_col_unr_lo, x}
301+
mov n4, {attribute_col_unr_hi, x}
300302
lda PPU_buff, y
301303
iny
302304
sta n2
303305
lda PPU_buff, y
304306
iny
305-
cpx #4
306-
bcc @f0t4
307-
cpx #6
308-
bcc @f4t6
309-
cpx #7
310-
bcc @do6 ;33
311-
clc
312-
jmp @do7 ;37
313-
@f0t4:
314-
cpx #2
315-
bcc @f0t2
316-
cpx #3
317-
bcc @do2 ;34
318-
clc
319-
jmp @do3 ;38
320-
@f4t6:
321-
cpx #5
322-
bcc @do4 ;34
323-
clc
324-
jmp @do5 ;38
325-
@f0t2:
326-
cpx #1
327-
bcc @do0 ;35
328-
clc
329-
jmp @do1 ;39
307+
jmp (n3)
308+
309+
attribute_col_unr_lo:
310+
.repeat 8,I
311+
.lobytes .ident(.sprintf("attribute_col_unr_%d",I))
312+
.endrepeat
313+
attribute_col_unr_hi:
330314
.repeat 8,I
331-
.ident(.sprintf("@do%d",I)):
332-
jmp .ident(.sprintf("attribute_col_unr_%d",I))
315+
.hibytes .ident(.sprintf("attribute_col_unr_%d",I))
333316
.endrepeat
334317

335318
extra_upd_C0:
@@ -344,7 +327,10 @@ extra_upd_C0:
344327
extra_upd_E0:
345328
; Do nothing, yet.
346329
; pattern => %111xxxxx (5 coding bits free)
347-
check_loop
330+
331+
; %11111111
332+
iny
333+
jmp end_updates
348334

349335
upd_palette_group:
350336
; %11010xxx

0 commit comments

Comments
 (0)