From ecc0cea5a1616704731bc301b480e4284ee39252 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Sat, 26 Oct 2019 16:52:06 -0400 Subject: [PATCH] Added a potential branch for the newer TOS memory map. --- Machines/AtariST/AtariST.cpp | 15 ++++++++++----- .../68000/Implementation/68000Implementation.hpp | 4 ++-- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/Machines/AtariST/AtariST.cpp b/Machines/AtariST/AtariST.cpp index f42d10365..0cb34e042 100644 --- a/Machines/AtariST/AtariST.cpp +++ b/Machines/AtariST/AtariST.cpp @@ -10,6 +10,7 @@ #include "../CRTMachine.hpp" +//#define LOG_TRACE #include "../../Processors/68000/68000.hpp" #include "../../Components/AY38910/AY38910.hpp" @@ -250,12 +251,16 @@ class ConcreteMachine: memory_map_[0] = BusDevice::MostlyRAM; int c = 1; for(; c < 0x08; ++c) memory_map_[c] = BusDevice::RAM; + for(; c < 0xff; ++c) memory_map_[c] = BusDevice::Unassigned; + + const bool is_early_tos = true; + if(is_early_tos) { + for(c = 0xfc; c < 0xff; ++c) memory_map_[c] = BusDevice::ROM; + } else { + for(c = 0xe0; c < 0xe4; ++c) memory_map_[c] = BusDevice::ROM; + } - // This is appropriate for: TOS 1.x, no cartridge. - for(; c < 0xfc; ++c) memory_map_[c] = BusDevice::Unassigned; - for(; c < 0xff; ++c) memory_map_[c] = BusDevice::ROM; memory_map_[0xfa] = memory_map_[0xfb] = BusDevice::Cartridge; - memory_map_[0xff] = BusDevice::IO; midi_acia_->set_interrupt_delegate(this); @@ -356,7 +361,7 @@ class ConcreteMachine: case BusDevice::IO: switch(address) { default: - assert(false); +// assert(false); case 0x7fc000: /* Memory controller configuration: diff --git a/Processors/68000/Implementation/68000Implementation.hpp b/Processors/68000/Implementation/68000Implementation.hpp index 9c8072734..14b1d2fde 100644 --- a/Processors/68000/Implementation/68000Implementation.hpp +++ b/Processors/68000/Implementation/68000Implementation.hpp @@ -70,7 +70,7 @@ template void Proces const HalfCycles remaining_duration = duration + half_cycles_left_to_run_; #ifdef LOG_TRACE - static bool should_log = false; + static bool should_log = true; #endif // This loop counts upwards rather than downwards because it simplifies calculation of @@ -310,7 +310,7 @@ template void Proces const uint32_t fetched_pc = (program_counter_.full - 4)&0xffffff; // should_log |= fetched_pc == 0x6d9c; - should_log = (fetched_pc >= 0x41806A && fetched_pc <= 0x418618); +// should_log = (fetched_pc >= 0x41806A && fetched_pc <= 0x418618); // should_log |= fetched_pc == 0x4012A2; // should_log &= fetched_pc != 0x4012AE;