Plug & Play work (#6267)

* new NOT WORKING
----
Guitar Fever (2007.07.03 Ver 2.7) [TeamEurope, Peter Wilhelmsen, David Haywood]

has timer issues making the music way too slow

* move these (nw)

* new NOT WORKING
----
Atari Flashback Mini 7800 [Sean Riddle, GameHistory.org]
City Patrolman [unknown]

* do fit here (nw)
This commit is contained in:
David Haywood 2020-02-07 16:16:42 +00:00 committed by GitHub
parent 39d48023d3
commit c3199e8d28
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 195 additions and 52 deletions

View File

@ -2908,6 +2908,7 @@ files {
MAME_DIR .. "src/mame/machine/nes.cpp",
MAME_DIR .. "src/mame/video/nes.cpp",
MAME_DIR .. "src/mame/drivers/nes_vt.cpp",
MAME_DIR .. "src/mame/drivers/nes_sh6578.cpp",
MAME_DIR .. "src/mame/drivers/nes_boot.cpp",
MAME_DIR .. "src/mame/drivers/pokemini.cpp",
MAME_DIR .. "src/mame/drivers/snes.cpp",

View File

@ -0,0 +1,140 @@
// license:BSD-3-Clause
// copyright-holders:David Haywood
/*
SH6578 NES clone hardware
enhanced NES, different to VT / OneBus systems
*/
#include "emu.h"
#include "cpu/m6502/n2a03.h"
#include "video/ppu2c0x.h"
#include "emupal.h"
#include "screen.h"
#include "speaker.h"
class nes_sh6578_state : public driver_device
{
public:
nes_sh6578_state(const machine_config &mconfig, device_type type, const char *tag) :
driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_ppu(*this, "ppu")
{ }
void nes_sh6578(machine_config &config);
void init_nes_sh6578();
protected:
virtual void machine_start() override;
virtual void machine_reset() override;
virtual void video_start() override;
WRITE8_MEMBER(sprite_dma_w);
private:
required_device<n2a03_device> m_maincpu;
required_device<ppu2c0x_device> m_ppu;
void nes_sh6578_map(address_map &map);
};
WRITE8_MEMBER(nes_sh6578_state::sprite_dma_w)
{
int source = (data & 7);
m_ppu->spriteram_dma(space, source);
}
void nes_sh6578_state::nes_sh6578_map(address_map &map)
{
map(0x0000, 0x07ff).ram();
map(0x2000, 0x3fff).rw(m_ppu, FUNC(ppu2c0x_device::read), FUNC(ppu2c0x_device::write));
map(0x4014, 0x4014).w(FUNC(nes_sh6578_state::sprite_dma_w));
map(0x8000, 0xffff).rom();
}
static INPUT_PORTS_START( nes_sh6578 )
INPUT_PORTS_END
void nes_sh6578_state::video_start()
{
}
void nes_sh6578_state::machine_reset()
{
}
void nes_sh6578_state::machine_start()
{
// m_nt_ram = std::make_unique<uint8_t[]>(0x1000);
// m_nt_page[0] = m_nt_ram.get();
// m_nt_page[1] = m_nt_ram.get() + 0x400;
// m_nt_page[2] = m_nt_ram.get() + 0x800;
// m_nt_page[3] = m_nt_ram.get() + 0xc00;
// m_ppu->space(AS_PROGRAM).install_readwrite_handler(0x2000, 0x3eff, read8_delegate(*this, FUNC(nes_sh6578_state::nes_sh6578_nt_r)), write8_delegate(*this, FUNC(nes_sh6578_state::nes_sh6578_nt_w)));
// m_ppu->space(AS_PROGRAM).install_read_bank(0x0000, 0x1fff, "bank1");
// membank("bank1")->set_base(memregion("gfx1")->base());
}
void nes_sh6578_state::nes_sh6578(machine_config &config)
{
/* basic machine hardware */
N2A03(config, m_maincpu, NTSC_APU_CLOCK);
m_maincpu->set_addrmap(AS_PROGRAM, &nes_sh6578_state::nes_sh6578_map);
/* video hardware */
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
screen.set_refresh_hz(60);
screen.set_size(32*8, 262);
screen.set_visarea(0*8, 32*8-1, 0*8, 30*8-1);
screen.set_screen_update("ppu", FUNC(ppu2c0x_device::screen_update));
PPU_2C02(config, m_ppu);
m_ppu->set_cpu_tag("maincpu");
m_ppu->int_callback().set_inputline(m_maincpu, INPUT_LINE_NMI);
/* sound hardware */
SPEAKER(config, "mono").front_center();
m_maincpu->add_route(ALL_OUTPUTS, "mono", 0.50);
}
void nes_sh6578_state::init_nes_sh6578()
{
}
ROM_START( bandgpad )
ROM_REGION( 0x100000, "maincpu", 0 )
ROM_LOAD( "gamepad.bin", 0x00000, 0x100000, CRC(e2fbb532) SHA1(e9170a7739a8355acbf263fe2b1d291951dc07f0) )
ROM_END
ROM_START( ts_handy11 )
ROM_REGION( 0x100000, "maincpu", 0 )
ROM_LOAD( "tvplaypowercontroller.bin", 0x00000, 0x100000, CRC(9c7fe9ff) SHA1(c872e91ca835b66c9dd3b380e8374b51f12bcae0) ) // 29LV008B
ROM_END
ROM_START( afbm7800 )
ROM_REGION( 0x100000, "maincpu", 0 )
ROM_LOAD( "atariflashbackmini7800.bin", 0x00000, 0x100000, CRC(da4d9483) SHA1(c04465ff5bd5ca7abf088fe771b8e71c157afb89) )
ROM_END
ROM_START( cpatrolm )
ROM_REGION( 0x100000, "maincpu", 0 )
ROM_LOAD( "citypatrolman.bin", 0x00000, 0x100000, CRC(4b139c67) SHA1(a5b03f472a94ee879f58bbff201b671fbf4f1ea1) )
ROM_END
CONS( 1997, bandgpad, 0, 0, nes_sh6578, nes_sh6578, nes_sh6578_state, init_nes_sh6578, "Bandai", "Gamppad (Bandai)", MACHINE_NOT_WORKING )
// possibly newer than 2001
CONS( 2001, ts_handy11, 0, 0, nes_sh6578, nes_sh6578, nes_sh6578_state, init_nes_sh6578, "Techno Source", "Handy Boy 11-in-1 (TV Play Power)", MACHINE_NOT_WORKING )
CONS( 2004, afbm7800, 0, 0, nes_sh6578, nes_sh6578, nes_sh6578_state, init_nes_sh6578, "Atari", "Atari Flashback Mini 7800", MACHINE_NOT_WORKING )
CONS( 200?, cpatrolm, 0, 0, nes_sh6578, nes_sh6578, nes_sh6578_state, init_nes_sh6578, "<unknown>", "City Patrolman", MACHINE_NOT_WORKING )

View File

@ -252,23 +252,6 @@ protected:
private:
};
class nes_vt_ts_state : public nes_vt_state
{
public:
nes_vt_ts_state(const machine_config& mconfig, device_type type, const char* tag) :
nes_vt_state(mconfig, type, tag)
{
m_initial_e000_bank = 0x03; // or the banking is just different / ROM is scrambled
}
void nes_vt_ts(machine_config& config);
protected:
void nes_vt_ts_map(address_map& map);
private:
};
class nes_vt_pjoy_state : public nes_vt_state
{
public:
@ -1851,16 +1834,6 @@ void nes_vt_dg_state::nes_vt_fa_map(address_map &map)
map(0x4242, 0x4242).w(FUNC(nes_vt_dg_state::vtfp_4242_w));
}
void nes_vt_ts_state::nes_vt_ts_map(address_map& map)
{
nes_vt_map(map);
map(0x0800, 0x1fff).ram(); // how much RAM?
map(0x5000, 0x57ff).ram(); // plays music if you map this as RAM
map(0x2040, 0x207f).ram(); // strange regs in vdp area
}
void nes_vt_state::prg_map(address_map &map)
{
map(0x0000, 0x1fff).bankr("prg_bank0");
@ -2150,13 +2123,6 @@ void nes_vt_vh2009_state::nes_vt_vh2009(machine_config &config)
//m_ppu->set_palette_mode(PAL_MODE_NEW_VG); // gives better title screens, but worse ingame, must be able to switch
}
void nes_vt_ts_state::nes_vt_ts(machine_config &config)
{
nes_vt(config);
m_maincpu->set_addrmap(AS_PROGRAM, &nes_vt_ts_state::nes_vt_ts_map);
}
static INPUT_PORTS_START( nes_vt_fp )
PORT_INCLUDE(nes_vt)
@ -2645,17 +2611,6 @@ ROM_END
ROM_START( bandgpad )
ROM_REGION( 0x100000, "mainrom", 0 )
ROM_LOAD( "gamepad.bin", 0x00000, 0x100000, CRC(e2fbb532) SHA1(e9170a7739a8355acbf263fe2b1d291951dc07f0) )
ROM_END
ROM_START( ts_handy11 )
ROM_REGION( 0x100000, "mainrom", 0 )
ROM_LOAD( "tvplaypowercontroller.bin", 0x00000, 0x100000, CRC(9c7fe9ff) SHA1(c872e91ca835b66c9dd3b380e8374b51f12bcae0) ) // 29LV008B
ROM_END
// earlier version of vdogdemo
CONS( 200?, vdogdeme, 0, 0, nes_vt, nes_vt, nes_vt_state, empty_init, "VRT", "V-Dog (prototype, earlier)", MACHINE_NOT_WORKING )
@ -2836,8 +2791,3 @@ CONS( 2017, fapocket, 0, 0, nes_vt_fa, nes_vt_fa, nes_vt_dg_state, emp
// Plays intro music but then crashes. same hardware as SY-88x but uses more features
CONS( 2016, mog_m320, 0, 0, nes_vt_hh, nes_vt, nes_vt_hh_state, empty_init, "MOGIS", "MOGIS M320 246 in 1 Handheld", MACHINE_NOT_WORKING )
// UMC 6578 based - NOT VT
CONS( 1997, bandgpad, 0, 0, nes_vt_ts, nes_vt, nes_vt_ts_state, empty_init, "Bandai", "Gamppad (Bandai)", MACHINE_NOT_WORKING )
// possibly newer than 2001 but most games have a 2001 copyright. Most games are higher colour versions of NES games, so it's an enhanced NES chipset at least but maybe not VT?
CONS( 2001, ts_handy11, 0, 0, nes_vt_ts, nes_vt, nes_vt_ts_state, empty_init, "Techno Source", "Handy Boy 11-in-1 (TV Play Power)", MACHINE_NOT_WORKING )

View File

@ -663,6 +663,26 @@ static INPUT_PORTS_START( abltenni )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
INPUT_PORTS_END
static INPUT_PORTS_START( guitarfv )
PORT_START("P1") // Button 1 + 2 and start for service mode
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON2 )
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_BUTTON3 )
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_BUTTON4 )
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON5 )
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_JOYSTICK_UP )
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN )
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME("Wheel") // 'Wheel'
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0xfe00, IP_ACTIVE_LOW, IPT_UNKNOWN ) // unused?
PORT_START("P2")
PORT_BIT( 0xffff, IP_ACTIVE_LOW, IPT_UNKNOWN ) // unused?
PORT_START("P3")
PORT_BIT( 0xffff, IP_ACTIVE_LOW, IPT_UNKNOWN ) // unused?
INPUT_PORTS_END
void spg2xx_game_state::machine_start()
{
if (m_bank)
@ -736,6 +756,22 @@ void spg2xx_game_state::abltenni(machine_config &config)
m_maincpu->set_rowscroll_offset(8);
}
void spg2xx_game_state::guitarfv(machine_config &config)
{
SPG24X(config, m_maincpu, XTAL(27'000'000), m_screen);
m_maincpu->set_addrmap(AS_PROGRAM, &spg2xx_game_state::mem_map_4m);
spg2xx_base(config);
m_maincpu->set_pal(true);
m_screen->set_refresh_hz(50);
m_maincpu->porta_in().set_ioport("P1");
m_maincpu->portb_in().set_ioport("P2");
m_maincpu->portc_in().set_ioport("P3");
}
void spg2xx_game_state::tvsprt10(machine_config &config)
{
SPG24X(config, m_maincpu, XTAL(27'000'000), m_screen);
@ -837,6 +873,12 @@ ROM_START( wiwi18 )
ROM_LOAD16_WORD_SWAP( "26gl128.bin", 0x000000, 0x1000000, CRC(0b103ac9) SHA1(14434908f429942096fb8db5b5630603fd54fb2c) )
ROM_END
ROM_START( guitarfv )
ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 )
ROM_LOAD16_WORD_SWAP( "mx26l64.bin", 0x000000, 0x800000, CRC(eaadd2c2) SHA1(0c3fe004dbaa52a335c6ddcecb9e9f5582d7ef35) )
ROM_END
void spg2xx_game_state::init_crc()
{
// several games have a byte sum checksum listed at the start of ROM, this little helper function logs what it should match.
@ -891,6 +933,9 @@ CONS( 2006, abltenni, 0, 0, abltenni, abltenni, spg2xx_ga
// same as Excalibur Decathlon? not the same as the ABL game
CONS( 2006, tvsprt10, 0, 0, tvsprt10, tvsprt10, spg2xx_game_state, init_tvsprt10, "Simba / V-Tac Technology Co Ltd.", "TV Sports 10-in-1 / Decathlon Atlhetic Sport Games", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS )
CONS( 2007, guitarfv, 0, 0, guitarfv, guitarfv, spg2xx_game_state, empty_init, "Advance Bright Ltd", "Guitar Fever (2007.07.03 Ver 2.7)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS )
// Mattel games
CONS( 2005, mattelcs, 0, 0, rad_skat, mattelcs, spg2xx_game_state, empty_init, "Mattel", "Mattel Classic Sports", MACHINE_IMPERFECT_SOUND )

View File

@ -38,6 +38,8 @@ public:
void non_spg_base(machine_config &config);
void abltenni(machine_config &config);
void tvsprt10(machine_config &config);
void guitarfv(machine_config &config);
void init_crc();
void init_wiwi18();

View File

@ -31304,6 +31304,12 @@ nes // Nintendo Entertainment System
nespal // Nintendo Entertainment System PAL
@source:nes_boot.cpp
bandgpad
ts_handy11
afbm7800
cpatrolm
@source:nes_sh6578.cpp
pjoypj001
@source:nes_vt.cpp
@ -31374,8 +31380,6 @@ fcpocket
mog_m320
fapocket
zdog
bandgpad
ts_handy11
@source:vt1682.cpp
ii8in1
@ -36979,6 +36983,7 @@ mattelcs //
abltenni //
tvsprt10 //
wiwi18 //
guitarfv
@source:spg2xx_dreamlife.cpp
dreamlif //