summaryrefslogtreecommitdiffstatshomepage
path: root/src/mess/machine/amstrad.c
diff options
context:
space:
mode:
author mahlemiut <mahlemiut@users.noreply.github.com>2014-08-06 01:44:07 +0000
committer mahlemiut <mahlemiut@users.noreply.github.com>2014-08-06 01:44:07 +0000
commit06b51f4e8e05c51adcea02e55c1ef3b9b5242a59 (patch)
tree172489ef7df99ab917f16f4ef6d5c8e20fb54e8d /src/mess/machine/amstrad.c
parentec0a11fb91a7131f81a9b4d2e51553ebf0d4c4c5 (diff)
amstrad: added support for 64k, 320k, and 576k RAM sizes
added preliminary support for the SYMBiFACE II board [Barry Rodewald] idehd: added Read Native Max Address IDE command
Diffstat (limited to 'src/mess/machine/amstrad.c')
-rw-r--r--src/mess/machine/amstrad.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/src/mess/machine/amstrad.c b/src/mess/machine/amstrad.c
index 263e6dc9172..69fb4a30084 100644
--- a/src/mess/machine/amstrad.c
+++ b/src/mess/machine/amstrad.c
@@ -1270,20 +1270,34 @@ void amstrad_state::AmstradCPC_GA_SetRamConfiguration()
int ConfigurationIndex = m_GateArray_RamConfiguration & 0x07;
int BankIndex,i;
unsigned char *BankAddr;
+ UINT8 banknum = (m_GateArray_RamConfiguration & 0x38) >> 3;
/* if b5 = 0 */
- if(((m_GateArray_RamConfiguration) & (1<<5)) == 0)
+ if(m_ram->size() > 65536)
{
for (i=0;i<4;i++)
{
BankIndex = RamConfigurations[(ConfigurationIndex << 2) + i];
- BankAddr = m_ram->pointer() + (BankIndex << 14);
+ if(BankIndex > 3)
+ {
+ UINT8 maxbank = ((m_ram->size()-65536) / 65536);
+ BankAddr = m_ram->pointer() + (BankIndex << 14) + ((banknum%maxbank)*0x10000);
+ }
+ else
+ BankAddr = m_ram->pointer() + (BankIndex << 14);
m_Aleste_RamBanks[i] = BankAddr;
m_AmstradCPC_RamBanks[i] = BankAddr;
}
}
else
- {/* Need to add the ram expansion configuration here ! */
+ {
+ // set normal 64k RAM mapping
+ for (i=0;i<4;i++)
+ {
+ BankAddr = m_ram->pointer() + (i << 14);
+ m_Aleste_RamBanks[i] = BankAddr;
+ m_AmstradCPC_RamBanks[i] = BankAddr;
+ }
}
amstrad_rethinkMemory();
}