summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author David Haywood <28625134+DavidHaywood@users.noreply.github.com>2020-02-15 13:26:13 +0000
committer GitHub <noreply@github.com>2020-02-16 00:26:13 +1100
commit51c96b88df369fd206dd7407ae3aedcc237df7eb (patch)
tree5310b7756ab9777d89b8d4739d537de3b202fc64
parent6c6267ca58e45be668557cd23473ffaacf06eb7f (diff)
Plug and Play work (#6311)
* new WORKING machine ----- Retro Dance Mat (110 song Super StepMania + 9-in-1 games) (PAL) [TeamEurope, David Haywood] * new NOT WORKING --- Lexibook Retro TV Game Console - 300 Games [TeamEurope, David Haywood] My Arcade Retro Arcade Machine - 300 Handheld Video Games (DGUN-2593) [TeamEurope, David Haywood] * swap painball powered up dump for a better one, previous reads weren't 100% consistent, they are now, changes verified to be correct (nw) * notes from Sean (nw) * rename these bits, they're not system specific (nw)
-rw-r--r--scripts/target/mame/mess.lua8
-rw-r--r--src/mame/drivers/nes_vt.cpp23
-rw-r--r--src/mame/drivers/spg29x.cpp9
-rw-r--r--src/mame/drivers/spg2xx.cpp7
-rw-r--r--src/mame/drivers/spg2xx_jakks.cpp2
-rw-r--r--src/mame/drivers/sunplus_unsp20soc.cpp10
-rw-r--r--src/mame/drivers/vt1682.cpp244
-rw-r--r--src/mame/drivers/xavix.cpp2
-rw-r--r--src/mame/machine/m6502_swap_op_d2_d7.cpp (renamed from src/mame/machine/m6502_vt1682.cpp)26
-rw-r--r--src/mame/machine/m6502_swap_op_d2_d7.h (renamed from src/mame/machine/m6502_vh2009.h)14
-rw-r--r--src/mame/machine/m6502_swap_op_d5_d6.cpp66
-rw-r--r--src/mame/machine/m6502_swap_op_d5_d6.h (renamed from src/mame/machine/m6502_vt1682.h)14
-rw-r--r--src/mame/machine/m6502_vh2009.cpp65
-rw-r--r--src/mame/mame.lst5
14 files changed, 328 insertions, 167 deletions
diff --git a/scripts/target/mame/mess.lua b/scripts/target/mame/mess.lua
index 09a8c752d8c..e71cff99f6d 100644
--- a/scripts/target/mame/mess.lua
+++ b/scripts/target/mame/mess.lua
@@ -2934,8 +2934,10 @@ files {
MAME_DIR .. "src/mame/drivers/gamecube.cpp",
MAME_DIR .. "src/mame/machine/m6502_vtscr.cpp",
MAME_DIR .. "src/mame/machine/m6502_vtscr.h",
- MAME_DIR .. "src/mame/machine/m6502_vh2009.cpp",
- MAME_DIR .. "src/mame/machine/m6502_vh2009.h",
+ MAME_DIR .. "src/mame/machine/m6502_swap_op_d5_d6.cpp",
+ MAME_DIR .. "src/mame/machine/m6502_swap_op_d5_d6.h",
+ MAME_DIR .. "src/mame/machine/m6502_swap_op_d2_d7.cpp",
+ MAME_DIR .. "src/mame/machine/m6502_swap_op_d2_d7.h",
MAME_DIR .. "src/mame/drivers/vt1682.cpp",
MAME_DIR .. "src/mame/machine/vt1682_io.h",
MAME_DIR .. "src/mame/machine/vt1682_io.cpp",
@@ -2945,8 +2947,6 @@ files {
MAME_DIR .. "src/mame/machine/vt1682_alu.cpp",
MAME_DIR .. "src/mame/machine/vt1682_timer.h",
MAME_DIR .. "src/mame/machine/vt1682_timer.cpp",
- MAME_DIR .. "src/mame/machine/m6502_vt1682.cpp",
- MAME_DIR .. "src/mame/machine/m6502_vt1682.h",
}
createMESSProjects(_target, _subtarget, "nokia")
diff --git a/src/mame/drivers/nes_vt.cpp b/src/mame/drivers/nes_vt.cpp
index 8a895b3acee..66809f83a7c 100644
--- a/src/mame/drivers/nes_vt.cpp
+++ b/src/mame/drivers/nes_vt.cpp
@@ -71,7 +71,7 @@
#include "machine/bankdev.h"
#include "video/ppu2c0x_vt.h"
#include "machine/m6502_vtscr.h"
-#include "machine/m6502_vh2009.h"
+#include "machine/m6502_swap_op_d5_d6.h"
#include "screen.h"
#include "speaker.h"
@@ -2117,7 +2117,7 @@ void nes_vt_vh2009_state::nes_vt_vh2009(machine_config &config)
{
nes_vt(config);
- M6502_VH2009(config.replace(), m_maincpu, NTSC_APU_CLOCK);
+ M6502_SWAP_OP_D5_D6(config.replace(), m_maincpu, NTSC_APU_CLOCK);
m_maincpu->set_addrmap(AS_PROGRAM, &nes_vt_vh2009_state::nes_vt_map);
//m_ppu->set_palette_mode(PAL_MODE_NEW_VG); // gives better title screens, but worse ingame, must be able to switch
@@ -2296,6 +2296,18 @@ ROM_START( dgun2561 )
ROM_LOAD( "dgun2561.bin", 0x00000, 0x4000000, CRC(a6e627b4) SHA1(2667d2feb02de349387f9dcfa5418e7ed3afeef6) )
ROM_END
+ROM_START( dgun2593 )
+ ROM_REGION( 0x8000000, "mainrom", 0 )
+ ROM_LOAD( "dreamgear300.bin", 0x00000, 0x8000000, CRC(4fe0ed02) SHA1(a55590557bacca65ed9a17c5bcf0a4e5cb223126) )
+ROM_END
+
+ROM_START( rtvgc300 )
+ ROM_REGION( 0x8000000, "mainrom", 0 )
+ // some of the higher address lines might be swapped
+ ROM_LOAD( "lexibook300.bin", 0x00000, 0x4000000, CRC(015c4067) SHA1(a12986c4a366a23c4c7ca7b3d33e421a8dfdffc0) )
+ROM_END
+
+
// The maximum address space a VT chip can see is 32MB, so these 64MB roms are actually 2 programs (there are vectors in the first half and the 2nd half)
// there must be a bankswitch bit that switches the whole 32MB space. Loading the 2nd half in Star Wars does actually boot straight to a game.
@@ -2697,12 +2709,15 @@ CONS( 200?, vgpmini, 0, 0, nes_vt_vg, nes_vt, nes_vt_hh_state, empty_init, "
CONS( 200?, dgun2500, 0, 0, nes_vt_dg, nes_vt, nes_vt_dg_state, empty_init, "dreamGEAR", "dreamGEAR Wireless Motion Control with 130 games (DGUN-2500)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND)
// don't even get to menu. very enhanced chipset, VT368/9?
-CONS( 2012, dgun2561, 0, 0, nes_vt_cy, nes_vt, nes_vt_cy_lexibook_state, empty_init, "dreamGEAR", "dreamGEAR My Arcade Portable Gaming System (DGUN-2561)", MACHINE_NOT_WORKING )
+CONS( 2012, dgun2561, 0, 0, nes_vt_cy, nes_vt, nes_vt_cy_lexibook_state, empty_init, "dreamGEAR", "My Arcade Portable Gaming System (DGUN-2561)", MACHINE_NOT_WORKING )
+CONS( 2016, dgun2593, 0, 0, nes_vt_fp, nes_vt, nes_vt_hh_state, empty_init, "dreamGEAR", "My Arcade Retro Arcade Machine - 300 Handheld Video Games (DGUN-2593)", MACHINE_NOT_WORKING )
+
CONS( 200?, lxcmcy, 0, 0, nes_vt_cy, nes_vt, nes_vt_cy_lexibook_state, empty_init, "Lexibook", "Lexibook Compact Cyber Arcade", MACHINE_NOT_WORKING )
CONS( 200?, lxcmc250, 0, 0, nes_vt_cy, nes_vt, nes_vt_cy_lexibook_state, empty_init, "Lexibook", "Lexibook Compact Cyber Arcade - 250-in-1 (JL2375)", MACHINE_NOT_WORKING )
CONS( 200?, lxcmcysw, 0, 0, nes_vt_cy, nes_vt, nes_vt_cy_lexibook_state, empty_init, "Lexibook", "Lexibook Compact Cyber Arcade - Star Wars Rebels", MACHINE_NOT_WORKING )
CONS( 200?, lxcmcyfz, 0, 0, nes_vt_cy, nes_vt, nes_vt_cy_lexibook_state, empty_init, "Lexibook", "Lexibook Compact Cyber Arcade - Frozen", MACHINE_NOT_WORKING )
CONS( 200?, lxcmcydp, 0, 0, nes_vt_cy, nes_vt, nes_vt_cy_lexibook_state, empty_init, "Lexibook", "Lexibook Compact Cyber Arcade - Disney Princess", MACHINE_NOT_WORKING )
+CONS( 2016, rtvgc300, 0, 0, nes_vt_cy, nes_vt, nes_vt_cy_lexibook_state, empty_init, "Lexibook", "Lexibook Retro TV Game Console - 300 Games", MACHINE_NOT_WORKING )
// Also Lexibook Compact Cyber Arcade - Cars
// Lexibook Compact Cyber Arcade - Paw Patrol
@@ -2720,7 +2735,7 @@ CONS( 201?, red5mam, 0, 0, nes_vt_cy, nes_vt, nes_vt_cy_lexibook_state, empty
// palette issues in some games because they actually use the old VT style palette
// but no way to switch?
// some menu gfx broken, probably because this is a bad dump
-CONS( 2015, dgun2573, 0, 0, nes_vt_fp, nes_vt, nes_vt_hh_state, empty_init, "dreamGEAR", "dreamGEAR My Arcade Gamer V Portable Gaming System (DGUN-2573)", MACHINE_WRONG_COLORS | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND )
+CONS( 2015, dgun2573, 0, 0, nes_vt_fp, nes_vt, nes_vt_hh_state, empty_init, "dreamGEAR", "My Arcade Gamer V Portable Gaming System (DGUN-2573)", MACHINE_WRONG_COLORS | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND )
diff --git a/src/mame/drivers/spg29x.cpp b/src/mame/drivers/spg29x.cpp
index 4c821b3030f..a6c2c460272 100644
--- a/src/mame/drivers/spg29x.cpp
+++ b/src/mame/drivers/spg29x.cpp
@@ -50,6 +50,12 @@
25 RESERVED2
24 RESERVED3
+
+-------
+
+ CPU die markings on Big Buck Hunter "SunplusmM LU9001"
+
+
****************************************************************************/
#include "emu.h"
@@ -723,6 +729,7 @@ ROM_END
// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS
COMP( 2006, hyprscan, 0, 0, hyperscan, hyperscan, spg29x_game_state, empty_init, "Mattel", "HyperScan", MACHINE_NOT_WORKING | MACHINE_NO_SOUND )
-COMP( 2009, jak_bbsf, 0, 0, hyperscan, hyperscan, spg29x_nand_game_state, nand_init210, "JAKKS Pacific Inc", "Big Buck Hunter Safari (JAKKS Pacific TV Game)", MACHINE_NOT_WORKING | MACHINE_NO_SOUND )
+// Big Buck Hunter has ISSI 404A (24C04)
+COMP( 2009, jak_bbsf, 0, 0, hyperscan, hyperscan, spg29x_nand_game_state, nand_init210, "JAKKS Pacific Inc", "Big Buck Hunter Safari (JAKKS Pacific TV Game)", MACHINE_NOT_WORKING | MACHINE_NO_SOUND ) // Big Buck Safari has ISSI 416A (24C16)
diff --git a/src/mame/drivers/spg2xx.cpp b/src/mame/drivers/spg2xx.cpp
index 4f575458069..d5e75ef7942 100644
--- a/src/mame/drivers/spg2xx.cpp
+++ b/src/mame/drivers/spg2xx.cpp
@@ -33,6 +33,9 @@
Clickstart ( see clickstart.cpp instead)
Wheel of Fortune 2nd Edition
Spider-man - Villain Roundup
+ Dream Life Superstar
+ Designer's World
+ Star Wars TV Touch
"SunPlus QU7074-P69A"
@@ -82,7 +85,7 @@
- see spg110.cpp instead
"GCM394" (this is clearly newer, has extra opcodes, different internal map etc. also scaling and higher resolutions based on Spongebob)
- - see sunplus_gcm394.cpp instead
+ - see sunplus_unsp20soc.cpp instead
Status:
@@ -1217,7 +1220,7 @@ ROM_END
ROM_START( pballpup )
ROM_REGION( 0x1000000, "maincpu", ROMREGION_ERASE00 )
- ROM_LOAD16_WORD_SWAP( "paintballpoweredup.bin", 0x000000, 0x1000000, CRC(df6b77bf) SHA1(aa3c55025e80c7a943d7cfe313d16b53a574a285) )
+ ROM_LOAD16_WORD_SWAP( "paintballpoweredup.bin", 0x000000, 0x1000000, CRC(57dbdfd1) SHA1(d98cb7321cc7af092f6f4f83e85fabbdbc1bbd95) )
ROM_END
ROM_START( swclone )
diff --git a/src/mame/drivers/spg2xx_jakks.cpp b/src/mame/drivers/spg2xx_jakks.cpp
index 611f49279c7..ef540920f81 100644
--- a/src/mame/drivers/spg2xx_jakks.cpp
+++ b/src/mame/drivers/spg2xx_jakks.cpp
@@ -949,4 +949,4 @@ CONS( 2005, jak_care, 0, 0, jakks_gkr_cb, jak_care, jakks_gkr_state, emp
// Some versions of the Shrek - Over the Hedge unit show the GameKey logo on startup (others don't) there is no evidence to suggest it was ever released with a GameKey port tho, and the internal PCB has no place for one on the versions we've seen (which show the logo)
// TV Touch Games (these are re-release versions of classic JAKKS games but using a touchpad controller)
-CONS( 2012, tvtchsw, 0, 0, jakks_tvtouch, tvtouch, jakks_gkr_state, empty_init, "JAKKS Pacific Inc / Code Mystics", "TV Touch Games: Star Wars Original Trilogy", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS )
+CONS( 2012, tvtchsw, 0, 0, jakks_tvtouch, tvtouch, jakks_gkr_state, empty_init, "JAKKS Pacific Inc / Code Mystics", "TV Touch Games: Star Wars Original Trilogy", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // Touch games have 24C04
diff --git a/src/mame/drivers/sunplus_unsp20soc.cpp b/src/mame/drivers/sunplus_unsp20soc.cpp
index 6eb8f295bfe..6154cb54e07 100644
--- a/src/mame/drivers/sunplus_unsp20soc.cpp
+++ b/src/mame/drivers/sunplus_unsp20soc.cpp
@@ -5,7 +5,11 @@
JAKKS call this GPAC800, other sources call it GPL16250
- die on Smart Fit Park and Spongebob Bikini Bottom 500 is marked GCM394
+ die markings GCM394
+ - Smart Fit Park
+ - Spongebob Bikini Bottom 500
+ - Mobigo2 (sunplus_unsp20soc_mobigo.cpp)
+
some of the systems here might use newer dies but the video etc. appears the same.
Compared to vii.cpp this is clearly newer, has extra opcodes, different internal map etc. also scaling and higher resolutions based on Spongebob
@@ -1283,7 +1287,7 @@ CONS(200?, tkmag220, 0, 0, tkmag220, tkmag220, tkmag220_game_state, empty_init
// Fun 2 Learn 3-in-1 SMART SPORTS ?
CONS(2009, jak_s500, 0, 0, wrlshunt, jak_s500, jak_s500_game_state, init_wrlshunt, "JAKKS Pacific Inc", "SpongeBob SquarePants Bikini Bottom 500 (JAKKS Pacific TV Motion Game)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND)
-CONS(200?, jak_totm, 0, 0, wrlshunt, jak_s500, jak_s500_game_state, init_wrlshunt, "JAKKS Pacific Inc", "Toy Story - Toys on the Move (JAKKS Pacific TV Motion Game)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND)
+CONS(200?, jak_totm, 0, 0, wrlshunt, jak_s500, jak_s500_game_state, init_wrlshunt, "JAKKS Pacific Inc", "Toy Story - Toys on the Move (JAKKS Pacific TV Motion Game)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND) // Toys on the Move has ISSI 404A
CONS(2011, wrlshunt, 0, 0, wrlshunt, wrlshunt, wrlshunt_game_state, init_wrlshunt, "Hamy / Kids Station Toys Inc", "Wireless Hunting Video Game System", MACHINE_NO_SOUND | MACHINE_NOT_WORKING)
@@ -1458,7 +1462,7 @@ void generalplus_gpac800_game_state::nand_beambox()
CONS(2010, wlsair60, 0, 0, generalplus_gpac800, jak_car2, generalplus_gpac800_game_state, nand_wlsair60, "Jungle Soft / Kids Station Toys Inc", "Wireless Air 60", MACHINE_NO_SOUND | MACHINE_NOT_WORKING)
CONS(200?, jak_gtg, 0, 0, generalplus_gpac800, jak_gtg, generalplus_gpac800_game_state, nand_init210, "JAKKS Pacific Inc", "Golden Tee Golf (JAKKS Pacific TV Game)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING)
CONS(200?, jak_car2, 0, 0, generalplus_gpac800, jak_car2, generalplus_gpac800_game_state, nand_init210, "JAKKS Pacific Inc", "Cars 2 (JAKKS Pacific TV Game)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING)
-CONS(200?, jak_duck, 0, 0, generalplus_gpac800, jak_car2, generalplus_gpac800_game_state, nand_init210, "JAKKS Pacific Inc", "Duck Commander (JAKKS Pacific TV Game)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING)
+CONS(200?, jak_duck, 0, 0, generalplus_gpac800, jak_car2, generalplus_gpac800_game_state, nand_init210, "JAKKS Pacific Inc", "Duck Commander (JAKKS Pacific TV Game)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING) // gun games all had Atmel 16CM (24C16).
CONS(200?, jak_swc, 0, 0, generalplus_gpac800, jak_car2, generalplus_gpac800_game_state, nand_init210, "JAKKS Pacific Inc", "Star Wars Clone Trooper (JAKKS Pacific TV Game)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING)
CONS(200?, jak_wdzh, 0, 0, generalplus_gpac800, jak_car2, generalplus_gpac800_game_state, nand_init210, "JAKKS Pacific Inc", "The Walking Dead: Zombie Hunter (JAKKS Pacific TV Game)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING)
CONS(200?, jak_wdbg, 0, 0, generalplus_gpac800, jak_car2, generalplus_gpac800_game_state, nand_init210, "JAKKS Pacific Inc", "The Walking Dead: Battleground (JAKKS Pacific TV Game)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING)
diff --git a/src/mame/drivers/vt1682.cpp b/src/mame/drivers/vt1682.cpp
index b40e8a5d6b5..597433a0cd1 100644
--- a/src/mame/drivers/vt1682.cpp
+++ b/src/mame/drivers/vt1682.cpp
@@ -59,8 +59,8 @@
*/
#include "emu.h"
-#include "machine/m6502_vt1682.h"
-#include "machine/m6502_vh2009.h"
+#include "machine/m6502_swap_op_d2_d7.h"
+#include "machine/m6502_swap_op_d5_d6.h"
#include "machine/vt1682_io.h"
#include "machine/vt1682_uio.h"
#include "machine/vt1682_alu.h"
@@ -113,11 +113,11 @@ public:
m_bank(*this, "cartbank"),
m_screen(*this, "screen"),
m_soundcpu(*this, "soundcpu"),
- m_maincpu_alu(*this, "mainalu"),
- m_soundcpu_alu(*this, "soundalu"),
m_soundcpu_timer_a_dev(*this, "snd_timera_dev"),
m_soundcpu_timer_b_dev(*this, "snd_timerb_dev"),
m_system_timer_dev(*this, "sys_timer_dev"),
+ m_maincpu_alu(*this, "mainalu"),
+ m_soundcpu_alu(*this, "soundalu"),
m_spriteram(*this, "spriteram"),
m_vram(*this, "vram"),
m_sound_share(*this, "sound_share"),
@@ -141,20 +141,31 @@ protected:
required_device<cpu_device> m_maincpu;
void vt_vt1682_map(address_map& map);
+ void vt_vt1682_sound_map(address_map& map);
required_device<address_map_bank_device> m_fullrom;
required_memory_bank m_bank;
required_device<screen_device> m_screen;
-
-private:
required_device<cpu_device> m_soundcpu;
- required_device<vrt_vt1682_alu_device> m_maincpu_alu;
- required_device<vrt_vt1682_alu_device> m_soundcpu_alu;
+
+ DECLARE_WRITE_LINE_MEMBER(soundcpu_timera_irq);
+ DECLARE_WRITE_LINE_MEMBER(soundcpu_timerb_irq);
+
+ DECLARE_WRITE_LINE_MEMBER(maincpu_timer_irq);
required_device<vrt_vt1682_timer_device> m_soundcpu_timer_a_dev;
required_device<vrt_vt1682_timer_device> m_soundcpu_timer_b_dev;
required_device<vrt_vt1682_timer_device> m_system_timer_dev;
+ void vt_vt1682_ntscbase(machine_config& config);
+ void vt_vt1682_palbase(machine_config& config);
+ void vt_vt1682_common(machine_config& config);
+
+private:
+ required_device<vrt_vt1682_alu_device> m_maincpu_alu;
+ required_device<vrt_vt1682_alu_device> m_soundcpu_alu;
+
+
required_device<address_map_bank_device> m_spriteram;
required_device<address_map_bank_device> m_vram;
required_shared_ptr<uint8_t> m_sound_share;
@@ -163,9 +174,6 @@ private:
required_device<timer_device> m_render_timer;
uint32_t screen_update(screen_device& screen, bitmap_rgb32& bitmap, const rectangle& cliprect);
- void vt_vt1682_sound_map(address_map& map);
-
-
void rom_map(address_map& map);
@@ -565,11 +573,6 @@ private:
/* Support */
- DECLARE_WRITE_LINE_MEMBER(soundcpu_timera_irq);
- DECLARE_WRITE_LINE_MEMBER(soundcpu_timerb_irq);
-
- DECLARE_WRITE_LINE_MEMBER(maincpu_timer_irq);
-
DECLARE_WRITE8_MEMBER(vt1682_timer_enable_trampoline_w)
{
// this is used for raster interrpt effects, despite not being a scanline timer, so knowing when it triggers is useful, so trampoline it to avoid passing m_screen to the device
@@ -626,10 +629,10 @@ public:
void intech_interact(machine_config& config);
void intech_interact_bank(machine_config& config);
- DECLARE_READ8_MEMBER(porta_r);
- DECLARE_READ8_MEMBER(portb_r) { return 0x00;/*uint8_t ret = machine().rand() & 0xf; LOGMASKED(LOG_OTHER, "%s: portb_r returning: %1x\n", machine().describe_context(), ret); return ret;*/ };
- DECLARE_READ8_MEMBER(portc_r);
- DECLARE_READ8_MEMBER(portd_r) { return 0x00;/*uint8_t ret = machine().rand() & 0xf; LOGMASKED(LOG_OTHER, "%s: portd_r returning: %1x\n", machine().describe_context(), ret); return ret;*/ };
+ virtual DECLARE_READ8_MEMBER(porta_r);
+ virtual DECLARE_READ8_MEMBER(portb_r) { return 0x00;/*uint8_t ret = machine().rand() & 0xf; LOGMASKED(LOG_OTHER, "%s: portb_r returning: %1x\n", machine().describe_context(), ret); return ret;*/ };
+ virtual DECLARE_READ8_MEMBER(portc_r);
+ virtual DECLARE_READ8_MEMBER(portd_r) { return 0x00;/*uint8_t ret = machine().rand() & 0xf; LOGMASKED(LOG_OTHER, "%s: portd_r returning: %1x\n", machine().describe_context(), ret); return ret;*/ };
DECLARE_WRITE8_MEMBER(porta_w);
DECLARE_WRITE8_MEMBER(portb_w);
@@ -655,6 +658,24 @@ private:
required_ioport m_io_p4;
};
+class vt1682_dance_state : public vt_vt1682_state
+{
+public:
+ vt1682_dance_state(const machine_config& mconfig, device_type type, const char* tag) :
+ vt_vt1682_state(mconfig, type, tag),
+ m_io_p1(*this, "IN0")
+ { }
+
+ void vt1682_dance(machine_config& config);
+
+protected:
+ DECLARE_READ8_MEMBER(uio_porta_r);
+ DECLARE_WRITE8_MEMBER(uio_porta_w);
+
+private:
+ required_ioport m_io_p1;
+};
+
class vt1682_exsport_state : public vt_vt1682_state
{
public:
@@ -2756,18 +2777,28 @@ READ8_MEMBER(vt_vt1682_state::vt1682_210b_misc_cs_prg0_bank_sel_r)
WRITE8_MEMBER(vt_vt1682_state::vt1682_210b_misc_cs_prg0_bank_sel_w)
{
// PQ2 Enable is also used for ROM banking along with Program Bank 0 select
+ uint32_t clock = m_maincpu->clock();
LOGMASKED(LOG_OTHER, "%s: vt1682_210b_misc_cs_prg0_bank_sel_w writing: %02x\n", machine().describe_context(), data);
m_210b_misc_cs_prg0_bank_sel = data;
- // TODO: allow PAL
if (data & 0x80)
{
- m_system_timer_dev->set_clock(TIMER_ALT_SPEED_NTSC);
+ if (clock == 21477272/4)
+ m_system_timer_dev->set_clock(TIMER_ALT_SPEED_NTSC);
+ else if (clock == 26601712/5)
+ m_system_timer_dev->set_clock(TIMER_ALT_SPEED_PAL);
+ else
+ logerror("setting alt timings with unknown main CPU frequency %d\n", clock);
}
else
{
- m_system_timer_dev->set_clock(MAIN_CPU_CLOCK_NTSC);
+ if (clock == 21477272/4)
+ m_system_timer_dev->set_clock(MAIN_CPU_CLOCK_NTSC);
+ else if (clock == 26601712/5)
+ m_system_timer_dev->set_clock(MAIN_CPU_CLOCK_PAL);
+ else
+ logerror("setting alt timings with unknown main CPU frequency %d\n", clock);
}
update_banks();
@@ -5400,25 +5431,16 @@ static GFXDECODE_START( gfx_test )
GFXDECODE_END
-
-
-void vt_vt1682_state::vt_vt1682(machine_config &config)
+void vt_vt1682_state::vt_vt1682_ntscbase(machine_config& config)
{
/* basic machine hardware */
- M6502_VT1682(config, m_maincpu, MAIN_CPU_CLOCK_NTSC);
+ M6502_SWAP_OP_D2_D7(config, m_maincpu, MAIN_CPU_CLOCK_NTSC);
m_maincpu->set_addrmap(AS_PROGRAM, &vt_vt1682_state::vt_vt1682_map);
//m_maincpu->set_vblank_int("screen", FUNC(vt_vt1682_state::nmi));
M6502(config, m_soundcpu, SOUND_CPU_CLOCK_NTSC);
m_soundcpu->set_addrmap(AS_PROGRAM, &vt_vt1682_state::vt_vt1682_sound_map);
- TIMER(config, "scantimer").configure_scanline(FUNC(vt_vt1682_state::scanline), "screen", 0, 1);
- TIMER(config, m_render_timer).configure_periodic(FUNC(vt_vt1682_state::line_render_start), attotime::never);
-
- VT_VT1682_ALU(config, m_maincpu_alu, 0);
- VT_VT1682_ALU(config, m_soundcpu_alu, 0);
- m_soundcpu_alu->set_sound_alu(); // different logging conditions
-
VT_VT1682_TIMER(config, m_soundcpu_timer_a_dev, SOUND_CPU_CLOCK_NTSC);
m_soundcpu_timer_a_dev->write_irq_callback().set(FUNC(vt_vt1682_state::soundcpu_timera_irq));
m_soundcpu_timer_a_dev->set_sound_timer(); // different logging conditions
@@ -5427,6 +5449,50 @@ void vt_vt1682_state::vt_vt1682(machine_config &config)
VT_VT1682_TIMER(config, m_system_timer_dev, MAIN_CPU_CLOCK_NTSC);
m_system_timer_dev->write_irq_callback().set(FUNC(vt_vt1682_state::maincpu_timer_irq));
+ /* video hardware */
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ m_screen->set_refresh_hz(60);
+ m_screen->set_size(300, 262); // 262 for NTSC, might be 261 if Vblank line is changed
+ m_screen->set_visarea(0, 256-1, 0, 240-1);
+ m_screen->set_screen_update(FUNC(vt_vt1682_state::screen_update));
+}
+
+void vt_vt1682_state::vt_vt1682_palbase(machine_config& config)
+{
+ M6502_SWAP_OP_D2_D7(config, m_maincpu, MAIN_CPU_CLOCK_PAL);
+ m_maincpu->set_addrmap(AS_PROGRAM, &vt_vt1682_state::vt_vt1682_map);
+ //m_maincpu->set_vblank_int("screen", FUNC(vt_vt1682_state::nmi));
+
+ M6502(config, m_soundcpu, SOUND_CPU_CLOCK_PAL);
+ m_soundcpu->set_addrmap(AS_PROGRAM, &vt_vt1682_state::vt_vt1682_sound_map);
+
+ VT_VT1682_TIMER(config, m_soundcpu_timer_a_dev, SOUND_CPU_CLOCK_PAL);
+ m_soundcpu_timer_a_dev->write_irq_callback().set(FUNC(vt_vt1682_state::soundcpu_timera_irq));
+ m_soundcpu_timer_a_dev->set_sound_timer(); // different logging conditions
+ VT_VT1682_TIMER(config, m_soundcpu_timer_b_dev, SOUND_CPU_CLOCK_PAL);
+ m_soundcpu_timer_b_dev->write_irq_callback().set(FUNC(vt_vt1682_state::soundcpu_timerb_irq));
+ VT_VT1682_TIMER(config, m_system_timer_dev, MAIN_CPU_CLOCK_PAL);
+ m_system_timer_dev->write_irq_callback().set(FUNC(vt_vt1682_state::maincpu_timer_irq));
+
+ /* video hardware */
+ SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
+ m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ m_screen->set_refresh_hz(50.0070);
+ m_screen->set_size(300, 312); // 312? for PAL
+ m_screen->set_visarea(0, 256-1, 0, 240-1);
+ m_screen->set_screen_update(FUNC(vt_vt1682_state::screen_update));
+}
+
+void vt_vt1682_state::vt_vt1682_common(machine_config& config)
+{
+ TIMER(config, "scantimer").configure_scanline(FUNC(vt_vt1682_state::scanline), "screen", 0, 1);
+ TIMER(config, m_render_timer).configure_periodic(FUNC(vt_vt1682_state::line_render_start), attotime::never);
+
+ VT_VT1682_ALU(config, m_maincpu_alu, 0);
+ VT_VT1682_ALU(config, m_soundcpu_alu, 0);
+ m_soundcpu_alu->set_sound_alu(); // different logging conditions
+
config.set_maximum_quantum(attotime::from_hz(6000));
ADDRESS_MAP_BANK(config, m_fullrom).set_map(&vt_vt1682_state::rom_map).set_options(ENDIANNESS_NATIVE, 8, 25, 0x2000000);
@@ -5441,14 +5507,6 @@ void vt_vt1682_state::vt_vt1682(machine_config &config)
VT_VT1682_IO(config, m_io, 0);
VT_VT1682_UIO(config, m_uio, 0);
- /* video hardware */
- SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
- m_screen->set_refresh_hz(60);
- m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(0));
- m_screen->set_size(300, 262); // 262 for NTSC, might be 261 if Vblank line is changed
- m_screen->set_visarea(0, 256-1, 0, 240-1);
- m_screen->set_screen_update(FUNC(vt_vt1682_state::screen_update));
-
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
@@ -5463,6 +5521,13 @@ void vt_vt1682_state::vt_vt1682(machine_config &config)
rightvref.add_route(0, "rightdac", -1.0, DAC_VREF_NEG_INPUT);
}
+
+void vt_vt1682_state::vt_vt1682(machine_config &config)
+{
+ vt_vt1682_ntscbase(config);
+ vt_vt1682_common(config);
+}
+
void intec_interact_state::machine_start()
{
vt_vt1682_state::machine_start();
@@ -5581,6 +5646,18 @@ static INPUT_PORTS_START( miwi2 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) // Pink Drum in Drum Master
INPUT_PORTS_END
+static INPUT_PORTS_START( 110dance )
+ PORT_START("IN0")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Pad Up-Right")
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Pad Up-Left")
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("Back")
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 ) PORT_NAME("Select / Start")
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_NAME("Pad Up") PORT_16WAY // NOT A JOYSTICK!!
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_NAME("Pad Down") PORT_16WAY
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_NAME("Pad Left") PORT_16WAY
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_NAME("Pad Right") PORT_16WAY
+INPUT_PORTS_END
+
static INPUT_PORTS_START( exsprt48 )
PORT_START("P1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
@@ -5592,7 +5669,7 @@ static INPUT_PORTS_START( exsprt48 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1)
- PORT_START("P2")
+ PORT_START("P2")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)
@@ -5730,7 +5807,8 @@ WRITE8_MEMBER(vt1682_exsport_state::uiob_w)
void intec_interact_state::intech_interact(machine_config& config)
{
- vt_vt1682_state::vt_vt1682(config);
+ vt_vt1682_ntscbase(config);
+ vt_vt1682_common(config);
m_io->porta_in().set(FUNC(intec_interact_state::porta_r));
m_io->porta_out().set(FUNC(intec_interact_state::porta_w));
@@ -5755,6 +5833,20 @@ void intec_interact_state::intech_interact(machine_config& config)
m_rightdac->add_route(0, "mono", 0.5);
}
+
+
+READ8_MEMBER(vt1682_dance_state::uio_porta_r)
+{
+ uint8_t ret = m_io_p1->read();
+ logerror("%s: porta_r returning: %02x (INPUTS)\n", machine().describe_context(), ret);
+ return ret;
+}
+
+WRITE8_MEMBER(vt1682_dance_state::uio_porta_w)
+{
+ logerror("%s: porta_w writing: %02x (INPUTS)\n", machine().describe_context(), data);
+}
+
void intec_interact_state::intech_interact_bank(machine_config& config)
{
intech_interact(config);
@@ -5764,7 +5856,8 @@ void intec_interact_state::intech_interact_bank(machine_config& config)
void vt1682_exsport_state::vt1682_exsport(machine_config& config)
{
- vt_vt1682_state::vt_vt1682(config);
+ vt_vt1682_ntscbase(config);
+ vt_vt1682_common(config);
m_uio->portb_in().set(FUNC(vt1682_exsport_state::uiob_r));
m_uio->portb_out().set(FUNC(vt1682_exsport_state::uiob_w));
@@ -5772,18 +5865,45 @@ void vt1682_exsport_state::vt1682_exsport(machine_config& config)
void vt1682_exsport_state::vt1682_exsportp(machine_config& config)
{
- vt_vt1682_state::vt_vt1682(config);
- // TODO, different clocks, timings etc.!
- m_screen->set_refresh_hz(50);
+ vt_vt1682_palbase(config);
+ vt_vt1682_common(config);
+
+ m_uio->portb_in().set(FUNC(vt1682_exsport_state::uiob_r));
+ m_uio->portb_out().set(FUNC(vt1682_exsport_state::uiob_w));
}
+void vt1682_dance_state::vt1682_dance(machine_config& config)
+{
+ vt_vt1682_palbase(config);
+ vt_vt1682_common(config);
+
+ M6502(config.replace(), m_maincpu, MAIN_CPU_CLOCK_PAL); // no opcode bitswap
+ m_maincpu->set_addrmap(AS_PROGRAM, &vt1682_dance_state::vt_vt1682_map);
+
+ m_leftdac->reset_routes();
+ m_rightdac->reset_routes();
+
+ config.device_remove(":lspeaker");
+ config.device_remove(":rspeaker");
+
+ SPEAKER(config, "mono").front_center();
+ m_leftdac->add_route(0, "mono", 0.5);
+ m_rightdac->add_route(0, "mono", 0.5);
+
+ m_uio->porta_in().set(FUNC(vt1682_dance_state::uio_porta_r));
+ m_uio->porta_out().set(FUNC(vt1682_dance_state::uio_porta_w));
+}
void vt1682_wow_state::vt1682_wow(machine_config& config)
{
- vt1682_exsport_state::vt1682_exsport(config);
+ vt_vt1682_palbase(config);
+ vt_vt1682_common(config);
- M6502_VH2009(config.replace(), m_maincpu, MAIN_CPU_CLOCK_NTSC); // doesn't use the same bitswap as the other VT1682 games...
+ m_uio->portb_in().set(FUNC(vt1682_exsport_state::uiob_r));
+ m_uio->portb_out().set(FUNC(vt1682_exsport_state::uiob_w));
+
+ M6502_SWAP_OP_D5_D6(config.replace(), m_maincpu, MAIN_CPU_CLOCK_NTSC); // doesn't use the same bitswap as the other VT1682 games...
m_maincpu->set_addrmap(AS_PROGRAM, &vt1682_wow_state::vt_vt1682_map);
}
@@ -5851,7 +5971,7 @@ ROM_START( exsprt48 )
ROM_END
// differs by 2 bytes from above, the rasters glitch in MotorStorm in a different way, so it's likely an NTSC/PAL difference?
-ROM_START( exsprt48a )
+ROM_START( itvg48 )
ROM_REGION( 0x2000000, "mainrom", ROMREGION_ERASE00 )
ROM_LOAD( "48in1sports.bin", 0x00000, 0x2000000, CRC(8e490541) SHA1(aeb01b3d7229fc888b36aaa924fe6b10597a7783) )
ROM_END
@@ -5862,6 +5982,10 @@ ROM_START( wowwg )
ROM_RELOAD(0x1000000,0x1000000)
ROM_END
+ROM_START( 110dance )
+ ROM_REGION( 0x2000000, "mainrom", 0 )
+ ROM_LOAD( "110songdancemat.bin", 0x00000, 0x2000000, CRC(cd668e41) SHA1(975bfe05f4cce047860b05766bc8539218f6014f) )
+ROM_END
// TODO: this is a cartridge based system (actually, verify this, it seems some versions simply had built in games) move these to SL if verified as from cartridge config
@@ -5903,13 +6027,12 @@ CONS( 200?, intg5410, 0, 0, intech_interact_bank, miwi2, intec_interact_state
// the timing code for MotorStorm differs between these sets (although fails wiht our emulation in both cases, even if the game runs fine in other collections)
-CONS( 200?, exsprt48, 0, 0, vt1682_exsport, exsprt48, vt1682_exsport_state, regular_init, "Excite", "Excite Sports Wireless Interactive TV Game - 48-in-1 (set 1, NTSC)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND ) // "32 Arcade, 8 Sports, 8 Stadium"
-CONS( 200?, exsprt48a, exsprt48, 0, vt1682_exsportp, exsprt48, vt1682_exsport_state, regular_init, "Excite", "Excite Sports Wireless Interactive TV Game - 48-in-1 (set 2, PAL)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND ) // ^
-
+CONS( 200?, exsprt48, 0, 0, vt1682_exsport, exsprt48, vt1682_exsport_state, regular_init, "Excite", "Excite Sports Wireless Interactive TV Game - 48-in-1 (NTSC)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND ) // "32 Arcade, 8 Sports, 8 Stadium"
+CONS( 200?, itvg48, exsprt48, 0, vt1682_exsportp, exsprt48, vt1682_exsport_state, regular_init, "TaiKee", "Interactive TV Games 48-in-1 (PAL)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND ) // ^
/*
-There is at least one alt US version of this also on VT1682
+There is at least one alt US version of Excite Sports Wireless Interactive TV Game - 48-in-1 also on VT1682
-Still advertised as 48-in-1, 8 Interactive Sports Games, 8 Olympic games, 32 Arcade Games
+It is still advertised as 48-in-1, 8 Interactive Sports Games, 8 Olympic games, 32 Arcade Games
see https://www.youtube.com/watch?v=tHMX71daHAk
Changes:
Dancing as extra under Music
@@ -5919,5 +6042,10 @@ Ball Shoot instead of 'Noshery' under Arcade
This might be a regional / store thing if some places didn't want to sell a unit with a Poker game in it?
*/
-CONS( 200?, wowwg, 0, 0, vt1682_wow, exsprt48, vt1682_wow_state, regular_init, "Wow", "Wow Wireless Gaming", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND) // needs high colour line mode for main menu
-// NJ Pocket 60-in-1 (NJ-250) is meant to have similar games, so might fit here
+// Timings are broken in the Bomberman game ('Explosion') even on real hardware (raster effect to keep status bar in place doesn't work) because the game is still coded to use NTSC timings even if this is a PAL unit. This was fixed in other PAL releases (eg. 110dance)
+// 'Riding Horse' on the other hand actually needs PAL timings, so this unit clearly was designed for PAL regions, however 'Explosion' was left broken.
+CONS( 200?, wowwg, 0, 0, vt1682_wow, exsprt48, vt1682_wow_state, regular_init, "Wow", "Wow Wireless Gaming (PAL)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND) // needs high colour line mode for main menu
+
+CONS( 200?, 110dance, 0, 0, vt1682_dance, 110dance, vt1682_dance_state, regular_init, "<unknown>", "Retro Dance Mat (110 song Super StepMania + 9-in-1 games) (PAL)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND)
+
+// NJ Pocket 60-in-1 (NJ-250) is meant to have similar games to the mini-games found in wowwg and 110dance, so almost certainly fits here
diff --git a/src/mame/drivers/xavix.cpp b/src/mame/drivers/xavix.cpp
index 2acd2c6e5ad..baaf555ce98 100644
--- a/src/mame/drivers/xavix.cpp
+++ b/src/mame/drivers/xavix.cpp
@@ -2543,7 +2543,7 @@ CONS( 2007, domdance, 0, 0, xavix2002_i2c_jmat, xavixp, xavix_i2c_jmat_state, in
CONS( 2005, mrangbat, 0, 0, xavix2002_i2c_mrangbat, mrangbat, xavix_i2c_state, init_xavix, "Bandai / SSD Company LTD", "Mahou Taiketsu Magiranger - Magimat de Dance & Battle (Japan)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND )
-CONS( 2004, epo_tfit, 0, 0, xavix2002_i2c_24c04, epo_tfit, xavix_i2c_state, init_xavix, "Epoch / SSD Company LTD", "Excite Sports Tennis x Fitness (Japan)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND )
+CONS( 2004, epo_tfit, 0, 0, xavix2002_i2c_24c04, epo_tfit, xavix_i2c_state, init_xavix, "Epoch / SSD Company LTD", "Excite Sports Tennis x Fitness (Japan)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND ) // Epoch Tennis and Fitness has 24LC04
// TODO: does it have an SEEPROM? why does it hang? full title?
CONS( 2005, tmy_thom, 0, 0, xavix2002_i2c_24c04, xavix_i2c, xavix_i2c_state, init_xavix, "Tomy / SSD Company LTD", "Thomas and Friends (Tomy)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND )
diff --git a/src/mame/machine/m6502_vt1682.cpp b/src/mame/machine/m6502_swap_op_d2_d7.cpp
index b2d3bec62f8..eab70e43d93 100644
--- a/src/mame/machine/m6502_vt1682.cpp
+++ b/src/mame/machine/m6502_swap_op_d2_d7.cpp
@@ -2,7 +2,7 @@
// copyright-holders:David Shah, David Haywood
/***************************************************************************
- m6502_vt1682.cpp
+ m6502_swap_op_d2_d7.cpp
6502 with instruction scrambling
@@ -15,32 +15,32 @@
***************************************************************************/
#include "emu.h"
-#include "m6502_vt1682.h"
+#include "m6502_swap_op_d2_d7.h"
-DEFINE_DEVICE_TYPE(M6502_VT1682, m6502_vt1682, "m6502_vt1682", "VRT VT1682")
+DEFINE_DEVICE_TYPE(M6502_SWAP_OP_D2_D7, m6502_swap_op_d2_d7, "m6502_swap_op_d2_d7", "M6502 swapped D2/D7")
-m6502_vt1682::m6502_vt1682(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
- m6502_device(mconfig, M6502_VT1682, tag, owner, clock)
+m6502_swap_op_d2_d7::m6502_swap_op_d2_d7(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+ m6502_device(mconfig, M6502_SWAP_OP_D2_D7, tag, owner, clock)
{
}
-void m6502_vt1682::device_start()
+void m6502_swap_op_d2_d7::device_start()
{
mintf = std::make_unique<mi_decrypt>();
init();
}
-void m6502_vt1682::device_reset()
+void m6502_swap_op_d2_d7::device_reset()
{
m6502_device::device_reset();
}
-uint8_t m6502_vt1682::mi_decrypt::descramble(uint8_t op)
+uint8_t m6502_swap_op_d2_d7::mi_decrypt::descramble(uint8_t op)
{
return bitswap<8>(op, 2, 6, 5, 4, 3, 7, 1, 0);
}
-uint8_t m6502_vt1682::mi_decrypt::read_sync(uint16_t adr)
+uint8_t m6502_swap_op_d2_d7::mi_decrypt::read_sync(uint16_t adr)
{
uint8_t res = cache->read_byte(adr);
@@ -49,21 +49,21 @@ uint8_t m6502_vt1682::mi_decrypt::read_sync(uint16_t adr)
return res;
}
-std::unique_ptr<util::disasm_interface> m6502_vt1682::create_disassembler()
+std::unique_ptr<util::disasm_interface> m6502_swap_op_d2_d7::create_disassembler()
{
return std::make_unique<disassembler>(downcast<mi_decrypt *>(mintf.get()));
}
-m6502_vt1682::disassembler::disassembler(mi_decrypt *mi) : mintf(mi)
+m6502_swap_op_d2_d7::disassembler::disassembler(mi_decrypt *mi) : mintf(mi)
{
}
-u32 m6502_vt1682::disassembler::interface_flags() const
+u32 m6502_swap_op_d2_d7::disassembler::interface_flags() const
{
return SPLIT_DECRYPTION;
}
-u8 m6502_vt1682::disassembler::decrypt8(u8 value, offs_t pc, bool opcode) const
+u8 m6502_swap_op_d2_d7::disassembler::decrypt8(u8 value, offs_t pc, bool opcode) const
{
return opcode ? mintf->descramble(value) : value;
}
diff --git a/src/mame/machine/m6502_vh2009.h b/src/mame/machine/m6502_swap_op_d2_d7.h
index a595f283d89..7521ae8fff7 100644
--- a/src/mame/machine/m6502_vh2009.h
+++ b/src/mame/machine/m6502_swap_op_d2_d7.h
@@ -2,23 +2,23 @@
// copyright-holders:David Shah, David Haywood
/***************************************************************************
- m6502_vh2009.h
+ m6502_swap_op_d2_d7.h
6502 with instruction scrambling
***************************************************************************/
-#ifndef MAME_CPU_M6502_VH2009_H
-#define MAME_CPU_M6502_VH2009_H
+#ifndef MAME_M6502_SWAP_OP_D2_D7_H
+#define MAME_M6502_SWAP_OP_D2_D7_H
#pragma once
#include "cpu/m6502/m6502.h"
#include "cpu/m6502/m6502d.h"
-class m6502_vh2009 : public m6502_device {
+class m6502_swap_op_d2_d7 : public m6502_device {
public:
- m6502_vh2009(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ m6502_swap_op_d2_d7(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
protected:
class mi_decrypt : public mi_default {
@@ -48,6 +48,6 @@ protected:
virtual std::unique_ptr<util::disasm_interface> create_disassembler() override;
};
-DECLARE_DEVICE_TYPE(M6502_VH2009, m6502_vh2009)
+DECLARE_DEVICE_TYPE(M6502_SWAP_OP_D2_D7, m6502_swap_op_d2_d7)
-#endif // MAME_CPU_M6502_VH2009_H
+#endif // MAME_M6502_SWAP_OP_D2_D7_H
diff --git a/src/mame/machine/m6502_swap_op_d5_d6.cpp b/src/mame/machine/m6502_swap_op_d5_d6.cpp
new file mode 100644
index 00000000000..32693316f2b
--- /dev/null
+++ b/src/mame/machine/m6502_swap_op_d5_d6.cpp
@@ -0,0 +1,66 @@
+// license:BSD-3-Clause
+// copyright-holders:David Shah, David Haywood
+/***************************************************************************
+
+ m6502_swap_op_d5_d6.cpp
+
+ 6502 with instruction scrambling
+
+ Seen on die marked VH2009, used on polmega, silv35
+ but also elsewhere
+
+***************************************************************************/
+
+#include "emu.h"
+#include "m6502_swap_op_d5_d6.h"
+
+DEFINE_DEVICE_TYPE(M6502_SWAP_OP_D5_D6, m6502_swap_op_d5_d6, "m6502_swap_op_d5_d6", "M6502 swapped D5/D6")
+
+m6502_swap_op_d5_d6::m6502_swap_op_d5_d6(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+ m6502_device(mconfig, M6502_SWAP_OP_D5_D6, tag, owner, clock)
+{
+}
+
+void m6502_swap_op_d5_d6::device_start()
+{
+ mintf = std::make_unique<mi_decrypt>();
+ init();
+}
+
+void m6502_swap_op_d5_d6::device_reset()
+{
+ m6502_device::device_reset();
+}
+
+uint8_t m6502_swap_op_d5_d6::mi_decrypt::descramble(uint8_t op)
+{
+ return bitswap<8>(op, 7, 5, 6, 4, 3, 2, 1, 0);
+}
+
+uint8_t m6502_swap_op_d5_d6::mi_decrypt::read_sync(uint16_t adr)
+{
+ uint8_t res = cache->read_byte(adr);
+
+ res = descramble(res);
+
+ return res;
+}
+
+std::unique_ptr<util::disasm_interface> m6502_swap_op_d5_d6::create_disassembler()
+{
+ return std::make_unique<disassembler>(downcast<mi_decrypt *>(mintf.get()));
+}
+
+m6502_swap_op_d5_d6::disassembler::disassembler(mi_decrypt *mi) : mintf(mi)
+{
+}
+
+u32 m6502_swap_op_d5_d6::disassembler::interface_flags() const
+{
+ return SPLIT_DECRYPTION;
+}
+
+u8 m6502_swap_op_d5_d6::disassembler::decrypt8(u8 value, offs_t pc, bool opcode) const
+{
+ return opcode ? mintf->descramble(value) : value;
+}
diff --git a/src/mame/machine/m6502_vt1682.h b/src/mame/machine/m6502_swap_op_d5_d6.h
index 54f38d20bc2..efcd4a69c17 100644
--- a/src/mame/machine/m6502_vt1682.h
+++ b/src/mame/machine/m6502_swap_op_d5_d6.h
@@ -2,23 +2,23 @@
// copyright-holders:David Shah, David Haywood
/***************************************************************************
- m6502_vt1682.h
+ m6502_swap_op_d5_d6.h
6502 with instruction scrambling
***************************************************************************/
-#ifndef MAME_CPU_M6502_VT1682_H
-#define MAME_CPU_M6502_VT1682_H
+#ifndef MAME_M6502_SWAP_OP_D5_D6_H
+#define MAME_M6502_SWAP_OP_D5_D6_H
#pragma once
#include "cpu/m6502/m6502.h"
#include "cpu/m6502/m6502d.h"
-class m6502_vt1682 : public m6502_device {
+class m6502_swap_op_d5_d6 : public m6502_device {
public:
- m6502_vt1682(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ m6502_swap_op_d5_d6(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
protected:
class mi_decrypt : public mi_default {
@@ -48,6 +48,6 @@ protected:
virtual std::unique_ptr<util::disasm_interface> create_disassembler() override;
};
-DECLARE_DEVICE_TYPE(M6502_VT1682, m6502_vt1682)
+DECLARE_DEVICE_TYPE(M6502_SWAP_OP_D5_D6, m6502_swap_op_d5_d6)
-#endif // MAME_CPU_M6502_VT1682_H
+#endif // MAME_M6502_SWAP_OP_D5_D6_H
diff --git a/src/mame/machine/m6502_vh2009.cpp b/src/mame/machine/m6502_vh2009.cpp
deleted file mode 100644
index baece78e478..00000000000
--- a/src/mame/machine/m6502_vh2009.cpp
+++ /dev/null
@@ -1,65 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:David Shah, David Haywood
-/***************************************************************************
-
- m6502_vh2009.cpp
-
- 6502 with instruction scrambling
-
- Die is marked VH2009, used on polmega, silv35
-
-***************************************************************************/
-
-#include "emu.h"
-#include "m6502_vh2009.h"
-
-DEFINE_DEVICE_TYPE(M6502_VH2009, m6502_vh2009, "m6502_vh2009", "VRT VH2009")
-
-m6502_vh2009::m6502_vh2009(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
- m6502_device(mconfig, M6502_VH2009, tag, owner, clock)
-{
-}
-
-void m6502_vh2009::device_start()
-{
- mintf = std::make_unique<mi_decrypt>();
- init();
-}
-
-void m6502_vh2009::device_reset()
-{
- m6502_device::device_reset();
-}
-
-uint8_t m6502_vh2009::mi_decrypt::descramble(uint8_t op)
-{
- return bitswap<8>(op, 7, 5, 6, 4, 3, 2, 1, 0);
-}
-
-uint8_t m6502_vh2009::mi_decrypt::read_sync(uint16_t adr)
-{
- uint8_t res = cache->read_byte(adr);
-
- res = descramble(res);
-
- return res;
-}
-
-std::unique_ptr<util::disasm_interface> m6502_vh2009::create_disassembler()
-{
- return std::make_unique<disassembler>(downcast<mi_decrypt *>(mintf.get()));
-}
-
-m6502_vh2009::disassembler::disassembler(mi_decrypt *mi) : mintf(mi)
-{
-}
-
-u32 m6502_vh2009::disassembler::interface_flags() const
-{
- return SPLIT_DECRYPTION;
-}
-
-u8 m6502_vh2009::disassembler::decrypt8(u8 value, offs_t pc, bool opcode) const
-{
- return opcode ? mintf->descramble(value) : value;
-}
diff --git a/src/mame/mame.lst b/src/mame/mame.lst
index e9e228ff56d..9e91548cc07 100644
--- a/src/mame/mame.lst
+++ b/src/mame/mame.lst
@@ -31345,6 +31345,7 @@ lxcmc250
lxcmcysw
lxcmcyfz
lxcmcydp
+rtvgc300
red5mam
cybar120
mc_dg101
@@ -31385,6 +31386,7 @@ sy889
sy888b
rfcp168
dgun2573
+dgun2593
bittboy
mc_89in1
mc_cb280
@@ -31410,8 +31412,9 @@ miwi2_7
intact89
intg5410
exsprt48
-exsprt48a
+itvg48
wowwg
+110dance
@source:newbrain.cpp
newbrain //