1
0
mirror of https://github.com/sehugg/8bitworkshop.git synced 2024-06-03 04:29:33 +00:00

updated presets for new padding method

This commit is contained in:
Steven Hugg 2018-09-24 10:18:08 -04:00
parent d7d2437004
commit 780b232259
3 changed files with 17 additions and 23 deletions

View File

@ -67,6 +67,7 @@ TODO:
- verilog: when paused scope doesn't work - verilog: when paused scope doesn't work
- resize memory dump window - resize memory dump window
- C/asm formatter - C/asm formatter
- fix WebAudio (https://news.ycombinator.com/item?id=18066474)
WEB WORKER FORMAT WEB WORKER FORMAT

View File

@ -77,7 +77,7 @@ typedef enum {
void main(); void main();
void start() { void start() __naked {
__asm __asm
LD SP,#0x4800 LD SP,#0x4800
EI EI
@ -87,8 +87,17 @@ __asm
LD DE, #s__INITIALIZED LD DE, #s__INITIALIZED
LD HL, #s__INITIALIZER LD HL, #s__INITIALIZER
LDIR LDIR
JP _main
; padding to get to offset 0x66
.ds 0x66 - (. - _start)
__endasm; __endasm;
main(); }
volatile byte video_framecount; // actual framecount
// starts at address 0x66
void rst_66() __interrupt {
video_framecount++;
} }
const char __at (0x5000) palette[32] = {/*{pal:332,n:4}*/ const char __at (0x5000) palette[32] = {/*{pal:332,n:4}*/
@ -136,26 +145,10 @@ void clrscr() {
memset_safe(vram, BLANK, sizeof(vram)); memset_safe(vram, BLANK, sizeof(vram));
} }
volatile byte video_framecount; // actual framecount
void reset_video_framecount() __critical { void reset_video_framecount() __critical {
video_framecount = 0; video_framecount = 0;
} }
void _buffer() {
__asm
; padding to get to offset 0x66
ld ix,#0
ld ix,#0
ld ix,#0
nop
__endasm;
}
void rst_66() __interrupt {
video_framecount++;
}
byte getchar(byte x, byte y) { byte getchar(byte x, byte y) {
return vram[29-x][y]; return vram[29-x][y];
} }

View File

@ -1,4 +1,4 @@

#include <string.h> #include <string.h>
typedef unsigned char byte; typedef unsigned char byte;
@ -28,27 +28,27 @@ void scanline224() __interrupt;
void main(); void main();
// start routine @ 0x0 // start routine @ 0x0
// set stack pointer, enable interrupts // set stack pointer, enable interrupts
void start() { void start() __naked {
__asm __asm
LD SP,#0x2400 LD SP,#0x2400
EI EI
NOP NOP
JP _main
__endasm; __endasm;
main();
} }
// scanline 96 interrupt @ 0x8 // scanline 96 interrupt @ 0x8
// we don't have enough bytes to make this an interrupt // we don't have enough bytes to make this an interrupt
// because the next routine is at 0x10 // because the next routine is at 0x10
void _RST_8() { void _RST_8() __naked {
__asm __asm
NOP NOP
NOP NOP
NOP NOP
NOP NOP
NOP NOP
JP _scanline96
__endasm; __endasm;
scanline96();
} }
// scanline 224 interrupt @ 0x10 // scanline 224 interrupt @ 0x10