diff options
author | Mike Pavone <pavone@retrodev.com> | 2013-05-24 00:26:27 -0700 |
---|---|---|
committer | Mike Pavone <pavone@retrodev.com> | 2013-05-24 00:26:27 -0700 |
commit | 124a009d29c98d2f0eae2f9eafcbbf80aa42c348 (patch) | |
tree | c8e536c7b90797dda95a85f178b198f99f0d76f9 /blastem.c | |
parent | c4311b6471fa5d884eafb4adb835e4e0516c7c96 (diff) |
Allow VDP/PSG writes from Z80
Diffstat (limited to 'blastem.c')
-rw-r--r-- | blastem.c | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -333,7 +333,14 @@ m68k_context * vdp_port_write(uint32_t vdp_port, m68k_context * context, uint16_ m68k_context * vdp_port_write_b(uint32_t vdp_port, m68k_context * context, uint8_t value) { - return vdp_port_write(vdp_port, context, vdp_port < 0x10 ? value | value << 8 : value); + return vdp_port_write(vdp_port, context, vdp_port < 0x10 ? value | value << 8 : ((vdp_port & 1) ? value : 0)); +} + +z80_context * z80_vdp_port_write(uint16_t vdp_port, z80_context * context, uint8_t value) +{ + genesis_context * gen = context->system; + vdp_port_write_b(vdp_port, gen->m68k, value); + return context; } uint16_t vdp_port_read(uint32_t vdp_port, m68k_context * context) |