diff --git a/presets/c64/multisprite.ca65 b/presets/c64/multisprite.ca65 index d75b7a3a..27ae541d 100644 --- a/presets/c64/multisprite.ca65 +++ b/presets/c64/multisprite.ca65 @@ -1,9 +1,12 @@ +VIC_BASE = $0 +VIC_SCRN_BASE = VIC_BASE + $400 + MAX_MSPRITES = 28 MIN_Y_SPACING = 35 -DEBUG = 1 +DEBUG = 0 .code @@ -31,7 +34,7 @@ _msprite_render_section: adc #MIN_Y_SPACING sta bailout_line @loop: -.ifdef DEBUG +.if DEBUG inc $d020 .endif lda $d012 @@ -66,7 +69,7 @@ _msprite_render_section: sta $d027,x ; POKE(0x7f8+j, msprite_shape[i]); lda _msprite_shape,y - sta $07f8,x + sta VIC_SCRN_BASE + $03f8,x ; set hi X bit lda _msprite_x_hi,y lsr @@ -83,7 +86,7 @@ _msprite_render_section: sta j ; next h/w sprite jmp @loop @loopexit: -.ifdef DEBUG +.if DEBUG lda #0 sta $d020 .endif diff --git a/presets/c64/musicplayer.c b/presets/c64/musicplayer.c index a713269b..a58e5aee 100644 --- a/presets/c64/musicplayer.c +++ b/presets/c64/musicplayer.c @@ -26,10 +26,9 @@ void sid_init() { byte music_index = 0; byte cur_duration = 0; -byte music_wavebits = 0; +byte music_wavebits = SID_SQUARE; -const byte music1[]; // music data -- see end of file -const byte* music_ptr = music1; +const byte* music_ptr = 0; byte next_music_byte() { return *music_ptr++; @@ -180,6 +179,8 @@ void setSIDRegisters() { music_wavebits = buf[0x04]; } +const byte music1[]; // music data -- see end of file + char music_update() { if (!music_ptr) start_music(music1); play_music(); diff --git a/test/cli/testworker.js b/test/cli/testworker.js index 0c501cb8..dd38f184 100644 --- a/test/cli/testworker.js +++ b/test/cli/testworker.js @@ -126,7 +126,7 @@ describe('Worker', function() { }); it('should compile galaxian skeleton', function(done) { var csource = ab2str(fs.readFileSync('presets/galaxian-scramble/skeleton.sdcc')); - compile('sdcc', csource, 'galaxian-scramble', done, 20512, 34, 0); + compile('sdcc', csource, 'galaxian-scramble', done, 20512, 28, 0); }); it('should compile vector skeleton', function(done) { var csource = ab2str(fs.readFileSync('presets/vector-z80color/skeleton.sdcc'));