u8 psxHwRead8(u32 add) {
unsigned char hard;
- switch (add) {
+ switch (add & 0x1fffffff) {
case 0x1f801040: hard = sioRead8();break; \r
#ifdef ENABLE_SIO1API
case 0x1f801050: hard = SIO1_readData8(); break;\r
u16 psxHwRead16(u32 add) {
unsigned short hard;
- switch (add) {
+ switch (add & 0x1fffffff) {
#ifdef PSXHW_LOG
case 0x1f801070: PSXHW_LOG("IREG 16bit read %x\n", psxHu16(0x1070));
return psxHu16(0x1070);
return hard;
case 0x1f80105e:
hard = SIO1_readBaud16();
- return hard;\r
+ return hard;
+#else
+ /* Fixes Armored Core misdetecting the Link cable being detected.
+ * We want to turn that thing off and force it to do local multiplayer instead.
+ * Thanks Sony for the fix, they fixed it in their PS Classic fork.
+ */
+ case 0x1f801054:
+ return 0x80;\r
#endif
case 0x1f801100:
hard = psxRcntRcount(0);
u32 psxHwRead32(u32 add) {
u32 hard;
- switch (add) {
+ switch (add & 0x1fffffff) {
case 0x1f801040:
hard = sioRead8();
hard |= sioRead8() << 8;
}
void psxHwWrite8(u32 add, u8 value) {
- switch (add) {
+ switch (add & 0x1fffffff) {
case 0x1f801040: sioWrite8(value); break;\r
#ifdef ENABLE_SIO1API
case 0x1f801050: SIO1_writeData8(value); break;\r
}
void psxHwWrite16(u32 add, u16 value) {
- switch (add) {
+ switch (add & 0x1fffffff) {
case 0x1f801040:
sioWrite8((unsigned char)value);
sioWrite8((unsigned char)(value>>8));
}
void psxHwWrite32(u32 add, u32 value) {
- switch (add) {
+ switch (add & 0x1fffffff) {
case 0x1f801040:
sioWrite8((unsigned char)value);
sioWrite8((unsigned char)((value&0xff) >> 8));