2019-03-18 21:24:55 +01:00
|
|
|
# Advanced Builds
|
|
|
|
|
2019-03-26 15:26:06 +01:00
|
|
|
## Reduced Memory
|
|
|
|
|
|
|
|
RETRO can be built for reduced memory targets. This is primarily
|
|
|
|
intendeded for use with embedded targets, but can be useful on
|
|
|
|
large machines as well.
|
|
|
|
|
|
|
|
To do this, `make` with `CFLAGS` set to `-DMEM1024K`, `-DMEM512K`,
|
|
|
|
`-DMEM256K`, `-DMEM192K`, `-DMEM128K`' or `-DMEM96K`. These will
|
|
|
|
target memory sizes as specified per the following table.
|
|
|
|
|
|
|
|
| | 1024kB | 512kB | 256kB | 192kB | 128kB | 96kB |
|
|
|
|
| ------------- | --------- | ------- | ------- | ------- | ------- | ------ |
|
|
|
|
| Total Bytes | 1,048,579 | 524,288 | 262,144 | 196,608 | 131,072 | 98,304 |
|
2019-03-26 15:32:28 +01:00
|
|
|
| Image | 968,000 | 450,000 | 192,000 | 126,000 | 96,000 | 72,000 |
|
2019-03-26 15:26:06 +01:00
|
|
|
| Data Stack | 512 | 512 | 512 | 512 | 512 | 512 |
|
|
|
|
| Address Stack | 1,024 | 1,024 | 1,024 | 1,024 | 1,024 | 1,024 |
|
2019-03-26 15:32:28 +01:00
|
|
|
| Remaining | 79,040 | 72,752 | 68,608 | 69,072 | 33,536 | 24,768 |
|
2019-03-26 15:26:06 +01:00
|
|
|
|
|
|
|
The remaining memory is available for use by the VM.
|
|
|
|
|
|
|
|
## Custom Image
|
|
|
|
|
2019-03-18 21:24:55 +01:00
|
|
|
For users of BSD, Linux, macOS, you can customize the image at
|
|
|
|
build time.
|
|
|
|
|
2019-03-20 17:47:39 +01:00
|
|
|
In the top level directory is a `package` directory containing
|
2019-03-18 21:24:55 +01:00
|
|
|
a file named `list`. You can add files to compile into your
|
|
|
|
system by adding them to the `list` and rebuilding.
|
|
|
|
|
|
|
|
Example:
|
|
|
|
|
|
|
|
If you have wanted to include the NumbersWithoutPrefixes.forth
|
|
|
|
example, add:
|
|
|
|
|
|
|
|
~~~
|
|
|
|
'example/NumbersWithoutPrefixes.forth include
|
|
|
|
~~~
|
|
|
|
|
|
|
|
To the start of the `list` file and then run `make` again. The
|
|
|
|
newly built `bin/retro` will now include your additions.
|