Exemplo n.º 1
0
UINT16 __fastcall dogyuunReadWord(UINT32 sekAddress)
{
	if ((sekAddress & 0xff0000) == 0x210000) {
		return ShareRAM[(sekAddress / 2) & 0x7fff];
	}

	switch (sekAddress) {

		case 0x200010:								// Player 1 inputs
			return DrvInput[0];
		case 0x200014:								// Player 2 inputs
			return DrvInput[1];
		case 0x200018:								// Other inputs
			return DrvInput[2];

		case 0x300004:
			return ToaGP9001ReadRAM_Hi(0);
		case 0x300006:
			return ToaGP9001ReadRAM_Lo(0);

		case 0x30000C:
			return ToaVBlankRegister();

		case 0x500004:
			return ToaGP9001ReadRAM_Hi(1);
		case 0x500006:
			return ToaGP9001ReadRAM_Lo(1);

		case 0x700000: {
			static INT32 i;
			UINT16 nStatus;

			i++;
			nStatus = 0xFFFF - (i & 0xFF);
			if (i & 1) {
				nStatus &= 0x00FF;
			}
			return nStatus;

		}

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

	return 0;
}
Exemplo n.º 2
0
UINT16 __fastcall batriderReadWordGP9001(UINT32 sekAddress)
{
	switch (sekAddress) {
		case 0x400008:
			return ToaGP9001ReadRAM_Hi(0);
		case 0x40000A:
			return ToaGP9001ReadRAM_Lo(0);
            
	}
    
	return 0;
}
Exemplo n.º 3
0
unsigned short __fastcall batriderReadWordGP9001(unsigned int sekAddress)
{
	switch (sekAddress) {
		case 0x400008:
			return ToaGP9001ReadRAM_Hi(0);
		case 0x40000A:
			return ToaGP9001ReadRAM_Lo(0);

	}

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

		case 0x200010:								// Player 1 inputs
			return DrvInput[0];
		case 0x200014:								// Player 2 inputs
			return DrvInput[1];
		case 0x200018:								// Other inputs
			return DrvInput[2];
		case 0x21F004:								// Dipswitch A
			return DrvInput[3];
		case 0x21F006:								// Dipswitch B
			return DrvInput[4];
		case 0x21F008:								// Dipswitch C - Territory
			return DrvInput[5];

		case 0x300004:
			return ToaGP9001ReadRAM_Hi(0);
		case 0x300006:
			return ToaGP9001ReadRAM_Lo(0);

		case 0x500004:
			return ToaGP9001ReadRAM_Hi(1);
		case 0x500006:
			return ToaGP9001ReadRAM_Lo(1);

		case 0x700000: {
//			int nCurrentScanline = (nCyclesDone[0] + nCyclesSegment - m68k_ICount) / ((16000000 / 60) / 0x0106);
			return 0;
		}

//		default:
//			printf("Attempt to read %06X (word).\n", sekAddress);
	}
	return 0;
}
Exemplo n.º 5
0
UINT16 __fastcall battlegReadWord(UINT32 sekAddress)
{
	switch (sekAddress) {

		case 0x21C03C:
			return ToaScanlineRegister();

		case 0x300004:
			return ToaGP9001ReadRAM_Hi(0);
		case 0x300006:
			return ToaGP9001ReadRAM_Lo(0);

//		default:
//			printf("Attempt to read word value of location %x\n", sekAddress);
	}
	return 0;
}
Exemplo n.º 6
0
UINT16 __fastcall ghoxReadWord(UINT32 sekAddress)
{
	switch (sekAddress) {
		case 0x18000c:								// Player 1 inputs
			return DrvInput[0];
		case 0x18000e:								// Player 2 inputs
			return DrvInput[1];
		case 0x180010:								// Other inputs
			return DrvInput[2];

		case 0x180006:								// Dipswitch 1
			return DrvInput[3];
		case 0x180008:			   					// Dipswitch 2
			return DrvInput[4];
		case 0x18100c:								// Dipswitch 3 - Territory
			return DrvInput[5]&0x0f;

		case 0x140004:
			return ToaGP9001ReadRAM_Hi(0);
		case 0x140006:
			return ToaGP9001ReadRAM_Lo(0);

		case 0x14000C:
			return ToaVBlankRegister();

		case 0x040000:
			return PaddleRead(1);

		case 0x100000:
			return PaddleRead(0);

		case 0x180000:
		case 0x180001:
			return 0xffff;

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

	if ((sekAddress & 0xfff000) == 0x180000) {
		return ShareRAM[(sekAddress >> 1) & 0x7ff];
	}

	return 0;
}
Exemplo n.º 7
0
static UINT16 __fastcall kbash2ReadWord(UINT32 sekAddress)
{
	switch (sekAddress) {

		case 0x200004:								// Dipswitch 1
			return DrvInput[3];
		case 0x200008:								// Dipswitch 2
			return DrvInput[4];
		case 0x20000c:								// Dipswitch 3 - Territory
			return DrvInput[5];

		case 0x200010:								// Player 1 Input
			return DrvInput[0];
		case 0x200014:			   					// Player 2 Input
			return DrvInput[1];
		case 0x200018:								// System...
			return DrvInput[2];

		case 0x200020:
			return MSM6295ReadStatus(1);

		case 0x200024:
			return MSM6295ReadStatus(0);

		case 0x20002c:
			return ToaScanlineRegister();

		case 0x300004:
			return ToaGP9001ReadRAM_Hi(0);
		case 0x300006:
			return ToaGP9001ReadRAM_Lo(0);

		case 0x30000C:								// VBlank
			return ToaVBlankRegister();

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

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

		case 0x208010:								// Player 1 inputs
			return DrvInput[0];
		case 0x208014:								// Player 2 inputs
			return DrvInput[1];
		case 0x208018:								// Other inputs
			return DrvInput[2];

		case 0x200000:
		 	return ZX80Status();

		case 0x200004:								// Dipswitch 1
			return DrvInput[3];
		case 0x200006:								// Dipswitch 2
			return DrvInput[4];
		case 0x200008:								// Dipswitch 3 - Territory
			return DrvInput[5];

		case 0x300004:
			return ToaGP9001ReadRAM_Hi(0);
		case 0x300006:
			return ToaGP9001ReadRAM_Lo(0);

		case 0x30000C:
			return ToaVBlankRegister();

		case 0x700000:
			return ToaScanlineRegister();

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

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

		case 0x21C020:								// Player 1 inputs
			return DrvInput[0];
		case 0x21C024:								// Player 2 inputs
			return DrvInput[1];
		case 0x21C028:								// Other inputs
			return DrvInput[2];
		case 0x21C02C:								// Dipswitch A
			return DrvInput[3];
		case 0x21C030:								// Dipswitch B
			return DrvInput[4];
		case 0x21C034:								// Dipswitch C - Territory
			return DrvInput[5];

		case 0x21C03C:
			return ToaScanlineRegister();

		case 0x300004:
			return ToaGP9001ReadRAM_Hi(0);
		case 0x300006:
			return ToaGP9001ReadRAM_Lo(0);

		case 0x30000C:
			return ToaVBlankRegister();

		default: {
			if ((sekAddress & 0x00FFC000) == 0x00218000) {
				return RamZ80[(sekAddress & 0x3FFF) >> 1];
			}

//			bprintf(PRINT_NORMAL, "Attempt to read word value of location %x\n", sekAddress);
		}
	}
	return 0;
}
Exemplo n.º 10
0
UINT16 __fastcall snowbro2ReadWord(UINT32 sekAddress)
{
	switch (sekAddress) {

		case 0x300004:
			return ToaGP9001ReadRAM_Hi(0);
		case 0x300006:
			return ToaGP9001ReadRAM_Lo(0);

		case 0x30000C:
			return ToaVBlankRegister();

		case 0x70000C:								// Player 1 inputs
			return DrvInput[0];
		case 0x700010:								// Player 2 inputs
			return DrvInput[1];
		case 0x700014:								// Player 3 inputs
			return DrvInput[6];
		case 0x700018:								// Player 4 inputs
			return DrvInput[7];
		case 0x70001C:								// Other inputs
			return DrvInput[2];
		case 0x700004:								// Dipswitch A
			return DrvInput[3];
		case 0x700008:								// Dipswitch B
			return DrvInput[4];

		case 0x600000:
			return MSM6295ReadStatus(0);
		case 0x500002:
			return BurnYM2151ReadStatus();

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