From 44d514aa702d38b83966a21ad30528dd89cc8e36 Mon Sep 17 00:00:00 2001 From: Ivan Vangelista Date: Fri, 3 Sep 2021 06:19:54 +0200 Subject: funkyjet.cpp: moved everything into the driver file, as video/funkyjet.cpp only had one method --- scripts/target/mame/arcade.lua | 2 - src/mame/drivers/funkyjet.cpp | 218 ++++++++++++++++++++++++++++------------- src/mame/includes/funkyjet.h | 65 ------------ src/mame/mame.lst | 2 +- src/mame/video/funkyjet.cpp | 43 -------- 5 files changed, 151 insertions(+), 179 deletions(-) delete mode 100644 src/mame/includes/funkyjet.h delete mode 100644 src/mame/video/funkyjet.cpp diff --git a/scripts/target/mame/arcade.lua b/scripts/target/mame/arcade.lua index 78658b1f6d3..572f3a05482 100644 --- a/scripts/target/mame/arcade.lua +++ b/scripts/target/mame/arcade.lua @@ -1777,8 +1777,6 @@ files { MAME_DIR .. "src/mame/includes/firetrap.h", MAME_DIR .. "src/mame/video/firetrap.cpp", MAME_DIR .. "src/mame/drivers/funkyjet.cpp", - MAME_DIR .. "src/mame/includes/funkyjet.h", - MAME_DIR .. "src/mame/video/funkyjet.cpp", MAME_DIR .. "src/mame/drivers/karnov.cpp", MAME_DIR .. "src/mame/includes/karnov.h", MAME_DIR .. "src/mame/video/karnov.cpp", diff --git a/src/mame/drivers/funkyjet.cpp b/src/mame/drivers/funkyjet.cpp index 0f55f60e7a2..6e1a70db8ac 100644 --- a/src/mame/drivers/funkyjet.cpp +++ b/src/mame/drivers/funkyjet.cpp @@ -92,19 +92,98 @@ Notes: ***************************************************************************/ #include "emu.h" -#include "includes/funkyjet.h" +#include "machine/deco146.h" +#include "video/deco16ic.h" +#include "video/decospr.h" + +#include "cpu/h6280/h6280.h" #include "cpu/m68000/m68000.h" #include "machine/decocrpt.h" #include "machine/gen_latch.h" #include "sound/okim6295.h" #include "sound/ymopm.h" + #include "emupal.h" +#include "screen.h" #include "speaker.h" +namespace { + +class funkyjet_state : public driver_device +{ +public: + funkyjet_state(const machine_config &mconfig, device_type type, const char *tag) + : driver_device(mconfig, type, tag) + , m_spriteram(*this, "spriteram") + , m_pf_rowscroll(*this, "pf%u_rowscroll", 1) + , m_screen(*this, "screen") + , m_maincpu(*this, "maincpu") + , m_audiocpu(*this, "audiocpu") + , m_deco146(*this, "ioprot") + , m_sprgen(*this, "spritegen") + , m_deco_tilegen(*this, "tilegen") + { } + + void funkyjet(machine_config &config); + + void init_funkyjet(); + +private: + // memory pointers + required_shared_ptr m_spriteram; + required_shared_ptr_array m_pf_rowscroll; + + // devices + required_device m_screen; + required_device m_maincpu; + required_device m_audiocpu; + required_device m_deco146; + required_device m_sprgen; + required_device m_deco_tilegen; + + uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + + uint16_t protection_region_0_146_r(offs_t offset); + void protection_region_0_146_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + void maincpu_map(address_map &map); + void sound_map(address_map &map); +}; + /******************************************************************************/ -uint16_t funkyjet_state::funkyjet_protection_region_0_146_r(offs_t offset) +uint32_t funkyjet_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +{ + // Similar to chinatwn and tumblep, see video/supbtime.cpp + // + // This causes a 2 pixel gap on the left side of the first stage of all worlds in funkyjet + // but allows subsequent stages to be centered and avoids corruption on the world select + // screen after each world. It also correctly aligns the graphics in sotsugyo. + // + // The 2 pixel gap on the first stage of each world has been verified to occur on hardware. + // (it can easily be seen by moving your player sprite to the far left) + // + // it is unclear where this offset comes from, but real hardware videos confirm it is needed + + m_deco_tilegen->set_scrolldx(0, 0, 1, 1); + m_deco_tilegen->set_scrolldx(0, 1, 1, 1); + m_deco_tilegen->set_scrolldx(1, 0, 1, 1); + m_deco_tilegen->set_scrolldx(1, 1, 1, 1); + + uint16_t flip = m_deco_tilegen->pf_control_r(0); + + flip_screen_set(BIT(flip, 7)); + m_sprgen->set_flip_screen(BIT(flip, 7)); + m_deco_tilegen->pf_update(m_pf_rowscroll[0], m_pf_rowscroll[1]); + + bitmap.fill(768, cliprect); + m_deco_tilegen->tilemap_2_draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0); + m_deco_tilegen->tilemap_1_draw(screen, bitmap, cliprect, 0, 0); + m_sprgen->draw_sprites(bitmap, cliprect, m_spriteram, 0x400); + return 0; +} + +uint16_t funkyjet_state::protection_region_0_146_r(offs_t offset) { // uint16_t realdat = deco16_146_funkyjet_prot_r(space,offset&0x3ff,mem_mask); @@ -119,7 +198,7 @@ uint16_t funkyjet_state::funkyjet_protection_region_0_146_r(offs_t offset) return data; } -void funkyjet_state::funkyjet_protection_region_0_146_w(offs_t offset, uint16_t data, uint16_t mem_mask) +void funkyjet_state::protection_region_0_146_w(offs_t offset, uint16_t data, uint16_t mem_mask) { // deco16_146_funkyjet_prot_w(space,offset&0x3ff,data,mem_mask); @@ -130,32 +209,32 @@ void funkyjet_state::funkyjet_protection_region_0_146_w(offs_t offset, uint16_t } -void funkyjet_state::funkyjet_map(address_map &map) +void funkyjet_state::maincpu_map(address_map &map) { map(0x000000, 0x07ffff).rom(); map(0x120000, 0x1207ff).ram().w("palette", FUNC(palette_device::write16)).share("palette"); map(0x140000, 0x143fff).ram(); - map(0x160000, 0x1607ff).ram().share("spriteram"); - map(0x180000, 0x183fff).rw(FUNC(funkyjet_state::funkyjet_protection_region_0_146_r), FUNC(funkyjet_state::funkyjet_protection_region_0_146_w)).share("prot16ram"); /* Protection device */ // unlikely to be cs0 region + map(0x160000, 0x1607ff).ram().share(m_spriteram); + map(0x180000, 0x183fff).rw(FUNC(funkyjet_state::protection_region_0_146_r), FUNC(funkyjet_state::protection_region_0_146_w)).share("prot16ram"); // Protection device, unlikely to be cs0 region map(0x184000, 0x184001).nopw(); map(0x188000, 0x188001).nopw(); map(0x300000, 0x30000f).w(m_deco_tilegen, FUNC(deco16ic_device::pf_control_w)); map(0x320000, 0x321fff).rw(m_deco_tilegen, FUNC(deco16ic_device::pf1_data_r), FUNC(deco16ic_device::pf1_data_w)); map(0x322000, 0x323fff).rw(m_deco_tilegen, FUNC(deco16ic_device::pf2_data_r), FUNC(deco16ic_device::pf2_data_w)); - map(0x340000, 0x340bff).ram().share("pf1_rowscroll"); - map(0x342000, 0x342bff).ram().share("pf2_rowscroll"); + map(0x340000, 0x340bff).ram().share(m_pf_rowscroll[0]); + map(0x342000, 0x342bff).ram().share(m_pf_rowscroll[1]); } /******************************************************************************/ -/* Physical memory map (21 bits) */ +// Physical memory map (21 bits) void funkyjet_state::sound_map(address_map &map) { map(0x000000, 0x00ffff).rom(); - map(0x100000, 0x100001).noprw(); /* YM2203 - this board doesn't have one */ + map(0x100000, 0x100001).noprw(); // YM2203 - this board doesn't have one map(0x110000, 0x110001).rw("ymsnd", FUNC(ym2151_device::read), FUNC(ym2151_device::write)); map(0x120000, 0x120001).rw("oki", FUNC(okim6295_device::read), FUNC(okim6295_device::write)); - map(0x130000, 0x130001).noprw(); /* This board only has 1 oki chip */ + map(0x130000, 0x130001).noprw(); // This board only has 1 oki chip map(0x140000, 0x140000).r(m_deco146, FUNC(deco146_device::soundlatch_r)); map(0x1f0000, 0x1f1fff).ram(); } @@ -170,7 +249,7 @@ static INPUT_PORTS_START( funkyjet ) PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) - PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) /* Button 3 only in "test mode" */ + PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) // Button 3 only in "test mode" PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START1 ) PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) @@ -178,7 +257,7 @@ static INPUT_PORTS_START( funkyjet ) PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) - PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) /* Button 3 only in "test mode" */ + PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) // Button 3 only in "test mode" PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_START2 ) PORT_START("SYSTEM") @@ -187,7 +266,7 @@ static INPUT_PORTS_START( funkyjet ) PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") - /* Dips seem inverted with respect to other Deco games */ + // Dips seem inverted with respect to other Deco games PORT_START("DSW") PORT_DIPNAME( 0x00e0, 0x00e0, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:1,2,3") PORT_DIPSETTING( 0x0000, DEF_STR( 3C_1C ) ) @@ -307,26 +386,26 @@ static const gfx_layout tile_layout = }; static GFXDECODE_START( gfx_funkyjet ) - GFXDECODE_ENTRY( "gfx1", 0, charlayout, 256, 32 ) /* Characters 8x8 */ - GFXDECODE_ENTRY( "gfx1", 0, tile_layout, 256, 32 ) /* Tiles 16x16 */ - GFXDECODE_ENTRY( "gfx2", 0, tile_layout, 0, 16 ) /* Sprites 16x16 */ + GFXDECODE_ENTRY( "chars", 0, charlayout, 256, 32 ) // Characters 8x8 + GFXDECODE_ENTRY( "chars", 0, tile_layout, 256, 32 ) // Tiles 16x16 + GFXDECODE_ENTRY( "sprites", 0, tile_layout, 0, 16 ) // Sprites 16x16 GFXDECODE_END /******************************************************************************/ void funkyjet_state::funkyjet(machine_config &config) { - /* basic machine hardware */ - M68000(config, m_maincpu, XTAL(28'322'000)/2); /* 28 MHz crystal - 28.322000 on funkyjeta2 PCB at least*/ - m_maincpu->set_addrmap(AS_PROGRAM, &funkyjet_state::funkyjet_map); + // basic machine hardware + M68000(config, m_maincpu, XTAL(28'322'000)/2); // 28 MHz crystal - 28.322000 on funkyjeta2 PCB at least + m_maincpu->set_addrmap(AS_PROGRAM, &funkyjet_state::maincpu_map); m_maincpu->set_vblank_int("screen", FUNC(funkyjet_state::irq6_line_hold)); - H6280(config, m_audiocpu, XTAL(32'220'000)/4); /* Custom chip 45, Audio section crystal is 32.220 MHz */ + H6280(config, m_audiocpu, XTAL(32'220'000)/4); // Custom chip 45, Audio section crystal is 32.220 MHz m_audiocpu->set_addrmap(AS_PROGRAM, &funkyjet_state::sound_map); m_audiocpu->add_route(ALL_OUTPUTS, "lspeaker", 0); // internal sound unused m_audiocpu->add_route(ALL_OUTPUTS, "rspeaker", 0); - /* video hardware */ + // video hardware SCREEN(config, m_screen, SCREEN_TYPE_RASTER); m_screen->set_refresh_hz(58); m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(529)); @@ -360,7 +439,7 @@ void funkyjet_state::funkyjet(machine_config &config) m_sprgen->set_gfx_region(2); m_sprgen->set_gfxdecode_tag("gfxdecode"); - /* sound hardware */ + // sound hardware SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); @@ -377,101 +456,101 @@ void funkyjet_state::funkyjet(machine_config &config) /******************************************************************************/ ROM_START( funkyjet ) - ROM_REGION( 0x80000, "maincpu", 0 ) /* 68000 code */ + ROM_REGION( 0x80000, "maincpu", 0 ) // 68000 code ROM_LOAD16_BYTE( "jk00-1.12f", 0x00000, 0x40000, CRC(ce61579d) SHA1(fe755b62c822c996d479cafa6fa7ac7724af6560) ) ROM_LOAD16_BYTE( "jk01-1.13f", 0x00001, 0x40000, CRC(274d04be) SHA1(a14ec81e40504d3c7deb28114b85b9bbb76a51f5) ) - ROM_REGION( 0x10000, "audiocpu", 0 ) /* Sound CPU */ + ROM_REGION( 0x10000, "audiocpu", 0 ) ROM_LOAD( "jk02.16f", 0x00000, 0x10000, CRC(748c0bd8) SHA1(35910e6a4c4f198fb76bde0f5b053e2c66cfa0ff) ) - ROM_REGION( 0x080000, "gfx1", 0 ) - ROM_LOAD( "mat02", 0x000000, 0x80000, CRC(e4b94c7e) SHA1(7b6ddd0bd388c8d32277fce4b3abb102724bc7d1) ) /* Encrypted chars */ + ROM_REGION( 0x080000, "chars", 0 ) + ROM_LOAD( "mat02", 0x000000, 0x80000, CRC(e4b94c7e) SHA1(7b6ddd0bd388c8d32277fce4b3abb102724bc7d1) ) // encrypted - ROM_REGION( 0x100000, "gfx2", 0 ) - ROM_LOAD( "mat01", 0x000000, 0x80000, CRC(24093a8d) SHA1(71f76ddd8a4b6e05ceb2fff4e20b6edb5e011e79) ) /* sprites */ + ROM_REGION( 0x100000, "sprites", 0 ) + ROM_LOAD( "mat01", 0x000000, 0x80000, CRC(24093a8d) SHA1(71f76ddd8a4b6e05ceb2fff4e20b6edb5e011e79) ) ROM_LOAD( "mat00", 0x080000, 0x80000, CRC(fbda0228) SHA1(815d49898d02e699393e370209181f2ca8301949) ) - ROM_REGION( 0x40000, "oki", 0 ) /* ADPCM samples */ + ROM_REGION( 0x40000, "oki", 0 ) // ADPCM samples // needs verifying, looks like a bad dump compared to the ROM in funkyjeta2 // 0x20 bytes at 0x79e0 are blanked out and 0x20 bytes at 0xa6a0 are replaced with different (bad?) data ROM_LOAD( "jk03.15h", 0x00000, 0x20000, BAD_DUMP CRC(69a0eaf7) SHA1(05038e82ee03106625f05082fe9912e16be181ee) ) ROM_END ROM_START( funkyjeta ) - ROM_REGION( 0x80000, "maincpu", 0 ) /* 68000 code */ - ROM_LOAD16_BYTE( "jk00.12f", 0x00000, 0x40000, CRC(712089c1) SHA1(84167c90303a228107f55596e2ff8b9f111d1bc2) ) /* Unverified revision, could be JK00-0 or JK00-2 */ - ROM_LOAD16_BYTE( "jk01.13f", 0x00001, 0x40000, CRC(be3920d7) SHA1(6627956d148681bc49991c544a09b07271ea4c7f) ) /* Unverified revision, could be JK01-0 or JK01-2 */ + ROM_REGION( 0x80000, "maincpu", 0 ) // 68000 code + ROM_LOAD16_BYTE( "jk00.12f", 0x00000, 0x40000, CRC(712089c1) SHA1(84167c90303a228107f55596e2ff8b9f111d1bc2) ) // Unverified revision, could be JK00-0 or JK00-2 + ROM_LOAD16_BYTE( "jk01.13f", 0x00001, 0x40000, CRC(be3920d7) SHA1(6627956d148681bc49991c544a09b07271ea4c7f) ) // Unverified revision, could be JK01-0 or JK01-2 - ROM_REGION( 0x10000, "audiocpu", 0 ) /* Sound CPU */ + ROM_REGION( 0x10000, "audiocpu", 0 ) ROM_LOAD( "jk02.16f", 0x00000, 0x10000, CRC(748c0bd8) SHA1(35910e6a4c4f198fb76bde0f5b053e2c66cfa0ff) ) - ROM_REGION( 0x080000, "gfx1", 0 ) - ROM_LOAD( "mat02", 0x000000, 0x80000, CRC(e4b94c7e) SHA1(7b6ddd0bd388c8d32277fce4b3abb102724bc7d1) ) /* Encrypted chars */ + ROM_REGION( 0x080000, "chars", 0 ) + ROM_LOAD( "mat02", 0x000000, 0x80000, CRC(e4b94c7e) SHA1(7b6ddd0bd388c8d32277fce4b3abb102724bc7d1) ) // encrypted - ROM_REGION( 0x100000, "gfx2", 0 ) - ROM_LOAD( "mat01", 0x000000, 0x80000, CRC(24093a8d) SHA1(71f76ddd8a4b6e05ceb2fff4e20b6edb5e011e79) ) /* sprites */ + ROM_REGION( 0x100000, "sprites", 0 ) + ROM_LOAD( "mat01", 0x000000, 0x80000, CRC(24093a8d) SHA1(71f76ddd8a4b6e05ceb2fff4e20b6edb5e011e79) ) // sprites ROM_LOAD( "mat00", 0x080000, 0x80000, CRC(fbda0228) SHA1(815d49898d02e699393e370209181f2ca8301949) ) - ROM_REGION( 0x40000, "oki", 0 ) /* ADPCM samples */ + ROM_REGION( 0x40000, "oki", 0 ) // ADPCM samples // see comment in funkyjet set ROM_LOAD( "jk03.15h", 0x00000, 0x20000, BAD_DUMP CRC(69a0eaf7) SHA1(05038e82ee03106625f05082fe9912e16be181ee) ) ROM_END ROM_START( funkyjeta2 ) - ROM_REGION( 0x80000, "maincpu", 0 ) /* 68000 code */ + ROM_REGION( 0x80000, "maincpu", 0 ) // 68000 code ROM_LOAD16_BYTE( "12f", 0x00000, 0x40000, CRC(a18de697) SHA1(063f7f4c31c80b8fd807699e0412abb9271ddc59) ) // labels were blank ROM_LOAD16_BYTE( "13f", 0x00001, 0x40000, CRC(695a27cd) SHA1(79b4e61e7c6bdab439d70993c296443f97339351) ) - ROM_REGION( 0x10000, "audiocpu", 0 ) /* Sound CPU */ + ROM_REGION( 0x10000, "audiocpu", 0 ) ROM_LOAD( "16f", 0x00000, 0x10000, CRC(748c0bd8) SHA1(35910e6a4c4f198fb76bde0f5b053e2c66cfa0ff) ) - ROM_REGION( 0x080000, "gfx1", 0 ) - ROM_LOAD( "mat02", 0x000000, 0x80000, CRC(e4b94c7e) SHA1(7b6ddd0bd388c8d32277fce4b3abb102724bc7d1) ) /* Encrypted chars */ + ROM_REGION( 0x080000, "chars", 0 ) + ROM_LOAD( "mat02", 0x000000, 0x80000, CRC(e4b94c7e) SHA1(7b6ddd0bd388c8d32277fce4b3abb102724bc7d1) ) // encrypted - ROM_REGION( 0x100000, "gfx2", 0 ) - ROM_LOAD( "mat01", 0x000000, 0x80000, CRC(24093a8d) SHA1(71f76ddd8a4b6e05ceb2fff4e20b6edb5e011e79) ) /* sprites */ + ROM_REGION( 0x100000, "sprites", 0 ) + ROM_LOAD( "mat01", 0x000000, 0x80000, CRC(24093a8d) SHA1(71f76ddd8a4b6e05ceb2fff4e20b6edb5e011e79) ) // sprites ROM_LOAD( "mat00", 0x080000, 0x80000, CRC(fbda0228) SHA1(815d49898d02e699393e370209181f2ca8301949) ) - ROM_REGION( 0x40000, "oki", 0 ) /* ADPCM samples */ + ROM_REGION( 0x40000, "oki", 0 ) // ADPCM samples ROM_LOAD( "15h", 0x00000, 0x20000, CRC(d7c0f0fe) SHA1(7a4a21bbf0da27767de099fba66011732b2c835a) ) ROM_END ROM_START( funkyjetj ) - ROM_REGION( 0x80000, "maincpu", 0 ) /* 68000 code */ + ROM_REGION( 0x80000, "maincpu", 0 ) // 68000 code ROM_LOAD16_BYTE( "jh00-2.11f", 0x00000, 0x40000, CRC(5b98b700) SHA1(604bd04f4031b0a3b53db2fab4a0e160dff6936d) ) ROM_LOAD16_BYTE( "jh01-2.13f", 0x00001, 0x40000, CRC(21280220) SHA1(b365b6c8aa778e21a14b2813e93b9c9d02e14995) ) - ROM_REGION( 0x10000, "audiocpu", 0 ) /* Sound CPU */ - ROM_LOAD( "jh02.16f", 0x00000, 0x10000, CRC(748c0bd8) SHA1(35910e6a4c4f198fb76bde0f5b053e2c66cfa0ff) ) /* same as jk02.16f from world set */ + ROM_REGION( 0x10000, "audiocpu", 0 ) + ROM_LOAD( "jh02.16f", 0x00000, 0x10000, CRC(748c0bd8) SHA1(35910e6a4c4f198fb76bde0f5b053e2c66cfa0ff) ) // same as jk02.16f from world set - ROM_REGION( 0x080000, "gfx1", 0 ) - ROM_LOAD( "mat02", 0x000000, 0x80000, CRC(e4b94c7e) SHA1(7b6ddd0bd388c8d32277fce4b3abb102724bc7d1) ) /* Encrypted chars */ + ROM_REGION( 0x080000, "chars", 0 ) + ROM_LOAD( "mat02", 0x000000, 0x80000, CRC(e4b94c7e) SHA1(7b6ddd0bd388c8d32277fce4b3abb102724bc7d1) ) // encrypted - ROM_REGION( 0x100000, "gfx2", 0 ) - ROM_LOAD( "mat01", 0x000000, 0x80000, CRC(24093a8d) SHA1(71f76ddd8a4b6e05ceb2fff4e20b6edb5e011e79) ) /* sprites */ + ROM_REGION( 0x100000, "sprites", 0 ) + ROM_LOAD( "mat01", 0x000000, 0x80000, CRC(24093a8d) SHA1(71f76ddd8a4b6e05ceb2fff4e20b6edb5e011e79) ) ROM_LOAD( "mat00", 0x080000, 0x80000, CRC(fbda0228) SHA1(815d49898d02e699393e370209181f2ca8301949) ) - ROM_REGION( 0x40000, "oki", 0 ) /* ADPCM samples */ + ROM_REGION( 0x40000, "oki", 0 ) // ADPCM samples // see comment in funkyjet set, was this verified as label is different? - ROM_LOAD( "jh03.15h", 0x00000, 0x20000, BAD_DUMP CRC(69a0eaf7) SHA1(05038e82ee03106625f05082fe9912e16be181ee) ) /* same as jk03.15h from world set */ + ROM_LOAD( "jh03.15h", 0x00000, 0x20000, BAD_DUMP CRC(69a0eaf7) SHA1(05038e82ee03106625f05082fe9912e16be181ee) ) // same as jk03.15h from world set ROM_END ROM_START( sotsugyo ) - ROM_REGION( 0x80000, "maincpu", 0 ) /* 68000 code */ + ROM_REGION( 0x80000, "maincpu", 0 ) // 68000 code ROM_LOAD16_BYTE( "03.12f", 0x00000, 0x40000, CRC(d175dfd1) SHA1(61c91d5e20b0492e6ac3b19fe9639eb4f169ae77) ) ROM_LOAD16_BYTE( "04.13f", 0x00001, 0x40000, CRC(2072477c) SHA1(23820a519e4503854e63ab3ad7eec58178c8d822) ) - ROM_REGION( 0x10000, "audiocpu", 0 ) /* Sound CPU */ + ROM_REGION( 0x10000, "audiocpu", 0 ) ROM_LOAD( "sb020.16f", 0x00000, 0x10000, CRC(baf5ec93) SHA1(82b22a0b565e51cd40733f21fa876dd7064eb604) ) - ROM_REGION( 0x080000, "gfx1", 0 ) - ROM_LOAD( "02.2f", 0x000000, 0x80000, CRC(337b1451) SHA1(ab3a4526e683c23b7634ac3304fb073f6ce98e82) ) /* chars */ + ROM_REGION( 0x080000, "chars", 0 ) + ROM_LOAD( "02.2f", 0x000000, 0x80000, CRC(337b1451) SHA1(ab3a4526e683c23b7634ac3304fb073f6ce98e82) ) - ROM_REGION( 0x100000, "gfx2", 0 ) - ROM_LOAD( "01.4a", 0x000000, 0x80000, CRC(fa10dd54) SHA1(5dfe66df0bbab5eb151bf65f7e767a2325a50b36) ) /* sprites */ + ROM_REGION( 0x100000, "sprites", 0 ) + ROM_LOAD( "01.4a", 0x000000, 0x80000, CRC(fa10dd54) SHA1(5dfe66df0bbab5eb151bf65f7e767a2325a50b36) ) ROM_LOAD( "00.2a", 0x080000, 0x80000, CRC(d35a14ef) SHA1(b8d27766db7e183aee208c690364e4383f3c6882) ) - ROM_REGION( 0x40000, "oki", 0 ) /* ADPCM samples */ + ROM_REGION( 0x40000, "oki", 0 ) // ADPCM samples ROM_LOAD( "sb030.15h", 0x00000, 0x20000, CRC(1ea43f48) SHA1(74cc8c740f1c7fa94c2cb460ea4ee7aa0c490ed7) ) ROM_END @@ -483,11 +562,11 @@ ROM_START( sotsugyok ) // only ROMs that match the parent are the audio CPU and ROM_REGION( 0x10000, "audiocpu", 0 ) ROM_LOAD( "27c512.16f", 0x00000, 0x10000, CRC(baf5ec93) SHA1(82b22a0b565e51cd40733f21fa876dd7064eb604) ) - ROM_REGION( 0x080000, "gfx1", 0 ) - ROM_LOAD( "27c4000.2f", 0x000000, 0x80000, CRC(8a76a083) SHA1(f5cccb3a7834225af0c6118af33362efeff66999) ) /* chars */ + ROM_REGION( 0x080000, "chars", 0 ) + ROM_LOAD( "27c4000.2f", 0x000000, 0x80000, CRC(8a76a083) SHA1(f5cccb3a7834225af0c6118af33362efeff66999) ) - ROM_REGION( 0x100000, "gfx2", 0 ) - ROM_LOAD( "27c4000.4a", 0x000000, 0x80000, CRC(69de4049) SHA1(2f4f45108c27ae164a0b5323ee37a331e784cef5) ) /* sprites */ + ROM_REGION( 0x100000, "sprites", 0 ) + ROM_LOAD( "27c4000.4a", 0x000000, 0x80000, CRC(69de4049) SHA1(2f4f45108c27ae164a0b5323ee37a331e784cef5) ) ROM_LOAD( "27c4000.2a", 0x080000, 0x80000, CRC(9092cc83) SHA1(208391058ab74f2651457644544bbe77c1f5dcb8) ) ROM_REGION( 0x40000, "oki", 0 ) @@ -496,9 +575,12 @@ ROM_END void funkyjet_state::init_funkyjet() { - deco74_decrypt_gfx(machine(), "gfx1"); + deco74_decrypt_gfx(machine(), "chars"); } +} // Anonymous namespace + + /******************************************************************************/ GAME( 1992, funkyjet, 0, funkyjet, funkyjet, funkyjet_state, init_funkyjet, ROT0, "Mitchell", "Funky Jet (World, rev 1)", MACHINE_SUPPORTS_SAVE ) @@ -509,4 +591,4 @@ GAME( 1992, funkyjeta2,funkyjet, funkyjet, funkyjeta2,funkyjet_state, init_funky GAME( 1992, funkyjetj, funkyjet, funkyjet, funkyjetj, funkyjet_state, init_funkyjet, ROT0, "Mitchell (Data East Corporation license)", "Funky Jet (Japan, rev 2)", MACHINE_SUPPORTS_SAVE ) GAME( 1995, sotsugyo, 0, funkyjet, sotsugyo, funkyjet_state, init_funkyjet, ROT0, "Mitchell (Atlus license)", "Sotsugyo Shousho (Japan)", MACHINE_SUPPORTS_SAVE ) -GAME( 1995, sotsugyok, sotsugyo, funkyjet, sotsugyo, funkyjet_state, init_funkyjet, ROT0, "Mitchell", "Jor-eop Jeungmyeongseo (Korea)", MACHINE_SUPPORTS_SAVE ) +GAME( 1996, sotsugyok, sotsugyo, funkyjet, sotsugyo, funkyjet_state, init_funkyjet, ROT0, "Mitchell", "Jor-eop Jeungmyeongseo (Korea)", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/includes/funkyjet.h b/src/mame/includes/funkyjet.h deleted file mode 100644 index 73dce7d7c81..00000000000 --- a/src/mame/includes/funkyjet.h +++ /dev/null @@ -1,65 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Bryan McPhail -/************************************************************************* - - Funky Jet - -*************************************************************************/ -#ifndef MAME_INCLUDES_FUNKYJET_H -#define MAME_INCLUDES_FUNKYJET_H - -#pragma once - -// mame -#include "machine/deco146.h" -#include "video/deco16ic.h" -#include "video/decospr.h" - -// devices -#include "cpu/h6280/h6280.h" - -// emu -#include "screen.h" - - -class funkyjet_state : public driver_device -{ -public: - funkyjet_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag) - , m_spriteram(*this, "spriteram") - , m_pf_rowscroll(*this, "pf%u_rowscroll", 1) - , m_screen(*this, "screen") - , m_maincpu(*this, "maincpu") - , m_audiocpu(*this, "audiocpu") - , m_deco146(*this, "ioprot") - , m_sprgen(*this, "spritegen") - , m_deco_tilegen(*this, "tilegen") - { } - - void funkyjet(machine_config &config); - - void init_funkyjet(); - -private: - // memory pointers - required_shared_ptr m_spriteram; - required_shared_ptr_array m_pf_rowscroll; - - // devices - required_device m_screen; - required_device m_maincpu; - required_device m_audiocpu; - required_device m_deco146; - required_device m_sprgen; - required_device m_deco_tilegen; - - uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - - uint16_t funkyjet_protection_region_0_146_r(offs_t offset); - void funkyjet_protection_region_0_146_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); - void funkyjet_map(address_map &map); - void sound_map(address_map &map); -}; - -#endif // MAME_INCLUDES_FUNKYJET_H diff --git a/src/mame/mame.lst b/src/mame/mame.lst index 8d66b8afce0..fb57c4864cd 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -14126,7 +14126,7 @@ funkyjeta // MAT (c) 1992 Data East (Mitchell license) (Wo funkyjeta2 // MAT (c) 1992 Data East (Mitchell license) (World) - Rev unverified - alternative demo funkyjetj // MAT (c) 1992 Data East (Mitchell license) (Japan, Rev 2) sotsugyo // (c) 1995 Mitchell (Atlus license) -sotsugyok // (c) 1995 Mitchell (Korea) +sotsugyok // (c) 1996 Mitchell (Korea) @source:funtech.cpp fts2in1 diff --git a/src/mame/video/funkyjet.cpp b/src/mame/video/funkyjet.cpp deleted file mode 100644 index 00bc1975d1b..00000000000 --- a/src/mame/video/funkyjet.cpp +++ /dev/null @@ -1,43 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Bryan McPhail -/*************************************************************************** - - Funky Jet Video emulation - Bryan McPhail, mish@tendril.co.uk - -***************************************************************************/ - -#include "emu.h" -#include "includes/funkyjet.h" - -/******************************************************************************/ - -uint32_t funkyjet_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) -{ - // Similar to chinatwn and tumblep, see video/supbtime.cpp - // - // This causes a 2 pixel gap on the left side of the first stage of all worlds in funkyjet - // but allows subsequent stages to be centered and avoids corruption on the world select - // screen after each world. It also correctly aligns the graphics in sotsugyo. - // - // The 2 pixel gap on the first stage of each world has been verified to occur on hardware. - // (it can easily be seen by moving your player sprite to the far left) - // - // it is unclear where this offset comes from, but real hardware videos confirm it is needed - - m_deco_tilegen->set_scrolldx(0, 0, 1, 1); - m_deco_tilegen->set_scrolldx(0, 1, 1, 1); - m_deco_tilegen->set_scrolldx(1, 0, 1, 1); - m_deco_tilegen->set_scrolldx(1, 1, 1, 1); - - uint16_t flip = m_deco_tilegen->pf_control_r(0); - - flip_screen_set(BIT(flip, 7)); - m_sprgen->set_flip_screen(BIT(flip, 7)); - m_deco_tilegen->pf_update(m_pf_rowscroll[0], m_pf_rowscroll[1]); - - bitmap.fill(768, cliprect); - m_deco_tilegen->tilemap_2_draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0); - m_deco_tilegen->tilemap_1_draw(screen, bitmap, cliprect, 0, 0); - m_sprgen->draw_sprites(bitmap, cliprect, m_spriteram, 0x400); - return 0; -} -- cgit v1.2.3