mirror of
https://github.com/TomHarte/CLK.git
synced 2025-02-21 05:29:13 +00:00
Force high unwriteable bytes.
This commit is contained in:
parent
7f8e90bd29
commit
9feb75e645
@ -32,7 +32,7 @@ public:
|
||||
};
|
||||
|
||||
uint8_t status() const {
|
||||
return status_ | ((status_ & mask_) ? 0x80 : 0x00);
|
||||
return status_ | ((status_ & mask_) ? 0x80 : 0x00) | 0x21;
|
||||
}
|
||||
|
||||
uint8_t mask() const {
|
||||
|
@ -307,15 +307,17 @@ public:
|
||||
case 0xff07: *value = video_.read<0xff07>(); break;
|
||||
case 0xff08: *value = keyboard_latch_; break;
|
||||
case 0xff09: *value = interrupts_.status(); break;
|
||||
case 0xff0a: *value = interrupts_.mask(); break;
|
||||
case 0xff0a:
|
||||
*value = interrupts_.mask() | video_.read<0xff0a>() | 0x60;
|
||||
break;
|
||||
case 0xff0b: *value = video_.read<0xff0b>(); break;
|
||||
case 0xff0c: *value = video_.read<0xff0c>(); break;
|
||||
case 0xff0d: *value = video_.read<0xff0d>(); break;
|
||||
case 0xff0e: *value = ff0e_; break;
|
||||
case 0xff0f: *value = ff0f_; break;
|
||||
case 0xff10: *value = ff10_; break;
|
||||
case 0xff11: *value = ff11_; break;
|
||||
case 0xff12: *value = ff12_; break;
|
||||
case 0xff0e: *value = ff0e_; break;
|
||||
case 0xff0f: *value = ff0f_; break;
|
||||
case 0xff10: *value = ff10_ | 0xfc; break;
|
||||
case 0xff11: *value = ff11_; break;
|
||||
case 0xff12: *value = ff12_ | 0xc0; break;
|
||||
case 0xff13: *value = ff13_ | (rom_is_paged_ ? 1 : 0); break;
|
||||
case 0xff14: *value = video_.read<0xff14>(); break;
|
||||
case 0xff15: *value = video_.read<0xff15>(); break;
|
||||
|
@ -46,15 +46,16 @@ public:
|
||||
switch(address) {
|
||||
case 0xff06: return ff06_;
|
||||
case 0xff07: return ff07_;
|
||||
case 0xff0a: return (raster_interrupt_ >> 8) & 1;
|
||||
case 0xff0b: return uint8_t(raster_interrupt_);
|
||||
case 0xff0c: return cursor_position_ >> 8;
|
||||
case 0xff0c: return (cursor_position_ >> 8) | 0xfc;
|
||||
case 0xff0d: return uint8_t(cursor_position_);
|
||||
case 0xff14: return uint8_t((video_matrix_base_ >> 8) & 0xf8);
|
||||
case 0xff14: return uint8_t((video_matrix_base_ >> 8) & 0xf8) | 0x07;
|
||||
|
||||
case 0xff15: case 0xff16: case 0xff17: case 0xff18: case 0xff19:
|
||||
return raw_background_[size_t(address - 0xff15)];
|
||||
return 0x80 | raw_background_[size_t(address - 0xff15)];
|
||||
|
||||
case 0xff1a: return uint8_t(character_position_reload_ >> 8);
|
||||
case 0xff1a: return uint8_t(character_position_reload_ >> 8) | 0xfc;
|
||||
case 0xff1b: return uint8_t(character_position_reload_);
|
||||
case 0xff1c: return uint8_t(vertical_counter_ >> 8);
|
||||
case 0xff1d: return uint8_t(vertical_counter_);
|
||||
@ -63,7 +64,7 @@ public:
|
||||
return uint8_t(
|
||||
((flash_count_ & 0xf) << 3) |
|
||||
vertical_sub_count_
|
||||
);
|
||||
) | 0x80;
|
||||
}
|
||||
|
||||
return 0xff;
|
||||
|
Loading…
x
Reference in New Issue
Block a user