mirror of
https://github.com/TomHarte/CLK.git
synced 2024-06-25 18:30:07 +00:00
Specifically: there's now just the one .h file at the top level, giving a clear indication of what a user should read. That separates implementation from interface. It also devolves a lot more to the base class because doing so makes debug builds less of a hassle. The all-RAM 6502 has been shuffled off into a subfolder, to indicate that it's not something you necessarily need know about. Also general documentation improvements have been applied: incorrect citing of the recurring-template pattern has been removed and the meaning of the two BusHandler methods has now accrued at the bus handler.
40 lines
833 B
C++
40 lines
833 B
C++
//
|
|
// 6502AllRAM.hpp
|
|
// CLK
|
|
//
|
|
// Created by Thomas Harte on 13/07/2015.
|
|
// Copyright © 2015 Thomas Harte. All rights reserved.
|
|
//
|
|
|
|
#ifndef MOS6502AllRAM_cpp
|
|
#define MOS6502AllRAM_cpp
|
|
|
|
#include "../6502.hpp"
|
|
#include "../../AllRAMProcessor.hpp"
|
|
|
|
namespace CPU {
|
|
namespace MOS6502 {
|
|
|
|
class AllRAMProcessor:
|
|
public ::CPU::AllRAMProcessor {
|
|
|
|
public:
|
|
static AllRAMProcessor *Processor();
|
|
virtual ~AllRAMProcessor() {}
|
|
|
|
virtual void run_for(const Cycles cycles) = 0;
|
|
virtual bool is_jammed() = 0;
|
|
virtual void set_irq_line(bool value) = 0;
|
|
virtual void set_nmi_line(bool value) = 0;
|
|
virtual uint16_t get_value_of_register(Register r) = 0;
|
|
virtual void set_value_of_register(Register r, uint16_t value) = 0;
|
|
|
|
protected:
|
|
AllRAMProcessor() : ::CPU::AllRAMProcessor(65536) {}
|
|
};
|
|
|
|
}
|
|
}
|
|
|
|
#endif /* MOS6502AllRAM_cpp */
|