|
1. I've never seen the original docs. I'd like to, if anyone has them.
2. There are tons of books about the 6502, but none specifically about NES programming that I've ever seen. Surely there must be some book about 6502 game programming out there somewhere.
3. I'm sure they used assembly in most cases, but some games (like the ones made by Koei) probably could get away with using some kind of compiler. I'd doubt the usefulness of anything other than assembly on the NES, though. (for games, at least)
Recently I found an assembler called FASM, it's on this site here (towards the bottom): http://www.6502.org/crossdev/asm/ It was apparently made for NES development, and some of it's source files have dates back to 1990.
4. There are a multitude of ways to do those things. Jumps are pretty easy, you'd probably want to use a sine table (otherwise the jump might be all triangular and cheap looking).
For sprite collision detection, you'd set a specific box-shaped area that is hittable, and use greater than/less than checking to see if it's within that box. That's done by using the CMP instruction and checking the carry flag.
Multiple 'rooms' should be pretty easy, just use a lookup table that contains addresses to the level data for each room. If the player goes "right", increase the index by 2. If the player goes "down", increase it by 32 (or whatever, depending on the table's dimensions).
My source code probably isn't very useful, if I know what's going on then I don't write any comments (unless I'm doing something really weird). But, at the MiniGame compo my entry is released with source, if you really want to see it. (I just submitted it earlier, so it's not on there yet) http://www.ffd2.com/minigame/
|