Dead Hackers Society
Other BBSes »
 
 
Demoscene  Coding  CT60  Buy/sell

Atari coding BBS
 
Re: 5 instr mapper
Posted by: mikro Sep,12.2016-05:18 

Actually, for the old times sake, I did write it down (you should always do that!):

16.0 - 0.5 = 15.5, right? So, in 8.8 fixed point:

16.0 * 256 = $1000
0.5 * 256 = $0080

Cool. Since we have trouble with negative values, let's neg the adder:

-0.5 * 256 = $ff80

I guess now you see where I'm heading:

$10:$00
+ $ff:$80
-------
$0f:80

$0f80 / 256 = 15.5

You see, the important thing is not to 'cut' the sign from the number, you can't work separately with the integer and fraction parts.







[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