Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can you install windows 95/98 on dosbox pure #105

Closed
firebird5555 opened this issue Jan 28, 2021 · 41 comments
Closed

can you install windows 95/98 on dosbox pure #105

firebird5555 opened this issue Jan 28, 2021 · 41 comments

Comments

@firebird5555
Copy link

i cant find an answer

@Solo187
Copy link

Solo187 commented Jan 29, 2021

You can get Windows 3.1 running in Dosbox. Not sure about 95/98

@mrmatteastwood
Copy link

Up to version 3.1, Windows was technically a program that you could run on the DOS operating system. You'd type "win" in the DOS command line and Windows would start.

Windows 95 was the first version of Windows that was, in itself, an operating system. Your computer could run on DOS or Windows 95, but you couldn't run Windows 95 "inside" DOS. Hence, since there was no way to run it from DOS, you won't be able to run it from DOSBox (Pure or any other version).

Anybody, correct me if I'm overlooking something. :-)

@mrmatteastwood
Copy link

Oh, and that said, you can totally run Windows 95 as a virtual machine!

There's a free preconfigured Win 95 VDI for VirtualBox on archive.org:
https://archive.org/details/windows_95_vdi

@Solo187
Copy link

Solo187 commented Jan 29, 2021

You might want to try https://pcem-emulator.co.uk/ for the old windows machine gaming stuff aswell.

@Solo187
Copy link

Solo187 commented Jan 29, 2021

Out of interest. Does anybody know if it's possible to automatically send the win command to the core without changing any contents of the game archive?

@firebird5555
Copy link
Author

@mrmatteastwood im guessing for some games that the performance wouldn't be 100% (i know with emulators its also not 100% but there wasn't slow downs are anything)

@Denshadego
Copy link

Apparently you can install it on the Dosbox-SVN core: http://pages.retromods.org/radius/post/2020-09-05-w95-guide/

@Xbox-Series-X-User
Copy link

I did it. after running a bat file remount c: x: and imgmount c your img with windows on it and then boot -l c

@mrfixit2001
Copy link

Just for clarify - Windows 9x works under dosbox-x where you can mount disk images to an IDE controller

@Xbox-Series-X-User
Copy link

Works also on pure

@Kupo91
Copy link

Kupo91 commented Sep 7, 2021

Apparently you can install it on the Dosbox-SVN core: http://pages.retromods.org/radius/post/2020-09-05-w95-guide/

I just did that too. Installing and booting windows works fine. My issue is that I dont know how to get my games on the hdd image. The way he described on his blog didn't work for me, a lot of my files haven't been copied. Maybe because of the filenames

@Xbox-Series-X-User
Copy link

Apparently you can install it on the Dosbox-SVN core: http://pages.retromods.org/radius/post/2020-09-05-w95-guide/

I just did that too. Installing and booting windows works fine. My issue is that I dont know how to get my games on the hdd image. The way he described on his blog didn't work for me, a lot of my files haven't been copied. Maybe because of the filenames

You need to zip them first then unzip with 7z on your windows installation

@Xbox-Series-X-User
Copy link

Also you can use daemon tools 1.4 I think it is to mount games to install alternatively install on a PC first then zip the installation from the game folder

@Kupo91
Copy link

Kupo91 commented Sep 8, 2021

oof I tried to create those self extracting archives (exe) all day long because I thought that tools like 7zip are too new for win95.
tysm now everything works as it should :)

@P0liak
Copy link

P0liak commented Sep 17, 2021

Works also on pure

How ? I can’t find how to properly setup the boot bat file, it throws the usual "error loading operating system" stuff like with dosbox svn without using the conf file, but the conf file seems to be tied to svn

@Xbox-Series-X-User
Copy link

Xbox-Series-X-User commented Sep 17, 2021 via email

@ckeisc
Copy link

ckeisc commented Sep 25, 2021

after running a bat file remount c: x: and imgmount c your img with windows on it and then boot -l c

@Xbox-Series-X-User - I am having problem running multiple commands in a bat files under Dosbox Pure. Could you share how you manage to get the bat file to work?

The series of commands work if I type them interactively from the shell. If I create a bat file contains the same sequence of commands: multiple mount / imgmount commands, and then open this bat file as the content for Dosbox Pure core in Retroarch, the bat file would run but it would exit after the first command in the batch file. It would not run the whole batch file. I have seen some posts about this in other dosbox fork / SVN, and the suggestions was always to use the Autoexec section in the conf file, but Dosbo Pure core does not support conf file, so I can't use the autoexec section in the conf file to do this.

@Xbox-Series-X-User
Copy link

Xbox-Series-X-User commented Sep 26, 2021 via email

@evbo
Copy link

evbo commented Feb 12, 2022

@Xbox-Series-X-User I found a recent reddit posting that seems similar to what you're suggesting to get dosbox-x booting and running win98 games. Is this what you did?:

https://www.reddit.com/r/dosbox/comments/l71k2r/comment/h4vgaru/?utm_source=share&utm_medium=web2x&context=3

I've successfully gotten win95 running decently well on dosbox-svn, so if it's truly stable running win98 on dosbox pure I will have to try this.

@Xbox-Series-X-User
Copy link

Xbox-Series-X-User commented Feb 13, 2022 via email

@evbo
Copy link

evbo commented Feb 14, 2022

@Xbox-Series-X-User agreed. I just used dosbox x to create and install a windows 95 HDD img.

I install directx, S3 Trio 64V+VLB drivers, voodoo drivers. I run an example Windows 95 game (EV Nova). Works.

I then run that same hdd img using dosbox pure on Retroarch running on the same desktop. Windows 95 opens but immediately the display driver is incompatible and I'm limited to 16 bit colors. I try reinstalling the S3 drivers and it correctly installs, recognizes them, but then again on restart there are display compatibility issues.

In your experience with this, did you find what worked best for display drivers running on dosbox pure? I've tried VGA, SVGA, Trio, but none seem to be compatible.

So, it seems games that can run in 16 Bit color will work, but anything higher won't work unless I'm mistaken.

@Xbox-Series-X-User
Copy link

Xbox-Series-X-User commented Feb 14, 2022 via email

@Xbox-Series-X-User
Copy link

Xbox-Series-X-User commented Feb 14, 2022 via email

@evbo
Copy link

evbo commented Feb 14, 2022

@Xbox-Series-X-User That's exactly what I did, except I didn't choose PCI for the display. Now I've tried your steps but same results:

It works installing s3, and it says I'm getting 256 colors:
s3trio
color

But after restart issue persists, and device manager says the devices don't work:
persists
device

I've installed windows using dosbox x and then again using dosbox svn retroarch core. Did you use dosbox svn to do initial install? I think that is the only difference perhaps - what emulation was used during install.

Interested to know if you can share the link you used, even if its wayback machine. Here's what I referenced:
http://dosbox95.darktraveler.com/guide%20select.html

Also, you only installed windows 98? Maybe I should try that instead. Thanks!

Update:

I thought the issue might be due to using Win 95 OSR2.5 instead of OSR1, so I tried win 98 SE and a similar issue occurred. Same approach, I followed the guide linked above but ran setup to install win 98 on dosbox svn core to match the emulated hardware perfectly. On reboot (with either svn or pure), it always says the S3 Trio hardware isn't detected. And when I first installed s3, win 98 gave me a warning:
warn

I am running retroarch on Ubuntu 20.04 with pentium slow and 24 MB of RAM and otherwise default settings. So maybe windows cores are more stable if it worked so well for you?

@evbo
Copy link

evbo commented Feb 19, 2022

dosbox-core (latest 2022 release) is a very convenient Retroarch Core that supports windows 95 wonderfully and does not suffer from the above issue when run via Retroarch on Linux!:

realnc/dosbox-core#41 (comment)

It may be due to the fact that dosbox-core is using the latest version of dosbox-svn. I've noticed it is slower, but slow is better than no go! I hope the maintainers of dosbox-pure find this to be a useful reference!

@schellingb
Copy link
Owner

schellingb commented May 12, 2022

I've been trying out some possible enhancements for Windows 9x support and I just played a game of HOVER! off of a ZIP file in Windows 95.
image
Still very experimental but I wanted to share this progress somewhere :-)

@Xbox-Series-X-User
Copy link

Xbox-Series-X-User commented May 12, 2022

I've been trying out some possible enhancements for Windows 9x support and I just played a game of HOVER! off of a ZIP file in Windows 95. image Still very experimental but I wanted to share this progress somewhere :-)

Thanks for sharing <3. I haven't used retro in a bit but I was able to play half life and fallout 2 fullspeed + fast forward on. (On XSX at least) mounting zip files would be helpful for sure on file sizes. The .img files if I remember right are 2gb max

@schellingb
Copy link
Owner

So the enhanced support for installing operating systems and running any loaded content (like ZIP files) with them has just been released as version 0.9.5. See the new release here! It should also be in the online core updater of RetroArch in a few hours.

On intel based processors this runs quite well for me. On ARM based devices like Android or Raspberry Pi the story is a bit different but I added some convenience options to help with issues as described in the documentation of the feature.

Try it out if you can and report back how things work for you. Cheers!

@ckeisc
Copy link

ckeisc commented Jun 22, 2022

Thanks @schellingb - I have successfully installed Windows 98 SE and the first time use experience is great! all the HW are correctly detected, and drivers are found and installed (SB, S3 SVGA and Voodoo). I think there might be some confusion for the discard C: drive feature. First I really like the idea of it. When I install a game, most would make some changes to C: drive however minimum, from creating program group to Install / Update DirectX and other system components, even if we choose to install them to D: drive (which is the content ZIP file). 2 questions:

  1. any modification to D: drive would be written back to the content ZIP file right?
  2. could modification to C drive be stored in another ZIP file (like a differencing disk)? If this is not available, I suppose we would need to "unlock" the C: drive for modification each time when installing apps, and then lock it to discard trivial / unexpected modifications, correct? I think I could work with that but in generally, if not careful, a game or app could become unusable on 2nd boot when the necessary modification to C: drive was discarded.

Great work! I run Retroarch on Xbox Series console and the option to run Windows games are very limited. I was originally limited to Dosbox core fork and when Dosbox Pure supported conf file, it became possible to boot Windows 9x but the HW emulation was not good enough then. Now everything works out of box, so awesome!

@schellingb
Copy link
Owner

Thanks for testing! Really happy to hear that things are working and that you tried the discard disk modification option, too.

So disk drives in a booted operating system inherently work different than in DOSBox's DOS environment. The emulator can only present a raw storage container with which the OS is free to do anything. For example you can just go ahead and format the D: drive, to a different file system even.

So how it works under the hood is that DOSBox Pure generates a FAT16 (or FAT32 for really big ZIP files) partition on a hard disk large enough to hold all the files + 1 GB of free space. Any change made to that hard disk by the OS is written out to a separate file which contains the raw sectors of that simulated hard disk that have been modified by the operating system.

In the Start Menu, after selecting [ Run Installed Operating System ] below the list of created hard disk images there is some green text indicating where these modifications of the D: drive are being written to. That file has some an 8 character identifier at the end of its filename which uniquely identifies the loaded content. If for example you change the content of the ZIP file in anyway, that ZIP file will end up generating a different layout of the FAT partition structure and thus the raw sector modifications made before don't apply anymore.

Now... I do like your idea in 2.
Though it would mean once you start having a per-content differencing disk, it would become impossible to make changes to the original disk image. Which might be very hard to either enforce or communicate. I need to think about this... but maybe we can have a third selectable option in that "discard c: drive" core option.

@ckeisc
Copy link

ckeisc commented Jun 22, 2022

Thanks, thanks for the info and I think that matches my observation that a sav file was created for a content that was not a zip file. Its “only” about 100MB instead of 1GB in size of the temp D drive, so is this file compressed? Or would grow over time up to the max size of the partition?

Another suggestion is to consider putting the OS IMG file in a subfolder under system folder. Dosbox Core does a fair amount of file enumeration for MT32 rom, sf2 files and now IMG files. You have implemented the hashing to limited repeated full enumeration of system folder which could get very big due to some cores like Dolphin put large # of files in there. These IMG files are probably not shared by other cores and can be put in a subfolder?

Let me use the features a bit more to comment on ideas better later :)

@schellingb
Copy link
Owner

Yeah, in theory it can grow to a maximum of the entire partition size as shown in Windows. You can for example delete all files on the D: drive and then run some tool that generates a file filled with garbage until the disk is full. Running defrag might also be a good way to fill up the .sav file as it might move everything on the partition "physically" around (have not tired that).

The System folder enumeration did not change much since the last version. It now just looks for more types of files. If the enumeration ends up taking longer than 2 seconds DOSBox Pure will keep an index of files it knows and stores it into "DOSBoxPureMidiCache.txt". If that cache exists it, won't do the full enumeration on startup anymore and instead the user needs to go and select Audio Options > MIDI Output > Scan System Directory in the options to refresh it.
The screen in the startup menu where an installed operating system can be selected will show a reminder about that.
I know this all is a bit weird how it's under "MIDI Output" but I didn't want to spend too much time on this because I think it doesn't apply to most people? I'd certainly improve it if it hits too many users.

As for making a subdirectory in the system folder.... I did think about it but ended up not for now. Because everything is indexed on startup anyway we can change that any time. Also a user can just go ahead and move or rename the disk image files in the systems folder. That is unless we have a way to save per-content modifications to the C: drive :-)

@ckeisc
Copy link

ckeisc commented Jun 23, 2022

After using the "Installing and Booting an Operating System" feature for a day, I have developed the following workflow:

  1. When installing something from a CD (ISO image), I start with a ZIP containing just the ISO which would be auto-mounted. After I ran the setup.exe from the CD (E: drive), I would install the content to D: drive, which would get saved to a binary .sav file in saves folder. I found this to be a bit problematic since the content now spans two places, half in the ZIP file containing the ISO image, and the other half in the SAV file (D: drive). It also bloats saves folder which usually contain small save files not content. So I manually transferred the content from the SAV file into the ZIP file and then deleted the SAV file. The files would still show up correctly in D: drive, and I didn't notice any problem so far, and the game content both in ISO and installed files are now neatly packed into a single ZIP file.
  2. I want a way to auto-run my content, so I create a shortcut pointing to D:\run.bat and drop that into "Startup" folder on the shared installed OS (.IMG file). And then, for each ZIP file, I place a run.bat launching to the EXE of the installed content. Overall it feels like Auto Run and works pretty well.
  3. I use folder level config to lock down base image (no modification) when being used with content ZIP. But when I need to service the shared OS image, I would boot a content from a different folder that allows modification to the OS image file.
  4. One more thing - when creating the new image, 1GB is the max choice, could it be bigger? After the initial setup, Windows 98 SE took ~250MB and I actually immediately filled up the drive after installing 3 games (size 450, 200, 80MB respectively). I had to start over and change my approach to what described in point 1 above, installing content to D: drive in their own ZIP files rather than being in the base OS image (C: drive).

Overall, pretty happy with the feature set and it fully meets my need after some tweaking, sharing above as data points for you. Thanks again!

@schellingb
Copy link
Owner

I love that workflow, thanks for writing it down.

I'm actually curious how do you transfer the content from the SAV file into the ZIP file? The only way I can think of is to move files onto the C: drive and then use a tool like 7-zip to take it out of the OS harddisk .IMG file.

Your solution in 2: also seems very neat. Does Windows complain if D:\run.bat doesn't exist or does it just silently not run it?

I have wondered if I could somehow cause something to auto start with the Windows on boot. An idea would be to fake a drive with an autorun.inf file in its root. Wonder if that works for floppy drives or hard disk drives. While generating a fake CDROM drive/image in memory would certainly be possible it seems a bit weird to have a whole drive letter just for this. It would also be possible to modify the C: drive (though only as long as it's just a FAT16 file system).

For 3 you can also just run the core without content (Load Core then Start Core in RetroArch).

Regarding 4 I ended up limiting it for two reasons. First was to encourage the use of the D: drive (even though as you said it is a bit awkward to store big amounts of data into the "save" folder). The second thought was to stay within the limitations of the FAT16 filesystem. While the Windows 95C and newer will work perfectly fine if the partition in the harddisk image is FAT32, it would make it harder for the core to look at the files of the C: drive. Though as of now the files are never looked at anyway so that point is a bit moot. Also adding support for FAT32 disk images might not be too hard so maybe I should just do that :-) I guess I can add a few more options above 1 GB for those who want it, it wouldn't hurt.

@Denshadego
Copy link

Denshadego commented Jun 24, 2022

I'm pretty sure I'm missing something crucial, but after successfully installing Windows 98, 98 SE and 95 different times, as in the OS setup is finished and I shut off the "computer" and close content, I don't get the [ Run Installed Operating System ] message in the start menu when loading content afterwards, not even when starting the core by itself.

Should the files intended to be used have a different structure than a zip containing a DOS game?

I'm testing on Windows 10, by the way.

UPDATE: Had to manually scan the system directory using "Audio Options > MIDI Output > Scan System Directory" and the images were then made available to boot. I had been toying around with soundfonts before so that might be why I needed to re-scan it.

I think this option should be moved to a more visible location in the options menu and renamed to "Scan System Directory" or similar for when contents on system won't appear on their own.

@ckeisc
Copy link

ckeisc commented Jun 24, 2022

@schellingb you are exactly right that to transfer content from SAV file to ZIP, I indeed have to copy them over to a temp folder in C: drive IMG file and then get it out using 7zip.

Windows will complain mildly if there is no D:\run.bat for the shortcut to find although there are a lot of options in the shortcut dialog (for Win98 SE), so it might be possible to configure it to fail silently. I originally tried to use a batch file instead of shortcut where I can do IF EXIST to check if run.bat is there. But my batch scripting kungfu is too weak so I gave up and just used a shortcut.

oh, the disks are FAT16, no wonder I see some warning in system dialog about C and D drive being on DOS compatibility mode (guess that means FAT16). I might manually construct a FAT32 image (say using PCEm) and drop it into system folder for Dosbox Pure to find. Dosbox Pure wouldn’t actively reject FAT32 IMG file, would it?

@Xbox-Series-X-User
Copy link

Xbox-Series-X-User commented Jun 24, 2022

In my testing previously on the Xbox. only fat16 img files worked. I guess cuz dosbox is mainly emulating dos so no need for the fat32 compatibility also major props there has been massive speed improvements on my side

@Stellan90
Copy link

I use a similar workflow as @ckeisc , but instead of a shortcut in the autorun directory I have also tried with a *.bat file which doesn't complain if there is no Run.bat in D:\ but I have settled with the shortcut for now.
I have also tried with autorun.inf but it doesn't work because I think you have to load the drive while windows is fully booted for it to work, to have a custom icon on the drive works though.

Also a problem that I had to fix was when a game stored data like game-saves in the registry.
To solve it I had to make a script that is backing up the selected registry-key every 5 seconds to the D:\ drive, then restore it every time I reload the game. (Because I have set "Discard Disk Modifications to the C:\ drive)

One more thing that I put into my Run.bat is a screen-resolution changer script, because some games that run in windowed mode needs this to use the screen more efficient.

If someone are interested more in depth how my script works I'm happy to try explaining it.

BTW, thanks for this update @schellingb this feature (booting windows) is something that I have wanted for a long time in other emulators. Now I have it in my favorite emulator and it is also much better than I could ever hope for.

@schellingb
Copy link
Owner

That's quite an elaborate script there, impressive.

I wonder if it would make sense to develop a Windows 95 program that does a bunch of these things. It could even be embedded into the core and show up on the D: drive to be easily installed. Almost like the "Guest Tools" of something like VMWare.

@Stellan90
Copy link

Thanks, I'm actually not very good at programming or scripting, Google is my friend here.
I am in fact stuck at he moment because I doesn't like the way my script is backing up the registry-key at the moment. I am afraid that since it backs up the reg-key every five seconds, chances the file gets corrupted is quite high when you close the emulator.
Therefore my idea is for the script to search the registry for changes every five seconds instead and only make a backup when a change is found. This way it is less likely that it writes a backup at the same time that you close the emulator.
My idea here is for the script to check the file-date of USER.DAT and SYSTEM.DAT and back them up when it changes.
I have tried for several hours to make this work, but I can't. I can't even get it to read the file date and time back to me.

I like your idea by making this program, this way, we could maybe more easily configure different games that have different needs for them to work properly.

The script I use today for "Balls of Steel - pinball" looks like this:

@ECHO OFF

:: Set 16 bit colour on 640x480 display
rundll deskcp16.dll,QUICKRES_RUNDLLENTRY 640x480x16

:: Restore High-scores
REGEDIT.EXE /S Highscores.reg

:: Run Game
"D:\Program\Pinball Wizards\Balls of Steel\bos.exe"
SLEEP 10

:: Backup high-scores each 5 seconds
:Backup
REGEDIT.EXE /E Highscores.reg "HKEY_LOCAL_MACHINE\Software\Wildfire Studios\Balls of Steel"
SLEEP 5

GOTO Backup

exit

To make the SLEEP command work, you got to copy it from the Windows 98 Resource Kit CD (don't know if this works with win 95 though).

@Shadow8472
Copy link

Shadow8472 commented May 10, 2023

Up to version 3.1, Windows was technically a program that you could run on the DOS operating system. You'd type "win" in the DOS command line and Windows would start.

Windows 95 was the first version of Windows that was, in itself, an operating system. Your computer could run on DOS or Windows 95, but you couldn't run Windows 95 "inside" DOS. Hence, since there was no way to run it from DOS, you won't be able to run it from DOSBox (Pure or any other version).

Anybody, correct me if I'm overlooking something. :-)

My biggest apologies if this has already been clarified, but Windows XP was the first standalone Windows operating system. Anything previous had its own, included version of DOS to run on top of.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests