• Please review our updated Terms and Rules here

Question about memory in Commodore 386SX

tonata

Experienced Member
Joined
Sep 11, 2019
Messages
190
Location
France
Hi,

The motherboard is this one: https://www.arvutimuuseum.ee/th99/m/C-D/30355.htm

So this motherboard has 3 types of chips for the memory:
- 44256 x 8
- 41256 x 4
- sticks with edge connectors x 4

I get 640 kb of memory which is weird I think.
In the table below I have the 3rd configuration which amounts for 1MB. I have banks Bank 0, P-0, Bank 1, P-1 populated and Bank2 and Bank 3 empty.
640KB(4) 44256(2) 41256NONENONENONE(2) 64K x 9
640KBNONENONENONENONE(2) 256K x 9(2) 64K x 9
1MB(4) 44256(2) 41256(4) 44256(2) 41256NONENONE
Still I am getting 640 kb. Also the chips in banks Bank 0, P-0, Bank 1, P-1 seem ok. I mean I switched them and used a few ones that I knew that were working so in the end I could not find a defective one.
It should be 1 MB, but it is not.
 
Last edited:
The reason that you only see 640 kb, despite having 1 mb installed is because the last 384k is upper memory, and is reserved for system use. Things like the various video BIOSes are mapped here (CGA, EGA, MDA, VGA), as well as parts of the system BIOS. There are ways to use portions of this memory that aren't in use, like if you have a VGA video card, you're clearly not using the CGA/EGA areas, or vice versa; And these areas can be mapped as upper memory blocks using a memory manager like EMM386.

The way the memory is mapped in x86 is a throwback to the 808x, which only had a 20 bit address bus, and could only address 1 MB. So in "real" mode, by default, you can only access 640 kb without using memory extenders like EMM386. Protected mode introduced in the 286 and later altered in the 386 gives you a linear memory map of the full 4 GB address range (the 286 could only address 16 MB due to a 24 bit address bus.)
 
Thank you for your reply. I always confused between actual memory installed physically and mapped memory.

The computer counts until 640 KB in the BIOS. It also says 00000 extended memory.

It is also important the way it counts the memory installed - I mean it checks physically which banks are populated and it assumes some values.

I removed half of the memory installed banks P1 and BANK 1. It now says 512 KB. But then if 384 is always reserved (and not shown) then it should've been 512-384 = 128 KB ? Actually the BIOS assumes that the memory can never be lower than 512 KB - as this is not a listed configuration.
 
The computer counts until 640 KB in the BIOS. It also says 00000 extended memory.

Extended memory is memory above the 1 mb range, your computer doesn't have any. If it's showing an option for displaying extended memory, Commodore must have either planned or made a memory expansion board for the system at some point. The 386SX can address up to 16 MB of total memory because it has a narrower 24 bit address bus like the 286. The 386DX has a full 32 bit address bus and can address up to 4 GB, but this was very rare outside high end servers because it also required motherboard, chipset and BIOS support.

It now says 512 KB. But then if 384 is always reserved (and not shown) then it should've been 512-384 = 128 KB ?

No. The upper 384 kb range never changes, no matter how much memory the system has. If you have less than 640 kb, all of the memory will be available. If you have 1 mb, the 384 kb range will overlap the upper 384 kb, bringing you back down to 640 kb. If you have more than 1 mb, the 384 kb range will still be unavailable, as will a further 64 kb right above the 1 mb range called the high memory area. This is used to access extended memory that comes after that 64 kb window to the top of the system memory map. So you can treat everything from the 641 - 1088 kb range as reserved, but sometimes remappable in the case of video BIOS ranges.

DOS memory mapping and management was a confusing bouillabaisse of incompatible standards right up to its demise at the end of the 1990s. Companies created their own standards, to which competing companies created standards to counter their competitors' standards, and some did their own thing. Things did settle down in the final years of DOS when Microsoft started to gain a significant share of the market and most everyone started to follow their standards instead. But by this time Windows 9x was out and the reliance on DOS was waning.
 
It should have the option to map the upper 384K into Extended memory instead of leaving it in the Upper Memory Area. Does the POST memory check say something like "640K Main + 384K Extended"? Are you able to load HIMEM.SYS?
 
No. It says 640 + 0000 extended. HIMEM XMS reports no extended memory and it does not install. Also UMA is reported as unavailable, so DOS is loaded in base memory.
Probably banks 2 and 3 were filled once and somebody removed the memory at some point rendering HIMEM useless.
 
I think I figured it out.

The computer lost its BIOS settings. Today I found an option in the BIOS called "Relocate 640 - 1024 memory". I enabled it.
Guess what? :) The computer reported 384 KB extended memory + 640 base memory. So I got my 1 MB I was searching for. HIMEM also detected the 384 KB.
 
Back
Top