mirror of
https://github.com/dpeckett/arduino-appleii.git
synced 2024-06-02 22:41:29 +00:00
15 lines
306 B
C++
15 lines
306 B
C++
unsigned char softSwitch(unsigned short address) {
|
|
switch(address&0x00FF) {
|
|
case 0x00: // Keyboard Data
|
|
return keyboard_read();
|
|
case 0x10: // Keyboard Strobe
|
|
keyboard_strobe();
|
|
return 0xFF;
|
|
case 0x30: // Speaker toggle
|
|
speaker_toggle();
|
|
return 0xFF;
|
|
default:
|
|
return 0xFF;
|
|
}
|
|
}
|