mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-22 12:33:29 +00:00
Interrupt enabling works the other way around I think, and both registers with only one bit defined should probably return '1' in all other places?
This commit is contained in:
parent
d5f9e0aa3b
commit
54246c8f1a
@ -44,7 +44,7 @@ void Microdisc::set_control_register(uint8_t control)
|
|||||||
set_is_double_density(!(control & 0x08));
|
set_is_double_density(!(control & 0x08));
|
||||||
|
|
||||||
// b0: IRQ enable
|
// b0: IRQ enable
|
||||||
irq_enable_ = !(control & 0x01);
|
irq_enable_ = !!(control & 0x01);
|
||||||
|
|
||||||
// b7: EPROM select (0 = select)
|
// b7: EPROM select (0 = select)
|
||||||
// b1: ROM disable (0 = disable)
|
// b1: ROM disable (0 = disable)
|
||||||
@ -63,10 +63,10 @@ bool Microdisc::get_interrupt_request_line()
|
|||||||
|
|
||||||
uint8_t Microdisc::get_interrupt_request_register()
|
uint8_t Microdisc::get_interrupt_request_register()
|
||||||
{
|
{
|
||||||
return get_interrupt_request_line() ? 0x00 : 0x80;
|
return 0x7f | (get_interrupt_request_line() ? 0x00 : 0x80);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t Microdisc::get_data_request_register()
|
uint8_t Microdisc::get_data_request_register()
|
||||||
{
|
{
|
||||||
return get_data_request_line() ? 0x00 : 0x80;
|
return 0x7f | (get_data_request_line() ? 0x00 : 0x80);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user