Ejemplo n.º 1
0
static u8   GBAgame_read08(u32 adr)
{ 
	//INFO("GBAgame: read08 at 0x%08X value 0x%02X\n", adr, (u8)T1ReadByte(GBArom, (adr - 0x08000000)));
	
	if (adr < 0x0A000000)
		return (u8)T1ReadByte(GBArom, (adr - 0x08000000));

	if (adr < 0x0A010000)
	{
		switch (saveType)
		{
			case 3:			// Flash
			case 5:
				return gbaReadFlash(adr);

			default:
				break;
		}
		
		//INFO("Read08 at 0x%08X val=0x%08X\n", adr, (u8)T1ReadByte(GBArom, (adr - 0x08000000)) );
		return (u8)T1ReadByte(saveData, (adr - 0x0A000000));
	}

	//INFO("Read08 at 0x%08X val=0x%08X\n", adr, (u8)T1ReadByte(GBArom, (adr - 0x08000000)) );

	return 0xFF;
}
Ejemplo n.º 2
0
static u8 ExpMemory_read08(u32 procnum, u32 adr)
{
	EXPINFO("ExpMemory: read 08 at 0x%08X\n", adr);
	
	if(adr>=0x080000B0 && adr<0x080000C0)
		return T1ReadByte(header_0x00B0,adr-0x080000B0);

	if (adr >= 0x09000000)
	{
		u32 offs = (adr - 0x09000000);
		if (offs >= expMemSize) return (0xFF);
		return T1ReadByte(expMemory, offs);
	}

	return 0xFF;
}
Ejemplo n.º 3
0
static u8   GBAgame_read08(u32 adr)
{ 
	//INFO("Read08 at 0x%08X value 0x%02X\n", adr, (u8)T1ReadByte(GBArom, (adr - 0x08000000)));
	if ( (adr >= 0x08000004) && (adr < 0x080000A0) )
		return MMU.MMU_MEM[0][0xFF][(adr +0x1C) & MMU.MMU_MASK[0][0xFF]];
	return (u8)T1ReadByte(GBArom, (adr - 0x08000000));
}
Ejemplo n.º 4
0
u8 FASTCALL Vdp1FrameBufferReadByte(u32 addr) {
   addr &= 0x3FFFF;
   if (VIDCore->Vdp1ReadFrameBuffer){
     u8 val;
     VIDCore->Vdp1ReadFrameBuffer(0, addr, &val);
     return val;
   }
   return T1ReadByte(Vdp1FrameBuffer, addr);
}
Ejemplo n.º 5
0
static u8   ExpMemory_read08(u32 adr)
{
	if (adr == 0x080000B2) return(0x96);

	if (adr >= 0x09000000)
	{
		u32 offs = (adr - 0x09000000);
		if (offs >= expMemSize) return (0);
		return (T1ReadByte(expMemory, offs));
	}

	EXPINFO("ExpMemory: read 08 at 0x%08X\n", adr);
	return (0);
}
Ejemplo n.º 6
0
u8 FASTCALL Vdp1RamReadByte(u32 addr) {
   addr &= 0x7FFFF;
   return T1ReadByte(Vdp1Ram, addr);
}
Ejemplo n.º 7
0
static u8 FASTCALL BupRamMemoryReadByte(u32 addr)
{
   return T1ReadByte(BupRam, addr & 0xFFFF);
}
Ejemplo n.º 8
0
LRESULT GInfo_Paint(HWND hDlg, WPARAM wParam, LPARAM lParam)
{
	HDC				hdc;
	PAINTSTRUCT		ps;
	char			text[80];
	u32				icontitleOffset;
	wchar_t			*utf16text;
	u32				val;
        
	hdc = BeginPaint(hDlg, &ps);

	icontitleOffset = T1ReadLong(MMU.CART_ROM, 0x68);

	if(icontitleOffset >= 0x8000)
	{
		utf16text = (wchar_t*)(MMU.CART_ROM + icontitleOffset + 0x240 + (0x100 * win_fw_config.language));
		sprintf(text, "%ws", utf16text);
		SetWindowText(GetDlgItem(hDlg, IDC_GI_TITLE), text);

		utf16text = (wchar_t*)(MMU.CART_ROM + icontitleOffset + 0x240);
		sprintf(text, "%ws", utf16text);
		SetWindowText(GetDlgItem(hDlg, IDC_GI_TITLEJP), text);

		utf16text = (wchar_t*)(MMU.CART_ROM + icontitleOffset + 0x340);
		sprintf(text, "%ws", utf16text);
		SetWindowText(GetDlgItem(hDlg, IDC_GI_TITLEEN), text);

		utf16text = (wchar_t*)(MMU.CART_ROM + icontitleOffset + 0x440);
		sprintf(text, "%ws", utf16text);
		SetWindowText(GetDlgItem(hDlg, IDC_GI_TITLEFR), text);

		utf16text = (wchar_t*)(MMU.CART_ROM + icontitleOffset + 0x540);
		sprintf(text, "%ws", utf16text);
		SetWindowText(GetDlgItem(hDlg, IDC_GI_TITLEGE), text);

		utf16text = (wchar_t*)(MMU.CART_ROM + icontitleOffset + 0x640);
		sprintf(text, "%ws", utf16text);
		SetWindowText(GetDlgItem(hDlg, IDC_GI_TITLEIT), text);

		utf16text = (wchar_t*)(MMU.CART_ROM + icontitleOffset + 0x740);
		sprintf(text, "%ws", utf16text);
		SetWindowText(GetDlgItem(hDlg, IDC_GI_TITLESP), text);
	}
	else
	{
		SetWindowText(GetDlgItem(hDlg, IDC_GI_TITLE), "\nNo title\n");

		SetWindowText(GetDlgItem(hDlg, IDC_GI_TITLEJP), "None");
		SetWindowText(GetDlgItem(hDlg, IDC_GI_TITLEEN), "None");
		SetWindowText(GetDlgItem(hDlg, IDC_GI_TITLEFR), "None");
		SetWindowText(GetDlgItem(hDlg, IDC_GI_TITLEGE), "None");
		SetWindowText(GetDlgItem(hDlg, IDC_GI_TITLEIT), "None");
		SetWindowText(GetDlgItem(hDlg, IDC_GI_TITLESP), "None");
	}


	memcpy(text, MMU.CART_ROM, 12);
	text[12] = '\0';
	SetWindowText(GetDlgItem(hDlg, IDC_GI_GAMETITLE), text);

	memcpy(text, (MMU.CART_ROM+0xC), 4);
	text[4] = '\0';
	SetWindowText(GetDlgItem(hDlg, IDC_GI_GAMECODE), text);

	memcpy(text, (MMU.CART_ROM+0x10), 2);
	text[2] = '\0';
	SetWindowText(GetDlgItem(hDlg, IDC_GI_MAKERCODE), text);

	val = T1ReadByte(MMU.CART_ROM, 0x14);
	sprintf(text, "%i kilobytes", (0x80 << val));
	SetWindowText(GetDlgItem(hDlg, IDC_GI_CHIPSIZE), text);


	val = T1ReadLong(MMU.CART_ROM, 0x20);
	sprintf(text, "0x%08X", val);
	SetWindowText(GetDlgItem(hDlg, IDC_GI_ARM9ROM), text);

	val = T1ReadLong(MMU.CART_ROM, 0x24);
	sprintf(text, "0x%08X", val);
	SetWindowText(GetDlgItem(hDlg, IDC_GI_ARM9ENTRY), text);

	val = T1ReadLong(MMU.CART_ROM, 0x28);
	sprintf(text, "0x%08X", val);
	SetWindowText(GetDlgItem(hDlg, IDC_GI_ARM9START), text);

	val = T1ReadLong(MMU.CART_ROM, 0x2C);
	sprintf(text, "%i bytes", val);
	SetWindowText(GetDlgItem(hDlg, IDC_GI_ARM9SIZE), text);

	val = T1ReadLong(MMU.CART_ROM, 0x30);
	sprintf(text, "0x%08X", val);
	SetWindowText(GetDlgItem(hDlg, IDC_GI_ARM7ROM), text);

	val = T1ReadLong(MMU.CART_ROM, 0x34);
	sprintf(text, "0x%08X", val);
	SetWindowText(GetDlgItem(hDlg, IDC_GI_ARM7ENTRY), text);

	val = T1ReadLong(MMU.CART_ROM, 0x38);
	sprintf(text, "0x%08X", val);
	SetWindowText(GetDlgItem(hDlg, IDC_GI_ARM7START), text);

	val = T1ReadLong(MMU.CART_ROM, 0x3C);
	sprintf(text, "%i bytes", val);
	SetWindowText(GetDlgItem(hDlg, IDC_GI_ARM7SIZE), text);


	val = T1ReadLong(MMU.CART_ROM, 0x40);
	sprintf(text, "0x%08X", val);
	SetWindowText(GetDlgItem(hDlg, IDC_GI_FNTOFS), text);

	val = T1ReadLong(MMU.CART_ROM, 0x44);
	sprintf(text, "%i bytes", val);
	SetWindowText(GetDlgItem(hDlg, IDC_GI_FNTSIZE), text);

	val = T1ReadLong(MMU.CART_ROM, 0x48);
	sprintf(text, "0x%08X", val);
	SetWindowText(GetDlgItem(hDlg, IDC_GI_FATOFS), text);

	val = T1ReadLong(MMU.CART_ROM, 0x4C);
	sprintf(text, "%i bytes", val);
	SetWindowText(GetDlgItem(hDlg, IDC_GI_FATSIZE), text);


	sprintf(text, "0x%08X", icontitleOffset);
	SetWindowText(GetDlgItem(hDlg, IDC_GI_ICONTITLEOFS), text);

	val = T1ReadLong(MMU.CART_ROM, 0x80);
	sprintf(text, "0x%08X", val);
	SetWindowText(GetDlgItem(hDlg, IDC_GI_USEDROMSIZE), text);


	EndPaint(hDlg, &ps);

	return 0;
}