Exemple #1
0
static unsigned int z80_in_neo(unsigned int port)
{
	int porth = (port>>8);

	port &= 0xff;
	switch (port)
	{
		case 0x0:
//			printf("Reading command %x\n", cmd_latch);
			cpu_set_irq_line(0, IRQ_LINE_NMI, CLEAR_LINE);
			return cmd_latch;
			break;
		case 0x4:
			return YM2610Read(0, 0);
			break;
		case 0x5:
			return YM2610Read(0, 1);
			break;
		case 0x6:
			return YM2610Read(0, 2);
			break;
		case 0x8:	// 2k window at f000
			nbnkf = (porth&0x7f)*0x800;
			cpu_setbank(4, &prgrom[nbnkf]);
//			printf("2k bank: porth = %x res = %x\n", porth, nbnkf);
			return 0;
			break;
		case 0x9:	// 4k window at e000
			nbnke = (porth&0x3f)*0x1000;
			cpu_setbank(3, &prgrom[nbnke]);
//			printf("4k bank: porth = %x res = %x\n", porth, nbnke);
			return 0;
			break;	
		case 0xa:	// 8k window at c000
			nbnkc = (porth&0x1f)*0x2000;
			cpu_setbank(2, &prgrom[nbnkc]);
//			printf("8k bank: porth = %x res = %x\n", porth, nbnkc);
			return 0;
			break;
		case 0xb:	// 16k window at 8000
			nbnk8 = (porth&0xf)*0x4000;
			cpu_setbank(1, &prgrom[nbnk8]);
//			printf("16k bank: porth = %x res = %x\n", porth, nbnk8);
			return 0;
			break;
	}

//	printf("Unknown read from port %x (PC=%x)\n", port, _z80_get_reg(Z80_REG_PC));
	return 0;
}
Exemple #2
0
int YM2610_status_port_1_B_r( int offset ) {
	return YM2610Read(1,2);
}
Exemple #3
0
int YM2610_read_port_1_r( int offset ){
	return YM2610Read(1,1);
}
Exemple #4
0
int YM2610_status_port_0_B_r( int offset )
{
//if(errorlog) fprintf(errorlog,"PC %04x: 2610 S0B=%02X\n",cpu_get_pc(),YM2610Read(0,2));
	return YM2610Read(0,2);
}