Beispiel #1
0
//-----------------------------------------------------------------------------
// rom_loaded()
//-----------------------------------------------------------------------------
void rom_loaded(void)
{
	int i;

	ngpc_rom.orig_data = (uint8 *)malloc(ngpc_rom.length);
	memcpy(ngpc_rom.orig_data, ngpc_rom.data, ngpc_rom.length);

	//Extract the header
	rom_header = (RomHeader*)(ngpc_rom.data);

	//Rom Name
	for(i = 0; i < 12; i++)
	{
		if (rom_header->name[i] >= 32 && rom_header->name[i] < 128)
			ngpc_rom.name[i] = rom_header->name[i];
		else
			ngpc_rom.name[i] = ' ';
	}
	ngpc_rom.name[i] = 0;

	rom_hack();	//Apply a hack if required!

	rom_display_header();

	flash_read();
}
Beispiel #2
0
//-----------------------------------------------------------------------------
// rom_loaded()
//-----------------------------------------------------------------------------
void rom_loaded(void)
{
	//Extract the header
	rom_header = (RomHeader*)(ngpc_rom.data);

	//Rom Name
	for(int i = 0; i < 12; i++)
	{
		if (rom_header->name[i] >= 32 && rom_header->name[i] < 128)
			ngpc_rom.name[i] = rom_header->name[i];
		else
			ngpc_rom.name[i] = ' ';
	}
	ngpc_rom.name[12] = 0;

	rom_hack();	//Apply a hack if required!

	rom_display_header();

	ngpc_rom.orig_data = (uint8 *)MDFN_malloc_T(ngpc_rom.length, _("ROM FLASH backup"));
	memcpy(ngpc_rom.orig_data, ngpc_rom.data, ngpc_rom.length);
}