mirror of
https://github.com/TomHarte/CLK.git
synced 2025-02-28 06:29:37 +00:00
Establishes at least that both 68000s can run.
This commit is contained in:
parent
ca8dd61045
commit
c4ae5d4c8d
@ -16,14 +16,23 @@
|
|||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
struct BusHandler {
|
struct BusHandler {
|
||||||
|
template <typename Microcycle> HalfCycles perform_bus_operation(const Microcycle &cycle, bool is_supervisor) {
|
||||||
|
return HalfCycles(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
void flush() {}
|
||||||
};
|
};
|
||||||
|
|
||||||
using OldProcessor = CPU::MC68000::Processor<BusHandler, true>;
|
using OldProcessor = CPU::MC68000::Processor<BusHandler, true>;
|
||||||
using NewProcessor = CPU::MC68000Mk2::Processor<BusHandler, true, true>;
|
using NewProcessor = CPU::MC68000Mk2::Processor<BusHandler, true, true>;
|
||||||
|
|
||||||
template <typename M68000> struct Tester {
|
template <typename M68000> struct Tester {
|
||||||
Tester() : processor_(bus_handler_) {}
|
Tester() : processor_(bus_handler_) {
|
||||||
|
}
|
||||||
|
|
||||||
|
void advance(int cycles) {
|
||||||
|
processor_.run_for(HalfCycles(cycles << 1));
|
||||||
|
}
|
||||||
|
|
||||||
BusHandler bus_handler_;
|
BusHandler bus_handler_;
|
||||||
M68000 processor_;
|
M68000 processor_;
|
||||||
@ -40,6 +49,11 @@ template <typename M68000> struct Tester {
|
|||||||
- (void)testOldVsNew {
|
- (void)testOldVsNew {
|
||||||
Tester<OldProcessor> oldTester;
|
Tester<OldProcessor> oldTester;
|
||||||
Tester<NewProcessor> newTester;
|
Tester<NewProcessor> newTester;
|
||||||
|
|
||||||
|
for(int c = 0; c < 2000; c++) {
|
||||||
|
oldTester.advance(1);
|
||||||
|
newTester.advance(1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user