mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-06 07:38:05 -04:00
32x, improve poll detection
This commit is contained in:
parent
3368c27707
commit
bd07808352
6 changed files with 17 additions and 4 deletions
|
@ -24,9 +24,10 @@ typedef u8 UINT8;
|
|||
static __inline unsigned int name(SH2 *sh2, unsigned int a) \
|
||||
{ \
|
||||
unsigned int ret; \
|
||||
sh2->sr |= sh2->icount << 12; \
|
||||
sh2->sr |= (sh2->icount << 12) | (sh2->no_polling); \
|
||||
ret = cname(a, sh2); \
|
||||
sh2->icount = (signed int)sh2->sr >> 12; \
|
||||
sh2->no_polling = (sh2->sr & SH2_NO_POLLING); \
|
||||
sh2->sr &= 0x3f3; \
|
||||
return ret; \
|
||||
}
|
||||
|
@ -34,9 +35,10 @@ static __inline unsigned int name(SH2 *sh2, unsigned int a) \
|
|||
#define MAKE_WRITEFUNC(name, cname) \
|
||||
static __inline void name(SH2 *sh2, unsigned int a, unsigned int d) \
|
||||
{ \
|
||||
sh2->sr |= sh2->icount << 12; \
|
||||
sh2->sr |= (sh2->icount << 12) | (sh2->no_polling); \
|
||||
cname(a, d, sh2); \
|
||||
sh2->icount = (signed int)sh2->sr >> 12; \
|
||||
sh2->no_polling = (sh2->sr & SH2_NO_POLLING); \
|
||||
sh2->sr &= 0x3f3; \
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue