mirror of
https://github.com/TomHarte/CLK.git
synced 2026-04-21 17:16:44 +00:00
Extend support.
This commit is contained in:
@@ -288,7 +288,7 @@ public:
|
||||
} else {
|
||||
value = io_input();
|
||||
|
||||
if(!skip_range_) {
|
||||
if(!skip_range_ && tape_handler_.allow_fast_tape_hack()) {
|
||||
if(const auto pc = m6502_.registers().pc; pc >= 0x333 && pc < 0x3f2 ) {
|
||||
skip_range_ = tape_handler_.skip_range(pc.full, m6502_, map_);
|
||||
}
|
||||
|
||||
@@ -189,18 +189,23 @@ struct TapeHandler: public ClockingHint::Observer {
|
||||
template <typename M6502T, typename MemoryT>
|
||||
std::optional<SkipRange> skip_range(const uint16_t pc, M6502T &, MemoryT &map) {
|
||||
|
||||
// Check for sequence:
|
||||
// Potential sequence:
|
||||
//
|
||||
// 24 01 BIT 01
|
||||
// d0 fc BNE 3c8 <- PC will be here; trigger is the BIT operation above.
|
||||
// 24 01 BIT 01
|
||||
// f0 fc BEQ 3cc
|
||||
|
||||
//
|
||||
// Also check for BNE and BEQ the other way around.
|
||||
if(
|
||||
map.read(pc) == 0xd0 && map.read(pc+1) == 0xfc &&
|
||||
map.read(pc+1) == 0xfc &&
|
||||
map.read(pc-2) == 0x24 && map.read(pc-1) == 0x01 &&
|
||||
map.read(pc+2) == 0x24 && map.read(pc+3) == 0x01 &&
|
||||
map.read(pc+4) == 0xf0 && map.read(pc+5) == 0xfc
|
||||
map.read(pc+5) == 0xfc &&
|
||||
(
|
||||
(map.read(pc) == 0xd0 && map.read(pc+4) == 0xf0) ||
|
||||
(map.read(pc) == 0xf0 && map.read(pc+4) == 0xd0)
|
||||
)
|
||||
) {
|
||||
return SkipRange{uint16_t(pc - 2), uint16_t(pc + 6)};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user