Previous 15994 Revisions Next

r9642 Tuesday 23rd November, 2010 at 07:16:13 UTC by Robbbert
[H8] Added status LEDs. RAM set to the max physically possible.
[src/mess/drivers]h8.c
[src/mess/layout]h8.lay

src/mess/layout/h8.lay
r9641r9642
11<?xml version="1.0"?>
22<mamelayout version="2">
3   <element name="digit" defstate="0">
3   <element name="digit">
44      <led7seg>
55         <color red="0.75" green="0.0" blue="0.0" />
66      </led7seg>
77   </element>
8   <element name="red_led">
9      <disk>
10         <color red="1.0" green="0.0" blue="0.0" />
11      </disk>
12   </element>
813   <element name="background">
914      <rect>
1015         <bounds left="0" top="0" right="1" bottom="1" />
r9641r9642
1217      </rect>
1318   </element>
1419 
15   <view name="Simple LCD">
20   <view name="Heathkit H8">
1621      <!-- Black background -->
1722      <bezel element="background">
1823         <bounds left="1" top="1" right="600" bottom="480" />
r9641r9642
4449      <bezel name="digit9" element="digit">
4550         <bounds left="539" top="105" right="586" bottom="185" />
4651      </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>
4764   </view>
4865</mamelayout>
src/mess/drivers/h8.c
r9641r9642
99
1010   TODO:
1111   - Proper artwork
12   - Add status LEDs
1312   - Add extra interrupt stuff
1413   - Add load/dump facility (cassette port)
1514
r9641r9642
6261{
6362    // this will always turn off int10 that was set by the timer
6463    // 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
6968
69   cpu_set_input_line(space->machine->device("maincpu"), INPUT_LINE_IRQ0, CLEAR_LINE);
7070   h8_digit = data & 15;
7171   if (h8_digit) output_set_digit_value(h8_digit, h8_segment);
7272   //if (~data & 0x40) h8_irqset(space->machine, 160, 0xcf);
7373   //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);
7675   beep_set_state(h8_beeper, (data & 0x80) ? 0 : 1);
7776}
7877
r9641r9642
9493static ADDRESS_MAP_START(h8_mem, ADDRESS_SPACE_PROGRAM, 8)
9594   ADDRESS_MAP_UNMAP_HIGH
9695   AM_RANGE(0x0000, 0x03ff) AM_ROM
97   AM_RANGE(0x2000, 0xffff) AM_RAM
96   AM_RANGE(0x2000, 0x9fff) AM_RAM
9897ADDRESS_MAP_END
9998
10099static ADDRESS_MAP_START( h8_io , ADDRESS_SPACE_IO, 8)
r9641r9642
136135{
137136   h8_beeper = machine->device("beep");
138137   beep_set_frequency(h8_beeper, H8_BEEP_FRQ);
138   output_set_value("pwr_led", 0);
139139}
140140
141141static WRITE_LINE_DEVICE_HANDLER( h8_inte_callback )
142142{
143143        // operate the ION LED
144   output_set_value("ion_led",(state) ? 0 : 1);
144145}
145146
146147static WRITE8_DEVICE_HANDLER( h8_status_callback )
147148{
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   {
154149        // operate the RUN LED
155   }
150   output_set_value("run_led", (data & I8085_STATUS_M1) ? 1 : 0);
156151}
157152
158153static I8085_CONFIG( h8_cpu_config )

Previous 15994 Revisions Next


© 1998-2018 The MESS Team