From 34e13d0d4dc13624f5326158e9e05697627352f5 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Thu, 18 Oct 2018 21:05:58 -0400 Subject: [PATCH] Clears top bit when reading the keypad and ensures no undefined behaviour reading the cartridge. --- Machines/ColecoVision/ColecoVision.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Machines/ColecoVision/ColecoVision.cpp b/Machines/ColecoVision/ColecoVision.cpp index 1b0958817..a690bf3d4 100644 --- a/Machines/ColecoVision/ColecoVision.cpp +++ b/Machines/ColecoVision/ColecoVision.cpp @@ -100,7 +100,7 @@ class Joystick: public Inputs::ConcreteJoystick { private: uint8_t direction_ = 0xff; - uint8_t keypad_ = 0xff; + uint8_t keypad_ = 0x7f; }; class ConcreteMachine: @@ -145,6 +145,7 @@ class ConcreteMachine: cartridge_pages_[1] = cartridge_.data(); is_megacart_ = true; } else { + cartridge_.resize(32768); cartridge_pages_[0] = cartridge_.data(); cartridge_pages_[1] = cartridge_.data() + 16384; is_megacart_ = false;