test code (nw)

This commit is contained in:
David Haywood 2014-02-19 21:54:38 +00:00
parent 251c3dd46f
commit fdba3ea068

View file

@ -71,6 +71,9 @@ public:
UINT32 screen_update_igs_m036(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
DECLARE_DRIVER_INIT(igs_m036);
required_device<cpu_device> m_maincpu;
void pgm_create_dummy_internal_arm_region(void);
};
@ -83,6 +86,8 @@ UINT32 igs_m036_state::screen_update_igs_m036(screen_device &screen, bitmap_ind1
static ADDRESS_MAP_START( igs_m036_map, AS_PROGRAM, 32, igs_m036_state )
AM_RANGE(0x00000000, 0x00003fff) AM_ROM /* Internal ROM */
AM_RANGE(0x08000000, 0x081fffff) AM_ROM AM_REGION("user1", 0) // not 100% sure it maps here.
ADDRESS_MAP_END
static INPUT_PORTS_START( igs_m036 )
@ -186,6 +191,7 @@ ROM_START( igsm312 )
ROM_REGION( 0x200000, "user1", 0 ) // external ARM data / prg
ROM_LOAD( "m312cn.rom", 0x000000, 0x200000, CRC(5069c310) SHA1(d53a2e8acddfbb7afc27c68c0b3167419a3ec3e6) )
// ROM_LOAD( "decrypted_m312cn.rom", 0x000000, 0x200000, CRC(ccea5ea0) SHA1(5e8e1e7fca8c52e1a12c8e44efffd5821fe9abfc) )
ROM_REGION( 0x800100, "oki", ROMREGION_ERASE00 ) // TT5665 samples
/* missing */
@ -194,6 +200,41 @@ ROM_START( igsm312 )
ROM_END
void igs_m036_state::pgm_create_dummy_internal_arm_region(void)
{
UINT16 *temp16 = (UINT16 *)memregion("maincpu")->base();
int i;
for (i=0;i<0x4000/2;i+=2)
{
temp16[i] = 0xFFFE;
temp16[i+1] = 0xEAFF;
}
int base = 0;
// jump straight to where we've mapped the external rom for testing (should really set up a fake stack etc. too)
temp16[(base) / 2] = 0x0004; base += 2;
temp16[(base) / 2] = 0xe59f; base += 2;
temp16[(base) / 2] = 0x0000; base += 2;
temp16[(base) / 2] = 0xe590; base += 2;
temp16[(base) / 2] = 0xff10; base += 2;
temp16[(base) / 2] = 0xe12f; base += 2;
temp16[(base) / 2] = 0x0010; base += 2;
temp16[(base) / 2] = 0x0000; base += 2;
#if 0
temp16[(base) / 2] = 0x03c9; base += 2;
temp16[(base) / 2] = 0x0800; base += 2;
#else
temp16[(base) / 2] = 0x0000; base += 2;
temp16[(base) / 2] = 0x0800; base += 2;
#endif
}
#define IGS036_CPU ARM7
@ -236,6 +277,7 @@ MACHINE_CONFIG_END
DRIVER_INIT_MEMBER(igs_m036_state,igs_m036)
{
pgm_create_dummy_internal_arm_region();
}
@ -252,4 +294,4 @@ GAME( 200?, cjdh2c, cjdh2, igs_m036, igs_m036, igs_m036_state, igs_m036,
GAME( 200?, cjddzsp, 0, igs_m036_tt, igs_m036, igs_m036_state, igs_m036, ROT0, "IGS", "Super Dou Di Zhu Special (V122CN)", GAME_IS_SKELETON )
GAME( 200?, igsm312, 0, igs_m036_tt, igs_m036, igs_m036_state, igs_m036, ROT0, "IGS", "Unknown IGS036 CPU game (V312CN)", GAME_IS_SKELETON )
GAME( 200?, igsm312, 0, igs_m036_tt, igs_m036, igs_m036_state, igs_m036, ROT0, "IGS", "Unknown 'IGS 6POKER2' game (V312CN)", GAME_IS_SKELETON ) // there's very little code and no gfx roms, might be a 'set/clear' chip for a gambling game.