An SMB3 inspired movement and controls demo.
Find a bug? Think this could use a feature? Well then fork the repo and make a pull request. For the most part as long as you don't change anything core to the repository or cause the project to deviate from what I covered in the video, then have at it.
- Install Homebrew
- Install cc65 using homebrew from a terminal:
brew install cc65
- Run
make
from the project root to build the ROM.
- Download and install GNU Make
- Download and install cc65
- In powershell, add the cc65 binary path:
$Env:Path += "C:\cc65\bin"
. Note: you can use the "Control Panel" or "System Settings" on Windows to update the path to include the CC65 binary directory. - Run
make
from the project root to build the ROM.
- Download and install cc65 - How you go about this
will be different depending on your distribution. On Ubuntu it should be as
simple as
sudo apt-get install cc65
. - Run
make
from the project root to build the ROM.
One of the biggest points of this project is to act as a reference so that folks can follow along with the code and learn. As such, keeping the code nice and clean is important.
If you file a PR with assembly code changes, make sure that the code follows these rules:
- Indent using spaces, two characters wide.
- Do not exceed 80 characters per line.
- Don't mix logic in files (joypad code shouldn't go in
Player.s
, for instance)
- Instructions and registers in lowercase:
lsr a
- Declare subroutines with
.proc
using lower_case_piped:.proc update_timer
- Tables in lower_case_piped:
delay_by_state: .byte 1, 4, 8, 7
- RAM Variables in lowerCamelCase:
playerLives = $400
- Global constants in UPPER_CASE_PIPED:
INITIAL_DELAY_FRAMES = 30
- Macros, Enums, and Scopes in CamelCase:
.scope GoombaController
- Addresses & Fixed-Point in hex:
ldx $30
,lda #$18
- Numeric constants in decimal:
START_X = 48
- Bitmasks in binary:
lda #%10000110
- Use PPU macros and constants where available:
VramColRow 2, 10, NAMETABLE_B
- Use Joypad Constants and macros for logic.