- igs/igspoker.cpp: moved the kungfu set to jackie.cpp, boots but has incorrect GFX and some missing controls

- igs/iqblock.cpp: consolidated driver in single file
This commit is contained in:
Ivan Vangelista 2023-10-06 17:07:26 +02:00
parent d592af06e0
commit 371d613a6d
6 changed files with 436 additions and 304 deletions

View File

@ -125,7 +125,6 @@ public:
void init_cpoker300us();
void init_igs_ncs2();
void init_cpokerpk();
void init_kungfu();
void init_kungfua();
int hopper_r();
@ -2965,23 +2964,6 @@ void igspoker_state::init_pktet346()
rom[0xbb0c] = 0xc3;
}
ROM_START( kungfu ) // IGS PCB N0- 0139
ROM_REGION( 0x20000, "maincpu", ROMREGION_ERASE00 )
ROM_LOAD( "kung fu v202n.u23", 0x00000, 0x10000, CRC(53396dd3) SHA1(1bab42394f016f800dbd80603c70defc25380fd7) )
ROM_LOAD( "kungfu-7.u22", 0x10000, 0x08000, CRC(0568f20b) SHA1(a51a10deee0d581b79d0fee354cedceaa660f55c) ) // 1ST AND 2ND HALF IDENTICAL, otherwise same as the other set
ROM_IGNORE( 0x08000 )
ROM_REGION( 0x60000, "gfx1", 0 )
ROM_LOAD( "kungfu-4.u4", 0x00000, 0x20000, CRC(df4afedb) SHA1(56ab18c46a199653c284417a8e9edc9f32374318) )
ROM_LOAD( "kungfu-5.u5", 0x20000, 0x20000, CRC(25c9c98e) SHA1(2d3a399d8d53ee5cb8106d2b35d1ab1778439f81) )
ROM_LOAD( "kungfu-6.u6", 0x40000, 0x20000, CRC(f1ec5f0d) SHA1(0aa888e13312ed5d98953c81f03a61c6175c7fec) )
ROM_REGION( 0x30000, "gfx2", ROMREGION_ERASE00 )
ROM_LOAD( "kungfu-1.u1", 0x00000, 0x4000, CRC(abaada6b) SHA1(a6b910db7451e8ca737f43f32dfc8fc5ecf865f4) )
ROM_LOAD( "kungfu-2.u2", 0x10000, 0x4000, CRC(927b3060) SHA1(a780ea5aaee04287cc9533c2d258dc18f8426530) )
ROM_LOAD( "kungfu-3.u3", 0x20000, 0x4000, CRC(bbf78e03) SHA1(06fee093e75e2611d00c076c2e0a681938fa8b74) )
ROM_END
/*
Cherry master looking board
@ -3040,18 +3022,6 @@ ROM_START( kungfua )
ROM_LOAD( "kungfu.u48", 0x000, 0xde1, CRC(5d4aacaf) SHA1(733546ce0585c40833e1c34504c33219a2bea0a9) )
ROM_END
void igspoker_state::init_kungfu()
{
uint8_t *rom = memregion("maincpu")->base();
for (int A = 0; A < 0x10000; A++)
{
rom[A] ^= 0x01;
if ((A & 0x0060) == 0x0020) rom[A] ^= 0x20;
if ((A & 0x0282) == 0x0282) rom[A] ^= 0x01;
if ((A & 0x0940) == 0x0940) rom[A] ^= 0x02;
}
}
void igspoker_state::init_kungfua()
{
uint8_t *rom = memregion("maincpu")->base();
@ -3099,5 +3069,4 @@ GAMEL( 1993?,pktet346, 0, pktetris, pktet346, igspoker_state, init_pkt
GAMEL( 199?, igstet341, pktet346, pktetris, igstet341,igspoker_state, init_tet341, ROT0, "IGS", "Tetris (v341R)", 0, layout_igspoker )
GAMEL( 199?, igstet342, pktet346, pktetris, igstet341,igspoker_state, init_tet341, ROT0, "IGS", "Tetris (v342R)", 0, layout_igspoker )
GAMEL( 199?, kungfu, 0, igspoker, cpoker, igspoker_state, init_kungfu, ROT0, "IGS", "Kung Fu (IGS, v202N)", MACHINE_NOT_WORKING, layout_igspoker ) // decryption should be good, needs proper address map
GAMEL( 1992, kungfua, kungfu, igspoker, cpoker, igspoker_state, init_kungfua, ROT0, "IGS", "Kung Fu (IGS, v100)", MACHINE_NOT_WORKING, layout_igspoker ) // missing internal ROM dump
GAMEL( 1992, kungfua, kungfu, igspoker, cpoker, igspoker_state, init_kungfua, ROT0, "IGS", "Kung Fu Fighters (IGS, v100)", MACHINE_NOT_WORKING, layout_igspoker ) // missing internal ROM dump

View File

@ -1,5 +1,6 @@
// license:BSD-3-Clause
// copyright-holders:Nicola Salmoria, Ernesto Corvi
/***************************************************************************
IQ Block (c) 1992 IGS
@ -50,16 +51,162 @@ Grndtour:
***************************************************************************/
#include "emu.h"
#include "iqblock.h"
#include "cpu/z80/z80.h"
#include "machine/i8255.h"
#include "machine/timer.h"
#include "sound/ymopl.h"
#include "emupal.h"
#include "screen.h"
#include "speaker.h"
#include "tilemap.h"
namespace {
class iqblock_state : public driver_device
{
public:
iqblock_state(const machine_config &mconfig, device_type type, const char *tag) :
driver_device(mconfig, type, tag),
m_maincpu(*this,"maincpu"),
m_gfxdecode(*this, "gfxdecode"),
m_rambase(*this, "rambase"),
m_bgvideoram(*this, "bgvideoram"),
m_fgvideoram(*this, "fgvideoram")
{ }
void iqblock(machine_config &config);
void init_grndtour();
void init_iqblock();
protected:
virtual void video_start() override;
private:
required_device<cpu_device> m_maincpu;
required_device<gfxdecode_device> m_gfxdecode;
required_shared_ptr<uint8_t> m_rambase;
required_shared_ptr<uint8_t> m_bgvideoram;
required_shared_ptr<uint8_t> m_fgvideoram;
uint8_t m_videoenable = 0;
uint8_t m_video_type = 0;
tilemap_t *m_bg_tilemap = nullptr;
tilemap_t *m_fg_tilemap = nullptr;
void iqblock_prot_w(uint8_t data);
void grndtour_prot_w(uint8_t data);
void irqack_w(uint8_t data);
void fgvideoram_w(offs_t offset, uint8_t data);
void bgvideoram_w(offs_t offset, uint8_t data);
void fgscroll_w(offs_t offset, uint8_t data);
void port_c_w(uint8_t data);
TIMER_DEVICE_CALLBACK_MEMBER(irq);
TILE_GET_INFO_MEMBER(get_bg_tile_info);
TILE_GET_INFO_MEMBER(get_fg_tile_info);
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
void program_map(address_map &map);
void port_map(address_map &map);
};
// video
/***************************************************************************
Callbacks for the TileMap code
***************************************************************************/
TILE_GET_INFO_MEMBER(iqblock_state::get_bg_tile_info)
{
int const code = m_bgvideoram[tile_index] + (m_bgvideoram[tile_index + 0x800] << 8);
tileinfo.set(0,
code &(m_video_type ? 0x1fff : 0x3fff),
m_video_type? (2 * (code >> 13) + 1) : (4 * (code >> 14) + 3),
0);
}
TILE_GET_INFO_MEMBER(iqblock_state::get_fg_tile_info)
{
int const code = m_fgvideoram[tile_index];
tileinfo.set(1,
code & 0x7f,
(code & 0x80) ? 3 : 0,
0);
}
/***************************************************************************
Start the video hardware emulation.
***************************************************************************/
void iqblock_state::video_start()
{
m_bg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(iqblock_state::get_bg_tile_info)), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
m_fg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(iqblock_state::get_fg_tile_info)), TILEMAP_SCAN_ROWS, 8, 32, 64, 8);
m_bg_tilemap->set_transparent_pen(0);
m_fg_tilemap->set_scroll_cols(64);
save_item(NAME(m_videoenable));
}
/***************************************************************************
Memory handlers
***************************************************************************/
void iqblock_state::fgvideoram_w(offs_t offset, uint8_t data)
{
m_fgvideoram[offset] = data;
m_fg_tilemap->mark_tile_dirty(offset);
}
void iqblock_state::bgvideoram_w(offs_t offset, uint8_t data)
{
m_bgvideoram[offset] = data;
m_bg_tilemap->mark_tile_dirty(offset & 0x7ff);
}
void iqblock_state::fgscroll_w(offs_t offset, uint8_t data)
{
m_fg_tilemap->set_scrolly(offset, data);
}
/***************************************************************************
Display refresh
***************************************************************************/
uint32_t iqblock_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
if (!m_videoenable) return 0;
m_fg_tilemap->draw(screen, bitmap, cliprect, 0, 0);
m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0);
return 0;
}
// machine
void iqblock_state::iqblock_prot_w(uint8_t data)
{
m_rambase[0xe26] = data;
@ -72,13 +219,12 @@ void iqblock_state::grndtour_prot_w(uint8_t data)
m_rambase[0xe39] = data;
m_rambase[0xe3a] = data;
m_rambase[0xe2f] = data;
}
TIMER_DEVICE_CALLBACK_MEMBER(iqblock_state::irq)
{
int scanline = param;
int const scanline = param;
if((scanline % 16) != 0)
return;
@ -96,27 +242,27 @@ void iqblock_state::irqack_w(uint8_t data)
}
void iqblock_state::port_C_w(uint8_t data)
void iqblock_state::port_c_w(uint8_t data)
{
/* bit 4 unknown; it is pulsed at the end of every NMI */
// bit 4 unknown; it is pulsed at the end of every NMI
/* bit 5 seems to be 0 during screen redraw */
// bit 5 seems to be 0 during screen redraw
m_videoenable = data & 0x20;
/* bit 6 is coin counter */
machine().bookkeeping().coin_counter_w(0,data & 0x40);
// bit 6 is coin counter
machine().bookkeeping().coin_counter_w(0, data & 0x40);
/* bit 7 could be a second coin counter, but coin 2 doesn't seem to work... */
// bit 7 could be a second coin counter, but coin 2 doesn't seem to work...
}
void iqblock_state::main_map(address_map &map)
void iqblock_state::program_map(address_map &map)
{
map(0x0000, 0xefff).rom();
map(0xf000, 0xffff).ram().share("rambase");
map(0xf000, 0xffff).ram().share(m_rambase);
}
void iqblock_state::main_portmap(address_map &map)
void iqblock_state::port_map(address_map &map)
{
map(0x2000, 0x23ff).w("palette", FUNC(palette_device::write8)).share("palette");
map(0x2800, 0x2bff).w("palette", FUNC(palette_device::write8_ext)).share("palette_ext");
@ -126,9 +272,9 @@ void iqblock_state::main_portmap(address_map &map)
map(0x50b0, 0x50b1).w("ymsnd", FUNC(ym2413_device::write)); // UM3567_data_port_0_w
map(0x50c0, 0x50c0).w(FUNC(iqblock_state::irqack_w));
map(0x6000, 0x603f).w(FUNC(iqblock_state::fgscroll_w));
map(0x6800, 0x69ff).w(FUNC(iqblock_state::fgvideoram_w)).share("fgvideoram"); /* initialized up to 6fff... bug or larger tilemap? */
map(0x7000, 0x7fff).ram().w(FUNC(iqblock_state::bgvideoram_w)).share("bgvideoram");
map(0x8000, 0xffff).rom().region("user1", 0);
map(0x6800, 0x69ff).w(FUNC(iqblock_state::fgvideoram_w)).share(m_fgvideoram); // initialized up to 6fff... bug or larger tilemap?
map(0x7000, 0x7fff).ram().w(FUNC(iqblock_state::bgvideoram_w)).share(m_bgvideoram);
map(0x8000, 0xffff).rom().region("bgmaps", 0);
}
static INPUT_PORTS_START( iqblock )
@ -333,27 +479,27 @@ static const gfx_layout tilelayout3 =
#endif
static GFXDECODE_START( gfx_iqblock )
GFXDECODE_ENTRY( "gfx1", 0, tilelayout1, 0, 16 ) /* only odd color codes are used */
GFXDECODE_ENTRY( "gfx2", 0, tilelayout2, 0, 4 ) /* only color codes 0 and 3 used */
GFXDECODE_ENTRY( "bgtiles", 0, tilelayout1, 0, 16 ) // only odd color codes are used
GFXDECODE_ENTRY( "fgtiles", 0, tilelayout2, 0, 4 ) // only color codes 0 and 3 used
GFXDECODE_END
void iqblock_state::iqblock(machine_config &config)
{
/* basic machine hardware */
Z80(config, m_maincpu, 12000000/2); /* 6 MHz */
m_maincpu->set_addrmap(AS_PROGRAM, &iqblock_state::main_map);
m_maincpu->set_addrmap(AS_IO, &iqblock_state::main_portmap);
// basic machine hardware
Z80(config, m_maincpu, 12_MHz_XTAL / 2); // 6 MHz
m_maincpu->set_addrmap(AS_PROGRAM, &iqblock_state::program_map);
m_maincpu->set_addrmap(AS_IO, &iqblock_state::port_map);
TIMER(config, "scantimer").configure_scanline(FUNC(iqblock_state::irq), "screen", 0, 1);
i8255_device &ppi(I8255A(config, "ppi8255"));
ppi.in_pa_callback().set_ioport("P1");
ppi.in_pb_callback().set_ioport("P2");
ppi.in_pc_callback().set_ioport("EXTRA");
ppi.out_pc_callback().set(FUNC(iqblock_state::port_C_w));
ppi.out_pc_callback().set(FUNC(iqblock_state::port_c_w));
/* video hardware */
// video hardware
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
screen.set_refresh_hz(60);
screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
@ -365,10 +511,10 @@ void iqblock_state::iqblock(machine_config &config)
GFXDECODE(config, m_gfxdecode, "palette", gfx_iqblock);
PALETTE(config, "palette").set_format(palette_device::xBGR_555, 1024);
/* sound hardware */
// sound hardware
SPEAKER(config, "mono").front_center();
YM2413(config, "ymsnd", 3'579'545).add_route(ALL_OUTPUTS, "mono", 1.0);
YM2413(config, "ymsnd", 3.579545_MHz_XTAL).add_route(ALL_OUTPUTS, "mono", 1.0);
}
@ -403,15 +549,15 @@ ROM_START( iqblock )
ROM_REGION( 0x10000, "maincpu", 0 )
ROM_LOAD( "u7.v5", 0x0000, 0x10000, CRC(811f306e) SHA1(d0aef80f1624002d05721276358f26a3ef69a3f6) )
ROM_REGION( 0x8000, "user1", 0 )
ROM_LOAD( "u8.6", 0x0000, 0x8000, CRC(2651bc27) SHA1(53e1d6ffd78c8a612863b29b0f8734e740d563c7) ) /* background maps, read by the CPU */
ROM_REGION( 0x8000, "bgmaps", 0 )
ROM_LOAD( "u8.6", 0x0000, 0x8000, CRC(2651bc27) SHA1(53e1d6ffd78c8a612863b29b0f8734e740d563c7) ) // background maps, read by the CPU
ROM_REGION( 0x60000, "gfx1", 0 )
ROM_REGION( 0x60000, "bgtiles", 0 )
ROM_LOAD( "u28.1", 0x00000, 0x20000, CRC(ec4b64b4) SHA1(000e9df0c0b5fcde5ead218dfcdc156bc4be909d) )
ROM_LOAD( "u27.2", 0x20000, 0x20000, CRC(74aa3de3) SHA1(16757c24765d22026793a0c53d3f24c106951a18) )
ROM_LOAD( "u26.3", 0x40000, 0x20000, CRC(2896331b) SHA1(51eba9f9f653a11cb96c461ab495d943d34cedc6) )
ROM_REGION( 0x8000, "gfx2", 0 )
ROM_REGION( 0x8000, "fgtiles", 0 )
ROM_LOAD( "u25.4", 0x0000, 0x4000, CRC(8fc222af) SHA1(ac1fb5e6caec391a76e3af51e133aecc65cd5aed) )
ROM_LOAD( "u24.5", 0x4000, 0x4000, CRC(61050e1e) SHA1(1f7185b2a5a2e237120276c95344744b146b4bf6) )
ROM_END
@ -463,15 +609,15 @@ ROM_START( grndtour )
ROM_REGION( 0x10000, "maincpu", 0 )
ROM_LOAD( "grand7.u7", 0x0000, 0x10000, CRC(95cac31e) SHA1(47bbcce6981ea3d38e0aa49ccd3762a4529f3c96) )
ROM_REGION( 0x8000, "user1", 0 )
ROM_LOAD( "grand6.u8", 0x0000, 0x8000, CRC(4c634b86) SHA1(c36df147187bc526f2348bc2f4d4c4e35bb45f38) ) /* background maps, read by the CPU */
ROM_REGION( 0x8000, "bgmaps", 0 )
ROM_LOAD( "grand6.u8", 0x0000, 0x8000, CRC(4c634b86) SHA1(c36df147187bc526f2348bc2f4d4c4e35bb45f38) ) // background maps, read by the CPU
ROM_REGION( 0xc0000, "gfx1", 0 )
ROM_REGION( 0xc0000, "bgtiles", 0 )
ROM_LOAD( "grand1.u28", 0x00000, 0x40000, CRC(de85c664) SHA1(3a4b0cac88a0fea1c80541fe49c799e3550bedee) )
ROM_LOAD( "grand2.u27", 0x40000, 0x40000, CRC(8456204e) SHA1(b604d501f360670f57b937ad96af64c1c2038ef7) )
ROM_LOAD( "grand3.u26", 0x80000, 0x40000, CRC(77632917) SHA1(d91eadec2e0fb3082299362d18814b8ec4c5e068) )
ROM_REGION( 0x8000, "gfx2", 0 )
ROM_REGION( 0x8000, "fgtiles", 0 )
ROM_LOAD( "grand4.u25", 0x0000, 0x4000, CRC(48d09746) SHA1(64669f572b9a98b078ee1ea0b614c117e5dfbec9) )
ROM_LOAD( "grand5.u24", 0x4000, 0x4000, CRC(f896efb2) SHA1(8dc8546e363b4ff80983e3b8e2a19ebb7ff30c7b) )
ROM_END
@ -479,7 +625,7 @@ ROM_END
void iqblock_state::init_iqblock()
{
uint8_t *rom = memregion("maincpu")->base();
/* decrypt the program ROM */
// decrypt the program ROM
for (int i = 0; i < 0xf000; i++)
{
if ((i & 0x0282) != 0x0282) rom[i] ^= 0x01;
@ -488,13 +634,13 @@ void iqblock_state::init_iqblock()
}
m_maincpu->space(AS_PROGRAM).install_write_handler(0xfe26, 0xfe26, write8smo_delegate(*this, FUNC(iqblock_state::iqblock_prot_w)));
m_video_type=1;
m_video_type = 1;
}
void iqblock_state::init_grndtour()
{
uint8_t *rom = memregion("maincpu")->base();
/* decrypt the program ROM */
// decrypt the program ROM
for (int i = 0; i < 0xf000; i++)
{
if ((i & 0x0282) != 0x0282) rom[i] ^= 0x01;
@ -503,9 +649,10 @@ void iqblock_state::init_grndtour()
}
m_maincpu->space(AS_PROGRAM).install_write_handler(0xfe39, 0xfe39, write8smo_delegate(*this, FUNC(iqblock_state::grndtour_prot_w)));
m_video_type=0;
m_video_type = 0;
}
} // anonymous namespace
GAME( 1993, iqblock, 0, iqblock, iqblock, iqblock_state, init_iqblock, ROT0, "IGS", "IQ-Block (V100U)", MACHINE_SUPPORTS_SAVE )

View File

@ -1,61 +0,0 @@
// license:BSD-3-Clause
// copyright-holders:Nicola Salmoria, Ernesto Corvi
#ifndef MAME_IGS_IQBLOCK_H
#define MAME_IGS_IQBLOCK_H
#pragma once
#include "machine/timer.h"
#include "tilemap.h"
class iqblock_state : public driver_device
{
public:
iqblock_state(const machine_config &mconfig, device_type type, const char *tag) :
driver_device(mconfig, type, tag),
m_maincpu(*this,"maincpu"),
m_gfxdecode(*this, "gfxdecode"),
m_rambase(*this, "rambase"),
m_bgvideoram(*this, "bgvideoram"),
m_fgvideoram(*this, "fgvideoram")
{ }
void iqblock(machine_config &config);
void init_grndtour();
void init_iqblock();
private:
required_device<cpu_device> m_maincpu;
required_device<gfxdecode_device> m_gfxdecode;
required_shared_ptr<uint8_t> m_rambase;
required_shared_ptr<uint8_t> m_bgvideoram;
required_shared_ptr<uint8_t> m_fgvideoram;
int m_videoenable = 0;
int m_video_type = 0;
tilemap_t *m_bg_tilemap = nullptr;
tilemap_t *m_fg_tilemap = nullptr;
void iqblock_prot_w(uint8_t data);
void grndtour_prot_w(uint8_t data);
void irqack_w(uint8_t data);
void fgvideoram_w(offs_t offset, uint8_t data);
void bgvideoram_w(offs_t offset, uint8_t data);
void fgscroll_w(offs_t offset, uint8_t data);
void port_C_w(uint8_t data);
TIMER_DEVICE_CALLBACK_MEMBER(irq);
virtual void video_start() override;
TILE_GET_INFO_MEMBER(get_bg_tile_info);
TILE_GET_INFO_MEMBER(get_fg_tile_info);
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
void main_map(address_map &map);
void main_portmap(address_map &map);
};
#endif // MAME_IGS_IQBLOCK_H

View File

@ -1,90 +0,0 @@
// license:BSD-3-Clause
// copyright-holders:Nicola Salmoria, Ernesto Corvi
#include "emu.h"
#include "iqblock.h"
/***************************************************************************
Callbacks for the TileMap code
***************************************************************************/
TILE_GET_INFO_MEMBER(iqblock_state::get_bg_tile_info)
{
int code = m_bgvideoram[tile_index] + (m_bgvideoram[tile_index + 0x800] << 8);
tileinfo.set(0,
code &(m_video_type ? 0x1fff : 0x3fff),
m_video_type? (2*(code >> 13)+1) : (4*(code >> 14)+3),
0);
}
TILE_GET_INFO_MEMBER(iqblock_state::get_fg_tile_info)
{
int code = m_fgvideoram[tile_index];
tileinfo.set(1,
code & 0x7f,
(code & 0x80) ? 3 : 0,
0);
}
/***************************************************************************
Start the video hardware emulation.
***************************************************************************/
void iqblock_state::video_start()
{
m_bg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(iqblock_state::get_bg_tile_info)), TILEMAP_SCAN_ROWS, 8, 8,64,32);
m_fg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(iqblock_state::get_fg_tile_info)), TILEMAP_SCAN_ROWS, 8,32,64, 8);
m_bg_tilemap->set_transparent_pen(0);
m_fg_tilemap->set_scroll_cols(64);
save_item(NAME(m_videoenable));
}
/***************************************************************************
Memory handlers
***************************************************************************/
void iqblock_state::fgvideoram_w(offs_t offset, uint8_t data)
{
m_fgvideoram[offset] = data;
m_fg_tilemap->mark_tile_dirty(offset);
}
void iqblock_state::bgvideoram_w(offs_t offset, uint8_t data)
{
m_bgvideoram[offset] = data;
m_bg_tilemap->mark_tile_dirty(offset & 0x7ff);
}
void iqblock_state::fgscroll_w(offs_t offset, uint8_t data)
{
m_fg_tilemap->set_scrolly(offset,data);
}
/***************************************************************************
Display refresh
***************************************************************************/
uint32_t iqblock_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
if (!m_videoenable) return 0;
m_fg_tilemap->draw(screen, bitmap, cliprect, 0,0);
m_bg_tilemap->draw(screen, bitmap, cliprect, 0,0);
return 0;
}

View File

@ -1,5 +1,6 @@
// license:BSD-3-Clause
// copyright-holders:David Haywood, Mirko Buffoni
/*
Happy Jackie (c) 1993 IGS.
Video Slot machine game for amusement only.
@ -47,10 +48,12 @@ Note
#include "emu.h"
#include "cpu/z80/z80.h"
#include "machine/i8255.h"
#include "machine/timer.h"
#include "sound/ymopl.h"
#include "emupal.h"
#include "screen.h"
#include "speaker.h"
@ -72,6 +75,7 @@ public:
, m_reel_ram(*this, "reel_ram%u", 1U)
, m_fg_tile_ram(*this, "fg_tile_ram")
, m_fg_color_ram(*this, "fg_color_ram")
, m_exprom_bank(*this, "exprom_bank")
, m_led(*this, "led")
, m_lamps(*this, "lamp%u", 1U)
{ }
@ -79,9 +83,15 @@ public:
void jackie(machine_config &config);
void init_jackie();
void init_kungfu();
int hopper_r();
protected:
virtual void machine_start() override;
virtual void machine_reset() override;
virtual void video_start() override;
private:
void fg_tile_w(offs_t offset, uint8_t data);
void fg_color_w(offs_t offset, uint8_t data);
@ -89,9 +99,8 @@ private:
void nmi_and_coins_w(uint8_t data);
void lamps_w(uint8_t data);
uint8_t igs_irqack_r();
void igs_irqack_w(uint8_t data);
uint8_t expram_r(offs_t offset);
uint8_t irqack_r();
void irqack_w(uint8_t data);
template<uint8_t Which> void unk_reg_lo_w(offs_t offset, uint8_t data);
template<uint8_t Which> void unk_reg_hi_w(offs_t offset, uint8_t data);
@ -105,10 +114,6 @@ private:
void io_map(address_map &map);
void prg_map(address_map &map);
virtual void machine_start() override;
virtual void machine_reset() override;
virtual void video_start() override;
required_device<cpu_device> m_maincpu;
required_device<gfxdecode_device> m_gfxdecode;
required_device<screen_device> m_screen;
@ -118,16 +123,16 @@ private:
required_shared_ptr_array<uint8_t, 3> m_reel_ram;
required_shared_ptr<uint8_t> m_fg_tile_ram;
required_shared_ptr<uint8_t> m_fg_color_ram;
required_memory_bank m_exprom_bank;
output_finder<> m_led;
output_finder<6> m_lamps;
int m_exp_bank = 0;
tilemap_t *m_fg_tilemap = nullptr;
tilemap_t *m_reel_tilemap[3]{};
int m_irq_enable = 0;
int m_nmi_enable = 0;
int m_bg_enable = 0;
int m_hopper = 0;
uint8_t m_irq_enable = 0;
uint8_t m_nmi_enable = 0;
uint8_t m_bg_enable = 0;
uint8_t m_hopper = 0;
uint8_t m_out[3]{};
uint16_t m_unk_reg[3][5]{};
};
@ -135,8 +140,8 @@ private:
TILE_GET_INFO_MEMBER(jackie_state::get_fg_tile_info)
{
int code = m_fg_tile_ram[tile_index] | (m_fg_color_ram[tile_index] << 8);
int tile = code & 0x1fff;
int const code = m_fg_tile_ram[tile_index] | (m_fg_color_ram[tile_index] << 8);
int const tile = code & 0x1fff;
tileinfo.set(0, code, tile != 0x1fff ? ((code >> 12) & 0xe) + 1 : 0, 0);
}
@ -162,7 +167,7 @@ void jackie_state::reel_ram_w(offs_t offset, uint8_t data)
template<uint8_t Which>
TILE_GET_INFO_MEMBER(jackie_state::get_reel_tile_info)
{
int code = m_reel_ram[Which][tile_index];
int const code = m_reel_ram[Which][tile_index];
tileinfo.set(1, code, 0, 0);
}
@ -175,50 +180,50 @@ void jackie_state::video_start()
for (int i = 0; i < 3; i++)
m_reel_tilemap[i]->set_scroll_cols(64);
m_fg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(jackie_state::get_fg_tile_info)), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
m_fg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(jackie_state::get_fg_tile_info)), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
m_fg_tilemap->set_transparent_pen(0);
}
uint32_t jackie_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
int startclipmin = 0;
const rectangle &visarea = screen.visible_area();
bitmap.fill(m_palette->black_pen(), cliprect);
for (int i = 0; i < 0x40; i++)
{
m_reel_tilemap[0]->set_scrolly(i, m_bg_scroll[0][i+0x000]);
m_reel_tilemap[1]->set_scrolly(i, m_bg_scroll[0][i+0x040]);
m_reel_tilemap[2]->set_scrolly(i, m_bg_scroll[0][i+0x080]);
m_reel_tilemap[0]->set_scrolly(i, m_bg_scroll[0][i + 0x000]);
m_reel_tilemap[1]->set_scrolly(i, m_bg_scroll[0][i + 0x040]);
m_reel_tilemap[2]->set_scrolly(i, m_bg_scroll[0][i + 0x080]);
}
for (int j=0; j < 0x100-1; j++)
int startclipmin = 0;
const rectangle &visarea = screen.visible_area();
for (int j = 0; j < 0x100 - 1; j++)
{
rectangle clip;
int rowenable = m_bg_scroll[1][j];
int const rowenable = m_bg_scroll[1][j];
/* draw top of screen */
clip.set(visarea.min_x, visarea.max_x, startclipmin, startclipmin+1);
// draw top of screen
clip.set(visarea.min_x, visarea.max_x, startclipmin, startclipmin + 1);
if (rowenable==0)
if (rowenable == 0)
{
m_reel_tilemap[0]->draw(screen, bitmap, clip, 0,0);
m_reel_tilemap[0]->draw(screen, bitmap, clip, 0, 0);
}
else if (rowenable==1)
else if (rowenable == 1)
{
m_reel_tilemap[1]->draw(screen, bitmap, clip, 0,0);
m_reel_tilemap[1]->draw(screen, bitmap, clip, 0, 0);
}
else if (rowenable==2)
else if (rowenable == 2)
{
m_reel_tilemap[2]->draw(screen, bitmap, clip, 0,0);
m_reel_tilemap[2]->draw(screen, bitmap, clip, 0, 0);
}
else if (rowenable==3)
else if (rowenable == 3)
{
}
startclipmin+=1;
startclipmin += 1;
}
m_fg_tilemap->draw(screen, bitmap, cliprect, 0, 0);
@ -228,10 +233,11 @@ uint32_t jackie_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap
void jackie_state::machine_start()
{
m_exprom_bank->configure_entries(0, 2, memregion("gfx3")->base(), 0x8000);
m_led.resolve();
m_lamps.resolve();
save_item(NAME(m_exp_bank));
// save_item(NAME(m_irq_enable)); //always 1?
save_item(NAME(m_nmi_enable));
// save_item(NAME(m_bg_enable)); //always 1?
@ -242,10 +248,10 @@ void jackie_state::machine_start()
void jackie_state::machine_reset()
{
m_irq_enable = 1;
m_nmi_enable = 0;
m_hopper = 0;
m_bg_enable = 1;
m_irq_enable = 1;
m_nmi_enable = 0;
m_hopper = 0;
m_bg_enable = 1;
}
@ -279,14 +285,14 @@ void jackie_state::unk_reg_hi_w(offs_t offset, uint8_t data)
void jackie_state::nmi_and_coins_w(uint8_t data)
{
machine().bookkeeping().coin_counter_w(0, data & 0x01); // coin_a
machine().bookkeeping().coin_counter_w(1, data & 0x04); // coin_c
machine().bookkeeping().coin_counter_w(2, data & 0x08); // key in
machine().bookkeeping().coin_counter_w(3, data & 0x10); // coin m_out mech
machine().bookkeeping().coin_counter_w(0, data & 0x01); // coin_a
machine().bookkeeping().coin_counter_w(1, data & 0x04); // coin_c
machine().bookkeeping().coin_counter_w(2, data & 0x08); // key in
machine().bookkeeping().coin_counter_w(3, data & 0x10); // coin m_out mech
m_led = BIT(data, 5); // led for coin m_out / m_hopper active
m_exp_bank = (data & 0x02) ? 1 : 0; // expram bank number
m_exprom_bank->set_entry(BIT(data, 1));
m_nmi_enable = data & 0x80; // nmi enable?
m_out[0] = data;
@ -306,42 +312,32 @@ void jackie_state::lamps_w(uint8_t data)
---- -x-- Hold5 lamp.
---- ---x Start lamp.
*/
m_lamps[0] = BIT(data, 1); /* Lamp 1 - HOLD 1 */
m_lamps[1] = BIT(data, 5); /* Lamp 2 - HOLD 2 */
m_lamps[2] = BIT(data, 4); /* Lamp 3 - HOLD 3 */
m_lamps[3] = BIT(data, 3); /* Lamp 4 - HOLD 4 */
m_lamps[4] = BIT(data, 2); /* Lamp 5 - HOLD 5 */
m_lamps[5] = BIT(data, 0); /* Lamp 6 - START */
m_lamps[0] = BIT(data, 1); // Lamp 1 - HOLD 1
m_lamps[1] = BIT(data, 5); // Lamp 2 - HOLD 2
m_lamps[2] = BIT(data, 4); // Lamp 3 - HOLD 3
m_lamps[3] = BIT(data, 3); // Lamp 4 - HOLD 4
m_lamps[4] = BIT(data, 2); // Lamp 5 - HOLD 5
m_lamps[5] = BIT(data, 0); // Lamp 6 - START
m_hopper = (~data)& 0x80;
m_hopper = (~data) & 0x80;
m_out[1] = data;
show_out();
}
uint8_t jackie_state::igs_irqack_r()
uint8_t jackie_state::irqack_r()
{
m_irq_enable = 1;
return 0;
}
void jackie_state::igs_irqack_w(uint8_t data)
void jackie_state::irqack_w(uint8_t data)
{
// m_maincpu->set_input_line(0, CLEAR_LINE);
m_out[2] = data;
show_out();
}
uint8_t jackie_state::expram_r(offs_t offset)
{
uint8_t *rom = memregion("gfx3")->base();
offset += m_exp_bank * 0x8000;
// logerror("PC %06X: %04x = %02x\n",m_maincpu->pc(),offset,rom[offset]);
return rom[offset];
}
void jackie_state::prg_map(address_map &map)
{
map(0x0000, 0xefff).rom();
@ -359,28 +355,28 @@ void jackie_state::io_map(address_map &map)
map(0x1000, 0x1107).ram().share(m_bg_scroll[1]);
map(0x2000, 0x27ff).ram().w(m_palette, FUNC(palette_device::write8)).share("palette");
map(0x2800, 0x2fff).ram().w(m_palette, FUNC(palette_device::write8_ext)).share("palette_ext");
map(0x4000, 0x4000).portr("DSW1"); /* DSW1 */
map(0x4001, 0x4001).portr("DSW2"); /* DSW2 */
map(0x4002, 0x4002).portr("DSW3"); /* DSW3 */
map(0x4003, 0x4003).portr("DSW4"); /* DSW4 */
map(0x4004, 0x4004).portr("DSW5"); /* DSW5 */
map(0x4000, 0x4000).portr("DSW1");
map(0x4001, 0x4001).portr("DSW2");
map(0x4002, 0x4002).portr("DSW3");
map(0x4003, 0x4003).portr("DSW4");
map(0x4004, 0x4004).portr("DSW5");
map(0x5080, 0x5083).rw("ppi1", FUNC(i8255_device::read), FUNC(i8255_device::write));
map(0x5090, 0x5093).rw("ppi2", FUNC(i8255_device::read), FUNC(i8255_device::write));
map(0x50a0, 0x50a0).portr("BUTTONS2");
map(0x50b0, 0x50b1).w("ymsnd", FUNC(ym2413_device::write));
map(0x50c0, 0x50c0).r(FUNC(jackie_state::igs_irqack_r)).w(FUNC(jackie_state::igs_irqack_w));
map(0x50c0, 0x50c0).r(FUNC(jackie_state::irqack_r)).w(FUNC(jackie_state::irqack_w));
map(0x6000, 0x60ff).ram().share(m_bg_scroll[0]);
map(0x6800, 0x69ff).ram().w(FUNC(jackie_state::reel_ram_w<0>)).share(m_reel_ram[0]);
map(0x6a00, 0x6bff).ram().w(FUNC(jackie_state::reel_ram_w<1>)).share(m_reel_ram[1]);
map(0x6c00, 0x6dff).ram().w(FUNC(jackie_state::reel_ram_w<2>)).share(m_reel_ram[2]);
map(0x7000, 0x77ff).ram().w(FUNC(jackie_state::fg_tile_w)).share(m_fg_tile_ram);
map(0x7800, 0x7fff).ram().w(FUNC(jackie_state::fg_color_w)).share(m_fg_color_ram);
map(0x8000, 0xffff).r(FUNC(jackie_state::expram_r));
map(0x8000, 0xffff).bankr(m_exprom_bank);
}
int jackie_state::hopper_r()
{
if (m_hopper) return !(m_screen->frame_number()%10);
if (m_hopper) return !(m_screen->frame_number() % 10);
return machine().input().code_pressed(KEYCODE_H);
}
@ -491,6 +487,136 @@ static INPUT_PORTS_START( jackie )
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
INPUT_PORTS_END
static INPUT_PORTS_START( kungfu )
PORT_START("DSW1")
PORT_DIPNAME( 0x01, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW1:1")
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x02, 0x02, "Display Card" ) PORT_DIPLOCATION("SW1:2")
PORT_DIPSETTING( 0x02, "A, J, Q, K" )
PORT_DIPSETTING( 0x00, "Number" )
PORT_DIPNAME( 0x04, 0x04, "Speed" ) PORT_DIPLOCATION("SW1:3")
PORT_DIPSETTING( 0x04, "Slow" )
PORT_DIPSETTING( 0x00, "Quick" )
PORT_DIPNAME( 0x08, 0x08, "Double" ) PORT_DIPLOCATION("SW1:4")
PORT_DIPSETTING( 0x08, DEF_STR( Easy ) )
PORT_DIPSETTING( 0x00, DEF_STR( Difficult ) )
PORT_DIPNAME( 0x30, 0x30, "Limit" ) PORT_DIPLOCATION("SW1:5,6")
PORT_DIPSETTING( 0x30, "10000" )
PORT_DIPSETTING( 0x20, "15000" )
PORT_DIPSETTING( 0x10, "30000" )
PORT_DIPSETTING( 0x00, "70000" )
PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW1:7,8")
PORT_DIPSETTING( 0xc0, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x80, "1 Coin/10 Credits" )
PORT_DIPSETTING( 0x40, "1 Coin/20 Credits" )
PORT_DIPSETTING( 0x00, "1 Coin/50 Credits" )
PORT_START("DSW2")
PORT_DIPNAME( 0x03, 0x03, "Min Bet" ) PORT_DIPLOCATION("SW2:1,2")
PORT_DIPSETTING( 0x03, "1" )
PORT_DIPSETTING( 0x02, "5" )
PORT_DIPSETTING( 0x01, "10" )
PORT_DIPSETTING( 0x00, "20" )
PORT_DIPNAME( 0x0c, 0x0c, "Max Bet" ) PORT_DIPLOCATION("SW2:3,4")
PORT_DIPSETTING( 0x0c, "40" )
PORT_DIPSETTING( 0x08, "50" )
PORT_DIPSETTING( 0x04, "80" )
PORT_DIPSETTING( 0x00, "100" )
PORT_DIPNAME( 0x30, 0x30, "Key In" ) PORT_DIPLOCATION("SW2:5,6")
PORT_DIPSETTING( 0x30, "100" )
PORT_DIPSETTING( 0x20, "200" )
PORT_DIPSETTING( 0x10, "500" )
PORT_DIPSETTING( 0x00, "1000" )
PORT_DIPNAME( 0x40, 0x40, "Demo Game" ) PORT_DIPLOCATION("SW2:7")
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x40, DEF_STR( On ) )
PORT_DIPNAME( 0x80, 0x80, "Anticlear" ) PORT_DIPLOCATION("SW2:8")
PORT_DIPSETTING( 0x80, "Unanti" )
PORT_DIPSETTING( 0x00, "Anti" )
PORT_START("DSW3")
PORT_DIPNAME( 0x01, 0x01, "Double" ) PORT_DIPLOCATION("SW3:1")
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x02, 0x02, "Royal Enable" ) PORT_DIPLOCATION("SW3:2")
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x04, 0x04, "5 Kind Enable" ) PORT_DIPLOCATION("SW3:3")
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x08, 0x08, "Key Out Base" ) PORT_DIPLOCATION("SW3:4")
PORT_DIPSETTING( 0x08, "1" )
PORT_DIPSETTING( 0x00, "10" )
PORT_DIPNAME( 0x10, 0x10, "Open Mode" ) PORT_DIPLOCATION("SW3:5")
PORT_DIPSETTING( 0x10, "Demo" )
PORT_DIPSETTING( 0x00, "Amuse" )
PORT_DIPNAME( 0x20, 0x20, "Quick Get" ) PORT_DIPLOCATION("SW3:6")
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x40, 0x40, "Bet Base" ) PORT_DIPLOCATION("SW3:7")
PORT_DIPSETTING( 0x40, "1" )
PORT_DIPSETTING( 0x00, "10" )
PORT_DIPNAME( 0x80, 0x80, "Percent" ) PORT_DIPLOCATION("SW3:8")
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("DSW4") // not shown in test mode, possibly unused
PORT_DIPUNKNOWN_DIPLOC( 0x01, 0x01, "SW4:1" )
PORT_DIPUNKNOWN_DIPLOC( 0x02, 0x02, "SW4:2" )
PORT_DIPUNKNOWN_DIPLOC( 0x04, 0x04, "SW4:3" )
PORT_DIPUNKNOWN_DIPLOC( 0x08, 0x08, "SW4:4" )
PORT_DIPUNKNOWN_DIPLOC( 0x10, 0x10, "SW4:5" )
PORT_DIPUNKNOWN_DIPLOC( 0x20, 0x20, "SW4:6" )
PORT_DIPUNKNOWN_DIPLOC( 0x40, 0x40, "SW4:7" )
PORT_DIPUNKNOWN_DIPLOC( 0x80, 0x80, "SW4:8" )
PORT_START("DSW5") // not shown in test mode, possibly unused
PORT_DIPUNKNOWN_DIPLOC( 0x01, 0x01, "SW5:1" )
PORT_DIPUNKNOWN_DIPLOC( 0x02, 0x02, "SW5:2" )
PORT_DIPUNKNOWN_DIPLOC( 0x04, 0x04, "SW5:3" )
PORT_DIPUNKNOWN_DIPLOC( 0x08, 0x08, "SW5:4" )
PORT_DIPUNKNOWN_DIPLOC( 0x10, 0x10, "SW5:5" )
PORT_DIPUNKNOWN_DIPLOC( 0x20, 0x20, "SW5:6" )
PORT_DIPUNKNOWN_DIPLOC( 0x40, 0x40, "SW5:7" )
PORT_DIPUNKNOWN_DIPLOC( 0x80, 0x80, "SW5:8" )
PORT_START("SERVICE")
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_SERVICE_NO_TOGGLE( 0x20, IP_ACTIVE_LOW ) // test (press during boot)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK )
PORT_START("COINS")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_KEYIN )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_M) PORT_NAME("Amuse")
PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("BUTTONS1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_POKER_HOLD1 ) PORT_NAME("Hold 1 / Collect")
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_POKER_HOLD2 ) PORT_NAME("Hold 1 / Extra")
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_POKER_HOLD3 ) PORT_NAME("Hold 3 / Bet 1")
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_POKER_HOLD4 ) PORT_NAME("Hold 4 / Low")
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_POKER_HOLD5 ) PORT_NAME("Hold 5 / Double Up")
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("BUTTONS2")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_N) PORT_NAME("Max Bet / High")
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
INPUT_PORTS_END
static const gfx_layout layout_8x8x6 =
{
@ -519,8 +645,8 @@ static const gfx_layout layout_8x32x6 =
};
static GFXDECODE_START( gfx_jackie )
GFXDECODE_ENTRY( "gfx1", 0, layout_8x8x6, 0, 16 )
GFXDECODE_ENTRY( "gfx2", 0, layout_8x32x6, 0, 16 )
GFXDECODE_ENTRY( "tiles", 0, layout_8x8x6, 0, 16 )
GFXDECODE_ENTRY( "reels", 0, layout_8x32x6, 0, 16 )
GFXDECODE_END
void jackie_state::init_jackie()
@ -541,14 +667,30 @@ void jackie_state::init_jackie()
rom[0x7e86] = 0xc3;
}
void jackie_state::init_kungfu()
{
uint8_t *rom = memregion("maincpu")->base();
for (int A = 0; A < 0x10000; A++)
{
rom[A] ^= 0x01;
if ((A & 0x0060) == 0x0020) rom[A] ^= 0x20;
if ((A & 0x0282) == 0x0282) rom[A] ^= 0x01;
if ((A & 0x0940) == 0x0940) rom[A] ^= 0x02;
}
// Patch trap
rom[0xbcc5] = 0xc3;
}
TIMER_DEVICE_CALLBACK_MEMBER(jackie_state::irq)
{
int scanline = param;
int const scanline = param;
if((scanline % 32) != 0)
if ((scanline % 32) != 0)
return;
if((scanline % 64) == 32 && m_irq_enable)
if ((scanline % 64) == 32 && m_irq_enable)
m_maincpu->set_input_line(0, HOLD_LINE);
else if ((scanline % 64) == 0 && m_nmi_enable)
m_maincpu->pulse_input_line(INPUT_LINE_NMI, attotime::zero);
@ -556,7 +698,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(jackie_state::irq)
void jackie_state::jackie(machine_config &config)
{
/* basic machine hardware */
// basic machine hardware
Z80(config, m_maincpu, XTAL(12'000'000) / 2);
m_maincpu->set_addrmap(AS_PROGRAM, &jackie_state::prg_map);
m_maincpu->set_addrmap(AS_IO, &jackie_state::io_map);
@ -571,7 +713,7 @@ void jackie_state::jackie(machine_config &config)
ppi2.in_pa_callback().set_ioport("BUTTONS1");
ppi2.out_pb_callback().set(FUNC(jackie_state::lamps_w));
/* video hardware */
// video hardware
SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
m_screen->set_refresh_hz(57);
m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(0));
@ -583,22 +725,22 @@ void jackie_state::jackie(machine_config &config)
GFXDECODE(config, m_gfxdecode, m_palette, gfx_jackie);
PALETTE(config, m_palette).set_format(palette_device::xBGR_555, 2048);
/* sound hardware */
// sound hardware
SPEAKER(config, "mono").front_center();
YM2413(config, "ymsnd", XTAL(3'579'545)).add_route(ALL_OUTPUTS, "mono", 1.0);
}
ROM_START( jackie )
ROM_START( jackie ) // IGS PCB N0-T0039-4
ROM_REGION( 0x10000, "maincpu", 0 )
ROM_LOAD( "jackiev110.u23", 0x0000, 0x10000, CRC(1b78a619) SHA1(a6eb6b6e544efa55225f2e947483614afb6ece3b) )
ROM_REGION( 0x60000, "gfx1", 0 )
ROM_REGION( 0x60000, "tiles", 0 )
ROM_LOAD( "6.u6", 0x00000, 0x20000, CRC(d2ed60a9) SHA1(40e2280384aa5c9e72e87a3b9e673172ff695676) )
ROM_LOAD( "5.u5", 0x20000, 0x20000, CRC(dc01fe7c) SHA1(683834ce2f13a923c0467209b93fef693d9c3e38) )
ROM_LOAD( "4.u4", 0x40000, 0x20000, CRC(38a42dcd) SHA1(8cc08ff4143281d9022210d6577146d725df9044) )
ROM_REGION( 0x30000, "gfx2", 0 )
ROM_REGION( 0x30000, "reels", 0 )
ROM_LOAD( "3.u3", 0x00000, 0x4000, CRC(c69e962b) SHA1(492427ad1ac959cdf22d23439e0eb5932b60ec88) )
ROM_LOAD( "2.u2", 0x10000, 0x4000, CRC(8900ffba) SHA1(065cf1810ec9738718e4c94613f726e85ba4314d) )
ROM_LOAD( "1.u1", 0x20000, 0x4000, CRC(071d20f0) SHA1(77c87486803dccaa63732ff959c223b1313820e3) )
@ -613,7 +755,32 @@ ROM_START( jackie )
ROM_LOAD( "18cv8.u9", 0x0000, 0x155, NO_DUMP )
ROM_END
ROM_START( kungfu ) // IGS PCB N0- 0139
ROM_REGION( 0x10000, "maincpu", 0 )
ROM_LOAD( "kung fu v202n.u23", 0x00000, 0x10000, CRC(53396dd3) SHA1(1bab42394f016f800dbd80603c70defc25380fd7) )
ROM_REGION( 0x60000, "tiles", 0 )
ROM_LOAD( "kungfu-6.u6", 0x00000, 0x20000, CRC(f1ec5f0d) SHA1(0aa888e13312ed5d98953c81f03a61c6175c7fec) )
ROM_LOAD( "kungfu-5.u5", 0x20000, 0x20000, CRC(25c9c98e) SHA1(2d3a399d8d53ee5cb8106d2b35d1ab1778439f81) )
ROM_LOAD( "kungfu-4.u4", 0x40000, 0x20000, CRC(df4afedb) SHA1(56ab18c46a199653c284417a8e9edc9f32374318) )
ROM_REGION( 0x30000, "reels", 0 )
ROM_LOAD( "kungfu-3.u3", 0x00000, 0x4000, CRC(bbf78e03) SHA1(06fee093e75e2611d00c076c2e0a681938fa8b74) )
ROM_LOAD( "kungfu-2.u2", 0x10000, 0x4000, CRC(927b3060) SHA1(a780ea5aaee04287cc9533c2d258dc18f8426530) )
ROM_LOAD( "kungfu-1.u1", 0x20000, 0x4000, CRC(abaada6b) SHA1(a6b910db7451e8ca737f43f32dfc8fc5ecf865f4) )
ROM_REGION( 0x10000, "gfx3", 0 )
ROM_LOAD( "kungfu-7.u22", 0x00000, 0x10000, CRC(0568f20b) SHA1(a51a10deee0d581b79d0fee354cedceaa660f55c) ) // 1ST AND 2ND HALF IDENTICAL, but confirmed same data as the kungfua set in igs/igspoker.cpp
ROM_REGION( 0x155, "misc", 0 ) // all labels unreadable
ROM_LOAD( "16l8.u31", 0x0000, 0x104, NO_DUMP )
ROM_LOAD( "18cv8.u14", 0x0000, 0x155, NO_DUMP )
ROM_LOAD( "18cv8.u8", 0x0000, 0x155, NO_DUMP )
ROM_LOAD( "18cv8.u9", 0x0000, 0x155, NO_DUMP )
ROM_END
} // anonymous namespace
GAME( 1993, jackie, 0, jackie, jackie, jackie_state, init_jackie, ROT0, "IGS", "Happy Jackie (v110U)", MACHINE_SUPPORTS_SAVE )
GAME( 1993, jackie, 0, jackie, jackie, jackie_state, init_jackie, ROT0, "IGS", "Happy Jackie (v110U)", MACHINE_SUPPORTS_SAVE )
GAME( 1992, kungfu, 0, jackie, kungfu, jackie_state, init_kungfu, ROT0, "IGS", "Kung Fu Fighters (IGS, v202N)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) // inputs for the fighting part, incorrect decoding

View File

@ -19922,7 +19922,6 @@ igs_ncs // (c) 198? IGS
igs_ncs2 // (c) 2000 IGS
igstet341 // (c) 199? IGS
igstet342 // (c) 199? IGS
kungfu // (c) 199? IGS
kungfua // (c) 1992 IGS
number10 // (c) IGS (Board labeled Playmark Srl)
numbr10l // (c) IGS (Board labeled Playmark Srl)
@ -19935,6 +19934,7 @@ iqblock // (c) 1993
@source:igs/jackie.cpp
jackie // (c) 1993 IGS
kungfu // (c) 1992 IGS
@source:igs/lordgun.cpp
aliencha // (c) 1994