src/mess/drivers/h8.c
| r9639 | r9640 | |
| 10 | 10 | TODO: |
| 11 | 11 | - Proper artwork |
| 12 | 12 | - Add status LEDs |
| 13 | | - Add beeper |
| 14 | 13 | - Add extra interrupt stuff |
| 15 | 14 | - Assign more appropriate keys |
| 15 | - Add load/dump facility (cassette port) |
| 16 | 16 | |
| 17 | 17 | ****************************************************************************/ |
| 18 | 18 | |
| 19 | 19 | #include "emu.h" |
| 20 | 20 | #include "cpu/i8085/i8085.h" |
| 21 | #include "sound/beep.h" |
| 21 | 22 | #include "h8.lh" |
| 22 | 23 | |
| 23 | 24 | #define H8_CLOCK (XTAL_12_288MHz / 6) |
| r9639 | r9640 | |
| 26 | 27 | |
| 27 | 28 | static UINT8 h8_digit; |
| 28 | 29 | static UINT8 h8_segment; |
| 30 | static running_device *h8_beeper; |
| 29 | 31 | |
| 30 | | |
| 31 | 32 | static TIMER_DEVICE_CALLBACK( h8_irq_pulse ) |
| 32 | 33 | { |
| 33 | 34 | cpu_set_input_line_and_vector(timer.machine->device("maincpu"), INPUT_LINE_IRQ0, ASSERT_LINE, 0xcf); |
| r9639 | r9640 | |
| 60 | 61 | |
| 61 | 62 | static WRITE8_HANDLER( h8_f0_w ) |
| 62 | 63 | { |
| 64 | // this will always turn off int10 that was set by the timer |
| 63 | 65 | // d0-d3 = digit select |
| 64 | 66 | // d4 = int20 (hi) |
| 65 | 67 | // d5 = mon LED (lo) |
| 66 | 68 | // d6 = int10 (lo) |
| 67 | | // d7 = beeper enable (hi) |
| 69 | // d7 = beeper enable (lo) |
| 68 | 70 | |
| 69 | 71 | h8_digit = data & 15; |
| 70 | 72 | if (h8_digit) output_set_digit_value(h8_digit, h8_segment); |
| r9639 | r9640 | |
| 72 | 74 | //if (data & 0x10) h8_irqset(space->machine, 160, 0xd7); |
| 73 | 75 | |
| 74 | 76 | cpu_set_input_line(space->machine->device("maincpu"), INPUT_LINE_IRQ0, CLEAR_LINE); |
| 77 | beep_set_state(h8_beeper, (data & 0x80) ? 0 : 1); |
| 75 | 78 | } |
| 76 | 79 | |
| 77 | 80 | static WRITE8_HANDLER( h8_f1_w ) |
| r9639 | r9640 | |
| 132 | 135 | |
| 133 | 136 | static MACHINE_RESET(h8) |
| 134 | 137 | { |
| 138 | h8_beeper = machine->device("beep"); |
| 139 | beep_set_frequency(h8_beeper, H8_BEEP_FRQ); |
| 135 | 140 | } |
| 136 | 141 | |
| 137 | 142 | static WRITE_LINE_DEVICE_HANDLER( h8_inte_callback ) |
| r9639 | r9640 | |
| 171 | 176 | |
| 172 | 177 | /* video hardware */ |
| 173 | 178 | MDRV_DEFAULT_LAYOUT(layout_h8) |
| 179 | |
| 180 | /* sound hardware */ |
| 181 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 182 | MDRV_SOUND_ADD("beep", BEEP, 0) |
| 183 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) |
| 174 | 184 | MACHINE_CONFIG_END |
| 175 | 185 | |
| 176 | 186 | /* ROM definition */ |
| r9639 | r9640 | |
| 190 | 200 | /* Driver */ |
| 191 | 201 | |
| 192 | 202 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */ |
| 193 | | COMP( 1977, h8, 0, 0, h8, h8, 0, "Heath, Inc.", "Heathkit H8", GAME_NOT_WORKING | GAME_NO_SOUND) |
| 203 | COMP( 1977, h8, 0, 0, h8, h8, 0, "Heath, Inc.", "Heathkit H8", GAME_NOT_WORKING ) |