Retro Lord Posted February 2, 2015 Share Posted February 2, 2015 I'm curious on how the rotating shields are done in Yars' Revenge, and I was wondering if someone has done something like that and pehaps could offer an explanation on the subject? Quote Link to comment Share on other sites More sharing options...
Rybags Posted February 2, 2015 Share Posted February 2, 2015 Orange shield - just keep an array in Ram and do rotates on the bytes periodically. Problem with 6502 rotate instructions is that they include the carry which is something you often don't want. Rotating left, there's an easy workaround - just CMP #$80 / ROL gives an 8 bit rotate left. Rotating right, you generally want to do a save/restore operation e.g. TAX / LSR A / TXA ROR A Middle of screen - fairly sure that just cycles through parts of the game Rom, which can be sort of sufficient to give random numbers. Quote Link to comment Share on other sites More sharing options...
Retro Lord Posted February 2, 2015 Author Share Posted February 2, 2015 Cool, cheers! Quote Link to comment Share on other sites More sharing options...
+Gemintronic Posted February 18, 2015 Share Posted February 18, 2015 Of course, Rybags advice is easy to do in assembly but I'm not sure how to apply it to batari BASIC. The only equivelent technique I can think of is scrambling the player0pointerhi variable to make the player0 sprite look like a random jumble. crash counter = counter + 1 player0pointerhi = rand NUSIZ0 = $30 COLUP0 = counter drawscreen if counter = 2 then goto aftercrash else goto crash aftercrash 1 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.