llvm-mos-sdk
|
#include <stdbool.h>
#include <stdint.h>
Go to the source code of this file.
Macros | |
#define | PCE_ROM_BANK_AT(id, offset) |
Define the memory offset for a given physical bank. More... | |
#define | PCE_ROM_FIXED_BANK_SIZE(size) |
Define the size of the fixed bank (at the top of memory). More... | |
#define | PCE_SGX_RAM(size) |
Define the amount of C RAM for SGX targets. More... | |
Functionality related to output ELF configuration.
#define PCE_ROM_BANK_AT | ( | id, | |
offset | |||
) |
Define the memory offset for a given physical bank.
A virtual bank is a group of one or more physical banks, automatically allocated by the linker.
The recommended way to define virtual banks is to create a header file (for example, "bank.h") with PCE_ROM_BANK_AT entries, and a source file ("bank.c") which defines PCE_CONFIG_IMPLEMENTATION, then includes <pce.h>, then includes "bank.h".
A bank N defined in this manner provides:
id | The ID of the physical bank (0-127). |
offset | The memory offset, in 8KB units (2-6). |
#define PCE_ROM_FIXED_BANK_SIZE | ( | size | ) |
Define the size of the fixed bank (at the top of memory).
size | The size, in 8KB units (1-6). |
#define PCE_SGX_RAM | ( | size | ) |
Define the amount of C RAM for SGX targets.
The SGX provides up to 32 kilobytes of RAM in four banks (0xF8-0xFB), but only one is mapped by default (at offset 0x2000), to preserve compatibility with the standard PCE. Use this define in a source file to map more RAM to C by default.
Note that using this will reserve more banks for C RAM and the soft stack; for example, PCE_SGX_RAM(2) will use bank offsets 1 and 2.
size | The size, in 8KB units (2-4). |