Update readme for compressed embeds

This commit is contained in:
drmortalwombat 2022-05-01 12:58:31 +02:00
parent ea1fa189b2
commit 0cf2520df7

View File

@ -140,6 +140,19 @@ A section of the file can be selected by providing a limit and or an offset into
};
Embedded data can be compressed during compile time and expanded at runtime using one of the expand functions in the oscar.h
char charset[] = {
#embed 2048 0 lzo "../resources/charset.bin"
};
int main(void) {
oscar_expand_lzo(Charset, charset);
}
Compression algorithms so far are LZ (lzo) and run lenght (rle).
### Console input and output
@ -424,6 +437,10 @@ Embedds a custom character set into the prg file at 0xc800..0xcfff and switches
Embedds a custom character set into the prg file at 0xc000..0xc7ff and copies it to 0xd000 on startup. This frees this area for stack and heap usage.
#### Copy character set "charsetcopy.c"
Embedds a custom character set into the prg file at 0xc000..0xc7ff using lz comression and expands it to 0xd000 on startup. This frees this area for stack and heap usage.
#### Easyflash banking "easyflash.c"
When compiling for easyflash, the linker will place the code and data section into bank 0 and copy it to 0x0900..0x7fff at startup. The remaining banks are free to be used for data or additional codes and can be banked in as needed. This sample uses banks one to six for additional functions.