Merge pull request #2638 from DavidHaywood/040917

new WORKING clones : Land Breaker (World) / Miss Tang Ja Ru Gi (Korea) (pcb ver 1.0) (AT89c52 protected) [Hammy]
This commit is contained in:
R. Belmont 2017-09-07 15:07:21 -04:00 committed by GitHub
commit 4a3471ac89
3 changed files with 100 additions and 55 deletions

View File

@ -1146,6 +1146,35 @@ ROM_START( landbrka )
ROM_LOAD( "qs1001a.u96", 0x80000, 0x80000, CRC(d13c6407) SHA1(57b14f97c7d4f9b5d9745d3571a0b7115fbe3176) )
ROM_END
ROM_START( landbrkb )
ROM_REGION( 0x80000, "maincpu", 0 ) /* Hyperstone CPU Code */
ROM_LOAD( "lb_040.u43", 0x00000, 0x80000, CRC(a81d681b) SHA1(e92b0217a86271dd1e51bef75f5b4fda7a8415ed) )
ROM_REGION32_BE( 0x2000000, "user1", ROMREGION_ERASE00 ) /* Game Data - banked ROM, swapping necessary */
ROM_LOAD32_WORD_SWAP( "lb2-000.u39", 0x0000000, 0x400000, CRC(b37faf7a) SHA1(30e9af3957ada7c72d85f55add221c2e9b3ea823) )
ROM_LOAD32_WORD_SWAP( "lb2-001.u34", 0x0000002, 0x400000, CRC(07e620c9) SHA1(19f95316208fb4e52cef78f18c5d93460a644566) )
ROM_LOAD32_WORD_SWAP( "lb2-002.u40", 0x0800000, 0x400000, CRC(3bb4bca6) SHA1(115029be4a4e322549a35f3ae5093ec161e9a421) )
ROM_LOAD32_WORD_SWAP( "lb2-003.u35", 0x0800002, 0x400000, CRC(28ce863a) SHA1(1ba7d8be0ed4459dbdf99df18a2ad817904b9f04) )
ROM_LOAD32_WORD_SWAP( "lb2-004.u41", 0x1000000, 0x400000, CRC(cbe84b06) SHA1(52505939fb88cd24f409c795fe5ceed5b41a52c2) )
ROM_LOAD32_WORD_SWAP( "lb2-005.u36", 0x1000002, 0x400000, CRC(350c77a3) SHA1(231e65ea7db19019615a8aa4444922bcd5cf9e5c) )
ROM_LOAD32_WORD_SWAP( "lb2-006.u42", 0x1800000, 0x400000, CRC(22c57cd8) SHA1(c9eb745523005876395ff7f0b3e996994b3f1220) )
ROM_LOAD32_WORD_SWAP( "lb2-007.u37", 0x1800002, 0x400000, CRC(31f957b3) SHA1(ab1c4c50c2d5361ba8db047feb714423d84e6df4) )
ROM_REGION( 0x008000, "soundcpu", 0 ) /* AT89c52 */
/* This is the first 2K of rom1.u111 from landbrk, verify against the internal dump when decapped */
ROM_LOAD( "lb.103", 0x0000, 0x0800, BAD_DUMP CRC(92797034) SHA1(b600f19972986b2e09c56be0ea0c09f92a9fe422) ) /* MCU internal 2K flash */
ROM_REGION( 0x080000, "sounddata", 0 ) /* Music data */
ROM_LOAD( "lb_2.108", 0x00000, 0x80000, CRC(a99182d7) SHA1(628c8d09efb3917a4e97d9e02b6b0ca1f339825d) )
ROM_REGION( 0x008000, "qs1000:cpu", 0 ) /* QDSP (8052) Code */
ROM_LOAD( "lb.107", 0x0000, 0x8000, CRC(afd5263d) SHA1(71ace1b749d8a6b84d08b97185e7e512d04e4b8d) )
ROM_REGION( 0x1000000, "qs1000", 0 ) /* QDSP sample ROMs */
ROM_LOAD( "lb_3.u97", 0x00000, 0x80000, CRC(5b34dff0) SHA1(1668763e977e272781ddcc74beba97b53477cc9d) )
ROM_LOAD( "qs1001a.u96", 0x80000, 0x80000, CRC(d13c6407) SHA1(57b14f97c7d4f9b5d9745d3571a0b7115fbe3176) )
ROM_END
ROM_START( penfan )
ROM_REGION( 0x80000, "maincpu", 0 ) /* Hyperstone CPU Code */
@ -1509,18 +1538,35 @@ DRIVER_INIT_MEMBER(eolith_state,landbrk)
DRIVER_INIT_CALL(eolith);
}
/*
The protected sets (where we're having to use a substitute ROM from an unprotected versions instead of the
AT89c52 internal ROM) all have an extra startup check (to prevent you swapping in an external ROM?)
Currently this is not fully understood, and possibly not possible to make work without the MCU dump so we
patch it to work with the unprotected code.
Using landbrka as an example it fails compares with memories:
$4002d338 -> $4002d348 .... $4002d33f -> $4002d34f
related with bits 0x100 - 0x200 read at startup from input(0) ?
*/
void eolith_state::patch_mcu_protection(uint32_t address)
{
uint32_t *rombase = (uint32_t*)memregion("maincpu")->base();
rombase[address/4] = (rombase[address/4] & 0xffff) | 0x03000000; /* Change BR to NOP */
}
// the protected sets all have an extra startup check (to prevent you swapping in an external ROM?)
// currently not fully understood, and possibly not possible to make work without the MCU dump so we patch it.
// to work with the unprotected code.
DRIVER_INIT_MEMBER(eolith_state,landbrka)
{
//it fails compares with memories:
//$4002d338 -> $4002d348 .... $4002d33f -> $4002d34f
//related with bits 0x100 - 0x200 read at startup from input(0) ?
uint32_t *rombase = (uint32_t*)memregion("maincpu")->base();
rombase[0x14f00/4] = (rombase[0x14f00/4] & 0xffff) | 0x03000000; /* Change BR to NOP */
patch_mcu_protection(0x14f00);
m_coin_counter_bit = 0x2000;
DRIVER_INIT_CALL(eolith);
}
DRIVER_INIT_MEMBER(eolith_state,landbrkb)
{
patch_mcu_protection(0x14da8);
m_coin_counter_bit = 0x2000;
DRIVER_INIT_CALL(eolith);
@ -1528,27 +1574,16 @@ DRIVER_INIT_MEMBER(eolith_state,landbrka)
DRIVER_INIT_MEMBER(eolith_state,hidctch2)
{
//it fails compares in memory like in landbrka
uint32_t *rombase = (uint32_t*)memregion("maincpu")->base();
rombase[0xbcc8/4] = (rombase[0xbcc8/4] & 0xffff) | 0x03000000; /* Change BR to NOP */
patch_mcu_protection(0x0bcc8);
DRIVER_INIT_CALL(eolith);
}
DRIVER_INIT_MEMBER(eolith_state,hidnc2k)
{
uint32_t *rombase = (uint32_t*)memregion("maincpu")->base();
rombase[0x17b2c/4] = (rombase[0x17b2c/4] & 0x0000ffff) | 0x03000000; /* Change BR to NOP */
patch_mcu_protection(0x17b2c);
DRIVER_INIT_CALL(eolith);
}
DRIVER_INIT_MEMBER(eolith_state,hidctch3)
{
m_maincpu->space(AS_PROGRAM).nop_write(0xfc200000, 0xfc200003); // this generates pens vibration
@ -1611,6 +1646,7 @@ static const struct
{ "hidctch2a",0x40029B58, -1, 240 },
{ "landbrk", 0x40023574, -1, 240 },
{ "landbrka", 0x4002446c, -1, 240 },
{ "landbrkb", 0x40023B28, -1, 240 },
{ "nhidctch", 0x40012778, -1, 240 },
{ "hidctch3", 0x4001f6a0, -1, 240 },
{ "fort2b", 0x000081e0, -1, 240 },
@ -1672,7 +1708,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(eolith_state::eolith_speedup)
CUSTOM_INPUT_MEMBER(eolith_state::eolith_speedup_getvblank)
{
// printf("%s:eolith speedup_read data %02x\n",machine().describe_context(), m_speedup_vblank);
// printf("%s:eolith speedup_read data %02x\n",machine().describe_context().c_str(), m_speedup_vblank);
return (m_screen->vpos() >= 240);
@ -1709,6 +1745,7 @@ GAME( 1999, hidctch2a, hidctch2, eolith50, hidctch2, eolith_state, eolith, RO
GAME( 1999, hidnc2k, 0, eolith50, hidctch2, eolith_state, hidnc2k, ROT0, "Eolith", "Hidden Catch 2000 (AT89c52 protected)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
GAME( 1999, landbrk, 0, eolith45, landbrk, eolith_state, landbrk, ROT0, "Eolith", "Land Breaker (World) / Miss Tang Ja Ru Gi (Korea) (pcb ver 3.02)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // or Miss Ttang Jjareugi
GAME( 1999, landbrka, landbrk, eolith45, landbrk, eolith_state, landbrka, ROT0, "Eolith", "Land Breaker (World) / Miss Tang Ja Ru Gi (Korea) (pcb ver 3.03) (AT89c52 protected)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // or Miss Ttang Jjareugi
GAME( 1999, landbrkb, landbrk, eolith45, landbrk, eolith_state, landbrkb, ROT0, "Eolith", "Land Breaker (World) / Miss Tang Ja Ru Gi (Korea) (pcb ver 1.0) (AT89c52 protected)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // or Miss Ttang Jjareugi
GAME( 1999, nhidctch, 0, eolith45, hidctch2, eolith_state, eolith, ROT0, "Eolith", "New Hidden Catch (World) / New Tul Lin Gu Lim Chat Ki '98 (Korea) (pcb ver 3.02)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // or New Teurrin Geurim Chajgi '98
GAME( 1999, penfan, 0, eolith45, penfan, eolith_state, eolith, ROT0, "Eolith", "Penfan Girls - Step1. Mild Mind (set 1)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // alt title of Ribbon
GAME( 1999, penfana, penfan, eolith45, penfan, eolith_state, eolith, ROT0, "Eolith", "Penfan Girls - Step1. Mild Mind (set 2)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )

View File

@ -10,13 +10,13 @@ class eolith_state : public driver_device
public:
eolith_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
m_eepromoutport(*this, "EEPROMOUT"),
m_qs1000(*this, "qs1000"),
m_maincpu(*this, "maincpu"),
m_soundcpu(*this, "soundcpu"),
m_qs1000(*this, "qs1000"),
m_screen(*this, "screen"),
m_palette(*this, "palette"),
m_in0(*this, "IN0"),
m_eepromoutport(*this, "EEPROMOUT"),
m_penx1port(*this, "PEN_X_P1"),
m_peny1port(*this, "PEN_Y_P1"),
m_penx2port(*this, "PEN_X_P2"),
@ -24,36 +24,6 @@ public:
m_sndbank(*this, "sound_bank")
{ }
required_device<cpu_device> m_maincpu;
optional_device<i8032_device> m_soundcpu;
optional_device<qs1000_device> m_qs1000;
required_device<screen_device> m_screen;
required_device<palette_device> m_palette;
optional_ioport m_in0; // klondkp doesn't have it
optional_ioport m_eepromoutport;
optional_ioport m_penx1port;
optional_ioport m_peny1port;
optional_ioport m_penx2port;
optional_ioport m_peny2port;
optional_memory_bank m_sndbank;
int m_coin_counter_bit;
int m_buffer;
std::unique_ptr<uint32_t[]> m_vram;
uint8_t m_sound_data;
// speedups - see machine/eolithsp.c
int m_speedup_address;
int m_speedup_address2;
int m_speedup_resume_scanline;
int m_speedup_vblank;
int m_speedup_scanline;
void speedup_read();
void init_speedup();
DECLARE_CUSTOM_INPUT_MEMBER(eolith_speedup_getvblank);
DECLARE_CUSTOM_INPUT_MEMBER(stealsee_speedup_getvblank);
@ -76,11 +46,48 @@ public:
DECLARE_DRIVER_INIT(hidctch2);
DECLARE_DRIVER_INIT(hidnc2k);
DECLARE_DRIVER_INIT(landbrka);
DECLARE_DRIVER_INIT(landbrkb);
DECLARE_MACHINE_RESET(eolith);
DECLARE_VIDEO_START(eolith);
TIMER_DEVICE_CALLBACK_MEMBER(eolith_speedup);
uint32_t screen_update_eolith(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
TIMER_DEVICE_CALLBACK_MEMBER(eolith_speedup);
protected:
// shared with eolith16.cpp, vegaeo.cpp
optional_ioport m_eepromoutport;
optional_device<qs1000_device> m_qs1000;
void speedup_read();
void init_speedup();
void patch_mcu_protection(uint32_t address);
private:
required_device<cpu_device> m_maincpu;
optional_device<i8032_device> m_soundcpu;
required_device<screen_device> m_screen;
required_device<palette_device> m_palette;
optional_ioport m_in0; // klondkp doesn't have it
optional_ioport m_penx1port;
optional_ioport m_peny1port;
optional_ioport m_penx2port;
optional_ioport m_peny2port;
optional_memory_bank m_sndbank;
int m_coin_counter_bit;
int m_buffer;
std::unique_ptr<uint32_t[]> m_vram;
uint8_t m_sound_data;
// speedups - see machine/eolithsp.c
int m_speedup_address;
int m_speedup_address2;
int m_speedup_resume_scanline;
int m_speedup_vblank;
int m_speedup_scanline;
};

View File

@ -12108,6 +12108,7 @@ ironfort // (c) 1998 Eolith
ironfortj // (c) 1998 Eolith
landbrk // (c) 1999 Eolith
landbrka // (c) 1999 Eolith
landbrkb // (c) 1999 Eolith
linkypip // (c) 1998 Eolith
nhidctch // (c) 1999 Eolith
penfan // (c) 1999 Eolith