Sfall win98 backport

kokeeby

It Wandered In From the Wastes
https://github.com/kokee11/sfall9x
https://www.dropbox.com/scl/fo/jhg0...ey=ccby9v1khvwcnwjgjenbrea28&st=sa6zwl4g&dl=0 (maintained)

I was interested about msvc backward compatibility and thought that this would be fun to do. I used the approach outlined in https://github.com/enlyze/EnlyzeWinCompatLib, but extended to 98. I didn't bother that much with NT4, since it only has barebones DirectX support. Maybe it would work with some stub dlls in the basic 640x480x8 mode, but that's not very interesting.

Win95... AFAIK, HRP runs on it only in the basic mode and if HRP can do no better, there's no way that we can do better :). Maybe I'll extend it for fun, but most likely it'll only work in the basic mode.

 
Last edited:
Just checking, but what sort of an emulator would you be using on this setup? Sfall requires pentium II cpu or higher.
i had it running on an ipad with win7 on utm using direct draw 7. runs decent with mods and all. i imagine on win98 it can be faster, but then you won't have the host tools which allow for automatic resolution switching, which is quite useful to play full screen. that's why i used win7 as it is the lowest version of windows to have the host tools/drivers. if you, run it in borderless fullscreen you can even use an apple pencil to control it. it ain't perfect, as the ui requires you to use a keyboard, but it works well enough
 
QEMU/UTM emulation is quite slow on Win98, plus Win98 has no SMP. I think on UTM the lowest you want to go with is Win2000 with the SMP kernel. Win98 only if you have virtualization available. As far as emulators go, I tried PCem, 86box, QEMU-tcg and dosbox-x (all four can do pentium II). I only tried them on Win98. PCem, QEMU, 86box worked, but they were too slow, QEMU in particular. Definitely not playable. Dosbox-x can achieve a fairly high cycle count, you could have a 600MHz PentiumII, but sfall actually did not run on it (dynamic-x86 core). I'll try to look into it further. When I disabled the offending code, it was playable (dosbox-x).

And I just tried QEMU-tcg on Win2000 and it was playable. Of course not silky smooth.
 
The "official" builds of sfall 4.1.8.1-4.3.6 work on Pentium II. I tested them on a borrowed Pentium II 450 Mhz Win2000 server to ensure new features work on the minimum requirement hardware(processor). Before borrowing the server I tried PCem/86box to emulate PII spec, but they run awfully slow.
Even with 1GB RAM the PII server is still struggling to run the game on full screen with some script mods, and it's getting harder for me to acquire parts to maintain it so I decided to retire/return it and ditched the support of pre-SSE processors. I still have three PIII machines (one Coppermine two Tualatin) available and they can run the game smoothly enough with less memory.
 
Added dosbox compatible version in the release page. Tested on dosbox-x and dosbox-pure (Win98SE). Pure, due to its simpler emulation was quite fast - of all the emulators I tried this would be I think the smoothest - although obviously not as smooth as real HW. Also tested it on the android version of Retroarch and it works, but it's quite heavy, requires current-year phone or maybe even next-year phone :-). Would be interesting to see how it works on Apple Silicon - considering that CE doesn't have sfall yet. Also, with Retroarch you get to have the vulkan shaders.

 
guys isn't it easier to just grab a copy of ExaGear Windows Emulator from it's Discord and go from there? the only thing it may require as a cherry on top is DX9.0c support on smartphone's gpu, but it's not nessecary. I know this can work on Android. No Idea about Crapple, never used it.
 
Possible... I'm not really playing Fallout on mobile platforms :-). There's also the fo2.exe emulator. To me it was mostly about the backward compatibility with old OS.
 
I use apple and going to give this a go on Dosbox-Pure today. Going to try with new rpu (doubt it works) and old killapps rpu. Fingers crossed.
 
On Dosbox-Pure you mostly want to (apart from following the steps outlined in the repo) use the i586 version, set RAM to max (224), set cputype to pentium_slow, set art_cache_size in Fallout2.cfg to some value that the RAM can handle (I think I ran with 64).

in ddraw.ini I'd disable the AutoSearchSfx (or whatever it's called) and disable OverrideArtCacheSize. Set graphics to ddraw7 (ddraw.ini graphicsmode=0 and f2_res.ini graphicsmode=1).

That said, I looked at Geekbench6 results for iphone8 and I'm almost certain RPU will be unplayable... looking at Geekbench, maybe iphone14 would be playable. You could play killap 2014 and just update sfall to 4.4.0.1

As far as improving the perfomance, one thing would be to optimize sfall, but I'm not sure how much left is there to optimize. Another would be to move FO2 to DOS, without the need to emulate Win98. Not completely impossible, but probably months of work.

Edit: also don't use Retroarch from GoogleStore/AppleStore, you want to download it from the Retroarch website.

I'd try RP2014 either with crafty sfall2 or with the 4.4.0.1-i586 and see how it works.
 
Last edited:
@kokeeby Thnk you for your reply and guess what I got it working using a combination of killapps 2014 RP (specifically the Win98 exe, which is similar to yours in that it looks for a sfall.dll, renaming ddraw.dll to sfall.dll) and your i586 ddraw (which I renamed to sfall) and the included unicows (don’t know what that does).
IMG_0144.png


I used DirectDraw 7, but holy crap the slowdown. This only happens when I use Mash Hi-Res option enabled (can’t use built in hi-res sfall; crashes). Now if I disable the Mash hires I get full speed but I can’t scroll some areas like when I enter the Arroyo Temple, but if I keep forcing the scroll I get this:
IMG_0143.png


So, I have to do that or back out and restart with Ddraw 7 (Dx9 works too) crawl somewhere into that formerly scroll-locked space, save, restart with Mash disabled and then I’m good, but of course it’s a hassle. My guess is that tiles are configured for Hi-res, not sure. Anyways that’s the only hiccup so far, just made it out of Temple. Hopefully something can be done. Being kinda forced to use hi-res (which is basically unnecessary for small phone) is frustrating.

Just found this (might work?) https://sorcerers.net/community/resources/directdraw-compatibility-tool-1-01-by-galogen.170/
 
Last edited:
I believe you have to use some HRP for the new tile blockers (that are used by RP) to work. You'd probably have to alter the maps, so they use old tile blockers instead of the ones from HRP.
https://github.com/BGforgeNet/Fallout2_Restoration_Project/issues/207

I wasn't aware of there being some Win98 specific .exe from killap, I'll take a look.

As far as DX9, I think you must be still running in some DX7 mode. It's just that the configurations are really confusing with the different inis and HRP has the UAC_AWARE setting.

Edit: As far as the red message being displayed, IIRC the only difference between default sfall configuration and the killap 2014 is that killap has BoostScriptDialogLimit=1 in ddraw.ini and ModifiedIni=42 at the start of ddraw.ini (check killap's ddraw.ini). So set/add those lines to your ddraw.ini (again check killap's original ddraw.ini to see how he had it)
 
Last edited:
Also how's the speed with Mash HPR if you just set it to basic mode? ie ddraw.ini graphicsmode=0 and f2_res.ini graphicsmode=0

Edit: Tried it on my phone with RPU28, in BasicMode scroll blockers work, but it runs slower than without HRP. I think an easy solution would be to replace those HRP blockers with oldschool blockers. I'm not a mapper, but I should probably be able to do this...
 
Last edited:
I looked at killap's RP and there are some more divergences in ddraw.ini from 4.4.0.1 (ElevatorsFile, WorldMapSlots, KarmaFRMs, KarmaPoints).

Anyway, I also tried it with the built-in hrp (on my phone) and the framerate was better than with Mash hrp. I know that you mentioned that built-in hrp didn't work for you, can you try it with these files https://mega.nz/file/Xp0WCDhB#pLkiOY3BZq4hz_F6TsG-WPIKtbnjsZ8u5bm_AZMtsME

Also delete all the d3dx9_.dll files that killap has put in there (d3dx9_30.dll d3dx9_31.dll d3dx9_42.dll d3dx9_43.dll).
 
Whooosh, ok. I’m playing RPU v28 with taking heads and THAT installed with f2tweaks, it all runs great except for the darn HR map/tile stuff. When I go into an area the camera is offset or something and I can see the green enter/exit colored area but also beyond and behind it. That’s the only hiccup, everything else is flawless and full speed. But turning on Mash HR slows me to a crawl. I even updated the voodoo2 drivers for performance and with Ddraw 7 HR it’s playable, but compared to the other way with Ddraw 7 enabled and no HR it’s crazy. I don’t have killapps OG RP installed (I am using his win98 exe though), I just used that to get started and see how things went. Then I did a fresh install of F2 with Rpu28 and the other mods. So yeah I spent all weekend and yesterday tweaking and switching stuff on/off. It’s just the HR tiles, but maybe there’s a way to trick it into thinking I’m using HR but not? Because when I play on a map with HR enabled, then go save somewhere away from entrances, then come back with it disabled it’s corrected and plays fast. I don’t know.
 
but maybe there’s a way to trick it into thinking I’m using HR but not? Because when I play on a map with HR enabled, then go save somewhere away from entrances, then come back with it disabled it’s corrected and plays fast. I don’t know.
Either the functionality (new scroll blockers) is recreated or the maps are converted to old tile scroll blockers. I think it will be easier to modify the maps.

But just to be sure, could you try the built-in hrp with these files? (these are for RPU28) https://mega.nz/folder/7pNT1DhC#0ht8nawCPaZp8VdaAby32A
The ddraw.ini and f2_res.ini are all set, just start the game via FO2SFALL.exe that's included. Just to see how fast it works. If it's too slow, it'll have to be the oldschool maps.
 
@kokeeby I’ll give it a go. The other mega RP 2014 didn’t fix anything. Some reason DX9 isn’t working anymore, Ddraw 7 does though.
 
Those don’t work either and I can’t use 8 bit with Dx9 and for some reason I can’t use Dx9 anymore even though looking in the registry it tells me it’s installed. So frustrated. It’s not these modes though, it’s the tiles and maybe it can be tricked? Gotta take me a break.
 
DX9 is not supported in DosBox. DosBox is emulating a simple S3 Trio 64, it doesn't support DX7 nor DX9. But Fallout can run in software emulation under DX7 so it still works. I'll update the maps with old blockers, but it's going to take me a few days...
 
Back
Top