From 198fbbedc7d4520189b7d286350beb9c5471ca63 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Sun, 31 Jul 2016 13:42:34 -0400 Subject: [PATCH] Reeled back all appropriate pieces of caveman debugging. --- Machines/Commodore/1540/C1540.cpp | 8 -------- Storage/Disk/DiskDrive.cpp | 25 ------------------------- Storage/Disk/PCMTrack.cpp | 7 ------- 3 files changed, 40 deletions(-) diff --git a/Machines/Commodore/1540/C1540.cpp b/Machines/Commodore/1540/C1540.cpp index 5d3000b7e..a8c916c32 100644 --- a/Machines/Commodore/1540/C1540.cpp +++ b/Machines/Commodore/1540/C1540.cpp @@ -116,14 +116,6 @@ void Machine::mos6522_did_change_interrupt_status(void *mos6522) void Machine::process_input_bit(int value, unsigned int cycles_since_index_hole) { _shift_register = (_shift_register << 1) | value; - - static int bitCount = 0; - bitCount++; - if(bitCount == 8) - { - printf("%02x.", _shift_register&0xff); - bitCount = 0; - } } // the 1540 does not recognise index holes diff --git a/Storage/Disk/DiskDrive.cpp b/Storage/Disk/DiskDrive.cpp index 4f0cdaeef..90a11a977 100644 --- a/Storage/Disk/DiskDrive.cpp +++ b/Storage/Disk/DiskDrive.cpp @@ -22,7 +22,6 @@ DiskDrive::DiskDrive(unsigned int clock_rate, unsigned int clock_rate_multiplier void DiskDrive::set_expected_bit_length(Time bit_length) { _bit_length = bit_length; - printf("expected bit length: %0.4f\n", bit_length.get_float() * 1000.0); // this conversion doesn't need to be exact because there's a lot of variation to be taken // account of in rotation speed, air turbulence, etc, so a direct conversion will do @@ -56,28 +55,6 @@ void DiskDrive::step(int direction) void DiskDrive::set_track() { _track = _disk->get_track_at_position((unsigned int)_head_position); - -// printf("***"); -// int calibration = -1; -// int bit = 0, shift = 0; -// while(1) -// { -// Track::Event event = _track->get_next_event(); -// if(event.type == Track::Event::IndexHole) break; -// if(calibration < 0) calibration = event.length.length; -// -// int number_of_bits = event.length.length / calibration; -// while(number_of_bits > 1) -// { -// shift = (shift << 1)&0xff; -// number_of_bits--; -// bit++; if(bit == 8) { printf("%02x.", shift); bit = 0; } -// } -// shift = ((shift << 1) | 0x01)&0xff; -// bit++; if(bit == 8) { printf("%02x.", shift); bit = 0; } -// } -// printf("***\n"); - reset_timer(); get_next_event(); } @@ -116,7 +93,6 @@ void DiskDrive::get_next_event() event_interval.clock_rate *= _revolutions_per_minute; event_interval.simplify(); set_next_event_time_interval(event_interval); -// printf("bit length: %0.4f\n", event_interval.get_float() * 1000.0); } void DiskDrive::process_next_event() @@ -127,7 +103,6 @@ void DiskDrive::process_next_event() _pll->add_pulse(); break; case Track::Event::IndexHole: - printf("[%d cycles]\n", _cycles_since_index_hole); _cycles_since_index_hole = 0; process_index_hole(); break; diff --git a/Storage/Disk/PCMTrack.cpp b/Storage/Disk/PCMTrack.cpp index 6723b6191..32dc79a9d 100644 --- a/Storage/Disk/PCMTrack.cpp +++ b/Storage/Disk/PCMTrack.cpp @@ -76,12 +76,5 @@ void PCMTrack::fix_length() _next_event.length.clock_rate += _segments[c].length_of_a_bit.length * _segments[c].number_of_bits * multiplier; } - uint8_t *data = _segments[0].data.get(); - for(int c = 0; c < _segments[0].number_of_bits >> 3; c++) - { - printf("%02x.", data[c]); - } - printf("===\n"); - _segment_pointer = _bit_pointer = 0; }