libws libws
WSwan hardware library for the Wonderful toolchain
Loading...
Searching...
No Matches
Functions - Cartridge/Banking

Macros

#define ws_bank_ram_save(new_bank)
 Switch to a new RAM bank, while preserving the value of the old one.
 
#define ws_bank_ram_set(new_bank)
 Switch to a new RAM bank.
 
#define ws_bank_ram_restore   ws_bank_ram_set
 
#define ws_bank_rom0_save(new_bank)
 Switch to a new ROM bank in slot 0, while preserving the value of the old one.
 
#define ws_bank_rom0_set(new_bank)
 Switch to a new ROM bank in slot 0.
 
#define ws_bank_rom0_restore   ws_bank_rom0_set
 
#define ws_bank_rom1_save(new_bank)
 Switch to a new ROM bank in slot 1, while preserving the value of the old one.
 
#define ws_bank_rom1_set(new_bank)
 Switch to a new ROM bank in slot 1.
 
#define ws_bank_rom1_restore   ws_bank_rom1_set
 
#define ws_bank_rom_linear_save(new_bank)
 Switch to a new ROM bank in the linear slot, while preserving the value of the old one.
 
#define ws_bank_rom_linear_set(new_bank)
 Switch to a new ROM bank in the linear slot.
 
#define ws_bank_rom_linear_restore   ws_bank_rom_linear_set
 

Functions

static ws_bank_t __ws_bank_save (uint8_t port, ws_bank_t new_bank)
 
static void __ws_bank_set (uint8_t port, ws_bank_t new_bank)
 
void ws_cart_gpo_enable (uint8_t id)
 Enable general-purpose output.
 
void ws_cart_gpo_disable (uint8_t id)
 Disable general-purpose output.
 
void ws_cart_gpo_set (uint8_t id, bool val)
 Set general-purpose output value.
 

Detailed Description

Macro Definition Documentation

◆ ws_bank_ram_restore

#define ws_bank_ram_restore   ws_bank_ram_set

Definition at line 86 of file cartridge.h.

◆ ws_bank_ram_save

#define ws_bank_ram_save ( new_bank)
Value:
static ws_bank_t __ws_bank_save(uint8_t port, ws_bank_t new_bank)
Definition cartridge.h:58
#define IO_BANK_RAM
Definition hardware.h:406

Switch to a new RAM bank, while preserving the value of the old one.

Parameters
new_bankNew RAM bank.
Returns
uint8_t The previous RAM bank.

Definition at line 78 of file cartridge.h.

◆ ws_bank_ram_set

#define ws_bank_ram_set ( new_bank)
Value:
static void __ws_bank_set(uint8_t port, ws_bank_t new_bank)
Definition cartridge.h:66

Switch to a new RAM bank.

Parameters
new_bankNew RAM bank.

Definition at line 85 of file cartridge.h.

◆ ws_bank_rom0_restore

#define ws_bank_rom0_restore   ws_bank_rom0_set

Definition at line 102 of file cartridge.h.

◆ ws_bank_rom0_save

#define ws_bank_rom0_save ( new_bank)
Value:
#define IO_BANK_ROM0
Definition hardware.h:407

Switch to a new ROM bank in slot 0, while preserving the value of the old one.

Parameters
new_bankNew ROM bank.
Returns
uint8_t The previous ROM bank.

Definition at line 94 of file cartridge.h.

◆ ws_bank_rom0_set

#define ws_bank_rom0_set ( new_bank)
Value:

Switch to a new ROM bank in slot 0.

Parameters
new_bankNew ROM bank.

Definition at line 101 of file cartridge.h.

◆ ws_bank_rom1_restore

#define ws_bank_rom1_restore   ws_bank_rom1_set

Definition at line 118 of file cartridge.h.

◆ ws_bank_rom1_save

#define ws_bank_rom1_save ( new_bank)
Value:
#define IO_BANK_ROM1
Definition hardware.h:408

Switch to a new ROM bank in slot 1, while preserving the value of the old one.

Parameters
new_bankNew ROM bank.
Returns
uint8_t The previous ROM bank.

Definition at line 110 of file cartridge.h.

◆ ws_bank_rom1_set

#define ws_bank_rom1_set ( new_bank)
Value:

Switch to a new ROM bank in slot 1.

Parameters
new_bankNew ROM bank.

Definition at line 117 of file cartridge.h.

◆ ws_bank_rom_linear_restore

#define ws_bank_rom_linear_restore   ws_bank_rom_linear_set

Definition at line 134 of file cartridge.h.

◆ ws_bank_rom_linear_save

#define ws_bank_rom_linear_save ( new_bank)
Value:
#define IO_BANK_ROM_LINEAR
Definition hardware.h:409

Switch to a new ROM bank in the linear slot, while preserving the value of the old one.

Parameters
new_bankNew ROM bank.
Returns
uint8_t The previous ROM bank.

Definition at line 126 of file cartridge.h.

◆ ws_bank_rom_linear_set

#define ws_bank_rom_linear_set ( new_bank)
Value:

Switch to a new ROM bank in the linear slot.

Parameters
new_bankNew ROM bank.

Definition at line 133 of file cartridge.h.

Function Documentation

◆ __ws_bank_save()

static ws_bank_t __ws_bank_save ( uint8_t port,
ws_bank_t new_bank )
inlinestatic

Definition at line 58 of file cartridge.h.

◆ __ws_bank_set()

static void __ws_bank_set ( uint8_t port,
ws_bank_t new_bank )
inlinestatic

Definition at line 66 of file cartridge.h.

◆ ws_cart_gpo_disable()

void ws_cart_gpo_disable ( uint8_t id)

Disable general-purpose output.

Parameters
idGeneral-purpose output ID (0-3)

◆ ws_cart_gpo_enable()

void ws_cart_gpo_enable ( uint8_t id)

Enable general-purpose output.

Parameters
idGeneral-purpose output ID (0-3)

◆ ws_cart_gpo_set()

void ws_cart_gpo_set ( uint8_t id,
bool val )

Set general-purpose output value.

Parameters
idGeneral-purpose output ID (0-3)
valValue (true or false).