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

Atari coding BBS
 
Re: clear pixel
Posted by: gloky Nov,05.2013-09:29 


thanx for the very positive feedback :)

thank you evil for explanations

sorry to be so slow to answer

to calculate the or.b code i use a table convX with instructions or.b dn,dep(a0)
so when i take the long word at convX+x*4 i get the appropriate instruction
corresponding to ploting at (x,0)
and i uses also convY witch contain y*160

so with d0=x, d1=y, a0=convX, a1=convY i get the appropriate instruction to puting pixel at x,y with this code:

lsl #2,d0
move.l (a0,d0),d2 ; d2 = (convX+x*4) = 'or.b dn,ofsx(a0)'
add d1,d1
add.w (a1,d1),d2 ; now d2.l = the code for 'or.b dn,ofsx+ofsy(a0)'

after that, d2.l is copied in a a buffer containing all the generated code

and with convX and convY we can also do subpixel by repeating the instruction or the value
ie instead of 320 or.b dn,ofsx(a0) there is 640 or.b dn,ofsx(a0) in convX
exemple with convY:
convy: ds.w 0,0
ds.w 160,160
ds.w 320,320
ds.w 480,480
...
etc

we can also get rid of decalage instructions of x and y when calculate x and y

that's all for the moment :)











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

Topic Posted by  Date 
clear pixel gloky Oct,20.2013-11:44
  Re: clear pixel specter Oct,24.2013-04:19
    Re: clear pixel evil Oct,24.2013-16:58
      Re: clear pixel nerve Oct,25.2013-18:18
        Re: clear pixel gwEm Oct,27.2013-22:57
          Re: clear pixel gloky Nov,05.2013-09:29
  Re: clear pixel Leonard Nov,13.2013-02:30
    Re: clear pixel gloky Nov,16.2013-12:54
      Re: clear pixel gloky Nov,27.2013-00:44
  Re: clear pixel RA/pdx Nov,13.2013-10:27
    Re: clear pixel leonard Nov,14.2013-01:15
      Re: clear pixel RA/pdx Nov,14.2013-10:01
        Re: clear pixel leonard Nov,16.2013-11:49


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