EMS was developed for 8086 PCs that had only 20-bit address space (1 MB). At first EMS was used as an expansion ISA card with it's own chip and memory. You only had to load a simple driver and everything else was done through registers and ISA bus in hardware. Such board provided 64 KB of RAM within 1 MB of address space and had NES mapper-like logic that could move that 64 KB window within it's own memory. That way allowing for software to access more than 1 MB of RAM and to install way more memory than 8086 PCs were designed for. It was designed for productivity software, like spreadsheets. Soon EMS started to be implemented in motherboard chips for later 80286 systems. Where you could have up to 16 MB memory installed and accessed as extended(XMS) memory (similar way of using a 64 KB window above 1MB address space), but for compatibility reasons EMS hardware emulation was also provided. 80386 CPUs were finally 32-bit and had 32-bit address space (4 TB) and had virtual addressing which allowed to map any memory region to any other address. This allowed for EMM386 driver that was able to use above 1MB memory mapped to 64 KB window below 1 MB address space just by CPU alone. This made EMS really fast. Wolfenstein 3D could use XMS or EMS, but John Carmack said that EMS with EMM386 was faster than XMS (if I remember correctly). There was a short period when games required 1 up to 3 MB of EMS along with as much free memory below 640KB as possible. Such games were 16-bit and were meant to run on 286 CPUs and better. However this didn't last long, since 32-bit DOS extenders gained popularity like DOS4GW that was displaying it's initialization in most later DOS games. The biggest difference 32-bit mode offered was flat memory model. No more Conventional, upper, EMS, XMS memory. No more near and far memory pointers - in general DOS was 16-bit with 20-bit address space. This meant that all of memory was accessed through 64 KB chunks (near pointers) and to switch to other chunk you had to use far pointer that was 32-bit (yet only 20-bits could be addressed). 32-bit mode introduced just one regular pointer type, like it was defined in C/C++ standard. 32-bit DOS Extenders worked like a true 32-bit OS run on top of MS-DOS, similarly to Windows 95 and 98. They provided DPMI (DOS Protected Mode Interface) that was designed and implemented by various companies. This is why it's possible to run DOOM, Descent, Duke Nukem 3D, Quake and many other 32-bit DOS games within Windows 9x or even in Windows 3.1x, because Windows itself provides DPMI. There was also VCPI introduces earlier with EMM386 that allowed to 32-bit DOS Extenders to work when EMM386 was loaded at the start. Overall memory management in DOS days was a mess, however when 32-bit software got popular memory management was handled by the software itself. In fact we did a full circle, since in modern programming the most efficient way to optimize code is to organize data in smaller chunks that can fully fit into CPU cache. Modern CPUs have around 64 KB of fastest L1 cache per core, so if a programmer manages to keep the data in a 64KB chunks for a stream of instructions it will be processed really fast. I didn't mentioned about Unreal mode (hacked real mode where you use full 32-bit memory addressing) or that the true limitation of EMS was that the program code was limited to conventional 640 KB and only data could use EMS - this is why TES: ARENA stopped working despite having a lot of free EMS memory. 32-bit flat memory model allowed to use all the memory in every possible way.
Nicely done. This is one of the hardest things for me to grok about DOS programming -- near/far pointers and segmentation. I learned C in 32-bit Linux, and the idea of not having a 32-bit flat memory model (and int64 types!) gives me the same feeling as when you place a large mirror on the floor of a room with vaulted ceilings, then try to step on it.
"You only had to load a simple driver and everything else was done through registers and ISA bus in hardware." Not quite, you had to specifically write your program to use EMS, it most certainly was not trivial or transparent, normal far pointer methods needed explicitly augmenting with EMS page management, leading to a dramatic degradation on the performance of a native segment:offset pointer in real mode.
L1 cache usually has 64KB broken into 1024 lines of 64 bytes each where each line is memory aligned. Keeping commonly used data within chunks of 64 bytes and aligning objects to 64 bytes can improve performance.
Back in 1992 my father bought a 486 DX2/66. He paid 3500 bucks at a local supermarket chain and this was for the 4Mb RAM version. We carried the MASSIVE case to our car when I saw that on the box there was an X on 16Mb RAM! I told my father to run! This 12Mb costet enough to buy an Amiga! The 16Mb were very handy, especially after a friend of mine installed QEMM. Wing Commander 3 ran like hell, System Shock CD did also.
I remember when MEMMAKER came out as that was a lifesaver with this sort of thing - a semi-automatic way of puting things in upper memory and if I remember correctly, the order they were loaded in the config.sys also had an affect on the amount of free conventional memory being available.
Yeah, I used the OPTIMIZE which is the optimizer of QEMM386, a far advanced EMM manager. And it was huge. I usually got 634kB of conventional RAM free.
That is correct. When HMA (High Memory Area) and UMB (Upper Memory Blocks) were enabled, DOS would attempt to load parts of itself and drivers, such as the mouse driver, into HMA or UMB when possible. The loading order was important because the system had a set sequence of where to try loading first, then second, and so on. Drivers needed to be aligned to specific memory addresses, and the reserved space for each had to be in multiples of a certain size. If drivers were loaded in the wrong order, this could cause small gaps through fragmentation that could no longer be used, leading to wasted space. However, by loading in the correct order, you could pack the available memory more efficiently.
This takes me back to the days of having a separate boot floppy with a super customized Autoexec.bat and config.sys files on it for my 486 PC. In it's later days I had so many devices in the machine I needed about a dozen different configs to support various games. I ended up using MEMMAKER along with QEMM (Quarterdeck Expanded Memory Manager) along with a LOT of tinkering and reboots to help get everything setup. It was almost like a dark art! I also had a config or two setup to use different amounts of system RAM with the SmartDRV utility that would allow most of the game data to be cached from the HDD into RAM. It was awesome for certain games like the Might & Magic 4 or 5 that normally accessed the hard drive a lot when moving around the game world. These days you sometimes have to update a GPU driver or tinker with a software setting to get certain games running well, but it's nothing at all like things were back in the DOS days!
Yep. This was the way. In the last days of DOS, darn near every game had a carefully crafted boot floppy to get the right drivers, memory managers, and random TSRs for that specific game. I remember Wing Commander IV, Ultima 7/8, and MechWarrior II being particularly finicky.
I remember the ram on our home 486 was set up to be xms, but for some games like El-Fish I needed to switch it to ems with some batch file my dad made me.
you can change the config.sys and set DOS=HIGH,UMB also limit the amount of BUFFERS and FILES. This will free base memory to some point, but not indefinetly of course. The default with 1MB of RAM schould be somewhere like 20 BUFFERS and 30 FILES. so lowering it will probably help a little bit.
1. Even if you have only 1 meg of RAM you can get some either XMS or upper memory. To do this, you just need to disable BIOS shadow in BIOS settings. 2. To move EMS page frame to the UPPER memory when using TurboEMS you need to have some upper memory installed (or enabled). You may force TurboEMS to put page frame there, but it just copies data from disk to empty space and they are lost, no doubt! 3. 386 and 486 and higher CPU's have memory mapping unit (MMU), that is much like to EMS but uses 4k pages instead of 16k. But, to activate the MMU, you need to activate protected mode (PM). this is exactly what EMM386 does. After CPU enters protected mode, it can map any logical address to any physical, so DOS programs can think they access memory below 1 M boundary, but physically this memory can be mach above this. But ther is a little speed penalty, to manipulate MMU, you need to switch to "supervisor", running at Protection Level 0 and then back to Protection Level 3 where DOS programs are using emulated EMS. The difference is subtle, but can easily measured by Checkit (5% usually)
This is something I need to spend some time on - but it sounds very interesting. With 1M, I couldn't start any of the DOS memory managers (neither HIMEM nor EMM386). HIMEM refused because there wasn't any XMS available. And EMM386 needs HIMEM or similar to work.
@@bitsundbolts BIOSes and chipsets of all 486 and late 386 support and use so called shadow memory. This shadow memory is a part of upper 384 kbytes of 1 meg. Shadow memory speeds up BIOS routines because it's as fast as other 32-bit memory and the BIOS is either 8-bit or 16-bit wide, and substantially slower. But, it is usually possible to disable this feature in the "extended" BIOS setup menu. Most, but not all chipset relocate these 384 k above 1 meg, if the shadowing is disabled. In some cases 3rd party utilities like Lastbyte can make upper memory writable, so it can be accessed as UMB by dos.
Very interesting, I never knew third-party memory managers like TEMS existed back in the day, only EMM386. I distinctly remember some out of memory error when trying to play a game, and found the solution in the manual was to use EMM386. I followed the instructions to edit the config.sys to load it, which of course didn't work the first time because of a typo, but eventually I got it working. Obviously I had no idea how it worked, but I didn't really care, I just wanted to play my game! It wasn't until many years later that I learned it used a 64K window to access the rest of the memory, although I never really looked into it much further, so thanks for explaining it in a lot more detail.
For my fractal generator I used VRAM instead of EMS/XMS, 'cause it was simpler to just push data there and avoid all the mess with different memory managers😸 It required at least 1.5MB of VRAM, but in early 2000s it was rarely a problem.
Oh wow. I did a lot of work on the Apricot (it's named for the fruit, & it's pronounced the same) back in about '82. They were absolutely beautiful machines, & deserved to be better known that they were. We ran both MS-DOS & Concurrent CP/M on ours, & used it for CAD work. You're going to have a hard time finding a keyboard for it; this was before there was any such thing as standardised keyboards, & the Apricot keyboards had a row of programmable keys with an LCD panel above them that you could program labels onto via software, so you could treat them as menu keys in your programs.
The plan for the Apricot is to get it to the UK some day. Someone with a lot more knowledge than I will restore it, get the correct keyboard, and probably donate it to a museum. I think this is the right thing to do. I don't need to keep and possibly destroy more due to lack of experience with such devices.
Remember when 575kb was not enough, and you had to beat and squish DOS left and right to get 590 or 620kb or so. And here I'm watching on a 16gb Tablet, wondering if my 64GB Laptop will last me another year 😅
What I find more amusing is that we went full circle with GPUs using HBM which is basically static ram. Yep, let's just have 16GB of static RAM, why not.
@@monad_tcp Pardon? HBM is a form of a DRAM interface and construction method. DRAM is 1 transistor per cell, SRAM is typically 6. Latency of HBM is similar to modern SDRAM, it's only bandwidth optimised. Which is fine since GPUs are masters at latency hiding, they know to execute a workload just when the memory request is about to be fulfilled.
I cant tell you how long I played with the dosbox conf to get a working Arena shortcut from the bare floppy files. It was all revolved around ems errors. Thank god that game still has an active community
When Turbo EMS was loading into conventional memory after you enabled upper memory, did you try setting its driver to "DEVICEHIGH"? (...of course, that might be in part 2.) Great video!
Indeed. Given the style is presented as a journey, I presumed these settings would appear in Part 2. I commented because the video annotation/text pointed out that TEMS was still mapped in conventional memory. All in all, I'm looking forward to Part 2.
DEVICEHIGH, LOADHIGH etc. require upper memory block manager like EMM386 to be loaded first. Without upper memory manager loaded, the "Upper" line in the MEM output will always be zeroes. DOS=HIGH requires HIMEM.SYS to be loaded first.
To use high memory you need a high memory manager like himem.sys. then you can use loadhigh or lh to load programs to memory. Anyway, that is useless with some old programs that loads directly to base memory ignoring operating system memory addressing, so, the operating system will load it on base memory or will cause an error in the program.
Remember the upper memory blocks unused space above 640k but below 1mb plus HMA (high memory area) first 64k above 1mb due to intel wrap around bug. Then loading dos high, and drivers into umb/HMA then reclaiming monochrome and Ega regions above 640k. Use VGA area up higher in UMBs for graphics.
Ah, the algorithm is getting better at mind reading, you started lemmings just as I was typing the commands for starting it. I've been looking at how people solved the levels, so maybe this was recommended because of that.
The absolute horror, named MS-DOS! 🤪 The "Dylan" of computing... Strangely I loved this video, thank you very much and have a great day! I had no experiences with this madness. I came from VC-20, C-64, 128, Amiga 1000, 4000/040 and then my first PC in 1997. Yes, I am old.
Yes, it had a small LCD to display functions and the clock if I'm not mistaken. I believe the keyboard also had a 9v battery that was used to power the real time clock. So, if you disconnected the keyboard, you might have lost the date/time settings. But I'm not sure about that. Just stuff I read online. It will be very difficult to restore or even use that machine. I guess I will keep it until there's an opportunity to give it to someone else who knows what to do with it.
I tried QUEMM for a day before seeing compatibility issues. Unfortunate as it used less conventional memory since it combined HIMEM and EMM386 but yes I saw the same application issues as you saw in TES Arena. Ended up DEVICEHIGH'ing as much as possible and sticking with the built in drivers. FreeDOS and its device drivers these days is the best of both worlds; compatible and compact! My 386 came with 4x256k so yes I had the fun of trying to squeeze everything out of a 1MB system. Eventually got +4MB, 5MB was awesome but you still had to be conscious of conventional memory usage. Started using Linux and what a world, it was all just memory, with swapping a core feature and handled for you - it became so easy!
For my own game written in NASM without a DOS EXTENDER, I just take the megabyte at 3 MB to 4 MB without asking DOS for permission, and funny enough, it never crashed, not even after Windows 95 and 98 had loaded and reloaded (before and after my game), WOLF32, DOOM and QUAKE as well. EMS, XMS, UMB and all of those are DOS managed to make DOS happy. But as soon as you have a 386, why make DOS happy? I just found it hilarious that after all the effort to use XMS to be allowed to use upper memory, it wasn't even required, and all the conventional memory was basically free. My PC -> Video Game video explains more
I might have been doing something similar, I can't remember ever doing any page swapping except for the video memory. I was also just 11yrs when I started to learn assembly. I love NASM, I really have an ick for GAS syntax. I have also used FASM and RosAsm and some HLA
Oh wow Arena! That was one of my favorite games back in the day. You can swing by holding the mouse button down and swiping in the direction you want to swing with the mouse. Depending on your weapons you can swing horizontally or even vertically. I was very concerned when you didn't load your mouse driver. I don't even know if you can play the game without a mouse lol.
Haha, thanks. I'll try that next time. Good that the insufficient memory warnings and the horrible performance prevented me from playing that game without a mouse.
DOS=High,UMB in config sys makes it even better. This loads dos itself into high memory as well, frees up more conventional 🙂 I didnt even know about Turbo EMS and looking at the chapters of your video I highly assumed beforehand it would be immediately fixed with himem and emm386 😀
The unknown card is probably something like an early hardcard. Those Atmel chips look like EEPROMs or flash chips and a section of the DIP switch block is labeled "prog"
@@glenncaughey5044 It depends on the mainboard or what hardware the PC is equipped with. It probes the UMA area and tries to determine which of that is mapped to an external device of some kind and which is in your RAM. The more UMA it can discover, the more TSRs and drivers it can shovel in there. Of course also depends on how large your CDEX driver is and sound card stuff and what mouse. Some machines just turn out better than others.
13:34 I was amazed you left this set to None, thinking that it would default to use conventional memory. I saw you struggle later and thought it was just an extended bit of acting since you said you already tested ahead of time. But then when you did finally get around to specifying high memory and it didn't work, could that be because you didn't have himem.sys loaded? This video was kinda confusing because I thought you would focus on how memory would work but most of it is spent fiddling with a third party swap drive utility, with the "proper" way to use your ram tacked on to the end. I forget which version of DOS 6 it was, 6.0, 6.2, or 6.22, but istr a utility called memmaker included that would figure out how to best manage and get the most free conventional memory for you. Using things like DEVICEHIGH in CONFIG. SYS instead of DEVICE, LOADHIGH in front of TSRs in AUTOEXEC.BAT, and somewhere DOS=HIGH,UMB to get as much of DOS out of conventional memory as well. I never needed EMS, but I think memmaker had a prompted option to set a specific size of it through the use of emm386.
It would probably need HIMEM.SYS to access the upper memory area since HIMEM installs the relevant interrupt vectors to be able to talk to that memory in the first place - I believe those routines are an emulation of the old Intel "Above Board" which exposed 384K in a different manner from the 640K of conventional memory.
Man I spent so much time trying to get enough conventional memory free to run Serpent Isle and Ultima 8 on my friend's 486. I had installed Doublespace to get more from his crappy hard drive... only managed to get U7: The Black Gate running. That era of games from Origin had their own EMS manager called Voodoo, and you needed like 590k conventional mem free.
Of all the games I played Ultima 7 was by far the hardest one to get it to run (with sound and mouse). The conventional memory requirement was absolutely brutal! I had to make a custom boot floppy in the end.
Man, I would have been really disappointed if I got this game as a little kid and never got it to run. Thankfully most games did run, I can remember that there was something that I never got to run
the Apricot is pronounced like the fruit Apricot , they also did IBM MCA units with remote controls for security, built in monitor stand like the amstrads. the keyboard i think was xt type but had extra LED's and system buttons on the keyboard. it may not poer on with the relay trigger (later MCA models were control with a small white one button remote for power on and unlock keyboard) , that was the QI300, it also had custom disk bays and a handy drawer to fit the remote (hidden of course and not mentioned in the manual, the sales man told you)
Not sure if it was mentioned by someone else before, but after loading DEVICE=HIMEM.SYS you can try loading VEM with DEVICEHIGH= . Also do DOS=HIGH,UMB and in the autoexec.bat file, instead of just loading TEMS normally you can try LH TEMS command (LH means load high). I've never seen TEMS before, but I've used LH with mouse and sound drivers etc to free up some conventional RAM
The card seems to be flash memory for a Cisco It looks like Turbo EMS ONLY supports copy to RAM, so on an 8086 it can use hard disk, on a 286 it can use extended, same as "Above disk" which also supported extended, but cannot use upper memory unless you can also enable read/write upper memory in BIOS or with other software (real mode UMBs) You also didn't enable DOS HIGH - you might be able to run with Turbo EMS and DOS HIGH relieving some lower memory. Also, does the system support chipset created EMS (need an appropriate chipset driver)
@@bitsundbolts Turn a PC into a PIX. (It's an ISA card, so somewhat old PC) You've throw away USB sticks with more memory, so it's pretty useless for anything other than a museum. (and b-roll)
EMS was more or less just a crude Memory Management Unit (MMU) for the 8086 which didn't support any built-in virtual memory from itself. It's not even that different from the virtual memory mapping done by modern operating system kernels, but done on a micro-scale. In theory you could do basic multitasking by allocating more than one EMS page frame just like a virtual address space in a recent OS. It became kind of obsolete when Windows just kicked the MS-DOS routines to the curb on boot and just did memory management on its own.
Your unknown ISA card has only Flash memory chips, so unfortunately it is not an EMS card :( However, 2MB of Flash (ROM) is very unusual.... I'm also curious to know what it could be!
That's the flash memory card for the first generations of the Cisco PIX. Cisco replaced them with a simpler card with much more space. (I kept that card from our ancient Pix 520.)
You can in fact use Himem & Emm386 with 1MB ram. You get UMB, and a bit of XMS/EMS to boot. 👍 Win3.1 (std mode) will run in that config. Did it on a Tandy 1000RSX back in the day before adding 8MB to it.
I would not be surprised that the reason that TEMS didn't work properly with the page frame in upper memory was because there was nothing mapped there (yet). I'm not familiar with TEMS, but as it consisted of two components - a device driver and a TSR - it could very well be that the TSR depends on the device driver setting up things properly in order for it to work. This is basically also what HIMEM.SYS en EMM386.EXE do - they work together to setup the proper environment for EMS emulation to work. HIMEM.SYS provides the XMS interface (and API) and EMM386 is able to use that API to use XMS memory as EMS. The only thing that EMM386 probably does slightly differently is that it does the setup of the 386 pagetables itself so that it can provide both UMBs (that so-desired set of memory blocks in upper memory where you can put most of DOS and some of its device drivers) and a 64k page frame for EMS emulation. It is also interesting to note that there is a config.sys statement called DOS, which can have one or both of the following keywords in it: HIGH and UMB. DOS=HIGH will transfer a large portion of the DOS kernel to the 64k (minus 16 bytes) memory area right above the 1MB barrier and basically abuses a difference in hown 286+ systems handle segment:offset combinations. On an ordinary 8086/8088 (or compatible) CPU there are only 20 address lines available. This means that when the program counter (or any segment:offset combination for that matter) reaches absolute address 0xfffff, it will simply wrap around zero. However, on 286+ systems with their wider address buses, this is not the case. So if you then carefully craft an address with a segment in 0xffff, any offset abot 0xf will end up in extended memory. Since this could lead to compatibility issues with earlier software, control logic was added to the AT (and later systems) to force address line 20 (A20) to a known state in order to provide compatibility with the earlier PC and XT. This is the so-called A20 gate. The A20 gate is controlled through HIMEM.SYS and DOS=HIGH allows that 65520 byte segment to be used for programs and data, leaving more conventional memory available to programs. Something similar happens with DOS=UMB. UMBs are provided by EMM386 and DOS=UMB makes these upper memory blocks available to MSDOS and programs to be allocated just as if they were conventional memory blocks, once more leaving more conventional memory available to programs. With a proper setup of CONFIG.SYS and AUTOEXEC.BAT it should be possible to have between 602-615kB of conventional memory available, even with things such as mouse, sound and CDROM drivers loaded. DR-DOS (the DOS compatible variant of CPM/86) and later on OpenDOS and Novell DOS had another trick up its sleeve: so-called DPMS and CLOAKING. This allowed programs to be loaded into extended memory, leaving only a bare stub in conventional memory to talk to it, thus leaving even more conventional and upper memory available to programs.
@@monad_tcp No, A20 is one of the address lines on the CPU (and f.i. the ISA BUS). The keyboard controller only provided the possibility to force it low or high through an I/O port. Going through the keyboard controller was rather slow so later systems provided similar functionality, but through the so-called fast A20 gate.
DPMS wasn't a feature of Novell DOS or any other non-Microsoft DOS, it was a feature of the 80386 processor which provided memory virtualization on its own. "Protected" mode means the memory was virtualized and the DOS memory map wasn't a problem anymore. That's how Windows 3.xx and 95 worked, by bootstrapping through a DOS environment, entering DPMS and then the entire operating system was basically a giant DOS application.
@@Stoney3K Not entirely correct. Protected Mode and Virtual 8086 mode were features of the 80386, as was paging. DPMS stood for DOS Protected Mode Services. It allowed programs such as device drivers and TSRs to load themselves into extended memory and to run in 16-bit or 32-bit protected mode, leaving only a very tiny stub behind in conventional memory. So DPMS in and of itself was not a feature of the 80386 processor, it just made use of its extended features if they were available. The minimum requirements to run DPMS were an 80286 processor.
@@damouze Windows also provided a DPMI interface to the DOS environment running under Windows, so it was possible to run games that used DMPI under Windows too.
Also minim sector sizes are at play with memory emulator through swap. You have 16k pages but clusters could be larger or smaller. Also os is doing memory things with the hard drive which further taxes the available memory and possibly pages.
I have a few 1980s Apricots in my collection, so I would be happy to advise you on getting it running and point you in the direction of resources. Regarding memory, that Apricot you have can be upgraded to 768kb of RAM, which I believe the implementation of MS-DOS could access.
Hey, now I got the comment! Thanks for your offer to help! I would obviously happily accept any help with the apricot! We can continue via email. Thanks again!
On the Apricot, I don't know how far down the rabbit hole you want to go but it really shouldn't be that hard to ID the keyboard controller, find the data sheet, find out which lines do what then tone them out to the back pins and create a converter from AT, at the end of the day all keyboard controllers work on the same inputs and outputs, the only changes are to the pinout of the connector.
The motherboard doesn't have a keyboard controller, it's built into its keyboard. Unfortunately, that means you'd need a microcontroller to take the place of that.
Here we have 100ns memory, and not much before that there was 200ns. :) It amuses me that round-trip ping time to my NAS in my home network in 2024 is faster than the memory seek time on my first computer.... Also, love the videos. :)
@@bitsundbolts The first PIX firewalls were basically 486 machines with ISA slots. I think Clabretro made a video about them a wile ago. I beleive that this card was an off-the-shelve one made by "Producivity Enhancement Products" so Cisco just bought it in. I'd assume that there is either a DOS driver for it (if you can find it) or that it has it's own BIOS on it which makes it appear as a normal disk drive.
I'm not familiar with TEMS but the question instantly arose in my head: does it do any 386+ specific memory paging? EMM386 is, essentially, a lightweight hypervisor for DOS, it shuffles memory around as it provides it for the rest of the OS, and this is what can fill the UMB area as well as the EMS page frame with memory pages. If, as I suspect, EMS doesn't do this, then it copies the "swapped" pages to the frame that needs to be a proper 64kiB RAM area - and as TEMS does no paging itself, there won't be ANY memory in the upper area. So it tries to copy the selected pages to the specified E000 segment - but it won't be written there at all and it can't be read back either. So it needs existing RAM memory to use as a page frame, thus it must use some lower mem - except if you use some other trick to make that shadow area writable. Which can open another can of worms, but doable. Most convenient if you don't even try to use that memory as UMB then. But if TEMS is a full fledged memory manager in a way like EMM386 or QEMM are, then - I dunno.
I love that Turbo EMS lets you go full ridiculous and presents the idea of having the swap on a network drive as something you would even consider doing. I can only imagine somewhere that to offset the cost of all the networking hardware and the server, some company had this great idea of all the money they "saved" by having all the computers connected use the same network drive for all of their EMS "needs" instead of buying RAM =p What's even better is DOS network drivers tended to need a good chunk of conventional too so you'd need that simulated EMS even more. I'm in awe of just how slow this had to be hahah
Well, I had a compact flash as a hard drive and it was painfully slow. Now think of an older spinning drive... And then comes the network latency, I guess... Unusable in almost all situations.
I mean, if you're only running productivity applications, it would probably be fine for bulk storage that isn't accessed frequently. Games are an absolute torture in terms of computing. Nobody in the 1950s imagined we'd be running millions and millions of computations every microsecond just to get a picture on the screen, and then read the user's input only to do it over and over and over.
Ahh, memories of moving stuff into HIMEM and a few other tweaks to get stuff to install and run. For some reason the PB640 had the base memory set to 512K as well?!
But what is turbo EMS meant to do if you have extended memory?? I get that if you don't you can use the HDD... but if MSDOS does the trick, what turbo EMS would do differently??
EMM386 which ships with DOS emulates EMS hardware by using 386 hardware feature, allowing it to remap any memory from XMS into a 64k window in sub-1MB region which can be accessed by EMS compatible software written for a 8086, which can directly only address 1MB memory total. If you have an earlier computer without 386 features, you can use TurboEMS to emulate an EMS device. On a 8086, it can emulate EMS by copying data between EMS window and disk upon any EMS mapping change command. On 286, it can copy between EMS and XMS instead.
Turbo EMS may not have worked with the Page Frame in the upper memory region because the motherboard chipset is interfering with using ram between 640K and 1 MB. Real mode access to the memory became a lot harder when IBM explicitly blocked access to it in the AT chipset that all the clones copied. Check your Bios shadowing options You might need to enable/disable shadowing for that region for it to work or some other bios option. EMM386 made a lot of things easier at the expense of forcing the system into protected mode.
When I was a kid, this was back in the early 90's, my dad had two boot modes for our PCs, emm386 and no emm386. I still don't understand it to this day. It seemed that EMM was for my DOS games and then I think the other mode was for games or things that didn't support it, but I'm not sure.
It may be related to real mode vs protected mode. Some applications don't like protected mode and therefore EMM386 isn't an option (because it switches the CPU into protected mode). That's another huge topic on its own.
I have a Zenith 8088 Laptop computer that only have 640k base memory and two 720kb floppy drives it runs at 8mhz in the fastest speed, Blue/Grey monochrome LCD display. no hard drive. I had to hand craft my own dos boot disk to fit the entire dos environment on a single 720k disk and then put compatible games/apps on their own disks in drive B. using limited hardware sure has it's challenges but it is quite fun to mess around with too when it works
@8:55 That's not an EMS expansion card, those four big chips on the Left are 4Mbit Flash ROMs, the one in the middle is a 256k EEPROM (maybe a BIOS for the card?), no RAM at all on that card. I can only assume it's some kind of software-in-ROM type thing.
i think you should postpone any videos you're working on and start doing the IBM. that's a treasure! :) very interesting video, it seems DOS is not that simple after all
EMM386 puts a 386+ into V86 mode so it can magic up a page frame in above 640K using the page table. I'm not sure Turbo EMS can do this. It can probably only produce a page frane above 640K in areas where there's actual Ram visible.
Apricot was an early British PC clone brand from a company called ACT. A lot of their machines were not very compatible with the broader PC ecosystem, for example using their own floppy disk format. Software which mostly used the BIOS routines would work okay on an Apricot machine but anything which directly addressed the hardware tended to fail due to some architectural differences and proprietary nonsense. This hurt their value in the market and they are honestly still kind of a nightmare from a hobby perspective for that reason. I have an Apricot Portable which is essentially a doorstop because it uses a nonstandard floppy drive that I have so far been unable to repair and cannot replace.
You have to differenciate between memory addresses and actual memory. In the real mode MS-DOS uses it is limited to address only 1MB + 64k -1. The 640K/384K split is kind of arbitary. 640K are actual memory, everything above that are addresses reserved for memory mapped devices and ROM. When you had 1MB, you only had 640K mapped and left the rest unmapped. When you tried to put TEMS page frame at E0000, you put it where no actual memory was mapped. But due to the way that TEMS works, it needs actual memory mapped there to hold the page that it retrieves from the HDD. With 1MB memory installed you could have used HIMEM and EMM386 to map soma of the unused memory in the UMA and the HMA. Then you could have put the page frame on memory in the UMA to free up conventional memory. Then the rest of the otherwise unmapped memory could also have been used as EMS in addition to EMS backed by the HDD. Also the performance with a real hdd with FAT cluster size of 16k or smaller would have been interesting. Flash is not really optimal TEMS since, the erase blocks of flash are usually mich bigger, something in the range of 128K. So causing a lot of 16k writes is really not ideal. Also someting to be aware of for your upcomming videos: at one point the german translations for upper and high memory were swapped and only later (I think with windows 95) they where swapped to make them align better with the english original.
@@bitsundbolts oh interresting. Maybe because it's in real mode and not virtual 8086 mode yet, it isn't mapped at all and himem sys expects it to be already mapped after the 1MB. Would be interresting to see if it works with a different PC/BIOS. Maybe I give it a try later on my A2286 bridgeboard, which has 1MB. I belive himem worked there, but is is some time ago I set that up. But EMM368 won't work there of course, because it's an 268. Butit can emulate EMS through the DP RAM using the amiga memory, and now I am noticing I am going offtopic...
@@bitsundbolts I just tested it with my bridge board and it detects the 384K as XMS and himem.sys loads with that. If you want I can test TEMS there. I also made pictures of msd
@@bitsundboltsJust need to disable Shadow Memory stuff in BIOS. It’ll work, trust me. Himem & Emm386 will get Win3.1 (std mode) running on 1MB ram. I did it on a Tandy 1000RSX back in the day before adding 8 MB.
Interesting. Did you disable something in the BIOS? Shadowing as many have suggested? If you can, please run TEMS if you have the time, I am curious if you can get the page frame placed in upper memory and can use it too. I could force the page frame to be there, and it showed up in CheckIt and MSD, but I couldn't use it. I'm currently not in Dubai and can't test it. Thank you!
Ha, I know where the top chip at 1:18 came from! 😅 I also didn't play Arena back in the day, I was more into Might & Magic at the time. Oblivion was my first TES game, but I did go back and try Arena a few years ago. All that procedurally generated goodness must've been pretty impressive at the time considering the seemingly impossible scale of the game world, even though the repeating patterns were very obvious. Wouldn't have bothered me at all as a kid though, I still would have played it like crazy!
Hehe, yes, that memory chip is from your Voodoo 2. I took Arena because it was a game on a list that requires EMS. Without, it wouldn't work - well, to get a game I could use for my experiment. My first TES was also oblivion - and I finished it! It gets a bit repetitive when you have already finished most gates (which are also very repetitive) and recovered most of the Sigil Stones. Still, it was fun. O had a character that was hopelessly overpowered. That was because I printed a table to get most of my leveling progress. I remember the time I just had to jump for a certain stat to increase - sigh, what a waste of time 🤣
@@bitsundbolts Riiight, I almost forgot about those Gates in Oblivion - they really annoy(ed) my OCD! 😂 I actually still have an "active" Oblivion installation and savegame on my (modern) machine that I would like to finish someday - probably not until my retirement, haha. Alas, it kinda broke at some point and characters are moving way too fast now. It looks really funny, esp. when NPCs are yeeting stuff around due to their high speed. For some reason, none of the usual fixes like limiting the frame rate work for me though, I guess I'll just have to install it on a period correct machine at some point! 😉
Many DOS games also required the right amount of base memory (Up to 640k). It was a pain to configure/get just right when a game wouldn't start and complains that it doesn't have enough. By optimising the autoexec.bat and config.sys files on startup.
Hi, how do i remember that 486 needed 4 megs of ram? I bought an sx-25/33 used and got only 1 meg of ram with it and it didnt post. Do remember reading that from somewhere back then and it was a pain to get it working by selling and bying used stuff to get that 4 megs :)
Does the Turbo EMS leave the cpu on real mode or does it switch it to Virtual 86 mode? EMS386 does switch to virtual mode and it is not always something you want to happen.
9:05 looks suspiciously like a storage card. those four ICs are flash memory, so it's possibly a nonvolatile solid-state storage, perhaps to let WordPerfect start up faster or something.
Oh, Apricot sounds sooo familiar. I can for the life of me remember when/where i seen that before. I guess that memory bank has become corrupted over the decades 😕😞
the Card you showed at 8:55 looks like a ROM CARD?? I can see 4 Atmel 4Mbit (512kx8) Flash Memory. So perhaps that is a ROM Drive?? For when can't use a Harddrive due to environmental conditions (shock, vibrations)
Have you heard of UBMPCI.sys driver? Its description says there's something special happening about upper 384 kb of memory, like it's reserved for shadowing ROMs and cannot be used as a regular RAM, even if there's no ROM shadowed in it. And to make it behave more or less like regular RAM some configuration needs to be happen, what this driver is for. Though it's description page also says it does NOT work on 486 class machines, only on later ones, because of missing functions in the bios if I understand correctly
The modern HDD with UDMA are very fast and we can load 64 kb at once with MS DOS 5. So we need only 128 kb of main memory. Imagine Windows use a paging file to have virtual memory to store and reload the content of the memory to and from the HDD, because the HDD is fast enough.
real PS/2 systems, ie the ones with MCA cards had the abillity to move the memory that was used by the network adapter and if I remember well even the video ram so that it was possible to have almost 590 K free. Not all programs where able to work with that strange memory map thou.
I was a bit confused how 3FF corresponds to 16K and not 1K ; then I thought about it - did they simply chop a hex digit off the end to make it look better!?
DOS=HIGH,UMB in config.sys after HIMEM.SYS and EMM386.EXE and then DEVICEHIGH in config.sys and LOADHIGH in autoexec.bat to load stuff into upper memory.
That ISA card contains FPROM (Flash Erasable ROM) chips. Not RAM chips, so it most likely is not a EMS card. If it was, then it would have to chew FLASH cycles and that would be very slow indeed.
@@jfbeam Ah. I wondered what it was out of. Didn't recognise it. Just looked up the datasheet to confirm it was a flashprom I've used with some homebrew computer kits.
Are you goin' to try all another mem managers? QEMM with its autoconfig, and some similar utility in PC-DOS. Back in 90s I failed to figure out how to config dos mem, though I used clean DOS even in Win95/98, not trusting DOS-session in it. Later I found out that it works better, providing more conventional memory and allowing multitasking of several DOS apps. And only recently played with mem managers in PCem and finding out some of it magic. But still can't understand how to make it all good and universal config for different software some of which needs EMS, some not, some is memory-eager to have much XMS and some require No EMS. And LOADHIGH command! In my case it works only when I start EMM with NOEMS option, when some upper RAM is given for EMS it loads all to lower addresses and it drives me mad.
I completely understand your frustration with memory managers. Believe me, I struggle too! I don't think there is a perfect configuration that fits all needs. Maybe there is one that works in 80 or 90 percent of cases, but not all. In this video, I tried to start with EMS memory, which was the first type of memory available to break the 1MB barrier. Unfortunately, I do not have a hardware EMS board which would make things a little bit easier to explain as there is a clear distinction between system memory and the expansion board. All I can do is emulate EMS through software (TEMS, EMM386, or others) which all use normal system memory. Anyway, I'll try to continue with this series and hope to end at a conclusion some day that should be good in most cases.
Let's talk about dos, baby Let's talk about dos and me Let's talk about all the good things And the bad things that may be Let's talk about dos Let's talk about dos Let's talk about dos Let's talk about dos
i rememebr trying to run my favorite games and says not enough extended memory (EMS) my solution was run windows 3.1 in manual mode (F8) and say no to everything freeing some EMS then i can run lotus 3 the ultimate challenge , prince of persia, wolfenstein 3d, grand prix unlimited
I wonder how long it took you to figure that out without access to the internet back then! Fiddling with memory management was always a pain. Some games offered to create a boot disk that helped free up enough space. But then, good luck configuring sound cards and mouse drivers. That wasn't easy for most.
funny thing about EMS on an HDD if you had an old beast but could not find the right old ram chips you could fake it with a gigabyte i-ram even a 256mb ddr1 stick running as a sata ssd through an IDE adapter COULD be better than a real SSD the problem is that pesky IDE interface being a low-revision would limit speed to about the same as an HDD, but without the wear issues and given a dead I-ram battery would not harm using it for swap(as most swap is dumped on reboot) you could use an old one as-is the only problem with that solution is the PCI slot it requires for power, I suppose an ISA to PCI adapter could provide power passively but these days there are much better solutions to actual old hardware, like dosbox-x that actively emulates at low-level the parameters of popular old gaming hardware, and lets you use modern speed physical interfaces and ram so the limit is emulation speed, which can be "un-turbo'ed" basically with modern hardware the only reason for old rigs is the cool factor, not much purpose for the software to run on OG hardware except with super specialty devices like the VHS backup software+interface though sadly even though it is a fact that nobody is harmed by copies of this ancient software running on emulated/ancient hardware, that somehow it is still against DMCA to use what is impossible to get legitimately from the copyright owner anymore some laws are stupid, and some laws that I am bound by companies get away with flagrantly breaking I will "pirate" old software it is impossible to buy from the copyright owner, with literally zero guilt if the copyright owner wishes to start taking purchase orders for that content I will pay for it after pirating when I can afford it a similar law exists within my state about e-bike motor limits they set a limit of 750w, which is about what is minimum for 150lbs of person PLUS cargo, so a healthy person with almost no cargo(including the battery weight) technically all ebike kits now have power limits in settings, and speed limits -if the reason for the law is speed, well I already have a limiter at the maximum my bike can take before oscillations make it unsafe, 25mph, the same as the most common speed limit in my town anyway -if the reason is to force pedaling, dude pedal assist is often actually less safe due to poorly configured uneditable feedback loops in the controller you can't easily replace(looking at you EU forcing terribly dangerous pedal assist and 250w limits, stop being stupid) -if the reason is battery size STOP BELIEVING LITHIUM BATTERY SAFETY MYTHS, lithium batteries with a proper BMS are 100% safe, you charge them once every few months to 100%, never let them sit at 0%(ie when the BMS cuts off the power output) they simply do not explode, ever in fact the rise of LiFePO4 packs means there is not even a danger of fire even if abused due to the more stable yet heavier and larger chemistry my ebike is a kit, with a set of the most useless brake sensor levers(they literally broke the springs after a few pulls) so I used a hall sensor to measure my rear brake cable(I always start with rear braking and only hit front if I need a faster stop) and it came with a fully enclosed and protected battery, which ironically should have used locktite on the usb port nut as it fell off inside the battery, causing me to decide that opening it was worth the risk because if it was not built right(good hint based on the loose nut) it could short out internally even with a BMS so yes, treat a battery right and NO RISK EXISTS, multiply your weight(and average cargo weight) in lbs by 5 and buy that motor size, ignore the law same with abandonware, the DMCA is being abused by companies who refuse to sell you the content, yet claim profit loss by you obtaining the content they refuse the profits of selling(which is not hard to do as they already have e-stores so hosting a few ancient roms for sale would not hurt them at all) sorry had to rant about laws that should be broken and ignored because of them being completely unjustified or based on lies and misinformation(and thereby invalid and should very much should be ignored)
You are wrong when moving ems window to E000 with real mode(i guess turbo ems uses real mode). Accessing first 1M adress range controlled by chipset, first 640Kb always routed to RAM memory controller, all remain range A000-EFFF by design routed to external bus (ISA/MCA/VLB/PCI). Your motherboard gave you gift - it still routed E000 to RAM, this is specific to chipset or bios settings. For examle you can insert LAN card with BOOT rom, and this boot rom can begin with E000, I can’t even imagine how the chipset will determine where to route E000. Only one way exist - BIOS at POST stage must check every 16K/32K/64K above C000, if some piece contains nonzero data it means external ROM and BIOS reconfigures chipset to disable routing to RAM and route this piece to bus. OR configuring every piece by user, called Shadow RAM since 386 era. Most 286 chipsets dosnt support shadow ram and never route A000-FFFF to RAM
That's also why Arena crashed. TurboEMS was happy to allocate it some memory in the E000 region, but when it tried to write anything there, it was just thrown on the bus and it disappeared into, uhm, oblivion. A000 through BFFF is famously used for the VGA framebuffer aperture. Set 'Mode 13' (which is what Arena uses), and blast some bytes there and they will appear on screen as pixels. Nothing significant is in between.
EMS was developed for 8086 PCs that had only 20-bit address space (1 MB). At first EMS was used as an expansion ISA card with it's own chip and memory. You only had to load a simple driver and everything else was done through registers and ISA bus in hardware. Such board provided 64 KB of RAM within 1 MB of address space and had NES mapper-like logic that could move that 64 KB window within it's own memory. That way allowing for software to access more than 1 MB of RAM and to install way more memory than 8086 PCs were designed for.
It was designed for productivity software, like spreadsheets.
Soon EMS started to be implemented in motherboard chips for later 80286 systems. Where you could have up to 16 MB memory installed and accessed as extended(XMS) memory (similar way of using a 64 KB window above 1MB address space), but for compatibility reasons EMS hardware emulation was also provided.
80386 CPUs were finally 32-bit and had 32-bit address space (4 TB) and had virtual addressing which allowed to map any memory region to any other address. This allowed for EMM386 driver that was able to use above 1MB memory mapped to 64 KB window below 1 MB address space just by CPU alone. This made EMS really fast.
Wolfenstein 3D could use XMS or EMS, but John Carmack said that EMS with EMM386 was faster than XMS (if I remember correctly).
There was a short period when games required 1 up to 3 MB of EMS along with as much free memory below 640KB as possible.
Such games were 16-bit and were meant to run on 286 CPUs and better.
However this didn't last long, since 32-bit DOS extenders gained popularity like DOS4GW that was displaying it's initialization in most later DOS games.
The biggest difference 32-bit mode offered was flat memory model. No more Conventional, upper, EMS, XMS memory. No more near and far memory pointers - in general DOS was 16-bit with 20-bit address space. This meant that all of memory was accessed through 64 KB chunks (near pointers) and to switch to other chunk you had to use far pointer that was 32-bit (yet only 20-bits could be addressed).
32-bit mode introduced just one regular pointer type, like it was defined in C/C++ standard.
32-bit DOS Extenders worked like a true 32-bit OS run on top of MS-DOS, similarly to Windows 95 and 98. They provided DPMI (DOS Protected Mode Interface) that was designed and implemented by various companies. This is why it's possible to run DOOM, Descent, Duke Nukem 3D, Quake and many other 32-bit DOS games within Windows 9x or even in Windows 3.1x, because Windows itself provides DPMI.
There was also VCPI introduces earlier with EMM386 that allowed to 32-bit DOS Extenders to work when EMM386 was loaded at the start.
Overall memory management in DOS days was a mess, however when 32-bit software got popular memory management was handled by the software itself.
In fact we did a full circle, since in modern programming the most efficient way to optimize code is to organize data in smaller chunks that can fully fit into CPU cache. Modern CPUs have around 64 KB of fastest L1 cache per core, so if a programmer manages to keep the data in a 64KB chunks for a stream of instructions it will be processed really fast.
I didn't mentioned about Unreal mode (hacked real mode where you use full 32-bit memory addressing) or that the true limitation of EMS was that the program code was limited to conventional 640 KB and only data could use EMS - this is why TES: ARENA stopped working despite having a lot of free EMS memory. 32-bit flat memory model allowed to use all the memory in every possible way.
i386 only supports 4G, not 4T-
Nicely done. This is one of the hardest things for me to grok about DOS programming -- near/far pointers and segmentation. I learned C in 32-bit Linux, and the idea of not having a 32-bit flat memory model (and int64 types!) gives me the same feeling as when you place a large mirror on the floor of a room with vaulted ceilings, then try to step on it.
"You only had to load a simple driver and everything else was done through registers and ISA bus in hardware."
Not quite, you had to specifically write your program to use EMS, it most certainly was not trivial or transparent, normal far pointer methods needed explicitly augmenting with EMS page management, leading to a dramatic degradation on the performance of a native segment:offset pointer in real mode.
L1 cache usually has 64KB broken into 1024 lines of 64 bytes each where each line is memory aligned. Keeping commonly used data within chunks of 64 bytes and aligning objects to 64 bytes can improve performance.
@@Leeki85 great explanatiom, thanks for that
Back in 1992 my father bought a 486 DX2/66. He paid 3500 bucks at a local supermarket chain and this was for the 4Mb RAM version. We carried the MASSIVE case to our car when I saw that on the box there was an X on 16Mb RAM! I told my father to run! This 12Mb costet enough to buy an Amiga! The 16Mb were very handy, especially after a friend of mine installed QEMM. Wing Commander 3 ran like hell, System Shock CD did also.
It's pronounced "áy pree kott". It's English, not French: all consonants are sounded.
Superb video. Happy memories!!
I remember when MEMMAKER came out as that was a lifesaver with this sort of thing - a semi-automatic way of puting things in upper memory and if I remember correctly, the order they were loaded in the config.sys also had an affect on the amount of free conventional memory being available.
Yeah, I used the OPTIMIZE which is the optimizer of QEMM386, a far advanced EMM manager. And it was huge. I usually got 634kB of conventional RAM free.
That is correct. When HMA (High Memory Area) and UMB (Upper Memory Blocks) were enabled, DOS would attempt to load parts of itself and drivers, such as the mouse driver, into HMA or UMB when possible. The loading order was important because the system had a set sequence of where to try loading first, then second, and so on. Drivers needed to be aligned to specific memory addresses, and the reserved space for each had to be in multiples of a certain size. If drivers were loaded in the wrong order, this could cause small gaps through fragmentation that could no longer be used, leading to wasted space. However, by loading in the correct order, you could pack the available memory more efficiently.
This takes me back to the days of having a separate boot floppy with a super customized Autoexec.bat and config.sys files on it for my 486 PC. In it's later days I had so many devices in the machine I needed about a dozen different configs to support various games. I ended up using MEMMAKER along with QEMM (Quarterdeck Expanded Memory Manager) along with a LOT of tinkering and reboots to help get everything setup. It was almost like a dark art!
I also had a config or two setup to use different amounts of system RAM with the SmartDRV utility that would allow most of the game data to be cached from the HDD into RAM. It was awesome for certain games like the Might & Magic 4 or 5 that normally accessed the hard drive a lot when moving around the game world.
These days you sometimes have to update a GPU driver or tinker with a software setting to get certain games running well, but it's nothing at all like things were back in the DOS days!
Yep. This was the way. In the last days of DOS, darn near every game had a carefully crafted boot floppy to get the right drivers, memory managers, and random TSRs for that specific game.
I remember Wing Commander IV, Ultima 7/8, and MechWarrior II being particularly finicky.
Ah the joys of memory management under DOS :D I have never really used EMS back in the day so this is a nice overview.
I remember the ram on our home 486 was set up to be xms, but for some games like El-Fish I needed to switch it to ems with some batch file my dad made me.
"joys" :-D ....
Several games required EMS - Dune II is an example.
@@tithund batch files ftw!! Most people have no idea how powerful batch code is
you can change the config.sys and set DOS=HIGH,UMB also limit the amount of BUFFERS and FILES. This will free base memory to some point, but not indefinetly of course. The default with 1MB of RAM schould be somewhere like 20 BUFFERS and 30 FILES. so lowering it will probably help a little bit.
Thats an Apricot PCXI, runs a special version of DOS, had a weird keyboard with a calculator built in. Came with a little amber monochrome monitor.
1. Even if you have only 1 meg of RAM you can get some either XMS or upper memory. To do this, you just need to disable BIOS shadow in BIOS settings.
2. To move EMS page frame to the UPPER memory when using TurboEMS you need to have some upper memory installed (or enabled). You may force TurboEMS to put page frame there, but it just copies data from disk to empty space and they are lost, no doubt!
3. 386 and 486 and higher CPU's have memory mapping unit (MMU), that is much like to EMS but uses 4k pages instead of 16k. But, to activate the MMU, you need to activate protected mode (PM). this is exactly what EMM386 does. After CPU enters protected mode, it can map any logical address to any physical, so DOS programs can think they access memory below 1 M boundary, but physically this memory can be mach above this. But ther is a little speed penalty, to manipulate MMU, you need to switch to "supervisor", running at Protection Level 0 and then back to Protection Level 3 where DOS programs are using emulated EMS. The difference is subtle, but can easily measured by Checkit (5% usually)
This is something I need to spend some time on - but it sounds very interesting.
With 1M, I couldn't start any of the DOS memory managers (neither HIMEM nor EMM386). HIMEM refused because there wasn't any XMS available. And EMM386 needs HIMEM or similar to work.
@@bitsundbolts BIOSes and chipsets of all 486 and late 386 support and use so called shadow memory. This shadow memory is a part of upper 384 kbytes of 1 meg. Shadow memory speeds up BIOS routines because it's as fast as other 32-bit memory and the BIOS is either 8-bit or 16-bit wide, and substantially slower. But, it is usually possible to disable this feature in the "extended" BIOS setup menu. Most, but not all chipset relocate these 384 k above 1 meg, if the shadowing is disabled. In some cases 3rd party utilities like Lastbyte can make upper memory writable, so it can be accessed as UMB by dos.
@@bitsundbolts emm386 does require himem, but it also requires 386 or higher CPU. himem requires 286. And some memoy above 1 meg, sure.
Cool! Can't wait to see the upcoming videos in the series!
I also hoped to see some LOADHIGH and DEVICEHIGH but I read the comments and waiting for the next video on the topic. Thanks!!!
And here lies Bub : Died the way he lived, faster than he could remember
Very interesting, I never knew third-party memory managers like TEMS existed back in the day, only EMM386. I distinctly remember some out of memory error when trying to play a game, and found the solution in the manual was to use EMM386. I followed the instructions to edit the config.sys to load it, which of course didn't work the first time because of a typo, but eventually I got it working. Obviously I had no idea how it worked, but I didn't really care, I just wanted to play my game! It wasn't until many years later that I learned it used a 64K window to access the rest of the memory, although I never really looked into it much further, so thanks for explaining it in a lot more detail.
For my fractal generator I used VRAM instead of EMS/XMS, 'cause it was simpler to just push data there and avoid all the mess with different memory managers😸 It required at least 1.5MB of VRAM, but in early 2000s it was rarely a problem.
Oh wow. I did a lot of work on the Apricot (it's named for the fruit, & it's pronounced the same) back in about '82. They were absolutely beautiful machines, & deserved to be better known that they were. We ran both MS-DOS & Concurrent CP/M on ours, & used it for CAD work. You're going to have a hard time finding a keyboard for it; this was before there was any such thing as standardised keyboards, & the Apricot keyboards had a row of programmable keys with an LCD panel above them that you could program labels onto via software, so you could treat them as menu keys in your programs.
The plan for the Apricot is to get it to the UK some day. Someone with a lot more knowledge than I will restore it, get the correct keyboard, and probably donate it to a museum. I think this is the right thing to do. I don't need to keep and possibly destroy more due to lack of experience with such devices.
Remember when 575kb was not enough, and you had to beat and squish DOS left and right to get 590 or 620kb or so.
And here I'm watching on a 16gb Tablet, wondering if my 64GB Laptop will last me another year 😅
What I find more amusing is that we went full circle with GPUs using HBM which is basically static ram.
Yep, let's just have 16GB of static RAM, why not.
@@monad_tcp Pardon? HBM is a form of a DRAM interface and construction method. DRAM is 1 transistor per cell, SRAM is typically 6. Latency of HBM is similar to modern SDRAM, it's only bandwidth optimised.
Which is fine since GPUs are masters at latency hiding, they know to execute a workload just when the memory request is about to be fulfilled.
I cant tell you how long I played with the dosbox conf to get a working Arena shortcut from the bare floppy files. It was all revolved around ems errors. Thank god that game still has an active community
When Turbo EMS was loading into conventional memory after you enabled upper memory, did you try setting its driver to "DEVICEHIGH"?
(...of course, that might be in part 2.)
Great video!
For that DOS=UMB at least needed in config.sys
And DOS=HiGH
Indeed. Given the style is presented as a journey, I presumed these settings would appear in Part 2.
I commented because the video annotation/text pointed out that TEMS was still mapped in conventional memory.
All in all, I'm looking forward to Part 2.
DEVICEHIGH, LOADHIGH etc. require upper memory block manager like EMM386 to be loaded first. Without upper memory manager loaded, the "Upper" line in the MEM output will always be zeroes.
DOS=HIGH requires HIMEM.SYS to be loaded first.
To use high memory you need a high memory manager like himem.sys. then you can use loadhigh or lh to load programs to memory.
Anyway, that is useless with some old programs that loads directly to base memory ignoring operating system memory addressing, so, the operating system will load it on base memory or will cause an error in the program.
Remember the upper memory blocks unused space above 640k but below 1mb plus HMA (high memory area) first 64k above 1mb due to intel wrap around bug. Then loading dos high, and drivers into umb/HMA then reclaiming monochrome and Ega regions above 640k. Use VGA area up higher in UMBs for graphics.
Ah, the algorithm is getting better at mind reading, you started lemmings just as I was typing the commands for starting it. I've been looking at how people solved the levels, so maybe this was recommended because of that.
Haha, interesting theory!
Fun fact: Apricot was the first computer manufacturer to release a 486 PC
The absolute horror, named MS-DOS! 🤪
The "Dylan" of computing... Strangely I loved this video, thank you very much and have a great day!
I had no experiences with this madness. I came from VC-20, C-64, 128, Amiga 1000, 4000/040 and then my first PC in 1997. Yes, I am old.
good luck with the apricot. I think it's one of those with a keyboard that had a lcd, to show some keys functions. hopefully it's on separate pins.
Yes, it had a small LCD to display functions and the clock if I'm not mistaken. I believe the keyboard also had a 9v battery that was used to power the real time clock. So, if you disconnected the keyboard, you might have lost the date/time settings. But I'm not sure about that. Just stuff I read online.
It will be very difficult to restore or even use that machine. I guess I will keep it until there's an opportunity to give it to someone else who knows what to do with it.
We used to use them A pri cot machines at Spaldings back in the 80's
I tried QUEMM for a day before seeing compatibility issues. Unfortunate as it used less conventional memory since it combined HIMEM and EMM386 but yes I saw the same application issues as you saw in TES Arena. Ended up DEVICEHIGH'ing as much as possible and sticking with the built in drivers. FreeDOS and its device drivers these days is the best of both worlds; compatible and compact! My 386 came with 4x256k so yes I had the fun of trying to squeeze everything out of a 1MB system. Eventually got +4MB, 5MB was awesome but you still had to be conscious of conventional memory usage. Started using Linux and what a world, it was all just memory, with swapping a core feature and handled for you - it became so easy!
QEMM386 (by the way not QUEMM) was fantastic if configured correctly. Simply use the OPTIMIZE program and let it do its magic :)
For my own game written in NASM without a DOS EXTENDER, I just take the megabyte at 3 MB to 4 MB without asking DOS for permission, and funny enough, it never crashed, not even after Windows 95 and 98 had loaded and reloaded (before and after my game), WOLF32, DOOM and QUAKE as well. EMS, XMS, UMB and all of those are DOS managed to make DOS happy. But as soon as you have a 386, why make DOS happy? I just found it hilarious that after all the effort to use XMS to be allowed to use upper memory, it wasn't even required, and all the conventional memory was basically free. My PC -> Video Game video explains more
I might have been doing something similar, I can't remember ever doing any page swapping except for the video memory. I was also just 11yrs when I started to learn assembly. I love NASM, I really have an ick for GAS syntax. I have also used FASM and RosAsm and some HLA
Perfekt für Freitag Abend, danke.
Oh wow Arena! That was one of my favorite games back in the day. You can swing by holding the mouse button down and swiping in the direction you want to swing with the mouse. Depending on your weapons you can swing horizontally or even vertically.
I was very concerned when you didn't load your mouse driver. I don't even know if you can play the game without a mouse lol.
Haha, thanks. I'll try that next time.
Good that the insufficient memory warnings and the horrible performance prevented me from playing that game without a mouse.
DOS=High,UMB in config sys makes it even better. This loads dos itself into high memory as well, frees up more conventional 🙂
I didnt even know about Turbo EMS and looking at the chapters of your video I highly assumed beforehand it would be immediately fixed with himem and emm386 😀
The unknown card is probably something like an early hardcard. Those Atmel chips look like EEPROMs or flash chips and a section of the DIP switch block is labeled "prog"
I used QEMM, always had 639 kilobytes of free base memory and it managed xms and ems on the fly.
I could never quite get that amount free. Please, how? 😁
@@glenncaughey5044 Quarterdeck Expanded Memory Manager
@@glenncaughey5044 It depends on the mainboard or what hardware the PC is equipped with. It probes the UMA area and tries to determine which of that is mapped to an external device of some kind and which is in your RAM. The more UMA it can discover, the more TSRs and drivers it can shovel in there. Of course also depends on how large your CDEX driver is and sound card stuff and what mouse. Some machines just turn out better than others.
13:34 I was amazed you left this set to None, thinking that it would default to use conventional memory. I saw you struggle later and thought it was just an extended bit of acting since you said you already tested ahead of time. But then when you did finally get around to specifying high memory and it didn't work, could that be because you didn't have himem.sys loaded?
This video was kinda confusing because I thought you would focus on how memory would work but most of it is spent fiddling with a third party swap drive utility, with the "proper" way to use your ram tacked on to the end.
I forget which version of DOS 6 it was, 6.0, 6.2, or 6.22, but istr a utility called memmaker included that would figure out how to best manage and get the most free conventional memory for you. Using things like DEVICEHIGH in CONFIG. SYS instead of DEVICE, LOADHIGH in front of TSRs in AUTOEXEC.BAT, and somewhere DOS=HIGH,UMB to get as much of DOS out of conventional memory as well. I never needed EMS, but I think memmaker had a prompted option to set a specific size of it through the use of emm386.
It would probably need HIMEM.SYS to access the upper memory area since HIMEM installs the relevant interrupt vectors to be able to talk to that memory in the first place - I believe those routines are an emulation of the old Intel "Above Board" which exposed 384K in a different manner from the 640K of conventional memory.
Man I spent so much time trying to get enough conventional memory free to run Serpent Isle and Ultima 8 on my friend's 486. I had installed Doublespace to get more from his crappy hard drive... only managed to get U7: The Black Gate running. That era of games from Origin had their own EMS manager called Voodoo, and you needed like 590k conventional mem free.
Of all the games I played Ultima 7 was by far the hardest one to get it to run (with sound and mouse). The conventional memory requirement was absolutely brutal! I had to make a custom boot floppy in the end.
Thanks. Please continue
Man, I would have been really disappointed if I got this game as a little kid and never got it to run. Thankfully most games did run, I can remember that there was something that I never got to run
the Apricot is pronounced like the fruit Apricot , they also did IBM MCA units with remote controls for security, built in monitor stand like the amstrads. the keyboard i think was xt type but had extra LED's and system buttons on the keyboard. it may not poer on with the relay trigger (later MCA models were control with a small white one button remote for power on and unlock keyboard) , that was the QI300, it also had custom disk bays and a handy drawer to fit the remote (hidden of course and not mentioned in the manual, the sales man told you)
the isa card is Productivity Enhancement Products 10100-003B ISA Card Solid State Disk 2MB
I don't know this period, since my firs Pc was a 233 MMX.
Or a 286 I used just to make pcb and loud speakers enclosures.
So it's very interesting.
Not sure if it was mentioned by someone else before, but after loading DEVICE=HIMEM.SYS you can try loading VEM with DEVICEHIGH= . Also do DOS=HIGH,UMB and in the autoexec.bat file, instead of just loading TEMS normally you can try LH TEMS command (LH means load high). I've never seen TEMS before, but I've used LH with mouse and sound drivers etc to free up some conventional RAM
The card seems to be flash memory for a Cisco
It looks like Turbo EMS ONLY supports copy to RAM, so on an 8086 it can use hard disk, on a 286 it can use extended, same as "Above disk" which also supported extended, but cannot use upper memory unless you can also enable read/write upper memory in BIOS or with other software (real mode UMBs)
You also didn't enable DOS HIGH - you might be able to run with Turbo EMS and DOS HIGH relieving some lower memory.
Also, does the system support chipset created EMS (need an appropriate chipset driver)
Yeap. That's the flash card for the first generations of the Cisco PIX.
Hm. Anything interesting one can do with this card?
@@bitsundbolts Turn a PC into a PIX. (It's an ISA card, so somewhat old PC) You've throw away USB sticks with more memory, so it's pretty useless for anything other than a museum. (and b-roll)
You know, you can download more memory these days 😉
EMS was more or less just a crude Memory Management Unit (MMU) for the 8086 which didn't support any built-in virtual memory from itself. It's not even that different from the virtual memory mapping done by modern operating system kernels, but done on a micro-scale.
In theory you could do basic multitasking by allocating more than one EMS page frame just like a virtual address space in a recent OS. It became kind of obsolete when Windows just kicked the MS-DOS routines to the curb on boot and just did memory management on its own.
Your unknown ISA card has only Flash memory chips, so unfortunately it is not an EMS card :( However, 2MB of Flash (ROM) is very unusual.... I'm also curious to know what it could be!
That's the flash memory card for the first generations of the Cisco PIX. Cisco replaced them with a simpler card with much more space. (I kept that card from our ancient Pix 520.)
I would guess it's a solid state drive. There's a BIOS chip on there as well so that would probably handle the boot process.
Great video. How did the DOS based Windows versions handle extended memory?
You can in fact use Himem & Emm386 with 1MB ram. You get UMB, and a bit of XMS/EMS to boot. 👍
Win3.1 (std mode) will run in that config. Did it on a Tandy 1000RSX back in the day before adding 8MB to it.
its mind blowing that 1 MiB used to be huge and can run games when 1 MiB in today time is quite trivial
I would not be surprised that the reason that TEMS didn't work properly with the page frame in upper memory was because there was nothing mapped there (yet). I'm not familiar with TEMS, but as it consisted of two components - a device driver and a TSR - it could very well be that the TSR depends on the device driver setting up things properly in order for it to work.
This is basically also what HIMEM.SYS en EMM386.EXE do - they work together to setup the proper environment for EMS emulation to work. HIMEM.SYS provides the XMS interface (and API) and EMM386 is able to use that API to use XMS memory as EMS. The only thing that EMM386 probably does slightly differently is that it does the setup of the 386 pagetables itself so that it can provide both UMBs (that so-desired set of memory blocks in upper memory where you can put most of DOS and some of its device drivers) and a 64k page frame for EMS emulation.
It is also interesting to note that there is a config.sys statement called DOS, which can have one or both of the following keywords in it: HIGH and UMB.
DOS=HIGH will transfer a large portion of the DOS kernel to the 64k (minus 16 bytes) memory area right above the 1MB barrier and basically abuses a difference in hown 286+ systems handle segment:offset combinations. On an ordinary 8086/8088 (or compatible) CPU there are only 20 address lines available. This means that when the program counter (or any segment:offset combination for that matter) reaches absolute address 0xfffff, it will simply wrap around zero. However, on 286+ systems with their wider address buses, this is not the case. So if you then carefully craft an address with a segment in 0xffff, any offset abot 0xf will end up in extended memory. Since this could lead to compatibility issues with earlier software, control logic was added to the AT (and later systems) to force address line 20 (A20) to a known state in order to provide compatibility with the earlier PC and XT. This is the so-called A20 gate. The A20 gate is controlled through HIMEM.SYS and DOS=HIGH allows that 65520 byte segment to be used for programs and data, leaving more conventional memory available to programs.
Something similar happens with DOS=UMB. UMBs are provided by EMM386 and DOS=UMB makes these upper memory blocks available to MSDOS and programs to be allocated just as if they were conventional memory blocks, once more leaving more conventional memory available to programs.
With a proper setup of CONFIG.SYS and AUTOEXEC.BAT it should be possible to have between 602-615kB of conventional memory available, even with things such as mouse, sound and CDROM drivers loaded.
DR-DOS (the DOS compatible variant of CPM/86) and later on OpenDOS and Novell DOS had another trick up its sleeve: so-called DPMS and CLOAKING. This allowed programs to be loaded into extended memory, leaving only a bare stub in conventional memory to talk to it, thus leaving even more conventional and upper memory available to programs.
A20 was a register on the keyboard controller, wasn't it ?
That's funny.
@@monad_tcp No, A20 is one of the address lines on the CPU (and f.i. the ISA BUS). The keyboard controller only provided the possibility to force it low or high through an I/O port. Going through the keyboard controller was rather slow so later systems provided similar functionality, but through the so-called fast A20 gate.
DPMS wasn't a feature of Novell DOS or any other non-Microsoft DOS, it was a feature of the 80386 processor which provided memory virtualization on its own. "Protected" mode means the memory was virtualized and the DOS memory map wasn't a problem anymore.
That's how Windows 3.xx and 95 worked, by bootstrapping through a DOS environment, entering DPMS and then the entire operating system was basically a giant DOS application.
@@Stoney3K Not entirely correct. Protected Mode and Virtual 8086 mode were features of the 80386, as was paging. DPMS stood for DOS Protected Mode Services. It allowed programs such as device drivers and TSRs to load themselves into extended memory and to run in 16-bit or 32-bit protected mode, leaving only a very tiny stub behind in conventional memory.
So DPMS in and of itself was not a feature of the 80386 processor, it just made use of its extended features if they were available. The minimum requirements to run DPMS were an 80286 processor.
@@damouze Windows also provided a DPMI interface to the DOS environment running under Windows, so it was possible to run games that used DMPI under Windows too.
Also minim sector sizes are at play with memory emulator through swap. You have 16k pages but clusters could be larger or smaller. Also os is doing memory things with the hard drive which further taxes the available memory and possibly pages.
I have a few 1980s Apricots in my collection, so I would be happy to advise you on getting it running and point you in the direction of resources. Regarding memory, that Apricot you have can be upgraded to 768kb of RAM, which I believe the implementation of MS-DOS could access.
Hey, now I got the comment! Thanks for your offer to help! I would obviously happily accept any help with the apricot! We can continue via email. Thanks again!
Well done
Very interesting!
On the Apricot, I don't know how far down the rabbit hole you want to go but it really shouldn't be that hard to ID the keyboard controller, find the data sheet, find out which lines do what then tone them out to the back pins and create a converter from AT, at the end of the day all keyboard controllers work on the same inputs and outputs, the only changes are to the pinout of the connector.
The motherboard doesn't have a keyboard controller, it's built into its keyboard. Unfortunately, that means you'd need a microcontroller to take the place of that.
Thanks for the trip down memory lane, pun intended.
I used to direct my windows page file to a secondary hdd that sped my systems up quite a bit wonder if that would pick up the speed with tems.
Not noticeably.
Here we have 100ns memory, and not much before that there was 200ns. :) It amuses me that round-trip ping time to my NAS in my home network in 2024 is faster than the memory seek time on my first computer....
Also, love the videos. :)
You sure you aren't thinking of ms/milliseconds when you are thinking of your NAS? The memory BuB is talking about is in nanoseconds.
@TonySquared09 you are correct... I'm off by an si prefix.... Just double checked and my ping time is in the 150microsecond range not nanosecond
8:56 What you've got there is not an EMS memory expansion. It's the storage module of one the first Cisco PIX firewalls - it booted of that thing.
Interesting. It was installed in a PC though - at least this is what I think. What could I do with it? Or is it just good for salvaging the chips?
@@bitsundbolts The first PIX firewalls were basically 486 machines with ISA slots. I think Clabretro made a video about them a wile ago.
I beleive that this card was an off-the-shelve one made by "Producivity Enhancement Products" so Cisco just bought it in. I'd assume that there is either a DOS driver for it (if you can find it) or that it has it's own BIOS on it which makes it appear as a normal disk drive.
I'm not familiar with TEMS but the question instantly arose in my head: does it do any 386+ specific memory paging? EMM386 is, essentially, a lightweight hypervisor for DOS, it shuffles memory around as it provides it for the rest of the OS, and this is what can fill the UMB area as well as the EMS page frame with memory pages.
If, as I suspect, EMS doesn't do this, then it copies the "swapped" pages to the frame that needs to be a proper 64kiB RAM area - and as TEMS does no paging itself, there won't be ANY memory in the upper area. So it tries to copy the selected pages to the specified E000 segment - but it won't be written there at all and it can't be read back either. So it needs existing RAM memory to use as a page frame, thus it must use some lower mem - except if you use some other trick to make that shadow area writable. Which can open another can of worms, but doable. Most convenient if you don't even try to use that memory as UMB then.
But if TEMS is a full fledged memory manager in a way like EMM386 or QEMM are, then - I dunno.
I love that Turbo EMS lets you go full ridiculous and presents the idea of having the swap on a network drive as something you would even consider doing. I can only imagine somewhere that to offset the cost of all the networking hardware and the server, some company had this great idea of all the money they "saved" by having all the computers connected use the same network drive for all of their EMS "needs" instead of buying RAM =p
What's even better is DOS network drivers tended to need a good chunk of conventional too so you'd need that simulated EMS even more. I'm in awe of just how slow this had to be hahah
Well, I had a compact flash as a hard drive and it was painfully slow. Now think of an older spinning drive... And then comes the network latency, I guess... Unusable in almost all situations.
I mean, if you're only running productivity applications, it would probably be fine for bulk storage that isn't accessed frequently.
Games are an absolute torture in terms of computing. Nobody in the 1950s imagined we'd be running millions and millions of computations every microsecond just to get a picture on the screen, and then read the user's input only to do it over and over and over.
Lotus 1-2-3 would be an interesting test.
Ahh, memories of moving stuff into HIMEM and a few other tweaks to get stuff to install and run. For some reason the PB640 had the base memory set to 512K as well?!
But what is turbo EMS meant to do if you have extended memory?? I get that if you don't you can use the HDD... but if MSDOS does the trick, what turbo EMS would do differently??
EMM386 which ships with DOS emulates EMS hardware by using 386 hardware feature, allowing it to remap any memory from XMS into a 64k window in sub-1MB region which can be accessed by EMS compatible software written for a 8086, which can directly only address 1MB memory total.
If you have an earlier computer without 386 features, you can use TurboEMS to emulate an EMS device. On a 8086, it can emulate EMS by copying data between EMS window and disk upon any EMS mapping change command. On 286, it can copy between EMS and XMS instead.
Turbo EMS may not have worked with the Page Frame in the upper memory region because the motherboard chipset is interfering with using ram between 640K and 1 MB. Real mode access to the memory became a lot harder when IBM explicitly blocked access to it in the AT chipset that all the clones copied. Check your Bios shadowing options You might need to enable/disable shadowing for that region for it to work or some other bios option. EMM386 made a lot of things easier at the expense of forcing the system into protected mode.
Good point. I'll try and see if I can get this to work! Thanks for the hint
When I was a kid, this was back in the early 90's, my dad had two boot modes for our PCs, emm386 and no emm386. I still don't understand it to this day. It seemed that EMM was for my DOS games and then I think the other mode was for games or things that didn't support it, but I'm not sure.
It may be related to real mode vs protected mode. Some applications don't like protected mode and therefore EMM386 isn't an option (because it switches the CPU into protected mode). That's another huge topic on its own.
I have a Zenith 8088 Laptop computer that only have 640k base memory and two 720kb floppy drives it runs at 8mhz in the fastest speed, Blue/Grey monochrome LCD display. no hard drive. I had to hand craft my own dos boot disk to fit the entire dos environment on a single 720k disk and then put compatible games/apps on their own disks in drive B. using limited hardware sure has it's challenges but it is quite fun to mess around with too when it works
@8:55 That's not an EMS expansion card, those four big chips on the Left are 4Mbit Flash ROMs, the one in the middle is a 256k EEPROM (maybe a BIOS for the card?), no RAM at all on that card.
I can only assume it's some kind of software-in-ROM type thing.
i think you should postpone any videos you're working on and start doing the IBM. that's a treasure! :) very interesting video, it seems DOS is not that simple after all
EMM386 puts a 386+ into V86 mode so it can magic up a page frame in above 640K using the page table. I'm not sure Turbo EMS can do this. It can probably only produce a page frane above 640K in areas where there's actual Ram visible.
Hm, good point. That might explain the struggle I faced.
Forgot in config.sys: DOS=UMB to allow upper memory use. DOS=HIGH will move part of dos into higher memory.
Time for QEMM.
Great, really enjoyed the systematic approach. Looking forward to an episode on XMS, UMB, and more!
Apricot was an early British PC clone brand from a company called ACT. A lot of their machines were not very compatible with the broader PC ecosystem, for example using their own floppy disk format. Software which mostly used the BIOS routines would work okay on an Apricot machine but anything which directly addressed the hardware tended to fail due to some architectural differences and proprietary nonsense. This hurt their value in the market and they are honestly still kind of a nightmare from a hobby perspective for that reason. I have an Apricot Portable which is essentially a doorstop because it uses a nonstandard floppy drive that I have so far been unable to repair and cannot replace.
That incompatibility is very unfortunate. I guess it will be similar with the apricot point 7.
You have to differenciate between memory addresses and actual memory. In the real mode MS-DOS uses it is limited to address only 1MB + 64k -1. The 640K/384K split is kind of arbitary. 640K are actual memory, everything above that are addresses reserved for memory mapped devices and ROM. When you had 1MB, you only had 640K mapped and left the rest unmapped.
When you tried to put TEMS page frame at E0000, you put it where no actual memory was mapped. But due to the way that TEMS works, it needs actual memory mapped there to hold the page that it retrieves from the HDD.
With 1MB memory installed you could have used HIMEM and EMM386 to map soma of the unused memory in the UMA and the HMA. Then you could have put the page frame on memory in the UMA to free up conventional memory. Then the rest of the otherwise unmapped memory could also have been used as EMS in addition to EMS backed by the HDD.
Also the performance with a real hdd with FAT cluster size of 16k or smaller would have been interesting. Flash is not really optimal TEMS since, the erase blocks of flash are usually mich bigger, something in the range of 128K. So causing a lot of 16k writes is really not ideal.
Also someting to be aware of for your upcomming videos: at one point the german translations for upper and high memory were swapped and only later (I think with windows 95) they where swapped to make them align better with the english original.
I couldn't get HIMEM to work with only 1MB. It simply refuses to work saying there isn't any XMS memory available.
@@bitsundbolts oh interresting. Maybe because it's in real mode and not virtual 8086 mode yet, it isn't mapped at all and himem sys expects it to be already mapped after the 1MB. Would be interresting to see if it works with a different PC/BIOS.
Maybe I give it a try later on my A2286 bridgeboard, which has 1MB. I belive himem worked there, but is is some time ago I set that up. But EMM368 won't work there of course, because it's an 268. Butit can emulate EMS through the DP RAM using the amiga memory, and now I am noticing I am going offtopic...
@@bitsundbolts I just tested it with my bridge board and it detects the 384K as XMS and himem.sys loads with that. If you want I can test TEMS there. I also made pictures of msd
@@bitsundboltsJust need to disable Shadow Memory stuff in BIOS. It’ll work, trust me. Himem & Emm386 will get Win3.1 (std mode) running on 1MB ram. I did it on a Tandy 1000RSX back in the day before adding 8 MB.
Interesting. Did you disable something in the BIOS? Shadowing as many have suggested? If you can, please run TEMS if you have the time, I am curious if you can get the page frame placed in upper memory and can use it too. I could force the page frame to be there, and it showed up in CheckIt and MSD, but I couldn't use it. I'm currently not in Dubai and can't test it. Thank you!
Ha, I know where the top chip at 1:18 came from! 😅
I also didn't play Arena back in the day, I was more into Might & Magic at the time. Oblivion was my first TES game, but I did go back and try Arena a few years ago. All that procedurally generated goodness must've been pretty impressive at the time considering the seemingly impossible scale of the game world, even though the repeating patterns were very obvious. Wouldn't have bothered me at all as a kid though, I still would have played it like crazy!
Hehe, yes, that memory chip is from your Voodoo 2.
I took Arena because it was a game on a list that requires EMS. Without, it wouldn't work - well, to get a game I could use for my experiment. My first TES was also oblivion - and I finished it! It gets a bit repetitive when you have already finished most gates (which are also very repetitive) and recovered most of the Sigil Stones. Still, it was fun. O had a character that was hopelessly overpowered. That was because I printed a table to get most of my leveling progress. I remember the time I just had to jump for a certain stat to increase - sigh, what a waste of time 🤣
@@bitsundbolts Riiight, I almost forgot about those Gates in Oblivion - they really annoy(ed) my OCD! 😂 I actually still have an "active" Oblivion installation and savegame on my (modern) machine that I would like to finish someday - probably not until my retirement, haha. Alas, it kinda broke at some point and characters are moving way too fast now. It looks really funny, esp. when NPCs are yeeting stuff around due to their high speed. For some reason, none of the usual fixes like limiting the frame rate work for me though, I guess I'll just have to install it on a period correct machine at some point! 😉
Many DOS games also required the right amount of base memory (Up to 640k). It was a pain to configure/get just right when a game wouldn't start and complains that it doesn't have enough. By optimising the autoexec.bat and config.sys files on startup.
You could have used DEVICEHIGH for TurboEMS, after loading himem, in order to force it to load in upper memory.
Good point, I didn't try that. Probably because I never did that to the MS-DOS memory managers.
Considering that it uses an already slow API to page memory out to HDD it's hilarious that they named it Turbo EMS. Huge EMS might have been more apt.
Hi, how do i remember that 486 needed 4 megs of ram? I bought an sx-25/33 used and got only 1 meg of ram with it and it didnt post. Do remember reading that from somewhere back then and it was a pain to get it working by selling and bying used stuff to get that 4 megs :)
Does the Turbo EMS leave the cpu on real mode or does it switch it to Virtual 86 mode? EMS386 does switch to virtual mode and it is not always something you want to happen.
That's a good question. I didn't check that.
9:05 looks suspiciously like a storage card. those four ICs are flash memory, so it's possibly a nonvolatile solid-state storage, perhaps to let WordPerfect start up faster or something.
Oh, Apricot sounds sooo familiar. I can for the life of me remember when/where i seen that before. I guess that memory bank has become corrupted over the decades 😕😞
the Card you showed at 8:55 looks like a ROM CARD??
I can see 4 Atmel 4Mbit (512kx8) Flash Memory.
So perhaps that is a ROM Drive?? For when can't use a Harddrive due to environmental conditions (shock, vibrations)
Cisco pix flash memory card.
Shouldn't you be using DEVICEHIGH to load TurboEMS into upper memory?
Have you heard of UBMPCI.sys driver? Its description says there's something special happening about upper 384 kb of memory, like it's reserved for shadowing ROMs and cannot be used as a regular RAM, even if there's no ROM shadowed in it. And to make it behave more or less like regular RAM some configuration needs to be happen, what this driver is for.
Though it's description page also says it does NOT work on 486 class machines, only on later ones, because of missing functions in the bios if I understand correctly
On pre-PCI era people used THE LAST BYTE memory manager or UMB_DRVR.SYS, supports most 286-386-486 chipsets
Why did you put 64MB on a 386 system? Are you creating RAM drives in that space?
Just experimenting
The ISA16 card at 9:00 contains four 512KByte FlashMemorys. So.. no RAM expansion. The AM28F256 is a 32KByte Flash.
So its some sort of an early SSD
@@rubberduck4966 Might be. If so then I assume that the 32KB FlashROM contains some driver code to boot from the Atmel FlashROMs.
Maybe you're right. It might be some sort of SSD. Maybe not for continuous writing, but for storing data and quick access.
Really, no one should ever need more than 640K of memory, right...
The modern HDD with UDMA are very fast and we can load 64 kb at once with MS DOS 5. So we need only 128 kb of main memory. Imagine Windows use a paging file to have virtual memory to store and reload the content of the memory to and from the HDD, because the HDD is fast enough.
Oh the joy of messing with memory settings in MSDOS. lol
That's ApricoT not Aprico, it's a hard T :P
Next time.
apricot has a hard T at the end
its the name of a fruit
real PS/2 systems, ie the ones with MCA cards had the abillity to move the memory that was used by the network adapter and if I remember well even the video ram so that it was possible to have almost 590 K free.
Not all programs where able to work with that strange memory map thou.
I was a bit confused how 3FF corresponds to 16K and not 1K ; then I thought about it - did they simply chop a hex digit off the end to make it look better!?
DOS=HIGH,UMB in config.sys after HIMEM.SYS and EMM386.EXE
and then DEVICEHIGH in config.sys and LOADHIGH in autoexec.bat to load stuff into upper memory.
That ISA card contains FPROM (Flash Erasable ROM) chips. Not RAM chips, so it most likely is not a EMS card. If it was, then it would have to chew FLASH cycles and that would be very slow indeed.
EEPROM. It's a Cisco pix memory card. (aka, the thing that makes a pc a pix.)
@@jfbeam Ah. I wondered what it was out of. Didn't recognise it. Just looked up the datasheet to confirm it was a flashprom I've used with some homebrew computer kits.
Are you goin' to try all another mem managers? QEMM with its autoconfig, and some similar utility in PC-DOS.
Back in 90s I failed to figure out how to config dos mem, though I used clean DOS even in Win95/98, not trusting DOS-session in it. Later I found out that it works better, providing more conventional memory and allowing multitasking of several DOS apps. And only recently played with mem managers in PCem and finding out some of it magic. But still can't understand how to make it all good and universal config for different software some of which needs EMS, some not, some is memory-eager to have much XMS and some require No EMS. And LOADHIGH command! In my case it works only when I start EMM with NOEMS option, when some upper RAM is given for EMS it loads all to lower addresses and it drives me mad.
I completely understand your frustration with memory managers. Believe me, I struggle too! I don't think there is a perfect configuration that fits all needs. Maybe there is one that works in 80 or 90 percent of cases, but not all.
In this video, I tried to start with EMS memory, which was the first type of memory available to break the 1MB barrier. Unfortunately, I do not have a hardware EMS board which would make things a little bit easier to explain as there is a clear distinction between system memory and the expansion board. All I can do is emulate EMS through software (TEMS, EMM386, or others) which all use normal system memory.
Anyway, I'll try to continue with this series and hope to end at a conclusion some day that should be good in most cases.
I remember a tool that gave more than 640 kb lower memory - i think it was called 4dos or qemu.
It did that by mapping into vga video memory. Great if you stick to text mode.
Let's talk about dos, baby
Let's talk about dos and me
Let's talk about all the good things
And the bad things that may be
Let's talk about dos
Let's talk about dos
Let's talk about dos
Let's talk about dos
Ay pree cott fella :)
i rememebr trying to run my favorite games and says not enough extended memory (EMS)
my solution was run windows 3.1 in manual mode (F8)
and say no to everything freeing some EMS
then i can run lotus 3 the ultimate challenge , prince of persia, wolfenstein 3d, grand prix unlimited
I wonder how long it took you to figure that out without access to the internet back then!
Fiddling with memory management was always a pain. Some games offered to create a boot disk that helped free up enough space. But then, good luck configuring sound cards and mouse drivers. That wasn't easy for most.
funny thing about EMS on an HDD
if you had an old beast but could not find the right old ram chips you could fake it with a gigabyte i-ram
even a 256mb ddr1 stick running as a sata ssd through an IDE adapter COULD be better than a real SSD
the problem is that pesky IDE interface being a low-revision would limit speed to about the same as an HDD, but without the wear issues
and given a dead I-ram battery would not harm using it for swap(as most swap is dumped on reboot) you could use an old one as-is
the only problem with that solution is the PCI slot it requires for power, I suppose an ISA to PCI adapter could provide power passively
but these days there are much better solutions to actual old hardware, like dosbox-x that actively emulates at low-level the parameters of popular old gaming hardware, and lets you use modern speed physical interfaces and ram so the limit is emulation speed, which can be "un-turbo'ed"
basically with modern hardware the only reason for old rigs is the cool factor, not much purpose for the software to run on OG hardware except with super specialty devices like the VHS backup software+interface
though sadly even though it is a fact that nobody is harmed by copies of this ancient software running on emulated/ancient hardware, that somehow it is still against DMCA to use what is impossible to get legitimately from the copyright owner anymore
some laws are stupid, and some laws that I am bound by companies get away with flagrantly breaking
I will "pirate" old software it is impossible to buy from the copyright owner, with literally zero guilt
if the copyright owner wishes to start taking purchase orders for that content I will pay for it after pirating when I can afford it
a similar law exists within my state about e-bike motor limits
they set a limit of 750w, which is about what is minimum for 150lbs of person PLUS cargo, so a healthy person with almost no cargo(including the battery weight)
technically all ebike kits now have power limits in settings, and speed limits
-if the reason for the law is speed, well I already have a limiter at the maximum my bike can take before oscillations make it unsafe, 25mph, the same as the most common speed limit in my town anyway
-if the reason is to force pedaling, dude pedal assist is often actually less safe due to poorly configured uneditable feedback loops in the controller you can't easily replace(looking at you EU forcing terribly dangerous pedal assist and 250w limits, stop being stupid)
-if the reason is battery size STOP BELIEVING LITHIUM BATTERY SAFETY MYTHS, lithium batteries with a proper BMS are 100% safe, you charge them once every few months to 100%, never let them sit at 0%(ie when the BMS cuts off the power output) they simply do not explode, ever
in fact the rise of LiFePO4 packs means there is not even a danger of fire even if abused due to the more stable yet heavier and larger chemistry
my ebike is a kit, with a set of the most useless brake sensor levers(they literally broke the springs after a few pulls) so I used a hall sensor to measure my rear brake cable(I always start with rear braking and only hit front if I need a faster stop) and it came with a fully enclosed and protected battery, which ironically should have used locktite on the usb port nut as it fell off inside the battery, causing me to decide that opening it was worth the risk because if it was not built right(good hint based on the loose nut) it could short out internally even with a BMS
so yes, treat a battery right and NO RISK EXISTS, multiply your weight(and average cargo weight) in lbs by 5 and buy that motor size, ignore the law
same with abandonware, the DMCA is being abused by companies who refuse to sell you the content, yet claim profit loss by you obtaining the content they refuse the profits of selling(which is not hard to do as they already have e-stores so hosting a few ancient roms for sale would not hurt them at all)
sorry had to rant about laws that should be broken and ignored because of them being completely unjustified or based on lies and misinformation(and thereby invalid and should very much should be ignored)
You are wrong when moving ems window to E000 with real mode(i guess turbo ems uses real mode). Accessing first 1M adress range controlled by chipset, first 640Kb always routed to RAM memory controller, all remain range A000-EFFF by design routed to external bus (ISA/MCA/VLB/PCI). Your motherboard gave you gift - it still routed E000 to RAM, this is specific to chipset or bios settings. For examle you can insert LAN card with BOOT rom, and this boot rom can begin with E000, I can’t even imagine how the chipset will determine where to route E000. Only one way exist - BIOS at POST stage must check every 16K/32K/64K above C000, if some piece contains nonzero data it means external ROM and BIOS reconfigures chipset to disable routing to RAM and route this piece to bus. OR configuring every piece by user, called Shadow RAM since 386 era. Most 286 chipsets dosnt support shadow ram and never route A000-FFFF to RAM
That's also why Arena crashed. TurboEMS was happy to allocate it some memory in the E000 region, but when it tried to write anything there, it was just thrown on the bus and it disappeared into, uhm, oblivion.
A000 through BFFF is famously used for the VGA framebuffer aperture. Set 'Mode 13' (which is what Arena uses), and blast some bytes there and they will appear on screen as pixels. Nothing significant is in between.
The latest version of Elder Scrolls is, Elder Scrolls Online.
3:07 brother uuuuh