diff src/timer/mint/SDL_vbltimer.S @ 2116:b42abf0a50bc

Avoid switch to supervisor mode in SDL_GetTicks, by updating system counter from vbl interrupt
author Patrice Mandin <patmandin@gmail.com>
date Sat, 09 Jun 2007 19:58:41 +0000
parents eb5e61b72da3
children 99210400e8b9
line wrap: on
line diff
--- a/src/timer/mint/SDL_vbltimer.S	Fri Jun 08 21:44:55 2007 +0000
+++ b/src/timer/mint/SDL_vbltimer.S	Sat Jun 09 19:58:41 2007 +0000
@@ -27,6 +27,7 @@
  */
 
 #define _vbl_queue 0x456
+#define _hz_200    0x4ba
 
 	.text
 
@@ -42,6 +43,7 @@
 	lea		_my_vbl,a0
 
 	clrw	vbl_mutex
+	movel	_hz_200.w, _SDL_Atari_hz200
 
 	/* Stop interrupts */
 
@@ -108,6 +110,9 @@
 /*--- Our vbl ---*/
 
 _my_vbl:
+	/* Update _hz_200 */
+	movel	_hz_200.w, _SDL_Atari_hz200
+
 	/* Verify if this is not already running */
 
 	tstw	vbl_mutex
@@ -147,6 +152,8 @@
 
 	.data
 	.even
+	.comm	_SDL_Atari_hz200,4*1
+	.even
 	.comm	vbl_mutex,2*1
 	.even
 	.comm	my_vector,4*1