-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compile Cartridge ROM configuration #33
Comments
Hi!
This needs a little extra work. Normally, Fastbasic uses self-modifying-code in a few places to make the code faster, so the code can't be placed in ROM. But there is a compilation option to use alternative code that disables this, so you need to recompile the interpreter. As I had not tested that option in a while, I just reviewed all the interpreter and found three places which still tried to write to the code, so I just fixed that. This means:
Here there is another little issue: Fastbasic uses code in zeropage and initialized DATA. This means you need to provide two special sections:
I added a "fastbiasc-cart.cfg" file with those sections, and the support code to build the cartridge image in commit b8d7ff6 , now the full instructions to compile for a cartridge image (on Linux or other Unix) are:
Have Fun! |
I also have a ML routine called deflate which decompresses data blocks from Cartridge ROM into RAM. I could just use a portion of cartridge ROM for fonts, data tables, and some ML routines. |
Hi!
Did you try using the new CART support? Also I recently added a copy of the CC65 tools to the repo, so you don't need CC65 to use the compiler. Have Fun! |
I am working on compiling a program and seeing if it is possible to make a program run from a 16k cartridge instead of RAM. I have started a CFG file. I am not sure if I am not missing anything.
FEATURES {
STARTADDRESS: default = $8000;
}
SYMBOLS {
EXEHDR: type = import;
STARTADDRESS: type = export, value = %S;
}
MEMORY {
ZP: file = "", define = yes, start = $0094, size = $0040;
ROM: file = "", define = yes, start = $8000, size = $2000, type = ro, fill = yes, fillval = $ff;
RAM: file = "", define = yes, start = $0400, size = STARTADDRESS - ROM, define = yes;
CARTSTART: file = %O, start = $BFEA, size = $0002;
CARTLEFT: file = %O, start = $BFFC, size = $0001;
CARTBOOT: file = %O, start = $BFFD, size = $0001; fill = yes, fillval = $59;
CARTENTRY: file = %O, start = $BFFE, size = $0002;
VECTORS: start = $BFFA, size = 6, type= ro, file = %O;
}
SEGMENTS {
ZEROPAGE: load = ZP, type = zp, optional = yes;
EXEHDR: load = HEADER, type = ro, optional = yes;
MAINHDR: load = MAINHDR, type = ro, optional = yes;
JUMPTAB: load = MAIN, type = ro, define = yes, align = $100;
RUNTIME: load = MAIN, type = rw, define = yes;
CODE: load = MAIN, type = rw, define = yes;
DATA: load = RAM, type = rw optional = yes, define = yes;
BSS: load = RAM, type = bss, optional = yes, define = yes;
HEAP: load = RAM, type = bss, optional = yes
IHEADER: load = IHEADER, type = ro;
INTERP: load = INTERP, type = rw;
AUTOSTRT: load = TRAILER, type = ro, optional = yes;
CARTSTART: load = CARTSTART, type = ro;
CARTLEFT: load = CARTLEFT, type = ro;
CARTBOOT: load = CARTBOOT, type = ro;
CARTENTRY: load = CARTENTRY, type = ro;
}
The text was updated successfully, but these errors were encountered: