Skip to content

Commit

Permalink
c64: presets
Browse files Browse the repository at this point in the history
  • Loading branch information
sehugg committed Dec 25, 2023
1 parent 45bc17d commit 8023d56
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
11 changes: 7 additions & 4 deletions presets/c64/multisprite.ca65
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -31,7 +34,7 @@ _msprite_render_section:
adc #MIN_Y_SPACING
sta bailout_line
@loop:
.ifdef DEBUG
.if DEBUG
inc $d020
.endif
lda $d012
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
7 changes: 4 additions & 3 deletions presets/c64/musicplayer.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++;
Expand Down Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion test/cli/testworker.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'));
Expand Down

0 comments on commit 8023d56

Please sign in to comment.