Previous 15994 Revisions Next

r10441 Tuesday 15th February, 2011 at 00:35:25 UTC by Cowering
A few cleanups
[src/mess/drivers]glasgow.c

src/mess/drivers/glasgow.c
r10440r10441
132132static WRITE16_HANDLER( write_lcd_flag )
133133{
134134   glasgow_state *state = space->machine->driver_data<glasgow_state>();
135   UINT8 lcd_flag;
135//   UINT8 lcd_flag;
136136   mboard_lcd_invert = 0;
137   lcd_flag=data >> 8;
138   //beep_set_state(0, lcd_flag & 1 ? 1 : 0);
139   if (lcd_flag == 0)
137//   lcd_flag=data >> 8;
138   //beep_set_state(0, (data >> 8) & 1 ? 1 : 0);
139   if ((data >> 8) == 0) {
140140      mboard_key_selector = 1;
141
142 // The key function in the rom expects after writing to
143 // the  a value from the second key row;
144   if (lcd_flag != 0)
145      state->led7 = 255;
146   else
147141      state->led7 = 0;
142   } else {
143      state->led7 = 0xff;
144   }
148145
146//  The key function in the rom expects after writing to
147//  the  a value from the second key row;
148//   if (lcd_flag != 0)
149//      state->led7 = 255;
150//   else
151//      state->led7 = 0;
152//
149153   logerror("LCD Flag 16 = %x \n", data);
150154}
151155
r10440r10441
203207static WRITE32_HANDLER( write_lcd_flag32 )
204208{
205209   glasgow_state *state = space->machine->driver_data<glasgow_state>();
206   UINT8 lcd_flag = data >> 24;
210//   UINT8 lcd_flag = data >> 24;
207211
208212   mboard_lcd_invert = 0;
209213
210   if (lcd_flag == 0)
214   if ((data >> 24) == 0) {
211215      mboard_key_selector = 1;
216      state->led7 = 0;
217   } else {
218      state->led7 = 0xff;
219   }
212220
213   //logerror("LCD Flag 32 = %x \n", lcd_flag);
214   //beep_set_state(0, lcd_flag & 1 ? 1 : 0);
221   //logerror("LCD Flag 32 = %x \n", data >> 24);
222   //beep_set_state(0, (data >> 24) & 1 ? 1 : 0);
215223
216   if (lcd_flag != 0)
217      state->led7 = 255;
218   else
219      state->led7 = 0;
224//   if (lcd_flag != 0)
225//      state->led7 = 255;
226//   else
227//      state->led7 = 0;
220228}
221229
222230static READ32_HANDLER( read_newkeys32 ) // Dallas 32, Roma 32
r10440r10441
254262
255263static TIMER_DEVICE_CALLBACK( update_nmi )
256264{
257   //cputag_set_input_line_and_vector(timer.machine, "maincpu", M68K_IRQ_7, irq_edge & 0xff ? CLEAR_LINE : ASSERT_LINE, M68K_INT_ACK_AUTOVECTOR);
258      cputag_set_input_line_and_vector(timer.machine, "maincpu", M68K_IRQ_7, ASSERT_LINE, M68K_INT_ACK_AUTOVECTOR);
259      cputag_set_input_line_and_vector(timer.machine, "maincpu", M68K_IRQ_7, CLEAR_LINE, M68K_INT_ACK_AUTOVECTOR);
260   // irq_edge = ~irq_edge;
265   cputag_set_input_line(timer.machine, "maincpu", 7, HOLD_LINE);
261266}
262267
263static TIMER_CALLBACK( update_nmi32 )
268static TIMER_DEVICE_CALLBACK( update_nmi32 )
264269{
265   // cputag_set_input_line_and_vector(timer.machine, "maincpu", M68K_IRQ_7, irq_edge & 0xff ? CLEAR_LINE : ASSERT_LINE, M68K_INT_ACK_AUTOVECTOR);
266      cputag_set_input_line_and_vector(machine, "maincpu", M68K_IRQ_7, ASSERT_LINE, M68K_INT_ACK_AUTOVECTOR);
267      cputag_set_input_line_and_vector(machine, "maincpu", M68K_IRQ_7, CLEAR_LINE, M68K_INT_ACK_AUTOVECTOR);
268   // irq_edge = ~irq_edge;
270   cputag_set_input_line(timer.machine, "maincpu", 6, HOLD_LINE);
269271}
270272
271273static MACHINE_START( glasgow )
r10440r10441
290292   state->lcd_shift_counter = 3;
291293   beep_set_frequency(speaker, 44);
292294
293   machine->scheduler().timer_pulse(attotime::from_hz(50),FUNC(update_nmi32),0);
294
295295   mboard_savestate_register(machine);
296296}
297297
r10440r10441
525525    MCFG_MACHINE_START( dallas32 )
526526
527527   MCFG_DEVICE_REMOVE("nmi_timer")
528   MCFG_TIMER_ADD_PERIODIC("nmi_timer", update_nmi32, attotime::from_hz(50))
528529
529530MACHINE_CONFIG_END
530531

Previous 15994 Revisions Next


© 1998-2018 The MESS Team