|
Atari coding BBS
Re: 5 instr mapper |
Posted by: MKM/Lamers
|
Sep,12.2016-08:48
|
Hi Mikro,
Indeed, writting it down and doing sample calculations helped me a lot. In your example there is not "overflow" on fractional part. So the addx trick is not affected. But I prepared second example and it seems it somehow magically works (although I was quite sure addx will fail adding 1 instead of substracing):
16.9 - 0.5 = 16.4
16.9 * 256 = $10 e6
-0.5 * 256 = $ff 80
fractinal: e6.b + 80.b = 66.b (and overflow)
integers: 10.b + ff.b = 0f.b
+1 (addx overflow from fractional)
= 10.b
So using addx it will $10 66 = 4198/256 = 16.4 :)
Well, so my intuition was wrong and I was surly at the same page as you claimed that one should never split integer and fraction not to loose sign... but it seems to somehow work. (so my texture mapper f**ks up somewhere else wrrrrr)
|
[All messages in this thread] [Start new thread]
What's the anti-troll code? That's your personal code to be able to add comments and messages on the dhs.nu site.
Don't have a code or forgot it? Fix it here.
|