Пример #1
0
/***************************************************************************

  Game driver(s)

***************************************************************************/


ROM_START( arkanoi2_rom )
	ROM_REGION(0x10000)				/* Region 0 - main cpu */
	ROM_LOAD( "a2-05.rom", 0x00000, 0x10000, 0x136edf9d )

	ROM_REGION_DISPOSE(0x20000*4)	/* Region 1 - temporary for gfx roms */
	ROM_LOAD( "a2-m04.rom", 0x00000, 0x20000, 0x548117c6 )	/* btp 0 */
	ROM_LOAD( "a2-m03.rom", 0x20000, 0x20000, 0x49a21c5e )	/* btp 1 */
	ROM_LOAD( "a2-m02.bin", 0x40000, 0x20000, 0x056a985f )	/* btp 2 */
	ROM_LOAD( "a2-m01.rom", 0x60000, 0x20000, 0x70cc559d )	/* btp 3 */

	ROM_REGION(0x10000)				/* Region 2 - sound cpu */
	ROM_LOAD( "a2-13.rom", 0x00000, 0x10000, 0xe8035ef1 )

	ROM_REGION(0x400)				/* Region 3 - color proms */
	ROM_LOAD( "b08-08.bin", 0x00000, 0x200, 0xa4f7ebd9 )	/* hi bytes */
	ROM_LOAD( "b08-07.bin", 0x00200, 0x200, 0xea34d9f7 )	/* lo bytes */
ROM_END

ROM_START( ark2us_rom )
	ROM_REGION(0x10000)				/* Region 0 - main cpu */
	ROM_LOAD( "b08-11.bin", 0x00000, 0x10000, 0x99555231 )

	ROM_REGION_DISPOSE(0x20000*4)	/* Region 1 - temporary for gfx roms */
	ROM_LOAD( "a2-m04.bin", 0x00000, 0x20000, 0x9754f703 )	/* btp 0 */
	ROM_LOAD( "a2-m03.bin", 0x20000, 0x20000, 0x274a795f )	/* btp 1 */
	ROM_LOAD( "a2-m02.bin", 0x40000, 0x20000, 0x056a985f )	/* btp 2 */
	ROM_LOAD( "a2-m01.bin", 0x60000, 0x20000, 0x2ccc86b4 )	/* btp 3 */

	ROM_REGION(0x10000)				/* Region 2 - sound cpu */
	ROM_LOAD( "b08-12.bin", 0x00000, 0x10000, 0xdc84e27d )

	ROM_REGION(0x400)				/* Region 3 - color proms */
	ROM_LOAD( "b08-08.bin", 0x00000, 0x200, 0xa4f7ebd9 )	/* hi bytes */
	ROM_LOAD( "b08-07.bin", 0x00200, 0x200, 0xea34d9f7 )	/* lo bytes */
ROM_END


static int arkanoi2_hiload(void)
{
	unsigned char *RAM = Machine->memory_region[0];

		void *f;

		if ((f = osd_fopen(Machine->gamedrv->name,0,OSD_FILETYPE_HIGHSCORE,0)) != 0)
		{
			osd_fread(f, &RAM[0xe3a8], 3);
			osd_fclose(f);
		}


	/* check if the hi score table has already been initialized */
	if (memcmp(&RAM[0xeca5], "\x54\x4b\x4e\xff", 4) == 0 && memcmp(&RAM[0xec81], "\x01\x00\x00\x05", 4) == 0 )
	{

		if ((f = osd_fopen(Machine->gamedrv->name,0,OSD_FILETYPE_HIGHSCORE,0)) != 0)
		{
			osd_fread(f, &RAM[0xec81], 8*5);
			osd_fclose(f);
		}

		return 1;
	}
	else return 0; /* we can't load the hi scores yet */
}
Пример #2
0
static int turtles_hiload(void) /* V.V */
{
	unsigned char *RAM = Machine->memory_region[Machine->drv->cpu[0].memory_region];


	/* same as Amidar, but the high score table is initialized with zeros */
	/* a working quick-and-dirty solution is to update the top high score */
	/* and the whole table at different times */
	/* further study of the game code may provide a cleaner solution */

	static int first_pass = 0;
	static unsigned char top_score[] = { 0, 0, 0 };

	if (first_pass == 0)
	{
		void *f;

			if ((f = osd_fopen(Machine->gamedrv->name,0,OSD_FILETYPE_HIGHSCORE,0)) != 0)
			{
				osd_fread(f,top_score,3);
				osd_fclose(f);
			}
		first_pass = 1;
	}

	if ((memcmp(&RAM[0x80A0],"\xc0\xc0\x00",3) == 0))
	{
		RAM[0x80a8] = top_score[0];
		RAM[0x80a9] = top_score[1];
		RAM[0x80aa] = top_score[2];
		return 0;
	} /* continuously updating top high score - really dirty solution */

	else if (memcmp(&RAM[0x80A0],"\xc6\xc6\x00",3) == 0)
	{
		void *f;


		if ((f = osd_fopen(Machine->gamedrv->name,0,OSD_FILETYPE_HIGHSCORE,0)) != 0)
		{
			osd_fread(f,&RAM[0x8200],3*10);
			osd_fclose(f);
		}

		return 1;
	}
	else return 0;  /* we can't load the hi scores yet */
}
Пример #3
0
static void hs_load (void)
{
	void *f = osd_fopen (Machine->gamedrv->name, 0, OSD_FILETYPE_HIGHSCORE, 0);
	state.hiscores_have_been_loaded = 1;
	LOG(("hs_load\n"));
	if (f)
	{
		struct mem_range *mem_range = state.mem_range;
		LOG(("loading...\n"));
		while (mem_range)
		{
			UINT8 *data = (UINT8*)malloc(mem_range->num_bytes);
			if (data)
			{
				/*	this buffer will almost certainly be small
					enough to be dynamically allocated, but let's
					avoid memory trashing just in case
				*/
				osd_fread (f, data, mem_range->num_bytes);
				copy_to_memory (mem_range->cpu, mem_range->addr, data, mem_range->num_bytes);
				free(data);
			}
			mem_range = mem_range->next;
		}
		osd_fclose (f);
	}
}
Пример #4
0
ROM_END



static int vanguard_hiload(void)     /* V.V */
{
	unsigned char *RAM = Machine->memory_region[Machine->drv->cpu[0].memory_region];


	/* check if the hi score table has already been initialized */
	if (memcmp(&RAM[0x0025],"\x00\x10",2) == 0)
	{
		void *f;

		if ((f = osd_fopen(Machine->gamedrv->name,0,OSD_FILETYPE_HIGHSCORE,0)) != 0)
		{
			osd_fread(f,&RAM[0x0025],3);
			osd_fread(f,&RAM[0x0220],112);
			osd_fread(f,&RAM[0x02a0],16);
			osd_fclose(f);
		}

		return 1;
	}
	else return 0;   /* we can't load the hi scores yet */

}
Пример #5
0
ROM_END



static int hiload(void)
{
	unsigned char *RAM = Machine->memory_region[Machine->drv->cpu[0].memory_region];


	/* check if the hi score table has already been initialized */
	if (memcmp(&RAM[0xe204],"\x02\x00\x00",3) == 0 &&
			memcmp(&RAM[0xe244],"\x01\x02\x00",3) == 0 &&
			memcmp(&RAM[0xe012],"\x6a\x81\x00",3) == 0)

	{
		void *f;


		if ((f = osd_fopen(Machine->gamedrv->name,0,OSD_FILETYPE_HIGHSCORE,0)) != 0)
		{
			osd_fread(f,&RAM[0xe200],16*5);
			memcpy(&RAM[0xe1e0],&RAM[0xe200],8);
			osd_fclose(f);
		}

		return 1;
	}
	else return 0;	/* we can't load the hi scores yet */
}
Пример #6
0
static int maketrax_hiload(void)
{
    static int resetcount;
    void *f;
    unsigned char *RAM = Machine->memory_region[Machine->drv->cpu[0].memory_region];


    /* during a reset, leave time to the game to clear the screen */
    if (++resetcount < 60) return 0;

    /* wait for "HI SCORE" to be on screen */
    if (memcmp(&RAM[0x43d0],"\x53\x40\x49\x48",4) == 0)
    {
        resetcount = 0;

        if ((f = osd_fopen(Machine->gamedrv->name,0,OSD_FILETYPE_HIGHSCORE,0)) != 0)
        {
            osd_fread(f,&RAM[0x4E40],30);

            RAM[0x4c80] = RAM[0x4e43];
            RAM[0x4c81] = RAM[0x4e44];
            RAM[0x4c82] = RAM[0x4e45];

            osd_fclose(f);
        }

        return 1;
    }
    else return 0;  /* we can't load the hi scores yet */
}
Пример #7
0
//-----------------------------------
// Destructor
//-----------------------------------
CSystem_IniFile::~CSystem_IniFile( void )
{
	if( !m_dirtyFlag || m_fileName == "" )
		return;

    // Write via osd_fwrite, as it's buffered
  osd_file *file = osd_fopen( FILETYPE_MAMEOX_FULLPATH, 0, m_fileName.c_str(), "w" );
  if( !file )
    return;

	std::map< std::string, std::vector<std::string> >::iterator i = m_data.begin();
	for( ; i != m_data.end(); ++i )
	{
    osd_fwrite( file, (*i).first.c_str(), (*i).first.length() );
    osd_fwrite( file, "\n", 1 );

		std::vector<std::string>::iterator j = (*i).second.begin();
		for( ; j != (*i).second.end(); ++j )
    {
      osd_fwrite( file, (*j).c_str(), (*j).length() );
      osd_fwrite( file, "\n", 1 );
    }

    osd_fwrite( file, "\n\n", 2 );
	}

  osd_fclose( file );
}
Пример #8
0
static void hs_save (void)
{
	void *f = osd_fopen (Machine->gamedrv->name, 0, OSD_FILETYPE_HIGHSCORE, 1);
	LOG(("hs_save\n"));
	if (f)
	{
		struct mem_range *mem_range = state.mem_range;
		LOG(("saving...\n"));
		while (mem_range)
		{
			UINT8 *data = (UINT8*)malloc(mem_range->num_bytes);
			if (data)
			{
				/*	this buffer will almost certainly be small
					enough to be dynamically allocated, but let's
					avoid memory trashing just in case
				*/
				copy_from_memory (mem_range->cpu, mem_range->addr, data, mem_range->num_bytes);
				osd_fwrite(f, data, mem_range->num_bytes);
				free(data);
			}
			mem_range = mem_range->next;
		}
		osd_fclose(f);
	}
}
Пример #9
0
/***************************************************************************

  Game driver(s)

***************************************************************************/

ROM_START( kicker_rom )
	ROM_REGION(0x10000)     /* 64k for code */
	ROM_LOAD( "kikrd8.bin",   0x6000, 0x2000, 0x2598dfdd )
	ROM_LOAD( "kikrd9.bin",   0x8000, 0x4000, 0x0cf0351a )
	ROM_LOAD( "kikrd11.bin",  0xC000, 0x4000, 0x654037f8 )

	ROM_REGION_DISPOSE(0xc000)	/* temporary space for graphics (disposed after conversion) */
	ROM_LOAD( "kikra10.bin",  0x0000, 0x2000, 0x4d156afc )
	ROM_LOAD( "kikra11.bin",  0x2000, 0x2000, 0xff6ca5df )
	ROM_LOAD( "kikrh14.bin",  0x4000, 0x4000, 0xb94e645b )
	ROM_LOAD( "kikrh13.bin",  0x8000, 0x4000, 0x61bbf797 )

	ROM_REGION(0x0500)	/* color proms */
	ROM_LOAD( "kicker.a12",   0x0000, 0x0100, 0xb09db4b4 ) /* palette red component */
	ROM_LOAD( "kicker.a13",   0x0100, 0x0100, 0x270a2bf3 ) /* palette green component */
	ROM_LOAD( "kicker.a14",   0x0200, 0x0100, 0x83e95ea8 ) /* palette blue component */
	ROM_LOAD( "kicker.b8",    0x0300, 0x0100, 0xaa900724 ) /* character lookup table */
	ROM_LOAD( "kicker.f16",   0x0400, 0x0100, 0x80009cf5 ) /* sprite lookup table */
ROM_END

ROM_START( shaolins_rom )
	ROM_REGION(0x10000)     /* 64k for code */
	ROM_LOAD( "kikrd8.bin",   0x6000, 0x2000, 0x2598dfdd )
	ROM_LOAD( "kikrd9.bin",   0x8000, 0x4000, 0x0cf0351a )
	ROM_LOAD( "kikrd11.bin",  0xC000, 0x4000, 0x654037f8 )

	ROM_REGION_DISPOSE(0xc000)	/* temporary space for graphics (disposed after conversion) */
	ROM_LOAD( "shaolins.6",   0x0000, 0x2000, 0xff18a7ed )
	ROM_LOAD( "shaolins.7",   0x2000, 0x2000, 0x5f53ae61 )
	ROM_LOAD( "kikrh14.bin",  0x4000, 0x4000, 0xb94e645b )
	ROM_LOAD( "kikrh13.bin",  0x8000, 0x4000, 0x61bbf797 )

	ROM_REGION(0x0500)	/* color proms */
	ROM_LOAD( "kicker.a12",   0x0000, 0x0100, 0xb09db4b4 ) /* palette red component */
	ROM_LOAD( "kicker.a13",   0x0100, 0x0100, 0x270a2bf3 ) /* palette green component */
	ROM_LOAD( "kicker.a14",   0x0200, 0x0100, 0x83e95ea8 ) /* palette blue component */
	ROM_LOAD( "kicker.b8",    0x0300, 0x0100, 0xaa900724 ) /* character lookup table */
	ROM_LOAD( "kicker.f16",   0x0400, 0x0100, 0x80009cf5 ) /* sprite lookup table */
ROM_END



static int hiload(void)
{
	unsigned char *RAM = Machine->memory_region[Machine->drv->cpu[0].memory_region];


	/* check if the hi score table has already been initialized */
	if (memcmp(&RAM[0x2b00],"\x1d\x2c\x1f\x01\x00",5) == 0)
	{
		void *f;


		if ((f = osd_fopen(Machine->gamedrv->name,0,OSD_FILETYPE_HIGHSCORE,0)) != 0)
		{
			osd_fread(f,&RAM[0x2b00],0x40);

			/* top score display */
			fast_memcpy(&RAM[0x2af0], &RAM[0x2b04], 4);

			/* 1p score display, which also displays the top score on startup */
			fast_memcpy(&RAM[0x2a81], &RAM[0x2b04], 4);

			osd_fclose(f);
		}

		return 1;
	}
	else return 0;	/* we can't load the hi scores yet */
}
Пример #10
0
	/* all the following are banked at 0x4000-0x5fff */
	ROM_LOAD( "pl1-3",        0x10000, 0x4000, 0xaa9fa739 )
	ROM_LOAD( "pl1-4",        0x14000, 0x4000, 0x2b895a90 )
	ROM_LOAD( "pl1-5",        0x18000, 0x4000, 0x7af66200 )
	ROM_LOAD( "pl1-6",        0x1c000, 0x4000, 0xb01e59a9 )

	ROM_REGION_DISPOSE(0x20000)	/* temporary space for graphics (disposed after conversion) */
	ROM_LOAD( "pl1-12",       0x00000, 0x2000, 0xc159fbce )	/* chars */
	ROM_LOAD( "pl1-13",       0x02000, 0x2000, 0x6c5ed9ae )
	ROM_LOAD( "pl1-9",        0x10000, 0x4000, 0xf5d5962b )	/* sprites */
	ROM_LOAD( "pl1-10",       0x14000, 0x4000, 0xc7cf1904 )
	ROM_LOAD( "pl1-8",        0x18000, 0x4000, 0xa2ebfa4a )
	ROM_LOAD( "pl1-11",       0x1c000, 0x4000, 0x6621361a )

	ROM_REGION(0x1400)	/* color PROMs */
	ROM_LOAD( "pl1-2.bin",    0x0000, 0x0400, 0x472885de )	/* red and green component */
	ROM_LOAD( "pl1-1.bin",    0x0400, 0x0400, 0xa78ebdaf )	/* blue component */
	ROM_LOAD( "pl1-3.bin",    0x0800, 0x0400, 0x80558da8 )	/* sprites lookup table */
	ROM_LOAD( "pl1-5.bin",    0x0c00, 0x0400, 0x4b7ee712 )	/* foreground lookup table */
	ROM_LOAD( "pl1-4.bin",    0x1000, 0x0400, 0x3a7be418 )	/* background lookup table */

	ROM_REGION(0x10000)	/* 64k for code */
	ROM_LOAD( "pl1-7",        0x8000, 0x2000, 0x8c5becae ) /* sub program for the mcu */
	ROM_LOAD( "pl1-mcu.bin",  0xf000, 0x1000, 0x6ef08fb3 ) /* microcontroller */
ROM_END



static int hiload(void)
{
	unsigned char *RAM = Machine->memory_region[Machine->drv->cpu[0].memory_region];


	if  (memcmp(&RAM[0x2140],"\x00\x08\x00",3) == 0 &&
			memcmp(&RAM[0x02187],"\xE6\xE6\xE6",3) == 0 )
	{
		void *f;

		if ((f = osd_fopen(Machine->gamedrv->name,0,OSD_FILETYPE_HIGHSCORE,0)) != 0)
		{
			osd_fread(f,&RAM[0x2140],74);
			RAM[0x205D] = RAM[0x2140];
			RAM[0x205E] = RAM[0x2141];
			RAM[0x205F] = RAM[0x2142];

			osd_fclose(f);
		}

		return 1;
	}
	else return 0;   /* we can't load the hi scores yet */
}
Пример #11
0
static int jackrabt_hiload(void)
{
	unsigned char *RAM = Machine->memory_region[Machine->drv->cpu[0].memory_region];


	/* check if the hi score table has already been initialized */
	if ((memcmp(&RAM[0x73ba],"\x0a\x0a\x0a",3) == 0) &&
	    (memcmp(&RAM[0x73c2],"\x0b\x0b\x0b",3) == 0))
	{
		void *f;


		if ((f = osd_fopen(Machine->gamedrv->name,0,OSD_FILETYPE_HIGHSCORE,0)) != 0)
		{
			osd_fread(f,&RAM[0x73ba],8*6);
			osd_fread(f,&RAM[0x73ea],8*3);
			RAM[0x727d] = RAM[0x73ea];
			RAM[0x727e] = RAM[0x73eb];
			RAM[0x727f] = RAM[0x73ec];
			osd_fclose(f);
		}

		return 1;
	}
	else return 0;	/* we can't load the hi scores yet */
}
Пример #12
0
ROM_END


/* Ten entries, 13 bytes each:  3 bytes - score/10 (BCD)
					 10 bytes - name (ASCII)		*/
static int galivan_hiload(void)
{
	unsigned char *RAM = Machine->memory_region[0];

	/* check if the high scores table has already been initialized */
	if ((memcmp(&RAM[0xe14f], "\x00\x01\x50\x4B", 4) == 0)&&
	    (memcmp(&RAM[0xe1cd], "\x54\x45\x52\x20", 4) == 0))
	{
		void *f;

		if ((f = osd_fopen(Machine->gamedrv->name,0,OSD_FILETYPE_HIGHSCORE,0)) != 0)
		{
			osd_fread(f, &RAM[0xe14f], 13*10);
			osd_fclose(f);
		}

		return 1;
	}
	else return 0; /* we can't load the high scores yet */
}
Пример #13
0
ROM_END



static int gsword_hiload(void)
{
	/* get RAM pointer (this game is multiCPU, we can't assume the global */
	/* RAM pointer is pointing to the right place) */
	unsigned char *RAM = Machine->memory_region[0];

        /* Work RAM - 9c00 (3*10 for scores), 9c78(6*10 for names)*/
        /* check if the hi score table has already been initialized */

        if( memcmp(&RAM[0x9c00],"\x00\x00\x01",3) == 0)
	{
                void *f = osd_fopen(Machine->gamedrv->name,0,OSD_FILETYPE_HIGHSCORE,0);
		if (f)
		{
                        osd_fread(f,&RAM[0x9c00],3*10);
                        osd_fread(f,&RAM[0x9c78],6*10);
			osd_fclose(f);
                }
		return 1;
	}
	return 0;  /* we can't load the hi scores yet */
}
Пример #14
0
ROM_END

/* HSC 12/02/98 */
static int hiload(void)
{

	static int firsttime =0;
	unsigned char *RAM = Machine->memory_region[Machine->drv->cpu[0].memory_region];
	if (firsttime == 0)
		{
			fast_memset(&RAM[0x4014],0xff,5); /* hi score */
			fast_memset(&RAM[0x417d],0xff,12); /* name */
			firsttime = 1;
		}

    /* check if the hi score table has already been initialized */
    if (memcmp(&RAM[0x4014],"\x00\x00\x00\x00\x00",5) == 0 &&
		memcmp(&RAM[0x417f],"\x11\x12\x29\x1c\x0c\x18\x1b\x0e\x00\x00",10) == 0  )
    {
        void *f;

        if ((f = osd_fopen(Machine->gamedrv->name,0,OSD_FILETYPE_HIGHSCORE,0)) != 0)
        {
            osd_fread(f,&RAM[0x4014],5);
			osd_fread(f,&RAM[0x417d],12);
			osd_fclose(f);
        }
		firsttime = 0;
        return 1;
    }
    else return 0;  /* we can't load the hi scores yet */
}
Пример #15
0
ROM_END



static int amidar_hiload(void)
{
	unsigned char *RAM = Machine->memory_region[Machine->drv->cpu[0].memory_region];


	/* check if the hi score table has already been initialized */
	if (memcmp(&RAM[0x8200],"\x00\x00\x01",3) == 0 &&
			memcmp(&RAM[0x821b],"\x00\x00\x01",3) == 0)
	{
		void *f;


		if ((f = osd_fopen(Machine->gamedrv->name,0,OSD_FILETYPE_HIGHSCORE,0)) != 0)
		{
			osd_fread(f,&RAM[0x8200],3*10);
			RAM[0x80a8] = RAM[0x8200];
			RAM[0x80a9] = RAM[0x8201];
			RAM[0x80aa] = RAM[0x8202];
			osd_fclose(f);
		}

		return 1;
	}
	else return 0;	/* we can't load the hi scores yet */
}
Пример #16
0
ROM_END



static int hiload(void)
{
	unsigned char *RAM = Machine->memory_region[Machine->drv->cpu[0].memory_region];


	/* check if the hi score table has already been initialized */
	if ((memcmp(&RAM[0x0308],"\x00\x00\x21",3) == 0) &&
		(memcmp(&RAM[0x033C],"\x0C\x1D\x0C",3) == 0))
	{
		void *f;


		if ((f = osd_fopen(Machine->gamedrv->name,0,OSD_FILETYPE_HIGHSCORE,0)) != 0)
		{
			osd_fread(f,&RAM[0x0308],11*5);
			osd_fclose(f);
		}

		return 1;
	}
	else return 0;	/* we can't load the hi scores yet */
}
Пример #17
0
							/* 0x7000 -0x7fff empty for my convinience */

	ROM_REGION(0x0200)	/* color proms */
	ROM_LOAD( "1b.vid",        0x0000, 0x0100, 0xa2f935aa ) /* palette low 4 bits */
	ROM_LOAD( "1c.vid",        0x0100, 0x0100, 0xb95421f4 ) /* palette high 4 bits */
ROM_END

ROM_START( hoccer_rom )
	ROM_REGION(0x10000)	/* 64k for code */
	ROM_LOAD( "hr1.cpu",       0x0000, 0x2000, 0x12e96635 )
	ROM_LOAD( "hr2.cpu",       0x2000, 0x2000, 0xcf1fc328 )
	ROM_LOAD( "hr3.cpu",       0x4000, 0x2000, 0x048a0659 )
	ROM_LOAD( "hr4.cpu",       0x6000, 0x2000, 0x9a788a2c )

	ROM_REGION_DISPOSE(0x6000)	/* temporary space for graphics (disposed after conversion) */
	ROM_LOAD( "hr.d",          0x0000, 0x2000, 0xd33aa980 )
	ROM_RELOAD(				   0x2000, 0x2000 )
	ROM_LOAD( "hr.c",          0x4000, 0x2000, 0x02808294 )

	ROM_REGION(0x0200)  /* color proms */
	ROM_LOAD( "hr.1b",         0x0000, 0x0100, 0x896521d7 ) /* palette low 4 bits */
	ROM_LOAD( "hr.1c",         0x0100, 0x0100, 0x2efdd70b ) /* palette high 4 bits */
ROM_END

ROM_START( hoccer2_rom )
	ROM_REGION(0x10000)	/* 64k for code */
	ROM_LOAD( "hr.1",          0x0000, 0x2000, 0x122d159f )
	ROM_LOAD( "hr.2",          0x2000, 0x2000, 0x48e1efc0 )
	ROM_LOAD( "hr.3",          0x4000, 0x2000, 0x4e67b0be )
	ROM_LOAD( "hr.4",          0x6000, 0x2000, 0xd2b44f58 )

	ROM_REGION_DISPOSE(0x6000)	/* temporary space for graphics (disposed after conversion) */
	ROM_LOAD( "hr.d",          0x0000, 0x2000, 0xd33aa980 )
	ROM_RELOAD(				   0x2000, 0x2000 )
	ROM_LOAD( "hr.c",          0x4000, 0x2000, 0x02808294 )

	ROM_REGION(0x0200)  /* color proms */
	ROM_LOAD( "hr.1b",         0x0000, 0x0100, 0x896521d7 ) /* palette low 4 bits */
	ROM_LOAD( "hr.1c",         0x0100, 0x0100, 0x2efdd70b ) /* palette high 4 bits */
ROM_END

ROM_START( wanted_rom )
	ROM_REGION(0x10000)       /* 64k for code */
	ROM_LOAD( "prg-1",		   0x0000, 0x2000, 0x2dd90aed )
	ROM_LOAD( "prg-2",		   0x2000, 0x2000, 0x67ac0210 )
	ROM_LOAD( "prg-3",		   0x4000, 0x2000, 0x373c7d82 )

	ROM_REGION_DISPOSE(0x8000)  /* temporary space for graphics (disposed after conversion) */
	ROM_LOAD( "vram-1",		   0x0000, 0x2000, 0xc4226e54 )
	ROM_LOAD( "vram-2",		   0x2000, 0x2000, 0x2a9b1e36 )
	ROM_LOAD( "obj-a",		   0x4000, 0x2000, 0x90b60771 )
	ROM_LOAD( "obj-b",		   0x6000, 0x2000, 0xe14ee689 )

	ROM_REGION(0x0200)  /* color proms */
	ROM_LOAD( "wanted.k7",	   0x0000, 0x0100, 0x2ba90a00 )	/* palette low 4 bits */
	ROM_LOAD( "wanted.k6",	   0x0100, 0x0100, 0xa93d87cc )	/* palette high 4 bits */
ROM_END

ROM_START( hopprobo_rom )
	ROM_REGION(0x10000)	/* 64k for code */
	ROM_LOAD( "hopper01.3k",   0x0000, 0x1000, 0xfd7935c0 )
	ROM_LOAD( "hopper02.3l",   0x1000, 0x1000, 0xdf1a479a )
	ROM_LOAD( "hopper03.3n",   0x2000, 0x1000, 0x097ac2a7 )
	ROM_LOAD( "hopper04.3p",   0x3000, 0x1000, 0x0f4f3ca8 )
	ROM_LOAD( "hopper05.3r",   0x4000, 0x1000, 0x9d77a37b )

	ROM_REGION_DISPOSE(0x8000)	/* temporary space for graphics (disposed after conversion) */
	ROM_LOAD( "hopper06.5c",   0x0000, 0x2000, 0x68f79bc8 )
	ROM_LOAD( "hopper07.5d",   0x2000, 0x1000, 0x33d82411 )
	ROM_RELOAD(				   0x3000, 0x1000 )
	ROM_LOAD( "hopper08.6f",   0x4000, 0x2000, 0x06d37e64 )
	ROM_LOAD( "hopper09.6k",   0x6000, 0x2000, 0x047921c7 )

	ROM_REGION(0x0200)	/* color proms */
	ROM_LOAD( "7052hop.1b",    0x0000, 0x0100, 0x94450775 ) /* palette low 4 bits */
	ROM_LOAD( "7052hop.1c",    0x0100, 0x0100, 0xa76bbd51 ) /* palette high 4 bits */
ROM_END


static int wanted_hiload(void)
{
	unsigned char *RAM = Machine->memory_region[Machine->drv->cpu[0].memory_region];

	/* check if the hi score table has already been initialized */
	if (memcmp(&RAM[0x81b4],"\x00\x03\x00",3) == 0)
	{
		void *f;

		if ((f = osd_fopen(Machine->gamedrv->name,0,OSD_FILETYPE_HIGHSCORE,0)) != 0)
		{
			osd_fread(f,&RAM[0x81b4], 16*5);        /* HS table */

			RAM[0x81b4] = RAM[0x81b4];      /* update high score */
			RAM[0x81b5] = RAM[0x81b5];      /* on top of screen */
			RAM[0x81b6] = RAM[0x81b6];
			RAM[0x81b7] = RAM[0x81b7];
			RAM[0x81b8] = RAM[0x81b8];
			RAM[0x81b9] = RAM[0x81b9];
			osd_fclose(f);
		}

		return 1;
	}
	else return 0;	/* we can't load the hi scores yet */
}
Пример #18
0
static int hiload(void)
{
	unsigned char *RAM = Machine->memory_region[Machine->drv->cpu[0].memory_region];


	if (memcmp(&RAM[0x2163],"CBR",3) == 0 &&
		memcmp(&RAM[0x20A6],"\x01\x98\x30",3) == 0 &&
		memcmp(&RAM[0x3627],"\x01",1) == 0)
	{
		void *f;

		if ((f = osd_fopen(Machine->gamedrv->name,0,OSD_FILETYPE_HIGHSCORE,0)) != 0)
		{
			osd_fread(f,&RAM[0x2160],0x32);
			RAM[0x20A6] = RAM[0x2160];
			RAM[0x20A7] = RAM[0x2161];
			RAM[0x20A8] = RAM[0x2162];

			/* Copy high score to videoram */
			RAM[0x35A7] = RAM[0x2162] & 0x0F;
			RAM[0x35C7] = (RAM[0x2162] & 0xF0) >> 4;
			RAM[0x35E7] = RAM[0x2161] & 0x0F;
			RAM[0x3607] = (RAM[0x2161] & 0xF0) >> 4;
			RAM[0x3627] = RAM[0x2160] & 0x0F;
			if ((RAM[0x2160] & 0xF0) != 0)
				RAM[0x3647] = (RAM[0x2160] & 0xF0) >> 4;

			osd_fclose(f);
		}
Пример #19
0
static int hiload(void)
{
	unsigned char *RAM = Machine->memory_region[Machine->drv->cpu[0].memory_region];
	static int resetcount;


	/* during a reset, leave time to the game to clear the screen */
	if (++resetcount < 10) return 0;

	if(memcmp(&RAM[0x0240],"\x20\x31\x53",3) == 0 &&
			memcmp(&RAM[0x028D],"\x00\x77\x00",3) == 0)
	{
		void *f;

		if ((f = osd_fopen(Machine->gamedrv->name,0,OSD_FILETYPE_HIGHSCORE,0)) != 0)
		{
			osd_fread(f,&RAM[0x0240],80);
			osd_fclose(f);
		}

		resetcount = 0;

		return 1;
	}
	else return 0;   /* we can't load the hi scores yet */
}
Пример #20
0
static int kingofb_hiload(void)
{
	unsigned char *RAM1 = Machine->memory_region[Machine->drv->cpu[0].memory_region];
	unsigned char *RAM2 = Machine->memory_region[Machine->drv->cpu[1].memory_region];


	if  (memcmp(&RAM2[0x8048],"\x00\x15\x00",3) == 0 &&
    	 memcmp(&RAM2[0x80D1],"\x10\x11\x12",3) == 0 &&
		 memcmp(&RAM1[0xc22b],"\x03\x00\x05\x00\x00\x00",6) == 0)
	{
		void *f;

		if ((f = osd_fopen(Machine->gamedrv->name,0,OSD_FILETYPE_HIGHSCORE,0)) != 0)
		{
			osd_fread(f,&RAM2[0x8048],140);
			osd_fclose(f);

			RAM1[0xc22a]=(RAM2[0x8063] >> 4 );
			RAM1[0xc22b]=(RAM2[0x8063] & 0x0f );
			RAM1[0xc22c]=(RAM2[0x8064] >> 4 );
			RAM1[0xc22d]=(RAM2[0x8064] & 0x0f );



		}
Пример #21
0
struct GameSamples *readsamples(const char **samplenames,const char *basename)
/* V.V - avoids samples duplication */
/* if first samplename is *dir, looks for samples into "basename" first, then "dir" */
{
	int i;
	struct GameSamples *samples;
	int skipfirst = 0;

	/* if the user doesn't want to use samples, bail */
	if (!options.use_samples) return 0;

	if (samplenames == 0 || samplenames[0] == 0) return 0;

	if (samplenames[0][0] == '*')
		skipfirst = 1;

	i = 0;
	while (samplenames[i+skipfirst] != 0) i++;

	if (!i) return 0;

	if ((samples = malloc(sizeof(struct GameSamples) + (i-1)*sizeof(struct GameSample))) == 0)
		return 0;

	samples->total = i;
	for (i = 0;i < samples->total;i++)
		samples->sample[i] = 0;

	for (i = 0;i < samples->total;i++)
	{
		void *f;

		if (samplenames[i+skipfirst][0])
		{
			if ((f = osd_fopen(basename,samplenames[i+skipfirst],OSD_FILETYPE_SAMPLE,0)) == 0)
				if (skipfirst)
					f = osd_fopen(samplenames[0]+1,samplenames[i+skipfirst],OSD_FILETYPE_SAMPLE,0);
			if (f != 0)
			{
				samples->sample[i] = read_wav_sample(f);
				osd_fclose(f);
			}
		}
	}

	return samples;
}
Пример #22
0
static void terracre_hisave(void)
{
        void *f;

        if ((f = osd_fopen(Machine->gamedrv->name,0,OSD_FILETYPE_HIGHSCORE,1)) != 0)
        {
                osd_fwrite_msbfirst(f,&terrac_ram[0x46],14*5);
                osd_fclose(f);
        }
}
Пример #23
0
static void hisave(void)
{
	void *f;

	if ((f = osd_fopen(Machine->gamedrv->name,0,OSD_FILETYPE_HIGHSCORE,1)) != 0)
	{
		osd_fwrite(f,&ram[0x6B66],180);
		osd_fclose(f);
	}
}
Пример #24
0
/* Revive a suspended zip file (reopen file handler)
   in:
     zip suspended zip
   return:
	zip success
	==0 error (zip must be closed with closezip)
*/
static ZIP* revivezip(ZIP* zip) {
	if (!zip->fp) {
		zip->fp = osd_fopen(zip->pathtype, zip->pathindex, zip->zip, "rb");
		if (!zip->fp) {
			return 0;
		}
	}
	return zip;

}
Пример #25
0
static void galivan_hisave(void)
{
    unsigned char *RAM = Machine->memory_region[0];
    void *f;

	if ((f = osd_fopen(Machine->gamedrv->name,0,OSD_FILETYPE_HIGHSCORE,1)) != 0)
	{
		osd_fwrite(f, &RAM[0xe14f], 13*10);
		osd_fclose(f);
	}
}
Пример #26
0
static void wanted_hisave(void)
{
	void *f;
	unsigned char *RAM = Machine->memory_region[Machine->drv->cpu[0].memory_region];

	if ((f = osd_fopen(Machine->gamedrv->name,0,OSD_FILETYPE_HIGHSCORE,1)) != 0)
	{
		osd_fwrite(f,&RAM[0x81b4], 16*5);       /* HS table */
		osd_fclose(f);
	}
}
Пример #27
0
static void novram_save(void)
{
	void *f;
	unsigned char *RAM = Machine->memory_region[0];

	if ((f = osd_fopen(Machine->gamedrv->name,0,OSD_FILETYPE_HIGHSCORE,1)) != 0)
	{
        osd_fwrite(f,&RAM[0x1200],256);
		osd_fclose(f);
	}
}
Пример #28
0
void namcos2_hisave(void)
{
	void *f;

	f = osd_fopen (Machine->gamedrv->name, 0, OSD_FILETYPE_HIGHSCORE, 1);
	if (f)
	{
		osd_fwrite (f, namcos2_eeprom, namcos2_eeprom_size);
		osd_fclose (f);
	}
}
Пример #29
0
static void hisave(void)
{
	void *f;
	unsigned char *RAM = Machine->memory_region[Machine->drv->cpu[0].memory_region];

	if ((f = osd_fopen(Machine->gamedrv->name,0,OSD_FILETYPE_HIGHSCORE,1)) != 0)
	{
		osd_fwrite(f,&RAM[0x0240],80);
		osd_fclose(f);
	}
}
Пример #30
0
static void mcr2_hisave(int addr, int len)
{
   unsigned char *RAM = Machine->memory_region[0];
   void *f;

	f = osd_fopen(Machine->gamedrv->name,0,OSD_FILETYPE_HIGHSCORE,1);
   if (f)
   {
      osd_fwrite(f,&RAM[addr],len);
      osd_fclose (f);
   }
}