libws libws
WSwan hardware library for the Wonderful toolchain
|
#include <stdbool.h>
#include <stdint.h>
#include <wonderful.h>
#include "hardware.h"
#include "util.h"
Go to the source code of this file.
Macros | |
#define | WF_BANK_INDEX(x) |
#define | MEM_RAM ((uint8_t __wf_iram*) 0x00000000) |
#define | MEM_SRAM ((uint8_t __far*) 0x10000000) |
#define | MEM_ROM0 ((uint8_t __far*) 0x20000000) |
#define | MEM_ROM1 ((uint8_t __far*) 0x30000000) |
#define | MEM_ROM_LINEAR ((uint8_t __far*) 0x40000000) |
#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 |
Typedefs | |
typedef uint8_t | ws_bank_t |
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. | |
Functionality related to the cartridge.
Definition in file cartridge.h.
#define WF_BANK_INDEX | ( | x | ) |
Definition at line 38 of file cartridge.h.
typedef uint8_t ws_bank_t |
Definition at line 36 of file cartridge.h.