[Patch]Memory setting patch
-
- Posts: 151
- Joined: Tue 22 Mar, 2016 10:03 am
- Location: Korea
- Contact:
[Patch]Memory setting patch
This patch does the following
- Rewritten IBM AT & PS/2 series top 256k/384k mapping logic. No more 384kb of extra memory allocation needed.
- IBM AT now can have less than 1MB memory.
- Rewritten IBM AT & PS/2 series top 256k/384k mapping logic. No more 384kb of extra memory allocation needed.
- IBM AT now can have less than 1MB memory.
- Attachments
-
- memory_patch.tar.gz
- Memory setting patch.
- (3.24 KiB) Downloaded 329 times
- ppgrainbow
- Posts: 479
- Joined: Thu 04 Sep, 2014 7:03 am
- Contact:
Re: [Patch]Memory setting patch
Great work on the memory settings patch!
Can this setting be applied to 286, 386 and 386SX clones? I know for a fact that the IBM PS/1 Model 2011 started out with 512 KB of base memory.
Can this setting be applied to 286, 386 and 386SX clones? I know for a fact that the IBM PS/1 Model 2011 started out with 512 KB of base memory.
-
- Posts: 151
- Joined: Tue 22 Mar, 2016 10:03 am
- Location: Korea
- Contact:
Re: [Patch]Memory setting patch
Yes. I've just added if AT machines granularity value less than 128, consider memory size is MB and greater or equal than 128, consider memory size is KB.ppgrainbow wrote:Great work on the memory settings patch!
Can this setting be applied to 286, 386 and 386SX clones? I know for a fact that the IBM PS/1 Model 2011 started out with 512 KB of base memory.
And additional patch attached below applies PS/1 2011, AMI 286 clone, Award 286 clone and DTK 386SX clone can have less than 1MB memory.
- Attachments
-
- model.c.patch
- Additional memory setting patch against previous patch,
- (4.87 KiB) Downloaded 308 times
- ppgrainbow
- Posts: 479
- Joined: Thu 04 Sep, 2014 7:03 am
- Contact:
Re: [Patch]Memory setting patch
Awesome! I'm wondering if it's possible to apply this patch to AMI 386SX/386DX clone as well as the Commodore PC 30 III and Dell System 200 machines as well!Greatpsycho wrote:Yes. I've just added if AT machines granularity value less than 128, consider memory size is MB and greater or equal than 128, consider memory size is KB.ppgrainbow wrote:Great work on the memory settings patch!
Can this setting be applied to 286, 386 and 386SX clones? I know for a fact that the IBM PS/1 Model 2011 started out with 512 KB of base memory.
And additional patch attached below applies PS/1 2011, AMI 286 clone, Award 286 clone and DTK 386SX clone can have less than 1MB memory.
-
- Posts: 151
- Joined: Tue 22 Mar, 2016 10:03 am
- Location: Korea
- Contact:
Re: [Patch]Memory setting patch
It's easy job. Please let me know what machines have less than 1MB memory when it ls released.ppgrainbow wrote:Awesome! I'm wondering if it's possible to apply this patch to AMI 386SX/386DX clone as well as the Commodore PC 30 III and Dell System 200 machines as well!Greatpsycho wrote:Yes. I've just added if AT machines granularity value less than 128, consider memory size is MB and greater or equal than 128, consider memory size is KB.ppgrainbow wrote:Great work on the memory settings patch!
Can this setting be applied to 286, 386 and 386SX clones? I know for a fact that the IBM PS/1 Model 2011 started out with 512 KB of base memory.
And additional patch attached below applies PS/1 2011, AMI 286 clone, Award 286 clone and DTK 386SX clone can have less than 1MB memory.
- ppgrainbow
- Posts: 479
- Joined: Thu 04 Sep, 2014 7:03 am
- Contact:
Re: [Patch]Memory setting patch
OKay!Greatpsycho wrote:It's easy job. Please let me know what machines have less than 1MB memory when it ls released.ppgrainbow wrote:Awesome! I'm wondering if it's possible to apply this patch to AMI 386SX/386DX clone as well as the Commodore PC 30 III and Dell System 200 machines as well!Greatpsycho wrote:
Yes. I've just added if AT machines granularity value less than 128, consider memory size is MB and greater or equal than 128, consider memory size is KB.
And additional patch attached below applies PS/1 2011, AMI 286 clone, Award 286 clone and DTK 386SX clone can have less than 1MB memory.
Most 386SX and 386DX-based motherboards had as little as 512 KB of base RAM.
I believe that the Commodore PC 30 III was released in 1988 and it was configured with either 512 KB or 640 KB of RAM: http://www.homecomputer.de/pages/Machin ... 0_III.html
I also believe that the Dell System 200 came with 640 KB of RAM according to a August 1988 PC Magazine article: https://books.google.com/books?id=ObYbl ... KB&f=false
A 512 KB upgrade kit brought the memory for the Dell System 200 to 1,152 KB (640 KB base and 512 KB extended).
-
- Posts: 151
- Joined: Tue 22 Mar, 2016 10:03 am
- Location: Korea
- Contact:
Re: [Patch]Memory setting patch
Additional patch attached below appliesppgrainbow wrote:OKay!Greatpsycho wrote:It's easy job. Please let me know what machines have less than 1MB memory when it ls released.ppgrainbow wrote:
Awesome! I'm wondering if it's possible to apply this patch to AMI 386SX/386DX clone as well as the Commodore PC 30 III and Dell System 200 machines as well!
Most 386SX and 386DX-based motherboards had as little as 512 KB of base RAM.
I believe that the Commodore PC 30 III was released in 1988 and it was configured with either 512 KB or 640 KB of RAM: http://www.homecomputer.de/pages/Machin ... 0_III.html
I also believe that the Dell System 200 came with 640 KB of RAM according to a August 1988 PC Magazine article: https://books.google.com/books?id=ObYbl ... KB&f=false
A 512 KB upgrade kit brought the memory for the Dell System 200 to 1,152 KB (640 KB base and 512 KB extended).
- PS/1 2011, AMI 286 clone, Award 286 clone, DTK 386SX clone, Commodore PC30 III, Dell System 200 and AMI 386SX clone can have less than 1MB memory.
- Changed IBM PC's memory granularity value to 32KB.
This patch replaces previous patch.
- Attachments
-
- model.c.patch
- Additional memory setting patch against first attatched patch,
- (7.58 KiB) Downloaded 301 times
- ppgrainbow
- Posts: 479
- Joined: Thu 04 Sep, 2014 7:03 am
- Contact:
Re: [Patch]Memory setting patch
Awesome work so far!Greatpsycho wrote:Additional patch attached below appliesppgrainbow wrote:OKay!Greatpsycho wrote:
It's easy job. Please let me know what machines have less than 1MB memory when it ls released.
Most 386SX and 386DX-based motherboards had as little as 512 KB of base RAM.
I believe that the Commodore PC 30 III was released in 1988 and it was configured with either 512 KB or 640 KB of RAM: http://www.homecomputer.de/pages/Machin ... 0_III.html
I also believe that the Dell System 200 came with 640 KB of RAM according to a August 1988 PC Magazine article: https://books.google.com/books?id=ObYbl ... KB&f=false
A 512 KB upgrade kit brought the memory for the Dell System 200 to 1,152 KB (640 KB base and 512 KB extended).
- PS/1 2011, AMI 286 clone, Award 286 clone, DTK 386SX clone, Commodore PC30 III, Dell System 200 and AMI 386SX clone can have less than 1MB memory.
- Changed IBM PC's memory granularity value to 32KB.
This patch replaces previous patch.
I've hear that IBM PCs can go down to as little as just 16 KB!
-
- Posts: 151
- Joined: Tue 22 Mar, 2016 10:03 am
- Location: Korea
- Contact:
Re: [Patch]Memory setting patch
But due to IBM PC's BIOS bug, IBM PC's memory setting should be at least 64KB now.ppgrainbow wrote:Awesome work so far!Greatpsycho wrote:Additional patch attached below appliesppgrainbow wrote: OKay!
Most 386SX and 386DX-based motherboards had as little as 512 KB of base RAM.
I believe that the Commodore PC 30 III was released in 1988 and it was configured with either 512 KB or 640 KB of RAM: http://www.homecomputer.de/pages/Machin ... 0_III.html
I also believe that the Dell System 200 came with 640 KB of RAM according to a August 1988 PC Magazine article: https://books.google.com/books?id=ObYbl ... KB&f=false
A 512 KB upgrade kit brought the memory for the Dell System 200 to 1,152 KB (640 KB base and 512 KB extended).
- PS/1 2011, AMI 286 clone, Award 286 clone, DTK 386SX clone, Commodore PC30 III, Dell System 200 and AMI 386SX clone can have less than 1MB memory.
- Changed IBM PC's memory granularity value to 32KB.
This patch replaces previous patch.
I've hear that IBM PCs can go down to as little as just 16 KB!
- ppgrainbow
- Posts: 479
- Joined: Thu 04 Sep, 2014 7:03 am
- Contact:
Re: [Patch]Memory setting patch
Thanks for telling me. Let's not forget about allowing the Compaq Deskpro 386 and the Amstrad Mega PC to have less than 1 MB of memory and remapping the memory also. :pGreatpsycho wrote:But due to IBM PC's BIOS bug, IBM PC's memory setting should be at least 64KB now.ppgrainbow wrote:Awesome work so far!Greatpsycho wrote:
Additional patch attached below applies
- PS/1 2011, AMI 286 clone, Award 286 clone, DTK 386SX clone, Commodore PC30 III, Dell System 200 and AMI 386SX clone can have less than 1MB memory.
- Changed IBM PC's memory granularity value to 32KB.
This patch replaces previous patch.
I've hear that IBM PCs can go down to as little as just 16 KB!
- SarahWalker
- Site Admin
- Posts: 2054
- Joined: Thu 24 Apr, 2014 4:18 pm
Re: [Patch]Memory setting patch
Committed at rev 772. I made a few changes :
- Commodore PC 30 III has 640kb minimum, as the real machine appears to have tbat much soldered to the motherboard
- PS/1 model 2011 granularity is now 512kb, as memory expansions don't seem to exist in finer granularity than that
- Fixed some issues in the memory remapping code, largely when only 128kb or 256kb of extended memory is available to be remapped.
- Commodore PC 30 III has 640kb minimum, as the real machine appears to have tbat much soldered to the motherboard
- PS/1 model 2011 granularity is now 512kb, as memory expansions don't seem to exist in finer granularity than that
- Fixed some issues in the memory remapping code, largely when only 128kb or 256kb of extended memory is available to be remapped.
- SarahWalker
- Site Admin
- Posts: 2054
- Joined: Thu 24 Apr, 2014 4:18 pm
Re: [Patch]Memory setting patch
This is possible, however you can't use DOS with less than 64kb. As PCem doesn't emulate the cassette interface adding a 16kb option would be pretty useless.ppgrainbow wrote:I've hear that IBM PCs can go down to as little as just 16 KB!
Compaq Deskpro 386 looks to have had 1 MB minimum; it used custom memory boards, and I don't think they existed below 1MB. MegaPC also shipped with 1 MB minimum, though in that case it _may_ have been possible to run it with less (assuming the BIOS doesn't require shadow RAM to be available); but why bother?ppgrainbow wrote:Thanks for telling me. Let's not forget about allowing the Compaq Deskpro 386 and the Amstrad Mega PC to have less than 1 MB of memory and remapping the memory also. :p
- ppgrainbow
- Posts: 479
- Joined: Thu 04 Sep, 2014 7:03 am
- Contact:
Re: [Patch]Memory setting patch
Let's not forget that the IBM PS/1 Model 2121 shipped with 2 MB RAM minimum and can go up to 6 MB RAM maximum in 2 MB increments. Pentium motherboards will eventually need to have 4 MB RAM minimum in 4 MB increments too.SarahWalker wrote:This is possible, however you can't use DOS with less than 64kb. As PCem doesn't emulate the cassette interface adding a 16kb option would be pretty useless.ppgrainbow wrote:I've hear that IBM PCs can go down to as little as just 16 KB!
Compaq Deskpro 386 looks to have had 1 MB minimum; it used custom memory boards, and I don't think they existed below 1MB. MegaPC also shipped with 1 MB minimum, though in that case it _may_ have been possible to run it with less (assuming the BIOS doesn't require shadow RAM to be available); but why bother?ppgrainbow wrote:Thanks for telling me. Let's not forget about allowing the Compaq Deskpro 386 and the Amstrad Mega PC to have less than 1 MB of memory and remapping the memory also. :p
- ppgrainbow
- Posts: 479
- Joined: Thu 04 Sep, 2014 7:03 am
- Contact:
Re: [Patch]Memory setting patch
Let's not forget that the IBM PS/1 Model 2121 shipped with 2 MB RAM minimum and can go up to 6 MB RAM maximum in 2 MB increments. Pentium motherboards will eventually need to have 4 MB RAM minimum in 4 MB increments too.SarahWalker wrote:This is possible, however you can't use DOS with less than 64kb. As PCem doesn't emulate the cassette interface adding a 16kb option would be pretty useless.ppgrainbow wrote:I've hear that IBM PCs can go down to as little as just 16 KB!
Compaq Deskpro 386 looks to have had 1 MB minimum; it used custom memory boards, and I don't think they existed below 1MB. MegaPC also shipped with 1 MB minimum, though in that case it _may_ have been possible to run it with less (assuming the BIOS doesn't require shadow RAM to be available); but why bother?ppgrainbow wrote:Thanks for telling me. Let's not forget about allowing the Compaq Deskpro 386 and the Amstrad Mega PC to have less than 1 MB of memory and remapping the memory also. :p
By the way, thank you for patching up several 286 and 386SX emulated machines!
Last edited by ppgrainbow on Mon 19 Jun, 2017 4:14 am, edited 1 time in total.
Re: [Patch]Memory setting patch
This patch breaks the Pentium machines. For example, Intel Advanced/EV now hangs at POST. I really don't think all AT-class machines with IDE should have the top 384 kB remapped.
Edit: After moving the top 384 kB remap from the AT+IDE init routine to the init routines for AT NEAT, AT SCAT, and AT Headland, the Pentium machines work again.
Edit: After moving the top 384 kB remap from the AT+IDE init routine to the init routines for AT NEAT, AT SCAT, and AT Headland, the Pentium machines work again.
-
- Posts: 151
- Joined: Tue 22 Mar, 2016 10:03 am
- Location: Korea
- Contact:
Re: [Patch]Memory setting patch
You're right. Remapping top 384k memory should be applied only no shadowram support machine like IBM AT or AT compatible machine that uses Chips & Technologies 82C201/82C202 chipset so mem_remap_top_384k() statement in at_ide_init() function must be removed like below.Battler wrote:This patch breaks the Pentium machines. For example, Intel Advanced/EV now hangs at POST. I really don't think all AT-class machines with IDE should have the top 384 kB remapped.
Code: Select all
void at_ide_init()
{
at_init();
ide_init();
// mem_remap_top_384k(); // This line should be removed.
}
mem_remap_top_384k() should not be called AT NEAT, AT SCAT, AT Headland chipset initialization because that chipsets support shadow ram and can alter memory remapping feature via chipset-spectific register. But in PCem, only AT SCAT chipset's memory remapping feature is implemeted now.Edit: After moving the top 384 kB remap from the AT+IDE init routine to the init routines for AT NEAT, AT SCAT, and AT Headland, the Pentium machines work again.
- SarahWalker
- Site Admin
- Posts: 2054
- Joined: Thu 24 Apr, 2014 4:18 pm
Re: [Patch]Memory setting patch
I'm confused now. at_ide_init() is only used by the Commodore PC 30 III, and is never called on any of the Pentium machines or indeed any other machine at all. It's badly named, but is NOT a generic function for AT+IDE.
I've also just tried the Advanced/EV, and it's working fine...
I've also just tried the Advanced/EV, and it's working fine...
Re: [Patch]Memory setting patch
This is what happens when I apply a commit from Sarah the wrong way (by making all AT+IDE boards use at_ide_init()) and then apply this commit here. So yeah, I apologize for the false report, it's just a case of situation normal: I messed up. :p
- ppgrainbow
- Posts: 479
- Joined: Thu 04 Sep, 2014 7:03 am
- Contact:
Re: [Patch]Memory setting patch
Speaking of the Commodore PC 30 III, when I select 1,024 KB RAM, the BIOS reports only 640 KB of memory usable. If I select 1,408 KB RAM, the BIOS will report 384 KB of extended memory usable.
And at least 1,408 KB of RAM is needed to run Windows 3.0 in Standard Mode. If 1,024 KB RAM is selected, Windows 3.0 will only run in Real Model due to the 384 KB of extended memory not being remapped.
And at least 1,408 KB of RAM is needed to run Windows 3.0 in Standard Mode. If 1,024 KB RAM is selected, Windows 3.0 will only run in Real Model due to the 384 KB of extended memory not being remapped.
- SarahWalker
- Site Admin
- Posts: 2054
- Joined: Thu 24 Apr, 2014 4:18 pm
Re: [Patch]Memory setting patch
Seems to be working here...
-
- Posts: 151
- Joined: Tue 22 Mar, 2016 10:03 am
- Location: Korea
- Contact:
Re: [Patch]Memory setting patch
I've selected 1024KB RAM, the BIOS reports 640KB conventional memory and total 1024KB memory and no problem to use 384KB extended memory.ppgrainbow wrote:Speaking of the Commodore PC 30 III, when I select 1,024 KB RAM, the BIOS reports only 640 KB of memory usable. If I select 1,408 KB RAM, the BIOS will report 384 KB of extended memory usable.
And at least 1,408 KB of RAM is needed to run Windows 3.0 in Standard Mode. If 1,024 KB RAM is selected, Windows 3.0 will only run in Real Model due to the 384 KB of extended memory not being remapped.