new WORKING machine

=======================
Urachacha Mudaeri [Brizzo, Angelo Salese, The Dumping Union]

new NOT_WORKING machine
=======================
Wully Bully [Brizzo, Angelo Salese, The Dumping Union]
Maldaliza [Brizzo, Angelo Salese, The Dumping Union]

crospuzl.cpp: Improve flash loading [Angelo Salese]
This commit is contained in:
angelosa 2019-08-25 18:14:55 +02:00
parent e774d82ed0
commit e1662249ed
4 changed files with 110 additions and 65 deletions

View File

@ -480,7 +480,7 @@ bool vrender0soc_device::crt_active_vblank_irq()
if (crt_is_interlaced() == false)
return true;
// bit 3 of CRTC reg -> select display start
// bit 3 of CRTC reg -> select display start even/odd fields
return (m_host_screen->frame_number() & 1) ^ ((m_crtcregs[0] & 8) >> 3);
}

View File

@ -1,21 +1,27 @@
// license:BSD-3-Clause
// copyright-holders:Angelo Salese
/****************************************************************************
Cross Puzzle
driver by Angelo Salese, based off original crystal.cpp by ElSemi
Cross Puzzle
driver by Angelo Salese, based off original crystal.cpp by ElSemi
TODO:
- Dies at POST with a SPU error and no Flash memory available;
- RTC isn't DS1302
TODO:
- Dies at POST with a SPU error;
- Hooking up serflash_device instead of the custom implementation here
makes the game to print having all memory available and no game
detected, fun
- RTC isn't DS1302
Notes:
- Game enables UART1 receive irq, if that irq is enable it just prints
"___sysUART1_ISR<LF>___sysUART1_ISR_END<LF>"
=============================================================================
This PCB uses ADC 'Amazon-LF' SoC, EISC CPU core - However PCBs have been see
with a standard VRenderZERO+ MagicEyes EISC chip
This PCB uses ADC 'Amazon-LF' SoC, EISC CPU core - However PCBs have been
seen with a standard VRenderZERO+ MagicEyes EISC chip
****************************************************************************/
#include "emu.h"
@ -76,13 +82,15 @@ private:
DECLARE_WRITE_LINE_MEMBER(idle_skip_speedup_w);
#endif
uint32_t m_FlashCmd;
uint32_t m_crospuzl_addr;
uint8_t m_FlashCmd;
uint8_t m_FlashPrevCommand;
uint32_t m_FlashAddr;
uint8_t m_FlashShift;
// DECLARE_WRITE32_MEMBER(Banksw_w);
// DECLARE_WRITE32_MEMBER(Banksw_w);
DECLARE_READ8_MEMBER(FlashCmd_r);
DECLARE_WRITE32_MEMBER(FlashCmd_w);
DECLARE_WRITE32_MEMBER(flash_addr_w);
DECLARE_WRITE8_MEMBER(FlashCmd_w);
DECLARE_WRITE8_MEMBER(FlashAddr_w);
IRQ_CALLBACK_MEMBER(icallback);
@ -91,7 +99,7 @@ private:
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
DECLARE_WRITE_LINE_MEMBER(screen_vblank);
void crospuzl_mem(address_map &map);
// PIO
DECLARE_READ32_MEMBER(PIOldat_r);
uint32_t m_PIO;
@ -129,24 +137,12 @@ IRQ_CALLBACK_MEMBER(crospuzl_state::icallback)
return m_vr0soc->irq_callback();
}
WRITE32_MEMBER(crospuzl_state::FlashCmd_w)
{
m_FlashCmd = data;
}
READ32_MEMBER(crospuzl_state::PIOedat_r)
{
// TODO: this doesn't work with regular serflash_device
return machine().rand() & 0x04000000; // serial ready line
}
WRITE32_MEMBER(crospuzl_state::flash_addr_w)
{
if (m_FlashCmd == 0x90)
m_crospuzl_addr = 0;
if (data)
m_crospuzl_addr = (data << 16);
}
READ8_MEMBER(crospuzl_state::FlashCmd_r)
{
if ((m_FlashCmd & 0xff) == 0xff)
@ -155,21 +151,44 @@ READ8_MEMBER(crospuzl_state::FlashCmd_r)
}
if ((m_FlashCmd & 0xff) == 0x90)
{
const uint8_t id[5] = { 0xee, 0x81, 0x00, 0x00, 0x00 };
uint8_t res = id[m_crospuzl_addr];
m_crospuzl_addr ++;
m_crospuzl_addr %= 4;
// Service Mode has the first two bytes of the ID printed,
// in format ****/ee81
// ee81 has no correspondence in the JEDEC flash vendor ID list,
// and the standard claims that the ID is 7 + 1 parity bit.
// TODO: Retrieve ID from actual HW service mode screen.
// const uint8_t id[5] = { 0xee, 0x81, 0x00, 0x15, 0x00 };
const uint8_t id[5] = { 0xec, 0xf1, 0x00, 0x15, 0x00 };
uint8_t res = id[m_FlashAddr];
m_FlashAddr ++;
m_FlashAddr %= 5;
return res;
}
if ((m_FlashCmd & 0xff) == 0x30)
{
uint8_t res = m_flash[m_crospuzl_addr];
m_crospuzl_addr++;
uint8_t res = m_flash[m_FlashAddr];
m_FlashAddr++;
return res;
}
return 0;
}
WRITE8_MEMBER(crospuzl_state::FlashCmd_w)
{
m_FlashPrevCommand = m_FlashCmd;
m_FlashCmd = data;
m_FlashShift = 0;
m_FlashAddr = 0;
logerror("%08x %08x CMD\n",m_FlashPrevCommand, m_FlashCmd);
}
WRITE8_MEMBER(crospuzl_state::FlashAddr_w)
{
m_FlashAddr |= data << (m_FlashShift*8);
m_FlashShift ++;
if (m_FlashShift == 4)
logerror("%08x %02x ADDR\n",m_FlashAddr,m_FlashShift);
}
READ32_MEMBER(crospuzl_state::PIOldat_r)
{
return m_PIO;
@ -195,8 +214,8 @@ void crospuzl_state::crospuzl_mem(address_map &map)
map(0x00000000, 0x0007ffff).rom().nopw();
map(0x01500000, 0x01500000).r(FUNC(crospuzl_state::FlashCmd_r));
map(0x01500100, 0x01500103).w(FUNC(crospuzl_state::FlashCmd_w));
map(0x01500200, 0x01500203).w(FUNC(crospuzl_state::flash_addr_w));
map(0x01500100, 0x01500100).w(FUNC(crospuzl_state::FlashCmd_w));
map(0x01500200, 0x01500200).w(FUNC(crospuzl_state::FlashAddr_w));
map(0x01510000, 0x01510003).portr("IN0");
map(0x01511000, 0x01511003).portr("IN1");
map(0x01512000, 0x01512003).portr("IN2");
@ -215,8 +234,8 @@ void crospuzl_state::crospuzl_mem(address_map &map)
map(0x04000000, 0x047fffff).ram().share("frameram");
map(0x04800000, 0x04800fff).rw(m_vr0snd, FUNC(vr0sound_device::vr0_snd_read), FUNC(vr0sound_device::vr0_snd_write));
// map(0x05000000, 0x05ffffff).bankr("mainbank");
// map(0x05000000, 0x05000003).rw(FUNC(crospuzl_state::FlashCmd_r), FUNC(crospuzl_state::FlashCmd_w));
// map(0x05000000, 0x05ffffff).bankr("mainbank");
// map(0x05000000, 0x05000003).rw(FUNC(crospuzl_state::FlashCmd_r), FUNC(crospuzl_state::FlashCmd_w));
}
#ifdef IDLE_LOOP_SPEEDUP
@ -245,7 +264,7 @@ void crospuzl_state::machine_start()
save_item(NAME(m_FlipCntRead));
#endif
// save_item(NAME(m_Bank));
// save_item(NAME(m_Bank));
save_item(NAME(m_FlashCmd));
save_item(NAME(m_PIO));
}
@ -253,7 +272,9 @@ void crospuzl_state::machine_start()
void crospuzl_state::machine_reset()
{
m_FlashCmd = 0xff;
m_crospuzl_addr = 0;
m_FlashAddr = 0;
m_FlashShift = 0;
m_FlashPrevCommand = 0xff;
#ifdef IDLE_LOOP_SPEEDUP
m_FlipCntRead = 0;
#endif
@ -428,7 +449,7 @@ void crospuzl_state::crospuzl(machine_config &config)
m_vr0snd->add_route(1, "rspeaker", 1.0);
}
ROM_START( crospuzl )
ROM_START( crospuzl )
ROM_REGION( 0x80010, "maincpu", 0 )
ROM_LOAD("en29lv040a.u5", 0x000000, 0x80010, CRC(d50e8500) SHA1(d681cd18cd0e48854c24291d417d2d6d28fe35c1) )

View File

@ -1,5 +1,5 @@
// license:BSD-3-Clause
// copyright-holders:ElSemi
// copyright-holders:ElSemi, Angelo Salese
/*
CRYSTAL SYSTEM by Brezzasoft (2001)
using VRender0 System on a Chip
@ -21,6 +21,23 @@
program with the correct data
MAME driver by ElSemi
Additional work and refactoring by Angelo Salese
TODO:
- provide NVRAM defaults where applicable;
- add an actual reset button (helps with inp record/playback);
- donghaer: needs "raster effect" for 2 players mode split screen, but no
interrupt is actually provided for the task so apparently not a timer
related effect;
- wulybuly: strips off main RAM to texture transfers except for text after
the first couple of frames;
- maldaiza: PIC protection.
- urachamu: some animation timings seems off, like bat hit animation before starting a given game.
They were actually too fast before adding 30 Hz vblank for interlace mode, even if the game don't
really read crtc blanking reg or use any other interrupt but the coin ones;
- urachamu: investigate what CDMA in test mode really do, assuming it's not a dud;
========================================================================================================
The Crystal of Kings
Brezza Soft Corporation (Japan), 2001
@ -133,8 +150,6 @@ Notes:
#include <algorithm>
#define IDLE_LOOP_SPEEDUP
// strip this define once we have actual credits from Smitdogg
//#define ROGUE_CARTS
class crystal_state : public driver_device
{
@ -161,9 +176,7 @@ public:
void init_crysking();
void init_evosocc();
void init_donghaer();
#ifdef ROGUE_CARTS
void init_maldaiza();
#endif
void crystal(machine_config &config);
DECLARE_INPUT_CHANGED_MEMBER(coin_inserted);
@ -566,7 +579,7 @@ static INPUT_PORTS_START( topbladv )
INPUT_PORTS_END
static INPUT_PORTS_START( urachamu )
static INPUT_PORTS_START( officeye )
PORT_INCLUDE( crystal )
// TODO: player 2 start doesn't work ingame, it only skip attract mode items,
@ -601,6 +614,20 @@ static INPUT_PORTS_START( urachamu )
PORT_BIT( 0x0000000f, IP_ACTIVE_LOW, IPT_UNKNOWN )
INPUT_PORTS_END
static INPUT_PORTS_START( urachamu )
PORT_INCLUDE( officeye )
// oddily they reversed red and blue
PORT_MODIFY("P1_P2")
PORT_BIT( 0x00000001, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) PORT_NAME("P2 Blue")
PORT_BIT( 0x00000010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_NAME("P2 Red")
PORT_BIT( 0x00010000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) PORT_NAME("P1 Blue")
PORT_BIT( 0x00020000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(3) PORT_NAME("P3 Blue")
PORT_BIT( 0x00100000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_NAME("P1 Red")
PORT_BIT( 0x00200000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(3) PORT_NAME("P3 Red")
INPUT_PORTS_END
void crystal_state::crystal(machine_config &config)
{
SE3208(config, m_maincpu, 14318180 * 3); // TODO : different between each PCBs
@ -703,7 +730,6 @@ ROM_START( donghaer )
ROM_LOAD( "u2", 0x1000000, 0x1000000, CRC(6d82f1a5) SHA1(036bd45f0daac1ffeaa5ad9774fc1b56e3c75ff9) )
ROM_END
#ifdef ROGUE_CARTS
ROM_START( wulybuly )
CRYSBIOS
@ -739,7 +765,6 @@ ROM_START( maldaiza )
ROM_LOAD( "u1", 0x0000000, 0x1000000, CRC(f484d12b) SHA1(29641cda9138b5bf02c2ece34f8289385fd2ba29) )
ROM_LOAD( "u2", 0x1000000, 0x1000000, CRC(86175ebf) SHA1(c1800f7339dafd3ec6c0302eebc8406582a46b04) ) // $ff filled
ROM_END
#endif
/* note on PIC protection from ElSemi (for actually emulating it instead of patching)
@ -858,22 +883,18 @@ void crystal_state::init_donghaer()
Rom[WORD_XOR_LE(0x19C72 / 2)] = 0x9001; // PUSH %R0
}
#ifdef ROGUE_CARTS
void crystal_state::init_maldaiza()
{
//uint16_t *Rom = (uint16_t*)memregion("flash")->base();
// ...
}
#endif
GAME( 2001, crysbios, 0, crystal, crystal, crystal_state, empty_init, ROT0, "BrezzaSoft", "Crystal System BIOS", MACHINE_IS_BIOS_ROOT )
GAME( 2001, crysking, crysbios, crystal, crystal, crystal_state, init_crysking, ROT0, "BrezzaSoft", "The Crystal of Kings", 0 )
GAME( 2001, evosocc, crysbios, crystal, crystal, crystal_state, init_evosocc, ROT0, "Evoga", "Evolution Soccer", 0 )
GAME( 2001, officeye, 0, crystal, urachamu, crystal_state, init_officeye, ROT0, "Danbi", "Office Yeo In Cheon Ha (version 1.2)", MACHINE_NOT_WORKING | MACHINE_UNEMULATED_PROTECTION ) // still has some instability issues
GAME( 2001, donghaer, crysbios, crystal, crystal, crystal_state, init_donghaer, ROT0, "Danbi", "Donggul Donggul Haerong", MACHINE_NOT_WORKING | MACHINE_UNEMULATED_PROTECTION ) // 2 players mode has GFX issues
GAME( 2001, officeye, 0, crystal, officeye, crystal_state, init_officeye, ROT0, "Danbi", "Office Yeo In Cheon Ha (version 1.2)", MACHINE_NOT_WORKING | MACHINE_UNEMULATED_PROTECTION ) // still has some instability issues
GAME( 2001, donghaer, crysbios, crystal, crystal, crystal_state, init_donghaer, ROT0, "Danbi", "Donggul Donggul Haerong", MACHINE_NOT_WORKING | MACHINE_UNEMULATED_PROTECTION ) // 2 players mode has GFX issues, seldomly hangs
GAME( 2002, urachamu, crysbios, crystal, urachamu, crystal_state, empty_init, ROT0, "GamToU", "Urachacha Mudaeri (Korea)", 0 ) // lamps, verify game timings
GAME( 2003, topbladv, crysbios, crystal, topbladv, crystal_state, init_topbladv, ROT0, "SonoKong / Expotato", "Top Blade V", 0 )
#ifdef ROGUE_CARTS
GAME( 2002, urachamu, crysbios, crystal, urachamu, crystal_state, empty_init, ROT0, "GamToU", "Urachacha Mudaeri (Korea)", MACHINE_NOT_WORKING ) // lamps, not extensively tested
GAME( 200?, wulybuly, crysbios, crystal, crystal, crystal_state, empty_init, ROT0, "<unknown>", "Wully Bully", MACHINE_NOT_WORKING ) // no actual graphics except offset text, confirmed to have no PIC protection so failing elsewhere
GAME( 200?, maldaiza, crysbios, crystal, crystal, crystal_state, init_maldaiza, ROT0, "<unknown>", "Maldaliza", MACHINE_NOT_WORKING | MACHINE_UNEMULATED_PROTECTION ) // PIC hookup
#endif

View File

@ -10914,11 +10914,14 @@ wizzard //
@source:crystal.cpp
crysbios //
crysking // 2001 Brezzasoft. Crystal of the kings
donghaer //
evosocc // 2001 Evoga. Evolution Soccer
officeye //
topbladv // 2002 Sonokong. Top Blade V
crysking // 2001 Brezzasoft
donghaer // 2001 Danbi
evosocc // 2001 Evoga
maldaiza //
officeye // 2001 Danbi
topbladv // 2002 Sonokong
urachamu // 2002 GamToU
wulybuly //
@source:airraid.cpp
airraid // (c) 1987 Seibu Kaihatsu