mirror of
https://github.com/ekeeke/Genesis-Plus-GX.git
synced 2025-01-13 19:59:07 +01:00
[Core/CD] minor optimization of Word-RAM switching in 1M mode
This commit is contained in:
parent
8169f02496
commit
9b0b8d3afc
@ -717,6 +717,15 @@ INLINE void word_ram_switch(uint8 mode)
|
|||||||
*ptr2++=*ptr1++;
|
*ptr2++=*ptr1++;
|
||||||
*ptr3++=*ptr1++;
|
*ptr3++=*ptr1++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* SUB-CPU: $0C0000-$0DFFFF is mapped to Word-RAM 0 or 1 */
|
||||||
|
for (i=0x0c; i<0x0e; i++)
|
||||||
|
{
|
||||||
|
s68k.memory_map[i].read8 = NULL;
|
||||||
|
s68k.memory_map[i].read16 = NULL;
|
||||||
|
s68k.memory_map[i].write8 = NULL;
|
||||||
|
s68k.memory_map[i].write16 = NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -859,11 +868,7 @@ static void scd_write_byte(unsigned int address, unsigned int data)
|
|||||||
for (i=0x0c; i<0x0e; i++)
|
for (i=0x0c; i<0x0e; i++)
|
||||||
{
|
{
|
||||||
/* Word-RAM 0 data mapped at $0C0000-$0DFFFF */
|
/* Word-RAM 0 data mapped at $0C0000-$0DFFFF */
|
||||||
s68k.memory_map[i].base = scd.word_ram[0] + ((i & 0x01) << 16);
|
s68k.memory_map[i].base = scd.word_ram[0] + ((i & 0x01) << 16);
|
||||||
s68k.memory_map[i].read8 = NULL;
|
|
||||||
s68k.memory_map[i].read16 = NULL;
|
|
||||||
s68k.memory_map[i].write8 = NULL;
|
|
||||||
s68k.memory_map[i].write16 = NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* writing 1 to RET bit in 1M mode returns Word-RAM to MAIN-CPU in 2M mode */
|
/* writing 1 to RET bit in 1M mode returns Word-RAM to MAIN-CPU in 2M mode */
|
||||||
@ -902,11 +907,7 @@ static void scd_write_byte(unsigned int address, unsigned int data)
|
|||||||
for (i=0x0c; i<0x0e; i++)
|
for (i=0x0c; i<0x0e; i++)
|
||||||
{
|
{
|
||||||
/* Word-RAM 1 data mapped at $0C0000-$0DFFFF */
|
/* Word-RAM 1 data mapped at $0C0000-$0DFFFF */
|
||||||
s68k.memory_map[i].base = scd.word_ram[1] + ((i & 0x01) << 16);
|
s68k.memory_map[i].base = scd.word_ram[1] + ((i & 0x01) << 16);
|
||||||
s68k.memory_map[i].read8 = NULL;
|
|
||||||
s68k.memory_map[i].read16 = NULL;
|
|
||||||
s68k.memory_map[i].write8 = NULL;
|
|
||||||
s68k.memory_map[i].write16 = NULL;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1130,11 +1131,7 @@ static void scd_write_word(unsigned int address, unsigned int data)
|
|||||||
for (i=0x0c; i<0x0e; i++)
|
for (i=0x0c; i<0x0e; i++)
|
||||||
{
|
{
|
||||||
/* Word-RAM 0 data mapped at $0C0000-$0DFFFF */
|
/* Word-RAM 0 data mapped at $0C0000-$0DFFFF */
|
||||||
s68k.memory_map[i].base = scd.word_ram[0] + ((i & 0x01) << 16);
|
s68k.memory_map[i].base = scd.word_ram[0] + ((i & 0x01) << 16);
|
||||||
s68k.memory_map[i].read8 = NULL;
|
|
||||||
s68k.memory_map[i].read16 = NULL;
|
|
||||||
s68k.memory_map[i].write8 = NULL;
|
|
||||||
s68k.memory_map[i].write16 = NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* writing 1 to RET bit in 1M mode returns Word-RAM to MAIN-CPU in 2M mode */
|
/* writing 1 to RET bit in 1M mode returns Word-RAM to MAIN-CPU in 2M mode */
|
||||||
@ -1173,11 +1170,7 @@ static void scd_write_word(unsigned int address, unsigned int data)
|
|||||||
for (i=0x0c; i<0x0e; i++)
|
for (i=0x0c; i<0x0e; i++)
|
||||||
{
|
{
|
||||||
/* Word-RAM 1 data mapped at $0C0000-$0DFFFF */
|
/* Word-RAM 1 data mapped at $0C0000-$0DFFFF */
|
||||||
s68k.memory_map[i].base = scd.word_ram[1] + ((i & 0x01) << 16);
|
s68k.memory_map[i].base = scd.word_ram[1] + ((i & 0x01) << 16);
|
||||||
s68k.memory_map[i].read8 = NULL;
|
|
||||||
s68k.memory_map[i].read16 = NULL;
|
|
||||||
s68k.memory_map[i].write8 = NULL;
|
|
||||||
s68k.memory_map[i].write16 = NULL;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user