First post, by superfury
superfury
Offline
Rank
l33t++
Anyone knows what the effect of this bit is during memory reads/writes?
O/E Page -- Odd/Even Page Select "Selects the upper/lower 64K page of memory when the system is in an eve/odd mode (modes 0,1,2, […]
O/E Page -- Odd/Even Page Select
"Selects the upper/lower 64K page of memory when the system is in an eve/odd mode (modes 0,1,2,3,7).
= 0 selects the low page
= 1 selects the high page"
Does this simply enable/disable the copy of the low 2 planes (0/1) into the high 2 planes (2/3) during memory reads/writes?
Like:
planes = 3; //Planes 0, 1 or both set, depending on memory address! Write to planes 0&1 in this example.if (MISCOUTPUTREGISTER.OE_Page){planes |= (planes<<2); //Copy to the high planes too!}//Perform writes to planes 0, 1, 2, 3 depending on bits 0, 1, 2, 3 in planes.
Or is it simply:
//offset=CPU offset requested.planes = 1; //We're a to access to the first or second plane!useoffset = offset; //The offset requested by the CPU!useoffset &= ~1; //Clear bit 0: we don't use it for address calculations!if (offset&1) //High plane requested?{if (MISCOUTPUTREGISTER.OE_Page) //Use high page?{planes <<= 1; //Take the high 64k offset! So plane 1/3! The offset is used as a word mode during rendering!}else //Use low page, but odd offsets?{useoffset |= 1; //High byte within the low plane! So plane 0/2@(offset+1) (like mode 6h)}}planes |= (planes<<2); //Take high planes too!//Perform writes to planes 0, 1, 2, 3 depending on bits 0, 1, 2, 3 in planes.
Is this correct? Anyone knows the effect of this bit on memory reads&writes by the CPU? What happens when it's toggled on and off?
Anyone can tell me more about the effect of this bit?
Author of the UniPCemu emulator.
UniPCemu Git repository
UniPCemu for Android, Windows, PSP, Vita and Switch on itch.io