6502 assembly language.
I got into assembly programming for the MOS Technology 6502 in 2020 and programmed a game, Brew-Off!, for the Nintendo Entertainment System. Here's some notes and links I've accumulated along the way!
links.
tutorials & books.
- 6502.org tutorials.
- Programming the 6502, by Rodnay Zaks.
- nerdy nights, a tutorial series for making NES games.
examples.
reference material.
tools.
- asm6, an assembler in one .c file.
- asm6's readme.txt, for reference on add'l features like macros.
- cc65, a c compiler for 6502.
- pretty6502, a 6502 assembly formatter.
- fceux, a cross-platform NES emulator.
- nasu, a lightweight, cross-platform sprite sheet editor.
- pently, a NES music engine.
- FamiTracker, a Windows tracker for producing NES music.
- 0CC-FamiTracker, a modified version that has some new features.
- cfxnes, a javascript NES emulator.
- go6502, a golang 6502 assembler/debugger.
- l65, a lua-based 6502 assembler.
NES palette.
various one-liners.
- convert 30 to hex in Perl (prints "1E"):
perl -E 'printf("%X\n", 30)'
- convert 0xAB to decimal in Perl (prints "171"):
perl -E 'say 0xAB'
- view a binary file as hex data:
xxd file.bin | less
- split a file into 4096-byte chunks:
split -b4096 sprite.chr sprite_split_
- remove the first 16 bytes from a file:
dd if=in.nes of=out.nes ibs=16 skip=1
- run pretty6502 to tidy code in
vim:
:%!pretty6502 /dev/stdin /dev/stdout 2>/dev/null
- get loc for .asm files in a dir:
find . -iname "*.asm" -print0 | xargs -0 wc -l