nbarkhina / DosWasmX

Build your own DOS/Windows machine in the browser
https://www.neilb.net/doswasmx/
MIT License
28 stars 3 forks source link

Windows 98 white screen after boot c: on SR1 #2

Open chopinrlz opened 5 months ago

chopinrlz commented 5 months ago

General Issue

If you boot into Windows 98, shutdown Windows 98, then use the Import Files function to import a ZIP file, the emulator will load the ZIP file, copy the files into the virtual disk, then attempt to boot Windows 98 again, which fails with a white screen--the emulation generates an error and terminates.

JavaScript Console Log File emu-js-console.log

This log file captures the events which transpire and the error that happens when Windows 98 stops loading.

Steps to Reproduce

Assumes starting from a brand new disk image.

  1. Set your RAM to 32 MB and disk size to 2 GB
  2. Perform a clean install of Windows 98 from a ZIP file
  3. Boot into Windows 98
  4. Shutdown Windows 98 to return to the DOS emulator environment
  5. Click the Import Files option under Advanced in the DOS Wasm X command bar menu
  6. Select a small ZIP file, like QUAKE.ZIP to import a small game
  7. Wait for the virtual machine to load the ZIP file and boot into Windows 98

    Error Behavior

    What will happen next is Windows 98 starts to boot. After a few seconds of starting up, Windows 98 will white screen, meaning the emulator will stop working due to an error, which you can see in the log file linked above.

    Workaround

    What is interesting is this behavior does not happen if you drag and drop the QUAKE.ZIP file onto the DOS Wasm X file importer drop location before you click Start Computer. Thus, the issue itself is related to the state of the emulator after a Windows 98 shutdown occurs.

nbarkhina commented 5 months ago

Thanks for the detailed information and log. I do see a "segment limit violation" in the output, I will look into what this means. Curiously after importing successfully and booting into windows are you then able to shut down and boot again without error?

chopinrlz commented 5 months ago

Yes, that's the case. This issue appears to have no negative affect on the virtual disk itself. I can close the browser and reload the machine and it boots just fine. Additionally, when I load a ZIP from the startup screen, before pressing Start Computer, it loads the contents of the ZIP file and also boots just fine. However, when I load a ZIP file from the startup screen, boot into Windows 98, shutdown Windows 98, then issue boot c: to reload Windows 98, the same error occurs. The same error occurs without loading a ZIP file, so it seems the issue is related to shutting down Windows 98 then attempting to boot back into it again. The Import Files function appears to be unrelated to this issue.

boot-after-shutdown-win98.log

Here's the log file with the same error. No Import Files was attempted. Simply Start Computer, Shutdown Windows 98, boot c: then white screen.

nbarkhina commented 5 months ago

Thank you - I'm relieved its not import-related at least :) so far I have been unable to reproduce locally. Would you mind please sharing your version of main.wasm and main.js so I can rule out if its compilation related?

chopinrlz commented 5 months ago

dist.zip

Here is my whole /dist folder. I compiled this on Ubuntu 22.04.3 LTS.

nbarkhina commented 5 months ago

I tested your zip and it works fine for me with my hard drives. So it compiled fine. Does this happen with all your installations or just this particular 2GB disk? do you have another disk you can test? also did you install windows from ISO or from ZIP file? just trying to pinpoint something that may be different...

chopinrlz commented 4 months ago

That's good to hear, the compile process worked. Sounds like it's the specific release of Windows 98 that may be the culprit. I'll have to try an install with Windows 98 SE. The version of Windows 98 I have is the first service release. I tried booting it back up on my laptop, but the browser cache must have corrupted the disk because I'm getting a blue screen on Windows 98 now on my laptop install when it was working just fine a week ago.

chopinrlz commented 4 months ago

I just tested this all again with a clean install of Windows 98 Second Edition, this time using the ISO from archive.org and this issue does not occur. So the issue is either related to the install from C:\ using the ZIP file method, or from Windows 98 SR1, the first release of Windows 98, which I what I tested earlier. I'll update the documentation accordingly since this installation method clearly works better. I used a clean disk for the test and used the default RAM and disk size settings.

nbarkhina commented 4 months ago

Thanks for retesting that! Happy to hear it works now