Exetools

Exetools (https://forum.exetools.com/index.php)
-   General Discussion (https://forum.exetools.com/forumdisplay.php?f=2)
-   -   Yes, Finally I make s-ice V2.80 work under Bochs (https://forum.exetools.com/showthread.php?t=19805)

BlackWhite 03-14-2021 02:43

Yes, Finally I make s-ice V2.80 work under Bochs
 
After many days of debugging, I debug Bochs's source code
with VS2019's embedded debugger which debugs Bochs's embedded
debugger which debugs S-ICE which debugs a sample DOS exe program.
I finally figure out the cause of S-ICE's crashing under Bochs.
Bochs has a bug associated with unmasking the timer interrupt.
Because there is a much long way to go for fixing Bochs's source
code, here I provide an easy patch for S-ICE v2.80:

Search hex bytes : 67F644240C020F854BF4
Replace them with: 67F644240C02E94CF490

;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
;the original instructions:
0000261D: 67F644240C02 test byte ptr [esp+0C],02 ; check VM bit in EFLAG
00002623: 0F854BF4 jnz 00001A72 ; ==> to_emulate_a_real_mode_int_8h
;-----------------------------------------------------------------------------------------------------------------------------------------------------
;after patch:
00002623: E94CF4 jmp 00001A72
00002626: 90 nop
;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00002627: 6655 push ebp ; A General Protection Violation Has
00002629: 06 push es ; occurred. This is typicall caused
0000262A: 06 push es ; By A Protection Mode Instruction
0000262B: 1E push ds ; CS:IP = xxxx:yyyy
0000262C: 1E push ds ; Type 'C' Continue
0000262D: 6650 push eax ; Type 'R' Return to Soft-ICE
0000262F: 6653 push ebx
00002631: 6651 push ecx
00002633: 6652 push edx
00002635: 6656 push esi
00002637: 6657 push edi
00002639: 668BEC mov ebp,esp
0000263C: B80800 mov ax,0008
0000263F: 8ED8 mov ds,ax

If you are also interested in DOS debugging stuff, you may contact me by [email protected]


All times are GMT +8. The time now is 15:46.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2021, vBulletin Solutions, Inc.
Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX