mirror of
https://github.com/sehugg/8bitworkshop.git
synced 2025-02-23 18:29:02 +00:00
changed presets (HALT for wait_vsync)
This commit is contained in:
parent
6404bfb43c
commit
b366ffb1d1
@ -6,6 +6,7 @@
|
||||
|
||||
#include "common.h"
|
||||
//#link "common.c"
|
||||
//#link "fonts.s"
|
||||
|
||||
#define XOFS 12 // sprite horiz. offset
|
||||
|
||||
|
@ -6,12 +6,9 @@
|
||||
|
||||
#include "common.h"
|
||||
|
||||
volatile bool vint;
|
||||
volatile uint_fast8_t vint_counter;
|
||||
|
||||
void vint_handler(void)
|
||||
{
|
||||
vint = true;
|
||||
void vint_handler(void) {
|
||||
vint_counter++;
|
||||
}
|
||||
|
||||
@ -50,11 +47,6 @@ void putstring(byte x, byte y, const char* string) {
|
||||
}
|
||||
}
|
||||
|
||||
void wait_vsync() {
|
||||
vint = false;
|
||||
while (!vint) ;
|
||||
}
|
||||
|
||||
void delay(byte i) {
|
||||
while (i--) {
|
||||
wait_vsync();
|
||||
|
@ -26,6 +26,9 @@ typedef unsigned short word;
|
||||
#ifndef CV_SMS
|
||||
uintptr_t __at(0x6a) font_bitmap_a;
|
||||
uintptr_t __at(0x6c) font_bitmap_0;
|
||||
#else
|
||||
extern char font_bitmap_a[];
|
||||
extern char font_bitmap_0[];
|
||||
#endif
|
||||
|
||||
#define COLOR_FGBG(fg,bg) (((fg)<<4)|(bg))
|
||||
@ -36,6 +39,8 @@ uintptr_t __at(0x6c) font_bitmap_0;
|
||||
|
||||
#define CHAR(ch) (ch-LOCHAR)
|
||||
|
||||
#define wait_vsync() __asm__("halt")
|
||||
|
||||
extern volatile bool vint;
|
||||
extern volatile uint_fast8_t vint_counter;
|
||||
|
||||
@ -51,7 +56,6 @@ extern void clrscr();
|
||||
extern byte getchar(byte x, byte y);
|
||||
extern void putchar(byte x, byte y, byte attr);
|
||||
extern void putstring(byte x, byte y, const char* string);
|
||||
extern void wait_vsync();
|
||||
extern void delay(byte i);
|
||||
extern byte rndint(byte a, byte b);
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
|
||||
|
||||
.area _CODE
|
||||
.globl _font_bitmap_a
|
||||
.globl _font_bitmap_0
|
||||
|
@ -9,6 +9,7 @@ import { ColecoVision_PRESETS } from "./coleco";
|
||||
|
||||
// http://www.smspower.org/Development/Index
|
||||
// http://www.smspower.org/uploads/Development/sg1000.txt
|
||||
// http://www.smspower.org/uploads/Development/richard.txt
|
||||
|
||||
// TODO: merge w/ coleco
|
||||
export var SG1000_PRESETS = [
|
||||
|
Loading…
x
Reference in New Issue
Block a user