Opened 17 years ago

Closed 17 years ago

Last modified 6 years ago

#8688 closed patch

DS: ARM Optimised blitters/scalers

Reported by: SF/robinwatts Owned by: agent-q
Priority: normal Component: Port: NDS
Version: Keywords:
Cc: Game:

Description

The attached file contains ARM versions of the following routines from platform/ds/arm9/source/blitters.cpp

asmDrawStripToScreen asmCopy8Col Rescale_320x256x1555_To_256x256x1555 Rescale_320x256xPAL8_To_256x256x1555

I should say up front that I don't personally have a DS, so I can't compile and test these - they have therefore been written blind.

All the files with the exception of the last one (which requires it's parameters reordering) should pretty much drop in as replacements for the ones that are there.

asmDrawStripToScreen: I believe this should be slightly faster - 2 cycles faster in the short loop case, 6 cycles faster in the long loop case. (Assuming that GCC is doing a perfect job - in the case where the compiler was fumbling stuff before we'll be doing better now).

asmCopy8Col: Should be at least 8 cycles a loop faster.

The rescale functions should be significantly faster too; the core calculations live entirely in registers, and I use a trick to calculate R G and B all at the same time.

If you have questions, or comments on this code, or I need to change (fix!) it please don't hesitate to contact me.

Robin

Ticket imported from: #1729975. Ticket imported from: patches/793.

Attachments (1)

blitters.s (9.0 KB ) - added by SF/robinwatts 17 years ago.
First attempt at optimised blitter/scaler

Download all attachments as: .zip

Change History (10)

by SF/robinwatts, 17 years ago

Attachment: blitters.s added

First attempt at optimised blitter/scaler

comment:1 by fingolfin, 17 years ago

Owner: set to agent-q

comment:2 by agent-q, 17 years ago

Thanks for your changes. I will let you know when I integrate this if I have any problems.

comment:3 by agent-q, 17 years ago

I have integrated this into my local copy and it seem to work perfectly. I have not tried the two Rescale functions because they are not used in the version I'm about to release, as I've disabled the CPU scaler for now.

comment:4 by fingolfin, 17 years ago

Great. Is this already in SVN? Please make sure to close this item once you have added all parts of the patch you'd like to accept.

comment:5 by SF/robinwatts, 17 years ago

I'm glad they were of some use to you.

Does this mean that you're never going to enable CPU scaling again? If you do reenable it, might the Rescale bits of the patch be useful then? They were the bits of the patch that I thought would give the greatest improvement :-/

comment:6 by fingolfin, 17 years ago

AFAIK, this code is already in the repository by now, so I am closing this now.

BTW, I also sent Robin and Neil a mail regarding the odd (bogus) "& ~4".

comment:7 by sev-, 17 years ago

Err... Actually closing the item.

comment:8 by sev-, 17 years ago

Status: newclosed

comment:9 by digitall, 6 years ago

Component: Port: NDS
Note: See TracTickets for help on using tickets.