+nanochess Posted March 5, 2018 Share Posted March 5, 2018 Hi all. Just I've released the source code to Space Raid https://github.com/nanochess/Space-Raid The only caveat is that all comments are in Spanish. Being my first Atari game never thought in writing commments in English, maybe someday I'll translate them. I hope it's useful for someone. Enjoy it! 5 Quote Link to comment Share on other sites More sharing options...
CurtisP Posted March 7, 2018 Share Posted March 7, 2018 The only caveat is that all comments are in Spanish. Being my first Atari game never thought in writing commments in English, maybe someday I'll translate them. The comments are easy enough to translate. I am impressed by how detailed the comments are. 1 Quote Link to comment Share on other sites More sharing options...
+nanochess Posted March 7, 2018 Author Share Posted March 7, 2018 The comments are easy enough to translate. I am impressed by how detailed the comments are. Thanks! Quote Link to comment Share on other sites More sharing options...
+SpiceWare Posted March 7, 2018 Share Posted March 7, 2018 That is impressive! I do suggest you use ds (declare space) and let dasm manage your RAM. With this: ;=============================================================================== ; Define RAM Usage ;=============================================================================== ; define a segment for variables ; .U means uninitialized, does not end up in ROM SEG.U VARS ; RAM starts at $80 ORG $80 ; Holds 2 digit score for each player, stored as BCD (Binary Coded Decimal) Score: ds 2 ; stored in $80-81 ; CODING TIP - The : is optional. However, if you remember to include the : ; in all of your labels you can then easily find where ; something is defined by including : in the search. ; Find "Score:" will bring you here, find "Score" will locate ; all places that the variable Score is used. ; Offsets into digit graphic data DigitOnes: ds 2 ; stored in $82-83, DigitOnes = Score, DigitOnes+1 = Score+1 DigitTens: ds 2 ; stored in $84-85, DigitTens = Score, DigitTens+1 = Score+1 ; graphic data ready to put into PF1 during display score routine ScoreGfx: ds 2 ; stored in $86-87 ; scratch variable Temp: ds 1 ; stored in $88 ; object X positions in $89-8D ObjectX: ds 5 ; player0, player1, missile0, missile1, ball ; object Y positions in $8E-92 ObjectY: ds 5 ; player0, player1, missile0, missile1, ball Then later on if you decided to increase the score display from 2 digits for each player to 4 you'd change the Score to this: Score: ds 4 ; stored in $80-83 and all other RAM usage would automatically shift by 2 bytes. I wouldn't bother with those "stored in" comments either, I just put those into Collect so people going through the tutorial would understand where in RAM everything ended up. To keep an eye on how much RAM you've used just add an echo to the end of your RAM definitions. In Medieval Mayhem I allocated 4 bytes for the stack, so after the last RAM definition I added: echo "----",($00FC - *) , "bytes of RAM left" 3 Quote Link to comment Share on other sites More sharing options...
+nanochess Posted March 7, 2018 Author Share Posted March 7, 2018 Wow! Cool! didn't knew of these facilities in dasm Thanks! 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.