Hello everybody,
I'm new here so first of all thanks for accepting me to AtariAge. I hope that over time I can give back more than I initially might take. I'm also new to VCS development, while having some experience doing 6502 assembly on the Commodore C64 ( http://www.awsm.de).
I followed the excellent tutorial from Kirk Israel ( http://alienbill.com/2600/101/index.html) and now I'm looking forward to the next steps. I must admit that it was an off and on again job, so I clearly don't remember every single information given, but will give it a second read again.
Anyway, I took the code and tried to make it my own by converting it to my coding habits (mostly syntax). I came across some issues I'd like to get your advice on.
1. Is there an easy way to show changes visually?
With the luxury of memory mapped IO on the Commodore 64, if I want to track e.g. if a specific section of my code got executed, I could simply to either
INC $0400 (increment the first char on the top left of the screen) or
INC $d020 (increment the border color)
but I can't seem to do that with a simple
INC COLUBK, right?
2. Is there something like a best practice template for the code?
On the 64, live was easy. Whenever you want to change something of the screen, just update the screen memory. No beam racing. Now with my first changes to Kirk's tutorial script, I seem to be running into timing issues already, having "just" added a few lines of code. I know I need to understand and learn better how to manage cycles and when I got enough time to do some calculations. I'm just wondering if there's something like a template that some people find helpful to get started with a good code structure.
3. Are JSR and JMP bad coding practice on the VCS?
This might sound silly, but better ask before falling into a pit I can't climb out of. Kirk's tutorial avoids subroutines and code jumps, it's basically one big chunk of code with some conditional branching. On the 64, I'm used to setting up my code in different files, build small libs even, so there's some JSR and RTS to keep the main asm file structured. Since memory is so limited I guess every byte counts twice, so what's your take on this?
4. Which resources (links, tutorial, books) would you consider "must read"?
Surprisingly, I seem to find far less on the topic of VCS development than I anticipated, and quite a bit of what I find is quite old (which is fine since it's safe to assume VCS hardware didn't change too much since 1977...). Any advice will be helpful here.
Finally, I would be thankful of anybody more experienced than me (that would be all of you probably ) to check out my code and comment on it. ANY advice is appreciated really, there's no pride to hurt if you're starting at square one...
Specifically, you'll see that after adding a second player (the rectangle), a big portion of the left screen seems to be unaccessible to the sprites. My idea is that I simply lack the time to draw everything, but then again it could be something really different. In the end, that listing is just a quick copy and paste version of the tutorial.
The source and bin are included in the attached ZIP.
Thank you for reading through this on hopefully not rolling your eyes already
Enjoy the day,
awsm
mini-game.zip