ForumsCodeASMWhat does this do? RSS

 

musashi9

What does this code do and does anyone have an alternative
.1 tst.b #dff006
   bne .1
   tst.b #dff005
   bne .1
 

Phantasm

Avatar
would that be tst.b $dff006 and tst.b $dff005 ?

$dff006 is bits 0-7 of the vertical beam position and $dff005 is bits 8-10 of the vertical beam position some unused bits and a long line bit (not sure what this is)

seems like basically its waiting for vertical beam position to be 0

when you say you want an alternative how do you mean? are you just looking for something that works differently, something that is more compatible? or something else entirely?
 

musashi9

something more compatible
SAE gets stuck on the dff005 one

 

Phantasm

Avatar
i've had a quick look at the SAE code and i cant see anything glaringly wrong with it around this register.
The values returned to depend on which chipset and whether or not its a PAL or NTSC machine being emulated.

it might be worth masking out the bits you aren't interested in (bits 0-2 would seem relevant to me)

my personal preference would be something like:

move.b $dff005,d0
and.b #7,d0
bne .1

(if you want to be ultra picky it should probably be a word read but i'm sure that wont be the cause of the issue)

you could also replace the whole lot with

.1
 move.l $dff004,d0 and.l #$1ff00,d0 bne.b .1
(based on this piece of code from EAB - http://eab.abime.net/showthread.php?t=51928)


Do you know what values are being returned?
 

musashi9

I will give it a try
The problem intro is here
http://ftp.amigascne.org/pub/amiga/Groups/C/Crystal/Crystal-CrEmlynHughes
code is at 300d8
 

rdemoly

Avatar
try replace at 300d8 :
lea     $dff000,a6
move.l 4(a6),d0 andi.l #$1ff00,d0
cmpi.l #110*256,d0 ; test best value (110-)
bne.s $300d8
nop


 

musashi9

it is smooth but the vector does not fill all the way
http://flashtro.com/fill.png

 

rdemoly

Avatar
I have not tested with SAE, sorry :(
try to decrease the value "110" (original test raster at zero)
 

musashi9

setting the cmp.l to 0 worked!!
Thanks Phantasm and Rdemoly

 

rdemoly

Avatar
your welcome... but I don't know if I will return if access is still difficult :(