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: dml Sep,12.2016-11:41 

Another way to think about it...

The signs during an addition do not matter. e.g. you can imagine an addition using the unsigned interpretation of the terms and you get the same outcome.

e.g. -1s == 255u

When you add the 'signed' numbers (with overflow) its like adding unsigned numbers such that the unsigned result wraps to exactly what you expect for a signed add.

e.g.

0 + -1 = -1
0 + 255 = 255

127 + -1 = 126
127 + 255 = (382 & $FF) = 126

So all you really need is unsigned sources, carry, and binary modulo (usually accomplished with MOVE or AND or natural clipping of the register). This is how many of the texture mappers can be seen to magically work with signed sources - its equivalent to using very big unsigned increments.

This still screws up if the module is not properly maintained e.g. the MSB carry starts overflowing into other fields. Then you get problems.



Anyway it may be easier to think about it this way than trying to make sense of what happens to the carry, sign and extends in addx/add-carry patterns. Put signed values in, and think of them as big unsigned numbers from there onwards.

:)












[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