filename | src/pvr2/pvr2.c |
changeset | 30:89b30313d757 |
prev | 27:1ef09a52cd1e |
next | 31:495e480360d7 |
author | nkeynes |
date | Sun Dec 25 05:57:00 2005 +0000 (16 years ago) |
permissions | -rw-r--r-- |
last change | Change timeslice to nanoseconds (was microseconds) Generize single step (now steps through active CPU) Add lots of header blocks |
file | annotate | diff | log | raw |
1.1 --- a/src/pvr2/pvr2.c Sun Dec 25 01:28:39 2005 +00001.2 +++ b/src/pvr2/pvr2.c Sun Dec 25 05:57:00 2005 +00001.3 @@ -10,7 +10,7 @@1.4 char *video_base;1.6 void pvr2_init( void );1.7 -int pvr2_run_slice( int );1.8 +uint32_t pvr2_run_slice( uint32_t );1.9 void pvr2_next_frame( void );1.11 struct dreamcast_module pvr2_module = { "PVR2", pvr2_init, NULL, NULL,1.12 @@ -24,16 +24,16 @@1.13 }1.15 uint32_t pvr2_time_counter = 0;1.16 -uint32_t pvr2_time_per_frame = 20000;1.17 +uint32_t pvr2_time_per_frame = 20000000;1.19 -int pvr2_run_slice( int microsecs )1.20 +uint32_t pvr2_run_slice( uint32_t nanosecs )1.21 {1.22 - pvr2_time_counter += microsecs;1.23 - if( pvr2_time_counter >= pvr2_time_per_frame ) {1.24 + pvr2_time_counter += nanosecs;1.25 + while( pvr2_time_counter >= pvr2_time_per_frame ) {1.26 pvr2_next_frame();1.27 pvr2_time_counter -= pvr2_time_per_frame;1.28 }1.29 - return microsecs;1.30 + return nanosecs;1.31 }1.33 uint32_t vid_stride, vid_lpf, vid_ppl, vid_hres, vid_vres, vid_col;
.