astrocade presets

This commit is contained in:
Steven Hugg 2019-07-06 13:41:15 -05:00
parent 9d35615bc4
commit 25a9c16704
5 changed files with 39 additions and 6 deletions

View File

@ -159,6 +159,10 @@ TODO:
- make sure to flatten subdirs
- astrocade
- ctrl+alt+l on ubuntu locks screen
- cookie
- list of stuff for policy
- popup
WEB WORKER FORMAT

View File

@ -3,4 +3,6 @@
extern void fast_sprite_8(const byte* pattern, byte* dst);
extern void fast_sprite_16(const byte* pattern, byte* dst);
// clips off bottom
extern void fast_sprite_16_yclip(const byte* pattern, byte* dst, byte height);

View File

@ -44,14 +44,15 @@ _fast_sprite_16:
add ix,sp ; IX = arg pointer
ld l,4(ix) ; src (HL)
ld h,5(ix)
ld e,6(ix) ; dst (DE)
ld d,7(ix)
inc hl ; skip width
ld c,(hl) ; load height -> C
fast_sprite_16_clip_entry:
sla c
sla c ; C *= 4
ld b,#0 ; B always 0 (BC < 256)
inc hl ; move HL to pattern start
ld e,6(ix) ; dst (DE)
ld d,7(ix)
001$:
ldi
ldi
@ -69,3 +70,15 @@ _fast_sprite_16:
002$:
pop ix
ret
;void fast_sprite_16_yclip(const byte* src, byte* dst, byte height) {
.globl _fast_sprite_16_yclip
_fast_sprite_16_yclip:
push ix
ld ix,#0
add ix,sp ; IX = arg pointer
ld l,4(ix) ; src (HL)
ld h,5(ix)
ld c,8(ix) ; height (C)
inc hl ; skip width
jp fast_sprite_16_clip_entry

View File

@ -98,12 +98,28 @@ byte __at (0x0000) vmagic[VTOTAL][VBWIDTH];
// regular frame buffer RAM
byte __at (0x4000) vidmem[VTOTAL][VBWIDTH];
byte __at(0xfff) WASTER; // to soak up shifter residue
/// GRAPHICS FUNCTIONS
void set_palette(byte palette[8]) __z88dk_fastcall; // palette in reverse order
#define SET_PALETTE(palette)\
__asm__("ld hl,#"#palette);\
__asm__("ld bc,#0x80b");\
__asm__("otir");\
#define SET_RIGHT_PALETTE(palette)\
__asm__("ld hl,#"#palette);\
__asm__("ld bc,#0x40b");\
__asm__("otir");\
/// SOUND FUNCTIONS
void set_sound_registers(byte regs[8]) __z88dk_fastcall; // in reverse too
// INTERRUPTS
/// INTERRUPTS
typedef void (*t_interrupt_handler)(void) __interrupt;

View File

@ -220,8 +220,6 @@ byte get1z(byte x) __z88dk_fastcall {
#define PAT_SKY 0x55
#define PAT_GROUND 0xaa
byte __at(0xfff) WASTER; // to soak up shifter residue
byte road_width = 142;
byte road_cenx = 80;
int road_inc = 0;
@ -427,7 +425,7 @@ void position_cars() {
void main(void) {
// setup palette
set_palette(palette);`
set_palette(palette);
// set screen height
// set horizontal color split (position / 4)
// set interrupt status