View Single Post
Old 03 April 2016, 14:01   #5
Registered User

flype's Avatar
Join Date: Dec 2014
Location: France
Posts: 53
Thank you for the news.

Some comments…

The APOLLO CPU in SILVER3 release contains some new intructions indeed.
They have been tested with success in the MPEG RiVA to save some FPS. Goal is to prove their usefullness and play MPEG videos in 640×480 @ 24fps. Work in progress. Of course, these new instructions can be used in other sort of applications, particularly in greedy routines.


Operation : Dz = ( Dy + Dx )
Can be used instead of :
move.w Dy,Dz
add.w Dx,Dz

Operation : Dz = ( Dy - Dx )
Can be used instead of :
move.w Dy,Dz
sub.w Dx,Dz

Operation : Dz = ( ( Dy * Dx ) >> 8 )
Can be used instead of :
move.x Dx,Dz
muls.w Dy,Dz
asr.l #8,Dz
It is ieee 8.8 multiplication.

Same as MOVE.L but in 64bits (Quad).
PERM #$Selector,Dx,Dy,Dz

Permute bytes from Dx and Dy and save to Dz thanks to the sequence defined in $Selector.

Core now fully supports following pixel formats :

- 320x240x8/15/16/24/32/YUV
- 640x480x8/15/16/24/32/YUV

8   = CLUT
15  = R5G5B5
16  = R5G6B5
24  = R8G8B8
32  = A8R8G8B8
YUV = Y4U2V2
Next step for SILVER4, change resolution 320/640/800/1024/1280/1920 and some others 16/10.

Clock-cycle register

It is a new read-only register, $DE0008.
We can read it (example: tst.l $DE0008), which reset its counter.
Then, we can read it again (example: move.l $DE0008,d0) so that d0 contains number of CPU cycles since last call.
This a unique feature, very handy to analyse code and hire for greedy routines and helps to optimize code and understand how APOLLO works.

For instance :

move.l #cafecafe,d1
tst.l $DE0008
divu.l #100,d1
move.l $DE0008,d0
; d0 contains number of cycles consumed by the DIV instruction.
flype is offline  
Page generated in 0.05339 seconds with 9 queries