VOGONS


First post, by superfury

User metadata
Rank l33t++
Rank
l33t++

I last saw a guy running a IBM PC AT computer (with 80286, since it's an AT) that used a CD-ROM drive. Anyone knows of a generic ATAPI-4 CD-ROM driver that can be used on a IBM PC AT with 80286 CPU(I'm using the revision 3 BIOS)? I need it to test my ATA/ATAPI-4 CD-ROM emulation.

Author of the UniPCemu emulator.
UniPCemu Git repository
UniPCemu for Android, Windows, PSP, Vita and Switch on itch.io

Reply 2 of 38, by superfury

User metadata
Rank l33t++
Rank
l33t++

I've just tried running OAKCDROM.SYS on UniPCemu's 80286 emulation: it hangs because of an #UD of opcode 66h at 142E:0DFF.
DS: 142E; ES: 0B61
SS: 9047
AX: 0041; BX: 03E6
CX: 0000; DX: 0000
SP: 0578; BP: 001C
SI: 0010; DI: 01A0
CR0: FFF0
Flags: 0216

All values are in hex.

Author of the UniPCemu emulator.
UniPCemu Git repository
UniPCemu for Android, Windows, PSP, Vita and Switch on itch.io

Reply 3 of 38, by vladstamate

User metadata
Rank Oldbie
Rank
Oldbie

That means it requires 32bit processor (386+) as 0x66 is the operand size override opcode.

YouTube channel: https://www.youtube.com/channel/UC7HbC_nq8t1S9l7qGYL0mTA
Collection: http://www.digiloguemuseum.com/index.html
Emulator: https://sites.google.com/site/capex86/
Raytracer: https://sites.google.com/site/opaqueraytracer/

Reply 4 of 38, by Jorpho

User metadata
Rank l33t++
Rank
l33t++

Huh. I did a Google search and came up with ATAPI CDROM trouble on 286 , which suggests it should run on a 286 – well, unless the subject line is completely wrong. Maybe you need an older version?

That thread also suggests VIDE-CDD.SYS .

Reply 5 of 38, by superfury

User metadata
Rank l33t++
Rank
l33t++

So the #UD problem is actually caused by my CPU emulation having bugs? The problem is: I haven't gotten a clue as to what's going wrong. The 808X CPU emulation seems to be bug free mostly, except for Prince of Persia having buggy behaviour during the startup animation with the princess and the wizard for some reason(right half of the screen only, filled with garbage pixels). The 80186 testsuite fully checks out without detected errors. It's still in real mode, though.

The 80286 just adds a few instruction opcodes and 0F opcodes to it, as well as 286+ segmentation being enabled using software segment descriptors(checks ignored on 80(1)8X emulation).

Author of the UniPCemu emulator.
UniPCemu Git repository
UniPCemu for Android, Windows, PSP, Vita and Switch on itch.io

Reply 6 of 38, by vladstamate

User metadata
Rank Oldbie
Rank
Oldbie

No, this is not due to bugs. Just unsupported features. 66h is the prefix for using 32bit registers. That was introduced in 386 (which I guess you do not support yet). Like Jorpho suggested try looking for an older version. Or the VIDE-CDD.SYS.

YouTube channel: https://www.youtube.com/channel/UC7HbC_nq8t1S9l7qGYL0mTA
Collection: http://www.digiloguemuseum.com/index.html
Emulator: https://sites.google.com/site/capex86/
Raytracer: https://sites.google.com/site/opaqueraytracer/

Reply 7 of 38, by superfury

User metadata
Rank l33t++
Rank
l33t++

I've just tried the VIDE-CDD.SYS on my 80286 AT emulation. It says it can't install on PC/XT machines.

303-VIDE-CDD.SYS_IBMPCAT286.jpg
Filename
303-VIDE-CDD.SYS_IBMPCAT286.jpg
File size
57.2 KiB
Views
1962 views
File comment
IBM PC AT 286 configuration UniPCemu cannot install the VIDE-CDD.SYS driver.
File license
Fair use/fair dealing exception

For some reason, the screen capture messes up somehow? I've yet to figure out why, though.
Edit: Fixed the screen capture support to properly use the used buffer pitch specified in the defines, instead of maximum resolution width in pixels.

Author of the UniPCemu emulator.
UniPCemu Git repository
UniPCemu for Android, Windows, PSP, Vita and Switch on itch.io

Reply 8 of 38, by superfury

User metadata
Rank l33t++
Rank
l33t++

I've just tried CheckIt! Diagnostics on UniPCemu's IBM AT 286 emulation. It, for some reason, detects the CPU as a 80186 XT class? Why doesn't it detect the 80286 AT properly?

Edit: Just inspected the PUSH SP behaviour. It write the decremented SP value on the 80286 stack as well. It now uses the same behaviour as 80386+(pushing the original SP value before the value is decremented). Now CheckIt! Diagnostics properly detects the emulated IBM PC AT as a 80286 AT class CPU.

The VIDE-CDD.SYS now crashes during execution.

Author of the UniPCemu emulator.
UniPCemu Git repository
UniPCemu for Android, Windows, PSP, Vita and Switch on itch.io

Reply 9 of 38, by vladstamate

User metadata
Rank Oldbie
Rank
Oldbie
superfury wrote:

I've just tried CheckIt! Diagnostics on UniPCemu's IBM AT 286 emulation. It, for some reason, detects the CPU as a 80186 XT class? Why doesn't it detect the 80286 AT properly?

Edit: Just inspected the PUSH SP behaviour. It write the decremented SP value on the 80286 stack as well. It now uses the same behaviour as 80386+(pushing the original SP value before the value is decremented). Now CheckIt! Diagnostics properly detects the emulated IBM PC AT as a 80286 AT class CPU.

The VIDE-CDD.SYS now crashes during execution.

The main differences are that

8088/86 or the flags with 0xF000 and do not do a modulus of 32 (& 0x1F) for the shift/rotate counts
80188/186 do a modulus for the shift/rotate counts (and therefore first & 0x1F to the count) and also do not set top 4 bits in the flags registers on PUSHF.
80286 does the decrement SP after the stack push (for PUSH SP).

Also I always see those crashes as a blessing in disguise because it means I know found yet another software to unveil one of my bugs.

One thing worth mentioning is how are you loading the VIDE-CDD.SYS? HIMEM? Is that set up properly (in both CONFIG.SYS and your emulator?)

YouTube channel: https://www.youtube.com/channel/UC7HbC_nq8t1S9l7qGYL0mTA
Collection: http://www.digiloguemuseum.com/index.html
Emulator: https://sites.google.com/site/capex86/
Raytracer: https://sites.google.com/site/opaqueraytracer/

Reply 10 of 38, by superfury

User metadata
Rank l33t++
Rank
l33t++

I'm using MS-DOS 5.0a with the following config.sys:

rem DEVICE=MSDOS\LTEMM.EXE
DEVICE=MSDOS\VIDE-CDD.SYS /D:banana

That's all it contains.

I'm loading the VIDE-CDD.SYS and CONFIG.SYS into my emulator by using the XT NECV30 emulation to copy the files to the harddisk, then closing the emulator and booting the system with AT 286 settings.

After copying the files over again, I end up here:

Command: NEC V20/V30 #UD
OP: FE, ROP: FE
CS:IP=0B61:11A8
DS: 0B61; ES: 0000
SS: 9047
AX: 0001; BX: 0170
CX: 0003; DX: 0175
SP: 0558; BP: 0024
SI: 0F45; DI: 0000
CR0: FFF0
Flags: 0202

Is this normal behaviour? Is it even supposed to get to that point? (OP=First opcode byte, ROP=Opcode byte actually executed(e.g. 0F 01 becomes OP 0F; ROP 01. OP can be prefixes as well, ROP is always the opcode looked up in the normal or 0F opcode jumptable)).

It seems to be the opcode FEE8 it's trying to execute, according to the debugger logs.

(Start of #UD handler)
00:08:24:56.01504: Writing to memory: 000909C0=01 ()
00:08:24:56.01504: Writing to memory: 000909C1=00 ( )
00:08:24:56.01536: F000:1BD0 (50)PUSH AX
00:08:24:56.01536: Registers:
00:08:24:56.01536: AX: 0001, BX: 0170, CX: 0003, DX: 0175
00:08:24:56.01536: CS: F000, DS: 0B61, ES: 0000, SS: 9047
00:08:24:56.01536: SP: 0552, BP: 0024, SI: 0F45, DI: 0000
00:08:24:56.01536: IP: 1BD0, FLAGS: 0002
00:08:24:56.01536: CR0: FFF0
00:08:24:56.01536: FLAGSINFO:c1p0a0zstido00n0
00:08:24:56.01568: Interrupt status: 0000000000000000
00:08:24:56.01568: VGA@806,301(CRT:0,335)
00:08:24:56.02304: Display=801,446

00:08:25:03.01488: Writing to memory: 000909BE=70 (p)
00:08:25:03.01488: Writing to memory: 000909BF=01 ()
00:08:25:03.01520: F000:1BD1 (53)PUSH BX
00:08:25:03.01520: Registers:
00:08:25:03.01520: AX: 0001, BX: 0170, CX: 0003, DX: 0175
00:08:25:03.01520: CS: F000, DS: 0B61, ES: 0000, SS: 9047
00:08:25:03.02128: SP: 0550, BP: 0024, SI: 0F45, DI: 0000
00:08:25:03.02192: IP: 1BD1, FLAGS: 0002
00:08:25:03.02192: CR0: FFF0
00:08:25:03.02224: FLAGSINFO:c1p0a0zstido00n0
00:08:25:03.02224: Interrupt status: 0000000000000000
00:08:25:03.02224: VGA@873,301(CRT:0,335)
00:08:25:03.02256: Display=801,446

00:08:25:32.01440: F000:1BD2 (B00B)MOVB AL, 0B
00:08:25:32.01472: Registers:
00:08:25:32.01472: AX: 0001, BX: 0170, CX: 0003, DX: 0175
00:08:25:32.01472: CS: F000, DS: 0B61, ES: 0000, SS: 9047
00:08:25:32.01472: SP: 054E, BP: 0024, SI: 0F45, DI: 0000
00:08:25:32.01472: IP: 1BD2, FLAGS: 0002
00:08:25:32.01472: CR0: FFF0
00:08:25:32.01472: FLAGSINFO:c1p0a0zstido00n0
00:08:25:32.02048: Interrupt status: 0000000000000000
00:08:25:32.02048: VGA@887,301(CRT:14,335)
00:08:25:32.02048: Display=801,446

00:08:25:55.01488: F000:1BD4 (E620)OUT 20,AL
00:08:25:55.01488: Registers:
00:08:25:55.01520: AX: 000B, BX: 0170, CX: 0003, DX: 0175
00:08:25:55.01520: CS: F000, DS: 0B61, ES: 0000, SS: 9047
00:08:25:55.01520: SP: 054E, BP: 0024, SI: 0F45, DI: 0000
00:08:25:55.01520: IP: 1BD4, FLAGS: 0002
00:08:25:55.01520: CR0: FFF0
00:08:25:55.02064: FLAGSINFO:c1p0a0zstido00n0
00:08:25:55.02096: Interrupt status: 0000000000000000
00:08:25:55.02096: VGA@19,301(CRT:46,335)
00:08:25:55.02096: Display=801,446

00:08:25:83.01488: F000:1BD6 (EB00)JMP 1BD8
00:08:25:83.01488: Registers:
00:08:25:83.01488: AX: 000B, BX: 0170, CX: 0003, DX: 0175
00:08:25:83.01488: CS: F000, DS: 0B61, ES: 0000, SS: 9047
00:08:25:83.01520: SP: 054E, BP: 0024, SI: 0F45, DI: 0000
00:08:25:83.01520: IP: 1BD6, FLAGS: 0002
00:08:25:83.01520: CR0: FFF0
Show last 240 lines
00:08:25:83.02032: FLAGSINFO:c1p0a0zstido00n0 
00:08:25:83.02064: Interrupt status: 0000000000000000
00:08:25:83.02064: VGA@29,301(CRT:56,335)
00:08:25:83.02064: Display=801,446

00:08:26:07.01488: F000:1BD8 (E420)IN AL, 20
00:08:26:07.01488: Registers:
00:08:26:07.01488: AX: 000B, BX: 0170, CX: 0003, DX: 0175
00:08:26:07.01520: CS: F000, DS: 0B61, ES: 0000, SS: 9047
00:08:26:07.01520: SP: 054E, BP: 0024, SI: 0F45, DI: 0000
00:08:26:07.01520: IP: 1BD8, FLAGS: 0002
00:08:26:07.02096: CR0: FFF0
00:08:26:07.02128: FLAGSINFO:c1p0a0zstido00n0
00:08:26:07.02128: Interrupt status: 0000000000000000
00:08:26:07.02160: VGA@30,301(CRT:57,335)
00:08:26:07.02160: Display=801,446

00:08:26:31.01520: F000:1BDA (8AE0)MOVB AH,AL
00:08:26:31.01520: Registers:
00:08:26:31.01520: AX: 0000, BX: 0170, CX: 0003, DX: 0175
00:08:26:31.01520: CS: F000, DS: 0B61, ES: 0000, SS: 9047
00:08:26:31.01520: SP: 054E, BP: 0024, SI: 0F45, DI: 0000
00:08:26:31.01520: IP: 1BDA, FLAGS: 0002
00:08:26:31.01520: CR0: FFF0
00:08:26:31.01552: FLAGSINFO:c1p0a0zstido00n0
00:08:26:31.02032: Interrupt status: 0000000000000000
00:08:26:31.02032: VGA@62,301(CRT:89,335)
00:08:26:31.02032: Display=801,446

00:08:26:59.03856: F000:1BDC (0AC4)ORB AL,AH
00:08:26:59.03856: Registers:
00:08:26:59.03856: AX: 0000, BX: 0170, CX: 0003, DX: 0175
00:08:26:59.03856: CS: F000, DS: 0B61, ES: 0000, SS: 9047
00:08:26:59.03856: SP: 054E, BP: 0024, SI: 0F45, DI: 0000
00:08:26:59.03888: IP: 1BDC, FLAGS: 0002
00:08:26:59.03888: CR0: FFF0
00:08:26:59.03888: FLAGSINFO:c1p0a0zstido00n0
00:08:26:59.03888: Interrupt status: 0000000000000000
00:08:26:59.04496: VGA@73,301(CRT:100,335)
00:08:26:59.04528: Display=801,446

00:08:26:83.01456: F000:1BDE (7504)JNZ 1BE4
00:08:26:83.01456: Registers:
00:08:26:83.01456: AX: 0000, BX: 0170, CX: 0003, DX: 0175
00:08:26:83.01456: CS: F000, DS: 0B61, ES: 0000, SS: 9047
00:08:26:83.01488: SP: 054E, BP: 0024, SI: 0F45, DI: 0000
00:08:26:83.01488: IP: 1BDE, FLAGS: 0046
00:08:26:83.01488: CR0: FFF0
00:08:26:83.01488: FLAGSINFO:c1P0a0Zstido00n0
00:08:26:83.01488: Interrupt status: 0000000000000000
00:08:26:83.02032: VGA@74,301(CRT:101,335)
00:08:26:83.02032: Display=801,446

00:08:27:08.01504: F000:1BE0 (B4FF)MOVB AH, FF
00:08:27:08.01504: Registers:
00:08:27:08.01504: AX: 0000, BX: 0170, CX: 0003, DX: 0175
00:08:27:08.01504: CS: F000, DS: 0B61, ES: 0000, SS: 9047
00:08:27:08.01536: SP: 054E, BP: 0024, SI: 0F45, DI: 0000
00:08:27:08.01536: IP: 1BE0, FLAGS: 0046
00:08:27:08.01536: CR0: FFF0
00:08:27:08.01536: FLAGSINFO:c1P0a0Zstido00n0
00:08:27:08.02112: Interrupt status: 0000000000000000
00:08:27:08.02112: VGA@113,301(CRT:140,335)
00:08:27:08.02112: Display=801,446

00:08:27:33.01488: F000:1BE2 (EB2F)JMP 1C13
00:08:27:33.01488: Registers:
00:08:27:33.01488: AX: FF00, BX: 0170, CX: 0003, DX: 0175
00:08:27:33.01488: CS: F000, DS: 0B61, ES: 0000, SS: 9047
00:08:27:33.01488: SP: 054E, BP: 0024, SI: 0F45, DI: 0000
00:08:27:33.01488: IP: 1BE2, FLAGS: 0046
00:08:27:33.01488: CR0: FFF0
00:08:27:33.01520: FLAGSINFO:c1P0a0Zstido00n0
00:08:27:33.01520: Interrupt status: 0000000000000000
00:08:27:33.02000: VGA@124,301(CRT:151,335)
00:08:27:33.02000: Display=801,446

00:08:27:59.03664: Read from memory: 000909BE=70 (p)
00:08:27:59.03664: Read from memory: 000909BF=01 ()
00:08:27:59.03664: F000:1C13 (5B)POP BX
00:08:27:59.03664: Registers:
00:08:27:59.03664: AX: FF00, BX: 0170, CX: 0003, DX: 0175
00:08:27:59.03664: CS: F000, DS: 0B61, ES: 0000, SS: 9047
00:08:27:59.03664: SP: 054E, BP: 0024, SI: 0F45, DI: 0000
00:08:27:59.03664: IP: 1C13, FLAGS: 0046
00:08:27:59.03696: CR0: FFF0
00:08:27:59.04272: FLAGSINFO:c1P0a0Zstido00n0
00:08:27:59.04304: Interrupt status: 0000000000000000
00:08:27:59.04304: VGA@125,301(CRT:152,335)
00:08:27:59.04304: Display=801,446

00:08:27:83.01488: Writing to memory: 000909BE=61 (a)
00:08:27:83.01488: Writing to memory: 000909BF=0B ()
00:08:27:83.01488: F000:1C14 (1E)PUSH DS
00:08:27:83.01488: Registers:
00:08:27:83.01488: AX: FF00, BX: 0170, CX: 0003, DX: 0175
00:08:27:83.01488: CS: F000, DS: 0B61, ES: 0000, SS: 9047
00:08:27:83.01520: SP: 0550, BP: 0024, SI: 0F45, DI: 0000
00:08:27:83.01520: IP: 1C14, FLAGS: 0046
00:08:27:83.01520: CR0: FFF0
00:08:27:83.02032: FLAGSINFO:c1P0a0Zstido00n0
00:08:27:83.02032: Interrupt status: 0000000000000000
00:08:27:83.02064: VGA@185,301(CRT:212,335)
00:08:27:83.02064: Display=801,446

00:08:28:18.01472: Writing to memory: 000909BC=18 ()
00:08:28:18.01472: Writing to memory: 000909BD=1C ()
00:08:28:18.01472: F000:1C15 (E861FD)CALL 1979
00:08:28:18.01472: Registers:
00:08:28:18.01472: AX: FF00, BX: 0170, CX: 0003, DX: 0175
00:08:28:18.01504: CS: F000, DS: 0B61, ES: 0000, SS: 9047
00:08:28:18.02080: SP: 054E, BP: 0024, SI: 0F45, DI: 0000
00:08:28:18.02112: IP: 1C15, FLAGS: 0046
00:08:28:18.02112: CR0: FFF0
00:08:28:18.02112: FLAGSINFO:c1P0a0Zstido00n0
00:08:28:18.02112: Interrupt status: 0000000000000000
00:08:28:18.02112: VGA@220,301(CRT:247,335)
00:08:28:18.02112: Display=801,446

00:08:28:48.01504: Read from memory: 000F197F=40 (@)
00:08:28:48.01504: Read from memory: 000F1980=00 ( )
00:08:28:48.01504: ModR/M address: F000:197F=000F197F
00:08:28:48.01504: F000:1979 (2E8E1E7F19)MOVW DS,[CS:197F]
00:08:28:48.01504: Registers:
00:08:28:48.01536: AX: FF00, BX: 0170, CX: 0003, DX: 0175
00:08:28:48.02048: CS: F000, DS: 0B61, ES: 0000, SS: 9047
00:08:28:48.02080: SP: 054C, BP: 0024, SI: 0F45, DI: 0000
00:08:28:48.02080: IP: 1979, FLAGS: 0046
00:08:28:48.02080: CR0: FFF0
00:08:28:48.02080: FLAGSINFO:c1P0a0Zstido00n0
00:08:28:48.02080: Interrupt status: 0000000000000000
00:08:28:48.02080: VGA@232,301(CRT:259,335)
00:08:28:48.02112: Display=801,446

00:08:28:99.03600: Read from memory: 000909BC=18 ()
00:08:28:99.03600: Read from memory: 000909BD=1C ()
00:08:28:99.03632: F000:197E (C3)RET
00:08:28:99.03632: Registers:
00:08:28:99.03632: AX: FF00, BX: 0170, CX: 0003, DX: 0175
00:08:28:99.03632: CS: F000, DS: 0040, ES: 0000, SS: 9047
00:08:28:99.03632: SP: 054C, BP: 0024, SI: 0F45, DI: 0000
00:08:28:99.03632: IP: 197E, FLAGS: 0046
00:08:28:99.04112: CR0: FFF0
00:08:28:99.04112: FLAGSINFO:c1P0a0Zstido00n0
00:08:28:99.04112: Interrupt status: 0000000000000000
00:08:28:99.04144: VGA@234,301(CRT:261,335)
00:08:28:99.04144: Display=801,446

00:08:29:30.01504: Writing to memory: 0000046B=FF (ÿ)
00:08:29:30.01536: ModR/M address: 0040:006B=0000046B
00:08:29:30.01536: F000:1C18 (88266B00)MOVB [DS:006B],AH
00:08:29:30.01536: Registers:
00:08:29:30.01536: AX: FF00, BX: 0170, CX: 0003, DX: 0175
00:08:29:30.01536: CS: F000, DS: 0040, ES: 0000, SS: 9047
00:08:29:30.01536: SP: 054E, BP: 0024, SI: 0F45, DI: 0000
00:08:29:30.02112: IP: 1C18, FLAGS: 0046
00:08:29:30.02112: CR0: FFF0
00:08:29:30.02112: FLAGSINFO:c1P0a0Zstido00n0
00:08:29:30.02112: Interrupt status: 0000000000000000
00:08:29:30.02112: VGA@315,301(CRT:342,335)
00:08:29:30.02112: Display=801,446

00:08:29:78.01472: Read from memory: 000909BE=61 (a)
00:08:29:78.01472: Read from memory: 000909BF=0B ()
00:08:29:78.01472: F000:1C1C (1F)POP DS
00:08:29:78.01472: Registers:
00:08:29:78.01472: AX: FF00, BX: 0170, CX: 0003, DX: 0175
00:08:29:78.01472: CS: F000, DS: 0040, ES: 0000, SS: 9047
00:08:29:78.01504: SP: 054E, BP: 0024, SI: 0F45, DI: 0000
00:08:29:78.01504: IP: 1C1C, FLAGS: 0046
00:08:29:78.01504: CR0: FFF0
00:08:29:78.02144: FLAGSINFO:c1P0a0Zstido00n0
00:08:29:78.02176: Interrupt status: 0000000000000000
00:08:29:78.02176: VGA@331,301(CRT:358,335)
00:08:29:78.02176: Display=801,446

00:08:30:27.01488: Read from memory: 000909C0=01 ()
00:08:30:27.01488: Read from memory: 000909C1=00 ( )
00:08:30:27.01488: F000:1C1D (58)POP AX
00:08:30:27.01488: Registers:
00:08:30:27.01488: AX: FF00, BX: 0170, CX: 0003, DX: 0175
00:08:30:27.01488: CS: F000, DS: 0B61, ES: 0000, SS: 9047
00:08:30:27.01520: SP: 0550, BP: 0024, SI: 0F45, DI: 0000
00:08:30:27.01520: IP: 1C1D, FLAGS: 0046
00:08:30:27.01520: CR0: FFF0
00:08:30:27.02096: FLAGSINFO:c1P0a0Zstido00n0
00:08:30:27.02096: Interrupt status: 0000000000000000
00:08:30:27.02096: VGA@334,301(CRT:361,335)
00:08:30:27.02096: Display=801,446

00:08:30:67.01488: Read from memory: 000909C2=A8 (¨)
00:08:30:67.01520: Read from memory: 000909C3=11 ()
00:08:30:67.01520: Read from memory: 000909C4=61 (a)
00:08:30:67.01520: Read from memory: 000909C5=0B ()
00:08:30:67.01520: Read from memory: 000909C6=02 ()
00:08:30:67.01520: Read from memory: 000909C7=02 ()
00:08:30:67.02192: F000:1C1E (CF)IRET
00:08:30:67.02192: Registers:
00:08:30:67.02256: AX: 0001, BX: 0170, CX: 0003, DX: 0175
00:08:30:67.02256: CS: F000, DS: 0B61, ES: 0000, SS: 9047
00:08:30:67.02256: SP: 0552, BP: 0024, SI: 0F45, DI: 0000
00:08:30:67.02256: IP: 1C1E, FLAGS: 0046
00:08:30:67.02256: CR0: FFF0
00:08:30:67.02256: FLAGSINFO:c1P0a0Zstido00n0
00:08:30:67.02288: Interrupt status: 0000000000000000
00:08:30:67.02288: VGA@394,301(CRT:421,335)
00:08:30:67.02288: Display=801,446

00:08:30:95.01456: Writing to memory: 000909C6=02 ()
00:08:30:95.01488: Writing to memory: 000909C7=02 ()
00:08:30:95.01488: Writing to memory: 000909C4=61 (a)
00:08:30:95.01488: Writing to memory: 000909C5=0B ()
00:08:30:95.01488: Writing to memory: 000909C2=A8 (¨)
00:08:30:95.01488: Writing to memory: 000909C3=11 ()
00:08:30:95.01968: 0B61:11A8 (FEE8)<NECV20/V30+ #UD>
00:08:30:95.01968: Registers:
00:08:30:95.02000: AX: 0001, BX: 0170, CX: 0003, DX: 0175
00:08:30:95.02000: CS: 0B61, DS: 0B61, ES: 0000, SS: 9047
00:08:30:95.02000: SP: 0558, BP: 0024, SI: 0F45, DI: 0000
00:08:30:95.02000: IP: 11A8, FLAGS: 0202
00:08:30:95.02000: CR0: FFF0
00:08:30:95.02032: FLAGSINFO:c1p0a0zstIdo00n0
00:08:30:95.02032: Interrupt status: 0000000000000000
00:08:30:95.02032: VGA@427,301(CRT:454,335)
00:08:30:95.02064: Display=801,446

(Start of #UD handler)
00:08:32:84.01472: Writing to memory: 000909C0=01 ()
00:08:32:84.01472: Writing to memory: 000909C1=00 ( )
00:08:32:84.01472: F000:1BD0 (50)PUSH AX
00:08:32:84.01472: Registers:
00:08:32:84.01504: AX: 0001, BX: 0170, CX: 0003, DX: 0175
00:08:32:84.01504: CS: F000, DS: 0B61, ES: 0000, SS: 9047
00:08:32:84.01504: SP: 0552, BP: 0024, SI: 0F45, DI: 0000
00:08:32:84.01504: IP: 1BD0, FLAGS: 0002
00:08:32:84.02048: CR0: FFF0
00:08:32:84.02080: FLAGSINFO:c1p0a0zstido00n0
00:08:32:84.02080: Interrupt status: 0000000000000000
00:08:32:84.02080: VGA@439,301(CRT:466,335)
00:08:32:84.02080: Display=801,446

Author of the UniPCemu emulator.
UniPCemu Git repository
UniPCemu for Android, Windows, PSP, Vita and Switch on itch.io

Reply 11 of 38, by superfury

User metadata
Rank l33t++
Rank
l33t++

I've made a little log of the boot procedure, until the program starts executing(Should be segment 0B61h). A warning though: the debugger log is huge(1.78GB for only a few seconds of execution data).

https://www.dropbox.com/s/tsz52s6lnjmvqw3/deb … _cdrom.zip?dl=0

Anyone can see what's going wrong?

Author of the UniPCemu emulator.
UniPCemu Git repository
UniPCemu for Android, Windows, PSP, Vita and Switch on itch.io

Reply 12 of 38, by vladstamate

User metadata
Rank Oldbie
Rank
Oldbie

That looks like a bogus instruction as it would give operation 5 which is not legal with opcode 0xFE (it is neither INC nor DEC 8bit). My guess is you are not executing proper code for a while but just got lucky with legal instructions until this one. Look upwards from that instruction in the log and see if you can spot anything dubious. Should not have to go far.

YouTube channel: https://www.youtube.com/channel/UC7HbC_nq8t1S9l7qGYL0mTA
Collection: http://www.digiloguemuseum.com/index.html
Emulator: https://sites.google.com/site/capex86/
Raytracer: https://sites.google.com/site/opaqueraytracer/

Reply 13 of 38, by vladstamate

User metadata
Rank Oldbie
Rank
Oldbie

Actually it is right there. I think your IRET is just not returning to the right place. Does it looks like you are at the same instruction pointer/segment as you were when the respective INT instruction was executed (that had the last IRET)? I am guessing you are somewhere in the bushes after that IRET.

YouTube channel: https://www.youtube.com/channel/UC7HbC_nq8t1S9l7qGYL0mTA
Collection: http://www.digiloguemuseum.com/index.html
Emulator: https://sites.google.com/site/capex86/
Raytracer: https://sites.google.com/site/opaqueraytracer/

Reply 14 of 38, by Robin4

User metadata
Rank l33t
Rank
l33t
superfury wrote:
I've just tried the VIDE-CDD.SYS on my 80286 AT emulation. It says it can't install on PC/XT machines. […]
Show full quote

I've just tried the VIDE-CDD.SYS on my 80286 AT emulation. It says it can't install on PC/XT machines.

303-VIDE-CDD.SYS_IBMPCAT286.jpg

For some reason, the screen capture messes up somehow? I've yet to figure out why, though.
Edit: Fixed the screen capture support to properly use the used buffer pitch specified in the defines, instead of maximum resolution width in pixels.

I think its because of your harddisk controller.. Its set as XT... So the Cd-rom drivers think your computer is an XT.. Remove that hdd controller and use a regular 16-bit one..

~ At least it can do black and white~

Reply 15 of 38, by superfury

User metadata
Rank l33t++
Rank
l33t++

Robin4, that XT problem isn't the case. If you look at the XT-IDE BIOS it clearly says it's the AT version, so it cannot be an XT HDD BIOS. Also, the reporting of an XT in use was because the PUSH SP pushed the decremented value on the stack, causing a CPU misidentification(80186 instead of 80286 CPU detected). This has been fixed already in the log.

Edit: Also, if the IRET was bugged, MS-DOS and the BIOS wouldn't even be able to finish booting the OS(without the CD-ROM driver loaded).

Author of the UniPCemu emulator.
UniPCemu Git repository
UniPCemu for Android, Windows, PSP, Vita and Switch on itch.io

Reply 16 of 38, by vladstamate

User metadata
Rank Oldbie
Rank
Oldbie

No, I am not saying IRET handling is bugged. But that something happens before IRET such that the stack is corrupted so when IRET is popping CS:IP they are not the correct ones. That can happen for various reasons (like the code doing some math on the SS or SP that you might not handle properly). The best way to confirm (or deny) this hypothesis is like I said to look at the paired INT instruction higher in the log and see if the CS:IP before the INT matches the CS:IP after IRET.

YouTube channel: https://www.youtube.com/channel/UC7HbC_nq8t1S9l7qGYL0mTA
Collection: http://www.digiloguemuseum.com/index.html
Emulator: https://sites.google.com/site/capex86/
Raytracer: https://sites.google.com/site/opaqueraytracer/

Reply 17 of 38, by superfury

User metadata
Rank l33t++
Rank
l33t++

I implemented the IRET log as well as re-enabled the interrupt log return addresses and causing instruction:

Filename
cpu_log_20161201_2050_interrupts_and_iret.zip
File size
545.91 KiB
Downloads
121 downloads
File comment
Log of interrupts and IRET addresses and instructions causing it.
File license
Fair use/fair dealing exception

Can you see something strange happening?

Btw the FFFFFFFF error code is actually -1 values(Meaning no error code is present: it's a normal INT instruction or instruction without error code).

Author of the UniPCemu emulator.
UniPCemu Git repository
UniPCemu for Android, Windows, PSP, Vita and Switch on itch.io

Reply 18 of 38, by superfury

User metadata
Rank l33t++
Rank
l33t++

I've fixed those -1 values now being properly reported as -1, as well as the debugger having the bug of not generating debugger information(executed opcode disassembly) when protection errors are raised because of memory faults during GRP1-5 opcodes(it didn't generate the required instruction disassembly in that case, reporting an invalid #UD due to missing disassembly generation).

Edit: The updated logs, as well as the debugger log of executed instructions while booting MS-DOS up until the #UD occurs:
https://www.dropbox.com/s/sv6ywre7bd7o0nq/cpu … d_iret.zip?dl=0

Author of the UniPCemu emulator.
UniPCemu Git repository
UniPCemu for Android, Windows, PSP, Vita and Switch on itch.io

Reply 19 of 38, by vladstamate

User metadata
Rank Oldbie
Rank
Oldbie

Unfortunately the log is hard to read because it has a lot of info that is not relevant to this problem. All we need is the list of instructions (maybe accompanied by what is written to memory and what not). There are a lot of INT inside INT so it is hard to find out which is related to the faulty IRET. Oh and you definitely need the CS:IP in the log.

YouTube channel: https://www.youtube.com/channel/UC7HbC_nq8t1S9l7qGYL0mTA
Collection: http://www.digiloguemuseum.com/index.html
Emulator: https://sites.google.com/site/capex86/
Raytracer: https://sites.google.com/site/opaqueraytracer/