1
0
mirror of https://github.com/sehugg/8bitworkshop.git synced 2024-11-21 07:33:14 +00:00

c64: presets

This commit is contained in:
Steven Hugg 2023-12-25 10:19:49 -05:00
parent 45bc17d7ee
commit 8023d56b88
3 changed files with 12 additions and 8 deletions

View File

@ -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

View File

@ -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();

View File

@ -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'));