mirror of https://github.com/mgba-emu/mgba.git
GBA SIO: Add a dummy driver for Normal mode
This commit is contained in:
parent
3974042259
commit
e0d0e86b70
1
CHANGES
1
CHANGES
|
@ -39,6 +39,7 @@ Misc:
|
|||
- All: Add --help flag for command line programs
|
||||
- Qt: Show version info in window title
|
||||
- All: Fix sanitize-deb script to set file permissions properly if run as (fake)root
|
||||
- GBA SIO: Add a dummy driver for Normal mode
|
||||
|
||||
0.2.1: (2015-05-13)
|
||||
Bugfixes:
|
||||
|
|
|
@ -133,6 +133,23 @@ void GBASIOWriteRCNT(struct GBASIO* sio, uint16_t value) {
|
|||
void GBASIOWriteSIOCNT(struct GBASIO* sio, uint16_t value) {
|
||||
if (sio->activeDriver && sio->activeDriver->writeRegister) {
|
||||
value = sio->activeDriver->writeRegister(sio->activeDriver, REG_SIOCNT, value);
|
||||
} else {
|
||||
// Dummy drivers
|
||||
switch (sio->mode) {
|
||||
case SIO_NORMAL_8:
|
||||
case SIO_NORMAL_32:
|
||||
value |= 0x0004;
|
||||
if (value & 0x0080) {
|
||||
if ((value & 0x4080) == 0x4080) {
|
||||
// TODO: Test this on hardware to see if this is correct
|
||||
GBARaiseIRQ(sio->p, IRQ_SIO);
|
||||
}
|
||||
value &= ~0x0080;
|
||||
break;
|
||||
default:
|
||||
// TODO
|
||||
break;
|
||||
}
|
||||
}
|
||||
sio->siocnt = value;
|
||||
_switchMode(sio);
|
||||
|
|
Loading…
Reference in New Issue