llvm-mos-sdk
Macros
config.h File Reference
#include <stdbool.h>
#include <stdint.h>
Include dependency graph for config.h:

Go to the source code of this file.

Macros

#define PCE_RAM_BANK_AT(id, offset)
 Define the memory offset for a given physical bank. More...
 
#define PCE_CDB_USE_PSG_DRIVER(value)
 Set to 1 to enable using the BIOS PSG driver. This reserves additional console RAM (6 bytes ZP, 838 bytes RAM). More...
 
#define PCE_CDB_USE_GRAPHICS_DRIVER(value)
 Set to 1 to enable using the BIOS graphics driver. This reserves additional console RAM (10 bytes ZP, 51 bytes RAM). More...
 

Detailed Description

Functionality related to output ELF configuration.

Macro Definition Documentation

◆ PCE_CDB_USE_GRAPHICS_DRIVER

#define PCE_CDB_USE_GRAPHICS_DRIVER (   value)

Set to 1 to enable using the BIOS graphics driver. This reserves additional console RAM (10 bytes ZP, 51 bytes RAM).

◆ PCE_CDB_USE_PSG_DRIVER

#define PCE_CDB_USE_PSG_DRIVER (   value)

Set to 1 to enable using the BIOS PSG driver. This reserves additional console RAM (6 bytes ZP, 838 bytes RAM).

◆ PCE_RAM_BANK_AT

#define PCE_RAM_BANK_AT (   id,
  offset 
)
Value:
__PCE_RAM_BANK_USE(id, offset) \
__PCE_RAM_BANK_CALLBACK_USE(id)

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_RAM_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:

  • the pce_ram_bankN_map() function, mapping the requested virtual bank,
  • the pce_ram_bankN_call(void (*method)(void)) function defines a safe trampoline to a function in another bank,
  • the __ram_bankN section.
Parameters
idThe ID of the physical bank (0-127).
offsetThe memory offset, in 8KB units (2-6).