From 6123349b794418b27979da3607619ba980e95480 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Thu, 22 Jul 2021 19:28:01 -0400 Subject: [PATCH] Stubs in control registers and disables exit-on-miss. I think I may be running up against the limits of stubbing now. Probably time to implement some stuff. --- .../6526/Implementation/6526Implementation.hpp | 13 +++++++++++-- Components/6526/Implementation/6526Storage.hpp | 1 + 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/Components/6526/Implementation/6526Implementation.hpp b/Components/6526/Implementation/6526Implementation.hpp index 55c7aa7d6..5ba277930 100644 --- a/Components/6526/Implementation/6526Implementation.hpp +++ b/Components/6526/Implementation/6526Implementation.hpp @@ -61,9 +61,16 @@ void MOS6526::write(int address, uint8_t value) { update_interrupts(); break; + // Control. + case 14: + case 15: + registers_.control[address - 14] = value; + printf("Ignoring control write: %02x to %d\n", value, address); + break; + default: printf("Unhandled 6526 write: %02x to %d\n", value, address); - assert(false); +// assert(false); break; } } @@ -79,10 +86,12 @@ uint8_t MOS6526::read(int address) { case 2: case 3: return registers_.data_direction[address - 2]; + case 14: case 15: + return registers_.control[address - 14]; default: printf("Unhandled 6526 read from %d\n", address); - assert(false); +// assert(false); break; } return 0xff; diff --git a/Components/6526/Implementation/6526Storage.hpp b/Components/6526/Implementation/6526Storage.hpp index 1c9c74d36..2a96e0406 100644 --- a/Components/6526/Implementation/6526Storage.hpp +++ b/Components/6526/Implementation/6526Storage.hpp @@ -18,6 +18,7 @@ struct MOS6526Storage { uint8_t output[2] = {0, 0}; uint8_t data_direction[2] = {0, 0}; uint8_t interrupt_control_ = 0; + uint8_t control[2] = {0, 0}; } registers_; };