1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-25 16:31:42 +00:00

Adds just enough input logic that the Sega sound now plays.

This commit is contained in:
Thomas Harte 2018-09-23 16:05:37 -04:00
parent 9683c8f664
commit f59386f523

View File

@ -105,6 +105,34 @@ class ConcreteMachine:
case CPU::Z80::PartialMachineCycle::Input:
printf("Input %04x\n", address);
*cycle.value = 0xff;
switch(address & 0xc1) {
case 0x00:
printf("TODO: memory control\n");
break;
case 0x01:
printf("TODO: I/O port control\n");
break;
case 0x40: case 0x41:
printf("TODO: get current line\n");
break;
case 0x80: case 0x81:
update_video();
*cycle.value = vdp_->get_register(address);
z80_.set_interrupt_line(vdp_->get_interrupt_line());
time_until_interrupt_ = vdp_->get_time_until_interrupt();
break;
case 0xc0:
printf("TODO: I/O port A/N\n");
break;
case 0xc1:
printf("TODO: I/O port B/misc\n");
break;
default:
printf("Clearly some sort of typo\n");
break;
}
break;
case CPU::Z80::PartialMachineCycle::Output: