Beispiel #1
0
static int DrvScan(int nAction, int *pnMin)
{
	struct BurnArea ba;

	if (pnMin != NULL) {
		*pnMin = 0x029707;
	}

	if (nAction & ACB_MEMORY_RAM) {
		memset(&ba, 0, sizeof(ba));
		ba.Data	  = AllRam;
		ba.nLen	  = RamEnd-AllRam;
		ba.szName = "All Ram";
		BurnAcb(&ba);
	}

	if (nAction & ACB_DRIVER_DATA) {
		ZetScan(nAction);

		MSM6295Scan(0, nAction);
	}

	if (nAction & ACB_WRITE) {
		ZetOpen(0);
		bankswitch(banks[0]);
		vidram_bankswitch(banks[1]);
		ZetClose();

		oki_bankswitch(banks[2]);

		DrvRecalc = 1;
	}

	return 0;
}
Beispiel #2
0
void __fastcall speedspn_main_write_port(unsigned short port, unsigned char data)
{
	switch (port & 0xff)
	{
		case 0x01:
		case 0x10: // ?
		return;

		case 0x07:
			*display_enable = ~data & 1;
		return;

		case 0x12:
			bankswitch(data);
		return;

		case 0x13:
			*soundlatch = data;
			ZetClose();
			ZetOpen(1);
			ZetSetIRQLine(0, ZET_IRQSTATUS_ACK);
			ZetClose();
			ZetOpen(0);
		return;

		case 0x17:
			vidram_bankswitch(data);
		return;
	}
}
Beispiel #3
0
static INT32 DrvDoReset()
{
	memset (AllRam, 0, RamEnd - AllRam);

	ZetOpen(0);
	ZetReset();
	bankswitch(0);
	vidram_bankswitch(0);
	ZetClose();

	ZetOpen(1);
	ZetReset();
	ZetClose();

	oki_bankswitch(1);
	MSM6295Reset(0);

	return 0;
}