Add preliminary Osborne 1 SCREEN-PAC support

Select Standard or SCREEN-PAC video output in Machine Configuration
SCREEN-PAC is correctly detected, 104-column text is displayed
80-column display and scrolling in 104-column mode are likely broken
Based entirely on schematics since I have no real machine to compare to
This commit is contained in:
Vas Crabb 2015-10-27 01:12:43 +11:00
parent ff4a8e0b4c
commit 3275317261
3 changed files with 27 additions and 2 deletions

View File

@ -141,6 +141,11 @@ static INPUT_PORTS_START( osborne1 )
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNUSED)
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED)
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED)
PORT_START("CNF")
PORT_CONFNAME(0x01, 0x00, "Video Output")
PORT_CONFSETTING(0x00, "Standard")
PORT_CONFSETTING(0x01, "SCREEN-PAC")
INPUT_PORTS_END
@ -197,7 +202,7 @@ static MACHINE_CONFIG_START( osborne1, osborne1_state )
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_UPDATE_DRIVER(osborne1_state, screen_update)
MCFG_SCREEN_RAW_PARAMS( MAIN_CLOCK/2, 512, 0, 416, 260, 0, 240 )
MCFG_SCREEN_RAW_PARAMS( MAIN_CLOCK, 1024, 0, 832, 260, 0, 240 )
MCFG_SCREEN_PALETTE("palette")
MCFG_GFXDECODE_ADD("gfxdecode", "palette", osborne1)
MCFG_PALETTE_ADD_MONOCHROME_GREEN_HIGHLIGHT("palette")

View File

@ -47,6 +47,7 @@ public:
m_row5(*this, "ROW5"),
m_row6(*this, "ROW6"),
m_row7(*this, "ROW7"),
m_cnf(*this, "CNF"),
m_bank1(*this, "bank1"),
m_bank2(*this, "bank2"),
m_bank3(*this, "bank3"),
@ -93,6 +94,8 @@ public:
bool m_pia_0_irq_state;
bool m_pia_1_irq_state;
/* video related */
UINT8 m_screen_pac;
UINT8 m_resolution;
UINT8 m_new_start_x;
UINT8 m_new_start_y;
emu_timer *m_video_timer;
@ -115,6 +118,7 @@ protected:
required_ioport m_row5;
required_ioport m_row6;
required_ioport m_row7;
required_ioport m_cnf;
required_memory_bank m_bank1;
required_memory_bank m_bank2;
required_memory_bank m_bank3;

View File

@ -75,6 +75,9 @@ READ8_MEMBER( osborne1_state::osborne1_2000_r )
/* Row 7 */
if ( offset & 0x80 ) data &= m_row7->read();
break;
case 0x400: /* SCREEN-PAC */
if (m_screen_pac) data &= 0xFB;
break;
case 0x900: /* IEEE488 PIA */
data = m_pia0->read(space, offset & 0x03 );
break;
@ -108,6 +111,9 @@ WRITE8_MEMBER( osborne1_state::osborne1_2000_w )
case 0x100: /* Floppy */
m_fdc->write(space, offset & 0x03, data );
break;
case 0x400: /* SCREEN-PAC */
m_resolution = data & 0x01;
break;
case 0x900: /* IEEE488 PIA */
m_pia0->write(space, offset & 0x03, data );
break;
@ -358,7 +364,7 @@ TIMER_CALLBACK_MEMBER(osborne1_state::osborne1_video_callback)
ma = (m_new_start_y + (y/10)) * 128 + m_new_start_x;
UINT16 *p = &m_bitmap.pix16(y);
for ( x = 0; x < 52; x++ )
for ( x = 0; x < ((m_screen_pac && m_resolution) ? 104 : 52); x++ )
{
chr = m_ram->pointer()[ 0xF000 + ( (ma+x) & 0xFFF ) ];
dim = m_ram->pointer()[ 0x10000 + ( (ma+x) & 0xFFF ) ] & 0x80;
@ -370,13 +376,21 @@ TIMER_CALLBACK_MEMBER(osborne1_state::osborne1_video_callback)
/* Display a scanline of a character */
*p++ = BIT(gfx, 7) ? ( dim ? 2 : 1 ) : 0;
if (!m_screen_pac || !m_resolution) { p[0] = p[-1]; p++; }
*p++ = BIT(gfx, 6) ? ( dim ? 2 : 1 ) : 0;
if (!m_screen_pac || !m_resolution) { p[0] = p[-1]; p++; }
*p++ = BIT(gfx, 5) ? ( dim ? 2 : 1 ) : 0;
if (!m_screen_pac || !m_resolution) { p[0] = p[-1]; p++; }
*p++ = BIT(gfx, 4) ? ( dim ? 2 : 1 ) : 0;
if (!m_screen_pac || !m_resolution) { p[0] = p[-1]; p++; }
*p++ = BIT(gfx, 3) ? ( dim ? 2 : 1 ) : 0;
if (!m_screen_pac || !m_resolution) { p[0] = p[-1]; p++; }
*p++ = BIT(gfx, 2) ? ( dim ? 2 : 1 ) : 0;
if (!m_screen_pac || !m_resolution) { p[0] = p[-1]; p++; }
*p++ = BIT(gfx, 1) ? ( dim ? 2 : 1 ) : 0;
if (!m_screen_pac || !m_resolution) { p[0] = p[-1]; p++; }
*p++ = BIT(gfx, 0) ? ( dim ? 2 : 1 ) : 0;
if (!m_screen_pac || !m_resolution) { p[0] = p[-1]; p++; }
}
}
@ -409,6 +423,8 @@ void osborne1_state::machine_reset()
m_pia_1_irq_state = FALSE;
m_in_irq_handler = 0;
m_screen_pac = 0 != (m_cnf->read() & 0x01);
m_resolution = 0;
m_p_chargen = memregion( "chargen" )->base();
memset( m_ram->pointer() + 0x10000, 0xFF, 0x1000 );