mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-23 03:32:32 +00:00
Added a potential branch for the newer TOS memory map.
This commit is contained in:
parent
eae11cbf17
commit
ecc0cea5a1
@ -10,6 +10,7 @@
|
|||||||
|
|
||||||
#include "../CRTMachine.hpp"
|
#include "../CRTMachine.hpp"
|
||||||
|
|
||||||
|
//#define LOG_TRACE
|
||||||
#include "../../Processors/68000/68000.hpp"
|
#include "../../Processors/68000/68000.hpp"
|
||||||
|
|
||||||
#include "../../Components/AY38910/AY38910.hpp"
|
#include "../../Components/AY38910/AY38910.hpp"
|
||||||
@ -250,12 +251,16 @@ class ConcreteMachine:
|
|||||||
memory_map_[0] = BusDevice::MostlyRAM;
|
memory_map_[0] = BusDevice::MostlyRAM;
|
||||||
int c = 1;
|
int c = 1;
|
||||||
for(; c < 0x08; ++c) memory_map_[c] = BusDevice::RAM;
|
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_[0xfa] = memory_map_[0xfb] = BusDevice::Cartridge;
|
||||||
|
|
||||||
memory_map_[0xff] = BusDevice::IO;
|
memory_map_[0xff] = BusDevice::IO;
|
||||||
|
|
||||||
midi_acia_->set_interrupt_delegate(this);
|
midi_acia_->set_interrupt_delegate(this);
|
||||||
@ -356,7 +361,7 @@ class ConcreteMachine:
|
|||||||
case BusDevice::IO:
|
case BusDevice::IO:
|
||||||
switch(address) {
|
switch(address) {
|
||||||
default:
|
default:
|
||||||
assert(false);
|
// assert(false);
|
||||||
|
|
||||||
case 0x7fc000:
|
case 0x7fc000:
|
||||||
/* Memory controller configuration:
|
/* Memory controller configuration:
|
||||||
|
@ -70,7 +70,7 @@ template <class T, bool dtack_is_implicit, bool signal_will_perform> void Proces
|
|||||||
const HalfCycles remaining_duration = duration + half_cycles_left_to_run_;
|
const HalfCycles remaining_duration = duration + half_cycles_left_to_run_;
|
||||||
|
|
||||||
#ifdef LOG_TRACE
|
#ifdef LOG_TRACE
|
||||||
static bool should_log = false;
|
static bool should_log = true;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// This loop counts upwards rather than downwards because it simplifies calculation of
|
// This loop counts upwards rather than downwards because it simplifies calculation of
|
||||||
@ -310,7 +310,7 @@ template <class T, bool dtack_is_implicit, bool signal_will_perform> void Proces
|
|||||||
const uint32_t fetched_pc = (program_counter_.full - 4)&0xffffff;
|
const uint32_t fetched_pc = (program_counter_.full - 4)&0xffffff;
|
||||||
|
|
||||||
// should_log |= fetched_pc == 0x6d9c;
|
// 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 == 0x4012A2;
|
||||||
// should_log &= fetched_pc != 0x4012AE;
|
// should_log &= fetched_pc != 0x4012AE;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user