1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-06-25 18:30:07 +00:00

Add an automatic bus size selector.

This fixes the Jeek test.
This commit is contained in:
Thomas Harte 2022-06-25 16:28:06 -04:00
parent f2c2027a8c
commit fc1952bf42
2 changed files with 9 additions and 1 deletions

View File

@ -25,7 +25,9 @@ static constexpr bool LogProgramCounter = false;
using Type = CPU::MOS6502Esque::Type;
template <Type type, bool has_cias> class ConcreteAllRAMProcessor: public AllRAMProcessor, public BusHandler {
template <Type type, bool has_cias> class ConcreteAllRAMProcessor:
public AllRAMProcessor, public CPU::MOS6502Esque::BusHandlerT<type>
{
public:
ConcreteAllRAMProcessor(size_t memory_size) :
AllRAMProcessor(memory_size),

View File

@ -40,6 +40,12 @@ template <typename BusHandler, bool uses_ready_line> class Processor<Type::TWDC6
using CPU::WDC65816::Processor<BusHandler, uses_ready_line>::Processor;
};
/*
Using BusHandlerT allows bus size to be defaulted by processor type.
*/
template <Type processor_type> class BusHandlerT: public BusHandler<uint16_t> {};
template <> class BusHandlerT<Type::TWDC65816>: public BusHandler<uint32_t> {};
}
}