SamBushman Posted April 18, 2011 Report Share Posted April 18, 2011 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, Sam Link to comment Share on other sites More sharing options...
SamBushman Posted April 18, 2011 Author Report Share Posted April 18, 2011 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, Sam --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 Link to comment Share on other sites More sharing options...
Zerosquare Posted April 18, 2011 Report Share Posted April 18, 2011 Don't apologize, we all make mistakes, especially when playing with new stuff. Your posts may be useful to someone else having the same problem Link to comment Share on other sites More sharing options...
Cyrano Jones Posted April 19, 2011 Report Share Posted April 19, 2011 Hey, it's great to see someone even bothering with this stuff. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now