mirror of
https://github.com/sehugg/8bitworkshop.git
synced 2024-11-21 07:33:14 +00:00
c64: presets
This commit is contained in:
parent
45bc17d7ee
commit
8023d56b88
@ -1,9 +1,12 @@
|
|||||||
|
|
||||||
|
VIC_BASE = $0
|
||||||
|
VIC_SCRN_BASE = VIC_BASE + $400
|
||||||
|
|
||||||
MAX_MSPRITES = 28
|
MAX_MSPRITES = 28
|
||||||
|
|
||||||
MIN_Y_SPACING = 35
|
MIN_Y_SPACING = 35
|
||||||
|
|
||||||
DEBUG = 1
|
DEBUG = 0
|
||||||
|
|
||||||
.code
|
.code
|
||||||
|
|
||||||
@ -31,7 +34,7 @@ _msprite_render_section:
|
|||||||
adc #MIN_Y_SPACING
|
adc #MIN_Y_SPACING
|
||||||
sta bailout_line
|
sta bailout_line
|
||||||
@loop:
|
@loop:
|
||||||
.ifdef DEBUG
|
.if DEBUG
|
||||||
inc $d020
|
inc $d020
|
||||||
.endif
|
.endif
|
||||||
lda $d012
|
lda $d012
|
||||||
@ -66,7 +69,7 @@ _msprite_render_section:
|
|||||||
sta $d027,x
|
sta $d027,x
|
||||||
; POKE(0x7f8+j, msprite_shape[i]);
|
; POKE(0x7f8+j, msprite_shape[i]);
|
||||||
lda _msprite_shape,y
|
lda _msprite_shape,y
|
||||||
sta $07f8,x
|
sta VIC_SCRN_BASE + $03f8,x
|
||||||
; set hi X bit
|
; set hi X bit
|
||||||
lda _msprite_x_hi,y
|
lda _msprite_x_hi,y
|
||||||
lsr
|
lsr
|
||||||
@ -83,7 +86,7 @@ _msprite_render_section:
|
|||||||
sta j ; next h/w sprite
|
sta j ; next h/w sprite
|
||||||
jmp @loop
|
jmp @loop
|
||||||
@loopexit:
|
@loopexit:
|
||||||
.ifdef DEBUG
|
.if DEBUG
|
||||||
lda #0
|
lda #0
|
||||||
sta $d020
|
sta $d020
|
||||||
.endif
|
.endif
|
||||||
|
@ -26,10 +26,9 @@ void sid_init() {
|
|||||||
|
|
||||||
byte music_index = 0;
|
byte music_index = 0;
|
||||||
byte cur_duration = 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 = 0;
|
||||||
const byte* music_ptr = music1;
|
|
||||||
|
|
||||||
byte next_music_byte() {
|
byte next_music_byte() {
|
||||||
return *music_ptr++;
|
return *music_ptr++;
|
||||||
@ -180,6 +179,8 @@ void setSIDRegisters() {
|
|||||||
music_wavebits = buf[0x04];
|
music_wavebits = buf[0x04];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const byte music1[]; // music data -- see end of file
|
||||||
|
|
||||||
char music_update() {
|
char music_update() {
|
||||||
if (!music_ptr) start_music(music1);
|
if (!music_ptr) start_music(music1);
|
||||||
play_music();
|
play_music();
|
||||||
|
@ -126,7 +126,7 @@ describe('Worker', function() {
|
|||||||
});
|
});
|
||||||
it('should compile galaxian skeleton', function(done) {
|
it('should compile galaxian skeleton', function(done) {
|
||||||
var csource = ab2str(fs.readFileSync('presets/galaxian-scramble/skeleton.sdcc'));
|
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) {
|
it('should compile vector skeleton', function(done) {
|
||||||
var csource = ab2str(fs.readFileSync('presets/vector-z80color/skeleton.sdcc'));
|
var csource = ab2str(fs.readFileSync('presets/vector-z80color/skeleton.sdcc'));
|
||||||
|
Loading…
Reference in New Issue
Block a user