Previous 15994 Revisions Next

r9829 Monday 27th December, 2010 at 20:48:06 UTC by Wilbert Pol
[OSBEXEC] Enabled some more bits including keyboard.
[src/mess/drivers]osbexec.c

src/mess/drivers/osbexec.c
r9828r9829
7171   UINT8   pia0_porta;
7272   UINT8   pia0_portb;
7373   int      pia0_irq_state;
74   int      pia0_cb2;         /* 60/50 */
7475
7576   /* PIA 1 (UD8) */
7677   int      pia1_irq_state;
r9828r9829
119120}
120121
121122
123static READ8_HANDLER( osbexec_kbd_r )
124{
125   UINT8 data = 0xFF;
126
127   if ( offset & 0x0100 )
128      data &= input_port_read( space->machine, "ROW0" );
129
130   if ( offset & 0x0200 )
131      data &= input_port_read( space->machine, "ROW1" );
132
133   if ( offset & 0x0400 )
134      data &= input_port_read( space->machine, "ROW2" );
135
136   if ( offset & 0x0800 )
137      data &= input_port_read( space->machine, "ROW3" );
138
139   if ( offset & 0x1000 )
140      data &= input_port_read( space->machine, "ROW4" );
141
142   if ( offset & 0x2000 )
143      data &= input_port_read( space->machine, "ROW5" );
144
145   if ( offset & 0x4000 )
146      data &= input_port_read( space->machine, "ROW6" );
147
148   if ( offset & 0x8000 )
149      data &= input_port_read( space->machine, "ROW7" );
150
151   return data;
152}
153
154
122155static READ8_HANDLER( osbexec_rtc_r )
123156{
124157   osbexec_state *state = space->machine->driver_data<osbexec_state>();
r9828r9829
139172
140173static ADDRESS_MAP_START( osbexec_io, ADDRESS_SPACE_IO, 8 )
141174   ADDRESS_MAP_UNMAP_HIGH
142   ADDRESS_MAP_GLOBAL_MASK(0xff)
143   AM_RANGE( 0x00, 0x03 ) AM_DEVREADWRITE( "pia_0", pia6821_r, pia6821_w )      /* 6821 PIA @ UD12 */
175   AM_RANGE( 0x00, 0x03 ) AM_MIRROR( 0xff00 ) AM_DEVREADWRITE( "pia_0", pia6821_r, pia6821_w )            /* 6821 PIA @ UD12 */
144176   /* 0x04 - 0x07 - 8253 @UD1 */
145   /* 0x08 - 0x0B - MB8877 @UB17 */
146   AM_RANGE( 0x0C, 0x0F ) AM_DEVREADWRITE( "sio", z80dart_ba_cd_r, z80dart_ba_cd_w )   /* SIO @ UD4 */
147   /* 0x10 - 0x13 - 6821 PIA @UD8 */
148   /* 0x14 - 0x17 - kbd */
149   AM_RANGE( 0x18, 0x1b ) AM_READ( osbexec_rtc_r )                        /* "RTC" @ UE13/UF13 */
177   AM_RANGE( 0x08, 0x0B ) AM_MIRROR( 0xff00 ) AM_DEVREADWRITE( "mb8877", wd17xx_r, wd17xx_w )            /* MB8877 @ UB17 input clock = 1MHz */
178   AM_RANGE( 0x0C, 0x0F ) AM_MIRROR( 0xff00 ) AM_DEVREADWRITE( "sio", z80dart_ba_cd_r, z80dart_ba_cd_w )   /* SIO @ UD4 */
179   AM_RANGE( 0x10, 0x13 ) AM_MIRROR( 0xff00 ) AM_DEVREADWRITE( "pia_1", pia6821_r, pia6821_w )            /* 6821 PIA @ UD8 */
180   AM_RANGE( 0x14, 0x17 ) AM_MIRROR( 0xff00 ) AM_MASK( 0xff00 ) AM_READ( osbexec_kbd_r )               /* KBD */
181   AM_RANGE( 0x18, 0x1b ) AM_MIRROR( 0xff00 ) AM_READ( osbexec_rtc_r )                              /* "RTC" @ UE13/UF13 */
150182   /* ?? - vid ? */
151183ADDRESS_MAP_END
152184
r9828r9829
311343}
312344
313345
346static WRITE_LINE_DEVICE_HANDLER( osbexec_pia0_ca2_w )
347{
348   logerror("osbexec_pia0_ca2_w: state = %d\n", state);
349}
350
351
352static WRITE_LINE_DEVICE_HANDLER( osbexec_pia0_cb2_w )
353{
354   osbexec_state *st = device->machine->driver_data<osbexec_state>();
355
356   st->pia0_cb2 = state;
357}
358
359
314360static WRITE_LINE_DEVICE_HANDLER( osbexec_pia0_irq )
315361{
316362   osbexec_state *st = device->machine->driver_data<osbexec_state>();
r9828r9829
330376   DEVCB_NULL,                     /* in_cb2_func */
331377   DEVCB_HANDLER( osbexec_pia0_a_w ),   /* out_a_func */      /* port A - banking */
332378   DEVCB_HANDLER( osbexec_pia0_b_w ),   /* out_b_func */      /* modem / speaker */
333   DEVCB_NULL,                     /* out_ca2_func */      /* Keyboard strobe */
334   DEVCB_NULL,                     /* out_cb2_func */      /* 60/50 */
379   DEVCB_LINE( osbexec_pia0_ca2_w ),   /* out_ca2_func */      /* Keyboard strobe */
380   DEVCB_LINE( osbexec_pia0_cb2_w ),   /* out_cb2_func */      /* 60/50 */
335381   DEVCB_LINE( osbexec_pia0_irq ),      /* irq_a_func */      /* IRQ */
336382   DEVCB_LINE( osbexec_pia0_irq )      /* irq_b_func */      /* IRQ */
337383};
r9828r9829
385431};
386432
387433
434static const wd17xx_interface osbexec_wd17xx_interface =
435{
436   DEVCB_NULL,
437   DEVCB_DEVICE_LINE( "pia1", pia6821_cb1_w ),
438   DEVCB_NULL,
439   { FLOPPY_0, FLOPPY_1, NULL, NULL}
440};
441
442
388443/*
389444 * The Osborne Executive supports the following disc formats: (TODO: Verify)
390445 * - Osborne single density: 40 tracks, 10 sectors per track, 256-byte sectors (100 KByte)

Previous 15994 Revisions Next


© 1998-2018 The MESS Team