2 frames, wrong palette on 2nd, no audio

This commit is contained in:
Brooke Vibber 2022-12-07 18:37:32 -08:00
parent 454fa8ab50
commit 589ccdc7f1
2 changed files with 46 additions and 46 deletions

View file

@ -692,6 +692,7 @@ function genAssembly(width, height, nbits, lines, reps) {
.export frame2_palette1 .export frame2_palette1
.export frame2_palette2 .export frame2_palette2
.export frame2_palette3 .export frame2_palette3
.export displaylist
.segment "BUFFERS" .segment "BUFFERS"
@ -737,6 +738,50 @@ ${byte2byte(frames[1].palette3)}
frame2_bottom: frame2_bottom:
${byte2byte(frames[1].bitmap.slice(half))} ${byte2byte(frames[1].bitmap.slice(half))}
.align 1024
displaylist:
; 40 lines overscan
.repeat 5
.byte $70 ; 8 blank lines
.endrep
; 160 lines graphics
; ANTIC mode e (160px 2bpp, 1 scan line per line)
.byte $4e
.addr frame1_top
.repeat ${linesEach / 2 - 1}
.byte $0e
.endrep
.byte $4e
.addr frame1_bottom
.repeat ${linesEach / 2 - 1}
.byte $0e
.endrep
.byte $41 ; jump and blank
.addr displaylist_part2
displaylist_part2:
; 40 lines overscan
.repeat 5
.byte $70 ; 8 blank lines
.endrep
; 160 lines graphics
; ANTIC mode e (160px 2bpp, 1 scan line per line)
.byte $4e
.addr frame2_top
.repeat ${linesEach / 2 - 1}
.byte $0e
.endrep
.byte $4e
.addr frame2_bottom
.repeat ${linesEach / 2 - 1}
.byte $0e
.endrep
.byte $41 ; jump and blank
.addr displaylist
`; `;
} }

View file

@ -48,52 +48,7 @@ scanline_max = (lines_per_frame - scanline_offset) / 2
.import frame2_palette1 .import frame2_palette1
.import frame2_palette2 .import frame2_palette2
.import frame2_palette3 .import frame2_palette3
.import displaylist
displaylist:
; 40 lines overscan
.repeat 5
.byte $70 ; 8 blank lines
.endrep
; 160 lines graphics
; ANTIC mode e (160px 2bpp, 1 scan line per line)
.byte $4e
.addr frame1_top
.repeat height / 2 - 1
.byte $0e
.endrep
.byte $4e
.addr frame1_bottom
.repeat height / 2 - 1
.byte $0e
.endrep
.byte $41 ; jump and blank
.addr displaylist
;fixme use
displaylist_part2:
; 40 lines overscan
.repeat 5
.byte $70 ; 8 blank lines
.endrep
; 160 lines graphics
; ANTIC mode e (160px 2bpp, 1 scan line per line)
.byte $4e
.addr frame2_top
.repeat height / 2 - 1
.byte $0e
.endrep
.byte $4e
.addr frame2_bottom
.repeat height / 2 - 1
.byte $0e
.endrep
.byte $41 ; jump and blank
.addr displaylist
audio_high_byte: audio_high_byte:
.scope .scope