summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--.gitattributes2
-rw-r--r--hash/gameking.xml153
-rw-r--r--src/mess/drivers/gameking.c141
-rw-r--r--src/mess/mess.lst1
-rw-r--r--src/mess/mess.mak1
5 files changed, 298 insertions, 0 deletions
diff --git a/.gitattributes b/.gitattributes
index c4b4a3910b2..0620b457771 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -116,6 +116,7 @@ hash/galaxy.xml svneol=native#text/xml
hash/gameboy.xml svneol=native#text/xml
hash/gamecom.xml svneol=native#text/xml
hash/gamegear.xml svneol=native#text/xml
+hash/gameking.xml svneol=native#text/xml
hash/gamepock.xml svneol=native#text/xml
hash/gba.xml svneol=native#text/xml
hash/gbcolor.xml svneol=native#text/xml
@@ -8245,6 +8246,7 @@ src/mess/drivers/ft68m.c svneol=native#text/plain
src/mess/drivers/galaxy.c svneol=native#text/plain
src/mess/drivers/galeb.c svneol=native#text/plain
src/mess/drivers/gamecom.c svneol=native#text/plain
+src/mess/drivers/gameking.c svneol=native#text/plain
src/mess/drivers/gamepock.c svneol=native#text/plain
src/mess/drivers/gb.c svneol=native#text/plain
src/mess/drivers/gba.c svneol=native#text/plain
diff --git a/hash/gameking.xml b/hash/gameking.xml
new file mode 100644
index 00000000000..62221dc2530
--- /dev/null
+++ b/hash/gameking.xml
@@ -0,0 +1,153 @@
+<?xml version="1.0"?>
+<!DOCTYPE softwarelist SYSTEM "softwarelist.dtd">
+
+<!-- dumps are not yet verified as good, the 3-in-1 internal ROM is not yet dumped -->
+
+<softwarelist name="gameking" description="TimeTop GameKing cartridges">
+
+ <software name="2004">
+ <description>2004</description>
+ <year>200?</year>
+ <publisher>TimeTop</publisher>
+ <part name="cart" interface="gameking_cart">
+ <dataarea name="rom" size="0x20000">
+ <rom name="2004.bin" size="0x20000" crc="ff4a99e2" sha1="b5dea250829224ce8cf18ec310ad503cb928667f" offset="0x00000" />
+ </dataarea>
+ </part>
+ </software>
+
+ <software name="alcarlo">
+ <description>Adventure Legend Carlo</description>
+ <year>200?</year>
+ <publisher>TimeTop</publisher>
+ <part name="cart" interface="gameking_cart">
+ <dataarea name="rom" size="0x20000">
+ <rom name="adventure legend carlo.bin" size="0x20000" crc="7d61d215" sha1="741684b5379d4be732a98beace5d09f37ff19bbf" offset="0x00000" />
+ </dataarea>
+ </part>
+ </software>
+
+ <software name="aries">
+ <description>Aries</description>
+ <year>200?</year>
+ <publisher>TimeTop</publisher>
+ <part name="cart" interface="gameking_cart">
+ <dataarea name="rom" size="0x20000">
+ <rom name="aries.bin" size="0x20000" crc="b854f1f2" sha1="1ad7a325aba2cf3593165b53e7ae3973388335f7" offset="0x00000" />
+ </dataarea>
+ </part>
+ </software>
+
+ <software name="dinoadv">
+ <description>Dino Adventure Legend</description>
+ <year>200?</year>
+ <publisher>TimeTop</publisher>
+ <part name="cart" interface="gameking_cart">
+ <dataarea name="rom" size="0x20000">
+ <rom name="dino adventure legend.bin" size="0x20000" crc="2df0c1e6" sha1="df4b5dc80a758d9e3c9b00384e3099ad8331faad" offset="0x00000" />
+ </dataarea>
+ </part>
+ </software>
+
+ <software name="duckman">
+ <description>Duck Man</description>
+ <year>200?</year>
+ <publisher>TimeTop</publisher>
+ <part name="cart" interface="gameking_cart">
+ <dataarea name="rom" size="0x20000">
+ <rom name="duck man.bin" size="0x20000" crc="9d12950a" sha1="376606097f66105d1a9e97e9793362f6f1e3b1a7" offset="0x00000" />
+ </dataarea>
+ </part>
+ </software>
+
+ <software name="happybal">
+ <description>Happy Ball</description>
+ <year>200?</year>
+ <publisher>TimeTop</publisher>
+ <part name="cart" interface="gameking_cart">
+ <dataarea name="rom" size="0x20000">
+ <rom name="happy ball.bin" size="0x20000" crc="79d4e738" sha1="fc14712260ed6e3d6313055046546d37b7c838d2" offset="0x00000" />
+ </dataarea>
+ </part>
+ </software>
+
+ <software name="happykil">
+ <description>Happy Killer</description>
+ <year>200?</year>
+ <publisher>TimeTop</publisher>
+ <part name="cart" interface="gameking_cart">
+ <dataarea name="rom" size="0x20000">
+ <rom name="happy killer.bin" size="0x20000" crc="9fd7ec65" sha1="705309829ee87689793c15be1f781d52471908d6" offset="0x00000" />
+ </dataarea>
+ </part>
+ </software>
+
+ <software name="lanner">
+ <description>Lanneret</description>
+ <year>200?</year>
+ <publisher>TimeTop</publisher>
+ <part name="cart" interface="gameking_cart">
+ <dataarea name="rom" size="0x20000">
+ <rom name="lanneret.bin" size="0x20000" crc="249df6a5" sha1="bcf92ab85cc97ffe94d6a363a87b0b5de62c3c66" offset="0x00000" />
+ </dataarea>
+ </part>
+ </software>
+
+ <software name="penguin">
+ <description>Penguin</description>
+ <year>200?</year>
+ <publisher>TimeTop</publisher>
+ <part name="cart" interface="gameking_cart">
+ <dataarea name="rom" size="0x20000">
+ <rom name="penguin.bin" size="0x20000" crc="8c7b81c9" sha1="2f253b6ab6f6b9fc114ffca120d13df2e1e5f860" offset="0x00000" />
+ </dataarea>
+ </part>
+ </software>
+
+ <software name="popper">
+ <description>Popper</description>
+ <year>200?</year>
+ <publisher>TimeTop</publisher>
+ <part name="cart" interface="gameking_cart">
+ <dataarea name="rom" size="0x20000">
+ <rom name="popper.bin" size="0x20000" crc="a704617b" sha1="314931548578303e5e80a2bcb03c92472cb014d9" offset="0x00000" />
+ </dataarea>
+ </part>
+ </software>
+
+ <software name="sthero">
+ <description>Street Hero</description>
+ <year>200?</year>
+ <publisher>TimeTop</publisher>
+ <part name="cart" interface="gameking_cart">
+ <dataarea name="rom" size="0x20000">
+ <rom name="street hero.bin" size="0x20000" crc="9e0fe489" sha1="2c442126999e4b112a48e42a82dfa9ad9d6efa22" offset="0x00000" />
+ </dataarea>
+ </part>
+ </software>
+
+ <software name="smotor">
+ <description>Supermotor</description>
+ <year>200?</year>
+ <publisher>TimeTop</publisher>
+ <part name="cart" interface="gameking_cart">
+ <dataarea name="rom" size="0x20000">
+ <rom name="supermotor.bin" size="0x20000" crc="6290b94b" sha1="0c3011da35170241637907bb23d79355db38f343" offset="0x00000" />
+ </dataarea>
+ </part>
+ </software>
+
+ <software name="trojanl">
+ <description>Trojan Legend</description>
+ <year>200?</year>
+ <publisher>TimeTop</publisher>
+ <part name="cart" interface="gameking_cart">
+ <dataarea name="rom" size="0x20000">
+ <rom name="trojan legend.bin" size="0x20000" crc="7ce3975e" sha1="e925e4f28efc85ce69fb504b85a98a60883aa30d" offset="0x00000" />
+ </dataarea>
+ </part>
+ </software>
+
+
+
+</softwarelist>
diff --git a/src/mess/drivers/gameking.c b/src/mess/drivers/gameking.c
new file mode 100644
index 00000000000..93a7bb04c95
--- /dev/null
+++ b/src/mess/drivers/gameking.c
@@ -0,0 +1,141 @@
+/* TimeTop - GameKing */
+
+// these are meant to have a 3-in-1 internal ROM, not dumped
+
+#include "emu.h"
+#include "cpu/m6502/m65c02.h"
+#include "bus/generic/slot.h"
+#include "bus/generic/carts.h"
+
+
+class gameking_state : public driver_device
+{
+public:
+ gameking_state(const machine_config &mconfig, device_type type, const char *tag)
+ : driver_device(mconfig, type, tag),
+ m_maincpu(*this, "maincpu"),
+ m_cart(*this, "cartslot"),
+ m_palette(*this, "palette")
+ { }
+
+
+ DECLARE_DRIVER_INIT(gameking);
+ virtual void machine_start();
+ virtual void machine_reset();
+ DECLARE_PALETTE_INIT(gameking);
+
+ UINT32 screen_update_gameking(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ DECLARE_DEVICE_IMAGE_LOAD_MEMBER(gameking_cart);
+
+protected:
+ required_device<cpu_device> m_maincpu;
+ required_device<generic_slot_device> m_cart;
+ required_device<palette_device> m_palette;
+
+ memory_region *m_cart_rom;
+ memory_bank *m_mainbank;
+};
+
+static ADDRESS_MAP_START( gameking_mem , AS_PROGRAM, 8, gameking_state )
+ AM_RANGE(0xc000, 0xffff) AM_ROMBANK("mainbank")
+ADDRESS_MAP_END
+
+
+static INPUT_PORTS_START( gameking )
+INPUT_PORTS_END
+
+static const unsigned char gameking_palette[] =
+{
+ 0, 0, 0,
+ 63, 63, 63,
+ 127, 127, 127,
+ 255, 255, 255
+};
+
+PALETTE_INIT_MEMBER(gameking_state, gameking)
+{
+ for (int i = 0; i < sizeof(gameking_palette) / 3; i++)
+ palette.set_pen_color(i, gameking_palette[i*3], gameking_palette[i*3+1], gameking_palette[i*3+2]);
+}
+
+
+UINT32 gameking_state::screen_update_gameking(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
+{
+ return 0;
+}
+
+
+DRIVER_INIT_MEMBER(gameking_state, gameking)
+{
+}
+
+
+DEVICE_IMAGE_LOAD_MEMBER( gameking_state, gameking_cart )
+{
+ UINT32 size = m_cart->common_get_size("rom");
+
+ if (size > 0x20000)
+ {
+ image.seterror(IMAGE_ERROR_UNSPECIFIED, "Unsupported cartridge size");
+ return IMAGE_INIT_FAIL;
+ }
+
+ m_cart->rom_alloc(size, GENERIC_ROM8_WIDTH, ENDIANNESS_LITTLE);
+ m_cart->common_load_rom(m_cart->get_rom_base(), size, "rom");
+
+ return IMAGE_INIT_PASS;
+}
+
+void gameking_state::machine_start()
+{
+ astring region_tag;
+ m_cart_rom = memregion(region_tag.cpy(m_cart->tag()).cat(GENERIC_ROM_REGION_TAG));
+
+ if (!m_cart_rom) printf("No Rom\n");
+
+ m_mainbank = membank("mainbank");
+ m_mainbank->set_base(m_cart_rom->base());
+}
+
+void gameking_state::machine_reset()
+{
+}
+
+
+
+static MACHINE_CONFIG_START( gameking, gameking_state )
+ /* basic machine hardware */
+ MCFG_CPU_ADD("maincpu", M65C02, 6000000)
+ MCFG_CPU_PROGRAM_MAP(gameking_mem)
+ //MCFG_CPU_VBLANK_INT_DRIVER("screen", gameking_state, gameking_frame_int)
+
+ /* video hardware */
+ MCFG_SCREEN_ADD("screen", LCD)
+ MCFG_SCREEN_REFRESH_RATE(60)
+ MCFG_SCREEN_SIZE(48, 32)
+ MCFG_SCREEN_VISIBLE_AREA(0, 48-1, 0, 32-1)
+ MCFG_SCREEN_UPDATE_DRIVER(gameking_state, screen_update_gameking)
+ MCFG_SCREEN_PALETTE("palette")
+
+ MCFG_PALETTE_ADD("palette", ARRAY_LENGTH(gameking_palette) * 3)
+ MCFG_PALETTE_INIT_OWNER(gameking_state, gameking )
+
+
+
+ /* cartridge */
+ MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "gameking_cart")
+ MCFG_GENERIC_EXTENSIONS("bin")
+ MCFG_GENERIC_MANDATORY
+ MCFG_GENERIC_LOAD(gameking_state, gameking_cart)
+
+ /* Software lists */
+ MCFG_SOFTWARE_LIST_ADD("cart_list", "gameking")
+MACHINE_CONFIG_END
+
+ROM_START(gameking)
+ROM_END
+
+
+
+CONS(2003, gameking, 0, 0, gameking, gameking, gameking_state, gameking, "TimeTop", "GameKing GM-218", GAME_NOT_WORKING | GAME_NO_SOUND )
+// the GameKing 2 (GM-219) is probably identical HW
diff --git a/src/mess/mess.lst b/src/mess/mess.lst
index ffc717b6ee3..3ca355a94ce 100644
--- a/src/mess/mess.lst
+++ b/src/mess/mess.lst
@@ -2540,3 +2540,4 @@ alto2
gimix
tecnbras
minicom
+gameking
diff --git a/src/mess/mess.mak b/src/mess/mess.mak
index 48be3fe7f4e..ebb3638d234 100644
--- a/src/mess/mess.mak
+++ b/src/mess/mess.mak
@@ -1893,6 +1893,7 @@ $(MESSOBJ)/skeleton.a: \
$(MESS_DRIVERS)/fc100.o \
$(MESS_DRIVERS)/fk1.o \
$(MESS_DRIVERS)/ft68m.o \
+ $(MESS_DRIVERS)/gameking.o \
$(MESS_DRIVERS)/gimix.o \
$(MESS_DRIVERS)/grfd2301.o \
$(MESS_DRIVERS)/harriet.o \