Search site Dead Hackers Society
Other BBSes »
 
 
Demoscene   º   Coding   º   CT60   º   Buy/sell   º   Misc/crap   º   Alive magazine   º   SNDH/Tracking

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]

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:
Human verification (enter the text of the ASCII-art below):

   _   _   _   _  _  _        _  
 _|_ _|_ _|_ _|_ (_)  ) |_|_ / \ 
  |   |   |   |  (_) /_   |  \_/
Message:




© 1994-2017 Dead Hackers Society Contact: Anders Eriksson