mirror of
https://github.com/libretro/Mu.git
synced 2026-09-22 14:45:57 +00:00
Fix chip select status bits not being casted to bool properly on non stdbool.h platforms
Also fixed the 64k install limit.
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
PSP
|
||||
msvc2010
|
||||
classics/new haxchi(should work)
|
||||
xbox(don't know)
|
||||
xbox360(don't know)
|
||||
|
||||
Fixed:
|
||||
msvc2010
|
||||
msvc2003
|
||||
remove old haxchi
|
||||
emscripten
|
||||
|
||||
@@ -6,8 +6,10 @@ If there is no userdata-en-m515.ram on Android the emu won't create it(this is l
|
||||
Theres no auto ROM installer
|
||||
app install hack needs to be removed when SD card works
|
||||
double pressing power button issue
|
||||
16 bpp mode is broken
|
||||
|
||||
Fixed:
|
||||
64k app install limit
|
||||
device runs at around half speed for some reason(the SYSCLK divider was not scaled properly)
|
||||
Sound(those cute little PWM beeps)
|
||||
Mac Qt build has no icons
|
||||
|
||||
@@ -41,6 +41,7 @@ the unemulated chip selects(CSB1, CSC0/1) privilege violation interrupts will no
|
||||
|
||||
SED1376:
|
||||
swivelview register
|
||||
16 bpp mode is broken and crushed to the top of the screen
|
||||
|
||||
ADS7846:
|
||||
verify chip select(no test has been done yet, put everything points to port g bit 2)
|
||||
|
||||
@@ -185,8 +185,7 @@ DISTFILES += \
|
||||
images/stateManager.svg \
|
||||
images/stop.svg \
|
||||
images/todo.svg \
|
||||
images/up.svg \
|
||||
../../src/m68k/cyclone/Cyclone.s
|
||||
images/up.svg
|
||||
|
||||
RESOURCES += \
|
||||
mainwindow.qrc
|
||||
|
||||
@@ -402,7 +402,28 @@ static void freePalmString(uint32_t address){
|
||||
}
|
||||
|
||||
static bool installResourceToDevice(buffer_t resourceBuffer){
|
||||
uint32_t palmSideResourceData = callFunction(false, 0x00000000, MemPtrNew, "p(l)", (uint32_t)resourceBuffer.size);
|
||||
/*
|
||||
#define memNewChunkFlagNonMovable 0x0200
|
||||
#define memNewChunkFlagAllowLarge 0x1000 // this is not in the sdk *g*
|
||||
|
||||
void *MemPtrNewL ( UInt32 size ) {
|
||||
|
||||
SysAppInfoPtr appInfoP;
|
||||
UInt16 ownerID;
|
||||
|
||||
ownerID =
|
||||
((SysAppInfoPtr)SysGetAppInfo(&appInfoP, &appInfoP))->memOwnerID;
|
||||
|
||||
return MemChunkNew ( 0, size, ownerID |
|
||||
memNewChunkFlagNonMovable |
|
||||
memNewChunkFlagAllowLarge );
|
||||
|
||||
}
|
||||
*/
|
||||
|
||||
//uint32_t palmSideResourceData = callFunction(false, 0x00000000, MemPtrNew, "p(l)", (uint32_t)resourceBuffer.size);
|
||||
uint32_t palmSideResourceData = callFunction(false, 0x00000000, MemChunkNew, "p(wlw)", 1/*heapID, storage RAM*/, (uint32_t)resourceBuffer.size, 0x1200/*attr, seems to work without memOwnerID*/);
|
||||
bool storageRamReadOnly = chips[CHIP_DX_RAM].readOnlyForProtectedMemory;
|
||||
uint16_t error;
|
||||
uint32_t count;
|
||||
|
||||
@@ -410,8 +431,10 @@ static bool installResourceToDevice(buffer_t resourceBuffer){
|
||||
if(!palmSideResourceData)
|
||||
return false;
|
||||
|
||||
chips[CHIP_DX_RAM].readOnlyForProtectedMemory = false;//need to unprotect storage RAM
|
||||
for(count = 0; count < resourceBuffer.size; count++)
|
||||
m68k_write_memory_8(palmSideResourceData + count, resourceBuffer.data[count]);
|
||||
chips[CHIP_DX_RAM].readOnlyForProtectedMemory = storageRamReadOnly;//restore old protection state
|
||||
error = callFunction(false, 0x00000000, DmCreateDatabaseFromImage, "w(p)", palmSideResourceData);//Err DmCreateDatabaseFromImage(MemPtr bufferP);//this looks best
|
||||
callFunction(false, 0x00000000, MemChunkFree, "w(p)", palmSideResourceData);
|
||||
|
||||
|
||||
@@ -125,7 +125,7 @@ static void pwm1FifoFlush(void){
|
||||
//register setters
|
||||
static void setCsa(uint16_t value){
|
||||
chips[CHIP_A0_ROM].enable = value & 0x0001;
|
||||
chips[CHIP_A0_ROM].readOnly = value & 0x8000;
|
||||
chips[CHIP_A0_ROM].readOnly = !!(value & 0x8000);
|
||||
chips[CHIP_A0_ROM].lineSize = 0x20000/*128kb*/ << (value >> 1 & 0x0007);
|
||||
|
||||
//CSA is now just a normal chip select
|
||||
@@ -144,12 +144,12 @@ static void setCsb(uint16_t value){
|
||||
uint16_t csControl1 = registerArrayRead16(CSCTRL1);
|
||||
|
||||
chips[CHIP_B0_SED].enable = value & 0x0001;
|
||||
chips[CHIP_B0_SED].readOnly = value & 0x8000;
|
||||
chips[CHIP_B0_SED].readOnly = !!(value & 0x8000);
|
||||
chips[CHIP_B0_SED].lineSize = 0x20000/*128kb*/ << (value >> 1 & 0x0007);
|
||||
|
||||
//attributes
|
||||
chips[CHIP_B0_SED].supervisorOnlyProtectedMemory = value & 0x4000;
|
||||
chips[CHIP_B0_SED].readOnlyForProtectedMemory = value & 0x2000;
|
||||
chips[CHIP_B0_SED].supervisorOnlyProtectedMemory = !!(value & 0x4000);
|
||||
chips[CHIP_B0_SED].readOnlyForProtectedMemory = !!(value & 0x2000);
|
||||
if(csControl1 & 0x4000 && csControl1 & 0x0001)
|
||||
chips[CHIP_B0_SED].unprotectedSize = chips[CHIP_B0_SED].lineSize / (1 << 7 - ((value >> 11 & 0x0003) | 0x0004));
|
||||
else
|
||||
@@ -162,15 +162,15 @@ static void setCsd(uint16_t value){
|
||||
uint16_t csControl1 = registerArrayRead16(CSCTRL1);
|
||||
|
||||
chips[CHIP_DX_RAM].enable = value & 0x0001;
|
||||
chips[CHIP_DX_RAM].readOnly = value & 0x8000;
|
||||
chips[CHIP_DX_RAM].readOnly = !!(value & 0x8000);
|
||||
if(csControl1 & 0x0040 && value & 0x0200)
|
||||
chips[CHIP_DX_RAM].lineSize = 0x800000/*8mb*/ << (value >> 1 & 0x0001);
|
||||
else
|
||||
chips[CHIP_DX_RAM].lineSize = 0x8000/*32kb*/ << (value >> 1 & 0x0007);
|
||||
|
||||
//attributes
|
||||
chips[CHIP_DX_RAM].supervisorOnlyProtectedMemory = value & 0x4000;
|
||||
chips[CHIP_DX_RAM].readOnlyForProtectedMemory = value & 0x2000;
|
||||
chips[CHIP_DX_RAM].supervisorOnlyProtectedMemory = !!(value & 0x4000);
|
||||
chips[CHIP_DX_RAM].readOnlyForProtectedMemory = !!(value & 0x2000);
|
||||
if(csControl1 & 0x4000 && csControl1 & 0x0010)
|
||||
chips[CHIP_DX_RAM].unprotectedSize = chips[CHIP_DX_RAM].lineSize / (1 << 7 - ((value >> 11 & 0x0003) | 0x0004));
|
||||
else
|
||||
|
||||
@@ -7,7 +7,7 @@ static void timer1(uint8_t reason, double sysclks){
|
||||
uint16_t timer1Compare = registerArrayRead16(TCMP1);
|
||||
double timer1OldCount = timerCycleCounter[0];
|
||||
double timer1Prescaler = (registerArrayRead16(TPRER1) & 0x00FF) + 1;
|
||||
bool timer1Enabled = timer1Control & 0x0001;//no need for a bool cast, already using the lowest bit
|
||||
bool timer1Enabled = timer1Control & 0x0001;
|
||||
|
||||
if(timer1Enabled){
|
||||
switch((timer1Control & 0x000E) >> 1){
|
||||
@@ -74,7 +74,7 @@ static void timer2(uint8_t reason, double sysclks){
|
||||
uint16_t timer2Compare = registerArrayRead16(TCMP2);
|
||||
double timer2OldCount = timerCycleCounter[1];
|
||||
double timer2Prescaler = (registerArrayRead16(TPRER2) & 0x00FF) + 1;
|
||||
bool timer2Enabled = timer2Control & 0x0001;//no need for a bool cast, already using the lowest bit
|
||||
bool timer2Enabled = timer2Control & 0x0001;
|
||||
|
||||
if(timer2Enabled){
|
||||
switch((timer2Control & 0x000E) >> 1){
|
||||
|
||||
@@ -172,7 +172,7 @@ void sed1376LoadState(uint8_t* data){
|
||||
}
|
||||
|
||||
bool sed1376PowerSaveEnabled(void){
|
||||
return sed1376Registers[PWR_SAVE_CFG] & 0x01;//no need for a bool cast, already using the lowest bit
|
||||
return sed1376Registers[PWR_SAVE_CFG] & 0x01;
|
||||
}
|
||||
|
||||
uint8_t sed1376GetRegister(uint8_t address){
|
||||
|
||||
Reference in New Issue
Block a user