|
|
Atari demoscene BBS
Re: Line rout |
Posted by: corbo
|
Sep,27.2011-19:33
|
just 'cause i like this conversation :) - Sorry if i'm boring you
- Chuck asked me to code a line rout, but i don't have the time... it's very frustrating!
the "main loop" code is like:
.downwardYMajor_run
move.l d0,d4 ; 4
add.l d1,d0 ; 8
move.l d0,d5 ; 4
swap d4 ; 4
swap d5 ; 4
lsl.w #4,d5 ; 16
or.w d5,d4 ; 4
add.w d4,d4 ; 4
move.w (a2,d4.w),d4 ; 16
jmp (a3,d4.w) ; 16
; 16x ORI.w #xxxx,yyyy(a0) ; 256
; add.w #imm,a0 ; 12
; jmp (a1) ; 8
.downwardYMajor_runDone
sub.w #SegmentedLine_RunLength,d3 ; 8
bge.s .downwardYMajor_run ; 8 or 12
; = 372
you can "pre-cache" the result of (a3, d4.w), with 12 more cycles per 16 pixels
(replace jmp (a3, d4.w) by move.l (a3, d4.w), (an)+)
You need to init d0-d7 (4*8 cycles = 32)
You save 64 cycles per 16 pixels.
a4: your "pre-cache":
you need a move.l (a4)+, a1 //16 cycles
then jmp (a1)
so, you earn 64 - (12 + 32 + 16) for the first 16 pixels = 4 cycles
for the next, you earn 64 - (12 + 16) = 36 cycles
after that, i don't consider the last modulo 16 pixels (i ponder about auto-modified code. It can be great for that... not on falcon, sure).
Only for the last mod 16 pixels, I think for line < 32 pixels, it's not interesting.
hoplà
|
[All messages in this thread] [Start new thread]
Topic
|
Posted by
|
Date
|
Line rout
|
Chuck
|
Sep,08.2011-18:49
|
Re: Line rout
|
ggn
|
Sep,08.2011-21:14
|
Re: Line rout
|
Chuck/Dune
|
Sep,08.2011-23:21
|
Re: Line rout
|
Leonard
|
Sep,09.2011-11:47
|
Re: Line rout
|
Mr.Styckx
|
Sep,09.2011-18:24
|
Re: Line rout
|
chuck
|
Sep,09.2011-22:31
|
Re: Line rout
|
ggn
|
Sep,10.2011-15:57
|
Re: Line rout
|
ggn
|
Sep,09.2011-19:55
|
Re: Line rout
|
Simon Sunnyboy / Paradize
|
Sep,11.2011-16:58
|
Re: Line rout
|
rudis
|
Sep,11.2011-17:58
|
Re: Line rout
|
Simon Sunnyboy / Paradize
|
Sep,13.2011-14:18
|
Line Rout
|
Defjam
|
Sep,10.2011-20:45
|
Re: Line Rout
|
Chuck/Dune
|
Sep,11.2011-01:09
|
Re: Line Rout
|
Kalms
|
Sep,13.2011-22:42
|
Re: Line Rout
|
Defjam
|
Sep,14.2011-18:38
|
Re: Line Rout
|
Kalms
|
Sep,14.2011-23:12
|
Re: Line rout
|
RA/pdx
|
Sep,09.2011-23:35
|
Re: Line rout
|
PeP
|
Sep,10.2011-20:14
|
Re: Line rout
|
Marcer
|
Sep,10.2011-23:16
|
Re: Line rout
|
baah
|
Sep,12.2011-10:23
|
Re: Line rout
|
baah
|
Sep,12.2011-10:27
|
Re: Line rout
|
Chuck
|
Sep,21.2011-21:36
|
Re: Line rout
|
Kalms
|
Sep,22.2011-22:13
|
Re: Line rout
|
corbo
|
Sep,23.2011-01:11
|
Re: Line rout
|
corbo
|
Sep,23.2011-01:12
|
Re: Line rout
|
evil
|
Sep,24.2011-11:04
|
Re: Line rout
|
Kalms
|
Sep,26.2011-20:54
|
Re: Line rout
|
corbo
|
Sep,27.2011-19:33
|
Re: Line rout
|
Kalms
|
Sep,28.2011-14:46
|
Re: Line rout
|
Chuck/Dune
|
Sep,24.2011-17:28
|
Re: Line rout
|
baah
|
Oct,03.2011-19:27
|
Re: Line rout
|
Kalms
|
Oct,03.2011-23:58
|
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.
|
|
|