@@ -181,6 +181,9 @@ FALSE EQU 0
181
181
ULONG r_TimerFreq ; -- " --
182
182
ULONG r_TimerCalibrate ; -- " --
183
183
184
+ ULONG r_ProcessTimeSum ; Calc process time avg
185
+ ULONG r_ProcessTimeCounter
186
+
184
187
LABEL replay_SIZEOF
185
188
186
189
Start:
@@ -2787,7 +2790,8 @@ ec_init:
2787
2790
move.l rb_TimerLib(a5 ),a6
2788
2791
jsr _LVOReadEClock (a6 )
2789
2792
2790
- lea ec_tmp(pc ),a0
2793
+ lea -EV_SIZE(sp ),sp
2794
+ movea.l sp ,a0
2791
2795
moveq.l #(1 <<5 )-1 ,d7
2792
2796
.calibrate jsr _LVOReadEClock (a6 )
2793
2797
dbf d7 ,.calibrate
@@ -2800,6 +2804,7 @@ ec_init:
2800
2804
lsr.l #5 ,d0
2801
2805
move.l d0 ,r_TimerCalibrate(a3 )
2802
2806
2807
+ lea EV_SIZE(sp ),sp
2803
2808
movem .l (sp )+,d0 /d7 /a0 /a6
2804
2809
bra.b ec_reset
2805
2810
@@ -2816,7 +2821,8 @@ ec_readconv_us: ; ( returns microseconds d0:d1 )
2816
2821
*d2 eclock frequency
2817
2822
ec_read:
2818
2823
movem .l a0 /a6 ,-(sp )
2819
- lea ec_tmp(pc ),a0
2824
+ lea -EV_SIZE(sp ),sp
2825
+ movea.l sp ,a0
2820
2826
move.l rb_TimerLib(a5 ),a6
2821
2827
jsr _LVOReadEClock (a6 )
2822
2828
move.l (a0 )+,d0
@@ -2834,6 +2840,7 @@ ec_read:
2834
2840
moveq .l #1 ,d1
2835
2841
2836
2842
.done move.l r_TimerFreq(a3 ),d2
2843
+ lea EV_SIZE(sp ),sp
2837
2844
movem .l (sp )+,a0 /a6
2838
2845
bra.b ec_reset
2839
2846
@@ -2855,8 +2862,6 @@ ec_reset
2855
2862
movem .l (sp )+,d0 -d2 /a0 /a6
2856
2863
rts
2857
2864
2858
- ec_tmp ds.l 2
2859
-
2860
2865
*************************************************************************
2861
2866
2862
2867
PlayerFunc:
@@ -2915,15 +2920,15 @@ PlayerFunc:
2915
2920
bsr.b FillOutputBuffer_entry
2916
2921
2917
2922
bsr.w ec_readconv_us
2918
- add.l d1 ,.processTimeSum
2919
- add.l #1 ,.processTimeCnt
2920
- cmp.l #50 ,.processTimeCnt
2923
+ add.l d1 ,r_ProcessTimeSum( a3 )
2924
+ add.l #1 ,r_ProcessTimeCounter( a3 )
2925
+ cmp.l #50 ,r_ProcessTimeCounter( a3 )
2921
2926
bne.b .notyet
2922
- move.l .processTimeSum( pc ),d0
2927
+ move.l r_ProcessTimeSum( a3 ),d0
2923
2928
divu .l #50 ,d0
2924
2929
kprintf "Average process time = %ld us" ,d0
2925
- clr.l .processTimeSum
2926
- clr.l .processTimeCnt
2930
+ clr.l r_ProcessTimeSum( a3 )
2931
+ clr.l r_ProcessTimeCounter( a3 )
2927
2932
.notyet
2928
2933
2929
2934
.exit
@@ -2932,9 +2937,6 @@ PlayerFunc:
2932
2937
.exitxx rts
2933
2938
2934
2939
2935
- .processTimeSum dc.l 0
2936
- .processTimeCnt dc.l 0
2937
-
2938
2940
2939
2941
FillOutputBuffer_entry:
2940
2942
movem .l d0 -a6 ,-(sp )
0 commit comments