collapseos/emul/z80/sms_vdp.h
Virgil Dupras 09c01c4a43 emul/z80: extract tms9918 unit from sms_vdp
I'm planning on supporting Text Mode soon, and SMS' VDP, when mode
4 is not active, behaves mostly like a regular TMS9918.

By having this behavior in a separate unit, we'll be able to use it
in other systems.
2020-11-12 11:13:18 -05:00

17 lines
369 B
C

#include "tms9918.h"
#define VDP_CRAM_SIZE 0x20
#define VDP_SCREENW (32*8)
#define VDP_SCREENH (24*8)
typedef struct {
TMS9918 tms;
uint8_t cram[VDP_CRAM_SIZE];
} VDP;
void vdp_init(VDP *vdp);
void vdp_cmd_wr(VDP *vdp, uint8_t val);
uint8_t vdp_data_rd(VDP *vdp);
void vdp_data_wr(VDP *vdp, uint8_t val);
uint8_t vdp_pixel(VDP *vdp, uint16_t x, uint16_t y);