From 677e6f08ca2965bf65c925600901be3627d39c16 Mon Sep 17 00:00:00 2001 From: Allofich <19624336+Allofich@users.noreply.github.com> Date: Mon, 1 Feb 2021 21:54:11 +0900 Subject: [PATCH 1/3] SVN r4318 Add LOGC to log cs:ip only. --- src/debug/debug.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/debug/debug.cpp b/src/debug/debug.cpp index 474c220ba..f90bf1fb8 100644 --- a/src/debug/debug.cpp +++ b/src/debug/debug.cpp @@ -1975,6 +1975,11 @@ bool ParseCommand(char* str) { command = "logcode"; } + if (command == "LOGC") { // Create Cpu coverage log file + cpuLogType = 3; + command = "logcode"; + } + if (command == "logcode") { //Shared code between all logs DEBUG_ShowMsg("DEBUG: Starting log\n"); cpuLogFile.open("LOGCPU.TXT"); @@ -2620,8 +2625,8 @@ bool ParseCommand(char* str) { DEBUG_ShowMsg("INT [nr] / INTT [nr] - Execute / Trace into interrupt.\n"); #if C_HEAVY_DEBUG DEBUG_ShowMsg("LOG [num] - Write cpu log file.\n"); - DEBUG_ShowMsg("LOGS/LOGL [num] - Write short/long cpu log file.\n"); - DEBUG_ShowMsg("HEAVYLOG - Enable/Disable automatic cpu log when dosbox exits.\n"); + DEBUG_ShowMsg("LOGS/LOGL/LOGC [num] - Write short/long/cs:ip-only cpu log file.\n"); + DEBUG_ShowMsg("HEAVYLOG - Enable/Disable automatic cpu log when DOSBox-X exits.\n"); DEBUG_ShowMsg("ZEROPROTECT - Enable/Disable zero code execution detection.\n"); #endif DEBUG_ShowMsg("SR [reg] [value] - Set register value. Multiple pairs allowed.\n"); @@ -3963,6 +3968,11 @@ static void LogCPUInfo(void) { static void LogInstruction(uint16_t segValue, uint32_t eipValue, ofstream& out) { static char empty[23] = { 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,0 }; + if (cpuLogType == 3) { //Log only cs:ip. + out << setw(4) << SegValue(cs) << ":" << setw(8) << reg_eip << endl; + return; + } + PhysPt start = (PhysPt)GetAddress(segValue,eipValue); char dline[200];Bitu size; size = DasmI386(dline, start, reg_eip, cpu.code.big); From 00f5d84365fab09222ba28ecbb8ebe34cd9723fe Mon Sep 17 00:00:00 2001 From: Allofich <19624336+Allofich@users.noreply.github.com> Date: Fri, 5 Feb 2021 19:06:43 +0900 Subject: [PATCH 2/3] SVN r4320 Report Q-Channel track number in BCD, meaning it is not converted to binary by the CD-ROM device driver. Fixes the CD-Player feature of DOS Navigator 1.51 when playing past track 15. --- src/dos/dos_mscdex.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dos/dos_mscdex.cpp b/src/dos/dos_mscdex.cpp index ac392b6e1..ba9fd9f97 100644 --- a/src/dos/dos_mscdex.cpp +++ b/src/dos/dos_mscdex.cpp @@ -987,7 +987,7 @@ static uint16_t MSCDEX_IOCTL_Input(PhysPt buffer,uint8_t drive_unit) { TMSF abs,rel; mscdex->GetSubChannelData(drive_unit,attr,track,index,rel,abs); mem_writeb(buffer+1,attr); - mem_writeb(buffer+2,track); + mem_writeb(buffer+2,((track/10)<<4)|(track%10)); // track in BCD mem_writeb(buffer+3,index); mem_writeb(buffer+4,rel.min); mem_writeb(buffer+5,rel.sec); From 3be870aa0f2749ce373c271aeb2bcf76d028c031 Mon Sep 17 00:00:00 2001 From: Allofich <19624336+Allofich@users.noreply.github.com> Date: Fri, 5 Feb 2021 19:46:19 +0900 Subject: [PATCH 3/3] Update CHANGELOG and skipped commits --- CHANGELOG | 6 ++++++ patch-integration/Skipped SVN commits.txt | 10 ++++++++++ 2 files changed, 16 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index 0e863e68e..a41e05b7f 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -32,6 +32,12 @@ and "CONFIG -set output=default". (Wengier) - The setting "output=default" will enable the OpenGL output for the Linux platform if possible. (Wengier) + - Integrated SVN commits (Allofich) + - r4320: Report Q-Channel track number in BCD, + meaning it is not converted to binary by the + CD-ROM device driver. Fixes the CD-Player feature + of DOS Navigator 1.51 when playing past track 15. + - r4318: Add LOGC debug command to log cs:ip only. 0.83.10 - The Windows key(s) in Windows and the Command key(s) in macOS will now be displayed as the "Windows" and diff --git a/patch-integration/Skipped SVN commits.txt b/patch-integration/Skipped SVN commits.txt index 5da23e7da..284503d93 100644 --- a/patch-integration/Skipped SVN commits.txt +++ b/patch-integration/Skipped SVN commits.txt @@ -39,6 +39,16 @@ Commit#: Reason for skipping: 4298 Skipped the timing change. It makes the cursor blink too slow compared to footage of an actual machine. 4303 DOSBox-X has its own handling for dpi awareness and preventing scaling. 4306 Conflict +4311 Sets max scalers to 3, but DOSBox-X already has code involving higher scalers. +4313 Conflict. DOSBox-X also has vga.dac.xlat32 statements here, should they also be rewritten to use var_write? +4314 Conflict +4315 Conflict +4316 Conflict +4322 Conflict +4324 Conflict +4325 Fix to 4065, which was skipped +4326 Conflict +4329 Conflict (Commits in this interval are still TODO)