RE: [stella] bzoneRepos question

Subject: RE: [stella] bzoneRepos question
From: "Fred Quimby" <c9r@xxxxxxxxxxx>
Date: Wed, 8 Jun 2005 05:36:56 -0400
Sorry to post yet again, but a question for the experts could be: Is the 
problem be due to hitting RESPx too early?  It seems to be happening in the 
HBLANK region (cycle 21) when the value is less than 15.

>Adding a "nop" to it seems to fix it. So the new routine looks like
>this:
>
>bzoneRepos
>	sta WSYNC                   ; 00     Sync to start of scanline.
>	sec                         ; 02     Set the carry flag so no borrow
>will be applied during the division.
>
>         NOP     ;THIS NOP SEEMS TO PREVENT A STUTTER AT 15 PIXELS
>
>.divideby15
>	sbc #15                     ; 04     Waste the necessary amount of
>time dividing X-pos by 15!
>	bcs .divideby15             ; 06/07
>11/16/21/26/31/36/41/46/51/56/61/66
>
>	tay
>	lda fineAdjustTable,y       ; 13 -> Consume 5 cycles by guaranteeing
>we cross a page boundary
>	sta HMP0,x
>
>	sta RESP0,x                 ; 21/ 26/31/36/41/46/51/56/61/66/71 - Set
>the rough position.
>	rts
>
>   It does it in both Stella and z26. Does the problem that I'm seeing
>exist on real hardware, too? Or am I "fixing" something to run in the
>emulators that will break on hardware?  I searched the archive for
>"bzoneRepos", but I didn't find any discussions on this routine.
>
>Thanks!
>
>-Rich
>
>Archives (includes files) at http://www.biglist.com/lists/stella/archives/
>Unsub & more at http://stella.biglist.com
>


Archives (includes files) at http://www.biglist.com/lists/stella/archives/
Unsub & more at http://stella.biglist.com

Current Thread