Re: A86: 102 and 95 t-state findpixel routine
[Prev][Next][Index][Thread]
Re: A86: 102 and 95 t-state findpixel routine
Actually I've had a lot of people ask me about this routine, but the thing is,
it does work, here is why:
For those who want to know more about it, this routine is largely based off
the Eble-Yopp findpixel routine with dux's enhancements (which are very good)
plus one more thing I found.
I have found one bug, however, in both of these routines, the first hex digit
of the offset table address must be at either 8 or 0. Since 0 is out of the
question on the TI85 and TI86, this fixes the only valid offset table location
at $8700 in the 95 t-state version, and at 8 byte boudaries between $8700 and
$87f8. Both of these should be fine on the 86 since you can load RAM page 1
there and it should be free memory. (unless you do a lot of linked floating
point calculations in your asm program, like derivatives of derviatives) on
the 85 you might run into problems, but this is not a TI85 mailing list so I
assume everyone should be comfortable with that.
In this routine however we load c into a and 'and' it with 7. The 'and 7'
part seeks to eliminate the fourth bit through the 6-th bit, (bits 3-5)
because our input is between 0 and $3f (0-63). When we are at a location
where the second hex digit is a 7, and the first is an 8 or zero, register d
just happens to hold a value which we can 'and' with our y value and get a
number between 0 and 7. if we also fix the third and fourth address hex
digits at zero, we can simply ld our value directly into e to get the proper
offset. As long as your table is at $8700 you should never run into problems
with the routine.
I've included my modified versions in a zip file with this message.
~Code7~
ZAPO
FINDPI~1.ZIP