Previous 15994 Revisions Next

r3867 Thursday 18th December, 2008 at 14:27:29 UTC by Dirk Best
Use CUSTOM_START where possible
[src/mess/audio]arcadia.c channelf.c dai.c dave.c dave.h gb.c gmaster.c kaypro.c lynx.c mac.c special.c svision.c ted7360.c vc4000.c vic6560.c wswan.c
[src/mess/drivers]gb.c n64.c snes.c
[src/mess/includes]channelf.h gb.h gmaster.h lynx.h mac.h svision.h wswan.h
[src/mess/machine]b2m.c
[src/mess/video]odyssey2.c ted7360.h vic6560.h

src/mess/audio/wswan.c
r3866r3867
219219   }
220220}
221221
222void *wswan_sh_start(const device_config *device, int clock, const custom_sound_interface *config)
222CUSTOM_START( wswan_sh_start )
223223{
224224   channel = stream_create(device, 0, 2, device->machine->sample_rate, 0, wswan_sh_update);
225225
src/mess/audio/mac.c
r3866r3867
7070/* Sound handler start              */
7171/************************************/
7272
73void *mac_sh_start(const device_config *device, int clock, const custom_sound_interface *config)
73CUSTOM_START( mac_sh_start )
7474{
7575   snd_cache = auto_malloc(SND_CACHE_SIZE * sizeof(*snd_cache));
7676   mac_stream = stream_create(device, 0, 1, MAC_SAMPLE_RATE, 0, mac_sound_update);
src/mess/audio/gmaster.c
r3866r3867
4747/************************************/
4848/* Sound handler start              */
4949/************************************/
50void* gmaster_custom_start (const device_config *device, int clock, const custom_sound_interface *config)
50
51CUSTOM_START( gmaster_custom_start )
5152{
5253  mixer_channel = stream_create(device, 0, 1, device->machine->sample_rate, 0, gmaster_update);
5354
5455  return (void*)~0;
5556}
56
src/mess/audio/vic6560.c
r3866r3867
228228/* Sound handler start          */
229229/************************************/
230230
231void *vic6560_custom_start(const device_config *device, int clock, const custom_sound_interface *config)
231CUSTOM_START( vic6560_custom_start )
232232{
233233   int i;
234234
src/mess/audio/kaypro.c
r3866r3867
4848}
4949
5050
51static int kaypro_sh_start(const device_config *device, int clock, const custom_sound_interface *config)
51static CUSTOM_START( kaypro_sh_start )
5252{
5353   channel = stream_create(device, 0, 1, device->machine->sample_rate, 0, kaypro_sound_update);
5454   return 0;
src/mess/audio/vc4000.c
r3866r3867
6767/* Sound handler start              */
6868/************************************/
6969
70static void *vc4000_custom_start(const device_config *device, int clock, const custom_sound_interface *config)
70static CUSTOM_START( vc4000_custom_start )
7171{
7272    vc4000_sound.channel = stream_create(device, 0, 1, device->machine->sample_rate, 0, vc4000_update);
7373    return (void *) ~0;
7474}
7575
7676
77
7877const custom_sound_interface vc4000_sound_interface =
7978{
8079   vc4000_custom_start
src/mess/audio/channelf.c
r3866r3867
7575
7676
7777
78void *channelf_sh_custom_start(const device_config *device, int clock, const custom_sound_interface *config)
78CUSTOM_START( channelf_sh_custom_start )
7979{
8080   int rate;
8181
src/mess/audio/dave.c
r3866r3867
263263
264264/* dave has 3 tone channels and 1 noise channel.
265265the volumes are mixed internally and output as left and right volume */
266void *Dave_sh_start(const device_config *device, int clock, const custom_sound_interface *config)
266CUSTOM_START(Dave_sh_start)
267267{
268268   /* 3 tone channels + 1 noise channel */
269269   dave.sound_stream = stream_create(device, 0, 2, device->machine->sample_rate, NULL, dave_update_sound);
src/mess/audio/special.c
r3866r3867
1414#include "streams.h"
1515#include "includes/special.h"
1616
17static void *specimx_sh_start(const device_config *device, int clock, const custom_sound_interface *config);
17static CUSTOM_START( specimx_sh_start );
1818static void specimx_sh_update(void *param,stream_sample_t **inputs, stream_sample_t **_buffer,int length);
1919
2020static sound_stream *mixer_channel;
r3866r3867
2727   NULL
2828};
2929
30static void *specimx_sh_start(const device_config *device, int clock, const custom_sound_interface *config)
30static CUSTOM_START( specimx_sh_start )
3131{
3232   specimx_input[0] = specimx_input[1] = specimx_input[2] = 0;
3333   mixer_channel = stream_create(device, 0, 1, device->machine->sample_rate, 0, specimx_sh_update);
src/mess/audio/dave.h
r3866r3867
8181   sound_stream *sound_stream;
8282} DAVE;
8383
84extern void *Dave_sh_start(const device_config *device, int clock, const custom_sound_interface *config);
84extern CUSTOM_START( Dave_sh_start );
8585
8686/* id's of external ints */
8787enum
src/mess/audio/arcadia.c
r3866r3867
6969/* Sound handler start              */
7070/************************************/
7171
72static void *arcadia_custom_start(const device_config *device, int clock, const custom_sound_interface *config)
72static CUSTOM_START( arcadia_custom_start )
7373{
7474    arcadia_sound.channel = stream_create(device, 0, 1, device->machine->sample_rate, 0, arcadia_update);
7575    return (void *) ~0;
src/mess/audio/gb.c
r3866r3867
640640}
641641
642642
643
644void *gameboy_sh_start(const device_config *device, int clock, const custom_sound_interface *config)
643CUSTOM_START( gameboy_sh_start )
645644{
646645   int I, J;
647646
src/mess/audio/lynx.c
r3866r3867
361361/* Sound handler start              */
362362/************************************/
363363
364void *lynx_custom_start(const device_config *device, int clock, const custom_sound_interface *config)
364CUSTOM_START( lynx_custom_start )
365365{
366366   mixer_channel = stream_create(device, 0, 1, device->machine->sample_rate, 0, lynx_update);
367367
r3866r3867
372372}
373373
374374
375
376void *lynx2_custom_start(const device_config *device, int clock, const custom_sound_interface *config)
375CUSTOM_START( lynx2_custom_start )
377376{
378377    mixer_channel = stream_create(device, 0, 2, device->machine->sample_rate, 0, lynx2_update);
379378
r3866r3867
382381    lynx_audio_init();
383382   return (void *) ~0;
384383}
385
src/mess/audio/svision.c
r3866r3867
220220/************************************/
221221/* Sound handler start              */
222222/************************************/
223void *svision_custom_start(const device_config *device, int clock, const custom_sound_interface *config)
223
224CUSTOM_START( svision_custom_start )
224225{
225226   memset(&svision_dma, 0, sizeof(svision_dma));
226227   memset(&svision_noise, 0, sizeof(svision_noise));
src/mess/audio/ted7360.c
r3866r3867
152152/************************************/
153153/* Sound handler start              */
154154/************************************/
155void *ted7360_custom_start (const device_config *device, int clock, const custom_sound_interface *config)
155
156CUSTOM_START( ted7360_custom_start )
156157{
157158   int i;
158159
r3866r3867
195196   }
196197   return (void *) ~0;
197198}
198
src/mess/audio/dai.c
r3866r3867
1616#include "streams.h"
1717#include "deprecat.h"
1818
19static void *dai_sh_start(const device_config *device, int clock, const custom_sound_interface *config);
19static CUSTOM_START( dai_sh_start );
2020static void dai_sh_update(void *param,stream_sample_t **inputs, stream_sample_t **_buffer,int length);
2121
2222static sound_stream *mixer_channel;
r3866r3867
5151}
5252
5353
54static void *dai_sh_start(const device_config *device, int clock, const custom_sound_interface *config)
54static CUSTOM_START( dai_sh_start )
5555{
5656   dai_input[0] = dai_input[1] = dai_input[2] = 0;
5757
src/mess/video/vic6560.h
r3866r3867
130130/*----------- defined in audio/vic6560.c -----------*/
131131
132132/* private area */
133void *vic6560_custom_start(const device_config *device, int clock, const custom_sound_interface *config);
133CUSTOM_START( vic6560_custom_start );
134134void vic6560_soundport_w (running_machine *machine, int mode, int data);
135135
136136
src/mess/video/odyssey2.c
r3866r3867
567567   return 0;
568568}
569569
570static void *odyssey2_sh_start(const device_config *device, int clock, const custom_sound_interface *config)
570static CUSTOM_START( odyssey2_sh_start )
571571{
572572   odyssey2_sh_channel = stream_create(device, 0, 1, clock/(I824X_LINE_CLOCKS*4), 0, odyssey2_sh_update );
573573   return (void *) ~0;
src/mess/video/ted7360.h
r3866r3867
7878
7979/*----------- defined in audio/ted7360.c -----------*/
8080
81void *ted7360_custom_start (const device_config *device, int clock, const custom_sound_interface *config);
81CUSTOM_START( ted7360_custom_start );
8282void ted7360_soundport_w (running_machine *machine, int mode, int data);
8383
8484
src/mess/includes/wswan.h
r3866r3867
109109/*----------- defined in audio/wswan.c -----------*/
110110
111111extern WRITE8_HANDLER( wswan_sound_port_w );
112extern void *wswan_sh_start(const device_config *device, int clock, const custom_sound_interface *config);
112extern CUSTOM_START( wswan_sh_start );
113113
114114
115115#endif /* WSWAN_H_ */
src/mess/includes/mac.h
r3866r3867
6262
6363/*----------- defined in audio/mac.c -----------*/
6464
65void *mac_sh_start(const device_config *device, int clock, const custom_sound_interface *config);
65CUSTOM_START( mac_sh_start );
6666
6767void mac_enable_sound( int on );
6868void mac_set_sound_buffer( int buffer );
src/mess/includes/gb.h
r3866r3867
4040extern WRITE8_HANDLER( gb_sound_w );
4141extern READ8_HANDLER( gb_wave_r );
4242extern WRITE8_HANDLER( gb_wave_w );
43void *gameboy_sh_start(const device_config *device, int clock, const custom_sound_interface *config);
43CUSTOM_START( gameboy_sh_start );
4444
4545
4646/*----------- defined in machine/gb.c -----------*/
src/mess/includes/lynx.h
r3866r3867
4949void lynx_audio_write(int offset, UINT8 data);
5050UINT8 lynx_audio_read(int offset);
5151void lynx_audio_count_down(running_machine *machine, int nr);
52void *lynx_custom_start(const device_config *device, int clock, const custom_sound_interface *config);
53void *lynx2_custom_start(const device_config *device, int clock, const custom_sound_interface *config);
52CUSTOM_START( lynx_custom_start );
53CUSTOM_START( lynx2_custom_start );
5454
5555
5656#endif /* LYNX_H_ */
src/mess/includes/channelf.h
r3866r3867
2424/*----------- defined in audio/channelf.c -----------*/
2525
2626void channelf_sound_w(int);
27void *channelf_sh_custom_start(const device_config *device, int clock, const custom_sound_interface *config);
27CUSTOM_START( channelf_sh_custom_start );
2828
2929
3030#endif /* CHANNELF_H_ */
src/mess/includes/gmaster.h
r3866r3867
66/*----------- defined in audio/gmaster.c -----------*/
77
88int gmaster_io_callback(int ioline, int state);
9void* gmaster_custom_start (const device_config *device, int clock, const custom_sound_interface *config);
9CUSTOM_START( gmaster_custom_start );
1010//extern void gmaster_custom_stop (void);
1111//extern void gmaster_custom_update (void);
1212
src/mess/includes/svision.h
r3866r3867
6161
6262extern SVISION_CHANNEL svision_channel[2];
6363
64void *svision_custom_start(const device_config *device, int clock, const custom_sound_interface *config);
64CUSTOM_START( svision_custom_start );
6565
6666void svision_soundport_w (running_machine *machine, SVISION_CHANNEL *channel, int offset, int data);
6767WRITE8_HANDLER( svision_sounddma_w );
src/mess/machine/b2m.c
r3866r3867
406406      sample_left++;
407407   }
408408}
409static CUSTOM_START (b2m_sh_start)
409
410static CUSTOM_START( b2m_sh_start )
410411{
411412   b2m_sound_input = 0;
412413   mixer_channel = stream_create(device, 0, 1, device->machine->sample_rate, 0, b2m_sh_update);
src/mess/drivers/gb.c
r3866r3867
548548INPUT_PORTS_END
549549
550550static const custom_sound_interface gameboy_sound_interface =
551{ gameboy_sh_start, 0, 0 };
551{
552   gameboy_sh_start, 0, 0
553};
552554
553555
554556static MACHINE_DRIVER_START( gameboy )
src/mess/drivers/n64.c
r3866r3867
1010#include "cpu/mips/mips3.h"
1111#include "sound/custom.h"
1212#include "devices/cartslot.h"
13#include "streams.h"
1413#include "includes/n64.h"
1514
1615static ADDRESS_MAP_START( n64_map, ADDRESS_SPACE_PROGRAM, 32 )
src/mess/drivers/snes.c
r3866r3867
181181***************************************************************************/
182182
183183static const custom_sound_interface snes_sound_interface =
184{ snes_sh_start, 0, 0 };
184{
185   snes_sh_start, 0, 0
186};
185187
186188
187189

Previous 15994 Revisions Next


© 1998-2018 The MESS Team