mirror of
https://github.com/AppleWin/AppleWin.git
synced 2025-02-21 03:29:08 +00:00
Debug code for T33.25
This commit is contained in:
parent
fdc8b4e936
commit
4b8674f8fb
@ -1361,6 +1361,8 @@ void Disk2InterfaceCard::DataLatchReadWOZ(WORD pc, WORD addr, UINT bitCellRemain
|
||||
#if LOG_DISK_NIBBLES_READ
|
||||
bool newLatchData = false;
|
||||
#endif
|
||||
static UINT32 nibbleStream = 0;
|
||||
static bool isAddrPrologue = false;
|
||||
|
||||
FloppyDrive& drive = m_floppyDrive[m_currDrive];
|
||||
FloppyDisk& floppy = drive.m_disk;
|
||||
@ -1385,7 +1387,7 @@ void Disk2InterfaceCard::DataLatchReadWOZ(WORD pc, WORD addr, UINT bitCellRemain
|
||||
|
||||
IncBitStream(floppy);
|
||||
|
||||
AddTrackSeamJitter(drive.m_phasePrecise, floppy);
|
||||
// AddTrackSeamJitter(drive.m_phasePrecise, floppy);
|
||||
|
||||
m_shiftReg <<= 1;
|
||||
m_shiftReg |= outputBit;
|
||||
@ -1417,9 +1419,9 @@ void Disk2InterfaceCard::DataLatchReadWOZ(WORD pc, WORD addr, UINT bitCellRemain
|
||||
if (!m_latchDelay)
|
||||
{
|
||||
#if LOG_DISK_NIBBLES_READ
|
||||
if (newLatchData)
|
||||
if (newLatchData && drive.m_phasePrecise == 66.5)
|
||||
{
|
||||
LOG_DISK("read skipped latch data: %04X = %02X\r\n", floppy.m_byte, m_floppyLatch);
|
||||
LOG_DISK("%04X: read skipped latch data: %02X\r\n", floppy.m_bitOffset, m_floppyLatch);
|
||||
newLatchData = false;
|
||||
}
|
||||
#endif
|
||||
@ -1433,9 +1435,32 @@ void Disk2InterfaceCard::DataLatchReadWOZ(WORD pc, WORD addr, UINT bitCellRemain
|
||||
// May not actually be read by 6502 (eg. Prologue's CHKSUM 4&4 nibble pair), but still pass to the log's nibble reader
|
||||
m_formatTrack.DecodeLatchNibbleRead(m_floppyLatch);
|
||||
newLatchData = true;
|
||||
#endif
|
||||
#if 1
|
||||
if (drive.m_phasePrecise == 66.5)
|
||||
{
|
||||
nibbleStream <<= 8;
|
||||
nibbleStream |= m_floppyLatch;
|
||||
if ((nibbleStream & 0x00ffffff) == 0xd5aa96) isAddrPrologue = true;
|
||||
if ((nibbleStream & 0x00ffffff) == 0xd5aaad) isAddrPrologue = false;
|
||||
if ((nibbleStream & 0x00ffffff) == 0xdeaaeb && isAddrPrologue)
|
||||
{
|
||||
LogOutput("smap: ");
|
||||
for (int i = 0; i < 16; i++)
|
||||
LogOutput("%02X ", mem[0xb795 + i]);
|
||||
LogOutput("\n");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
#if 1
|
||||
if (drive.m_phasePrecise == 66.5)
|
||||
{
|
||||
bool latchRead = ((i + 1) == bitCellRemainder);
|
||||
LogOutput("%04X:(%d) %02X %s\n", floppy.m_bitOffset, (int)floppy.m_extraCycles, m_floppyLatch, !latchRead ? "" : (m_floppyLatch & 0x80) ? "*READ*" : " read ");
|
||||
}
|
||||
#endif
|
||||
} // for
|
||||
|
||||
#if LOG_DISK_NIBBLES_READ
|
||||
|
@ -1,21 +1,21 @@
|
||||
#pragma once
|
||||
|
||||
#define LOG_DISK_ENABLED 0 // Master enable
|
||||
#define LOG_DISK_ENABLED 1 // Master enable
|
||||
|
||||
#define LOG_DISK_TRACKS 1
|
||||
#define LOG_DISK_MOTOR 1
|
||||
#define LOG_DISK_PHASES 1
|
||||
#define LOG_DISK_RW_MODE 1
|
||||
#define LOG_DISK_ENABLE_DRIVE 1
|
||||
#define LOG_DISK_NIBBLES_SPIN 1
|
||||
#define LOG_DISK_TRACKS 0
|
||||
#define LOG_DISK_MOTOR 0
|
||||
#define LOG_DISK_PHASES 0
|
||||
#define LOG_DISK_RW_MODE 0
|
||||
#define LOG_DISK_ENABLE_DRIVE 0
|
||||
#define LOG_DISK_NIBBLES_SPIN 0
|
||||
#define LOG_DISK_NIBBLES_READ 1
|
||||
#define LOG_DISK_NIBBLES_WRITE 1
|
||||
#define LOG_DISK_NIBBLES_WRITE_TRACK_GAPS 1 // Gap1, Gap2 & Gap3 info when writing a track
|
||||
#define LOG_DISK_NIBBLES_WRITE 0
|
||||
#define LOG_DISK_NIBBLES_WRITE_TRACK_GAPS 0 // Gap1, Gap2 & Gap3 info when writing a track
|
||||
#define LOG_DISK_NIBBLES_USE_RUNTIME_VAR 1
|
||||
#define LOG_DISK_WOZ_LOADWRITE 1
|
||||
#define LOG_DISK_WOZ_SHIFTWRITE 1
|
||||
#define LOG_DISK_WOZ_READTRACK 1
|
||||
#define LOG_DISK_WOZ_TRACK_SEAM 1
|
||||
#define LOG_DISK_WOZ_LOADWRITE 0
|
||||
#define LOG_DISK_WOZ_SHIFTWRITE 0
|
||||
#define LOG_DISK_WOZ_READTRACK 0
|
||||
#define LOG_DISK_WOZ_TRACK_SEAM 0
|
||||
|
||||
// __VA_ARGS__ not supported on MSVC++ .NET 7.x
|
||||
#if (LOG_DISK_ENABLED)
|
||||
|
Loading…
x
Reference in New Issue
Block a user