src/mess/layout/h8.lay
| r9641 | r9642 | |
| 1 | 1 | <?xml version="1.0"?>
|
| 2 | 2 | <mamelayout version="2">
|
| 3 | | <element name="digit" defstate="0">
|
| 3 | <element name="digit">
|
| 4 | 4 | <led7seg>
|
| 5 | 5 | <color red="0.75" green="0.0" blue="0.0" />
|
| 6 | 6 | </led7seg>
|
| 7 | 7 | </element>
|
| 8 | <element name="red_led">
|
| 9 | <disk>
|
| 10 | <color red="1.0" green="0.0" blue="0.0" />
|
| 11 | </disk>
|
| 12 | </element>
|
| 8 | 13 | <element name="background">
|
| 9 | 14 | <rect>
|
| 10 | 15 | <bounds left="0" top="0" right="1" bottom="1" />
|
| r9641 | r9642 | |
| 12 | 17 | </rect>
|
| 13 | 18 | </element>
|
| 14 | 19 | |
| 15 | | <view name="Simple LCD">
|
| 20 | <view name="Heathkit H8">
|
| 16 | 21 | <!-- Black background -->
|
| 17 | 22 | <bezel element="background">
|
| 18 | 23 | <bounds left="1" top="1" right="600" bottom="480" />
|
| r9641 | r9642 | |
| 44 | 49 | <bezel name="digit9" element="digit">
|
| 45 | 50 | <bounds left="539" top="105" right="586" bottom="185" />
|
| 46 | 51 | </bezel>
|
| 52 | <bezel name="ion_led" element="red_led">
|
| 53 | <bounds left="40" right="55" top="100" bottom="118" />
|
| 54 | </bezel>
|
| 55 | <bezel name="mon_led" element="red_led">
|
| 56 | <bounds left="40" right="55" top="125" bottom="142" />
|
| 57 | </bezel>
|
| 58 | <bezel name="run_led" element="red_led">
|
| 59 | <bounds left="40" right="55" top="150" bottom="166" />
|
| 60 | </bezel>
|
| 61 | <bezel name="pwr_led" element="red_led">
|
| 62 | <bounds left="40" right="55" top="175" bottom="190" />
|
| 63 | </bezel>
|
| 47 | 64 | </view>
|
| 48 | 65 | </mamelayout>
|
src/mess/drivers/h8.c
| r9641 | r9642 | |
| 9 | 9 | |
| 10 | 10 | TODO: |
| 11 | 11 | - Proper artwork |
| 12 | | - Add status LEDs |
| 13 | 12 | - Add extra interrupt stuff |
| 14 | 13 | - Add load/dump facility (cassette port) |
| 15 | 14 | |
| r9641 | r9642 | |
| 62 | 61 | { |
| 63 | 62 | // this will always turn off int10 that was set by the timer |
| 64 | 63 | // d0-d3 = digit select |
| 65 | | // d4 = int20 (hi) |
| 66 | | // d5 = mon LED (lo) |
| 67 | | // d6 = int10 (lo) |
| 68 | | // d7 = beeper enable (lo) |
| 64 | // d4 = int20 |
| 65 | // d5 = mon LED |
| 66 | // d6 = int10 |
| 67 | // d7 = beeper enable |
| 69 | 68 | |
| 69 | cpu_set_input_line(space->machine->device("maincpu"), INPUT_LINE_IRQ0, CLEAR_LINE); |
| 70 | 70 | h8_digit = data & 15; |
| 71 | 71 | if (h8_digit) output_set_digit_value(h8_digit, h8_segment); |
| 72 | 72 | //if (~data & 0x40) h8_irqset(space->machine, 160, 0xcf); |
| 73 | 73 | //if (data & 0x10) h8_irqset(space->machine, 160, 0xd7); |
| 74 | | |
| 75 | | cpu_set_input_line(space->machine->device("maincpu"), INPUT_LINE_IRQ0, CLEAR_LINE); |
| 74 | output_set_value("mon_led",(data & 0x20) ? 0 : 1); |
| 76 | 75 | beep_set_state(h8_beeper, (data & 0x80) ? 0 : 1); |
| 77 | 76 | } |
| 78 | 77 | |
| r9641 | r9642 | |
| 94 | 93 | static ADDRESS_MAP_START(h8_mem, ADDRESS_SPACE_PROGRAM, 8) |
| 95 | 94 | ADDRESS_MAP_UNMAP_HIGH |
| 96 | 95 | AM_RANGE(0x0000, 0x03ff) AM_ROM |
| 97 | | AM_RANGE(0x2000, 0xffff) AM_RAM |
| 96 | AM_RANGE(0x2000, 0x9fff) AM_RAM |
| 98 | 97 | ADDRESS_MAP_END |
| 99 | 98 | |
| 100 | 99 | static ADDRESS_MAP_START( h8_io , ADDRESS_SPACE_IO, 8) |
| r9641 | r9642 | |
| 136 | 135 | { |
| 137 | 136 | h8_beeper = machine->device("beep"); |
| 138 | 137 | beep_set_frequency(h8_beeper, H8_BEEP_FRQ); |
| 138 | output_set_value("pwr_led", 0); |
| 139 | 139 | } |
| 140 | 140 | |
| 141 | 141 | static WRITE_LINE_DEVICE_HANDLER( h8_inte_callback ) |
| 142 | 142 | { |
| 143 | 143 | // operate the ION LED |
| 144 | output_set_value("ion_led",(state) ? 0 : 1); |
| 144 | 145 | } |
| 145 | 146 | |
| 146 | 147 | static WRITE8_DEVICE_HANDLER( h8_status_callback ) |
| 147 | 148 | { |
| 148 | | if (data & I8085_STATUS_INTA) |
| 149 | | { |
| 150 | | // This is when the vector is presented to the CPU |
| 151 | | } |
| 152 | | if (data & I8085_STATUS_M1) |
| 153 | | { |
| 154 | 149 | // operate the RUN LED |
| 155 | | } |
| 150 | output_set_value("run_led", (data & I8085_STATUS_M1) ? 1 : 0); |
| 156 | 151 | } |
| 157 | 152 | |
| 158 | 153 | static I8085_CONFIG( h8_cpu_config ) |