diff options
author | cracyc <cracyc@users.noreply.github.com> | 2015-09-14 13:18:01 -0500 |
---|---|---|
committer | cracyc <cracyc@users.noreply.github.com> | 2015-09-14 13:18:01 -0500 |
commit | 26ee73a1225422fe3d44a1415ec885a79b73849d (patch) | |
tree | 50169f403da1e93d1d1aaea895dfdab0ce71e950 /src/mess/video | |
parent | 997c5b1ca1fb1f4628bfab8862d04ea452403dc0 (diff) |
pcd: reverse video (nw)
pc9801: configurable ide support (nw)
Diffstat (limited to 'src/mess/video')
-rw-r--r-- | src/mess/video/pcd.c | 9 | ||||
-rw-r--r-- | src/mess/video/pcd.h | 3 |
2 files changed, 10 insertions, 2 deletions
diff --git a/src/mess/video/pcd.c b/src/mess/video/pcd.c index 991a646b2c7..2ae4029c14a 100644 --- a/src/mess/video/pcd.c +++ b/src/mess/video/pcd.c @@ -112,7 +112,7 @@ static ADDRESS_MAP_START( pcx_vid_io, AS_IO, 8, pcx_video_device ) AM_RANGE(0xa000, 0xa001) AM_READWRITE(vram_latch_r, vram_latch_w) AM_RANGE(0xa002, 0xa003) AM_READWRITE(term_mcu_r, term_mcu_w) AM_RANGE(0xc000, 0xc7ff) AM_RAM - AM_RANGE(MCS51_PORT_P1, MCS51_PORT_P1) AM_NOP // revisit this + AM_RANGE(MCS51_PORT_P1, MCS51_PORT_P1) AM_WRITE(p1_w) ADDRESS_MAP_END static ADDRESS_MAP_START( pcx_vram, AS_0, 8, pcx_video_device ) @@ -174,6 +174,8 @@ SCN2674_DRAW_CHARACTER_MEMBER(pcx_video_device::display_pixels) data = m_charrom[m_vram[address] * 16 + linecount + (m_vram[address + 1] & 0x20 ? 4096 : 0)]; if(cursor && blink) data = 0xff; + if(m_p1 & 0x20) + data = ~data; for(int i = 0; i < 8; i++) bitmap.pix32(y, x + i) = m_palette->pen((data & (1 << (7 - i))) ? 1 : 0); } @@ -299,6 +301,11 @@ READ8_MEMBER(pcx_video_device::unk_r) return 0x80; } +WRITE8_MEMBER(pcx_video_device::p1_w) +{ + m_p1 = data; +} + void pcd_video_device::device_start() { m_maincpu->space(AS_IO).install_readwrite_handler(0xfb00, 0xfb01, 0, 0, read8_delegate(FUNC(pcdx_video_device::detect_r), this), write8_delegate(FUNC(pcdx_video_device::detect_w), this), 0xff00); diff --git a/src/mess/video/pcd.h b/src/mess/video/pcd.h index dabd206b9d2..817e23d0b1a 100644 --- a/src/mess/video/pcd.h +++ b/src/mess/video/pcd.h @@ -71,6 +71,7 @@ public: DECLARE_READ8_MEMBER(vram_latch_r); DECLARE_WRITE8_MEMBER(vram_latch_w); DECLARE_READ8_MEMBER(unk_r); + DECLARE_WRITE8_MEMBER(p1_w); virtual const rom_entry *device_rom_region() const; virtual machine_config_constructor device_mconfig_additions() const; @@ -86,7 +87,7 @@ private: required_region_ptr<UINT8> m_charrom; required_device<pic8259_device> m_pic2; devcb_write_line m_txd_handler; - UINT8 m_term_key, m_term_char, m_term_stat, m_vram_latch_r[2], m_vram_latch_w[2]; + UINT8 m_term_key, m_term_char, m_term_stat, m_vram_latch_r[2], m_vram_latch_w[2], m_p1; }; extern const device_type PCD_VIDEO; |