diff --git a/scripts/target/mame/mess.lua b/scripts/target/mame/mess.lua index bfc7b1a738a..e96b17cf4b7 100644 --- a/scripts/target/mame/mess.lua +++ b/scripts/target/mame/mess.lua @@ -4489,6 +4489,7 @@ files { MAME_DIR .. "src/mame/drivers/mini2440.cpp", MAME_DIR .. "src/mame/drivers/miniframe.cpp", MAME_DIR .. "src/mame/drivers/minitel_2_rpic.cpp", + MAME_DIR .. "src/mame/drivers/miuchiz.cpp", MAME_DIR .. "src/mame/drivers/ml20.cpp", MAME_DIR .. "src/mame/drivers/mmd1.cpp", MAME_DIR .. "src/mame/drivers/mmd2.cpp", diff --git a/src/mame/drivers/miuchiz.cpp b/src/mame/drivers/miuchiz.cpp new file mode 100644 index 00000000000..a6a8ab55947 --- /dev/null +++ b/src/mame/drivers/miuchiz.cpp @@ -0,0 +1,137 @@ +// license:BSD-3-Clause +// copyright-holders:Jonathan Gevaryahu +// thanks-to: ChrisMiuchiz +/* + Driver for the Miuchiz handhelds + CPU: ST2205U + + Extremely preliminary + The inputs are mapped in an input array, but aren't actually hooked anywhere yet. + The screen is a dummy and just displays nothing for now. +*/ + +/* Core includes */ +#include "emu.h" +#include "cpu/m6502/st2205u.h" +#include "screen.h" + +namespace { + +// defines and logging +//#define LOG_GENERAL (1U << 0) //defined in logmacro.h already +#define VERBOSE (LOG_GENERAL) +//#define LOG_OUTPUT_FUNC printf + +#include "logmacro.h" +#define LOGGEN(...) LOGMASKED(LOG_GENERAL, __VA_ARGS__) + +// class definition +class miuchiz_state : public driver_device +{ +public: + miuchiz_state(const machine_config &mconfig, device_type type, const char *tag) + : driver_device(mconfig, type, tag) + , m_maincpu(*this, "maincpu") + , m_screen(*this, "screen") + { } + + void miuchiz(machine_config &config); + +private: + void mem_map(address_map &map); + + required_device m_maincpu; + required_device m_screen; + u32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); +}; + + +// address maps +void miuchiz_state::mem_map(address_map &map) +{ + map(0x00000000, 0x00003fff).rom().region("otp", 0); +} + +// map(0x01000000, 0x011fffff).rom().region("flash", 0); + + +// input ports +static INPUT_PORTS_START( miuchiz ) + PORT_START("INPUTS") + PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_NAME("Up") + PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_NAME("Down") + PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_NAME("Left") + PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_NAME("Right") + PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_START1 ) PORT_NAME("Power") + PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_START2 ) PORT_NAME("Menu") + PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME("Upside-up") + PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_NAME("Upside-down") + PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Screen-top-left") + PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("Screen-top-right") + PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("Screen-bottom-left") + PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("Screen-bottom-right") + PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Action") + PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON8 ) PORT_NAME("Mute") + PORT_BIT( 0xc000, IP_ACTIVE_LOW, IPT_UNUSED ) +INPUT_PORTS_END + +// machine specific functions +u32 miuchiz_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) +{ + // todo + return 0; +} + +// machine driver +void miuchiz_state::miuchiz(machine_config &config) +{ + ST2205U(config, m_maincpu, 24000000); // clock speed is unknown, guessed 24MHz + m_maincpu->set_addrmap(AS_PROGRAM, &miuchiz_state::mem_map); + + /* video hardware */ + SCREEN(config, m_screen, SCREEN_TYPE_LCD); + m_screen->set_refresh_hz(60); + m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(0)); + m_screen->set_size(67, 98); + m_screen->set_visarea(0, 67 - 1, 0, 98 - 1); + m_screen->set_screen_update(FUNC(miuchiz_state::screen_update)); + + /* serial hardware */ + + /* sound hardware */ +} + +// rom definitions +ROM_START( miuchiz ) + ROM_REGION(0x4000, "otp", 0) // aka 'bootrom', in on-st2205u-chip mask or flash ROM, common for all versions + ROM_LOAD( "otp.dat", 0x000000, 0x004000, CRC(2ff7ec96) SHA1(633365fd19a3d0f2ce56cb499b2577a5fb53e466) ) + + ROM_REGION(0x200000, "flash", 0) // external SST39VF1681 flash chips + // todo: should these be bioses? or separate drivers for each type (as the artwork would differ) with the alt versions being bioses within each? + ROM_LOAD( "cloe_1.02.dat", 0x000000, 0x200000, CRC(569e14db) SHA1(5600c3a9cd945f53e7897bbad81b4dc0d7e9457d) ) + ROM_LOAD( "cloe_1.08.dat", 0x000000, 0x200000, CRC(6989e9d9) SHA1(70841a2aed9b567e049b93aab1e7c0b04db8c1d9) ) + ROM_LOAD( "cloe_1.09.03.dat", 0x000000, 0x200000, CRC(9f1c9414) SHA1(74c71b0e4cc8d18b0d6072558d593a3672299e95) ) + ROM_LOAD( "cloe_2.03.01.dat", 0x000000, 0x200000, CRC(c78640cf) SHA1(f58d0fb5c18e474a70ff5bbe529816fbb1a1d295) ) + ROM_LOAD( "creeper_1.04.dat", 0x000000, 0x200000, CRC(86411ef2) SHA1(4060050e2133550b61e21632c4f6237a2ce0c35b) ) + ROM_LOAD( "creeper_1.09.03.dat",0x000000, 0x200000, CRC(80b0a752) SHA1(99022d3256ba000582b8a429c9105b9564227392) ) + ROM_LOAD( "dash_1.02.dat", 0x000000, 0x200000, CRC(68d616a1) SHA1(6bd97f124a53b22143a015597aa3c7d545a53913) ) + ROM_LOAD( "dash_1.09.03.dat", 0x000000, 0x200000, CRC(e36047b3) SHA1(04bf0ce65305ca78d755a0a802d7af87882428ed) ) + ROM_LOAD( "inferno_1.04.dat", 0x000000, 0x200000, CRC(902b0443) SHA1(3cdaf2b2131132e20c5d63b079060553ff8304bb) ) + ROM_LOAD( "inferno_1.09.03.dat",0x000000, 0x200000, CRC(3c6c2bf8) SHA1(e049bc62902c755da1779c57fc7a6724f5210095) ) + ROM_LOAD( "inferno_2.00.04.dat",0x000000, 0x200000, CRC(f7f39596) SHA1(3d8d4310a76cff0420b3f885e4df4baa4ff9023f) ) + ROM_LOAD( "roc_1.04.dat", 0x000000, 0x200000, CRC(640f0d3a) SHA1(e68a187c4fb9674591cb1661de90bd2fb0464530) ) + ROM_LOAD( "roc_1.08.dat", 0x000000, 0x200000, CRC(bace7bc5) SHA1(8abb22c3ee136af0a95e110f55572d06064f64e3) ) + ROM_LOAD( "roc_1.09.03.dat", 0x000000, 0x200000, CRC(1d3bbbeb) SHA1(c3b0658019948c128e9f827027c98f649a9e61f8) ) + ROM_LOAD( "roc_2.00.04.dat", 0x000000, 0x200000, CRC(4c92ce75) SHA1(e00f37402d15cb166afdfd4132a4d48556eb3a04) ) + ROM_LOAD( "spike_1.02.dat", 0x000000, 0x200000, CRC(20c3e78e) SHA1(48c9ab622a32ea96abd6186bc4799fb021b9605b) ) + ROM_LOAD( "spike_1.09.03.dat", 0x000000, 0x200000, CRC(991e2f4d) SHA1(8f635fbd2a6a3a606cd7cbd19ac097974620fb21) ) + ROM_LOAD( "yasmin_1.02.dat", 0x000000, 0x200000, CRC(41749f71) SHA1(d388c977ccc87837b167395423196b480b569e0e) ) + ROM_LOAD( "yasmin_1.08.dat", 0x000000, 0x200000, CRC(56395608) SHA1(4ae9a7026faa7a01d49168336a86beeef56f8e5d) ) + ROM_LOAD( "yasmin_1.09.03.dat", 0x000000, 0x200000, CRC(8c4da665) SHA1(e6948324fd880bfb6b2fdaa282aa2e1841a7e6f1) ) + ROM_LOAD( "yasmin_2.03.01.dat", 0x000000, 0x200000, CRC(cdc4d525) SHA1(e17f280b54647ec76deb9dab8e5fbf35f1a48266) ) +ROM_END + +} + +// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS +COMP( 2006, miuchiz, 0, 0, miuchiz, miuchiz, miuchiz_state, empty_init, "MGA Entertainment", "MIUCHIZ Virtual Companions", MACHINE_IS_SKELETON ) diff --git a/src/mame/mame.lst b/src/mame/mame.lst index d87ac5b1dfb..a7420751ead 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -23218,6 +23218,9 @@ spangj // --/--/1990 (c) 1990 Mitchell (Japan) @source:mits680b.cpp mits680b // +@source:miuchiz.cpp +miuchiz // (c) 2006 MGA Entertainment + @source:mjkjidai.cpp mjkjidai // (c) 1986 Sanritsu diff --git a/src/mame/mess.flt b/src/mame/mess.flt index 299d9388dde..45e67e83099 100644 --- a/src/mame/mess.flt +++ b/src/mame/mess.flt @@ -606,6 +606,7 @@ miniframe.cpp minitel_2_rpic.cpp mips.cpp mits680b.cpp +miuchiz.cpp mk14.cpp mk85.cpp mk90.cpp