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

Atari coding BBS
 
Re: Optimisation question
Posted by: evil May,03.2012-14:43 

As Mikro said, do 60-61 movem.l in a rept, and use a loop around that to keep everything in i-cache (I think Mikro forgot about the subq / bpl for looping, can't use registers for that as they are used by the movem's).

Also don't use the blitter. It's far slower to copy data with than the processor. And it's not running in parallell, just like on STe it hogs the bus while working. Another drawback is incompatibility with a) bus speeders and b) fastram.

To use a7 is dubious, it depends if you have filesystem things going on while your routine is working, then do not shut off all int's and use a7. Otherwise I guess it would work.

Example:

copyrout:

move.w sr,-(a7)
move.w #$2700,sr ; stop all interrupts
move.l a7,.savea7

lea source,a6
lea dest,a7

move.w #num,.cnt

.loop:

rept 60
movem.l (a6)+,d0-a5
movem.l d0-a5,-(a7)
endr

subq.w #1,.cnt
bpl .loop

move.l .savea7,a7
move.w (a7)+,sr
rts

.cnt: dc.w 0
.savea7: dc.l 0








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

Topic Posted by  Date 
Optimisation question Sallafranque/Thadoss May,02.2012-19:07
  Re: Optimisation question Sallafranque/Thadoss May,02.2012-19:10
    Re: Optimisation question Cyprian May,02.2012-19:39
      Re: Optimisation question Bod/STAX May,02.2012-22:02
      Re: Optimisation question evil May,03.2012-14:43
        Re: Optimisation question evil May,03.2012-17:16
        Re: Optimisation question defjam May,03.2012-17:33
    Re: Optimisation question mikro May,03.2012-10:11
      Re: Optimisation question mikro May,03.2012-10:12
  Re: Optimisation question gloky May,03.2012-03:50
    Re: Optimisation question Sallafranque/Thadoss May,03.2012-18:46
      Re: Optimisation question ggn May,04.2012-08:01
        Re: Optimisation question gloky May,04.2012-17:16


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