Videopac / Odyssey2 forum

Programming the Videopac / Odyssey2 => Unreleased HomeBrew and test code => Topic started by: Gorf on February 02, 2009, 05:43:20 PM



Title: O2Sprite Demo
Post by: Gorf on February 02, 2009, 05:43:20 PM
Ok folks same rules as with the Grid demo. You must supply 'TASM.EXE
and 'TASM48.TAB' in the same folder.

This will copy sprite data to sprite 0, set up its color and postition
and move it in both axis while cycling the color.

   mov   r5,#SRED      ; colour red

You can alter it to show the different effects that can be applied to the
sprite as well.

you will see this in the source the code set up to show a normal sprite like so.

Code:
mov r5,#SRED ; colour red normal

; comment the above line and
; uncomment one of these below

; mov r5,#SRED|ESHIFT ; colour red even shifted???(whatever the hell that is)
; mov r5,#SRED|DOUBLE ; colour red double sized sprite
; mov r5,#SRED|ESHDBL ; colour red both even shift and double sized sprite
call SetSprite| ; set up sprite for initial display

To change to see other effects, simply comment out the normal sprite line and
uncomment the desired one. for instance if you want to see a even shifted
sprite then you would change the above to this.


Code:
; mov r5,#SRED ; colour red normal

; comment the above line and
; uncomment one of these below

mov r5,#SRED|ESHIFT ; colour red even shifted???(whatever the hell that is)
; mov r5,#SRED|DOUBLE ; colour red double sized sprite
; mov r5,#SRED|ESHDBL ; colour red both even shift and double sized sprite
call SetSprite| ; set up sprite for initial display


For a double sized sprite....


Code:
; mov r5,#SRED ; colour red normal

; comment the above line and
; uncomment one of these below

; mov r5,#SRED|ESHIFT ; colour red even shifted???(whatever the hell that is)
mov r5,#SRED|DOUBLE ; colour red double sized sprite
; mov r5,#SRED|ESHDBL ; colour red both even shift and double sized sprite
call SetSprite| ; set up sprite for initial display


To see a even shifted double sized sprite


Code:
; mov r5,#SRED ; colour red normal

; comment the above line and
; uncomment one of these below

; mov r5,#SRED|ESHIFT ; colour red even shifted???(whatever the hell that is)
; mov r5,#SRED|DOUBLE ; colour red double sized sprite
mov r5,#SRED|ESHDBL ; colour red both even shift and double sized sprite
call SetSprite| ; set up sprite for initial display


Let's see ifyou can figure out how to use the other 3 sprites....all at the same time! :)
HINT: I 've already declared and defined them for you.....


Also......go down in the file to where the 'SpriteData:' label is.
You can change your sprite's shape there.


Enjoy!

Steve


Title: Re: O2Sprite Demo
Post by: Sdw on July 13, 2017, 11:49:46 AM
I just want to say thank you for posting this and the gridmap demo, just the kind of simple stuff I needed to get going with development for the G7000!