mirror of
https://github.com/TomHarte/CLK.git
synced 2025-08-15 14:27:29 +00:00
Bumped the tape parser up into the machine to ensure a maintained state. Temporarily disabled normally-timed tape playback.
This commit is contained in:
@@ -9,7 +9,6 @@
|
|||||||
#include "ZX8081.hpp"
|
#include "ZX8081.hpp"
|
||||||
|
|
||||||
#include "../MemoryFuzzer.hpp"
|
#include "../MemoryFuzzer.hpp"
|
||||||
#include "../../Storage/Tape/Parsers/ZX8081.hpp"
|
|
||||||
|
|
||||||
using namespace ZX8081;
|
using namespace ZX8081;
|
||||||
|
|
||||||
@@ -31,7 +30,7 @@ Machine::Machine() :
|
|||||||
|
|
||||||
int Machine::perform_machine_cycle(const CPU::Z80::MachineCycle &cycle) {
|
int Machine::perform_machine_cycle(const CPU::Z80::MachineCycle &cycle) {
|
||||||
video_->run_for_cycles(cycle.length);
|
video_->run_for_cycles(cycle.length);
|
||||||
tape_player_.run_for_cycles(cycle.length);
|
// tape_player_.run_for_cycles(cycle.length);
|
||||||
|
|
||||||
uint16_t refresh = 0;
|
uint16_t refresh = 0;
|
||||||
uint16_t address = cycle.address ? *cycle.address : 0;
|
uint16_t address = cycle.address ? *cycle.address : 0;
|
||||||
@@ -76,8 +75,7 @@ int Machine::perform_machine_cycle(const CPU::Z80::MachineCycle &cycle) {
|
|||||||
|
|
||||||
// Check for use of the fast tape hack.
|
// Check for use of the fast tape hack.
|
||||||
if(address == tape_trap_address_) { // TODO: && fast_tape_hack_enabled_
|
if(address == tape_trap_address_) { // TODO: && fast_tape_hack_enabled_
|
||||||
Storage::Tape::ZX8081::Parser parser;
|
int next_byte = parser_.get_next_byte(tape_player_.get_tape());
|
||||||
int next_byte = parser.get_next_byte(tape_player_.get_tape());
|
|
||||||
if(next_byte != -1) {
|
if(next_byte != -1) {
|
||||||
uint16_t hl = get_value_of_register(CPU::Z80::Register::HL);
|
uint16_t hl = get_value_of_register(CPU::Z80::Register::HL);
|
||||||
ram_[hl & 1023] = (uint8_t)next_byte;
|
ram_[hl & 1023] = (uint8_t)next_byte;
|
||||||
|
@@ -14,6 +14,7 @@
|
|||||||
|
|
||||||
#include "../../Processors/Z80/Z80.hpp"
|
#include "../../Processors/Z80/Z80.hpp"
|
||||||
#include "../../Storage/Tape/Tape.hpp"
|
#include "../../Storage/Tape/Tape.hpp"
|
||||||
|
#include "../../Storage/Tape/Parsers/ZX8081.hpp"
|
||||||
|
|
||||||
#include "Video.hpp"
|
#include "Video.hpp"
|
||||||
|
|
||||||
@@ -77,6 +78,7 @@ class Machine:
|
|||||||
void update_sync();
|
void update_sync();
|
||||||
|
|
||||||
Storage::Tape::BinaryTapePlayer tape_player_;
|
Storage::Tape::BinaryTapePlayer tape_player_;
|
||||||
|
Storage::Tape::ZX8081::Parser parser_;
|
||||||
bool tape_level_;
|
bool tape_level_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user