Use linker script
parent
77f35f881d
commit
2c48f59c68
|
@ -32,7 +32,7 @@ $ cp <path_to_the_graphics_file> 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
|
||||
|
|
|
@ -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;
|
||||
}
|
Loading…
Reference in New Issue