Пример #1
0
static void *venture_sh_start(int clock, const struct CustomSound_interface *config)
{
	pia_config(0, &venture_pia_0_intf);
	pia_config(1, &venture_pia_1_intf);

	return venture_common_sh_start(clock, config, FALSE);
}
Пример #2
0
static MACHINE_START( quizmstr )
{
	pia_config(0, PIA_STANDARD_ORDERING, &quizmstr_pia_0_intf);
	pia_config(1, PIA_STANDARD_ORDERING, &quizmstr_pia_1_intf);
	pia_config(2, PIA_STANDARD_ORDERING, &quizmstr_pia_2_intf);
	return 0;
}
Пример #3
0
static MACHINE_START( trailblz )
{
	pia_config(0, PIA_STANDARD_ORDERING, &trailblz_pia_0_intf);
	pia_config(1, PIA_STANDARD_ORDERING, &trailblz_pia_1_intf);
	pia_config(2, PIA_STANDARD_ORDERING, &trailblz_pia_2_intf);
	return 0;
}
Пример #4
0
static void gpsm_init(struct sndbrdData *brdData)
{
  	int mixing_levels[4] = {25,25,25,25};
	int i;
  	int s = 0;
  	memset(&gps_locals, 0x00, sizeof(gps_locals));
	gps_locals.brdData = *brdData;
  	for (i = 0;i < 32000;i++) {
    		s =  (s ? 0 : 1);
    		if (s) {
      			sineWaveext[i] = rand();
    		} else
      			sineWaveext[i] = 0-rand();
  	}
	pia_config(GPS_PIA0, PIA_STANDARD_ORDERING, &gps_pia[0]);
	pia_config(GPS_PIA1, PIA_STANDARD_ORDERING, &gps_pia[1]);
	gps_locals.channel = mixer_allocate_channels(4, mixing_levels);
  	mixer_set_name  (gps_locals.channel, "MC6840 #Q1");   // 6840 Output timer 1 (q1) is easy wave
  	mixer_set_volume(gps_locals.channel,0); 
  	mixer_set_name  (gps_locals.channel+1,"MC6840 #Q2");  // 6840 Output timer 2 (q2) is easy wave
  	mixer_set_volume(gps_locals.channel+1,0);  
  	mixer_set_name  (gps_locals.channel+2,"MC6840 #Q3");  // 6840 Output timer 3 (q3) is easy wave
  	mixer_set_volume(gps_locals.channel+2,0);  
  	mixer_set_name  (gps_locals.channel+3,"Noise");  // Noise generator
  	mixer_set_volume(gps_locals.channel+3,0);  
   	mixer_play_sample_16(gps_locals.channel+3,sineWaveext, sizeof(sineWaveext), 625000 , 1);
        gps_locals.stateca1 = 0;
        timer_set(TIME_IN_NSEC(814000000),0,oneshoot); // fire ca1 only once
//
// this time should run to emulate the 6840 correctly, but it is not needed for gampelan games i think
// because the sound rum never reads back the decreased values from the m6840
//
//        timer_pulse(TIME_IN_HZ(MSU1_INTCLOCK),0x02,m6840_pulse); // start internal clock 6840
//
}
Пример #5
0
static void zaccaria_init_machine(void)
{
	pia_unconfig();
	pia_config(0, PIA_STANDARD_ORDERING | PIA_8BIT, &pia_0_intf);
	pia_config(1, PIA_STANDARD_ORDERING | PIA_8BIT, &pia_1_intf);
	pia_reset();
}
Пример #6
0
static void pet_common_driver_init (void)
{
	int i;

	/* BIG HACK; need to phase out this retarded memory management */
	if (!pet_memory)
		pet_memory = mess_ram;

	memory_install_read8_handler(0, ADDRESS_SPACE_PROGRAM, 0x0000, mess_ram_size - 1, 0, 0, MRA8_BANK10);
	memory_install_write8_handler(0, ADDRESS_SPACE_PROGRAM, 0x0000, mess_ram_size - 1, 0, 0, MWA8_BANK10);
	memory_set_bankptr(10, pet_memory);

	if (mess_ram_size < 0x8000)
	{
		memory_install_read8_handler(0, ADDRESS_SPACE_PROGRAM, mess_ram_size, 0x7FFF, 0, 0, MRA8_NOP);
		memory_install_write8_handler(0, ADDRESS_SPACE_PROGRAM, mess_ram_size, 0x7FFF, 0, 0, MWA8_NOP);
	}

	/* 2114 poweron ? 64 x 0xff, 64x 0, and so on */
	for (i = 0; i < mess_ram_size; i += 0x40)
	{
		memset (pet_memory + i, i & 0x40 ? 0 : 0xff, 0x40);
	}

	/* pet clock */
	timer_pulse(0.01, 0, pet_interrupt);

	via_config(0,&pet_via);
	pia_config(0,PIA_STANDARD_ORDERING,&pet_pia0);
	pia_config(1,PIA_STANDARD_ORDERING,&pet_pia1);

	cbm_ieee_open();
}
Пример #7
0
void *exidy_sh_start(int clock, const struct CustomSound_interface *config)
{
	/* Init PIA */
	pia_config(0, PIA_STANDARD_ORDERING, &pia_0_intf);
	pia_config(1, PIA_STANDARD_ORDERING, &pia_1_intf);
	has_sh8253 = TRUE;
	return common_start();
}
Пример #8
0
ROM_END

/* Driver Initialization */

static DRIVER_INIT( funworld )
{
	pia_config(0, PIA_STANDARD_ORDERING, &pia0_intf);
	pia_config(1, PIA_STANDARD_ORDERING, &pia1_intf);
}
Пример #9
0
void spiders_init_machine(void)
{
	pia_unconfig();
	pia_config(0, PIA_STANDARD_ORDERING, &pia_0_intf);
	pia_config(1, PIA_ALTERNATE_ORDERING, &pia_1_intf);
	pia_config(2, PIA_STANDARD_ORDERING, &pia_2_intf);
	pia_config(3, PIA_STANDARD_ORDERING, &pia_3_intf);
	pia_reset();
}
Пример #10
0
static MACHINE_START( nyny )
{
	pia_config(1, &pia_1_intf);
	pia_config(2, &pia_2_intf);

	TTL74123_config(0, &ic48_1_intf);

	/* setup for save states */
	state_save_register_global(flipscreen);
	state_save_register_global(star_enable);
	state_save_register_global(star_delay_counter);
	state_save_register_global(star_shift_reg);
}
Пример #11
0
void pia_reset(void)
{
	int i;

	/* zap each structure, preserving the interface and swizzle */
	for (i = 0; i < MAX_PIA; i++) pia_config(i, pia[i].addr, pia[i].intf);
}
Пример #12
0
void *victory_sh_start(int clock, const struct CustomSound_interface *config)
{
	/* Init PIA */
	pia_config(0, PIA_STANDARD_ORDERING, &victory_pia_0_intf);
	pia_0_cb1_w(0, 1);
	has_sh8253 = TRUE;
	return common_start();
}
Пример #13
0
ROM_END



/*************************
*      Driver Init       *
*************************/

static DRIVER_INIT( pmpoker )
{
/* temporary patch to avoid hardware input errors */
/*  UINT8 *ROM = memory_region(REGION_CPU1);

    ROM[0x2dae] = 0x4c;
    ROM[0x2daf] = 0xae;
    ROM[0x2db0] = 0x2d;
*/
	pia_config(0, PIA_STANDARD_ORDERING, &pia0_intf);
	pia_config(1, PIA_STANDARD_ORDERING, &pia1_intf);
}
Пример #14
0
static void s11s_init(struct sndbrdData *brdData) {
  s11slocals.brdData = *brdData;
  pia_config(S11S_PIA0, PIA_STANDARD_ORDERING, &s11s_pia[s11slocals.brdData.subType & 3]);
  if (s11slocals.brdData.subType) {
    cpu_setbank(S11S_BANK0, s11slocals.brdData.romRegion+0xc000);
    cpu_setbank(S11S_BANK1, s11slocals.brdData.romRegion+0x4000);
  }
  if (core_gameData->hw.gameSpecific2) {
    hc55516_set_gain(0, core_gameData->hw.gameSpecific2);
  }
}
Пример #15
0
static void s11s_init(struct sndbrdData *brdData) {
  int i;
  s11slocals.brdData = *brdData;
  pia_config(S11S_PIA0, PIA_STANDARD_ORDERING, &s11s_pia[s11slocals.brdData.subType & 3]);
  if (s11slocals.brdData.subType) {
    cpu_setbank(S11S_BANK0, s11slocals.brdData.romRegion+0xc000);
    cpu_setbank(S11S_BANK1, s11slocals.brdData.romRegion+0x4000);
  }
  for (i=0; i < 0x1000; i++) memory_region(S9S_CPUREGION)[i] = 0xff;
  if (core_gameData->hw.gameSpecific2) {
    hc55516_set_gain(0, core_gameData->hw.gameSpecific2);
  }
}
Пример #16
0
static MACHINE_START( fnvision )
{
	pia_config(0, PIA_STANDARD_ORDERING, &pia0_intf);
	return 0;
}
Пример #17
0
static void nuova_init(struct sndbrdData *brdData) {
  memset(&locals, 0x00, sizeof(locals));
  locals.brdData = *brdData;
  pia_config(2, PIA_STANDARD_ORDERING, &nuova_pia[0]);
}
Пример #18
0
static void atari_machine_start(running_machine *machine, int type, const pia6821_interface *pia_intf, int has_cart)
{
	gtia_interface gtia_intf;

	atari = type;

	/* GTIA */
	memset(&gtia_intf, 0, sizeof(gtia_intf));
	if (port_tag_to_index("console") >= 0)
		gtia_intf.console_read = console_read;
	if (sndti_exists(SOUND_DAC, 0))
		gtia_intf.console_write = console_write;
	gtia_init(machine, &gtia_intf);

	/* pokey */
	add_reset_callback(Machine, pokey_reset);

	/* PIA */
	if (pia_intf)
	{
		pia_config(0, pia_intf);
		add_reset_callback(Machine, _pia_reset);
	}

	/* ANTIC */
	add_reset_callback(Machine, _antic_reset);

	/* cartridge */
	if (has_cart)
		add_reset_callback(Machine, cart_reset);

#ifdef MESS
	{
		offs_t ram_top;
		offs_t ram_size;

		if (!strcmp(Machine->gamedrv->name, "a400")
			|| !strcmp(Machine->gamedrv->name, "a400pal")
			|| !strcmp(Machine->gamedrv->name, "a800")
			|| !strcmp(Machine->gamedrv->name, "a800pal")
			|| !strcmp(Machine->gamedrv->name, "a800xl"))
		{
			ram_size = 0xA000;
		}
		else
		{
			ram_size = 0x8000;
		}

		/* install RAM */
		ram_top = MIN(mess_ram_size, ram_size) - 1;
		memory_install_read8_handler(machine, 0, ADDRESS_SPACE_PROGRAM,
			0x0000, ram_top, 0, 0, SMH_BANK2);
		memory_install_write8_handler(machine, 0, ADDRESS_SPACE_PROGRAM,
			0x0000, ram_top, 0, 0, SMH_BANK2);
		memory_set_bankptr(2, mess_ram);
	}
#endif /* MESS */

	/* save states */
	state_save_register_global_pointer(((UINT8 *) &antic.r), sizeof(antic.r));
	state_save_register_global_pointer(((UINT8 *) &antic.w), sizeof(antic.w));
}
Пример #19
0
void mcr_sound_init(void)
{
	int sound_cpu = 1;
	int dac_index = 0;

	/* SSIO */
	if (mcr_sound_config & MCR_SSIO)
	{
		ssio_sound_cpu = sound_cpu++;
		ssio_reset_w(1);
		ssio_reset_w(0);
	}

	/* Turbo Chip Squeak */
	if (mcr_sound_config & MCR_TURBO_CHIP_SQUEAK)
	{
		pia_config(0, PIA_ALTERNATE_ORDERING, &turbocs_pia_intf);
		turbocs_dac_index = dac_index++;
		turbocs_sound_cpu = sound_cpu++;
		turbocs_reset_w(1);
		turbocs_reset_w(0);
	}

	/* Chip Squeak Deluxe */
	if (mcr_sound_config & MCR_CHIP_SQUEAK_DELUXE)
	{
		pia_config(0, PIA_ALTERNATE_ORDERING | PIA_16BIT_AUTO, &csdeluxe_pia_intf);
		csdeluxe_dac_index = dac_index++;
		csdeluxe_sound_cpu = sound_cpu++;
		csdeluxe_reset_w(1);
		csdeluxe_reset_w(0);
	}

	/* Sounds Good */
	if (mcr_sound_config & MCR_SOUNDS_GOOD)
	{
		/* special case: Spy Hunter 2 has both Turbo CS and Sounds Good, so we use PIA slot 1 */
		pia_config(1, PIA_ALTERNATE_ORDERING | PIA_16BIT_UPPER, &soundsgood_pia_intf);
		soundsgood_dac_index = dac_index++;
		soundsgood_sound_cpu = sound_cpu++;
		soundsgood_reset_w(1);
		soundsgood_reset_w(0);
	}

	/* Squawk n Talk */
	if (mcr_sound_config & MCR_SQUAWK_N_TALK)
	{
		pia_config(0, PIA_STANDARD_ORDERING | PIA_8BIT, &squawkntalk_pia0_intf);
		pia_config(1, PIA_STANDARD_ORDERING | PIA_8BIT, &squawkntalk_pia1_intf);
		squawkntalk_sound_cpu = sound_cpu++;
		squawkntalk_reset_w(1);
		squawkntalk_reset_w(0);
	}

	/* Advanced Audio */
	if (mcr_sound_config & MCR_WILLIAMS_SOUND)
	{
		williams_cvsd_init(sound_cpu++, 0);
		dac_index++;
		williams_cvsd_reset_w(1);
		williams_cvsd_reset_w(0);
	}

	/* reset any PIAs */
	pia_reset();
}
Пример #20
0
static void nuova_init(struct sndbrdData *brdData) {
  memset(&locals, 0x00, sizeof(locals));
  locals.brdData = *brdData;
  pia_config(2, PIA_STANDARD_ORDERING, &nuova_pia[0]);
  tms5220_set_variant(TMS5220_IS_5220C);
}
Пример #21
0
static void s9p_init(struct sndbrdData *brdData) {
  s9plocals.brdData = *brdData;
  pia_config(S9P_PIA0, PIA_STANDARD_ORDERING, &s9p_pia);
}
Пример #22
0
static void s67s_init(struct sndbrdData *brdData) {
  s67slocals.brdData = *brdData;
  pia_config(S67S_PIA0, PIA_STANDARD_ORDERING, &s67s_pia);
}