D-Bug & Automation Forum
D-Bug & Automation Forum >> Coding >> (M)ST(E) Double VBL (TwinSync) Bug and Solution

Message started by CJ on 02.02.09 at 07:59:52

Title: Re: Remo's speed issue
Post by CJ on 04.02.09 at 07:23:29
OK try this one... If the music is twice as fast, your machine is generating 2 VBLs each frame for some reason.

[code]      pea supercode(pc)
     move.w #$26,-(a7)
     trap #14
     lea 6(a7),a7
     clr.l -(a7)
     trap #1

     moveq #0,d0
     bsr music

     move.l $70.w,-(a7)
     move.l #vbl,$70.w

loop      bsr music+8
     bsr music+8
     move.w vbl_tick,d0
.hold      cmp.w vbl_tick,d0
     beq.s .hold
     cmp.b #$39,$fffffc02.w
     bne.s loop

     move.l (a7)+,$70.w

     move.l #$8080000,$ffff8800.w
     move.l #$9090000,$ffff8800.w
     move.l #$a0a0000,$ffff8800.w


vbl      movem.l d0-a6,-(a7)
     add.w #1,vbl_tick
     movem.l (a7)+,d0-a6

vbl_tick      dc.w 0

music      incbin "jetset.max"
https://d-bug.mooo.com/dbugforums/cgi-bin/yabb2/YaBB.pl?action=downloadfile;file=VBLTEST3.PRG ( 8 KB | Downloads )

D-Bug & Automation Forum » Powered by YaBB 2.6.0!
YaBB Forum Software © 2000-2022. All Rights Reserved.