Previous 199869 Revisions Next

r41412 Wednesday 28th October, 2015 at 05:27:50 UTC by Vasantha Crabb
osborne1 hack until we can get bank selection working properly
[src/mame/drivers]osborne1.c
[src/mame/machine]osborne1.c

trunk/src/mame/drivers/osborne1.c
r249923r249924
383803 - Clear BIT 9 signal (map bank 1/2 into F000-FFFF)
3939
4040TODO:
41  - Implement ROM/IO bank selection properly
4142  - Implement serial port
43  - Implement reset key (generates NMI and affects bank selection)
4244  - Verify frequency of the beep/audio alarm.
4345
4446***************************************************************************/
trunk/src/mame/machine/osborne1.c
r249923r249924
9797
9898WRITE8_MEMBER( osborne1_state::osborne1_2000_w )
9999{
100#if 0
100101   /* Check whether regular RAM is enabled */
101102   if ( !m_bank2_enabled ||  (m_in_irq_handler && m_bankswitch == RAMMODE) )
102103   {
r249923r249924
119120      if ( 0xC00 == (offset & 0xC00) ) /* Video PIA */
120121         m_pia1->write(space, offset & 0x03, data);
121122   }
123#else
124   // This code is a nasty hack that doesn't reflect hardware operation,
125   // but it gets us by while the bank selection implementation is inadequate
126   if ( ! m_bank2_enabled )
127   {
128      m_ram->pointer()[ 0x2000 + offset ] = data;
129   }
130   else
131   {
132      if ( m_in_irq_handler && m_bankswitch == RAMMODE )
133      {
134         m_ram->pointer()[ 0x2000 + offset ] = data;
135      }
136      /* Handle writes to the I/O area */
137      switch( offset & 0x1F00 )
138      {
139      case 0x100: /* Floppy */
140         m_fdc->write(space, offset & 0x03, data);
141         break;
142      case 0x400: /* SCREEN-PAC */
143         m_resolution = data & 0x01;
144         m_hc_left = (data >> 1) & 0x01;
145         break;
146      case 0x900: /* IEEE488 PIA */
147         m_pia0->write(space, offset & 0x03, data );
148         break;
149      case 0xA00: /* Serial */
150         break;
151      case 0xC00: /* Video PIA */
152         m_pia1->write(space, offset & 0x03, data );
153         break;
154      }
155   }
156#endif
122157}
123158
124159
r249923r249924
393428
394429void osborne1_state::machine_reset()
395430{
396   address_space& space = m_maincpu->space(AS_PROGRAM);
397431   /* Initialize memory configuration */
398   osborne1_bankswitch_w( space, 0x00, 0 );
432   osborne1_bankswitch_w( m_maincpu->space(AS_IO), 0x00, 0 );
399433
400434   m_pia_0_irq_state = FALSE;
401435   m_pia_1_irq_state = FALSE;
r249923r249924
408442
409443   memset( m_ram->pointer() + 0x10000, 0xFF, 0x1000 );
410444
445   address_space& space = m_maincpu->space(AS_PROGRAM);
411446   space.set_direct_update_handler(direct_update_delegate(FUNC(osborne1_state::osborne1_opbase), this));
412447}
413448
r249923r249924
487522   osborne1_state *state = machine().driver_data<osborne1_state>();
488523   /* Enable ROM and I/O when IRQ is acknowledged */
489524   UINT8 old_bankswitch = state->m_bankswitch;
490   address_space& space = state->m_maincpu->space(AS_PROGRAM);
491525
492   state->osborne1_bankswitch_w( space, 0, 0 );
526   state->osborne1_bankswitch_w( state->m_maincpu->space(AS_IO), 0, 0 );
493527   state->m_bankswitch = old_bankswitch;
494528   state->m_in_irq_handler = 1;
495529   return 0xF8;


Previous 199869 Revisions Next


© 1997-2024 The MAME Team