33

I have assembled a retro-gaming PC out of an old Shuttle SN45G with a Windows 98/Windows XP dual boot.

The motherboard can handle 2GB of RAM, but apparently Windows 98 can only handle 1 GiB.

Windows 98 boots fine when I have 1 GiB of RAM installed, but I get the error Not enough memory if I install 2 GiB of RAM.

I'd like to have those 2 GiB of RAM permanently installed as I also have Windows XP on this PC.

I tried setting the MaxFileCache parameter to 524288 in the [vcache] section of system.ini but it didn't work with 2 GiB.

I also tried to limit the RAM to 999 MiB with msconfig advanced settings but I ended up with a very unstable system (I get a black screen or a BSOD every few minutes and I'm forced to reboot).

I thought of trying to limit the maximum memory of Windows 98 to 1 GiB (apparently it can be done with the /maxmem boot parameter, but I don't know how to do it), but I don't know if it would work, and I would like to have those 2 GiB of RAM available under Windows 98.

How can I have 2 GiB of RAM under Windows 98? Or, in last resort, how can I limit the maximum RAM of Windows 98?

Raffzahn
  • 222,541
  • 22
  • 631
  • 918
Informancien
  • 2,657
  • 2
  • 21
  • 35
  • 3
  • What did you set MaxFileCache to? – Algimantas Mar 16 '17 at 08:17
  • @Algimantas MaxFileCache is set to 524288. – Informancien Mar 16 '17 at 19:24
  • Strange, this is the same value that I have. Is the section named [vcache] or [VCache] in your file? I am finding solutions with capitalized letters only and in your question section name is lowercase (though in theory this shouldn't matter).

    There's another option setting MaxPhysPage=30000 in the [386Enh] section of System.ini which limits used memory to 768MB.

    – Algimantas Mar 16 '17 at 19:33
  • @Algimantas [vcache] is lowercase in system.ini, the [vcache] section is in this file by default in my setup. – Informancien Mar 16 '17 at 20:08
  • I know it's possible -- I ran 98SE with 2GB -- but I can't remember how. – Mark Mar 16 '17 at 20:35
  • @Algimantas I also tried limiting the RAM to 999Mb in msconfig advanced options but the system became really unstable. – Informancien Mar 17 '17 at 05:01
  • 4
    IIRC, 999 is already too much. 960 is highest you should be setting there. If that's still too much, try 768. – Algimantas Mar 17 '17 at 07:36
  • Just for reference: Linux systems in that era had just the same limit (for application-usable memory) without either doing very involved stuff at kernel compile time or using the BIGMEM driver that IIRC came with a performance penalty and complications... Also, quite some hardware had trouble correctly maintaining the cache for so much physical memory back then... – rackandboneman Jun 18 '17 at 14:52
  • I've heard stories of people installing the entire windows 95/98 to RAM-disks, that they then packed and unpacked at runtime. I've never tried it though, so I've no idea if it works. Googling for "windows 98 ramdisk" returns links – Ben Hillier Oct 20 '17 at 07:12
  • 3
    @user2109 Mb/Gb is megabits/gigabits (1/8 of MB/GB). MB/GB is megabytes/gigabytes – Matthew Barclay Apr 03 '18 at 14:35
  • @user2109 try to use smartdrv or RAMDISC to consume memory above limit before the windows inits fully (use config.sys and autoexec bat). That works for MS-DOS and win 3.1 but not sure if doable also for win9x but I think it might – Spektre Dec 16 '18 at 10:11
  • Are you also setting a MaxPhysPage value in [386Enh]? – rakslice Apr 21 '19 at 22:01
  • Work. You must disable another menagers like emm386.exe and himem.sys in config.sys and enable only himemx.exe. – Łukasz Włodarczyk Jun 20 '19 at 16:13
  • Don't know if this is related but I remember finding a bug in Turbo C where it would complain about not enough memory when you had more than half a meg(or gig?). Turned out it use a signed comparison and the memory size was being treated as negative, fixed with a very simple one-byte hex edit. This was a while ago so it may have been some other development product or even some other memory boundary. I can't be expected to remember details from decades ago, I can barely remember what I had for breakfast, and it's only 9am here :-) – paxdiablo Mar 05 '22 at 00:55

6 Answers6

27

I might have found a stable way to limit Windows 98 to use only 1 GiB of RAM with HimemX:

  • Install Windows 98 with 1 GiB of RAM or less;
  • Download himemxfrom https://sourceforge.net/projects/himemx/;
  • Extract himemx.zip and copy himemx.exe to C:\Windows\ under Windows 98;
  • Open the Run dialog box (Windows + R), type sysedit and press Enter;
  • Open the file C:\CONFIG.sys;
  • At the very beginning of the file, add device=C:\WINDOWS\HIMEMX.EXE /MAX=1048576;
  • Save the modification;
  • Shutdown your system;
  • Install the 2 GiB of RAM;
  • Start the system;
  • Windows 98 should now only have 1 GiB of RAM although 2 GiB are installed and it should still be stable.

You can also add MaxFileCache=524288 under [vcache] in system.ini to ensure that Windows 98 doesn't eat too much RAM for its cache.

Limiting RAM to 1 GiB with HimemX seems like a stable fix, but I couldn't get the 2 GiB of RAM to work under Windows 98. But it still enables use of 2 GiB of RAM under another OS in a dual boot setup.

P.S: If there are no answers posted in the next few days that explain how to fully use the 2 GiB of RAM under Windows 98, I'll mark this one as the answer.

Raffzahn
  • 222,541
  • 22
  • 631
  • 918
Informancien
  • 2,657
  • 2
  • 21
  • 35
26

The Windows 98 memory manager only supports a maximum of 1GB. This amount of memory was considered beyond huge for the time, and by the time people commonly had that much or more memory, Microsoft expected people to be using either newer versions of Windows 9x, or Windows NT.

From Raymond Chen's blog The Old New Thing:

Windows 98 bumped the limit to 1GB because there existed a vendor (who shall remain nameless) who was insane enough to want to sell machines with 1GB of RAM and preinstall Windows 98 instead of the much more suitable Windows NT.

The linked blog post also goes into the technical reasons why.

If your workaround works, then stick with it. You'll only ever be able to use 1GB of RAM with Windows 98, but XP will be able to make use of the full 2GB.

Dranon
  • 1,008
  • 1
  • 9
  • 20
  • 12
    For reference, 64MB was common for Windows 98 mid level PCs, 128MB to 512MB were enthusiast's configurations... – rackandboneman Oct 11 '17 at 10:32
  • 3
    I am not impressed that a vendor built such machines. What impresses me is that the vendor was influent enough to make Microsoft take their requirements into consideration. – dim Oct 23 '19 at 10:45
  • I recall my 98 box had 32mb as default and I upgraded first to 64 then later to 128 . The difference in operation between 32 and 64 was very noticeable, the same way you can tell 95 was much happier with 32 over 16 but if memory serves (no pun intended) less so going from 64 to 128 . It was well past it's sensible life by then though as this was around 2000 which I jumped to . Virtual memory in 98 is worth playing with though unless you have 512 or more maybe. – AndyF Jan 08 '20 at 18:37
  • 3
    And BTW, even 32-bit linux systems in the early to mid 2000s needed serious know-what-you-are-doing if you actually wanted more than a gigabyte available to applications - there were "bigmem" kernels that could cause serious performance issues on the wrong hardware (see my next comment about cache...), there was the option of screwing with PAGE_OFFSET, and a lot of ways to get it all wrong.... – rackandboneman Feb 26 '20 at 16:59
  • 3
    Oh, and ... a machine of that vintage supporting 2GB didn't always mean L2/L3 caches were functional across all 2GB. That easily left you with an accidental NUMA box and interesting performance surprises.... – rackandboneman Feb 26 '20 at 17:01
  • I always love a bit of Raymond Chen :-) For anyone who's interested, there's a "Dave's Garage" on YouTube that covers history as well (he's an early-ish ex-Microsoftee). – paxdiablo Mar 05 '22 at 01:02
10

I have never tried it, but there is apparently a third-party patch for the Windows 98 virtual memory manager kernel driver that enables it to support larger configurations, up to 4GB. See this newsgroup post for details.

Jules
  • 12,898
  • 2
  • 42
  • 65
  • 1
    @Wilson - I'm not convinced there is anything else to add to the answer. As I understand it, if you install the linked patch, Win98 supports 4GB of RAM.... That's all there is to it. – Jules Aug 02 '18 at 18:24
9

Spend $24 and get R. Lowe's patch for Windows 95 to ME. I use it on a 4GB Windows 98SE computer - Rock Solid.

http://rloew.x10host.com/

This is the absolute best solution.


Update 2019-10-23: The above website is now down, and it seems the developer unfortunately passed away. Following this, somebody made the patch available here:

https://archive.org/details/PATCHMEM

And it can now be downloaded for free.

dim
  • 1,608
  • 12
  • 17
Aoresteen
  • 151
  • 1
  • 2
  • 4
    I did not downvote, but I suspect whoever did thought your post sounded more like an ad than an answer. You might want to tone it down a bit. "This thing exists. It might solve your problem because {...} . It worked for me in a similar situation. Downside is it will cost you $20." – RichF Jul 19 '19 at 18:08
  • 3
    Additionally, you should use the direct, permanent URL http://rloew1.no-ip.com/Programs/Patchm.htm instead. Additionally, please disclose any conflicts of interest you may have in suggesting this product. – wizzwizz4 Jul 19 '19 at 18:34
  • 1
    Thanks. Did not want to sound like an ad. Just a user that needed a 4GB WIn98SE stable computer for my recording studio and this worked. – Aoresteen Jul 19 '19 at 18:54
  • Aside: there's also a demo version available from the link wizzwizz4 posted, so the poster could try before they buy. – Tommy Jul 20 '19 at 13:57
  • 1
    Neither URL now works, the no-ip one doesn't resolve, and x10host shows account suspended. – Soruk Sep 19 '19 at 13:37
  • Not sure I consider Win98 with 4G to be retro. Reminds me of the old joke of the axeman who'd used the same axe for fifty years. He'd replaced the handle 17 times and the cutting head 12 times. But it was still the same axe :-) Though I guess my trusty BBC Master has an HDMI converter and a USB "hard disk" so I can't really complain. – paxdiablo Mar 05 '22 at 01:06
6

Purposely registered here to let know. Sadly can't comment due to the 50 reputation limit

Traditionally, the solution provided by Aoresteen is the best. Unfortunately, rloew has passed away in September 2019. Rest in peace

The full version of his patch is now available for free, on the Internet Archive or Phil's computer lab.

Stephen Kitt
  • 121,835
  • 17
  • 505
  • 462
TAbdiukov
  • 982
  • 9
  • 29
4

I managed to get my 2GB RAM dual Pentium III vintage rig project to use 1100MB RAM.
Built up the Windows 98SE software on VirtualBox first.
Then I just transferred the virtual disk to a physical one with 7-zip and sys command to make it bootable on the vintage.
Runs like new, AGP aperture is much more stable. Come to think of it, 1GB RAM on a virtual machine with 4GB RAM-Disk as a swap disk really works well too.
Perhaps someone could make a RAM-Disk for DOS for say 3GB RAM in XMS as a scratch disk.
Anyhow, there is no way Windows will use more RAM unless system files are replaced with better ones that are either in a different language or some dope decided to put a price tag on. Windows millennium can run with 2gb ram perhaps someone could port these parts to 98se

ZabuzZ
  • 41
  • 2