From a11aebba8dec579265cb326bb75d16886a287f61 Mon Sep 17 00:00:00 2001 From: cracyc Date: Thu, 26 Feb 2015 14:40:51 -0600 Subject: (mess) pcd: cursor and floppy 2 (nw) --- src/emu/video/scn2674.c | 8 ++------ src/emu/video/scn2674.h | 1 - src/mess/drivers/pcd.c | 9 ++++++++- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/emu/video/scn2674.c b/src/emu/video/scn2674.c index 025dd231f2c..33f9f1efa90 100644 --- a/src/emu/video/scn2674.c +++ b/src/emu/video/scn2674.c @@ -694,8 +694,7 @@ void scn2674_device::device_timer(emu_timer &timer, device_timer_id id, int para for(int i = 0; i < m_IR5_character_per_row; i++) { - if((address & 0x3fff) == ((m_cursor_h << 8) | m_cursor_l)) - m_cursor_on = true; + bool cursor_on = ((address & 0x3fff) == ((m_cursor_h << 8) | m_cursor_l)); if (!m_display_cb.isnull()) m_display_cb(m_bitmap, @@ -704,7 +703,7 @@ void scn2674_device::device_timer(emu_timer &timer, device_timer_id id, int para tilerow, space().read_byte(address), address, - (charrow >= m_IR6_cursor_first_scanline) && m_cursor_on, + (charrow >= m_IR6_cursor_first_scanline) && (charrow <= m_IR6_cursor_last_scanline) && cursor_on, dw != 0, m_gfx_enabled != 0, charrow == m_IR7_cursor_underline_position, @@ -715,9 +714,6 @@ void scn2674_device::device_timer(emu_timer &timer, device_timer_id id, int para address = (m_IR9_display_buffer_first_address_MSB << 8) | m_IR8_display_buffer_first_address_LSB; } - if(charrow == m_IR6_cursor_last_scanline) - m_cursor_on = false; - if(m_gfx_enabled || (charrow == (m_IR0_scanline_per_char_row - 1))) m_address = address; } diff --git a/src/emu/video/scn2674.h b/src/emu/video/scn2674.h index 02efaf80fe1..9a64eba0d83 100644 --- a/src/emu/video/scn2674.h +++ b/src/emu/video/scn2674.h @@ -105,7 +105,6 @@ private: UINT8 m_dbl1; int m_linecounter; UINT16 m_address; - bool m_cursor_on; UINT8 m_irq_state; diff --git a/src/mess/drivers/pcd.c b/src/mess/drivers/pcd.c index ea291b161f6..f0ace2cec0e 100644 --- a/src/mess/drivers/pcd.c +++ b/src/mess/drivers/pcd.c @@ -250,6 +250,8 @@ WRITE16_MEMBER( pcd_state::dskctl_w ) if((m_dskctl & 1) && floppy0) m_fdc->set_floppy(floppy0); + if((m_dskctl & 2) && floppy1) + m_fdc->set_floppy(floppy1); if(floppy0) { @@ -292,6 +294,8 @@ SCN2674_DRAW_CHARACTER_MEMBER(pcd_state::display_pixels) else { UINT8 data = m_charram[(m_vram[address] & 0xff) * 16 + linecount]; + if(cursor && blink) + data = 0xff; for(int i = 0; i < 8; i++) bitmap.pix32(y, x + i) = m_palette->pen((data & (1 << (7 - i))) ? 1 : 0); } @@ -397,7 +401,7 @@ WRITE_LINE_MEMBER(pcd_state::write_scsi_req) //************************************************************************** static ADDRESS_MAP_START( pcd_map, AS_PROGRAM, 16, pcd_state ) - AM_RANGE(0x00000, 0x3ffff) AM_RAM // fixed 256k for now + AM_RANGE(0x00000, 0x7ffff) AM_RAM // fixed 512k for now AM_RANGE(0xf0000, 0xf7fff) AM_READONLY AM_WRITE(vram_w) AM_SHARE("vram") AM_RANGE(0xfc000, 0xfffff) AM_ROM AM_REGION("bios", 0) AM_RANGE(0x00000, 0xfffff) AM_READWRITE8(nmi_io_r, nmi_io_w, 0xffff) @@ -449,6 +453,9 @@ static MACHINE_CONFIG_START( pcd, pcd_state ) MCFG_80186_TMROUT1_HANDLER(WRITELINE(pcd_state, i186_timer1_w)) MCFG_80186_IRQ_SLAVE_ACK(READ8(pcd_state, irq_callback)) + MCFG_CPU_ADD("graphics", I8741, XTAL_16MHz/2) + MCFG_DEVICE_DISABLE() + MCFG_TIMER_DRIVER_ADD_PERIODIC("timer0_tick", pcd_state, timer0_tick, attotime::from_hz(XTAL_16MHz / 24)) // adjusted to pass post MCFG_PIC8259_ADD("pic1", DEVWRITELINE("maincpu", i80186_cpu_device, int0_w), VCC, NULL) -- cgit v1.2.3