mirror of
https://github.com/deater/dos33fsprogs.git
synced 2024-06-27 07:29:29 +00:00
pt3_lib_ch6: add visualization
not a particularly good one
This commit is contained in:
parent
8aacb5125e
commit
4ff638f55a
|
@ -26,7 +26,7 @@ PT3_TEST: pt3_test.o
|
||||||
pt3_test.o: pt3_test.s \
|
pt3_test.o: pt3_test.s \
|
||||||
pt3_lib_detect_model.s \
|
pt3_lib_detect_model.s \
|
||||||
pt3_lib_init.s pt3_lib_core.s pt3_lib_irq_handler.s \
|
pt3_lib_init.s pt3_lib_core.s pt3_lib_irq_handler.s \
|
||||||
pt3_lib_common.s pt3_lib_core2.s \
|
pt3_lib_common.s pt3_lib_core2.s visual.s \
|
||||||
pt3_lib_mockingboard_detect.s pt3_lib_mockingboard_setup.s \
|
pt3_lib_mockingboard_detect.s pt3_lib_mockingboard_setup.s \
|
||||||
interrupt_handler.s zp.inc
|
interrupt_handler.s zp.inc
|
||||||
ca65 -o pt3_test.o pt3_test.s -l pt3_test.lst
|
ca65 -o pt3_test.o pt3_test.s -l pt3_test.lst
|
||||||
|
|
|
@ -13,8 +13,8 @@ SET_GR = $C050
|
||||||
SET_TEXT = $C051
|
SET_TEXT = $C051
|
||||||
FULLGR = $C052
|
FULLGR = $C052
|
||||||
TEXTGR = $C053
|
TEXTGR = $C053
|
||||||
PAGE0 = $C054
|
PAGE1 = $C054
|
||||||
PAGE1 = $C055
|
PAGE2 = $C055
|
||||||
LORES = $C056 ; Enable LORES graphics
|
LORES = $C056 ; Enable LORES graphics
|
||||||
HIRES = $C057 ; Enable HIRES graphics
|
HIRES = $C057 ; Enable HIRES graphics
|
||||||
AN3 = $C05E ; Annunciator 3
|
AN3 = $C05E ; Annunciator 3
|
||||||
|
|
|
@ -109,6 +109,8 @@ mockingboard_found:
|
||||||
|
|
||||||
jsr print_mocking_found
|
jsr print_mocking_found
|
||||||
|
|
||||||
|
jsr print_artist_message
|
||||||
|
|
||||||
;==================================================
|
;==================================================
|
||||||
; patch the playing code with the proper slot value
|
; patch the playing code with the proper slot value
|
||||||
;==================================================
|
;==================================================
|
||||||
|
@ -147,7 +149,14 @@ start_interrupts:
|
||||||
;============================
|
;============================
|
||||||
; Loop forever
|
; Loop forever
|
||||||
;============================
|
;============================
|
||||||
|
bit SET_GR
|
||||||
|
bit LORES
|
||||||
|
bit TEXTGR
|
||||||
|
bit PAGE1
|
||||||
forever_loop:
|
forever_loop:
|
||||||
|
|
||||||
|
jsr visualization
|
||||||
|
|
||||||
jmp forever_loop
|
jmp forever_loop
|
||||||
|
|
||||||
|
|
||||||
|
@ -222,6 +231,24 @@ done_found_message:
|
||||||
|
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
print_artist_message:
|
||||||
|
jsr CROUT1
|
||||||
|
|
||||||
|
ldy #0
|
||||||
|
print_artist_message_loop:
|
||||||
|
lda artist_message,Y ; load loading message
|
||||||
|
beq done_artist_message
|
||||||
|
ora #$80
|
||||||
|
jsr COUT
|
||||||
|
iny
|
||||||
|
jmp print_artist_message_loop
|
||||||
|
done_artist_message:
|
||||||
|
|
||||||
|
rts
|
||||||
|
|
||||||
|
|
||||||
;=========
|
;=========
|
||||||
; strings
|
; strings
|
||||||
;=========
|
;=========
|
||||||
|
@ -231,6 +258,7 @@ mocking_message: .asciiz "LOOKING FOR MOCKINGBOARD: "
|
||||||
not_message: .byte "NOT "
|
not_message: .byte "NOT "
|
||||||
found_message: .asciiz "FOUND SLOT#4"
|
found_message: .asciiz "FOUND SLOT#4"
|
||||||
|
|
||||||
|
artist_message: .asciiz "PLAYING: 'DANCE OF THE DEAD' BY DYA"
|
||||||
|
|
||||||
|
|
||||||
;=========
|
;=========
|
||||||
|
@ -254,6 +282,8 @@ found_message: .asciiz "FOUND SLOT#4"
|
||||||
; if you're self patching, detect has to be after interrupt_handler.s
|
; if you're self patching, detect has to be after interrupt_handler.s
|
||||||
.include "pt3_lib_mockingboard_detect.s"
|
.include "pt3_lib_mockingboard_detect.s"
|
||||||
|
|
||||||
|
.include "visual.s"
|
||||||
|
|
||||||
;=============
|
;=============
|
||||||
; include song
|
; include song
|
||||||
;=============
|
;=============
|
||||||
|
|
Binary file not shown.
74
music/pt3_lib_6ch/visual.s
Normal file
74
music/pt3_lib_6ch/visual.s
Normal file
|
@ -0,0 +1,74 @@
|
||||||
|
|
||||||
|
visualization:
|
||||||
|
|
||||||
|
ldx #0
|
||||||
|
vis_loop_outer:
|
||||||
|
lda gr_offsets_l,X
|
||||||
|
sta GBASL
|
||||||
|
lda gr_offsets_h,X
|
||||||
|
sta GBASH
|
||||||
|
|
||||||
|
lda $70,X
|
||||||
|
ldy #19
|
||||||
|
vis_loop_inner:
|
||||||
|
sta (GBASL),Y
|
||||||
|
dey
|
||||||
|
bne vis_loop_inner
|
||||||
|
|
||||||
|
inx
|
||||||
|
cpx #14
|
||||||
|
bne vis_loop_outer
|
||||||
|
|
||||||
|
ldx #0
|
||||||
|
vis_loop_outer2:
|
||||||
|
lda gr_offsets_l,X
|
||||||
|
sta GBASL
|
||||||
|
lda gr_offsets_h,X
|
||||||
|
sta GBASH
|
||||||
|
|
||||||
|
lda $80,X
|
||||||
|
ldy #39
|
||||||
|
vis_loop_inner2:
|
||||||
|
sta (GBASL),Y
|
||||||
|
dey
|
||||||
|
cpy #20
|
||||||
|
bne vis_loop_inner2
|
||||||
|
|
||||||
|
inx
|
||||||
|
cpx #14
|
||||||
|
bne vis_loop_outer2
|
||||||
|
|
||||||
|
lda #200
|
||||||
|
jsr wait
|
||||||
|
|
||||||
|
rts
|
||||||
|
|
||||||
|
|
||||||
|
gr_offsets_l:
|
||||||
|
.byte <$400,<$480,<$500,<$580,<$600,<$680,<$700,<$780
|
||||||
|
.byte <$428,<$4a8,<$528,<$5a8,<$628,<$6a8,<$728,<$7a8
|
||||||
|
.byte <$450,<$4d0,<$550,<$5d0,<$650,<$6d0,<$750,<$7d0
|
||||||
|
|
||||||
|
gr_offsets_h:
|
||||||
|
.byte >$400,>$480,>$500,>$580,>$600,>$680,>$700,>$780
|
||||||
|
.byte >$428,>$4a8,>$528,>$5a8,>$628,>$6a8,>$728,>$7a8
|
||||||
|
.byte >$450,>$4d0,>$550,>$5d0,>$650,>$6d0,>$750,>$7d0
|
||||||
|
|
||||||
|
; copy of ROM wait
|
||||||
|
; because we might disable ROM
|
||||||
|
|
||||||
|
|
||||||
|
wait:
|
||||||
|
sec
|
||||||
|
wait2:
|
||||||
|
pha
|
||||||
|
wait3:
|
||||||
|
sbc #$01
|
||||||
|
bne wait3
|
||||||
|
pla
|
||||||
|
sbc #$01
|
||||||
|
bne wait2
|
||||||
|
rts
|
||||||
|
wait_end:
|
||||||
|
|
||||||
|
.assert (>wait_end - >wait) < 1 , error, "wait crosses page boundary"
|
|
@ -63,3 +63,17 @@ PATTERN_H_2 = $8F
|
||||||
|
|
||||||
LOOP_2 = $90
|
LOOP_2 = $90
|
||||||
DONE_SONG_2 = $91
|
DONE_SONG_2 = $91
|
||||||
|
|
||||||
|
|
||||||
|
; visualization
|
||||||
|
|
||||||
|
X1 = $F0
|
||||||
|
Y1 = $F1
|
||||||
|
X2 = $F2
|
||||||
|
Y2 = $F3
|
||||||
|
YY = $F4
|
||||||
|
|
||||||
|
COLOR = $30
|
||||||
|
GBASL = $26
|
||||||
|
GBASH = $27
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user