home *** CD-ROM | disk | FTP | other *** search
- // #include <Retrace.h>
- //
- // This is the VBL routine which must be present in 'VBL ' resource #128
- // for class 'vretrace' to work properly
- //
- // Note for PowerMac users: the vertical retrace manager isn't native
- // yet under System 7.5.1, so running this in 68K assembly is the fastest
- // we can do for now.
- //
- void main( void)
- {
- asm {
- ;
- ; the VBL_proc proper:
- ;
- ; ensure that we will be restarted:
- ;
- MOVE.W -0x06(A0),D0 ; our VBL count
- LEA 0x0A(A0),A1 ; find address of vblCount
- MOVE.W D0,(A1) ; reset
- ;
- ; Increase numtimes_run:
- ;
- ADDQ.L #0x01,-0x04(A0)
- }
- }
-