Esempio n. 1
0
UINT8 parodius_main_read(UINT16 address)
{
	switch (address)
	{
		case 0x3f8c:
			return DrvInputs[0];

		case 0x3f8d:
			return DrvInputs[1];

		case 0x3f8e:
			return (DrvDips[2] & 0xf0) | (DrvInputs[2] & 0x0f);

		case 0x3f8f:
			return DrvDips[0];

		case 0x3f90:
			return DrvDips[1];

		case 0x3fc0: // watchdog
			return 0;

		case 0x3fcc:
		case 0x3fcd:
			return K053260Read(0, (address & 1)+2);
	}

	if ((address & 0xf800) == 0x0000) {
		if (nDrvRomBank[1] & 1) {
			return DrvPalRAM[((nDrvRomBank[1] & 0x04) << 9) + address];
		} else {
			return DrvBankRAM[address];
		}
	}

	if ((address & 0xfff0) == 0x3fa0) {
		return K053244Read(0, address & 0x0f);
	}

	if ((address & 0xf800) == 0x2000) {
		if (nDrvRomBank[1] & 0x02) {
			return K053245Read(0, address & 0x7ff);
		}
	}

	if (address >= 0x2000 && address <= 0x5fff) {
		return K052109Read(address - 0x2000);
	}

	return 0;
}
Esempio n. 2
0
unsigned char rollerg_main_read(unsigned short address)
{
	switch (address)
	{
		case 0x0020: // watchdog
			return 0;

		case 0x0030:
		case 0x0031:
			return K053260Read(0, (address & 1)+2);

		case 0x0050:
			return DrvInputs[0];

		case 0x0051:
			return DrvInputs[1];

		case 0x0052:
			return (DrvInputs[2] & 0xf0) | (DrvDips[2] & 0x0f);

		case 0x0053:
			return DrvDips[0];

		case 0x0060:
			return DrvDips[1];

		case 0x0061:
			return 0x7f;
	}

	if ((address & 0xfff0) == 0x0300) {
		return K053244Read(0, address & 0x0f);
	}

	if ((address & 0xf800) == 0x0800) {
		if (readzoomroms)
			return K051316ReadRom(0, address & 0x7ff);
		else
			return K051316Read(0, address & 0x7ff);
	}

	if ((address & 0xf800) == 0x1000) {
		return K053245Read(0, address & 0x7ff);
	}

	return 0;
}
Esempio n. 3
0
unsigned char supratk_read(unsigned short address)
{
	switch (address)
	{
		case 0x5f8c:
			return DrvInputs[0];

		case 0x5f8d:
			return DrvInputs[1];

		case 0x5f8e:
			return (DrvInputs[2] & 0x0f) | (DrvDips[2] & 0xf0);

		case 0x5f8f:
			return DrvDips[0];

		case 0x5f90:
			return DrvDips[1];

		case 0x5fc0:
			// watchdog
			return 0;
	}

	if ((address & 0xf800) == 0x0000) {
		if (videobank & 0x02) {
			return DrvPalRAM[((videobank & 4) << 9) + address];
		} else if (videobank & 0x01) {
			return K053245Read(0, address);
		}
		return DrvBankRAM[address];
	}

	if ((address & 0xfff0) == 0x5fa0) {
		return K053244Read(0, address & 0x0f);
	}

	if ((address & 0xc000) == 0x4000) {
		return K052109Read(address & 0x3fff);
	}

	return 0;
}