1
0
mirror of https://github.com/sehugg/8bitworkshop.git synced 2025-02-19 07:30:55 +00:00

27 lines
422 B
C
Raw Normal View History

2020-02-02 12:17:31 -06:00
#include "common.h"
2022-08-09 09:47:55 -05:00
void raster_wait(byte line) {
2020-02-02 12:17:31 -06:00
while (VIC.rasterline < line) ;
}
2022-08-09 09:47:55 -05:00
static byte VIC_BANK_PAGE[4] = {
0xc0, 0x80, 0x40, 0x00
};
2022-08-11 15:27:20 -05:00
char* get_vic_bank_start() {
2022-08-09 09:47:55 -05:00
return (char*)(VIC_BANK_PAGE[CIA2.pra & 3] << 8);
}
2022-08-11 15:27:20 -05:00
char* get_screen_memory() {
return ((VIC.addr & 0xf0) << 6) + get_vic_bank_start();
}
#ifdef __CC65__
2022-08-11 15:27:20 -05:00
char __fastcall__ poll_keyboard() {
asm("jmp $f142");
return __A__;
}
#endif
2022-08-11 15:27:20 -05:00