reverted the removal of backup enabled checks, and changes to remote.cpp
This commit is contained in:
parent
478e77c081
commit
02928a204b
|
@ -114,11 +114,20 @@ static inline u32 CPUReadMemory(u32 address)
|
||||||
value = READ32LE(((u32 *)&rom[address&0x1FFFFFC]));
|
value = READ32LE(((u32 *)&rom[address&0x1FFFFFC]));
|
||||||
break;
|
break;
|
||||||
case 13:
|
case 13:
|
||||||
value = eepromRead(address);
|
if(cpuEEPROMEnabled)
|
||||||
break;
|
// no need to swap this
|
||||||
|
return eepromRead(address);
|
||||||
|
goto unreadable;
|
||||||
case 14:
|
case 14:
|
||||||
case 15:
|
case 15:
|
||||||
value = flashRead(address) * 0x01010101;
|
if(cpuFlashEnabled | cpuSramEnabled)
|
||||||
|
{ // no need to swap this
|
||||||
|
#ifdef __libretro__
|
||||||
|
return flashRead(address);
|
||||||
|
#else
|
||||||
|
value = flashRead(address) * 0x01010101;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
// default
|
// default
|
||||||
default:
|
default:
|
||||||
|
@ -260,12 +269,21 @@ static inline u32 CPUReadHalfWord(u32 address)
|
||||||
value = READ16LE(((u16 *)&rom[address & 0x1FFFFFE]));
|
value = READ16LE(((u16 *)&rom[address & 0x1FFFFFE]));
|
||||||
break;
|
break;
|
||||||
case 13:
|
case 13:
|
||||||
value = eepromRead(address);
|
if(cpuEEPROMEnabled)
|
||||||
break;
|
// no need to swap this
|
||||||
|
return eepromRead(address);
|
||||||
|
goto unreadable;
|
||||||
case 14:
|
case 14:
|
||||||
case 15:
|
case 15:
|
||||||
value = flashRead(address) * 0x0101;
|
if(cpuFlashEnabled | cpuSramEnabled)
|
||||||
break;
|
// no need to swap this
|
||||||
|
{
|
||||||
|
#ifdef __libretro__
|
||||||
|
return flashRead(address);
|
||||||
|
#else
|
||||||
|
value = flashRead(address) * 0x0101;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
// default
|
// default
|
||||||
default:
|
default:
|
||||||
unreadable:
|
unreadable:
|
||||||
|
@ -356,24 +374,25 @@ static inline u8 CPUReadByte(u32 address)
|
||||||
case 12:
|
case 12:
|
||||||
return rom[address & 0x1FFFFFF];
|
return rom[address & 0x1FFFFFF];
|
||||||
case 13:
|
case 13:
|
||||||
return eepromRead(address);
|
if(cpuEEPROMEnabled)
|
||||||
|
return eepromRead(address);
|
||||||
|
goto unreadable;
|
||||||
case 14:
|
case 14:
|
||||||
case 15:
|
case 15:
|
||||||
{
|
if(cpuSramEnabled | cpuFlashEnabled)
|
||||||
if (cpuEEPROMSensorEnabled) {
|
return flashRead(address);
|
||||||
switch (address & 0x00008f00) {
|
if(cpuEEPROMSensorEnabled) {
|
||||||
case 0x8200:
|
switch(address & 0x00008f00) {
|
||||||
return systemGetSensorX() & 255;
|
case 0x8200:
|
||||||
case 0x8300:
|
return systemGetSensorX() & 255;
|
||||||
return (systemGetSensorX() >> 8) | 0x80;
|
case 0x8300:
|
||||||
case 0x8400:
|
return (systemGetSensorX() >> 8)|0x80;
|
||||||
return systemGetSensorY() & 255;
|
case 0x8400:
|
||||||
case 0x8500:
|
return systemGetSensorY() & 255;
|
||||||
return systemGetSensorY() >> 8;
|
case 0x8500:
|
||||||
}
|
return systemGetSensorY() >> 8;
|
||||||
}
|
}
|
||||||
return flashRead(address);
|
}
|
||||||
}
|
|
||||||
// default
|
// default
|
||||||
default:
|
default:
|
||||||
unreadable:
|
unreadable:
|
||||||
|
|
|
@ -76,11 +76,7 @@ bool remoteTcpInit()
|
||||||
|
|
||||||
remoteListenSocket = s;
|
remoteListenSocket = s;
|
||||||
|
|
||||||
#ifdef _WIN32
|
|
||||||
if(s == INVALID_SOCKET) {
|
|
||||||
#else
|
|
||||||
if(s < 0) {
|
if(s < 0) {
|
||||||
#endif
|
|
||||||
fprintf(stderr,"Error opening socket\n");
|
fprintf(stderr,"Error opening socket\n");
|
||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue