Пример #1
0
static READ8_HANDLER( devram_r )
{
	// There's an MCU here, possibly

	switch (offset)
	{
		/* Reading efe0 probably resets a watchdog mechanism
           that would reset the main cpu. We avoid this and patch
           the rom instead (main cpu has to be reset once at startup) */
		case 0xfe0:
			return watchdog_reset_r(0);

		/* Reading a word at eff2 probably yelds the product
           of the words written to eff0 and eff2 */
		case 0xff2:
		case 0xff3:
		{
			int	x = (devram[0xff0] + devram[0xff1] * 256) *
					(devram[0xff2] + devram[0xff3] * 256);
			if (offset == 0xff2)	return (x & 0x00FF) >> 0;
			else				return (x & 0xFF00) >> 8;
		}	break;

		/* Reading eff4, F0 times must yield at most 80-1 consecutive
           equal values */
		case 0xff4:
			return rand();

		default:
			return devram[offset];
	}
Пример #2
0
static void ohmygod_init_machine(void)
{
	unsigned char *rom = memory_region(REGION_SOUND1);

	/* the game requires the watchdog to fire during boot, so we have
	   to initialize it */
	watchdog_reset_r(0);

	sndbank = 0;
	memcpy(rom + 0x20000,rom + 0x40000 + 0x20000 * sndbank,0x20000);
}
Пример #3
0
static READ16_HANDLER( mcat_wd_r )
{
	watchdog_reset_r(0);
	return 0xc00;
}
Пример #4
0
static READ8_HANDLER( funkybee_input_port_0_r )
{
	watchdog_reset_r(space, 0);
	return input_port_read(space->machine, "IN0");
}
Пример #5
0
static MACHINE_INIT( mcatadv )
{
	watchdog_reset_r(0);
}
Пример #6
0
static READ8_HANDLER( funkybee_input_port_0_r )
{
	watchdog_reset_r(0);
	return input_port_0_r(offset);
}
Пример #7
0
static int funkybee_input_port_0_r(int offset)
{
	watchdog_reset_r(0);
	return input_port_0_r(offset);
}
Пример #8
0
static READ8_HANDLER( funkybee_input_port_0_r )
{
	watchdog_reset_r(machine,0);
	return input_port_read_indexed(machine,0);
}