From 8b09b4180bc8d5aa51ea2da41283f606c3a3d645 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Mon, 12 Jun 2017 21:33:16 -0400 Subject: [PATCH] This now at least remembers whether it is meant to be a ZX81 and has storage for a horizontal counter. --- Machines/ZX8081/ZX8081.cpp | 5 ++--- Machines/ZX8081/ZX8081.hpp | 3 +++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Machines/ZX8081/ZX8081.cpp b/Machines/ZX8081/ZX8081.cpp index 4fc60c433..550d21b69 100644 --- a/Machines/ZX8081/ZX8081.cpp +++ b/Machines/ZX8081/ZX8081.cpp @@ -142,9 +142,8 @@ void Machine::run_for_cycles(int number_of_cycles) { } void Machine::configure_as_target(const StaticAnalyser::Target &target) { - // TODO: pay attention to the target; it can't currently specify a ZX81 - // so assume a ZX80 if we got here. - if(target.zx8081.isZX81) { + is_zx81_ = target.zx8081.isZX81; + if(is_zx81_) { rom_ = zx81_rom_; tape_trap_address_ = 0x37c; tape_return_address_ = 0x380; diff --git a/Machines/ZX8081/ZX8081.hpp b/Machines/ZX8081/ZX8081.hpp index 9f94580ee..c921fd79a 100644 --- a/Machines/ZX8081/ZX8081.hpp +++ b/Machines/ZX8081/ZX8081.hpp @@ -84,6 +84,9 @@ class Machine: Storage::Tape::BinaryTapePlayer tape_player_; Storage::Tape::ZX8081::Parser parser_; + + int horizontal_counter_; + bool is_zx81_; }; }