mirror of
https://github.com/TomHarte/CLK.git
synced 2025-01-11 08:30:55 +00:00
Remove the 68000's Mk2 suffix.
This commit is contained in:
parent
e56db3c4e5
commit
809cd7bca9
@ -11,7 +11,7 @@
|
||||
#include "../../Activity/Source.hpp"
|
||||
#include "../MachineTypes.hpp"
|
||||
|
||||
#include "../../Processors/68000Mk2/68000Mk2.hpp"
|
||||
#include "../../Processors/68000/68000.hpp"
|
||||
|
||||
#include "../../Analyser/Static/Amiga/Target.hpp"
|
||||
|
||||
@ -41,7 +41,7 @@ namespace Amiga {
|
||||
|
||||
class ConcreteMachine:
|
||||
public Activity::Source,
|
||||
public CPU::MC68000Mk2::BusHandler,
|
||||
public CPU::MC68000::BusHandler,
|
||||
public MachineTypes::AudioProducer,
|
||||
public MachineTypes::JoystickMachine,
|
||||
public MachineTypes::MappedKeyboardMachine,
|
||||
@ -177,7 +177,7 @@ class ConcreteMachine:
|
||||
}
|
||||
|
||||
private:
|
||||
CPU::MC68000Mk2::Processor<ConcreteMachine, true, true> mc68000_;
|
||||
CPU::MC68000::Processor<ConcreteMachine, true, true> mc68000_;
|
||||
|
||||
// MARK: - Memory map.
|
||||
|
||||
|
@ -841,8 +841,8 @@ void Chipset::update_interrupts() {
|
||||
}
|
||||
}
|
||||
|
||||
void Chipset::perform(const CPU::MC68000Mk2::Microcycle &cycle) {
|
||||
using Microcycle = CPU::MC68000Mk2::Microcycle;
|
||||
void Chipset::perform(const CPU::MC68000::Microcycle &cycle) {
|
||||
using Microcycle = CPU::MC68000::Microcycle;
|
||||
|
||||
const uint32_t register_address = *cycle.address & ChipsetAddressMask;
|
||||
if(cycle.operation & Microcycle::Read) {
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include "../../ClockReceiver/JustInTime.hpp"
|
||||
#include "../../Components/6526/6526.hpp"
|
||||
#include "../../Outputs/CRT/CRT.hpp"
|
||||
#include "../../Processors/68000Mk2/68000Mk2.hpp"
|
||||
#include "../../Processors/68000/68000.hpp"
|
||||
#include "../../Storage/Disk/Controller/DiskController.hpp"
|
||||
#include "../../Storage/Disk/Drive.hpp"
|
||||
|
||||
@ -58,7 +58,7 @@ class Chipset: private ClockingHint::Observer {
|
||||
Changes run_until_after_cpu_slot();
|
||||
|
||||
/// Performs the provided microcycle, which the caller guarantees to be a memory access.
|
||||
void perform(const CPU::MC68000Mk2::Microcycle &);
|
||||
void perform(const CPU::MC68000::Microcycle &);
|
||||
|
||||
/// Sets the current state of the CIA interrupt lines.
|
||||
void set_cia_interrupts(bool cia_a, bool cia_b);
|
||||
|
@ -19,8 +19,8 @@ namespace Amiga {
|
||||
|
||||
class MemoryMap {
|
||||
private:
|
||||
static constexpr auto PermitRead = CPU::MC68000Mk2::Microcycle::PermitRead;
|
||||
static constexpr auto PermitWrite = CPU::MC68000Mk2::Microcycle::PermitWrite;
|
||||
static constexpr auto PermitRead = CPU::MC68000::Microcycle::PermitRead;
|
||||
static constexpr auto PermitWrite = CPU::MC68000::Microcycle::PermitWrite;
|
||||
static constexpr auto PermitReadWrite = PermitRead | PermitWrite;
|
||||
|
||||
public:
|
||||
@ -109,12 +109,12 @@ class MemoryMap {
|
||||
|
||||
/// Performs the provided microcycle, which the caller guarantees to be a memory access,
|
||||
/// and in the Zorro register range.
|
||||
bool perform(const CPU::MC68000Mk2::Microcycle &cycle) {
|
||||
bool perform(const CPU::MC68000::Microcycle &cycle) {
|
||||
if(!fast_autoconf_visible_) return false;
|
||||
|
||||
const uint32_t register_address = *cycle.address & 0xfe;
|
||||
|
||||
using Microcycle = CPU::MC68000Mk2::Microcycle;
|
||||
using Microcycle = CPU::MC68000::Microcycle;
|
||||
if(cycle.operation & Microcycle::Read) {
|
||||
// Re: Autoconf:
|
||||
//
|
||||
|
@ -35,7 +35,7 @@
|
||||
#include "../../../Components/DiskII/IWM.hpp"
|
||||
#include "../../../Components/DiskII/MacintoshDoubleDensityDrive.hpp"
|
||||
|
||||
#include "../../../Processors/68000Mk2/68000Mk2.hpp"
|
||||
#include "../../../Processors/68000/68000.hpp"
|
||||
|
||||
#include "../../../Storage/MassStorage/SCSI/SCSI.hpp"
|
||||
#include "../../../Storage/MassStorage/SCSI/DirectAccessDevice.hpp"
|
||||
@ -73,7 +73,7 @@ template <Analyser::Static::Macintosh::Target::Model model> class ConcreteMachin
|
||||
public MachineTypes::MediaTarget,
|
||||
public MachineTypes::MouseMachine,
|
||||
public MachineTypes::MappedKeyboardMachine,
|
||||
public CPU::MC68000Mk2::BusHandler,
|
||||
public CPU::MC68000::BusHandler,
|
||||
public Zilog::SCC::z8530::Delegate,
|
||||
public Activity::Source,
|
||||
public Configurable::Device,
|
||||
@ -191,7 +191,7 @@ template <Analyser::Static::Macintosh::Target::Model model> class ConcreteMachin
|
||||
mc68000_.run_for(cycles);
|
||||
}
|
||||
|
||||
using Microcycle = CPU::MC68000Mk2::Microcycle;
|
||||
using Microcycle = CPU::MC68000::Microcycle;
|
||||
|
||||
HalfCycles perform_bus_operation(const Microcycle &cycle, int) {
|
||||
// Advance time.
|
||||
@ -747,7 +747,7 @@ template <Analyser::Static::Macintosh::Target::Model model> class ConcreteMachin
|
||||
Inputs::QuadratureMouse &mouse_;
|
||||
};
|
||||
|
||||
CPU::MC68000Mk2::Processor<ConcreteMachine, true, true> mc68000_;
|
||||
CPU::MC68000::Processor<ConcreteMachine, true, true> mc68000_;
|
||||
|
||||
DriveSpeedAccumulator drive_speed_accumulator_;
|
||||
IWMActor iwm_;
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
//#define LOG_TRACE
|
||||
//bool should_log = false;
|
||||
#include "../../../Processors/68000Mk2/68000Mk2.hpp"
|
||||
#include "../../../Processors/68000/68000.hpp"
|
||||
|
||||
#include "../../../Components/AY38910/AY38910.hpp"
|
||||
#include "../../../Components/68901/MFP68901.hpp"
|
||||
@ -45,7 +45,7 @@ constexpr int CLOCK_RATE = 8021247;
|
||||
using Target = Analyser::Static::AtariST::Target;
|
||||
class ConcreteMachine:
|
||||
public Atari::ST::Machine,
|
||||
public CPU::MC68000Mk2::BusHandler,
|
||||
public CPU::MC68000::BusHandler,
|
||||
public MachineTypes::TimedMachine,
|
||||
public MachineTypes::ScanProducer,
|
||||
public MachineTypes::AudioProducer,
|
||||
@ -492,7 +492,7 @@ class ConcreteMachine:
|
||||
speaker_.run_for(audio_queue_, cycles_since_audio_update_.divide_cycles(Cycles(4)));
|
||||
}
|
||||
|
||||
CPU::MC68000Mk2::Processor<ConcreteMachine, true, true> mc68000_;
|
||||
CPU::MC68000::Processor<ConcreteMachine, true, true> mc68000_;
|
||||
HalfCycles bus_phase_;
|
||||
|
||||
JustInTimeActor<Video> video_;
|
||||
|
@ -1103,6 +1103,9 @@
|
||||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
42AD552E2A0C4D5000ACE410 /* 68000.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = 68000.hpp; sourceTree = "<group>"; };
|
||||
42AD55302A0C4D5000ACE410 /* 68000Storage.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = 68000Storage.hpp; sourceTree = "<group>"; };
|
||||
42AD55312A0C4D5000ACE410 /* 68000Implementation.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = 68000Implementation.hpp; sourceTree = "<group>"; };
|
||||
4B018B88211930DE002A3937 /* 65C02_extended_opcodes_test.bin */ = {isa = PBXFileReference; lastKnownFileType = archive.macbinary; name = 65C02_extended_opcodes_test.bin; path = "Klaus Dormann/65C02_extended_opcodes_test.bin"; sourceTree = "<group>"; };
|
||||
4B01A6871F22F0DB001FD6E3 /* Z80MemptrTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Z80MemptrTests.swift; sourceTree = "<group>"; };
|
||||
4B0333AD2094081A0050B93D /* AppleDSK.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = AppleDSK.cpp; sourceTree = "<group>"; };
|
||||
@ -2086,9 +2089,6 @@
|
||||
4BC9DF4D1D04691600F44158 /* 6560.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = 6560.cpp; sourceTree = "<group>"; };
|
||||
4BC9DF4E1D04691600F44158 /* 6560.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = 6560.hpp; sourceTree = "<group>"; };
|
||||
4BC9E1ED1D23449A003FCEE4 /* 6502InterruptTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = 6502InterruptTests.swift; sourceTree = "<group>"; };
|
||||
4BCA2F562832A643006C632A /* 68000Mk2.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = 68000Mk2.hpp; sourceTree = "<group>"; };
|
||||
4BCA2F592832A807006C632A /* 68000Mk2Storage.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = 68000Mk2Storage.hpp; sourceTree = "<group>"; };
|
||||
4BCA2F5A2832A81C006C632A /* 68000Mk2Implementation.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = 68000Mk2Implementation.hpp; sourceTree = "<group>"; };
|
||||
4BCA6CC61D9DD9F000C2D7B2 /* CommodoreROM.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommodoreROM.cpp; path = Encodings/CommodoreROM.cpp; sourceTree = "<group>"; };
|
||||
4BCA6CC71D9DD9F000C2D7B2 /* CommodoreROM.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = CommodoreROM.hpp; path = Encodings/CommodoreROM.hpp; sourceTree = "<group>"; };
|
||||
4BCA98C21D065CA20062F44C /* 6522.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = 6522.hpp; sourceTree = "<group>"; };
|
||||
@ -2278,6 +2278,24 @@
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
42AD552D2A0C4D5000ACE410 /* 68000 */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
42AD552E2A0C4D5000ACE410 /* 68000.hpp */,
|
||||
42AD552F2A0C4D5000ACE410 /* Implementation */,
|
||||
);
|
||||
path = 68000;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
42AD552F2A0C4D5000ACE410 /* Implementation */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
42AD55302A0C4D5000ACE410 /* 68000Storage.hpp */,
|
||||
42AD55312A0C4D5000ACE410 /* 68000Implementation.hpp */,
|
||||
);
|
||||
path = Implementation;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
4B051C9F2676F52200CA44E8 /* Enterprise */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@ -4370,7 +4388,7 @@
|
||||
4B1414561B58879D00E04248 /* 6502 */,
|
||||
4B4DEC15252BFA9C004583AC /* 6502Esque */,
|
||||
4BF8D4CC251C0C9C00BBE21B /* 65816 */,
|
||||
4BCA2F552832A643006C632A /* 68000Mk2 */,
|
||||
42AD552D2A0C4D5000ACE410 /* 68000 */,
|
||||
4B77069E1EC9045B0053B588 /* Z80 */,
|
||||
);
|
||||
name = Processors;
|
||||
@ -4600,24 +4618,6 @@
|
||||
path = 6560;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
4BCA2F552832A643006C632A /* 68000Mk2 */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
4BCA2F562832A643006C632A /* 68000Mk2.hpp */,
|
||||
4BCA2F582832A807006C632A /* Implementation */,
|
||||
);
|
||||
path = 68000Mk2;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
4BCA2F582832A807006C632A /* Implementation */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
4BCA2F592832A807006C632A /* 68000Mk2Storage.hpp */,
|
||||
4BCA2F5A2832A81C006C632A /* 68000Mk2Implementation.hpp */,
|
||||
);
|
||||
path = Implementation;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
4BCA6CC91D9DD9F500C2D7B2 /* Encodings */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
#import <XCTest/XCTest.h>
|
||||
|
||||
#include "../../../Processors/68000Mk2/68000Mk2.hpp"
|
||||
#include "../../../Processors/68000/68000.hpp"
|
||||
#include "../../../InstructionSets/M68k/Executor.hpp"
|
||||
#include "../../../InstructionSets/M68k/Decoder.hpp"
|
||||
|
||||
@ -84,9 +84,9 @@ struct TestExecutor {
|
||||
};
|
||||
|
||||
/// Binds a bus-accurate 68000 to 16mb of RAM.
|
||||
struct TestProcessor: public CPU::MC68000Mk2::BusHandler {
|
||||
struct TestProcessor: public CPU::MC68000::BusHandler {
|
||||
uint8_t *const ram;
|
||||
CPU::MC68000Mk2::Processor<TestProcessor, true, true, true> processor;
|
||||
CPU::MC68000::Processor<TestProcessor, true, true, true> processor;
|
||||
std::function<void(void)> comparitor;
|
||||
|
||||
TestProcessor(uint8_t *ram) : ram(ram), processor(*this) {}
|
||||
@ -96,8 +96,8 @@ struct TestProcessor: public CPU::MC68000Mk2::BusHandler {
|
||||
if(!instructions_remaining_) comparitor();
|
||||
}
|
||||
|
||||
HalfCycles perform_bus_operation(const CPU::MC68000Mk2::Microcycle &cycle, int) {
|
||||
using Microcycle = CPU::MC68000Mk2::Microcycle;
|
||||
HalfCycles perform_bus_operation(const CPU::MC68000::Microcycle &cycle, int) {
|
||||
using Microcycle = CPU::MC68000::Microcycle;
|
||||
if(cycle.data_select_active()) {
|
||||
cycle.apply(&ram[cycle.host_endian_byte_address()]);
|
||||
}
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
#import <XCTest/XCTest.h>
|
||||
|
||||
#include "68000Mk2.hpp"
|
||||
#include "68000.hpp"
|
||||
|
||||
#include <array>
|
||||
#include <unordered_map>
|
||||
|
@ -11,9 +11,9 @@
|
||||
|
||||
#include <zlib.h>
|
||||
|
||||
#include "68000Mk2.hpp"
|
||||
#include "68000.hpp"
|
||||
|
||||
class ComparativeBusHandler: public CPU::MC68000Mk2::BusHandler {
|
||||
class ComparativeBusHandler: public CPU::MC68000::BusHandler {
|
||||
public:
|
||||
ComparativeBusHandler(const char *trace_name) {
|
||||
trace = gzopen(trace_name, "rt");
|
||||
@ -49,7 +49,7 @@ class ComparativeBusHandler: public CPU::MC68000Mk2::BusHandler {
|
||||
}
|
||||
}
|
||||
|
||||
virtual CPU::MC68000Mk2::State get_state() = 0;
|
||||
virtual CPU::MC68000::State get_state() = 0;
|
||||
|
||||
private:
|
||||
int line_count = 0;
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
//#define LOG_TRACE
|
||||
|
||||
#include "68000Mk2.hpp"
|
||||
#include "68000.hpp"
|
||||
#include "Comparative68000.hpp"
|
||||
#include "CSROMFetcher.hpp"
|
||||
|
||||
@ -32,11 +32,11 @@ class EmuTOS: public ComparativeBusHandler {
|
||||
m68000_.run_for(cycles);
|
||||
}
|
||||
|
||||
CPU::MC68000Mk2::State get_state() final {
|
||||
CPU::MC68000::State get_state() final {
|
||||
return m68000_.get_state();
|
||||
}
|
||||
|
||||
HalfCycles perform_bus_operation(const CPU::MC68000Mk2::Microcycle &cycle, int) {
|
||||
HalfCycles perform_bus_operation(const CPU::MC68000::Microcycle &cycle, int) {
|
||||
const uint32_t address = cycle.word_address();
|
||||
uint32_t word_address = address;
|
||||
|
||||
@ -56,7 +56,7 @@ class EmuTOS: public ComparativeBusHandler {
|
||||
word_address %= ram_.size();
|
||||
}
|
||||
|
||||
using Microcycle = CPU::MC68000Mk2::Microcycle;
|
||||
using Microcycle = CPU::MC68000::Microcycle;
|
||||
if(cycle.data_select_active()) {
|
||||
uint16_t peripheral_result = 0xffff;
|
||||
if(is_peripheral) {
|
||||
@ -90,7 +90,7 @@ class EmuTOS: public ComparativeBusHandler {
|
||||
}
|
||||
|
||||
private:
|
||||
CPU::MC68000Mk2::Processor<EmuTOS, true, true> m68000_;
|
||||
CPU::MC68000::Processor<EmuTOS, true, true> m68000_;
|
||||
|
||||
std::vector<uint16_t> emuTOS_;
|
||||
std::array<uint16_t, 256*1024> ram_;
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
#include <zlib.h>
|
||||
|
||||
#include "68000Mk2.hpp"
|
||||
#include "68000.hpp"
|
||||
#include "Comparative68000.hpp"
|
||||
#include "CSROMFetcher.hpp"
|
||||
|
||||
@ -35,11 +35,11 @@ class QL: public ComparativeBusHandler {
|
||||
m68000_.run_for(cycles);
|
||||
}
|
||||
|
||||
CPU::MC68000Mk2::State get_state() final {
|
||||
CPU::MC68000::State get_state() final {
|
||||
return m68000_.get_state();
|
||||
}
|
||||
|
||||
HalfCycles perform_bus_operation(const CPU::MC68000Mk2::Microcycle &cycle, int) {
|
||||
HalfCycles perform_bus_operation(const CPU::MC68000::Microcycle &cycle, int) {
|
||||
const uint32_t address = cycle.word_address();
|
||||
uint32_t word_address = address;
|
||||
|
||||
@ -56,7 +56,7 @@ class QL: public ComparativeBusHandler {
|
||||
word_address %= ram_.size();
|
||||
}
|
||||
|
||||
using Microcycle = CPU::MC68000Mk2::Microcycle;
|
||||
using Microcycle = CPU::MC68000::Microcycle;
|
||||
if(cycle.data_select_active()) {
|
||||
uint16_t peripheral_result = 0xffff;
|
||||
|
||||
@ -84,7 +84,7 @@ class QL: public ComparativeBusHandler {
|
||||
}
|
||||
|
||||
private:
|
||||
CPU::MC68000Mk2::Processor<QL, true, false, true> m68000_;
|
||||
CPU::MC68000::Processor<QL, true, false, true> m68000_;
|
||||
|
||||
std::vector<uint16_t> rom_;
|
||||
std::array<uint16_t, 64*1024> ram_;
|
||||
|
@ -13,7 +13,7 @@
|
||||
#include <functional>
|
||||
#include <vector>
|
||||
|
||||
#include "../../../Processors/68000Mk2/68000Mk2.hpp"
|
||||
#include "../../../Processors/68000/68000.hpp"
|
||||
|
||||
using namespace InstructionSet::M68k;
|
||||
|
||||
@ -22,7 +22,7 @@ using namespace InstructionSet::M68k;
|
||||
/RESET will put the supervisor stack pointer at 0xFFFF and
|
||||
begin execution at 0x0400.
|
||||
*/
|
||||
class RAM68000: public CPU::MC68000Mk2::BusHandler {
|
||||
class RAM68000: public CPU::MC68000::BusHandler {
|
||||
public:
|
||||
RAM68000() : m68000_(*this) {}
|
||||
|
||||
@ -78,11 +78,11 @@ class RAM68000: public CPU::MC68000Mk2::BusHandler {
|
||||
return &ram_[(address >> 1) % ram_.size()];
|
||||
}
|
||||
|
||||
HalfCycles perform_bus_operation(const CPU::MC68000Mk2::Microcycle &cycle, int) {
|
||||
HalfCycles perform_bus_operation(const CPU::MC68000::Microcycle &cycle, int) {
|
||||
const uint32_t word_address = cycle.word_address();
|
||||
duration_ += cycle.length;
|
||||
|
||||
using Microcycle = CPU::MC68000Mk2::Microcycle;
|
||||
using Microcycle = CPU::MC68000::Microcycle;
|
||||
if(cycle.data_select_active()) {
|
||||
if(cycle.operation & Microcycle::InterruptAcknowledge) {
|
||||
cycle.value->b = 10;
|
||||
@ -112,7 +112,7 @@ class RAM68000: public CPU::MC68000Mk2::BusHandler {
|
||||
return HalfCycles(0);
|
||||
}
|
||||
|
||||
CPU::MC68000Mk2::State get_processor_state() {
|
||||
CPU::MC68000::State get_processor_state() {
|
||||
return m68000_.get_state();
|
||||
}
|
||||
|
||||
@ -131,7 +131,7 @@ class RAM68000: public CPU::MC68000Mk2::BusHandler {
|
||||
private:
|
||||
struct StopException {};
|
||||
|
||||
CPU::MC68000Mk2::Processor<RAM68000, true, true, true> m68000_;
|
||||
CPU::MC68000::Processor<RAM68000, true, true, true> m68000_;
|
||||
std::array<uint16_t, 256*1024> ram_{};
|
||||
int instructions_remaining_;
|
||||
HalfCycles duration_;
|
||||
|
@ -1,19 +1,19 @@
|
||||
//
|
||||
// 68000Mk2.hpp
|
||||
// 68000.hpp
|
||||
// Clock Signal
|
||||
//
|
||||
// Created by Thomas Harte on 16/05/2022.
|
||||
// Copyright © 2022 Thomas Harte. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef _8000Mk2_h
|
||||
#define _8000Mk2_h
|
||||
#ifndef MC68000_h
|
||||
#define MC68000_h
|
||||
|
||||
#include "../../ClockReceiver/ClockReceiver.hpp"
|
||||
#include "../../Numeric/RegisterSizes.hpp"
|
||||
#include "../../InstructionSets/M68k/RegisterSet.hpp"
|
||||
|
||||
namespace CPU::MC68000Mk2 {
|
||||
namespace CPU::MC68000 {
|
||||
|
||||
/*!
|
||||
A microcycle is an atomic unit of 68000 bus activity — it is a single item large enough
|
||||
@ -359,9 +359,9 @@ struct State {
|
||||
|
||||
}
|
||||
|
||||
#include "Implementation/68000Mk2Storage.hpp"
|
||||
#include "Implementation/68000Storage.hpp"
|
||||
|
||||
namespace CPU::MC68000Mk2 {
|
||||
namespace CPU::MC68000 {
|
||||
|
||||
/*!
|
||||
Provides an emulation of the 68000 with accurate bus logic via the @c BusHandler, subject to the following template parameters:
|
||||
@ -395,10 +395,10 @@ class Processor: private ProcessorBase {
|
||||
void run_for(HalfCycles duration);
|
||||
|
||||
/// @returns The current processor state.
|
||||
CPU::MC68000Mk2::State get_state();
|
||||
CPU::MC68000::State get_state();
|
||||
|
||||
/// Sets the current processor state.
|
||||
void set_state(const CPU::MC68000Mk2::State &);
|
||||
void set_state(const CPU::MC68000::State &);
|
||||
|
||||
/// Sets all registers to the values provided, fills the prefetch queue and ensures the
|
||||
/// next action the processor will take is to decode whatever is in the queue.
|
||||
@ -446,6 +446,6 @@ class Processor: private ProcessorBase {
|
||||
|
||||
}
|
||||
|
||||
#include "Implementation/68000Mk2Implementation.hpp"
|
||||
#include "Implementation/68000Implementation.hpp"
|
||||
|
||||
#endif /* _8000Mk2_h */
|
||||
#endif /* MC68000_h */
|
@ -1,20 +1,20 @@
|
||||
//
|
||||
// 68000Mk2Implementation.hpp
|
||||
// 68000Implementation.hpp
|
||||
// Clock Signal
|
||||
//
|
||||
// Created by Thomas Harte on 16/05/2022.
|
||||
// Copyright © 2022 Thomas Harte. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef _8000Mk2Implementation_h
|
||||
#define _8000Mk2Implementation_h
|
||||
#ifndef MC68000Implementation_h
|
||||
#define MC68000Implementation_h
|
||||
|
||||
#include <cassert>
|
||||
#include <cstdio>
|
||||
|
||||
#include "../../../InstructionSets/M68k/ExceptionVectors.hpp"
|
||||
|
||||
namespace CPU::MC68000Mk2 {
|
||||
namespace CPU::MC68000 {
|
||||
|
||||
#define AddressingDispatch(x) \
|
||||
x, x##__end = x + InstructionSet::M68k::AddressingModeCount
|
||||
@ -3020,8 +3020,8 @@ inline void ProcessorBase::move_from_usp(uint32_t &address) {
|
||||
// MARK: - External state.
|
||||
|
||||
template <class BusHandler, bool dtack_is_implicit, bool permit_overrun, bool signal_will_perform>
|
||||
CPU::MC68000Mk2::State Processor<BusHandler, dtack_is_implicit, permit_overrun, signal_will_perform>::get_state() {
|
||||
CPU::MC68000Mk2::State state;
|
||||
CPU::MC68000::State Processor<BusHandler, dtack_is_implicit, permit_overrun, signal_will_perform>::get_state() {
|
||||
CPU::MC68000::State state;
|
||||
|
||||
// This isn't true, but will ensure that both stack_pointers_ have their proper values.
|
||||
did_update_status();
|
||||
@ -3044,7 +3044,7 @@ CPU::MC68000Mk2::State Processor<BusHandler, dtack_is_implicit, permit_overrun,
|
||||
}
|
||||
|
||||
template <class BusHandler, bool dtack_is_implicit, bool permit_overrun, bool signal_will_perform>
|
||||
void Processor<BusHandler, dtack_is_implicit, permit_overrun, signal_will_perform>::set_state(const CPU::MC68000Mk2::State &state) {
|
||||
void Processor<BusHandler, dtack_is_implicit, permit_overrun, signal_will_perform>::set_state(const CPU::MC68000::State &state) {
|
||||
// Copy registers and the program counter.
|
||||
for(int c = 0; c < 7; c++) {
|
||||
registers_[c].l = state.registers.data[c];
|
||||
@ -3072,7 +3072,7 @@ void Processor<BusHandler, dtack_is_implicit, permit_overrun, signal_will_perfor
|
||||
template <class BusHandler, bool dtack_is_implicit, bool permit_overrun, bool signal_will_perform>
|
||||
void Processor<BusHandler, dtack_is_implicit, permit_overrun, signal_will_perform>::decode_from_state(const InstructionSet::M68k::RegisterSet ®isters) {
|
||||
// Populate registers.
|
||||
CPU::MC68000Mk2::State state;
|
||||
CPU::MC68000::State state;
|
||||
state.registers = registers;
|
||||
set_state(state);
|
||||
|
||||
@ -3105,4 +3105,4 @@ void Processor<BusHandler, dtack_is_implicit, permit_overrun, signal_will_perfor
|
||||
|
||||
}
|
||||
|
||||
#endif /* _8000Mk2Implementation_h */
|
||||
#endif /* MC68000Implementation_h */
|
@ -1,13 +1,13 @@
|
||||
//
|
||||
// 68000Mk2Storage.hpp
|
||||
// 68000Storage.hpp
|
||||
// Clock Signal
|
||||
//
|
||||
// Created by Thomas Harte on 16/05/2022.
|
||||
// Copyright © 2022 Thomas Harte. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef _8000Mk2Storage_h
|
||||
#define _8000Mk2Storage_h
|
||||
#ifndef MC68000Storage_h
|
||||
#define MC68000Storage_h
|
||||
|
||||
#include "../../../InstructionSets/M68k/Decoder.hpp"
|
||||
#include "../../../InstructionSets/M68k/Perform.hpp"
|
||||
@ -15,7 +15,7 @@
|
||||
|
||||
#include <limits>
|
||||
|
||||
namespace CPU::MC68000Mk2 {
|
||||
namespace CPU::MC68000 {
|
||||
|
||||
struct ProcessorBase: public InstructionSet::M68k::NullFlowController {
|
||||
ProcessorBase() {
|
||||
@ -223,4 +223,4 @@ struct ProcessorBase: public InstructionSet::M68k::NullFlowController {
|
||||
|
||||
}
|
||||
|
||||
#endif /* _8000Mk2Storage_h */
|
||||
#endif /* MC68000Storage_h */
|
Loading…
x
Reference in New Issue
Block a user