Commit d078268d authored by Patrice Mandin's avatar Patrice Mandin

Reserve space in system buffer to call XBIOS from interrupt

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401097
parent 32961271
...@@ -53,6 +53,9 @@ ...@@ -53,6 +53,9 @@
- Then we swap the buffers - Then we swap the buffers
*/ */
#define savptr 0x4a2
#define savamt 0x46
/*--- GSXB interrupt vector ---*/ /*--- GSXB interrupt vector ---*/
.text .text
...@@ -130,6 +133,9 @@ _SDL_MintAudio_XbiosInterrupt: ...@@ -130,6 +133,9 @@ _SDL_MintAudio_XbiosInterrupt:
/* Callback */ /* Callback */
jsr _SDL_MintAudio_Callback jsr _SDL_MintAudio_Callback
/* Reserve space for registers */
subl #savamt,savptr
/* Set new buffer */ /* Set new buffer */
moveq #0,d0 moveq #0,d0
...@@ -149,6 +155,9 @@ _SDL_MintAudio_XbiosInterrupt: ...@@ -149,6 +155,9 @@ _SDL_MintAudio_XbiosInterrupt:
trap #14 trap #14
lea sp@(12),sp lea sp@(12),sp
/* Restore registers space */
addl #savamt,savptr
moveml sp@+,d0-d7/a0-a6 moveml sp@+,d0-d7/a0-a6
clrw _SDL_MintAudio_mutex clrw _SDL_MintAudio_mutex
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment