GBA SIO: Minor code modernization

This commit is contained in:
Vicki Pfau 2023-02-03 02:20:47 -08:00
parent 527313bafc
commit f37d068733
1 changed files with 3 additions and 3 deletions

View File

@ -184,13 +184,13 @@ void GBASIOWriteSIOCNT(struct GBASIO* sio, uint16_t value) {
switch (sio->mode) { switch (sio->mode) {
case SIO_NORMAL_8: case SIO_NORMAL_8:
case SIO_NORMAL_32: case SIO_NORMAL_32:
value |= 0x0004; value = GBASIONormalFillSi(value);
if ((value & 0x0081) == 0x0081) { if ((value & 0x0081) == 0x0081) {
if (value & 0x4000) { if (GBASIONormalIsIrq(value)) {
// TODO: Test this on hardware to see if this is correct // TODO: Test this on hardware to see if this is correct
GBARaiseIRQ(sio->p, GBA_IRQ_SIO, 0); GBARaiseIRQ(sio->p, GBA_IRQ_SIO, 0);
} }
value &= ~0x0080; value = GBASIONormalClearStart(value);
} }
break; break;
case SIO_MULTI: case SIO_MULTI: