1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-12-23 20:29:42 +00:00

Experimentally flipping interpretation of the output bit gives something closer to coherent.

This commit is contained in:
Thomas Harte 2021-01-25 22:02:39 -05:00
parent c8beb59172
commit fc4bda0047
2 changed files with 9 additions and 9 deletions

View File

@ -68,7 +68,7 @@ uint8_t Executor::read(uint16_t address) {
// "Port R"; sixteen four-bit ports
case 0xd0: case 0xd1: case 0xd2: case 0xd3: case 0xd4: case 0xd5: case 0xd6: case 0xd7:
case 0xd8: case 0xd9: case 0xda: case 0xdb: case 0xdc: case 0xdd: case 0xde: case 0xdf:
printf("TODO: Port R [r %04x]\n", address);
// printf("TODO: Port R [r %04x]\n", address);
return 0xff;
// Ports P0P3.
@ -78,12 +78,12 @@ uint8_t Executor::read(uint16_t address) {
case 0xe1: case 0xe3:
case 0xe5: case 0xe9:
printf("TODO: Ports P0P3 direction [r %04x]\n", address);
// printf("TODO: Ports P0P3 direction [r %04x]\n", address);
return 0xff;
// Timers.
case 0xf9: case 0xfa: case 0xfb: case 0xfc: case 0xfd: case 0xfe: case 0xff:
printf("TODO: Timers [r %04x]\n", address);
// printf("TODO: Timers [r %04x]\n", address);
return 0xff;
}
}
@ -104,7 +104,7 @@ void Executor::write(uint16_t address, uint8_t value) {
// "Port R"; sixteen four-bit ports
case 0xd0: case 0xd1: case 0xd2: case 0xd3: case 0xd4: case 0xd5: case 0xd6: case 0xd7:
case 0xd8: case 0xd9: case 0xda: case 0xdb: case 0xdc: case 0xdd: case 0xde: case 0xdf:
printf("TODO: Port R [w %04x %02x]\n", address, value);
// printf("TODO: Port R [w %04x %02x]\n", address, value);
break;
// Ports P0P3.
@ -114,12 +114,12 @@ void Executor::write(uint16_t address, uint8_t value) {
case 0xe1: case 0xe3:
case 0xe5: case 0xe9:
printf("TODO: Ports P0P3 direction [w %04x %02x]\n", address, value);
// printf("TODO: Ports P0P3 direction [w %04x %02x]\n", address, value);
break;
// Timers.
case 0xf9: case 0xfa: case 0xfb: case 0xfc: case 0xfd: case 0xfe: case 0xff:
printf("TODO: Timers [w %04x %02x]\n", address, value);
// printf("TODO: Timers [w %04x %02x]\n", address, value);
break;
}
}

View File

@ -229,7 +229,7 @@ void GLU::set_port_output(int port, uint8_t value) {
ports_[port] = value;
switch(port) {
case 0:
printf("Set R%d: %02x\n", register_address_, value);
// printf("Set R%d: %02x\n", register_address_, value);
registers_[register_address_] = value;
break;
case 1:
@ -247,7 +247,7 @@ void GLU::set_port_output(int port, uint8_t value) {
// printf("IIe KWS: %d\n", (value >> 6)&3);
// printf("ADB data line output: %d\n", (value >> 3)&1);
const bool new_adb_level = value & 0x08;
const bool new_adb_level = !(value & 0x08);
if(new_adb_level != adb_level_) {
if(!new_adb_level) {
// Transition to low.
@ -278,7 +278,7 @@ void GLU::set_port_output(int port, uint8_t value) {
uint8_t GLU::get_port_input(int port) {
switch(port) {
case 0:
printf("Get R%d\n", register_address_);
// printf("Get R%d\n", register_address_);
return registers_[register_address_];
case 1:
// printf("IIe keyboard read\n");