sa: weird HIRES/80col corruption issue

real hardware or just the emulator?
This commit is contained in:
Vince Weaver 2018-06-05 14:30:01 -04:00
parent d9ea06b7da
commit e7dc17a39a
5 changed files with 32 additions and 15 deletions

View File

@ -8,6 +8,7 @@ display_lyrics_ed:
; Check if new lyric ready ; Check if new lyric ready
;======================== ;========================
lda FRAME_COUNT ; get current frame count lda FRAME_COUNT ; get current frame count
ldy #0
cmp (LYRICSL),Y ; compare to next-trigger cmp (LYRICSL),Y ; compare to next-trigger
bne all_done_lyrics_ed ; not same, so skip bne all_done_lyrics_ed ; not same, so skip
@ -21,7 +22,7 @@ lc_sb2_ed:
; Print lyric ; Print lyric
;================================== ;==================================
handle_lyrics_ed: handle_lyrics_ed:
ldy #0
lda (LYRICSL),Y ; load value lda (LYRICSL),Y ; load value
handle_lyrics_loop_ed: handle_lyrics_loop_ed:
@ -38,9 +39,7 @@ lyric_home_ed:
cmp #12 ; check if form feed char cmp #12 ; check if form feed char
bne lyric_char_ed ; if not skip ahead bne lyric_char_ed ; if not skip ahead
sty TEMPY
jsr HOME ; call HOME jsr HOME ; call HOME
ldy TEMPY
jmp lyric_continue_ed ; continue jmp lyric_continue_ed ; continue
@ -68,7 +67,7 @@ lyric_continue_ed:
bne lc_sb_ed bne lc_sb_ed
inc LYRICSH inc LYRICSH
lc_sb_ed: lc_sb_ed:
ldy #0
lda (LYRICSL),Y ; load value lda (LYRICSL),Y ; load value
bne handle_lyrics_loop_ed bne handle_lyrics_loop_ed
@ -103,7 +102,7 @@ display_lyrics:
;===================== ;=====================
; See if lyrics already printing ; See if lyrics already printing
;===================== ;=====================
ldy #0
lda LYRICS_ACTIVE ; see if lyric is ready lda LYRICS_ACTIVE ; see if lyric is ready
bne handle_lyrics ; if so handle it bne handle_lyrics ; if so handle it
@ -134,7 +133,6 @@ lc_sb5:
; Lyric active, print current char ; Lyric active, print current char
;================================== ;==================================
handle_lyrics: handle_lyrics:
lda (LYRICSL),Y ; load value lda (LYRICSL),Y ; load value
beq done_lyric ; if 0, done lyric beq done_lyric ; if 0, done lyric

View File

@ -88,7 +88,8 @@ ending:
lda #$20 lda #$20
sta HGR_PAGE sta HGR_PAGE
bit TEXTGR ; mixed text/graphics bit TEXTGR ; mixed text/graphics
bit HIRES ; hires mode bit HIRES ; hires mode !!!
; !!!! trouble when we use 80 col later
bit SET_GR ; graphics mode bit SET_GR ; graphics mode

View File

@ -61,10 +61,14 @@ unpack_ending:
; Unpack the music right after previous ; Unpack the music right after previous
;===================================== ;=====================================
lda USEMB
beq load_ed_music
;===================================== ;=====================================
; MB SA.KR4 from 367D to 58ff ; MB SA.KR4 from 367D to 58ff
;===================================== ;=====================================
load_mb_music:
lda #<music_mb lda #<music_mb
sta LZ4_SRC sta LZ4_SRC
lda #>music_mb lda #>music_mb
@ -75,16 +79,29 @@ unpack_ending:
lda #>music_mb_end lda #>music_mb_end
sta LZ4_END+1 sta LZ4_END+1
; lda #<UNPACK_ALIVE jmp decode_music
; sta LZ4_DST
; lda #>UNPACK_ALIVE ; original unpacked data offset
; sta LZ4_DST+1
;=====================================
; ED SA.ED from 367D to ????
;=====================================
load_ed_music:
lda #<music_ed
sta LZ4_SRC
lda #>music_ed
sta LZ4_SRC+1
lda #<music_ed_end
sta LZ4_END
lda #>music_ed_end
sta LZ4_END+1
decode_music:
; LZ4_DST should already be set to where STILL_ALIVE finished
jsr lz4_decode jsr lz4_decode
;============================== ;==============================
; Run still alive ; Run still alive
;============================== ;==============================

View File

@ -35,7 +35,7 @@ still_alive_ed:
jsr play_ed jsr play_ed
;================== ;==================
; loop forever ; return
;================== ;==================
rts rts

View File

@ -7,6 +7,7 @@ still_alive:
;============================= ;=============================
; Clear screen ; Clear screen
;============================= ;=============================
bit LORES ; needed or 80 column card has issues??
jsr HOME jsr HOME
jsr TEXT jsr TEXT