mirror of
https://github.com/TomHarte/CLK.git
synced 2025-02-19 23:29:05 +00:00
For now, at least, c800–cfff is always built-in ROM.
Otherwise I probably need to extend my c3 logic to cover the other built-in cards (?)
This commit is contained in:
parent
96cf617ee6
commit
34794223b4
@ -385,27 +385,35 @@ class ConcreteMachine:
|
|||||||
|
|
||||||
// The audio GLU.
|
// The audio GLU.
|
||||||
case Read(0xc03c):
|
case Read(0xc03c):
|
||||||
|
update_audio();
|
||||||
*value = sound_glu_.get_control();
|
*value = sound_glu_.get_control();
|
||||||
break;
|
break;
|
||||||
case Write(0xc03c):
|
case Write(0xc03c):
|
||||||
|
update_audio();
|
||||||
sound_glu_.set_control(*value);
|
sound_glu_.set_control(*value);
|
||||||
break;
|
break;
|
||||||
case Read(0xc03d):
|
case Read(0xc03d):
|
||||||
|
update_audio();
|
||||||
*value = sound_glu_.get_data();
|
*value = sound_glu_.get_data();
|
||||||
break;
|
break;
|
||||||
case Write(0xc03d):
|
case Write(0xc03d):
|
||||||
|
update_audio();
|
||||||
sound_glu_.set_data(*value);
|
sound_glu_.set_data(*value);
|
||||||
break;
|
break;
|
||||||
case Read(0xc03e):
|
case Read(0xc03e):
|
||||||
|
update_audio();
|
||||||
*value = sound_glu_.get_address_low();
|
*value = sound_glu_.get_address_low();
|
||||||
break;
|
break;
|
||||||
case Write(0xc03e):
|
case Write(0xc03e):
|
||||||
|
update_audio();
|
||||||
sound_glu_.set_address_low(*value);
|
sound_glu_.set_address_low(*value);
|
||||||
break;
|
break;
|
||||||
case Read(0xc03f):
|
case Read(0xc03f):
|
||||||
|
update_audio();
|
||||||
*value = sound_glu_.get_address_high();
|
*value = sound_glu_.get_address_high();
|
||||||
break;
|
break;
|
||||||
case Write(0xc03f):
|
case Write(0xc03f):
|
||||||
|
update_audio();
|
||||||
sound_glu_.set_address_high(*value);
|
sound_glu_.set_address_high(*value);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -588,6 +596,14 @@ class ConcreteMachine:
|
|||||||
#undef Read
|
#undef Read
|
||||||
#undef Write
|
#undef Write
|
||||||
} else {
|
} else {
|
||||||
|
// Access the internal ROM.
|
||||||
|
//
|
||||||
|
// TODO: should probably occur only if there was a preceding access to a built-in
|
||||||
|
// card ROM?
|
||||||
|
if(is_read) {
|
||||||
|
*value = rom_[rom_.size() - 65536 + address_suffix];
|
||||||
|
}
|
||||||
|
|
||||||
if(address_suffix < 0xc080) {
|
if(address_suffix < 0xc080) {
|
||||||
// TODO: all other IO accesses.
|
// TODO: all other IO accesses.
|
||||||
printf("Unhandled IO %s: %04x\n", is_read ? "read" : "write", address_suffix);
|
printf("Unhandled IO %s: %04x\n", is_read ? "read" : "write", address_suffix);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user