1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-07-03 11:30:02 +00:00

Corrects address generation, ink/paper selection.

Seemingly to give a correct +2a boot. Time to add a keyboard and find out, I guess.
This commit is contained in:
Thomas Harte 2021-03-18 23:30:48 -04:00
parent ed587a4db5
commit 44240773ef

View File

@ -126,7 +126,7 @@ template <VideoTiming timing> class Video {
pixel_target_ = crt_.begin_data(256);
attribute_address_ = ((pixel_line / 8) * 32) + 6144;
pixel_address_ = ((pixel_line & 0x07) << 8) | ((pixel_line&0x38) << 2) | ((pixel_line&0xc0) << 3);
pixel_address_ = ((pixel_line & 0x07) << 8) | ((pixel_line&0x38) << 2) | ((pixel_line&0xc0) << 5);
}
if(pixel_target_) {
@ -139,8 +139,8 @@ template <VideoTiming timing> class Video {
const uint8_t pixels = memory_[pixel_address_] ^ masks[flash_mask_ & (attributes >> 7)];
const uint8_t colours[2] = {
palette[((attributes & 0x40) >> 3) | (attributes & 0x07)],
palette[(attributes & 0x78) >> 3],
palette[((attributes & 0x40) >> 3) | (attributes & 0x07)],
};
pixel_target_[0] = colours[(pixels >> 7) & 1];