theelf wrote on 2026-02-11, 09:05:
yes, thats the problem, after using the HT18 drive, for example, if i have 8mb ram, and set 2mb ems, i get 2mb ems and 1mb xms, thats all, no 2mb ems and 5 xms
I took a look at that driver. It does indeed not support 4MB modules at all, but it would support 8MB of RAM if you had 8 1MB modules (obviously, this is only possible if a board has 8 memory slots). I'm examining possibilities to expand the driver to support 4MB modules as well.
The EMS driver (g2mmc.sys) seems quite well structured. It has a generic EMS driver core and some harware specific parts. Currently, it seems like the generic part assumes a contigouus set of "physical page numbers" that can be handed over to the chipset specific part. This kind-of works if you don't support 4MB SIMMs, but the driver already needs to get slightly creative. The hardware uses the physical page numbers 0..127 for the 128 pages of the first bank (assuming a pair of 1MB SIMMs). If a pair of 256K SIMMs is installed instead, the memory is mirrored 4 times. Page numbers 0..31 cover the whole 512KB address range provided by a pair of 256K SIMMs, and page numbers 32..63, 64..95, 96..127 cause the same memory to be visible as page numbers 0..31 do. The EMS driver handles that by marking pages 31..127 as "allocated" during initialization if bank 0 contains a pair of 256K SIMMs. The same is true for bank 1, which gets accessed by physical page numbers 128..255, bank 2 which gets accessed by physical page numbers 256..383 and bank 3 which gets accessed by page number 384..511. The driver only uses a single bit per page to mark it as allocated/free, so the 96 "wasted" page numbers in case of a 256K pair just waste 96 bits, which is 12 bytes. This is no problem.
On the other hand, if you install 4MB SIMMs in a bank, that bank suddenly needs to get four times as many pages. Bit 9 in the mapping registers is already used as "mapping enable" bits, so the two extra bits are located in bits 10 and 11. A single pair of 4MB SIMMs in bank 0 thus uses the physical page numbers 0..127, 1024..1151, 2048..2175 and 3072..3199. So the bitmap containing the allocation status of all those pages needs to have 3200 entries, which is 400 bytes, and probably the scan for free pages when allocating EMS will get slow. Nevertheless, it should still work within the driver framework. I'll see whether I can hack something up that actually supports the C revision correctly.
Currently, I only have a preliminary understanding of the driver, so no sucess of that approach is guaranteed, but from what I've seen up to now, it seems that driver does not have a 256-entry list of pages.