Overview Features Coding ApolloOS Performance Forum Downloads Products Contact Goto
Apollo-Computer

Welcome to the Apollo Forum

This forum is for people interested in the APOLLO CPU.
Please read the forum usage manual.
Please visit our Apollo-Discord Server for support.



All TopicsNewsPerformanceGamesDemosApolloVampireAROSWorkbenchATARIReleases
Running Games and Apps.

SAGA Coding Tricks 3

Gunnar von Boehn
(Apollo Team Member)
Posts 6254
29 Apr 2020 07:14


Amiga has buildin hardware Sprites.
Sprites are small GFX elements which are drawn by the hardware
on a position on the Screen and which can easily be moved.
The are typically be use for Mousepointer Players, Bullets, Enemies...

Amiga hardware has 8 Sprite channels.
Each channel could display one or more sprite on the screen.

Amiga Sprites normally have 4 colors (transparent plus 3 colors)
2 Sprites could be attached to use 16 colors (transparent plus 15)
But attaching Sprites made you loose a Channel.

SAGA Amiga chipset supports a new mode which allows each Sprite to have 16 colors without loosing any to attaching.

Here is an Example of a 16 color Spaceship Sprite using this feature.

To enable the Newmode, you have 1st to set the "SAGA Mode" bit in FMODE Register

COPPER
        dc.w $01fc,$001C

Then you can switch each Sprite into the 16color mode by Setting Bit(0) of the 1st Sprite Command Word


Player1:
        dc.l    $60600000,$00000001
        dc.l    $6c000000,$00000000

        dc.l    $00000000,$00000000,$00000000,$00000000
        dc.l    $00000000,$00000000,$00000000,$c01e0000
        dc.l    $00140000,$00000000,$40060000,$f76b0000
        dc.l    $67460000,$65330000,$00030000,$f88f8000
        dc.l    $008b0000,$38738000,$00038000,$7707c000
        dc.l    $25750000,$1a898000,$00018000,$0573c000
        dc.l    $2e1a0000,$10040000,$00000000,$1de9e000
        dc.l    $18230000,$00c1c000,$21000000,$7fbfe000
        dc.l    $30988000,$47050000,$00000000,$eaefc000
        dc.l    $41000000,$02000000,$00000000,$f59d8000
        dc.l    $00200000,$00200000,$00000000,$c7c00000
        dc.l    $00000000,$00000000,$00000000,$00000000

Happy Hacking!

posts 1