mirror of
https://github.com/XProger/OpenLara.git
synced 2025-04-21 03:21:51 +02:00
32x fixes (#488)
* 32x: fix reset by adjusting slave irq mask to not block VRES Otherwise the reset sequence can't complete because always has all irqs masked. * 32x: fix a deadlock on some versions of gcc gcc doesn't know that gFrameIndex can change from irq and some gcc versions overoptimize to not re-read gFrameIndex. Alternative is to mark gFrameIndex volatile but that produces redundant read instructions.
This commit is contained in:
parent
05361d3d37
commit
28ee7ac923
@ -776,7 +776,7 @@ sec_start:
|
||||
mov.l _sec_adapter,r1
|
||||
mov #0x00,r0
|
||||
mov.b r0,@(1,r1) /* set int enables (different from primary despite same address!) */
|
||||
mov #0x0F,r0
|
||||
mov #0x0D,r0
|
||||
shll2 r0
|
||||
shll2 r0
|
||||
ldc r0,sr /* disallow ints */
|
||||
|
@ -204,7 +204,7 @@ int main()
|
||||
|
||||
while (1)
|
||||
{
|
||||
int32 frame = gFrameIndex;
|
||||
int32 frame = *(volatile int32 *)&gFrameIndex;
|
||||
|
||||
if (frame - fpsFrame >= vsyncRate)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user