fix c128 clearscreen and bdmusic sound issue

This commit is contained in:
Irmen de Jong 2021-12-22 22:59:36 +01:00
parent 3e3da38de1
commit 8fa84de28e
3 changed files with 10 additions and 17 deletions

View File

@ -177,9 +177,10 @@ c64 {
; ---- kernal routines, these are the same as on the Commodore-64 (hence the same block name) ----
; STROUT -> use txt.print
romsub $C07B = CLEARSCR() clobbers(A,X,Y) ; clear the screen
romsub $C150 = HOMECRSR() clobbers(A,X,Y) ; cursor to top left of screen
; STROUT --> use txt.print
; CLEARSCR -> use txt.clear_screen
; HOMECRSR -> use txt.home or txt.plot
romsub $FA65 = IRQDFRT() clobbers(A,X,Y) ; default IRQ routine
romsub $FF33 = IRQDFEND() clobbers(A,X,Y) ; default IRQ end/cleanup

View File

@ -11,7 +11,7 @@ c64 {
; STROUT --> use txt.print
; CLEARSCR -> use txt.clear_screen
; HOMECRSR -> use txt.plot
; HOMECRSR -> use txt.home or txt.plot
romsub $FF81 = CINT() clobbers(A,X,Y) ; (alias: SCINIT) initialize screen editor and video chip
romsub $FF84 = IOINIT() clobbers(A, X) ; initialize I/O devices (CIA, SID, IRQ)

View File

@ -15,7 +15,7 @@ sub start() {
txt.print("will play the music from boulderdash,\nmade in 1984 by peter liepa.\npress enter to start: ")
void c64.CHRIN()
c64.CLEARSCR()
txt.clear_screen()
repeat {
uword note
@ -32,27 +32,19 @@ sub start() {
c64.CR2 = waveform <<4 | 1
print_notes(note1, note2)
delay()
}
}
}
sub delay() {
repeat 8 {
ubyte jiffy = c64.TIME_LO
while c64.TIME_LO==jiffy {
sys.wait(8)
}
}
}
sub print_notes(ubyte n1, ubyte n2) {
c64.CHROUT('\n')
txt.nl()
txt.plot(n1/2, 24)
txt.color(7)
c64.CHROUT('Q')
txt.chrout('Q')
txt.plot(n2/2, 24)
txt.color(4)
c64.CHROUT('Q')
txt.chrout('Q')
}