From 12f8aff65b43cc67241378818076eb0eaa6c066a Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Tue, 16 Aug 2016 19:46:53 -0400 Subject: [PATCH] Lengths I'd taken seem to have been for dipoles, not single poles. So I just doubled the clock rate. Also I was producing each dipole as high then low, when they should probably be low then high. The Vic now at least recognises that something is happening on the tape. --- Machines/Commodore/Vic-20/Vic20.cpp | 2 +- Storage/Tape/Formats/TapePRG.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Machines/Commodore/Vic-20/Vic20.cpp b/Machines/Commodore/Vic-20/Vic20.cpp index 91d590fb5..d330e224e 100644 --- a/Machines/Commodore/Vic-20/Vic20.cpp +++ b/Machines/Commodore/Vic-20/Vic20.cpp @@ -102,7 +102,7 @@ Machine::~Machine() unsigned int Machine::perform_bus_operation(CPU6502::BusOperation operation, uint16_t address, uint8_t *value) { // static int logCount = 0; -// if(operation == CPU6502::BusOperation::ReadOpcode && address == 0xee17) logCount = 500; +// if(operation == CPU6502::BusOperation::ReadOpcode && address == 0xf957) logCount = 500; // if(operation == CPU6502::BusOperation::ReadOpcode && logCount) { // logCount--; // printf("%04x\n", address); diff --git a/Storage/Tape/Formats/TapePRG.cpp b/Storage/Tape/Formats/TapePRG.cpp index 750ac6ade..9fe5fca87 100644 --- a/Storage/Tape/Formats/TapePRG.cpp +++ b/Storage/Tape/Formats/TapePRG.cpp @@ -57,8 +57,8 @@ Tape::Pulse TapePRG::get_next_pulse() case WordMarker: pulse.length.length = (_bitPhase&2) ? one_length : marker_length; break; case EndOfBlock: pulse.length.length = (_bitPhase&2) ? zero_length : marker_length; break; } - pulse.length.clock_rate = 1000000; - pulse.type = (_bitPhase&1) ? Pulse::Low : Pulse::High; + pulse.length.clock_rate = 2000000; + pulse.type = (_bitPhase&1) ? Pulse::High : Pulse::Low; return pulse; } @@ -125,8 +125,8 @@ void TapePRG::get_next_output_token() case 4: _output_byte = ((_load_address + _length) >> 8) & 0xff; break; case 5: _output_byte = 0x50; break; // P - case 6: _output_byte = 0x72; break; // R - case 7: _output_byte = 0x67; break; // G + case 6: _output_byte = 0x52; break; // R + case 7: _output_byte = 0x47; break; // G default: _output_byte = 0x20; break;