From ca42abab70b61c7b3fa722296ef3ad7376edbdcf Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Tue, 1 Aug 2017 07:56:44 -0400 Subject: [PATCH] Doubled up to ensure that every byte that should be inspected is represented. This makes it clearer that I'm on the right road. A garbled version of 'Amstrad 64k Microcomputer' can be discerned, in a weird grayscale and with the right-hand column missing and skewed output as a result. --- Machines/AmstradCPC/AmstradCPC.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Machines/AmstradCPC/AmstradCPC.cpp b/Machines/AmstradCPC/AmstradCPC.cpp index 1d065b697..994edfd4a 100644 --- a/Machines/AmstradCPC/AmstradCPC.cpp +++ b/Machines/AmstradCPC/AmstradCPC.cpp @@ -43,11 +43,13 @@ struct CRTCBusHandler { ((state.refresh_address & 0x3000) << 2) ); - *pixel_pointer_++ = ram_[address]; + pixel_pointer_[0] = ram_[address]; + pixel_pointer_[1] = ram_[address+1]; + pixel_pointer_ += 2; // flush the current buffer if full if(pixel_pointer_ == pixel_data_ + 320) { - crt_->output_data(320, 16); + crt_->output_data(320, 8); pixel_pointer_ = pixel_data_ = nullptr; } } @@ -59,7 +61,7 @@ struct CRTCBusHandler { crt_->output_sync((unsigned int)(cycles_ * 16)); } else { if(was_enabled_) { - crt_->output_data((unsigned int)(cycles_ * 16), 16); + crt_->output_data((unsigned int)(cycles_ * 16), 8); pixel_pointer_ = pixel_data_ = nullptr; } else { uint8_t *colour_pointer = (uint8_t *)crt_->allocate_write_area(1);