Previous 15994 Revisions Next

r9640 Tuesday 23rd November, 2010 at 05:36:16 UTC by Robbbert
[H8] Added beeper.
[src/mess/drivers]h8.c

src/mess/drivers/h8.c
r9639r9640
1010   TODO:
1111   - Proper artwork
1212   - Add status LEDs
13   - Add beeper
1413   - Add extra interrupt stuff
1514   - Assign more appropriate keys
15   - Add load/dump facility (cassette port)
1616
1717****************************************************************************/
1818
1919#include "emu.h"
2020#include "cpu/i8085/i8085.h"
21#include "sound/beep.h"
2122#include "h8.lh"
2223
2324#define H8_CLOCK (XTAL_12_288MHz / 6)
r9639r9640
2627
2728static UINT8 h8_digit;
2829static UINT8 h8_segment;
30static running_device *h8_beeper;
2931
30
3132static TIMER_DEVICE_CALLBACK( h8_irq_pulse )
3233{
3334   cpu_set_input_line_and_vector(timer.machine->device("maincpu"), INPUT_LINE_IRQ0, ASSERT_LINE, 0xcf);
r9639r9640
6061
6162static WRITE8_HANDLER( h8_f0_w )
6263{
64    // this will always turn off int10 that was set by the timer
6365    // d0-d3 = digit select
6466    // d4 = int20 (hi)
6567    // d5 = mon LED (lo)
6668    // d6 = int10 (lo)
67    // d7 = beeper enable (hi)
69    // d7 = beeper enable (lo)
6870
6971   h8_digit = data & 15;
7072   if (h8_digit) output_set_digit_value(h8_digit, h8_segment);
r9639r9640
7274   //if (data & 0x10) h8_irqset(space->machine, 160, 0xd7);
7375
7476   cpu_set_input_line(space->machine->device("maincpu"), INPUT_LINE_IRQ0, CLEAR_LINE);
77   beep_set_state(h8_beeper, (data & 0x80) ? 0 : 1);
7578}
7679
7780static WRITE8_HANDLER( h8_f1_w )
r9639r9640
132135
133136static MACHINE_RESET(h8)
134137{
138   h8_beeper = machine->device("beep");
139   beep_set_frequency(h8_beeper, H8_BEEP_FRQ);
135140}
136141
137142static WRITE_LINE_DEVICE_HANDLER( h8_inte_callback )
r9639r9640
171176
172177   /* video hardware */
173178   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)
174184MACHINE_CONFIG_END
175185
176186/* ROM definition */
r9639r9640
190200/* Driver */
191201
192202/*    YEAR  NAME    PARENT  COMPAT   MACHINE    INPUT    INIT    COMPANY   FULLNAME       FLAGS */
193COMP( 1977, h8,  0,       0,   h8,    h8,     0,        "Heath, Inc.",   "Heathkit H8",      GAME_NOT_WORKING | GAME_NO_SOUND)
203COMP( 1977, h8,  0,       0,   h8,    h8,     0, "Heath, Inc.", "Heathkit H8", GAME_NOT_WORKING )

Previous 15994 Revisions Next


© 1998-2018 The MESS Team