From 589ccdc7f18b949efd186fb0b7b56c7be80bc44d Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Wed, 7 Dec 2022 18:37:32 -0800 Subject: [PATCH] 2 frames, wrong palette on 2nd, no audio --- dither-image.js | 45 +++++++++++++++++++++++++++++++++++++++++++++ dither4.s | 47 +---------------------------------------------- 2 files changed, 46 insertions(+), 46 deletions(-) diff --git a/dither-image.js b/dither-image.js index d6898ce..7d110ac 100644 --- a/dither-image.js +++ b/dither-image.js @@ -692,6 +692,7 @@ function genAssembly(width, height, nbits, lines, reps) { .export frame2_palette1 .export frame2_palette2 .export frame2_palette3 +.export displaylist .segment "BUFFERS" @@ -737,6 +738,50 @@ ${byte2byte(frames[1].palette3)} frame2_bottom: ${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 `; } diff --git a/dither4.s b/dither4.s index a6e6360..b374d0b 100644 --- a/dither4.s +++ b/dither4.s @@ -48,52 +48,7 @@ scanline_max = (lines_per_frame - scanline_offset) / 2 .import frame2_palette1 .import frame2_palette2 .import frame2_palette3 - -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 - +.import displaylist audio_high_byte: .scope