diff --git a/README.md b/README.md index ec52390..eb5fe44 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ $ cp src/smb.chr To build the binary, execute: ```shell -$ cl65 -t nes -o target/smb.nes src/smbdis.asm +$ cl65 -t nes -o target/smb.nes -C src/smb.cfg src/smbdis.asm ``` ### Running diff --git a/src/smb.cfg b/src/smb.cfg new file mode 100644 index 0000000..c7b9569 --- /dev/null +++ b/src/smb.cfg @@ -0,0 +1,19 @@ +MEMORY { + ZP: file = "", start = $0000, size = $0100; + OAM: file = "", start = $0200, size = $0100, define = yes; + RAM: file = "", start = $0300, size = $0500; + HDR: file = %O, start = $0000, size = $0010, fill = yes; + PRG0: file = %O, start = $8000, size = $7FFA, fill = yes, fillval = $FF; + PRGV: file = %O, start = $FFFA, size = $0006, fill = yes, fillval = $FF; + CHR: file = %O, start = $0000, size = $2000, fill = yes, fillval = $FF; +} + +SEGMENTS { + ZEROPAGE: load = ZP, type = zp, optional = yes; + SPRITE: load = OAM, type = bss, optional = yes; + BSS: load = RAM, type = bss, optional = yes; + HEADER: load = HDR, type = ro; + STARTUP: load = PRG0, type = ro; + VECTORS: load = PRGV, type = ro; + CHARS: load = CHR, type = ro, optional = yes; +}