1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-12-27 01:31:42 +00:00

Corrects deserialisation order in double low res mode.

This commit is contained in:
Thomas Harte 2018-08-11 22:53:06 -04:00
parent 7374c665e8
commit 434d184503

View File

@ -332,13 +332,13 @@ template <class BusHandler, bool is_iie> class Video: public VideoBase {
case GraphicsMode::DoubleLowRes: { case GraphicsMode::DoubleLowRes: {
const int row_shift = (row_&4); const int row_shift = (row_&4);
for(int c = column_; c < pixel_end; ++c) { for(int c = column_; c < pixel_end; ++c) {
const uint16_t nibble = (bus_handler_.perform_aux_read(static_cast<uint16_t>(text_address + c)) >> row_shift) & 0xf0f; const uint16_t nibble = bus_handler_.perform_aux_read(static_cast<uint16_t>(text_address + c)) >> row_shift;
if(c&1) { if(c&1) {
pixel_pointer_[0] = pixel_pointer_[4] = (nibble >> 8) & 4; pixel_pointer_[0] = pixel_pointer_[4] = (nibble >> 8) & 2;
pixel_pointer_[1] = pixel_pointer_[5] = (nibble >> 8) & 8; pixel_pointer_[1] = pixel_pointer_[5] = (nibble >> 8) & 4;
pixel_pointer_[2] = pixel_pointer_[6] = (nibble >> 8) & 1; pixel_pointer_[2] = pixel_pointer_[6] = (nibble >> 8) & 8;
pixel_pointer_[3] = (nibble >> 8) & 2; pixel_pointer_[3] = (nibble >> 8) & 1;
pixel_pointer_[8] = pixel_pointer_[12] = nibble & 4; pixel_pointer_[8] = pixel_pointer_[12] = nibble & 4;
pixel_pointer_[9] = pixel_pointer_[13] = nibble & 8; pixel_pointer_[9] = pixel_pointer_[13] = nibble & 8;
@ -346,10 +346,10 @@ template <class BusHandler, bool is_iie> class Video: public VideoBase {
pixel_pointer_[7] = pixel_pointer_[11] = nibble & 2; pixel_pointer_[7] = pixel_pointer_[11] = nibble & 2;
graphics_carry_ = nibble & 8; graphics_carry_ = nibble & 8;
} else { } else {
pixel_pointer_[0] = pixel_pointer_[4] = (nibble >> 8) & 1; pixel_pointer_[0] = pixel_pointer_[4] = (nibble >> 8) & 8;
pixel_pointer_[1] = pixel_pointer_[5] = (nibble >> 8) & 2; pixel_pointer_[1] = pixel_pointer_[5] = (nibble >> 8) & 1;
pixel_pointer_[2] = pixel_pointer_[6] = (nibble >> 8) & 4; pixel_pointer_[2] = pixel_pointer_[6] = (nibble >> 8) & 2;
pixel_pointer_[3] = (nibble >> 8) & 8; pixel_pointer_[3] = (nibble >> 8) & 4;
pixel_pointer_[8] = pixel_pointer_[12] = nibble & 1; pixel_pointer_[8] = pixel_pointer_[12] = nibble & 1;
pixel_pointer_[9] = pixel_pointer_[13] = nibble & 2; pixel_pointer_[9] = pixel_pointer_[13] = nibble & 2;