msx.h
Go to the documentation of this file.
#ifndef _MSX_H
#define _MSX_H
#include <types.h>
#include <stdint.h>
#include <gbdk/version.h>
#include <msx/hardware.h>
#define MSX
// Here NINTENDO means Game Boy & related clones
#ifdef NINTENDO
#undef NINTENDO
#endif
#ifdef NINTENDO_NES
#undef NINTENDO_NES
#endif
#ifdef SEGA
#undef SEGA
#endif
#if defined(__TARGET_msxdos)
#define MSXDOS
#endif
extern const uint8_t _SYSTEM;
#define SYSTEM_60HZ 0x00
#define SYSTEM_50HZ 0x01
#define VBK_REG VDP_ATTR_SHIFT
#define J_UP 0b00100000
#define J_DOWN 0b01000000
#define J_LEFT 0b00010000
#define J_RIGHT 0b10000000
#define J_A 0b00000001
#define J_B 0b00000100
#define J_SELECT 0b00001000
#define J_START 0b00000010
#define M_TEXT_OUT 0x02U
#define M_TEXT_INOUT 0x03U
#define M_NO_SCROLL 0x04U
#define M_NO_INTERP 0x08U
#define S_BANK 0x01U
#define S_FLIPX 0x02U
#define S_FLIPY 0x04U
#define S_PALETTE 0x08U
#define S_PRIORITY 0x10U
#define S_PAL(n) (((n) & 0x01U) << 3)
// VDP helper macros
#define __WRITE_VDP_REG_UNSAFE(REG, v) shadow_##REG=(v),VDP_CMD=(shadow_##REG),VDP_CMD=REG
#define __WRITE_VDP_REG(REG, v) shadow_##REG=(v);__asm__("di");VDP_CMD=(shadow_##REG);VDP_CMD=REG;__asm__("ei")
#define __READ_VDP_REG(REG) shadow_##REG
void WRITE_VDP_CMD(uint16_t cmd) Z88DK_FASTCALL PRESERVES_REGS(b, c, d, e, iyh, iyl);
void WRITE_VDP_DATA(uint16_t data) Z88DK_FASTCALL PRESERVES_REGS(b, c, d, e, iyh, iyl);
void mode(uint8_t m) OLDCALL;
uint8_t get_mode(void) OLDCALL;
inline uint8_t get_system(void) {
return _SYSTEM;
}
/* Interrupt flags */
#define EMPTY_IFLAG 0x00U
#define VBL_IFLAG 0x01U
#define LCD_IFLAG 0x02U
#define TIM_IFLAG 0x04U
#define SIO_IFLAG 0x08U
#define JOY_IFLAG 0x10U
void set_interrupts(uint8_t flags) Z88DK_FASTCALL;
/* Limits */
#define SCREENWIDTH DEVICE_SCREEN_PX_WIDTH
#define SCREENHEIGHT DEVICE_SCREEN_PX_HEIGHT
#define MINWNDPOSX 0x00U
#define MINWNDPOSY 0x00U
#define MAXWNDPOSX 0x00U
#define MAXWNDPOSY 0x00U
typedef void (*int_handler)(void) NONBANKED;
void remove_VBL(int_handler h) Z88DK_FASTCALL PRESERVES_REGS(iyh, iyl);
void remove_LCD(int_handler h) Z88DK_FASTCALL PRESERVES_REGS(b, c, iyh, iyl);
void remove_TIM(int_handler h) Z88DK_FASTCALL;
void remove_SIO(int_handler h) Z88DK_FASTCALL;
void remove_JOY(int_handler h) Z88DK_FASTCALL;
void add_VBL(int_handler h) Z88DK_FASTCALL PRESERVES_REGS(d, e, iyh, iyl);
void add_LCD(int_handler h) Z88DK_FASTCALL PRESERVES_REGS(b, c, iyh, iyl);
void add_TIM(int_handler h) Z88DK_FASTCALL;
void add_SIO(int_handler h) Z88DK_FASTCALL;
void add_JOY(int_handler h) Z88DK_FASTCALL;
inline uint8_t cancel_pending_interrupts(void) {
return VDP_STATUS;
}
inline void move_bkg(uint8_t x, uint8_t y) {
__WRITE_VDP_REG(VDP_RSCX, -x);
__WRITE_VDP_REG(VDP_RSCY, y);
}
inline void scroll_bkg(int8_t x, int8_t y) {
__WRITE_VDP_REG(VDP_RSCX, __READ_VDP_REG(VDP_RSCX) - x);
int16_t tmp = __READ_VDP_REG(VDP_RSCY) + y;
__WRITE_VDP_REG(VDP_RSCY, (tmp < 0) ? 224 + tmp : tmp % 224u);
}
void vsync(void) PRESERVES_REGS(b, c, d, e, h, l, iyh, iyl);
void wait_vbl_done(void) PRESERVES_REGS(b, c, d, e, h, l, iyh, iyl);
inline void display_off(void) {
__WRITE_VDP_REG(VDP_R1, __READ_VDP_REG(VDP_R1) &= (~R1_DISP_ON));
}
#define DISPLAY_ON \
__WRITE_VDP_REG(VDP_R1, __READ_VDP_REG(VDP_R1) |= R1_DISP_ON)
#define DISPLAY_OFF \
display_off();
void refresh_OAM(void);
#define HIDE_LEFT_COLUMN \
__WRITE_VDP_REG(VDP_R0, __READ_VDP_REG(VDP_R0) |= R0_LCB)
#define SHOW_LEFT_COLUMN \
__WRITE_VDP_REG(VDP_R0, __READ_VDP_REG(VDP_R0) &= (~R0_LCB))
#define SET_BORDER_COLOR(C) __WRITE_VDP_REG(VDP_R7, ((C) | 0xf0u))
#define SHOW_BKG
#define HIDE_BKG
#define SHOW_WIN
#define HIDE_WIN
#define SHOW_SPRITES
#define HIDE_SPRITES
#define SPRITES_16x16 \
__WRITE_VDP_REG(VDP_R1, __READ_VDP_REG(VDP_R1) |= R1_SPR_16X16)
#define SPRITES_8x8 \
__WRITE_VDP_REG(VDP_R1, __READ_VDP_REG(VDP_R1) &= (~R1_SPR_16X16))
#define DEVICE_SUPPORTS_COLOR (TRUE)
extern volatile uint16_t sys_time;
extern volatile uint8_t _vbl_done;
#define VBL_DONE _vbl_done
uint8_t get_r_reg(void) PRESERVES_REGS(b, c, d, e, h, l, iyh, iyl);
#define DIV_REG get_r_reg()
extern volatile uint8_t _current_bank;
#define CURRENT_BANK _current_bank
#ifndef BANK
#define BANK(VARNAME) ( (uint8_t) & __bank_ ## VARNAME )
#endif
#define BANKREF(VARNAME) void __func_ ## VARNAME(void) __banked __naked { \
__asm \
.local b___func_ ## VARNAME \
___bank_ ## VARNAME = b___func_ ## VARNAME \
.globl ___bank_ ## VARNAME \
__endasm; \
}
#define BANKREF_EXTERN(VARNAME) extern const void __bank_ ## VARNAME;
void SWITCH_ROM(uint8_t bank) Z88DK_FASTCALL PRESERVES_REGS(b, c, d, e, iyh, iyl);
#define SWITCH_ROM1 SWITCH_ROM
#define SWITCH_ROM2(b) MAP_FRAME2=(b)
#define SWITCH_RAM(b) RAM_CONTROL=((b)&1)?RAM_CONTROL|RAMCTL_BANK:RAM_CONTROL&(~RAMCTL_BANK)
#define ENABLE_RAM RAM_CONTROL|=RAMCTL_RAM
#define DISABLE_RAM RAM_CONTROL&=(~RAMCTL_RAM)
void delay(uint16_t d) Z88DK_FASTCALL;
uint8_t joypad(void) OLDCALL PRESERVES_REGS(b, c, d, e, h, iyh, iyl);
uint8_t waitpad(uint8_t mask) Z88DK_FASTCALL PRESERVES_REGS(b, c, d, e, iyh, iyl);
void waitpadup(void) PRESERVES_REGS(b, c, d, e, iyh, iyl);
typedef struct {
uint8_t npads;
union {
struct {
uint8_t joy0, joy1, joy2, joy3;
};
uint8_t joypads[4];
};
} joypads_t;
uint8_t joypad_init(uint8_t npads, joypads_t * joypads) Z88DK_CALLEE;
void joypad_ex(joypads_t * joypads) Z88DK_FASTCALL PRESERVES_REGS(iyh, iyl);
inline void enable_interrupts(void) PRESERVES_REGS(a, b, c, d, e, h, l, iyh, iyl) {
__asm__("ei");
}
inline void disable_interrupts(void) PRESERVES_REGS(a, b, c, d, e, h, l, iyh, iyl) {
__asm__("di");
}
#if defined(__TARGET_msxdos)
#define RGB(r,g,b) ((r) | ((g) << 2) | ((b) << 4))
#define RGB8(r,g,b) (((r) >> 6) | (((g) >> 6) << 2) | (((b) >> 6) << 4))
#define RGBHTML(RGB24bit) (((RGB24bit) >> 22) | ((((RGB24bit) & 0xFFFF) >> 14) << 2) | ((((RGB24bit) & 0xFF) >> 6) << 4))
#define RGB_RED RGB( 3, 0, 0)
#define RGB_DARKRED RGB( 2, 0, 0)
#define RGB_GREEN RGB( 0, 3, 0)
#define RGB_DARKGREEN RGB( 0, 2, 0)
#define RGB_BLUE RGB( 0, 0, 3)
#define RGB_DARKBLUE RGB( 0, 0, 2)
#define RGB_YELLOW RGB( 3, 3, 0)
#define RGB_DARKYELLOW RGB( 2, 2, 0)
#define RGB_CYAN RGB( 0, 3, 3)
#define RGB_AQUA RGB( 3, 1, 2)
#define RGB_PINK RGB( 3, 0, 3)
#define RGB_PURPLE RGB( 2, 0, 2)
#define RGB_BLACK RGB( 0, 0, 0)
#define RGB_DARKGRAY RGB( 1, 1, 1)
#define RGB_LIGHTGRAY RGB( 2, 2, 2)
#define RGB_WHITE RGB( 3, 3, 3)
typedef uint8_t palette_color_t;
#else
#error Unrecognized port
#endif
void set_default_palette(void);
inline void cpu_fast(void) {}
void set_palette_entry(uint8_t palette, uint8_t entry, uint16_t rgb_data) Z88DK_CALLEE PRESERVES_REGS(iyh, iyl);
#define set_bkg_palette_entry set_palette_entry
#define set_sprite_palette_entry(palette,entry,rgb_data) set_palette_entry(1,entry,rgb_data)
void set_palette(uint8_t first_palette, uint8_t nb_palettes, const palette_color_t *rgb_data) Z88DK_CALLEE;
#define set_bkg_palette set_palette
#define set_sprite_palette(first_palette,nb_palettes,rgb_data) set_palette(1,1,rgb_data)
void set_native_tile_data(uint16_t start, uint16_t ntiles, const void *src) Z88DK_CALLEE;
inline void set_bkg_4bpp_data(uint16_t start, uint16_t ntiles, const void *src) {
set_native_tile_data(start, ntiles, src);
}
void set_sprite_1bpp_data(uint16_t start, uint16_t ntiles, const void *src) Z88DK_CALLEE;
inline void set_native_sprite_data(uint16_t start, uint16_t ntiles, const void *src) {
set_sprite_1bpp_data(start, ntiles, src);
}
#define COMPAT_PALETTE(C0,C1,C2,C3) (((uint16_t)(C3) << 12) | ((uint16_t)(C2) << 8) | ((uint16_t)(C1) << 4) | (uint16_t)(C0))
extern uint16_t _current_2bpp_palette;
inline void set_2bpp_palette(uint16_t palette) {
_current_2bpp_palette = palette;
}
//void set_tile_2bpp_data(uint16_t start, uint16_t ntiles, const void *src, uint16_t palette) Z88DK_CALLEE PRESERVES_REGS(iyh, iyl);
inline void set_bkg_data(uint16_t start, uint16_t ntiles, const void *src) {
set_native_tile_data(start, ntiles, src);
}
inline void set_sprite_data(uint16_t start, uint16_t ntiles, const void *src) {
set_sprite_1bpp_data(start, ntiles, src);
}
//inline void set_bkg_2bpp_data(uint16_t start, uint16_t ntiles, const void *src) {
// set_tile_2bpp_data(start, ntiles, src, _current_2bpp_palette);
//}
//inline void set_sprite_2bpp_data(uint16_t start, uint16_t ntiles, const void *src) {
// set_tile_2bpp_data((uint8_t)(start) + 0x100u, ntiles, src, _current_2bpp_palette);
//}
extern uint16_t _current_1bpp_colors;
inline void set_1bpp_colors(uint8_t fgcolor, uint8_t bgcolor) {
_current_1bpp_colors = ((uint16_t)bgcolor << 8) | fgcolor;
}
void set_tile_1bpp_data(uint16_t start, uint16_t ntiles, const void *src, uint16_t colors) Z88DK_CALLEE PRESERVES_REGS(iyh, iyl);
inline void set_bkg_1bpp_data(uint16_t start, uint16_t ntiles, const void *src) {
set_tile_1bpp_data(start, ntiles, src, _current_1bpp_colors);
}
void set_data(uint16_t dst, const void *src, uint16_t size) Z88DK_CALLEE PRESERVES_REGS(iyh, iyl);
void vmemcpy(uint16_t dst, const void *src, uint16_t size) Z88DK_CALLEE PRESERVES_REGS(iyh, iyl);
void set_tile_map(uint8_t x, uint8_t y, uint8_t w, uint8_t h, const uint8_t *tiles) Z88DK_CALLEE PRESERVES_REGS(iyh, iyl);
#define set_bkg_tiles set_tile_map
#define set_win_tiles set_tile_map
extern uint8_t _map_tile_offset;
inline void set_bkg_based_tiles(uint8_t x, uint8_t y, uint8_t w, uint8_t h, const uint8_t *tiles, uint8_t base_tile) {
_map_tile_offset = base_tile;
set_tile_map(x, y, w, h, tiles);
_map_tile_offset = 0;
}
inline void set_win_based_tiles(uint8_t x, uint8_t y, uint8_t w, uint8_t h, const uint8_t *tiles, uint8_t base_tile) {
_map_tile_offset = base_tile;
set_tile_map(x, y, w, h, tiles);
_map_tile_offset = 0;
}
void set_tile_submap(uint8_t x, uint8_t y, uint8_t w, uint8_t h, uint8_t map_w, const uint8_t *map) Z88DK_CALLEE PRESERVES_REGS(iyh, iyl);
void set_tile_submap_compat(uint8_t x, uint8_t y, uint8_t w, uint8_t h, uint8_t map_w, const uint8_t *map) Z88DK_CALLEE PRESERVES_REGS(iyh, iyl);
inline void set_bkg_submap(uint8_t x, uint8_t y, uint8_t w, uint8_t h, const uint8_t *map, uint8_t map_w) {
set_tile_submap_compat(x, y, w, h, map_w, map);
}
inline void set_win_submap(uint8_t x, uint8_t y, uint8_t w, uint8_t h, const uint8_t *map, uint8_t map_w) {
set_tile_submap_compat(x, y, w, h, map_w, map);
}
extern uint8_t _submap_tile_offset;
inline void set_bkg_based_submap(uint8_t x, uint8_t y, uint8_t w, uint8_t h, const uint8_t *map, uint8_t map_w, uint8_t base_tile) {
_submap_tile_offset = base_tile;
set_tile_submap_compat(x, y, w, h, map_w, map);
_submap_tile_offset = 0;
}
inline void set_win_based_submap(uint8_t x, uint8_t y, uint8_t w, uint8_t h, const uint8_t *map, uint8_t map_w, uint8_t base_tile) {
_submap_tile_offset = base_tile;
set_tile_submap_compat(x, y, w, h, map_w, map);
_submap_tile_offset = 0;
}
void fill_rect(uint8_t x, uint8_t y, uint8_t w, uint8_t h, const uint16_t tile) Z88DK_CALLEE PRESERVES_REGS(iyh, iyl);
#define fill_bkg_rect fill_rect
#define fill_win_rect fill_rect
typedef struct OAM_item_t {
uint8_t y, x; //< X, Y Coordinates of the sprite on screen
uint8_t tile; //< Sprite tile number
uint8_t prop; //< OAM Property Flags
} OAM_item_t;
extern volatile struct OAM_item_t shadow_OAM[];
extern volatile uint8_t _shadow_OAM_base;
extern volatile uint8_t _shadow_OAM_OFF;
#define DISABLE_VBL_TRANSFER \
_shadow_OAM_base = 0
#define ENABLE_VBL_TRANSFER \
_shadow_OAM_base = (uint8_t)((uint16_t)&shadow_OAM >> 8)
#define MAX_HARDWARE_SPRITES 32
#define HARDWARE_SPRITE_CAN_FLIP_X 0
#define HARDWARE_SPRITE_CAN_FLIP_Y 0
inline void SET_SHADOW_OAM_ADDRESS(void * address) {
_shadow_OAM_base = (uint8_t)((uint16_t)address >> 8);
}
inline void set_sprite_tile(uint8_t nb, uint8_t tile) {
shadow_OAM[nb].tile=tile;
}
inline uint8_t get_sprite_tile(uint8_t nb) {
return shadow_OAM[nb].tile;
}
inline void set_sprite_prop(uint8_t nb, uint8_t prop) {
shadow_OAM[nb].prop = prop;
}
inline uint8_t get_sprite_prop(uint8_t nb) {
return shadow_OAM[nb].prop;
}
inline void move_sprite(uint8_t nb, uint8_t x, uint8_t y) {
OAM_item_t * itm = &shadow_OAM[nb];
itm->y=y, itm->x=x;
}
inline void scroll_sprite(uint8_t nb, int8_t x, int8_t y) {
OAM_item_t * itm = &shadow_OAM[nb];
itm->y+=y, itm->x+=x;
}
inline void hide_sprite(uint8_t nb) {
shadow_OAM[nb].y = 0xC0;
}
void set_vram_byte(uint8_t * addr, uint8_t v) Z88DK_CALLEE PRESERVES_REGS(iyh, iyl);
uint8_t * set_attributed_tile_xy(uint8_t x, uint8_t y, uint16_t t) Z88DK_CALLEE PRESERVES_REGS(iyh, iyl);
uint8_t * set_tile_xy(uint8_t x, uint8_t y, uint8_t t) Z88DK_CALLEE PRESERVES_REGS(iyh, iyl);
#define set_bkg_tile_xy set_tile_xy
#define set_win_tile_xy set_tile_xy
uint8_t * get_bkg_xy_addr(uint8_t x, uint8_t y) Z88DK_CALLEE PRESERVES_REGS(iyh, iyl);
#define get_win_xy_addr get_bkg_xy_addr
#endif /* _MSX_H */
NONBANKED
#define NONBANKED
Definition: types.h:40
OLDCALL
#define OLDCALL
Definition: types.h:21
PRESERVES_REGS
#define PRESERVES_REGS(...)
Definition: types.h:32
Z88DK_CALLEE
#define Z88DK_CALLEE
Definition: types.h:46
Z88DK_FASTCALL
#define Z88DK_FASTCALL
Definition: types.h:47
palette_color_t
uint16_t palette_color_t
Definition: cgb.h:85
hardware.h
R1_DISP_ON
#define R1_DISP_ON
Definition: hardware.h:58
VDP_R1
#define VDP_R1
Definition: hardware.h:53
VDP_RSCX
#define VDP_RSCX
Definition: hardware.h:108
VDP_RSCY
#define VDP_RSCY
Definition: hardware.h:113
OAM_item_t
struct OAM_item_t OAM_item_t
SET_SHADOW_OAM_ADDRESS
void SET_SHADOW_OAM_ADDRESS(void *address)
Definition: msx.h:721
SWITCH_ROM
void SWITCH_ROM(uint8_t bank) Z88DK_FASTCALL PRESERVES_REGS(b
WRITE_VDP_CMD
void WRITE_VDP_CMD(uint16_t cmd) Z88DK_FASTCALL PRESERVES_REGS(b
WRITE_VDP_DATA
void WRITE_VDP_DATA(uint16_t data) Z88DK_FASTCALL PRESERVES_REGS(b
_SYSTEM
const uint8_t _SYSTEM
__READ_VDP_REG
#define __READ_VDP_REG(REG)
Definition: msx.h:100
__WRITE_VDP_REG
#define __WRITE_VDP_REG(REG, v)
Definition: msx.h:99
_current_1bpp_colors
uint16_t _current_1bpp_colors
_current_2bpp_palette
uint16_t _current_2bpp_palette
_current_bank
volatile uint8_t _current_bank
Definition: gb.h:534
_map_tile_offset
uint8_t _map_tile_offset
_shadow_OAM_OFF
volatile uint8_t _shadow_OAM_OFF
_shadow_OAM_base
volatile uint8_t _shadow_OAM_base
Definition: gb.h:1836
_submap_tile_offset
uint8_t _submap_tile_offset
_vbl_done
volatile uint8_t _vbl_done
Definition: gb.h:476
add_JOY
void add_JOY(int_handler h) Z88DK_FASTCALL
add_LCD
void add_LCD(int_handler h) Z88DK_FASTCALL PRESERVES_REGS(b
add_SIO
void add_SIO(int_handler h) Z88DK_FASTCALL
add_TIM
void add_TIM(int_handler h) Z88DK_FASTCALL
add_VBL
void add_VBL(int_handler h) Z88DK_FASTCALL PRESERVES_REGS(d
b
void b
Definition: msx.h:498
c
void c
Definition: msx.h:102
cancel_pending_interrupts
uint8_t cancel_pending_interrupts(void)
Definition: msx.h:213
cpu_fast
void cpu_fast(void)
Definition: msx.h:551
d
void d
Definition: msx.h:102
delay
void delay(uint16_t d) Z88DK_FASTCALL
disable_interrupts
void disable_interrupts(void) PRESERVES_REGS(a
display_off
void display_off(void)
Definition: msx.h:248
e
void e
Definition: msx.h:102
enable_interrupts
void enable_interrupts(void) PRESERVES_REGS(a
fill_rect
void fill_rect(uint8_t x, uint8_t y, uint8_t w, uint8_t h, const uint16_t tile) Z88DK_CALLEE PRESERVES_REGS(iyh
get_bkg_xy_addr
uint8_t * get_bkg_xy_addr(uint8_t x, uint8_t y) Z88DK_CALLEE PRESERVES_REGS(iyh
get_mode
uint8_t get_mode(void) OLDCALL
get_r_reg
uint8_t get_r_reg(void) PRESERVES_REGS(b
get_sprite_prop
uint8_t get_sprite_prop(uint8_t nb)
Definition: msx.h:760
get_sprite_tile
uint8_t get_sprite_tile(uint8_t nb)
Definition: msx.h:752
get_system
uint8_t get_system(void)
Definition: msx.h:122
h
void h
Definition: msx.h:238
hide_sprite
void hide_sprite(uint8_t nb)
Definition: msx.h:802
int_handler
void(* int_handler)(void) NONBANKED
Definition: msx.h:175
iyh
void iyh
Definition: msx.h:102
iyl
void iyl
Definition: msx.h:102
joypad
uint8_t joypad(void) OLDCALL PRESERVES_REGS(b
joypad_ex
void joypad_ex(joypads_t *joypads) Z88DK_FASTCALL PRESERVES_REGS(iyh
joypad_init
uint8_t joypad_init(uint8_t npads, joypads_t *joypads) Z88DK_CALLEE
l
void l
Definition: msx.h:238
mode
void mode(uint8_t m) OLDCALL
move_bkg
void move_bkg(uint8_t x, uint8_t y)
Definition: msx.h:217
move_sprite
void move_sprite(uint8_t nb, uint8_t x, uint8_t y)
Definition: msx.h:776
refresh_OAM
void refresh_OAM(void)
remove_JOY
void remove_JOY(int_handler h) Z88DK_FASTCALL
remove_LCD
void remove_LCD(int_handler h) Z88DK_FASTCALL PRESERVES_REGS(b
remove_SIO
void remove_SIO(int_handler h) Z88DK_FASTCALL
remove_TIM
void remove_TIM(int_handler h) Z88DK_FASTCALL
remove_VBL
void remove_VBL(int_handler h) Z88DK_FASTCALL PRESERVES_REGS(iyh
scroll_bkg
void scroll_bkg(int8_t x, int8_t y)
Definition: msx.h:222
scroll_sprite
void scroll_sprite(uint8_t nb, int8_t x, int8_t y)
Definition: msx.h:792
set_1bpp_colors
void set_1bpp_colors(uint8_t fgcolor, uint8_t bgcolor)
Definition: msx.h:589
set_2bpp_palette
void set_2bpp_palette(uint16_t palette)
Definition: msx.h:571
set_attributed_tile_xy
uint8_t * set_attributed_tile_xy(uint8_t x, uint8_t y, uint16_t t) Z88DK_CALLEE PRESERVES_REGS(iyh
set_bkg_1bpp_data
void set_bkg_1bpp_data(uint16_t start, uint16_t ntiles, const void *src)
Definition: msx.h:593
set_bkg_4bpp_data
void set_bkg_4bpp_data(uint16_t start, uint16_t ntiles, const void *src)
Definition: msx.h:561
set_bkg_based_submap
void set_bkg_based_submap(uint8_t x, uint8_t y, uint8_t w, uint8_t h, const uint8_t *map, uint8_t map_w, uint8_t base_tile)
Definition: msx.h:635
set_bkg_based_tiles
void set_bkg_based_tiles(uint8_t x, uint8_t y, uint8_t w, uint8_t h, const uint8_t *tiles, uint8_t base_tile)
Definition: msx.h:614
set_bkg_data
void set_bkg_data(uint16_t start, uint16_t ntiles, const void *src)
Definition: msx.h:575
set_bkg_submap
void set_bkg_submap(uint8_t x, uint8_t y, uint8_t w, uint8_t h, const uint8_t *map, uint8_t map_w)
Definition: msx.h:627
set_data
void set_data(uint16_t dst, const void *src, uint16_t size) Z88DK_CALLEE PRESERVES_REGS(iyh
set_default_palette
void set_default_palette(void)
set_interrupts
void set_interrupts(uint8_t flags) Z88DK_FASTCALL
set_native_sprite_data
void set_native_sprite_data(uint16_t start, uint16_t ntiles, const void *src)
Definition: msx.h:565
set_native_tile_data
void set_native_tile_data(uint16_t start, uint16_t ntiles, const void *src) Z88DK_CALLEE
set_palette
void set_palette(uint8_t first_palette, uint8_t nb_palettes, const palette_color_t *rgb_data) Z88DK_CALLEE
set_palette_entry
void set_palette_entry(uint8_t palette, uint8_t entry, uint16_t rgb_data) Z88DK_CALLEE PRESERVES_REGS(iyh
set_sprite_1bpp_data
void set_sprite_1bpp_data(uint16_t start, uint16_t ntiles, const void *src) Z88DK_CALLEE
Definition: sms.h:661
set_sprite_data
void set_sprite_data(uint16_t start, uint16_t ntiles, const void *src)
Definition: msx.h:578
set_sprite_prop
void set_sprite_prop(uint8_t nb, uint8_t prop)
Definition: msx.h:756
set_sprite_tile
void set_sprite_tile(uint8_t nb, uint8_t tile)
Definition: msx.h:741
set_tile_1bpp_data
void set_tile_1bpp_data(uint16_t start, uint16_t ntiles, const void *src, uint16_t colors) Z88DK_CALLEE PRESERVES_REGS(iyh
set_tile_map
void set_tile_map(uint8_t x, uint8_t y, uint8_t w, uint8_t h, const uint8_t *tiles) Z88DK_CALLEE PRESERVES_REGS(iyh
set_tile_submap
void set_tile_submap(uint8_t x, uint8_t y, uint8_t w, uint8_t h, uint8_t map_w, const uint8_t *map) Z88DK_CALLEE PRESERVES_REGS(iyh
set_tile_submap_compat
void set_tile_submap_compat(uint8_t x, uint8_t y, uint8_t w, uint8_t h, uint8_t map_w, const uint8_t *map) Z88DK_CALLEE PRESERVES_REGS(iyh
set_tile_xy
uint8_t * set_tile_xy(uint8_t x, uint8_t y, uint8_t t) Z88DK_CALLEE PRESERVES_REGS(iyh
set_vram_byte
void set_vram_byte(uint8_t *addr, uint8_t v) Z88DK_CALLEE PRESERVES_REGS(iyh
set_win_based_submap
void set_win_based_submap(uint8_t x, uint8_t y, uint8_t w, uint8_t h, const uint8_t *map, uint8_t map_w, uint8_t base_tile)
Definition: msx.h:640
set_win_based_tiles
void set_win_based_tiles(uint8_t x, uint8_t y, uint8_t w, uint8_t h, const uint8_t *tiles, uint8_t base_tile)
Definition: msx.h:619
set_win_submap
void set_win_submap(uint8_t x, uint8_t y, uint8_t w, uint8_t h, const uint8_t *map, uint8_t map_w)
Definition: msx.h:630
shadow_OAM
volatile struct OAM_item_t shadow_OAM[]
sys_time
volatile uint16_t sys_time
vmemcpy
void vmemcpy(uint16_t dst, const void *src, uint16_t size) Z88DK_CALLEE PRESERVES_REGS(iyh
vsync
void vsync(void) PRESERVES_REGS(b
wait_vbl_done
void wait_vbl_done(void) PRESERVES_REGS(b
waitpad
uint8_t waitpad(uint8_t mask) Z88DK_FASTCALL PRESERVES_REGS(b
waitpadup
void waitpadup(void) PRESERVES_REGS(b
stdint.h
int16_t
short int int16_t
Definition: stdint.h:44
int8_t
signed char int8_t
Definition: stdint.h:43
uint16_t
unsigned short int uint16_t
Definition: stdint.h:52
uint8_t
unsigned char uint8_t
Definition: stdint.h:51
OAM_item_t
Definition: gb.h:1823
OAM_item_t::prop
uint8_t prop
Definition: gb.h:1826
OAM_item_t::tile
uint8_t tile
Definition: gb.h:1825
OAM_item_t::x
uint8_t x
Definition: gb.h:1824
OAM_item_t::y
uint8_t y
Definition: gb.h:1824
joypads_t
Definition: gb.h:755
version.h