1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-07-09 06:29:33 +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:
Thomas Harte 2017-06-11 18:31:43 -04:00
parent 2c6414ce11
commit e40d553045
2 changed files with 4 additions and 4 deletions

View File

@ -9,7 +9,6 @@
#include "ZX8081.hpp"
#include "../MemoryFuzzer.hpp"
#include "../../Storage/Tape/Parsers/ZX8081.hpp"
using namespace ZX8081;
@ -31,7 +30,7 @@ Machine::Machine() :
int Machine::perform_machine_cycle(const CPU::Z80::MachineCycle &cycle) {
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 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.
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) {
uint16_t hl = get_value_of_register(CPU::Z80::Register::HL);
ram_[hl & 1023] = (uint8_t)next_byte;

View File

@ -14,6 +14,7 @@
#include "../../Processors/Z80/Z80.hpp"
#include "../../Storage/Tape/Tape.hpp"
#include "../../Storage/Tape/Parsers/ZX8081.hpp"
#include "Video.hpp"
@ -77,6 +78,7 @@ class Machine:
void update_sync();
Storage::Tape::BinaryTapePlayer tape_player_;
Storage::Tape::ZX8081::Parser parser_;
bool tape_level_;
};