mirror of https://github.com/mgba-emu/mgba.git
GBA Hardware: Improve Game Boy Player rumble behavior
This commit is contained in:
parent
8345e29798
commit
f2dadbd8b1
1
CHANGES
1
CHANGES
|
@ -18,6 +18,7 @@ Bugfixes:
|
||||||
- GB: Fix invalid STOP behavior on Game Boy Color
|
- GB: Fix invalid STOP behavior on Game Boy Color
|
||||||
- GB, GBA: Fix emulator hardlocking when halting with IRQs off
|
- GB, GBA: Fix emulator hardlocking when halting with IRQs off
|
||||||
- SDL: Attach rumble in SDL frontend
|
- SDL: Attach rumble in SDL frontend
|
||||||
|
- GBA Hardware: Improve Game Boy Player rumble behavior
|
||||||
Misc:
|
Misc:
|
||||||
- All: Only update version info if needed
|
- All: Only update version info if needed
|
||||||
- FFmpeg: Encoding cleanup
|
- FFmpeg: Encoding cleanup
|
||||||
|
|
|
@ -563,12 +563,15 @@ int32_t _gbpSioProcessEvents(struct GBASIODriver* driver, int32_t cycles) {
|
||||||
gbp->p->gbpNextEvent -= cycles;
|
gbp->p->gbpNextEvent -= cycles;
|
||||||
if (gbp->p->gbpNextEvent <= 0) {
|
if (gbp->p->gbpNextEvent <= 0) {
|
||||||
uint32_t tx = 0;
|
uint32_t tx = 0;
|
||||||
if (gbp->p->gbpTxPosition <= 12) {
|
int txPosition = gbp->p->gbpTxPosition;
|
||||||
tx = _gbpTxData[gbp->p->gbpTxPosition];
|
if (txPosition > 16) {
|
||||||
if (gbp->p->gbpTxPosition < 12) {
|
gbp->p->gbpTxPosition = 0;
|
||||||
++gbp->p->gbpTxPosition;
|
txPosition = 0;
|
||||||
}
|
} else if (txPosition > 12) {
|
||||||
|
txPosition = 12;
|
||||||
}
|
}
|
||||||
|
tx = _gbpTxData[txPosition];
|
||||||
|
++gbp->p->gbpTxPosition;
|
||||||
gbp->p->p->memory.io[REG_SIODATA32_LO >> 1] = tx;
|
gbp->p->p->memory.io[REG_SIODATA32_LO >> 1] = tx;
|
||||||
gbp->p->p->memory.io[REG_SIODATA32_HI >> 1] = tx >> 16;
|
gbp->p->p->memory.io[REG_SIODATA32_HI >> 1] = tx >> 16;
|
||||||
if (gbp->d.p->normalControl.irq) {
|
if (gbp->d.p->normalControl.irq) {
|
||||||
|
|
Loading…
Reference in New Issue