src/mess/drivers/glasgow.c
| r10440 | r10441 | |
| 132 | 132 | static WRITE16_HANDLER( write_lcd_flag ) |
| 133 | 133 | { |
| 134 | 134 | glasgow_state *state = space->machine->driver_data<glasgow_state>(); |
| 135 | | UINT8 lcd_flag; |
| 135 | // UINT8 lcd_flag; |
| 136 | 136 | 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) { |
| 140 | 140 | 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 |
| 147 | 141 | state->led7 = 0; |
| 142 | } else { |
| 143 | state->led7 = 0xff; |
| 144 | } |
| 148 | 145 | |
| 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 | // |
| 149 | 153 | logerror("LCD Flag 16 = %x \n", data); |
| 150 | 154 | } |
| 151 | 155 | |
| r10440 | r10441 | |
| 203 | 207 | static WRITE32_HANDLER( write_lcd_flag32 ) |
| 204 | 208 | { |
| 205 | 209 | glasgow_state *state = space->machine->driver_data<glasgow_state>(); |
| 206 | | UINT8 lcd_flag = data >> 24; |
| 210 | // UINT8 lcd_flag = data >> 24; |
| 207 | 211 | |
| 208 | 212 | mboard_lcd_invert = 0; |
| 209 | 213 | |
| 210 | | if (lcd_flag == 0) |
| 214 | if ((data >> 24) == 0) { |
| 211 | 215 | mboard_key_selector = 1; |
| 216 | state->led7 = 0; |
| 217 | } else { |
| 218 | state->led7 = 0xff; |
| 219 | } |
| 212 | 220 | |
| 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); |
| 215 | 223 | |
| 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; |
| 220 | 228 | } |
| 221 | 229 | |
| 222 | 230 | static READ32_HANDLER( read_newkeys32 ) // Dallas 32, Roma 32 |
| r10440 | r10441 | |
| 254 | 262 | |
| 255 | 263 | static TIMER_DEVICE_CALLBACK( update_nmi ) |
| 256 | 264 | { |
| 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); |
| 261 | 266 | } |
| 262 | 267 | |
| 263 | | static TIMER_CALLBACK( update_nmi32 ) |
| 268 | static TIMER_DEVICE_CALLBACK( update_nmi32 ) |
| 264 | 269 | { |
| 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); |
| 269 | 271 | } |
| 270 | 272 | |
| 271 | 273 | static MACHINE_START( glasgow ) |
| r10440 | r10441 | |
| 290 | 292 | state->lcd_shift_counter = 3; |
| 291 | 293 | beep_set_frequency(speaker, 44); |
| 292 | 294 | |
| 293 | | machine->scheduler().timer_pulse(attotime::from_hz(50),FUNC(update_nmi32),0); |
| 294 | | |
| 295 | 295 | mboard_savestate_register(machine); |
| 296 | 296 | } |
| 297 | 297 | |
| r10440 | r10441 | |
| 525 | 525 | MCFG_MACHINE_START( dallas32 ) |
| 526 | 526 | |
| 527 | 527 | MCFG_DEVICE_REMOVE("nmi_timer") |
| 528 | MCFG_TIMER_ADD_PERIODIC("nmi_timer", update_nmi32, attotime::from_hz(50)) |
| 528 | 529 | |
| 529 | 530 | MACHINE_CONFIG_END |
| 530 | 531 | |