Better save support on a few Kaneko devices. Some mpu4 driver crash fixes and produce warnings when needed. From Haze (nw)
This commit is contained in:
parent
a2f614dfbf
commit
38b5b77fc9
@ -458,6 +458,9 @@ static MACHINE_RESET( mpu4 )
|
||||
UINT8 *rom = state->memregion("maincpu")->base();
|
||||
size_t romsize = state->memregion("maincpu")->bytes();
|
||||
|
||||
if (romsize < 0x10000)
|
||||
fatalerror("maincpu ROM region is < 0x10000 bytes, check ROM\n");
|
||||
|
||||
int numbanks = romsize / 0x10000;
|
||||
|
||||
state->membank("bank1")->configure_entries(0, 8, &rom[0x01000], 0x10000);
|
||||
@ -2593,9 +2596,18 @@ DRIVER_INIT_MEMBER(mpu4_state,m4default_big)
|
||||
{
|
||||
address_space *space = machine().device("maincpu")->memory().space(AS_PROGRAM);
|
||||
DRIVER_INIT_CALL(m4default);
|
||||
m_bwb_bank=1;
|
||||
space->install_write_handler(0x0858, 0x0858, 0, 0, write8_delegate(FUNC(mpu4_state::bankswitch_w),this));
|
||||
space->install_write_handler(0x0878, 0x0878, 0, 0, write8_delegate(FUNC(mpu4_state::bankset_w),this));
|
||||
|
||||
int size = machine().root_device().memregion( "maincpu" )->bytes();
|
||||
if (size<=0x10000)
|
||||
{
|
||||
printf("extended banking selected on set <=0x10000 in size, ignoring");
|
||||
}
|
||||
else
|
||||
{
|
||||
m_bwb_bank=1;
|
||||
space->install_write_handler(0x0858, 0x0858, 0, 0, write8_delegate(FUNC(mpu4_state::bankswitch_w),this));
|
||||
space->install_write_handler(0x0878, 0x0878, 0, 0, write8_delegate(FUNC(mpu4_state::bankset_w),this));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -4381,7 +4381,7 @@ M4PRZRF_SET( 199?, m4przrf__j, m4przrf, "pr8y.p1", 0x0000, 0x020000, CRC(8740c01
|
||||
ROM_LOAD( name, offset, length, hash ) \
|
||||
M4PRZRFM_EXTRA_ROMS \
|
||||
ROM_END \
|
||||
GAME(year, setname, parent ,mod4oki ,mpu4 , mpu4_state,m4_showstring_big ,ROT0,company,title,GAME_FLAGS ) \
|
||||
GAME(year, setname, parent ,mod4oki ,mpu4 , mpu4_state,m4_showstring ,ROT0,company,title,GAME_FLAGS ) \
|
||||
|
||||
|
||||
|
||||
@ -4569,7 +4569,7 @@ M4LUCKSC_SET( 199?, m4lucksc__l, m4lucksc, "lsc_.1_1", 0x0000, 0x020000, CRC(79
|
||||
ROM_LOAD( name, offset, length, hash ) \
|
||||
M4PRZLUX_EXTRA_ROMS \
|
||||
ROM_END \
|
||||
GAME(year, setname, parent ,mod4oki ,mpu4 , mpu4_state,m4_showstring_big ,ROT0,company,title,GAME_FLAGS ) \
|
||||
GAME(year, setname, parent ,mod4oki ,mpu4 , mpu4_state,m4_showstring ,ROT0,company,title,GAME_FLAGS ) \
|
||||
|
||||
|
||||
M4PRZLUX_SET( 199?, m4przlux, 0, "plxs.p1", 0x0000, 0x010000, CRC(0aea0339) SHA1(28da52924fe2bf00799ef466143103e08399f5f5), "Barcrest","Prize Luxor (Barcrest) (MPU4) (set 1)" )
|
||||
@ -4689,7 +4689,7 @@ M4KINGQC_SET( 199?, m4kingqc__k, m4kingqc, "cn_20bgc.5_1", 0x0000, 0x010000, CRC
|
||||
M4KINGQC_SET( 199?, m4kingqc__l, m4kingqc, "cn_20btc.2_1", 0x0000, 0x010000, CRC(b8f0ade0) SHA1(5b5344f799b27833f6456ae852eb5085afb3dbe5), "Barcrest / Bwb","Kings & Queens Classic (Barcrest) (MPU4) (set 13)" )
|
||||
M4KINGQC_SET( 199?, m4kingqc__m, m4kingqc, "cn_20btc.3_1", 0x0000, 0x010000, CRC(b92f3787) SHA1(7efd815cf1a9a738ffae2c3ce19149f47d465c72), "Barcrest / Bwb","Kings & Queens Classic (Barcrest) (MPU4) (set 14)" )
|
||||
M4KINGQC_SET( 199?, m4kingqc__n, m4kingqc, "cn_20btc.5_1", 0x0000, 0x010000, CRC(e2b8baf0) SHA1(23e966a6cc94c26903bfe943160a327529d7e21b), "Barcrest / Bwb","Kings & Queens Classic (Barcrest) (MPU4) (set 15)" )
|
||||
M4KINGQC_SET( 199?, m4kingqc__q, m4kingqc, "cn_20sbc.5_1", 0x0000, 0x007e02, CRC(a20d7293) SHA1(2e83b73907b867aec20edacb9b49250f746faa3e), "Barcrest / Bwb","Kings & Queens Classic (Barcrest) (MPU4) (set 16)" )
|
||||
M4KINGQC_SET( 199?, m4kingqc__q, m4kingqc, "cn_20sbc.5_1", 0x0000, 0x010000, CRC(8b49bf8c) SHA1(2c6835e343e7cdcc197c0105e13cc4f6ddd3f0d3), "Barcrest / Bwb","Kings & Queens Classic (Barcrest) (MPU4) (set 16)" )
|
||||
M4KINGQC_SET( 199?, m4kingqc__r, m4kingqc, "cn_25_bc.2_1", 0x0000, 0x010000, CRC(3e2b2d7b) SHA1(9a68cf4902ca210e8fb52a35b4c507708c7f6d2a), "Barcrest / Bwb","Kings & Queens Classic (Barcrest) (MPU4) (set 17)" )
|
||||
M4KINGQC_SET( 199?, m4kingqc__s, m4kingqc, "cn_25_dc.2_1", 0x0000, 0x010000, CRC(eb384ef6) SHA1(489c59d8e1e6296ec2b05fb0aa307c48f3486aa2), "Barcrest / Bwb","Kings & Queens Classic (Barcrest) (MPU4) (set 18)" )
|
||||
M4KINGQC_SET( 199?, m4kingqc__t, m4kingqc, "cn_25_kc.2_1", 0x0000, 0x010000, CRC(bd11e742) SHA1(0c3b290e3010bc3f904f9087ee89efe63072b8c3), "Barcrest / Bwb","Kings & Queens Classic (Barcrest) (MPU4) (set 19)" )
|
||||
|
@ -46,7 +46,63 @@ void kaneko_hit_device::set_type(device_t &device, int hittype)
|
||||
|
||||
void kaneko_hit_device::device_start()
|
||||
{
|
||||
/* m_hit */
|
||||
save_item(NAME(m_hit.x1p));
|
||||
save_item(NAME(m_hit.y1p));
|
||||
save_item(NAME(m_hit.x1s));
|
||||
save_item(NAME(m_hit.y1s));
|
||||
save_item(NAME(m_hit.x2p));
|
||||
save_item(NAME(m_hit.y2p));
|
||||
save_item(NAME(m_hit.x2s));
|
||||
save_item(NAME(m_hit.y2s));
|
||||
save_item(NAME(m_hit.x12));
|
||||
save_item(NAME(m_hit.y12));
|
||||
save_item(NAME(m_hit.x21));
|
||||
save_item(NAME(m_hit.y21));
|
||||
save_item(NAME(m_hit.mult_a));
|
||||
save_item(NAME(m_hit.mult_b));
|
||||
|
||||
/* m_hit3 */
|
||||
save_item(NAME(m_hit3.x1p));
|
||||
save_item(NAME(m_hit3.y1p));
|
||||
save_item(NAME(m_hit3.z1p));
|
||||
save_item(NAME(m_hit3.x1s));
|
||||
save_item(NAME(m_hit3.y1s));
|
||||
save_item(NAME(m_hit3.z1s));
|
||||
save_item(NAME(m_hit3.x2p));
|
||||
save_item(NAME(m_hit3.y2p));
|
||||
save_item(NAME(m_hit3.z2p));
|
||||
save_item(NAME(m_hit3.x2s));
|
||||
save_item(NAME(m_hit3.y2s));
|
||||
save_item(NAME(m_hit3.z2s));
|
||||
save_item(NAME(m_hit3.x1po));
|
||||
save_item(NAME(m_hit3.y1po));
|
||||
save_item(NAME(m_hit3.z1po));
|
||||
save_item(NAME(m_hit3.x1so));
|
||||
save_item(NAME(m_hit3.y1so));
|
||||
save_item(NAME(m_hit3.z1so));
|
||||
save_item(NAME(m_hit3.x2po));
|
||||
save_item(NAME(m_hit3.y2po));
|
||||
save_item(NAME(m_hit3.z2po));
|
||||
save_item(NAME(m_hit3.x2so));
|
||||
save_item(NAME(m_hit3.y2so));
|
||||
save_item(NAME(m_hit3.z2so));
|
||||
save_item(NAME(m_hit3.x12));
|
||||
save_item(NAME(m_hit3.y12));
|
||||
save_item(NAME(m_hit3.z12));
|
||||
save_item(NAME(m_hit3.x21));
|
||||
save_item(NAME(m_hit3.y21));
|
||||
save_item(NAME(m_hit3.z21));
|
||||
save_item(NAME(m_hit3.x_coll));
|
||||
save_item(NAME(m_hit3.y_coll));
|
||||
save_item(NAME(m_hit3.z_coll));
|
||||
save_item(NAME(m_hit3.x1tox2));
|
||||
save_item(NAME(m_hit3.y1toy2));
|
||||
save_item(NAME(m_hit3.z1toz2));
|
||||
save_item(NAME(m_hit3.mult_a));
|
||||
save_item(NAME(m_hit3.mult_b));
|
||||
save_item(NAME(m_hit3.flags));
|
||||
save_item(NAME(m_hit3.mode));
|
||||
}
|
||||
|
||||
void kaneko_hit_device::device_reset()
|
||||
|
@ -25,10 +25,6 @@ Currently none of the MCUs' internal roms are dumped so simulation is used
|
||||
Where does the hardcoded EEPROM default data come from (there is a command to restore defaults directly, not from RAM)
|
||||
Where does the data for the additional tables come from, a transfer mode none of the other games use is used. (related to src[offs+6] and src[offs+7] params? )
|
||||
|
||||
galpani3:
|
||||
Move EEPROM to default eeprom file, use same EEPROM handling as the rest
|
||||
|
||||
|
||||
|
||||
MCU parameters:
|
||||
---------------
|
||||
@ -80,6 +76,14 @@ void kaneko_toybox_device::device_start()
|
||||
m_toybox_mcuram = (UINT16*)auto_alloc_array_clear(this->machine(), UINT16, 0x10000/2);
|
||||
memset(m_toybox_mcu_com, 0, 4 * sizeof( UINT16) );
|
||||
toxboy_decrypt_rom(this->machine());
|
||||
|
||||
|
||||
save_pointer(NAME(m_toybox_mcuram), 0x10000/2);
|
||||
save_item(NAME(m_toybox_mcu_com[0]));
|
||||
save_item(NAME(m_toybox_mcu_com[1]));
|
||||
save_item(NAME(m_toybox_mcu_com[2]));
|
||||
save_item(NAME(m_toybox_mcu_com[3]));
|
||||
|
||||
}
|
||||
|
||||
void kaneko_toybox_device::device_reset()
|
||||
|
@ -34,6 +34,22 @@ void kaneko_grap2_device::device_start()
|
||||
m_framebuffer_palette = (UINT16*)auto_alloc_array_clear(this->machine(), UINT16, 0x200/2);
|
||||
m_framebuffer_unk1 = (UINT16*)auto_alloc_array_clear(this->machine(), UINT16, 0x400/2);
|
||||
m_framebuffer_unk2 = (UINT16*)auto_alloc_array_clear(this->machine(), UINT16, 0x400/2);
|
||||
|
||||
save_pointer(NAME(m_framebuffer), 0x80000/2);
|
||||
save_pointer(NAME(m_framebuffer_palette), 0x200/2);
|
||||
save_pointer(NAME(m_framebuffer_unk1), 0x400/2);
|
||||
save_pointer(NAME(m_framebuffer_unk2), 0x400/2);
|
||||
|
||||
save_item(NAME(m_framebuffer_bgcol));
|
||||
save_item(NAME(m_framebuffer_scrolly));
|
||||
save_item(NAME(m_framebuffer_scrollx));
|
||||
save_item(NAME(m_framebuffer_enable));
|
||||
save_item(NAME(m_regs1_i));
|
||||
save_item(NAME(m_framebuffer_bright1));
|
||||
save_item(NAME(m_framebuffer_bright2));
|
||||
save_item(NAME(m_regs1_address_regs[0x0]));
|
||||
save_item(NAME(m_regs1_address_regs[0x1]));
|
||||
|
||||
}
|
||||
|
||||
void kaneko_grap2_device::device_reset()
|
||||
@ -131,7 +147,7 @@ WRITE16_MEMBER(kaneko_grap2_device::galpani3_regs1_go_w)
|
||||
UINT32 address = m_regs1_address_regs[1]| (m_regs1_address_regs[0]<<16);
|
||||
UINT8* rledata = memregion(":gfx2")->base();
|
||||
|
||||
printf("galpani3_regs1_go_w? %08x\n",address );
|
||||
// printf("galpani3_regs1_go_w? %08x\n",address );
|
||||
if ((data==0x2000) || (data==0x3000)) gp3_do_rle(address, m_framebuffer, rledata);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user