Jump to content

Question: How Do I Manipulate the Screen Coordinates Of An Object Processor Bitmap Object?


Recommended Posts

Hey guys,

I am currently working on understanding the graphics pipeline of the Jaguar. I have monkeyed with Belboz's sample program a bit, altered the Bitmap object's header, and am now blitting an image defined by an external assembly file to the screen (hurray!). Now I wish to use controller input to move it around the screen. I have written a simple function to poll for the 1st player's controller and can successfully get input. My first attempt at moving the bitmap was to save the address of the object's headers to global variables, reference them from C, and alter them as needed. When I do this, the screen goes almost completely black and restores itself once the input key is released. Based on this, I figure I am going about it all wrong.


My question therefore is "How do I manipulate the screen position of an image defined by a bitmap object in the Object Processor's List?"


Thanks as always for your input. Cheers,


Link to comment
Share on other sites

As an update, I realized I was saving the address of the high 32 bits instead of the low 32 bits (oops). After correcting that mistake I got horizontal movement working fine. For whatever reason, the YPOS seems to be locked (any changes are reverted by the hardware). I will keep reading the Jaguar docs and see if I can figure it out. If anyone here can enlighten me to what I'm missing, I'd appreciate it.


Cheers and thanks guys,



--Another quick update

Doh. I thought to take a look at the demo's level 0 interrupt and saw that when the bitmap object is created, a copy of the first phrase is saved to another part of memory for restoring (apparently the first phrase is destroyed by the object processor according to the comments). As such, I was in fact correctly changing the object header, but the interrupt was changing it back. I changed my C pointer to reference the stored copy of the header that was being restored. Now my coordinate manipulation is persistent. Sorry for the wasteful posts guys :P



Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...