mirror of
https://github.com/garrettsworkshop/GWRAM.SYSTEM.git
synced 2024-06-30 05:29:34 +00:00
Read apple key now in C, compiles to same instructions
This commit is contained in:
parent
1b18fa1c67
commit
d5c4fcc209
10
ram2e.c
10
ram2e.c
|
@ -8,13 +8,9 @@
|
||||||
#define true 1
|
#define true 1
|
||||||
#define false 0
|
#define false 0
|
||||||
|
|
||||||
static char read_applekey(void) {
|
#define PB0 ((char*)0xC061)
|
||||||
/*__asm__("lda $C061");
|
#define PB1 ((char*)0xC062)
|
||||||
__asm__("ora $C062");
|
static char read_applekey(void) { return (*PB0 | *PB1) & 0x80; }
|
||||||
__asm__("and #$80");
|
|
||||||
__asm__("ldx #0");*/
|
|
||||||
return (*((char*)0xC061) | *((char*)0xC062)) & 0x80;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void ram2e_cmd(char operation, char data) {
|
static void ram2e_cmd(char operation, char data) {
|
||||||
// Load operation and data bytes into X and Y registers
|
// Load operation and data bytes into X and Y registers
|
||||||
|
|
Loading…
Reference in New Issue
Block a user