Exemplo n.º 1
0
UINT16 __fastcall vimanaReadWord(UINT32 a)
{
	switch (a)
	{
		case 0x0c0002:
			return ToaFCU2GetRAMPointer();

		case 0x0c0004:
			return ToaFCU2ReadRAM();

		case 0x0c0006:
			return ToaFCU2ReadRAMSize();

		case 0x4c0002:
			return ToaBCU2GetRAMPointer();

		case 0x4c0004:
			return ToaBCU2ReadRAM_Hi();

		case 0x4c0006:
			return ToaBCU2ReadRAM_Lo();

		case 0x4c0010:
		case 0x4c0012:
		case 0x4c0014:
		case 0x4c0016:
		case 0x4c0018:
		case 0x4c001a:
		case 0x4c001c:
		case 0x4c001e:
			return BCU2Reg[(a & 0x0f) >> 1];
	}

	return 0;
}
Exemplo n.º 2
0
unsigned short __fastcall samesameReadWord(unsigned int a)
{
	switch (a)
	{
		case 0x140000:
			return DrvInputs[0];

		case 0x140002:
			return DrvInputs[1];

		case 0x140004:
			return DrvDips[0];

		case 0x140006:
			return DrvDips[1];

		case 0x140008:
			return DrvInputs[2];

		case 0x14000a:
			return (0x80 | DrvDips[2]);

		case 0x14000e:
			return 0; // mcu reads...

		case 0x180002:
			return ToaBCU2GetRAMPointer();

		case 0x180004:
			return ToaBCU2ReadRAM_Hi();

		case 0x180006:
			return ToaBCU2ReadRAM_Lo();

		case 0x180010:
		case 0x180012:
		case 0x180014:
		case 0x180016:
		case 0x180018:
		case 0x18001a:
		case 0x18001c:
		case 0x18001e:
			return BCU2Reg[(a & 0x0f) >> 1];

		case 0x1c0002:
			return ToaFCU2GetRAMPointer();

		case 0x1c0004:
			return ToaFCU2ReadRAM();

		case 0x1c0006:
			return ToaFCU2ReadRAMSize();
	}

	return 0;
}
Exemplo n.º 3
0
UINT16 __fastcall truxtonReadWord(UINT32 sekAddress)
{
	switch (sekAddress) {

		case 0x0c0002:
			return ToaFCU2GetRAMPointer();
		case 0x0c0004:
			return ToaFCU2ReadRAM();
		case 0x0c0006:
			return ToaFCU2ReadRAMSize();

		case 0x100002:
			return ToaBCU2GetRAMPointer();
		case 0x100004:
			return ToaBCU2ReadRAM_Hi();
		case 0x100006:
			return ToaBCU2ReadRAM_Lo();

		case 0x100010:
		case 0x100011:
		case 0x100012:
		case 0x100013:
		case 0x100014:
		case 0x100015:
		case 0x100016:
		case 0x100017:
		case 0x100018:
		case 0x100019:
		case 0x10001A:
		case 0x10001B:
		case 0x10001C:
		case 0x10001D:
		case 0x10001E:
		case 0x10001F:
			return BCU2Reg[(sekAddress & 15) >> 1];

		case 0x0c0000:
		case 0x140000:
			return ToaVBlankRegister();

		default: {
//			bprintf(PRINT_NORMAL, _T("Read Word %06X.\n"), sekAddress);
		}
	}

	return 0;
}
Exemplo n.º 4
0
unsigned short __fastcall outzoneReadWord(unsigned int sekAddress)
{
	switch (sekAddress) {

		case 0x100002:
			return ToaFCU2GetRAMPointer();
		case 0x100004:
			return ToaFCU2ReadRAM();
		case 0x100006:
			return ToaFCU2ReadRAMSize();

		case 0x200002:
			return ToaBCU2GetRAMPointer();
		case 0x200004:
			return ToaBCU2ReadRAM_Hi();
		case 0x200006:
			return ToaBCU2ReadRAM_Lo();

		case 0x200010:
		case 0x200011:
		case 0x200012:
		case 0x200013:
		case 0x200014:
		case 0x200015:
		case 0x200016:
		case 0x200017:
		case 0x200018:
		case 0x200019:
		case 0x20001A:
		case 0x20001B:
		case 0x20001C:
		case 0x20001D:
		case 0x20001E:
		case 0x20001F:
			return BCU2Reg[(sekAddress & 15) >> 1];

		case 0x100000:
		case 0x300000:
			return ToaVBlankRegister();

		default: {
//			printf("Attempt to read word value of location %x\n", sekAddress);
		}
	}

	return 0;
}
Exemplo n.º 5
0
UINT16 __fastcall demonwldReadWord(UINT32 a)
{
	switch (a)
	{
		case 0x800002:
			return ToaBCU2GetRAMPointer();

		case 0x800004:
			return ToaBCU2ReadRAM_Hi();

		case 0x800006:
			return ToaBCU2ReadRAM_Lo();

		case 0x800010:
		case 0x800012:
		case 0x800014:
		case 0x800016:
		case 0x800018:
		case 0x80001a:
		case 0x80001c:
		case 0x80001e:
			return BCU2Reg[(a & 0x0f) >> 1];

		case 0xa00002:
			return ToaFCU2GetRAMPointer();

		case 0xa00004:
			return ToaFCU2ReadRAM();

		case 0xa00006:
			return ToaFCU2ReadRAMSize();

		case 0xe0000e: // hack
		{
			demonwld_hack++;
			if (demonwld_hack & 4)
				return 0x76;
			else
				return 0;
		}
	}

	return 0;
}