diff --git a/src/GTE.s b/src/GTE.s index 9405257..ae45934 100644 --- a/src/GTE.s +++ b/src/GTE.s @@ -36,6 +36,9 @@ DoTimers EXT StartScript EXT StopScript EXT +; Direct access to internals +DoScriptSeq EXT + ; Allocate a full 64K bank AllocBank EXT @@ -45,7 +48,3 @@ AllocBank EXT ScreenAddr EXT OneSecondCounter EXT BlitBuff EXT - - - - diff --git a/src/Script.s b/src/Script.s index 62e6980..bbeb01d 100644 --- a/src/Script.s +++ b/src/Script.s @@ -69,6 +69,14 @@ ARG1 equ 2 ARG2 equ 4 ARG3 equ 6 +DoScriptSeq ENT + phb + phk + plb + jsl _DoScriptSeq ; Yes, this is a special JSL, because _DoScriptSeq is a time callback + plb + rtl + _DoScriptSeq phx ; save the timer index; will need to update user data at the end phb ; save the current data bank @@ -178,8 +186,3 @@ _UserCallback lda: ARG3,y :dispatch jsl $000000 brl _dss_cmd_rtn - - - - - diff --git a/src/Timer.s b/src/Timer.s index 2a39a39..fbb2b53 100644 --- a/src/Timer.s +++ b/src/Timer.s @@ -101,7 +101,7 @@ AddTimer ENT stz Timers+14,x ; Clear the user data space plp - bcc :oneshot + bcs :oneshot lda Timers+0,x ; if not a one-shot, put the counter sta Timers+2,x ; value into the reset field @@ -147,6 +147,7 @@ DoTimers ENT plb jsr _GetVBLTicks + cmp lastTick ; Throttle to 60 fps beq :exit tax ; Calculate the increment @@ -212,64 +213,3 @@ _DoTimers pla rts - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -