Dead Hackers Society
Other BBSes »
 
 

68k Inside

Sommarhack 2024

Silly Venture 2024 SE
Demoscene  Coding  CT60  Buy/sell

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]

Topic Posted by  Date 
5 instr mapper MKM/Lamers Sep,09.2016-21:40
  Re: 5 instr mapper mikro Sep,12.2016-04:41
  Re: 5 instr mapper mikro Sep,12.2016-05:18
    Re: 5 instr mapper MKM/Lamers Sep,12.2016-08:48
      Re: 5 instr mapper dml Sep,12.2016-11:41
        Re: 5 instr mapper MKM/Lamers Sep,12.2016-13:08
          DSP coding dml Sep,12.2016-23:55
            Re: DSP coding mikro Sep,13.2016-00:44
              Re: DSP coding MKM/Lamers Sep,13.2016-09:19


Reply to this message
Name:
Topic:
Anti-troll code:

Message:

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.
© 1994-2024 Dead Hackers Society Contact: Anders Eriksson