~ubuntu-branches/ubuntu/lucid/sdlmame/lucid

« back to all changes in this revision

Viewing changes to src/mame/audio/senjyo.c

  • Committer: Bazaar Package Importer
  • Author(s): Cesare Falco
  • Date: 2009-11-03 17:10:15 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20091103171015-6hop4ory5lxnumpn
Tags: 0.135-0ubuntu1
* New upstream release - Closes (LP: #403212)
* debian/watch: unstable releases are no longer detected
* mame.ini: added the cheat subdirectories to cheatpath so zipped
  cheatfiles will be searched too
* renamed crsshair subdirectory to crosshair to reflect upstream change
* mame.ini: renamed references to crosshair subdirectory (see above)

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
#define SINGLE_DIVIDER 8
9
9
 
10
10
static INT16 *_single;
11
 
static int single_rate = 1000;
 
11
static int single_rate = 0;
12
12
static int single_volume = 0;
13
13
 
14
14
 
21
21
 
22
22
 
23
23
/* z80 pio */
24
 
static WRITE_LINE_DEVICE_HANDLER( daisy_interrupt )
25
 
{
26
 
        cputag_set_input_line(device->machine, "sub", 0, state);
27
 
}
28
24
 
29
25
const z80pio_interface senjyo_pio_intf =
30
26
{
31
 
        DEVCB_LINE(daisy_interrupt),
 
27
        DEVCB_CPU_INPUT_LINE("sub", INPUT_LINE_IRQ0),
32
28
        DEVCB_NULL,
33
29
        DEVCB_NULL,
34
30
        DEVCB_NULL,
38
34
};
39
35
 
40
36
/* z80 ctc */
41
 
const z80ctc_interface senjyo_ctc_intf =
 
37
Z80CTC_INTERFACE( senjyo_ctc_intf )
42
38
{
43
39
        NOTIMER_2,       /* timer disables */
44
 
        daisy_interrupt, /* interrupt handler */
45
 
        z80ctc_trg1_w,   /* ZC/TO0 callback */
46
 
        0,               /* ZC/TO1 callback */
47
 
        0                /* ZC/TO2 callback */
 
40
        DEVCB_CPU_INPUT_LINE("sub", INPUT_LINE_IRQ0), /* interrupt handler */
 
41
        DEVCB_LINE(z80ctc_trg1_w),      /* ZC/TO0 callback */
 
42
        DEVCB_NULL,                                     /* ZC/TO1 callback */
 
43
        DEVCB_NULL                                      /* ZC/TO2 callback */
48
44
};
49
45
 
50
46
 
82
78
                _single[i] = ((i/SINGLE_DIVIDER)&0x01)*127*256;
83
79
 
84
80
        /* CTC2 single tone generator */
85
 
        sample_set_volume(device,0,0);
 
81
        single_rate = 1000;
 
82
        single_volume = 0;
 
83
        sample_set_volume(device,0,single_volume / 15.0);
86
84
        sample_start_raw(device,0,_single,SINGLE_LENGTH,single_rate,1);
87
85
 
88
86
        timer_pulse(machine, video_screen_get_frame_period(machine->primary_screen), NULL, 0, senjyo_sh_update);