CDS Games Posted March 14, 2015 Share Posted March 14, 2015 Hey folks, I'm attempting to make the player sprite in Zaxxon multicolored--got it sorta working but there's a problem I can't quite figure out. Here's what I did: * Patched in a jump from F716 (where the GRP0 data is set up) to FFE9 where there was some (I think) unused space. * Then at FFE9, I added two lines of code before the two original lines, namely: LDA LFFA9, Y (read data from correct location in the color array) STA COLUP0 LDA ($B0), Y (original code--B0 stores the GRP0 address) TAY (original code) JMP LF719 (jump back) zaxxoncolorship.bin Woo hoo, it worked! But as you can see, the player ship "shimmers" slightly like the color and graphics are wobbling over slightly different scan lines. Pretty cool underwater effect, but unfortunately not for Zaxxon.Is cycle timing my problem here? Did I use too much with the jumps and the extra lines, or is this some other issue? -Claudio Quote Link to comment Share on other sites More sharing options...
+nanochess Posted March 14, 2015 Share Posted March 14, 2015 Hey folks, I'm attempting to make the player sprite in Zaxxon multicolored--got it sorta working but there's a problem I can't quite figure out. Here's what I did: * Patched in a jump from F716 (where the GRP0 data is set up) to FFE9 where there was some (I think) unused space. * Then at FFE9, I added two lines of code before the two original lines, namely: zaxxoncolorship.bin Woo hoo, it worked! But as you can see, the player ship "shimmers" slightly like the color and graphics are wobbling over slightly different scan lines. Pretty cool underwater effect, but unfortunately not for Zaxxon. Is cycle timing my problem here? Did I use too much with the jumps and the extra lines, or is this some other issue? -Claudio I've counted cycles using the Stella emulator comments starting in your initial JMP and it goes way up 90 cycles until writing another WSYNC if all paths are taken, so yep, the extra jumps/lines are taking too much time. 1 Quote Link to comment Share on other sites More sharing options...
CDS Games Posted March 17, 2015 Author Share Posted March 17, 2015 Aha, thanks nano! I threw in a random wsync in the routine but it didn't help. I guess it's not that easy eh. By the way, reading all the threads on Space Raid got me back on this kick. Now that the isometric's pressure's finally off I feel like it's easier to appreciate this one on its own terms. 1 Quote Link to comment Share on other sites More sharing options...
Nukey Shay Posted March 29, 2015 Share Posted March 29, 2015 Zaxxon uses the full 76 cycles frequently (i.e. foregoing the use of WSYNC)...so it's impossible to add anything without optimizing the existing code to use less cycles on very busy scanlines. The patch you used adds 13 cycles (3 for each jump, 4 for the read, and 3 for the store), so the display gets fudged. Moving the gfx read to happen a bit later might be a starting place (so it can be stored right away instead of being flipped to the Y register - 2 cycles saved and the Y register is then free after the read). 1 Quote Link to comment Share on other sites More sharing options...
CDS Games Posted March 30, 2015 Author Share Posted March 30, 2015 Gotcha, thanks! Actually managed to tone the shimmer down a good bit by making room at the shadow gfx draw and not jumping out. Not sure I have the energy left to work out actually fixing the shadow though. zaxxoncolorship2.bin Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.