Any good MS-DOS 80386/80486 games for testing Virtual memory support?

Emulation of old PCs, PC hardware, or PC peripherals.

Re: Any good MS-DOS 80386/80486 games for testing Virtual memory support?

Postby superfury » 2019-5-10 @ 09:56

One interesting thing to note: When running certain MS-DOS games(alley cat, ultima ii) in full screen, then switching to windows using alt-carriage return works fine, starting it from the MS-DOS prompt(perhaps graphics mode switching itself) in windowed mode inside 3.1(1) causes it to somehow crash saying an invalid instruction has been encountered and to please shut down Windows and reboot?

Any idea what the cause of that might be? Does that happen in your emulator as well?

Edit: I needed to apply the following filter(excluding certain instructions from the breakpoint) until none were triggering during executing Alley Cat inside the MS-DOS prompt inside a window(WFW 3.11):
(CPU[0].oldCPUmode==3) && ((!((CPU[0].lastopcode==0xE6) || (CPU[0].lastopcode==0xCF) || (CPU[0].lastopcode==0x9C) || (CPU[0].lastopcode==0x9D) || (CPU[0].lastopcode==0xFA) || (CPU[0].lastopcode==0xFB) || (CPU[0].lastopcode==0xCD) || (CPU[0].lastopcode==0xEC) || (CPU[0].lastopcode==0xEE) || (CPU[0].lastopcode==0xE4)) && (CPU[0].lastopcode0F==0)) || (CPU[0].lastopcode0F))

oldCPUmode being the CPU mode(0=real,1=protected,3=V86), lastopcode being the current opcode that's executing, lastopcode0F being a 1-bit flag that is set during 0F-prefixed instructions.
I saw the exceptions occurring in said order(and immediately excluded them from future triggers by adding them).

Why can't alley cat run inside the MS-DOS window(when ran from the command prompt this happens, but when in fullscreen it doesn't crash)?
Edit: Could it be that the default MS-DOS prompt PIF file needs some extra settings enabled to allow graphics inside the window to be used? It seems to default to only enable text mode(it's the only one crossed in the Advanced PIF settings, the default mode being text mode)?

Edit: Changing the mode to high graphics mode, then enabling all required features(all video modes available and Alt-Enter and Alt-tab key combination), it seems to run those games fine now(so far tested Alley cat, California Games seems to hang in VGA mode(it does show itself in Full screen, though)).

Edit: After terminating California Games using Ctrl-Alt-Del then pressing Enter on the BSOD to terminate the application, MS-DOS prompt no longer starts(it immediately gives the message that an invalid instruction had been executed)?

Edit: Trying to terminate Windows after that results in it trying to execute a GRP5 /7 instruction(probably instruction 0xFFFF)?
superfury
l33t
 
Posts: 2969
Joined: 2014-3-08 @ 11:25
Location: Netherlands

Re: Any good MS-DOS 80386/80486 games for testing Virtual memory support?

Postby superfury » 2019-5-10 @ 13:35

Just saw something interesting running Windows 3.0a in 386 enhanced mode(just before it crashes to the MS-DOS prompt): I see it's throwing a #GP(0) fault on accessing the DS segment, which is a descriptor loaded with a limit of 0? That seems kind of strange? It's base is 0x20(which is strange as well). It's trying to access DS:[0001] at privilege level 1. The value of DS is 0x17D. The GDTR is at 0x8010011C with a limit of 0x010F. The LDTR is 0x60, with a base of 0x80636000 and a limit of 0xFFF. So that seems to be valid as well?

Comparing it to the logs, I don't see said value occurring. Perhaps it's because it's a log of Windows 3.0 instead of 3.0a(which I'm using)?
Edit: Just made another disk image with Windows 3.0(not the a-update) installed on it. Now I've still got to test if it's working...
Edit: I also see it happening at plain vanilla Windows 3.0. So there's a problem somewhere that's causing said invalid segment to be loaded into DS? Some wrong calculation somehow(although all instructions are already tested in the test386.asm testsuite)? So perhaps stack mismanagement? Or something interrupt-related?

Edit: I see it loaded for the first time at 0105:56CF. DS is 0xBD at that point during execution. The opcode is 0x8EDB. So MOV DS,BX.
superfury
l33t
 
Posts: 2969
Joined: 2014-3-08 @ 11:25
Location: Netherlands

Re: Any good MS-DOS 80386/80486 games for testing Virtual memory support?

Postby superfury » 2019-5-12 @ 15:11

Just completed the Pentium emulation by implementing the few 0F opcodes that were added with it(0F30-0F32 and 0FC7, the P1+ tagged instructions at x86.refasm.net's coder32 edition). Now the only Pentium features left unimplemented are the VME extensions(PVI and the V86-mode extensions) and Machine Check Enable bits in CR4 and it's functionality(and CPUID reports 0 for them in it's leaf 1 results, so unsupported).

So that means that the basic minimum Pentium(with all known basic documented features(see CR4 register bits for it) but PVI, VME and FPU) is now feature complete(newer opcodes and all other bits and functionality in CR4 bits 2-4 are implemented now)? Or is there more needed for a minimum Pentium emulation?
superfury
l33t
 
Posts: 2969
Joined: 2014-3-08 @ 11:25
Location: Netherlands

Re: Any good MS-DOS 80386/80486 games for testing Virtual memory support?

Postby superfury » 2019-5-14 @ 20:24

Just finished the improvements on the Pentium CPU emulation to also include the VME enhancements. I've based it on the below (undocumented) documentation:
https://www.felixcloutier.com/x86/
http://www.rcollins.org/articles/vme1/VME_Overview.html
http://www.rcollins.org/articles/pvi1/pvi1.html
http://www.rcollins.org/ddj/May98/May98.html
http://www.drdobbs.com/undocumented-corner/184410520
https://www.felixcloutier.com/x86/intn:into:int3:int1

It's so far untested, but a simple run and perhaps using jemm386 again(since it tries to use it by default, unlike EMM386 that's with MS-DOS and Windows 3.x) for the VME support should do the trick?

Edit: Hmmm... Strangely, on the Pentium CPU emulation, the MS-DOS prompt inside WFW 3.11 seems to hang the entire system when it starts(directly after displaying the message how to return to Windows etc.(and other information about shortcut keys), with the cursor on the next row?

Edit: Simple solution for that: just use the FreeDOS floppy disk image:D
superfury
l33t
 
Posts: 2969
Joined: 2014-3-08 @ 11:25
Location: Netherlands

Re: Any good MS-DOS 80386/80486 games for testing Virtual memory support?

Postby superfury » 2019-5-14 @ 22:53

Hmmm... The freeDOS boot image boots fine. Then, quitting the setup and returning to the MS-DOS prompt goes fine as well. Then I tried to run "jemm386 LOAD"(of course without quotes). I see in my debugger that it's actually using the V86 VME functionality of the Pentium emulation:D

Then I see something strange on the screen. I see it throwing exception 03, then 08, Then 09, Then 08 again. Perhaps that's telling me something about the emulation correctness?

Edit: The CPU then seems to be waiting in a HLT state, perhaps for an interrupt from the interrupt controller(The interrupt flag is enabled), but I don't see any interrupts being triggered?

Edit: The 80386 seems to still run fine.
Edit: So does the Pentium with "jemm386 LOAD NOVME" from MS-DOS 6.22.
Edit: And it also runs without NOVME on MS-DOS 6.22.
So the problem is FreeDOS itself?
superfury
l33t
 
Posts: 2969
Joined: 2014-3-08 @ 11:25
Location: Netherlands

Re: Any good MS-DOS 80386/80486 games for testing Virtual memory support?

Postby superfury » 2019-5-15 @ 22:56

Hmmm... Bochs' Pragma Linux seems to triple fault almost immediately on a stack fault loading SS using LSS(on what looks like a BIOS segment(0xfxxx) and with a very strange offset(0x9xxxxxxx)? That's at what seems to be the end of the initial loading dots(boot loader?)?
superfury
l33t
 
Posts: 2969
Joined: 2014-3-08 @ 11:25
Location: Netherlands

Re: Any good MS-DOS 80386/80486 games for testing Virtual memory support?

Postby superfury » 2019-5-16 @ 13:35

Just found some little bugs in the 0F00 instructions: it wasn't throwing an #UD for Virtual 8086 mode execution, just using the protected-mode rules when that's the case(getcpumode()==CPU_MODE_REAL must be getcpumode()!=CPU_MODE_PROTECTED).
So now it's properly #UD faulting in V86 mode.
superfury
l33t
 
Posts: 2969
Joined: 2014-3-08 @ 11:25
Location: Netherlands

Re: Any good MS-DOS 80386/80486 games for testing Virtual memory support?

Postby superfury » 2019-5-16 @ 18:04

Just tried running Doom on the Windows 3.11 MS=DOS box in windowed mode on the Pentium emulation. It seems to load until it starts the timer(the final step before graphics mode afaik?) at the bottom of the screen(or close), at which point everything seems to hang? Display doesn't change anymore and Windows is unresponsive? Ctrl+Alt+Del has no effect anymore.

Anyone?

Also, this is what happens booting Pragma Linux(just protected mode logged; from the Bochs website disks page):
debugger_pragmalinux_protectedmode_bootcrash.7z
Pragma Linux protected mode crash log
(28.35 KiB) Downloaded 1 time


Anyone? It seems to load ESP,SS from RAM at 46A8 and onwards?
superfury
l33t
 
Posts: 2969
Joined: 2014-3-08 @ 11:25
Location: Netherlands

Re: Any good MS-DOS 80386/80486 games for testing Virtual memory support?

Postby superfury » 2019-5-17 @ 12:34

Just tried Minix 3.3.0(minix_R3.3.0-588a35b.iso). It double faults once it starts it's kernel(init)?

1-Minix on Pentium crashes.jpg
Minix crash on UniPCemu's Pentium emulation.


It seems to have reached a double fault in the "vm" process?
superfury
l33t
 
Posts: 2969
Joined: 2014-3-08 @ 11:25
Location: Netherlands

Re: Any good MS-DOS 80386/80486 games for testing Virtual memory support?

Postby superfury » 2019-5-17 @ 15:12

Interestingly, I see that invalid SS value during the Linux boot(Pragma Linux from the Bochs' website) being written by a REP MOVSW instruction at 9020:01CA. DS is 1300h, ES is 400h, ESI and EDI are both 0x6AC? So it's copying that invalid value from 136AC to 46AC?

Edit: Loading that address, I see some read from the hard disk drive(primary master), which is my dynamic disk image containing various apps I use to test my emulator. It writes the value 0xB0FE to said location(0x136AC)?
Edit: Whoops, that's not the linux kernel booting. It's the MS-DOS one from my hard disk image.
superfury
l33t
 
Posts: 2969
Joined: 2014-3-08 @ 11:25
Location: Netherlands

Re: Any good MS-DOS 80386/80486 games for testing Virtual memory support?

Postby rasz_pl » 2019-5-17 @ 15:55

superfury wrote:Just tried running Doom on the Windows 3.11 MS=DOS box in windowed mode


afaik this doesnt work on real hardware either
rasz_pl
Member
 
Posts: 343
Joined: 2017-6-04 @ 00:57

Re: Any good MS-DOS 80386/80486 games for testing Virtual memory support?

Postby superfury » 2019-5-17 @ 16:11

Hmmm.... I see the DMA controller writing those values to those RAM locations at 136AC and 136AD? According to the DMA transfer that does that, it's the FDC channel(DMA controller #0, channel 2)? The FDC start position of the current transfer is 0x2600, so Cylinder 0, Head 1, Sector 2(It's a normal 1.44MB formatted disk, so 80 tracks, 2 heads and 18 sectors per track). So that's LBA 19? It's the 0xAD offset within the sector. Looking at the disk image using a hex editor, it's indeed 0xD8FA at that location? So perhaps it's loading the kernel from disk into memory(as one large block read), then tries to execute/boot it, but it fails?
superfury
l33t
 
Posts: 2969
Joined: 2014-3-08 @ 11:25
Location: Netherlands

Previous

Return to PC Emulation

Who is online

Users browsing this forum: No registered users and 3 guests