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

Atari demoscene BBS
 
Re: Doom floor texturing
Posted by: dml Jan,21.2013-21:33 

...minor update to the original message:

I did get the 2nd tex addressing method to work properly after all - just a schoolboy error first time round with setup code. So it looks like this:

ifd floormethod2

move.w a0,d0 ; 2:0 2 mv
and.w d3,d0 ; 2:0 2 t=v&mv
or.w d1,d0 ; 2:0 2 t|=u
move.b (a1,d0.w*2),d6 ; 2:0 4
and.w d4,d1 ; 2:0 2 u&=mu (wrap u)
addx.l d5,d1 ; 2:0 2 u+=du
addx.l d7,d3 ; 2:0 2 v+=dv
move.w d6,(a6)+ ; 0:0 2

else ; old version

move.l d3,d0 ; 2:0 2
move.w d1,d0 ; 2:0 2
lsr.l #6,d0 ; 4:0 4
lsr.w #4,d0 ; 4:0 4
move.b (a1,d0.w*2),d6 ; 2:0 4
add.l d7,d3 ; 2:0 2
add.w d5,d1 ; 2:0 2
move.w d6,(a6)+ ; 0:0 2

endc

Unfortunately Hatari tests show the new version, which should take 4 fewer cycles, to be slightly slower than the old one even taking into account the slight increase in setup size (I cut the loop unroll to make a fair comparison). Scratches head!!! I checked the Hatari cycle sheet in case there was an error but I don't see it. So code alignment maybe... weird.

Anyway none of this changes the fact I'm still looking for a cheaper way if one turns up.

Cheers
d.m.l








[All messages in this thread]    [Start new thread]

Topic Posted by  Date 
Doom floor texturing dml Jan,21.2013-18:47
  Re: Doom floor texturing dml Jan,21.2013-18:48
    Re: Doom floor texturing dml Jan,21.2013-21:33
      Re: Doom floor texturing Defjam Jan,21.2013-21:44
        Re: Doom floor texturing dml Jan,21.2013-22:38
        Re: Doom floor texturing dml Jan,22.2013-10:48
      Re: Doom floor texturing mikro Jan,22.2013-11:03
        Re: Doom floor texturing dml Jan,22.2013-11:43
          Re: Doom floor texturing mikro Jan,22.2013-13:30
            Re: Doom floor texturing mikro Jan,22.2013-13:36
              Re: Doom floor texturing mikro Jan,22.2013-13:37
                Re: Doom floor texturing dml Jan,22.2013-15:18
                  Re: Doom floor texturing mikro Jan,22.2013-16:22
                    Re: Doom floor texturing dml Jan,23.2013-00:55
                      Re: Doom floor texturing mikro Jan,23.2013-10:12
                        Re: Doom floor texturing dml Jan,23.2013-13:00
                        Re: Doom floor texturing Calimero Jan,24.2013-03:14
                  Re: Doom floor texturing ggn Jan,22.2013-16:41
                  Re: Doom floor texturing ggn Jan,22.2013-16:42
                    Re: Doom floor texturing dml Jan,23.2013-01:07
            Re: Doom floor texturing dml Feb,03.2013-20:23
              Re: Doom floor texturing mikro Feb,03.2013-22:07
          Re: Doom floor texturing dml Jan,23.2013-18:01
            Re: Doom floor texturing mikro Jan,23.2013-23:39


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