libmsx
C library for MSX
|
Data types and functions for VDP (Video Display Proccessor) access. More...
#include <assert.h>
#include <stdbool.h>
#include <stdint.h>
#include "io.h"
#include "vmem.h"
#include "vdp_unsafe.h"
#include "bios.h"
#include "workarea.h"
Go to the source code of this file.
Data Structures | |
struct | vdp_cmd |
Parameters for VDP commands. More... | |
Macros | |
#define | VDP_H |
#define | RGB(r, g, b) ((palette_t)((((g) & 7) << 8) | (((r) & 7) << 4) | ((b) & 7))) |
Constructs RGB color palette value. | |
Typedefs | |
typedef uint16_t | palette_t |
Type for RGB color palette value. | |
Functions | |
uint8_t | vdp_get_status (uint8_t reg) |
MSX Read from a VDP status register. | |
void | vdp_set_control (uint8_t reg, uint8_t x) |
MSX Write to a VDP control register. | |
void | vdp_write_control (uint8_t reg, void *src, uint8_t len) |
MSX2 Write to a series of VDP control registers. | |
void | vdp_set_color (uint8_t c) |
MSX Set VDP color register. | |
void | vdp_set_palette (uint8_t idx, const palette_t palette) |
MSX2 Write to a VDP palette register. | |
void | vdp_write_palette (const palette_t palettes[16]) |
MSX2 Write to a series of VDP palette registers. | |
void | vdp_set_screen_mode (enum vdp_screen_mode mode) |
MSX Set VDP screen mode. | |
void | vdp_set_screen_lines (enum vdp_screen_lines lines) |
MSX2 Set number of visible lines. | |
void | vdp_set_visible (bool visible) |
MSX Show / hide screen. | |
uint8_t | vdp_get_sprite_mode (void) |
MSX Get current sprite mode. | |
void | vdp_set_sprite_size (enum vdp_sprite_size size) |
MSX Set sprite size. | |
void | vdp_set_sprite_visible (bool visible) |
MSX2 Show / hide sprites. | |
void | vdp_set_image_table (vmemptr_t table) |
MSX Set VRAM address of the pattern name table. | |
void | vdp_set_pattern_table (vmemptr_t table) |
MSX Set VRAM address of the pattern generator table. | |
void | vdp_set_color_table (vmemptr_t table) |
MSX Set VRAM address of the color table. | |
void | vdp_set_sprite_pattern_table (vmemptr_t table) |
MSX Set VRAM address of the sprite pattern generator table. | |
void | vdp_set_sprite_attribute_table (vmemptr_t table) |
MSX Set VRAM address of the sprite attribute table. | |
void | vdp_set_adjust (int8_t x, int8_t y) |
MSX2 Set VDP display adjust register. | |
void | vdp_set_vscroll (uint8_t y) |
MSX2 Set VDP vertical display offset register. | |
void | vdp_set_hscroll (uint16_t x) |
MSX2+ Set VDP horizontal display offset register. | |
void | vdp_set_hscroll_mask (bool enable) |
MSX2+ Enables/Disables the screen mask for the leftmost 8 pixels. | |
void | vdp_set_hscroll_dual_page (bool enable) |
MSX2+ Enable/disable horizontal scrolling for two pages. | |
void | vdp_set_yjk_mode (enum vdp_yjk_mode yjk) |
MSX2+ Set V9958 VDP's color space to RGB, YJK, or YJK/RGB. | |
bool | vdp_cmd_is_running (void) |
MSX2 Tests if a VDP command is running. | |
void | vdp_cmd_await (void) |
MSX2 Wait for the VDP command to finish. | |
void | vdp_cmd_set_unrestricted (bool enable) |
MSX2+ Unristricts/Restricts availability of the VDP command for some screen modes. | |
void | vdp_cmd_stop (void) |
MSX2 Executes VDP command "STOP" (stop the running VDP command). | |
uint8_t | vdp_cmd_execute_POINT (uint16_t sx, uint16_t sy) |
MSX2 Executes VDP command "POINT" (Read color code at the given point). | |
void | vdp_cmd_execute_PSET (uint16_t dx, uint16_t dy, uint8_t color, enum vdp_cmd_logop logop) |
MSX2 Executes VDP command "PSET" (Write color code at the given point). | |
bool | vdp_cmd_execute_SRCH (uint16_t *ret, uint16_t sx, uint16_t sy, uint8_t color, uint8_t arg) |
MSX2 Executes VDP command "SRCH" (Search color code from the given point towards left/right). | |
void | vdp_cmd_execute_LINE (uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, uint8_t color, enum vdp_cmd_logop logop) |
MSX2 Executes VDP command "LINE" (Draw line w/ logical operation). | |
bool | vdp_cmd_read (uint8_t *ret) |
MSX2 Reads a value from VDP. | |
void | vdp_cmd_execute_LMCM (uint16_t x, uint16_t y, uint16_t w, uint16_t h, enum vdp_cmd_dir dir) |
MSX2 Executes VDP command "LMCM" (VRAM to CPU logical transfer). | |
bool | vdp_cmd_write (const uint8_t val) |
MSX2 Writes a value to VDP. | |
void | vdp_cmd_execute_LMMC (uint16_t x, uint16_t y, uint16_t w, uint16_t h, enum vdp_cmd_dir dir, enum vdp_cmd_logop logop) |
MSX2 Executes VDP command "LMMC" (CPU to VRAM logical transfer). | |
void | vdp_cmd_execute_HMMC (uint16_t x, uint16_t y, uint16_t w, uint16_t h, enum vdp_cmd_dir dir) |
MSX2 Executes VDP command "HMMC" (CPU to VRAM high speed transfer). | |
void | vdp_cmd_execute_LMMV (uint16_t x, uint16_t y, uint16_t w, uint16_t h, uint8_t color, enum vdp_cmd_logop logop) |
MSX2 Executes VDP command "LMMV" (fills rectangular area w/ logical operation). | |
void | vdp_cmd_execute_LMMM (uint16_t x, uint16_t y, uint16_t w, uint16_t h, uint16_t x2, uint16_t y2, enum vdp_cmd_logop logop) |
MSX2 Executes VDP command "LMMM" (copy rectangular area w/ logical operation). | |
void | vdp_cmd_execute_HMMV (uint16_t x, uint16_t y, uint16_t w, uint16_t h, uint8_t color) |
MSX2 Executes VDP command "HMMV" (fills rectangular area). | |
void | vdp_cmd_execute_HMMM (uint16_t x, uint16_t y, uint16_t w, uint16_t h, uint16_t x2, uint16_t y2) |
MSX2 Executes VDP command "HMMM" (copy rectangular area). | |
void | vdp_cmd_execute_YMMM (uint16_t x, uint16_t y, uint16_t h, uint16_t y2, uint8_t dir) |
MSX2 Executes VDP command "YMMM" (copy rectangular area from VRAM to VRAM vertically). | |
void | vdp_cmd_set_SX (struct vdp_cmd *c, uint16_t sx) |
MSX2 Set SX value (x-coordinate of the source point) for VDP commands. | |
void | vdp_cmd_set_SY (struct vdp_cmd *c, uint16_t sy) |
MSX2 Set SY value (y-coordinate of the source point) for VDP commands. | |
void | vdp_cmd_set_DX (struct vdp_cmd *c, uint16_t dx) |
MSX2 Set DX value (x-coordinate of the destination point) for VDP commands. | |
void | vdp_cmd_set_DY (struct vdp_cmd *c, uint16_t dy) |
MSX2 Set DY value (y-coordinate of the destination point) for VDP commands. | |
void | vdp_cmd_set_NX (struct vdp_cmd *c, uint16_t nx) |
MSX2 Set NX value (width) for VDP commands. | |
void | vdp_cmd_set_NY (struct vdp_cmd *c, uint16_t ny) |
MSX2 Set NY value (height) for VDP commands. | |
void | vdp_cmd_set_CLR (struct vdp_cmd *c, uint8_t clr) |
MSX2 Set CLR value (color) for VDP commands. | |
void | vdp_cmd_set_ARG (struct vdp_cmd *c, uint8_t arg) |
MSX2 Set ARG value (DIX, DIY, etc.) for VDP commands. | |
void | vdp_cmd_set_logop (struct vdp_cmd *c, enum vdp_cmd_logop logop) |
MSX2 Set a logical operation code for VDP commands. | |
void | vdp_cmd_execute (const struct vdp_cmd *c, enum vdp_cmd_op opcode) |
MSX2 Executes a VDP command. | |
Data types and functions for VDP (Video Display Proccessor) access.
Definition in file vdp.h.