1
0
mirror of https://github.com/sehugg/8bitworkshop.git synced 2024-11-21 23:30:58 +00:00
8bitworkshop/presets/c64/common.c

27 lines
422 B
C

#include "common.h"
void raster_wait(byte line) {
while (VIC.rasterline < line) ;
}
static byte VIC_BANK_PAGE[4] = {
0xc0, 0x80, 0x40, 0x00
};
char* get_vic_bank_start() {
return (char*)(VIC_BANK_PAGE[CIA2.pra & 3] << 8);
}
char* get_screen_memory() {
return ((VIC.addr & 0xf0) << 6) + get_vic_bank_start();
}
#ifdef __CC65__
char __fastcall__ poll_keyboard() {
asm("jmp $f142");
return __A__;
}
#endif