summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers
diff options
context:
space:
mode:
author David Haywood <28625134+DavidHaywood@users.noreply.github.com>2020-10-24 15:27:22 +0100
committer GitHub <noreply@github.com>2020-10-25 01:27:22 +1100
commit07ab3966ebe1ced0eb98950b870a6d8ab8740990 (patch)
tree5d57778707886a81bda4e45fa7c49a3d64f63235 /src/mame/drivers
parentb19f826d18272dfe93a296bbdc9f7f1a65353744 (diff)
nes_vt - further refactoring, split out vt32 driver, started splitting up SoC + Atari Flashback Mini 7800 promotion (#7385)
machines promoted to WORKING ------ Atari Flashback Mini 7800 [David Haywood, Sean Riddle]
Diffstat (limited to 'src/mame/drivers')
-rw-r--r--src/mame/drivers/nes_clone.cpp550
-rw-r--r--src/mame/drivers/nes_vt09.cpp2
-rw-r--r--src/mame/drivers/nes_vt32.cpp362
-rw-r--r--src/mame/drivers/nes_vt32_vt369.cpp971
-rw-r--r--src/mame/drivers/nes_vt369_vtunknown.cpp868
5 files changed, 1766 insertions, 987 deletions
diff --git a/src/mame/drivers/nes_clone.cpp b/src/mame/drivers/nes_clone.cpp
index c3eabd82d3b..acbf5f2063f 100644
--- a/src/mame/drivers/nes_clone.cpp
+++ b/src/mame/drivers/nes_clone.cpp
@@ -11,6 +11,7 @@
#include "emupal.h"
#include "screen.h"
#include "speaker.h"
+#include "machine/bankdev.h"
class nes_clone_state : public driver_device
{
@@ -52,9 +53,10 @@ protected:
uint8_t m_latch0;
uint8_t m_latch1;
-private:
required_device<ppu2c0x_device> m_ppu;
+private:
+
void nes_clone_map(address_map &map);
};
@@ -109,6 +111,85 @@ private:
int m_rombase;
};
+
+class nes_clone_afbm7800_state : public nes_clone_state
+{
+public:
+ nes_clone_afbm7800_state(const machine_config& mconfig, device_type type, const char* tag) :
+ nes_clone_state(mconfig, type, tag),
+ m_prgbank(*this, "prgbank%u", 0),
+ m_cbank(*this, "cbank%u", 0),
+ m_nametables(*this, "nametable%u", 0),
+ m_charbank(*this, "charbank"),
+ m_ntbank(*this, "ntbank"),
+ m_rom_solderpad_bank(*this, "rom_sldpad_bank")
+ { }
+ void nes_clone_afbm7800(machine_config& config);
+
+protected:
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
+
+private:
+ // configured at startup
+ uint8_t m_maxchrbank;
+
+ void nes_clone_afbm7800_map(address_map &map);
+
+ void mapper_6000_w(uint8_t data);
+ void mapper_6001_w(uint8_t data);
+ void mapper_6002_w(uint8_t data);
+ void mapper_6003_w(uint8_t data);
+
+ void mapper_8000_w(uint8_t data);
+ void mapper_8001_w(uint8_t data);
+ void mapper_a000_w(uint8_t data);
+ void mapper_a001_w(uint8_t data);
+ void mapper_c000_w(uint8_t data);
+ void mapper_c001_w(uint8_t data);
+ void mapper_e000_w(uint8_t data);
+ void mapper_e001_w(uint8_t data);
+
+ uint8_t solderpad_r(offs_t offset);
+
+ uint8_t vram_r(offs_t offset);
+ void vram_w(offs_t offset, uint8_t data);
+
+ uint8_t m_banksel;
+ uint8_t m_bankregs[8];
+ uint8_t m_extraregs[4];
+
+ void update_banks();
+ void multigam3_mmc3_scanline_cb(int scanline, int vblank, int blanked);
+ int16_t m_multigam3_mmc3_scanline_counter;
+ uint8_t m_multigam3_mmc3_scanline_latch;
+ uint8_t m_mmc3_irq_enable;
+
+ std::vector<u8> m_vram;
+
+ uint8_t m_ntmirror;
+ uint8_t m_ramprot;
+
+ void update_nt_mirroring();
+ std::vector<u8> m_nt_ram;
+
+ void multigam_nt_w(offs_t offset, uint8_t data);
+ uint8_t multigam_nt_r(offs_t offset);
+
+ void vram_map(address_map &map);
+ void ntram_map(address_map &map);
+ void romarea_map(address_map &map);
+
+ required_memory_bank_array<4> m_prgbank;
+ required_memory_bank_array<6> m_cbank;
+ required_memory_bank_array<4> m_nametables;
+
+ required_device<address_map_bank_device> m_charbank;
+ required_device<address_map_bank_device> m_ntbank;
+ required_device<address_map_bank_device> m_rom_solderpad_bank;
+};
+
+
void nes_clone_state::sprite_dma_w(address_space &space, uint8_t data)
{
int source = (data & 7);
@@ -243,15 +324,6 @@ void nes_clone_state::machine_start()
save_item(NAME(m_latch1));
}
-// 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_clone_state::nes_clone_nt_r)), write8_delegate(*this, FUNC(nes_clone_state::nes_clone_nt_w)));
-// m_ppu->space(AS_PROGRAM).install_read_bank(0x0000, 0x1fff, "bank1");
-// membank("bank1")->set_base(memregion("gfx1")->base());
void nes_clone_state::nes_clone(machine_config &config)
{
@@ -299,6 +371,10 @@ void nes_clone_state::nes_clone_pal(machine_config &config)
m_maincpu->add_route(ALL_OUTPUTS, "mono", 0.50);
}
+/**************************************************
+ Dance 2000 Specifics
+**************************************************/
+
void nes_clone_dnce2000_state::nes_clone_dnce2000(machine_config& config)
{
nes_clone_pal(config);
@@ -333,6 +409,10 @@ void nes_clone_dnce2000_state::bank_w(uint8_t data)
m_rombase = data;
}
+/**************************************************
+ Virtual Ping Pong Specifics
+**************************************************/
+
void nes_clone_vtvppong_state::nes_clone_vtvppong(machine_config& config)
{
nes_clone_pal(config);
@@ -345,6 +425,444 @@ void nes_clone_vtvppong_state::nes_clone_vtvppong_map(address_map& map)
map(0x8000, 0xffff).rom().region("maincpu", 0x38000);
}
+/**************************************************
+ Atari Flashback Specifics
+**************************************************/
+
+void nes_clone_afbm7800_state::nes_clone_afbm7800(machine_config& config)
+{
+ nes_clone_pal(config);
+ m_maincpu->set_addrmap(AS_PROGRAM, &nes_clone_afbm7800_state::nes_clone_afbm7800_map);
+
+ ADDRESS_MAP_BANK(config, "charbank").set_map(&nes_clone_afbm7800_state::vram_map).set_options(ENDIANNESS_NATIVE, 8, 14, 0x2000);
+ ADDRESS_MAP_BANK(config, "ntbank").set_map(&nes_clone_afbm7800_state::ntram_map).set_options(ENDIANNESS_NATIVE, 8, 12, 0x1000);
+ ADDRESS_MAP_BANK(config, "rom_sldpad_bank").set_map(&nes_clone_afbm7800_state::romarea_map).set_options(ENDIANNESS_NATIVE, 8, 16, 0x8000);
+
+}
+
+void nes_clone_afbm7800_state::update_banks()
+{
+ uint8_t innerbankmask;
+ uint8_t outerbank;
+
+ uint8_t selected_banks[4] = { 0x00, 0x00, 0x00, 0x00 };
+
+ if (m_extraregs[1] & 1) // ROM or solder pad select
+ {
+ m_rom_solderpad_bank->set_bank(1);
+ }
+ else
+ {
+ m_rom_solderpad_bank->set_bank(0);
+ }
+
+ if (m_extraregs[0] & 0x40)
+ {
+ innerbankmask = 0x0f;
+ outerbank = (m_extraregs[0] & 0x07) << 4;
+ }
+ else
+ {
+ innerbankmask = 0x1f;
+ outerbank = (m_extraregs[0] & 0x06) << 4;
+ }
+
+ if ((m_extraregs[3] & 0x03) == 0x00) // MMC3 style mode
+ {
+ selected_banks[1] = outerbank | (m_bankregs[7] & innerbankmask);
+ selected_banks[3] = outerbank | (0x1f & innerbankmask);
+
+ if (m_banksel & 0x40)
+ {
+ selected_banks[0] = outerbank | (0x1e & innerbankmask);
+ selected_banks[2] = outerbank | (m_bankregs[6] & innerbankmask);
+
+ }
+ else
+ {
+ selected_banks[0] = outerbank | (m_bankregs[6] & innerbankmask);
+ selected_banks[2] = outerbank | (0x1e & innerbankmask);
+ }
+ }
+ else if ((m_extraregs[3] & 0x03) == 0x03)
+ {
+ int basebank = (m_bankregs[6] & innerbankmask);
+
+ selected_banks[0] = outerbank | (basebank + 0);
+ selected_banks[1] = outerbank | (basebank + 1);
+ selected_banks[2] = outerbank | (basebank + 2);
+ selected_banks[3] = outerbank | (basebank + 3);
+ }
+ else // 01 and 02 cases
+ {
+ int basebank = (m_bankregs[6] & innerbankmask);
+
+ selected_banks[0] = outerbank | (basebank + 0);
+ selected_banks[1] = outerbank | (basebank + 1);
+ selected_banks[2] = outerbank | (basebank + 0);
+ selected_banks[3] = outerbank | (basebank + 1);
+ }
+
+ m_prgbank[0]->set_entry(selected_banks[0]);
+ m_prgbank[1]->set_entry(selected_banks[1]);
+ m_prgbank[2]->set_entry(selected_banks[2]);
+ m_prgbank[3]->set_entry(selected_banks[3]);
+
+ // chrbank stuff
+
+ uint8_t selected_chrbanks[6] = { 0x00, 0x02, 0x04, 0x05, 0x06, 0x07 };
+
+ if (m_extraregs[3] & 0x10)
+ {
+ int outerchrbank = m_extraregs[2] & 0xf;
+ m_charbank->set_bank(0);
+
+ // should also have m_extraregs[0] & 0x38) applied?
+
+ selected_chrbanks[0] = (outerchrbank << 3) | 0x0;
+ selected_chrbanks[1] = (outerchrbank << 3) | 0x2;
+ selected_chrbanks[2] = (outerchrbank << 3) | 0x4;
+ selected_chrbanks[3] = (outerchrbank << 3) | 0x5;
+ selected_chrbanks[4] = (outerchrbank << 3) | 0x6;
+ selected_chrbanks[5] = (outerchrbank << 3) | 0x7;
+ }
+ else // MMC3 mode
+ {
+ int bankmask;
+ int outerchrbank;
+
+ /* not correct? desert falcon
+ if (m_extraregs[0] & 0x80)
+ {
+ bankmask = 0x0f;
+ outerchrbank = (m_extraregs[0] & 0x38) << 1;
+ }
+ else
+ */
+ {
+ bankmask = 0x1f;
+ outerchrbank = (m_extraregs[0] & 0x30) << 1;
+ }
+
+ if (m_banksel & 0x80)
+ m_charbank->set_bank(1);
+ else
+ m_charbank->set_bank(0);
+
+ selected_chrbanks[0] = (outerchrbank | (m_bankregs[0] & bankmask));
+ selected_chrbanks[1] = (outerchrbank | (m_bankregs[1] & bankmask));
+ selected_chrbanks[2] = (outerchrbank | (m_bankregs[2] & bankmask));
+ selected_chrbanks[3] = (outerchrbank | (m_bankregs[3] & bankmask));
+ selected_chrbanks[4] = (outerchrbank | (m_bankregs[4] & bankmask));
+ selected_chrbanks[5] = (outerchrbank | (m_bankregs[5] & bankmask));
+ }
+
+ // have to mask with m_maxchrbank because otherwise banks are set at 0x40 (would lower banks atually be chrrom?)
+ m_cbank[0]->set_entry((selected_chrbanks[0] & m_maxchrbank)>>1);
+ m_cbank[1]->set_entry((selected_chrbanks[1] & m_maxchrbank)>>1);
+ m_cbank[2]->set_entry((selected_chrbanks[2] & m_maxchrbank));
+ m_cbank[3]->set_entry((selected_chrbanks[3] & m_maxchrbank));
+ m_cbank[4]->set_entry((selected_chrbanks[4] & m_maxchrbank));
+ m_cbank[5]->set_entry((selected_chrbanks[5] & m_maxchrbank));
+
+}
+
+void nes_clone_afbm7800_state::update_nt_mirroring()
+{
+ if (m_ntmirror & 1)
+ {
+ m_nametables[0]->set_entry(0);
+ m_nametables[1]->set_entry(0);
+ m_nametables[2]->set_entry(1);
+ m_nametables[3]->set_entry(1);
+ }
+ else
+ {
+ m_nametables[0]->set_entry(0);
+ m_nametables[1]->set_entry(1);
+ m_nametables[2]->set_entry(0);
+ m_nametables[3]->set_entry(1);
+ }
+}
+
+void nes_clone_afbm7800_state::mapper_8000_w(uint8_t data)
+{
+ m_banksel = data;
+ update_banks();
+}
+
+void nes_clone_afbm7800_state::mapper_8001_w(uint8_t data)
+{
+ m_bankregs[m_banksel & 0x7] = data;
+ update_banks();
+}
+
+void nes_clone_afbm7800_state::mapper_a000_w(uint8_t data)
+{
+ // nametable mirroring
+ m_ntmirror = data;
+ update_nt_mirroring();
+}
+
+void nes_clone_afbm7800_state::mapper_a001_w(uint8_t data)
+{
+ // ram protect
+ m_ramprot = data;
+}
+
+void nes_clone_afbm7800_state::mapper_c000_w(uint8_t data)
+{
+ // irq latch
+ m_multigam3_mmc3_scanline_counter = data ^ 0xff;
+}
+
+void nes_clone_afbm7800_state::mapper_c001_w(uint8_t data)
+{
+ // irq reload
+ m_multigam3_mmc3_scanline_latch = data;
+}
+
+void nes_clone_afbm7800_state::mapper_e000_w(uint8_t data)
+{
+ // irq disable
+ m_maincpu->set_input_line(M6502_IRQ_LINE, CLEAR_LINE);
+ m_mmc3_irq_enable = 0;
+}
+
+void nes_clone_afbm7800_state::mapper_e001_w(uint8_t data)
+{
+ // irq enable
+ m_mmc3_irq_enable = 1;
+}
+
+
+
+void nes_clone_afbm7800_state::multigam3_mmc3_scanline_cb( int scanline, int vblank, int blanked )
+{
+ if (m_mmc3_irq_enable)
+ {
+ if (!vblank && !blanked)
+ {
+ if (--m_multigam3_mmc3_scanline_counter == -1)
+ {
+ m_multigam3_mmc3_scanline_counter = m_multigam3_mmc3_scanline_latch;
+ m_maincpu->set_input_line(M6502_IRQ_LINE, ASSERT_LINE);
+ }
+ }
+ }
+}
+
+
+
+void nes_clone_afbm7800_state::mapper_6000_w(uint8_t data)
+{
+ if (m_ramprot & 0x80)
+ {
+ if (!(m_extraregs[3] & 0x80))
+ {
+ m_extraregs[0] = data;
+ update_banks();
+ }
+ }
+}
+
+void nes_clone_afbm7800_state::mapper_6001_w(uint8_t data)
+{
+ if (m_ramprot & 0x80)
+ {
+ m_extraregs[1] = data;
+ update_banks();
+ }
+}
+
+void nes_clone_afbm7800_state::mapper_6002_w(uint8_t data)
+{
+ if (m_ramprot & 0x80)
+ {
+ m_extraregs[2] = data;
+ update_banks();
+ }
+}
+
+void nes_clone_afbm7800_state::mapper_6003_w(uint8_t data)
+{
+ if (m_ramprot & 0x80)
+ {
+ if (!(m_extraregs[3] & 0x80))
+ {
+ m_extraregs[3] = data;
+ update_banks();
+ }
+ }
+}
+
+void nes_clone_afbm7800_state::nes_clone_afbm7800_map(address_map &map)
+{
+ nes_clone_basemap(map);
+
+ map(0x6000, 0x6000).mirror(0x1ffc).w(FUNC(nes_clone_afbm7800_state::mapper_6000_w));
+ map(0x6001, 0x6001).mirror(0x1ffc).w(FUNC(nes_clone_afbm7800_state::mapper_6001_w));
+ map(0x6002, 0x6002).mirror(0x1ffc).w(FUNC(nes_clone_afbm7800_state::mapper_6002_w));
+ map(0x6003, 0x6003).mirror(0x1ffc).w(FUNC(nes_clone_afbm7800_state::mapper_6003_w));
+
+ map(0x8000, 0xffff).m(m_rom_solderpad_bank, FUNC(address_map_bank_device::amap8));
+
+ map(0x8000, 0x8000).mirror(0x1ffe).w(FUNC(nes_clone_afbm7800_state::mapper_8000_w));
+ map(0x8001, 0x8001).mirror(0x1ffe).w(FUNC(nes_clone_afbm7800_state::mapper_8001_w));
+ map(0xa000, 0xa000).mirror(0x1ffe).w(FUNC(nes_clone_afbm7800_state::mapper_a000_w));
+ map(0xa001, 0xa001).mirror(0x1ffe).w(FUNC(nes_clone_afbm7800_state::mapper_a001_w));
+ map(0xc000, 0xc000).mirror(0x1ffe).w(FUNC(nes_clone_afbm7800_state::mapper_c000_w));
+ map(0xc001, 0xc001).mirror(0x1ffe).w(FUNC(nes_clone_afbm7800_state::mapper_c001_w));
+ map(0xe000, 0xe000).mirror(0x1ffe).w(FUNC(nes_clone_afbm7800_state::mapper_e000_w));
+ map(0xe001, 0xe001).mirror(0x1ffe).w(FUNC(nes_clone_afbm7800_state::mapper_e001_w));
+}
+
+uint8_t nes_clone_afbm7800_state::solderpad_r(offs_t offset)
+{
+ logerror("%s: solderpad read\n", machine().describe_context());
+ return 0x00;
+}
+
+void nes_clone_afbm7800_state::romarea_map(address_map &map)
+{
+ // when (m_extraregs[1] & 1) == 1
+ map(0x0000, 0x1fff).bankr("prgbank0");
+ map(0x2000, 0x3fff).bankr("prgbank1");
+ map(0x4000, 0x5fff).bankr("prgbank2");
+ map(0x6000, 0x7fff).bankr("prgbank3");
+
+ // when (m_extraregs[1] & 1) == 1
+
+ map(0x8000, 0xffff).r(FUNC(nes_clone_afbm7800_state::solderpad_r));
+
+}
+
+void nes_clone_afbm7800_state::vram_map(address_map &map)
+{
+ // in MMC3 mode when (m_banksel & 0x80) == 0x00 or when not in MMC3 mode
+ map(0x0000, 0x07ff).bankrw("cbank0");
+ map(0x0800, 0x0fff).bankrw("cbank1");
+ map(0x1000, 0x13ff).bankrw("cbank2");
+ map(0x1400, 0x17ff).bankrw("cbank3");
+ map(0x1800, 0x1bff).bankrw("cbank4");
+ map(0x1c00, 0x1fff).bankrw("cbank5");
+
+ // in MMC3 mode when (m_banksel & 0x80) == 0x80
+ map(0x2000, 0x23ff).bankrw("cbank2");
+ map(0x2400, 0x27ff).bankrw("cbank3");
+ map(0x2800, 0x2bff).bankrw("cbank4");
+ map(0x2c00, 0x2fff).bankrw("cbank5");
+ map(0x3000, 0x37ff).bankrw("cbank0");
+ map(0x3800, 0x3fff).bankrw("cbank1");
+}
+
+void nes_clone_afbm7800_state::ntram_map(address_map& map)
+{
+ map(0x0000, 0x03ff).bankrw("nametable0");
+ map(0x0400, 0x07ff).bankrw("nametable1");
+ map(0x0800, 0x0bff).bankrw("nametable2");
+ map(0x0c00, 0x0fff).bankrw("nametable3");
+}
+
+void nes_clone_afbm7800_state::machine_reset()
+{
+ nes_clone_state::machine_reset();
+
+ m_banksel = 0;
+
+ m_bankregs[0] = 0x00;
+ m_bankregs[1] = 0x00;
+ m_bankregs[2] = 0x00;
+ m_bankregs[3] = 0x00;
+ m_bankregs[4] = 0x00;
+ m_bankregs[5] = 0x00;
+ m_bankregs[6] = 0x00;
+ m_bankregs[7] = 0x00;
+
+ m_extraregs[0] = 0x00;
+ m_extraregs[1] = 0x00;
+ m_extraregs[2] = 0x00;
+ m_extraregs[3] = 0x00;
+
+ m_ntmirror = 0;
+ m_ramprot = 0;
+
+ update_banks();
+ update_nt_mirroring();
+
+ m_multigam3_mmc3_scanline_counter = 0;
+ m_multigam3_mmc3_scanline_latch = 0;
+ m_mmc3_irq_enable = 0;
+}
+
+uint8_t nes_clone_afbm7800_state::vram_r(offs_t offset)
+{
+ return m_charbank->read8(offset);
+}
+
+void nes_clone_afbm7800_state::vram_w(offs_t offset, uint8_t data)
+{
+ m_charbank->write8(offset, data);
+}
+
+uint8_t nes_clone_afbm7800_state::multigam_nt_r(offs_t offset)
+{
+ return m_ntbank->read8(offset);
+}
+
+void nes_clone_afbm7800_state::multigam_nt_w(offs_t offset, uint8_t data)
+{
+ m_ntbank->write8(offset, data);
+}
+
+void nes_clone_afbm7800_state::machine_start()
+{
+ nes_clone_state::machine_start();
+
+
+ uint8_t* ROM = memregion("maincpu")->base();
+
+ for (int i = 0; i < 4; i++)
+ m_prgbank[i]->configure_entries(0, 0x100000 / 0x2000, &ROM[0x00000], 0x02000);
+
+ m_vram.resize(0x8000);
+
+ m_maxchrbank = (0x8000/0x400)-1;
+
+ for (int i = 0; i < 2; i++)
+ m_cbank[i]->configure_entries(0, 0x8000 / 0x800, &m_vram[0], 0x800);
+
+ for (int i = 2; i < 6; i++)
+ m_cbank[i]->configure_entries(0, 0x8000 / 0x400, &m_vram[0], 0x400);
+
+ m_nt_ram.resize(0x800);
+
+ for (int i = 0; i < 4; i++)
+ m_nametables[i]->configure_entries(0, 0x800 / 0x400, &m_nt_ram[0], 0x400);
+
+ m_ppu->space(AS_PROGRAM).install_readwrite_handler(0x0000, 0x1fff, read8sm_delegate(*this, FUNC(nes_clone_afbm7800_state::vram_r)), write8sm_delegate(*this, FUNC(nes_clone_afbm7800_state::vram_w)));
+ m_ppu->set_scanline_callback(*this, FUNC(nes_clone_afbm7800_state::multigam3_mmc3_scanline_cb));
+
+ m_ppu->space(AS_PROGRAM).install_readwrite_handler(0x2000, 0x3eff, read8sm_delegate(*this, FUNC(nes_clone_afbm7800_state::multigam_nt_r)), write8sm_delegate(*this, FUNC(nes_clone_afbm7800_state::multigam_nt_w)));
+
+ save_item(NAME(m_vram));
+ save_item(NAME(m_nt_ram));
+
+ save_item(NAME(m_multigam3_mmc3_scanline_counter));
+ save_item(NAME(m_multigam3_mmc3_scanline_latch));
+ save_item(NAME(m_mmc3_irq_enable));
+
+ save_item(NAME(m_ntmirror));
+ save_item(NAME(m_ramprot));
+
+ save_item(NAME(m_banksel));
+ save_item(NAME(m_bankregs));
+ save_item(NAME(m_extraregs));
+}
+
+/**************************************************
+ Sudoku Specifics
+**************************************************/
void nes_clone_suduko_state::machine_reset()
{
@@ -475,13 +993,10 @@ void nes_clone_state::init_nes_clone()
{
}
-CONS( 200?, pjoypj001, 0, 0, nes_clone, nes_clone, nes_clone_state, init_nes_clone, "Trump Grand", "PowerJoy (PJ001, NES based plug & play)", MACHINE_NOT_WORKING )
+// aka 'Atari Flashback' or 'Atari Flashback 1'
// "Flashback Mini 7800 uses normal NES-style hardware, together with a mapper chipset similar to the Waixing kk33xx cartridges (NES 2.0 Mapper 534)"
-CONS( 2004, afbm7800, 0, 0, nes_clone, nes_clone, nes_clone_state, init_nes_clone, "Atari", "Atari Flashback Mini 7800", MACHINE_NOT_WORKING )
-
-CONS( 200?, vtvppong, 0, 0, nes_clone_vtvppong, nes_clone, nes_clone_vtvppong_state, init_vtvppong, "<unknown>", "Virtual TV Ping Pong", MACHINE_NOT_WORKING )
-
+CONS( 2004, afbm7800, 0, 0, nes_clone_afbm7800, nes_clone, nes_clone_afbm7800_state, init_nes_clone, "Atari / Nice Code", "Atari Flashback Mini 7800", 0 )
CONS( 200?, dnce2000, 0, 0, nes_clone_dnce2000, dnce2000, nes_clone_dnce2000_state, init_nes_clone, "Shenzhen Soyin Electric Appliance Ind. Co., Ltd.", "Dance 2000 / Hot 2000 (Jin Bao TV Dancing Carpet, SY-2000-04)", 0 )
@@ -489,3 +1004,8 @@ CONS( 200?, dnce2000, 0, 0, nes_clone_dnce2000, dnce2000, nes_clone_dnce2000_sta
// Has 2 sets of 4 buttons in circular 'direction pad' layouts (on the left for directions, on the right for functions) and 9 red numbered buttons with red power LED on left of them, and reset button on right
// Alt. version was released with 'New York Times' titlescreen
CONS( 200?, papsudok, 0, 0, nes_clone_suduko, papsudok, nes_clone_suduko_state, init_sudoku, "Nice Code", "Plug and Play Sudoku Game (NES based)", 0 ) // plays, but unclear how 'save' feature is meant to work, is it meant to save after shutdown or not? no obvious writes
+
+CONS( 200?, vtvppong, 0, 0, nes_clone_vtvppong, nes_clone, nes_clone_vtvppong_state, init_vtvppong, "<unknown>", "Virtual TV Ping Pong", MACHINE_NOT_WORKING )
+
+
+CONS( 200?, pjoypj001, 0, 0, nes_clone, nes_clone, nes_clone_state, init_nes_clone, "Trump Grand", "PowerJoy (PJ001, NES based plug & play)", MACHINE_NOT_WORKING )
diff --git a/src/mame/drivers/nes_vt09.cpp b/src/mame/drivers/nes_vt09.cpp
index 4efafdb6a60..21ab4710208 100644
--- a/src/mame/drivers/nes_vt09.cpp
+++ b/src/mame/drivers/nes_vt09.cpp
@@ -18,7 +18,7 @@
***************************************************************************/
#include "emu.h"
-#include "machine/nes_vt_soc.h"
+#include "machine/nes_vt09_soc.h"
class nes_vt09_common_base_state : public driver_device
{
diff --git a/src/mame/drivers/nes_vt32.cpp b/src/mame/drivers/nes_vt32.cpp
new file mode 100644
index 00000000000..1e1f52a97ae
--- /dev/null
+++ b/src/mame/drivers/nes_vt32.cpp
@@ -0,0 +1,362 @@
+// license:BSD-3-Clause
+// copyright-holders:David Haywood
+/***************************************************************************
+
+ nes_vt32.cpp
+
+ VT32
+
+ - new 444 palette mode
+ - backwards compatibility with mappers other than MMC3
+
+ ***************************************************************************/
+
+#include "emu.h"
+#include "machine/nes_vt369_vtunknown_soc.h"
+#include "machine/nes_vt32_soc.h"
+
+class nes_vt32_base_state : public driver_device
+{
+public:
+ nes_vt32_base_state(const machine_config& mconfig, device_type type, const char* tag) :
+ driver_device(mconfig, type, tag),
+ m_io0(*this, "IO0"),
+ m_io1(*this, "IO1"),
+ m_cartsel(*this, "CARTSEL"),
+ m_exin(*this, "EXTRAIN%u", 0U),
+ m_prgrom(*this, "mainrom")
+ { }
+
+protected:
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
+
+ virtual uint8_t in0_r();
+ virtual uint8_t in1_r();
+ virtual void in0_w(uint8_t data);
+
+ void nes_vt32_map(address_map& map);
+
+ optional_ioport m_io0;
+ optional_ioport m_io1;
+
+ uint8_t m_latch0;
+ uint8_t m_latch1;
+ uint8_t m_previous_port0;
+
+ optional_ioport m_cartsel;
+ optional_ioport_array<4> m_exin;
+
+ /* Misc */
+ uint32_t m_ahigh; // external banking bits
+ uint8_t m_4242;
+ uint8_t m_411c;
+ uint8_t m_411d;
+
+ required_region_ptr<uint8_t> m_prgrom;
+
+ uint8_t vt_rom_r(offs_t offset);
+ void vtspace_w(offs_t offset, uint8_t data);
+
+ void configure_soc(nes_vt02_vt03_soc_device* soc);
+
+ uint8_t upper_412c_r();
+ uint8_t upper_412d_r();
+ void upper_412c_w(uint8_t data);
+
+private:
+ /* Extra IO */
+ template <uint8_t NUM> uint8_t extrain_r();
+};
+
+class nes_vt32_state : public nes_vt32_base_state
+{
+public:
+ nes_vt32_state(const machine_config& mconfig, device_type type, const char* tag) :
+ nes_vt32_base_state(mconfig, type, tag),
+ m_soc(*this, "soc")
+ { }
+
+ void vt_external_space_map_32mbyte(address_map& map);
+
+protected:
+ required_device<nes_vt02_vt03_soc_device> m_soc;
+};
+
+class nes_vt32_unk_state : public nes_vt32_state
+{
+public:
+ nes_vt32_unk_state(const machine_config& mconfig, device_type type, const char* tag) :
+ nes_vt32_state(mconfig, type, tag)
+ { }
+
+ void nes_vt32_fp(machine_config& config);
+ void nes_vt32_32mb(machine_config& config);
+ void nes_vt32_4x16mb(machine_config& config);
+
+ void nes_vt32_pal_32mb(machine_config& config);
+
+private:
+ uint8_t vt_rom_banked_r(offs_t offset);
+ void vt_external_space_map_fp_2x32mbyte(address_map& map);
+
+ uint8_t fcpocket_412d_r();
+ void fcpocket_412c_w(uint8_t data);
+};
+
+uint8_t nes_vt32_base_state::vt_rom_r(offs_t offset)
+{
+ return m_prgrom[offset];
+}
+
+void nes_vt32_base_state::vtspace_w(offs_t offset, uint8_t data)
+{
+ logerror("%s: vtspace_w %08x : %02x", machine().describe_context(), offset, data);
+}
+
+// VTxx can address 25-bit address space (32MB of ROM) so use maps with mirroring in depending on ROM size
+void nes_vt32_state::vt_external_space_map_32mbyte(address_map &map)
+{
+ map(0x0000000, 0x1ffffff).r(FUNC(nes_vt32_state::vt_rom_r));
+}
+
+
+uint8_t nes_vt32_unk_state::vt_rom_banked_r(offs_t offset)
+{
+ return m_prgrom[m_ahigh | offset];
+}
+
+void nes_vt32_unk_state::vt_external_space_map_fp_2x32mbyte(address_map &map)
+{
+ map(0x0000000, 0x1ffffff).r(FUNC(nes_vt32_unk_state::vt_rom_banked_r));
+}
+
+
+template <uint8_t NUM> uint8_t nes_vt32_base_state::extrain_r()
+{
+ if (m_exin[NUM])
+ return m_exin[NUM]->read();
+ else
+ {
+ logerror("%s: extrain_r (port %d) (not hooked up)\n", NUM, machine().describe_context());
+ }
+ return 0x00;
+}
+
+
+/* Standard I/O handlers (NES Controller clone) */
+
+uint8_t nes_vt32_base_state::in0_r()
+{
+ //logerror("%s: in0_r\n", machine().describe_context());
+ uint8_t ret = 0x40;
+ ret |= m_latch0 & 1;
+ m_latch0 >>= 1;
+ return ret;
+}
+
+uint8_t nes_vt32_base_state::in1_r()
+{
+ //logerror("%s: in1_r\n", machine().describe_context());
+ uint8_t ret = 0x40;
+ ret |= m_latch1 & 1;
+ m_latch1 >>= 1;
+ return ret;
+}
+
+void nes_vt32_base_state::in0_w(uint8_t data)
+{
+ //logerror("%s: in0_w %02x\n", machine().describe_context(), data);
+ if ((data & 0x01) != (m_previous_port0 & 0x01))
+ {
+ if (data & 0x01)
+ {
+ m_latch0 = m_io0->read();
+ m_latch1 = m_io1->read();
+ }
+ }
+
+ m_previous_port0 = data;
+}
+
+
+void nes_vt32_base_state::machine_start()
+{
+ m_latch0 = 0;
+ m_latch1 = 0;
+ m_previous_port0 = 0;
+
+ m_ahigh = 0;
+ m_4242 = 0;
+ m_411c = 0;
+ m_411d = 0;
+
+ save_item(NAME(m_latch0));
+ save_item(NAME(m_latch1));
+ save_item(NAME(m_previous_port0));
+
+ save_item(NAME(m_ahigh));
+ save_item(NAME(m_4242));
+ save_item(NAME(m_411c));
+ save_item(NAME(m_411d));
+}
+
+void nes_vt32_base_state::machine_reset()
+{
+
+}
+
+void nes_vt32_base_state::configure_soc(nes_vt02_vt03_soc_device* soc)
+{
+ soc->set_addrmap(AS_PROGRAM, &nes_vt32_state::vt_external_space_map_32mbyte);
+ soc->read_0_callback().set(FUNC(nes_vt32_base_state::in0_r));
+ soc->read_1_callback().set(FUNC(nes_vt32_base_state::in1_r));
+ soc->write_0_callback().set(FUNC(nes_vt32_base_state::in0_w));
+
+ soc->extra_read_0_callback().set(FUNC(nes_vt32_base_state::extrain_r<0>));
+ soc->extra_read_1_callback().set(FUNC(nes_vt32_base_state::extrain_r<1>));
+ soc->extra_read_2_callback().set(FUNC(nes_vt32_base_state::extrain_r<2>));
+ soc->extra_read_3_callback().set(FUNC(nes_vt32_base_state::extrain_r<3>));
+}
+
+uint8_t nes_vt32_base_state::upper_412c_r()
+{
+ logerror("%s: upper_412c_r\n", machine().describe_context());
+ return 0x00;
+}
+
+uint8_t nes_vt32_base_state::upper_412d_r()
+{
+ logerror("%s: upper_412d_r\n", machine().describe_context());
+ return 0x00;
+}
+
+void nes_vt32_base_state::upper_412c_w(uint8_t data)
+{
+ logerror("%s: upper_412c_w %02x\n", machine().describe_context(), data);
+}
+
+
+
+
+static INPUT_PORTS_START( nes_vt32 )
+ PORT_START("IO0")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(1) PORT_NAME("A")
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_NAME("B")
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SELECT ) PORT_PLAYER(1)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START ) PORT_PLAYER(1)
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(1) PORT_8WAY
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) PORT_8WAY
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) PORT_8WAY
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) PORT_8WAY
+
+ PORT_START("IO1")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_NAME("A")
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_NAME("B")
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SELECT ) PORT_PLAYER(2)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START ) PORT_PLAYER(2)
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(2) PORT_8WAY
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) PORT_8WAY
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) PORT_8WAY
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) PORT_8WAY
+INPUT_PORTS_END
+
+uint8_t nes_vt32_unk_state::fcpocket_412d_r()
+{
+ if (m_cartsel)
+ return m_cartsel->read();
+ else
+ return 0;
+}
+
+void nes_vt32_unk_state::fcpocket_412c_w(uint8_t data)
+{
+ // fcpocket
+ logerror("%s: vtfp_412c_extbank_w %02x\n", machine().describe_context(), data);
+ m_ahigh = (data & 0x01) ? (1 << 25) : 0x0;
+}
+
+void nes_vt32_unk_state::nes_vt32_fp(machine_config &config)
+{
+ /* basic machine hardware */
+ NES_VT32_SOC(config, m_soc, NTSC_APU_CLOCK);
+ configure_soc(m_soc);
+
+ dynamic_cast<nes_vt09_soc_device&>(*m_soc).upper_read_412c_callback().set(FUNC(nes_vt32_unk_state::upper_412c_r));
+ dynamic_cast<nes_vt09_soc_device&>(*m_soc).upper_read_412d_callback().set(FUNC(nes_vt32_unk_state::upper_412d_r));
+ dynamic_cast<nes_vt09_soc_device&>(*m_soc).upper_write_412c_callback().set(FUNC(nes_vt32_unk_state::upper_412c_w));
+
+ m_soc->set_default_palette_mode(PAL_MODE_NEW_RGB12);
+ m_soc->force_bad_dma();
+}
+
+void nes_vt32_unk_state::nes_vt32_pal_32mb(machine_config& config)
+{
+ /* basic machine hardware */
+ NES_VT32_SOC_PAL(config, m_soc, NTSC_APU_CLOCK); // TODO, proper clocks etc. for PAL
+ configure_soc(m_soc);
+
+ dynamic_cast<nes_vt09_soc_device&>(*m_soc).upper_read_412c_callback().set(FUNC(nes_vt32_unk_state::upper_412c_r));
+ dynamic_cast<nes_vt09_soc_device&>(*m_soc).upper_read_412d_callback().set(FUNC(nes_vt32_unk_state::upper_412d_r));
+ dynamic_cast<nes_vt09_soc_device&>(*m_soc).upper_write_412c_callback().set(FUNC(nes_vt32_unk_state::upper_412c_w));
+
+ m_soc->set_default_palette_mode(PAL_MODE_NEW_RGB12);
+ m_soc->force_bad_dma();
+
+ m_soc->set_addrmap(AS_PROGRAM, &nes_vt32_unk_state::vt_external_space_map_32mbyte);
+}
+
+void nes_vt32_unk_state::nes_vt32_4x16mb(machine_config& config)
+{
+ nes_vt32_fp(config);
+ m_soc->set_addrmap(AS_PROGRAM, &nes_vt32_unk_state::vt_external_space_map_fp_2x32mbyte);
+
+ dynamic_cast<nes_vt09_soc_device&>(*m_soc).upper_write_412c_callback().set(FUNC(nes_vt32_unk_state::fcpocket_412c_w));
+ dynamic_cast<nes_vt09_soc_device&>(*m_soc).upper_read_412d_callback().set(FUNC(nes_vt32_unk_state::fcpocket_412d_r));
+}
+
+void nes_vt32_unk_state::nes_vt32_32mb(machine_config& config)
+{
+ nes_vt32_fp(config);
+ m_soc->set_addrmap(AS_PROGRAM, &nes_vt32_unk_state::vt_external_space_map_32mbyte);
+}
+
+
+static INPUT_PORTS_START( nes_vt32_fp )
+ PORT_INCLUDE(nes_vt32)
+
+ PORT_START("CARTSEL")
+ PORT_DIPNAME( 0x06, 0x00, "Cartridge Select" ) PORT_CODE(KEYCODE_3) PORT_TOGGLE
+ PORT_DIPSETTING( 0x00, "472-in-1" )
+ PORT_DIPSETTING( 0x06, "128-in-1" )
+INPUT_PORTS_END
+
+
+ROM_START( dgun2573 ) // this one lacked a DreamGear logo but was otherwise physically identical, is it a clone product or did DreamGear drop the logo in favor of just using the 'My Arcade' brand?
+ ROM_REGION( 0x2000000, "mainrom", 0 )
+ ROM_LOAD( "myarcadegamerportable_s29gl256p10tfi01_0001227e.bin", 0x00000, 0x2000000, CRC(8f8c8da7) SHA1(76a18458922e39abe1982f05f184babb5e65acf2) )
+ROM_END
+
+ROM_START( dgun2573a )
+ ROM_REGION( 0x2000000, "mainrom", 0 )
+ ROM_LOAD( "myarcadegamerportabledreamgear_s29gl256p10tfi01_0001227e.bin", 0x00000, 0x2000000, CRC(928c41ad) SHA1(c0119a13a47a5b784d0b834d1451973ff0b4a84f) )
+ROM_END
+
+ROM_START( rminitv )
+ ROM_REGION( 0x2000000, "mainrom", 0 )
+ ROM_LOAD( "29gl256.bin", 0x00000, 0x2000000, CRC(cb4048d4) SHA1(9877ce5716d13f8498abfc1cbfaefa9426205d3e) )
+ROM_END
+
+ROM_START( fcpocket )
+ ROM_REGION( 0x8000000, "mainrom", 0 )
+ ROM_LOAD( "s29gl01gp.bin", 0x00000, 0x8000000, CRC(8703b18a) SHA1(07943443294e80ca93f83181c8bdbf950b87c52f) ) // 2nd half = 0x00 (so 64MByte of content)
+ROM_END
+
+
+CONS( 2015, dgun2573, 0, 0, nes_vt32_32mb, nes_vt32, nes_vt32_unk_state, empty_init, "dreamGEAR", "My Arcade Gamer V Portable Gaming System (DGUN-2573) (set 1, newer)", MACHINE_WRONG_COLORS | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND )
+CONS( 2015, dgun2573a, dgun2573, 0, nes_vt32_32mb, nes_vt32, nes_vt32_unk_state, empty_init, "dreamGEAR", "My Arcade Gamer V Portable Gaming System (DGUN-2573) (set 2, older)", MACHINE_WRONG_COLORS | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND ) // some menu graphics haven't been updated to reflect 'Panda' theme to the sports games
+
+CONS( 2015, rminitv, 0, 0, nes_vt32_pal_32mb, nes_vt32, nes_vt32_unk_state, empty_init, "Orb Gaming", "Retro 'Mini TV' Console 300-in-1", MACHINE_IMPERFECT_GRAPHICS ) // single 32Mbyte bank!
+
+// Use DIP switch to select console or cartridge, as cartridge is fake and just toggles a GPIO
+CONS( 2016, fcpocket, 0, 0, nes_vt32_4x16mb, nes_vt32_fp, nes_vt32_unk_state, empty_init, "<unknown>", "FC Pocket 600 in 1", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND ) // has external banking (2x 32mbyte banks)
diff --git a/src/mame/drivers/nes_vt32_vt369.cpp b/src/mame/drivers/nes_vt32_vt369.cpp
deleted file mode 100644
index 38cfce4dcbc..00000000000
--- a/src/mame/drivers/nes_vt32_vt369.cpp
+++ /dev/null
@@ -1,971 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:David Haywood
-/***************************************************************************
-
- nes_vt32_vt369.cpp
-
- VT32, VT369 and higher
-
- - new screen modes
- - new registers for controlling banking
- - can run from SPI ROM
- - backwards compatibility with mappers other than MMC3
- - additional audio cpu (like VT1682) and multiplier on VT369 models
-
- (not all features are used all games, but anything that has an SPI ROM
- must at least be this tech level)
-
- TODO:
- this still needs significant cleanups before work is started on individual
- systems
-
- ***************************************************************************/
-
-#include "emu.h"
-#include "machine/nes_vt_soc.h"
-
-class nes_vt3x_base_state : public driver_device
-{
-public:
- nes_vt3x_base_state(const machine_config& mconfig, device_type type, const char* tag) :
- driver_device(mconfig, type, tag),
- m_io0(*this, "IO0"),
- m_io1(*this, "IO1"),
- m_cartsel(*this, "CARTSEL"),
- m_exin(*this, "EXTRAIN%u", 0U),
- m_prgrom(*this, "mainrom")
- { }
-
-protected:
- virtual void machine_start() override;
- virtual void machine_reset() override;
-
- virtual uint8_t in0_r();
- virtual uint8_t in1_r();
- virtual void in0_w(uint8_t data);
-
- void nes_vt3x_map(address_map& map);
-
- optional_ioport m_io0;
- optional_ioport m_io1;
-
- uint8_t m_latch0;
- uint8_t m_latch1;
- uint8_t m_previous_port0;
-
- optional_ioport m_cartsel;
- optional_ioport_array<4> m_exin;
-
- /* Misc */
- uint32_t m_ahigh; // external banking bits
- uint8_t m_4242;
- uint8_t m_411c;
- uint8_t m_411d;
-
- required_region_ptr<uint8_t> m_prgrom;
-
- uint8_t vt_rom_r(offs_t offset);
- void vtspace_w(offs_t offset, uint8_t data);
-
- void configure_soc(nes_vt02_vt03_soc_device* soc);
-
- uint8_t upper_412c_r();
- uint8_t upper_412d_r();
- void upper_412c_w(uint8_t data);
-
-private:
- /* Extra IO */
- template <uint8_t NUM> uint8_t extrain_r();
-};
-
-class nes_vt3x_state : public nes_vt3x_base_state
-{
-public:
- nes_vt3x_state(const machine_config& mconfig, device_type type, const char* tag) :
- nes_vt3x_base_state(mconfig, type, tag),
- m_soc(*this, "soc")
- { }
-
- void nes_vt3x_4k_ram(machine_config& config);
- void nes_vt3x_4k_ram_16mb(machine_config& config);
-
- void vt_external_space_map_32mbyte(address_map& map);
- void vt_external_space_map_16mbyte(address_map& map);
- void vt_external_space_map_8mbyte(address_map& map);
- void vt_external_space_map_4mbyte(address_map& map);
- void vt_external_space_map_2mbyte(address_map& map);
- void vt_external_space_map_1mbyte(address_map& map);
- void vt_external_space_map_512kbyte(address_map& map);
-
- void init_lxcmcypp();
-
-protected:
- required_device<nes_vt02_vt03_soc_device> m_soc;
-};
-
-
-class nes_vt3x_swap_op_d5_d6_state : public nes_vt3x_state
-{
-public:
- nes_vt3x_swap_op_d5_d6_state(const machine_config& mconfig, device_type type, const char* tag) :
- nes_vt3x_state(mconfig, type, tag)
- { }
-
- void nes_vt3x_vh2009_8mb(machine_config& config);
-protected:
-};
-
-
-class nes_vt3x_cy_state : public nes_vt3x_state
-{
-public:
- nes_vt3x_cy_state(const machine_config& mconfig, device_type type, const char* tag) :
- nes_vt3x_state(mconfig, type, tag)
- { }
-
- void nes_vt3x_cy(machine_config& config);
- void nes_vt3x_cy_bigger(machine_config& config);
- void nes_vt3x_bt(machine_config& config);
- void nes_vt3x_bt_2x16mb(machine_config& config);
-
- void vt_external_space_map_bitboy_2x16mbyte(address_map& map);
-
-private:
- void nes_vt3x_cy_map(address_map& map);
- void nes_vt3x_bt_map(address_map& map);
-
- void bittboy_412c_w(uint8_t data);
-
- uint8_t vt_rom_banked_r(offs_t offset);
-};
-
-class nes_vt3x_dg_state : public nes_vt3x_state
-{
-public:
- nes_vt3x_dg_state(const machine_config& mconfig, device_type type, const char* tag) :
- nes_vt3x_state(mconfig, type, tag)
- { }
-
- void nes_vt3x_fa(machine_config& config);
- void nes_vt3x_fa_4x16mb(machine_config& config);
-
-protected:
-
-private:
- uint8_t vt_rom_banked_r(offs_t offset);
- void vt_external_space_map_fapocket_4x16mbyte(address_map& map);
-
- uint8_t fapocket_412c_r();
- void fapocket_412c_w(uint8_t data);
-
-};
-
-class nes_vt3x_dg_fapocket_state : public nes_vt3x_dg_state
-{
-public:
- nes_vt3x_dg_fapocket_state(const machine_config& mconfig, device_type type, const char* tag) :
- nes_vt3x_dg_state(mconfig, type, tag)
- { }
-
-protected:
- virtual void machine_reset() override;
-};
-
-
-class nes_vt3x_unk_state : public nes_vt3x_dg_state
-{
-public:
- nes_vt3x_unk_state(const machine_config& mconfig, device_type type, const char* tag) :
- nes_vt3x_dg_state(mconfig, type, tag)
- { }
-
- void nes_vt3x_hh(machine_config& config);
- void nes_vt3x_hh_4mb(machine_config& config);
- void nes_vt3x_hh_8mb(machine_config& config);
-
- void nes_vt3x_unk(machine_config& config);
- void nes_vt3x_unk_1mb(machine_config& config);
- void nes_vt3x_unk_16mb(machine_config& config);
-
- void nes_vt3x_fp(machine_config& config);
- void nes_vt3x_fp_16mb(machine_config& config);
- void nes_vt3x_fp_32mb(machine_config& config);
- void nes_vt3x_fp_bigger(machine_config& config);
- void nes_vt3x_fp_4x16mb(machine_config& config);
-
- void nes_vt3x_fp_pal(machine_config& config);
- void nes_vt3x_fp_pal_32mb(machine_config& config);
-
-private:
- uint8_t vt_rom_banked_r(offs_t offset);
- void vt_external_space_map_fp_2x32mbyte(address_map& map);
-
- void nes_vt3x_fp_map(address_map& map);
-
- uint8_t fcpocket_412d_r();
- void fcpocket_412c_w(uint8_t data);
-};
-
-uint8_t nes_vt3x_base_state::vt_rom_r(offs_t offset)
-{
- return m_prgrom[offset];
-}
-
-void nes_vt3x_base_state::vtspace_w(offs_t offset, uint8_t data)
-{
- logerror("%s: vtspace_w %08x : %02x", machine().describe_context(), offset, data);
-}
-
-// VTxx can address 25-bit address space (32MB of ROM) so use maps with mirroring in depending on ROM size
-void nes_vt3x_state::vt_external_space_map_32mbyte(address_map &map)
-{
- map(0x0000000, 0x1ffffff).r(FUNC(nes_vt3x_state::vt_rom_r));
-}
-
-void nes_vt3x_state::vt_external_space_map_16mbyte(address_map &map)
-{
- map(0x0000000, 0x0ffffff).mirror(0x1000000).r(FUNC(nes_vt3x_state::vt_rom_r));
-}
-
-void nes_vt3x_state::vt_external_space_map_8mbyte(address_map &map)
-{
- map(0x0000000, 0x07fffff).mirror(0x1800000).r(FUNC(nes_vt3x_state::vt_rom_r));
-}
-
-void nes_vt3x_state::vt_external_space_map_4mbyte(address_map &map)
-{
- map(0x0000000, 0x03fffff).mirror(0x1c00000).r(FUNC(nes_vt3x_state::vt_rom_r));
-}
-
-void nes_vt3x_state::vt_external_space_map_2mbyte(address_map &map)
-{
- map(0x0000000, 0x01fffff).mirror(0x1e00000).r(FUNC(nes_vt3x_state::vt_rom_r));
-}
-
-void nes_vt3x_state::vt_external_space_map_1mbyte(address_map &map)
-{
- map(0x0000000, 0x00fffff).mirror(0x1f00000).r(FUNC(nes_vt3x_state::vt_rom_r));
-}
-
-void nes_vt3x_state::vt_external_space_map_512kbyte(address_map &map)
-{
- map(0x0000000, 0x007ffff).mirror(0x1f80000).r(FUNC(nes_vt3x_state::vt_rom_r));
-}
-
-// bitboy is 2 16Mbyte banks
-uint8_t nes_vt3x_cy_state::vt_rom_banked_r(offs_t offset)
-{
- return m_prgrom[m_ahigh | offset];
-}
-
-void nes_vt3x_cy_state::vt_external_space_map_bitboy_2x16mbyte(address_map &map)
-{
- map(0x0000000, 0x0ffffff).mirror(0x1000000).r(FUNC(nes_vt3x_cy_state::vt_rom_banked_r));
-}
-
-// fapocket is 4 16Mbyte banks
-uint8_t nes_vt3x_dg_state::vt_rom_banked_r(offs_t offset)
-{
- return m_prgrom[m_ahigh | offset];
-}
-
-void nes_vt3x_dg_state::vt_external_space_map_fapocket_4x16mbyte(address_map &map)
-{
- map(0x0000000, 0x0ffffff).mirror(0x1000000).r(FUNC(nes_vt3x_dg_state::vt_rom_banked_r));
-}
-
-uint8_t nes_vt3x_unk_state::vt_rom_banked_r(offs_t offset)
-{
- return m_prgrom[m_ahigh | offset];
-}
-
-void nes_vt3x_unk_state::vt_external_space_map_fp_2x32mbyte(address_map &map)
-{
- map(0x0000000, 0x1ffffff).r(FUNC(nes_vt3x_unk_state::vt_rom_banked_r));
-}
-
-
-template <uint8_t NUM> uint8_t nes_vt3x_base_state::extrain_r()
-{
- if (m_exin[NUM])
- return m_exin[NUM]->read();
- else
- {
- logerror("%s: extrain_r (port %d) (not hooked up)\n", NUM, machine().describe_context());
- }
- return 0x00;
-}
-
-
-/* Standard I/O handlers (NES Controller clone) */
-
-uint8_t nes_vt3x_base_state::in0_r()
-{
- //logerror("%s: in0_r\n", machine().describe_context());
- uint8_t ret = 0x40;
- ret |= m_latch0 & 1;
- m_latch0 >>= 1;
- return ret;
-}
-
-uint8_t nes_vt3x_base_state::in1_r()
-{
- //logerror("%s: in1_r\n", machine().describe_context());
- uint8_t ret = 0x40;
- ret |= m_latch1 & 1;
- m_latch1 >>= 1;
- return ret;
-}
-
-void nes_vt3x_base_state::in0_w(uint8_t data)
-{
- //logerror("%s: in0_w %02x\n", machine().describe_context(), data);
- if ((data & 0x01) != (m_previous_port0 & 0x01))
- {
- if (data & 0x01)
- {
- m_latch0 = m_io0->read();
- m_latch1 = m_io1->read();
- }
- }
-
- m_previous_port0 = data;
-}
-
-
-void nes_vt3x_base_state::machine_start()
-{
- m_latch0 = 0;
- m_latch1 = 0;
- m_previous_port0 = 0;
-
- m_ahigh = 0;
- m_4242 = 0;
- m_411c = 0;
- m_411d = 0;
-
- save_item(NAME(m_latch0));
- save_item(NAME(m_latch1));
- save_item(NAME(m_previous_port0));
-
- save_item(NAME(m_ahigh));
- save_item(NAME(m_4242));
- save_item(NAME(m_411c));
- save_item(NAME(m_411d));
-}
-
-void nes_vt3x_base_state::machine_reset()
-{
-
-}
-
-void nes_vt3x_dg_fapocket_state::machine_reset()
-{
- nes_vt3x_base_state::machine_reset();
-
- // fapocket needs this, fcpocket instead reads the switch in software?
- if (m_cartsel)
- m_ahigh = (m_cartsel->read() == 0x01) ? (1 << 25) : 0x0;
- else
- m_ahigh = 0;
-}
-void nes_vt3x_base_state::configure_soc(nes_vt02_vt03_soc_device* soc)
-{
- soc->set_addrmap(AS_PROGRAM, &nes_vt3x_state::vt_external_space_map_32mbyte);
- soc->read_0_callback().set(FUNC(nes_vt3x_base_state::in0_r));
- soc->read_1_callback().set(FUNC(nes_vt3x_base_state::in1_r));
- soc->write_0_callback().set(FUNC(nes_vt3x_base_state::in0_w));
-
- soc->extra_read_0_callback().set(FUNC(nes_vt3x_base_state::extrain_r<0>));
- soc->extra_read_1_callback().set(FUNC(nes_vt3x_base_state::extrain_r<1>));
- soc->extra_read_2_callback().set(FUNC(nes_vt3x_base_state::extrain_r<2>));
- soc->extra_read_3_callback().set(FUNC(nes_vt3x_base_state::extrain_r<3>));
-}
-
-uint8_t nes_vt3x_base_state::upper_412c_r()
-{
- logerror("%s: upper_412c_r\n", machine().describe_context());
- return 0x00;
-}
-
-uint8_t nes_vt3x_base_state::upper_412d_r()
-{
- logerror("%s: upper_412d_r\n", machine().describe_context());
- return 0x00;
-}
-
-void nes_vt3x_base_state::upper_412c_w(uint8_t data)
-{
- logerror("%s: upper_412c_w %02x\n", machine().describe_context(), data);
-}
-
-void nes_vt3x_state::nes_vt3x_4k_ram(machine_config &config)
-{
- /* basic machine hardware */
- NES_VT09_SOC(config, m_soc, NTSC_APU_CLOCK);
- configure_soc(m_soc);
-
- dynamic_cast<nes_vt09_soc_device&>(*m_soc).upper_read_412c_callback().set(FUNC(nes_vt3x_state::upper_412c_r));
- dynamic_cast<nes_vt09_soc_device&>(*m_soc).upper_read_412d_callback().set(FUNC(nes_vt3x_state::upper_412d_r));
- dynamic_cast<nes_vt09_soc_device&>(*m_soc).upper_write_412c_callback().set(FUNC(nes_vt3x_state::upper_412c_w));
-}
-
-void nes_vt3x_state::nes_vt3x_4k_ram_16mb(machine_config &config)
-{
- nes_vt3x_4k_ram(config);
- m_soc->set_addrmap(AS_PROGRAM, &nes_vt3x_state::vt_external_space_map_16mbyte);
-}
-
-void nes_vt3x_cy_state::nes_vt3x_cy(machine_config &config)
-{
- nes_vt3x_4k_ram(config);
-
- NES_VT09_SOC_CY(config.replace(), m_soc, NTSC_APU_CLOCK);
- configure_soc(m_soc);
-}
-
-void nes_vt3x_cy_state::nes_vt3x_cy_bigger(machine_config &config)
-{
- nes_vt3x_cy(config);
- m_soc->set_addrmap(AS_PROGRAM, &nes_vt3x_cy_state::vt_external_space_map_32mbyte); // must be some banking of this kind of VT can address over 32mb
-}
-
-void nes_vt3x_cy_state::nes_vt3x_bt(machine_config &config)
-{
- nes_vt3x_4k_ram(config);
-
- NES_VT09_SOC_BT(config.replace(), m_soc, NTSC_APU_CLOCK);
- configure_soc(m_soc);
-}
-
-void nes_vt3x_cy_state::bittboy_412c_w(uint8_t data)
-{
- //bittboy (ok), mc_pg150 (not working)
- logerror("%s: vt03_412c_extbank_w %02x\n", machine().describe_context(), data);
- m_ahigh = (data & 0x04) ? (1 << 24) : 0x0;
-}
-
-void nes_vt3x_cy_state::nes_vt3x_bt_2x16mb(machine_config& config)
-{
- nes_vt3x_bt(config);
- m_soc->set_addrmap(AS_PROGRAM, &nes_vt3x_cy_state::vt_external_space_map_bitboy_2x16mbyte);
-
- dynamic_cast<nes_vt09_soc_device&>(*m_soc).upper_write_412c_callback().set(FUNC(nes_vt3x_cy_state::bittboy_412c_w));
-}
-
-void nes_vt3x_unk_state::nes_vt3x_unk(machine_config &config)
-{
- nes_vt3x_4k_ram(config);
-
- NES_VT3X_SOC_DG(config.replace(), m_soc, NTSC_APU_CLOCK);
- configure_soc(m_soc);
- m_soc->force_bad_dma();
-}
-
-void nes_vt3x_unk_state::nes_vt3x_unk_16mb(machine_config& config)
-{
- nes_vt3x_unk(config);
- m_soc->set_addrmap(AS_PROGRAM, &nes_vt3x_unk_state::vt_external_space_map_16mbyte);
-}
-
-void nes_vt3x_unk_state::nes_vt3x_unk_1mb(machine_config& config)
-{
- nes_vt3x_unk(config);
- m_soc->set_addrmap(AS_PROGRAM, &nes_vt3x_unk_state::vt_external_space_map_1mbyte);
-}
-
-
-
-
-
-// New mystery handheld architecture, VTxx derived
-void nes_vt3x_unk_state::nes_vt3x_hh(machine_config &config)
-{
- nes_vt3x_4k_ram(config);
-
- NES_VT369_SOC(config.replace(), m_soc, NTSC_APU_CLOCK);
- configure_soc(m_soc);
-
- m_soc->set_default_palette_mode(PAL_MODE_NEW_RGB);
- m_soc->force_bad_dma();
-}
-
-void nes_vt3x_unk_state::nes_vt3x_hh_8mb(machine_config& config)
-{
- nes_vt3x_hh(config);
- m_soc->set_addrmap(AS_PROGRAM, &nes_vt3x_unk_state::vt_external_space_map_8mbyte);
-}
-
-void nes_vt3x_unk_state::nes_vt3x_hh_4mb(machine_config& config)
-{
- nes_vt3x_hh(config);
- m_soc->set_addrmap(AS_PROGRAM, &nes_vt3x_unk_state::vt_external_space_map_4mbyte);
-}
-
-
-static INPUT_PORTS_START( nes_vt3x )
- PORT_START("IO0")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(1) PORT_NAME("A")
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_NAME("B")
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SELECT ) PORT_PLAYER(1)
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START ) PORT_PLAYER(1)
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(1) PORT_8WAY
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) PORT_8WAY
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) PORT_8WAY
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) PORT_8WAY
-
- PORT_START("IO1")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_NAME("A")
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_NAME("B")
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SELECT ) PORT_PLAYER(2)
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START ) PORT_PLAYER(2)
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(2) PORT_8WAY
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) PORT_8WAY
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) PORT_8WAY
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) PORT_8WAY
-INPUT_PORTS_END
-
-uint8_t nes_vt3x_unk_state::fcpocket_412d_r()
-{
- if (m_cartsel)
- return m_cartsel->read();
- else
- return 0;
-}
-
-void nes_vt3x_unk_state::fcpocket_412c_w(uint8_t data)
-{
- // fcpocket
- logerror("%s: vtfp_412c_extbank_w %02x\n", machine().describe_context(), data);
- m_ahigh = (data & 0x01) ? (1 << 25) : 0x0;
-}
-
-void nes_vt3x_unk_state::nes_vt3x_fp(machine_config &config)
-{
- nes_vt3x_4k_ram(config);
-
- NES_VT32_SOC(config.replace(), m_soc, NTSC_APU_CLOCK);
- configure_soc(m_soc);
-
- m_soc->set_default_palette_mode(PAL_MODE_NEW_RGB12);
- m_soc->force_bad_dma();
-}
-
-void nes_vt3x_unk_state::nes_vt3x_fp_pal_32mb(machine_config& config)
-{
- nes_vt3x_4k_ram(config);
-
- NES_VT32_SOC_PAL(config.replace(), m_soc, NTSC_APU_CLOCK);
- configure_soc(m_soc);
-
- m_soc->set_default_palette_mode(PAL_MODE_NEW_RGB12);
- m_soc->force_bad_dma();
-
- m_soc->set_addrmap(AS_PROGRAM, &nes_vt3x_unk_state::vt_external_space_map_32mbyte);
-}
-
-void nes_vt3x_unk_state::nes_vt3x_fp_4x16mb(machine_config& config)
-{
- nes_vt3x_fp(config);
- m_soc->set_addrmap(AS_PROGRAM, &nes_vt3x_unk_state::vt_external_space_map_fp_2x32mbyte);
-
- dynamic_cast<nes_vt09_soc_device&>(*m_soc).upper_write_412c_callback().set(FUNC(nes_vt3x_unk_state::fcpocket_412c_w));
- dynamic_cast<nes_vt09_soc_device&>(*m_soc).upper_read_412d_callback().set(FUNC(nes_vt3x_unk_state::fcpocket_412d_r));
-}
-
-void nes_vt3x_unk_state::nes_vt3x_fp_32mb(machine_config& config)
-{
- nes_vt3x_fp(config);
- m_soc->set_addrmap(AS_PROGRAM, &nes_vt3x_unk_state::vt_external_space_map_32mbyte);
-}
-
-void nes_vt3x_unk_state::nes_vt3x_fp_bigger(machine_config& config)
-{
- nes_vt3x_fp(config);
- m_soc->set_addrmap(AS_PROGRAM, &nes_vt3x_unk_state::vt_external_space_map_32mbyte); // must be some kind of banking, or this VT can address > 32Mbyte
-}
-
-void nes_vt3x_unk_state::nes_vt3x_fp_16mb(machine_config& config)
-{
- nes_vt3x_fp(config);
- m_soc->set_addrmap(AS_PROGRAM, &nes_vt3x_unk_state::vt_external_space_map_16mbyte);
-}
-
-void nes_vt3x_unk_state::nes_vt3x_fp_pal(machine_config &config)
-{
- nes_vt3x_fp(config);
-
- // set to PAL
-}
-
-
-
-void nes_vt3x_dg_state::nes_vt3x_fa(machine_config& config)
-{
- nes_vt3x_4k_ram(config);
-
- NES_VT3X_SOC_FA(config.replace(), m_soc, NTSC_APU_CLOCK);
- configure_soc(m_soc);
-}
-
-
-uint8_t nes_vt3x_dg_state::fapocket_412c_r()
-{
- if (m_cartsel)
- return m_cartsel->read();
- else
- return 0;
-}
-
-void nes_vt3x_dg_state::fapocket_412c_w(uint8_t data)
-{
- // fapocket (ok?) (also uses bank from config switch for fake cartridge slot)
- logerror("%s: vtfa_412c_extbank_w %02x\n", machine().describe_context(), data);
- m_ahigh = 0;
- m_ahigh |= (data & 0x01) ? (1 << 25) : 0x0;
- m_ahigh |= (data & 0x02) ? (1 << 24) : 0x0;
-}
-
-void nes_vt3x_dg_state::nes_vt3x_fa_4x16mb(machine_config& config) // fapocket
-{
- nes_vt3x_fa(config);
- m_soc->set_addrmap(AS_PROGRAM, &nes_vt3x_dg_state::vt_external_space_map_fapocket_4x16mbyte);
-
- dynamic_cast<nes_vt09_soc_device&>(*m_soc).upper_read_412c_callback().set(FUNC(nes_vt3x_dg_state::fapocket_412c_r));
- dynamic_cast<nes_vt09_soc_device&>(*m_soc).upper_write_412c_callback().set(FUNC(nes_vt3x_dg_state::fapocket_412c_w));
-}
-
-
-void nes_vt3x_swap_op_d5_d6_state::nes_vt3x_vh2009_8mb(machine_config& config)
-{
- NES_VT02_VT03_SOC(config, m_soc, NTSC_APU_CLOCK);
- configure_soc(m_soc);
-
- NES_VT02_VT03_SOC_SCRAMBLE(config.replace(), m_soc, NTSC_APU_CLOCK);
- configure_soc(m_soc);
-
- m_soc->set_addrmap(AS_PROGRAM, &nes_vt3x_swap_op_d5_d6_state::vt_external_space_map_8mbyte);
-}
-
-
-static INPUT_PORTS_START( nes_vt3x_fp )
- PORT_INCLUDE(nes_vt3x)
-
- PORT_START("CARTSEL")
- PORT_DIPNAME( 0x06, 0x00, "Cartridge Select" ) PORT_CODE(KEYCODE_3) PORT_TOGGLE
- PORT_DIPSETTING( 0x00, "472-in-1" )
- PORT_DIPSETTING( 0x06, "128-in-1" )
-INPUT_PORTS_END
-
-static INPUT_PORTS_START( nes_vt3x_fa )
- PORT_INCLUDE(nes_vt3x)
-
- PORT_START("CARTSEL")
- PORT_DIPNAME( 0x01, 0x00, "Cartridge Select" ) PORT_CODE(KEYCODE_3) PORT_TOGGLE
- PORT_DIPSETTING( 0x00, "508-in-1" )
- PORT_DIPSETTING( 0x01, "130-in-1" )
-INPUT_PORTS_END
-
-
-
-
-ROM_START( dgun2561 )
- ROM_REGION( 0x4000000, "mainrom", 0 )
- 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
-
-ROM_START( rtvgc300fz )
- ROM_REGION( 0x8000000, "mainrom", 0 )
- // some of the higher address lines might be swapped
- ROM_LOAD( "jg7800fz.bin", 0x00000, 0x4000000, CRC(c9d319d2) SHA1(9d0d1435b802f63ce11b94ce54d11f4065b324cc) )
-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.
-ROM_START( lxcmcy )
- ROM_REGION( 0x4000000, "mainrom", 0 )
- ROM_LOAD( "lxcmcy.bin", 0x00000, 0x4000000, CRC(3f3af72c) SHA1(76127054291568fcce1431d21af71f775cfb05a6) )
-ROM_END
-
-ROM_START( lxcmcysw )
- ROM_REGION( 0x4000000, "mainrom", 0 )
- ROM_LOAD( "jl2365swr-1.u2", 0x2000000, 0x2000000, CRC(60ece391) SHA1(655de6b36ba596d873de2839522b948ccf45e006) )
- ROM_CONTINUE(0x0000000, 0x2000000)
-ROM_END
-
-ROM_START( lxcmcyfz )
- ROM_REGION( 0x4000000, "mainrom", 0 )
- // sub-board was marked for 2GB capacity (A0-A26 address lines), but only address lines A0-A24 are connected to the chip
- ROM_LOAD( "jl2365_frozen.u1", 0x00000, 0x4000000, CRC(64d4c708) SHA1(1bc2d161326ce3039ab9ba46ad62695060cfb2e1) )
-ROM_END
-
-ROM_START( lxcmcydp )
- ROM_REGION( 0x4000000, "mainrom", 0 )
- // sub-board was marked for 2GB capacity (A0-A26 address lines), but only address lines A0-A24 are connected to the chip
- ROM_LOAD( "cyberarcade-disneyprincess.bin", 0x00000, 0x4000000, CRC(05946f81) SHA1(33eea2b70f5427e7613c836b8a08148731fac231) )
-ROM_END
-
-ROM_START( lxcmcysp )
- ROM_REGION( 0x4000000, "mainrom", 0 )
- // sub-board was marked for 2GB capacity (A0-A26 address lines), but only address lines A0-A24 are connected to the chip
- ROM_LOAD( "lexibookspiderman.bin", 0x00000, 0x4000000, CRC(ef6e8847) SHA1(0012df193c52fd48595d85886fd431619c5d5e3e) )
-ROM_END
-
-ROM_START( lxcmcycr )
- ROM_REGION( 0x4000000, "mainrom", 0 )
- ROM_LOAD( "lexibook cars.bin", 0x00000, 0x4000000, CRC(198fe11b) SHA1(5e35caa3fc319ec69812c187a3ec89f01749f749) )
-ROM_END
-
-ROM_START( lxcmcypp )
- ROM_REGION( 0x4000000, "mainrom", 0 )
- // marked 512mbit, possible A22 / A23 are swapped as they were marked on the board in a different way.
- ROM_LOAD( "pawpatrol_compact.bin", 0x00000, 0x4000000, CRC(bf536762) SHA1(80dde8426a636bae33a82d779e564fa743eb3776) )
-ROM_END
-
-ROM_START( lxcmc250 )
- ROM_REGION( 0x4000000, "mainrom", 0 )
- // sub-board was marked for 2GB capacity (A0-A26 address lines), but only address lines A0-A24 are connected to the chip
- ROM_LOAD( "cca250in1.u1", 0x00000, 0x4000000, CRC(6ccd6ad6) SHA1(fafed339097c3d1538faa306021a8373c1b799b3) )
-ROM_END
-
-ROM_START( lxccminn )
- ROM_REGION( 0x4000000, "mainrom", 0 ) // sub-board was hardwired to only be able to address the lower 64MByte, was rewired to also dump upper half when dumping, upper half contains only garbage, hence ROM_IGNORE
- ROM_LOAD( "minnie_lexibook.bin", 0x00000, 0x4000000, CRC(3f8e5a69) SHA1(c9f11f3e5f9b73832a191f4d1620a85c1b70f79e) )
- ROM_IGNORE(0x4000000)
-ROM_END
-
-ROM_START( lxccplan )
- ROM_REGION( 0x4000000, "mainrom", 0 ) // sub-board was hardwired to only be able to address the lower 64MByte, was rewired to also dump upper half when dumping, upper half contains only garbage, hence ROM_IGNORE
- ROM_LOAD( "planes_lexibook.bin", 0x00000, 0x4000000, CRC(76e1a962) SHA1(83b801c0e0e941ceb1c93e565e833b07c09412c3))
- ROM_IGNORE(0x4000000)
-ROM_END
-
-ROM_START( red5mam )
- ROM_REGION( 0x8000000, "mainrom", 0 )
- ROM_LOAD( "mam.u3", 0x00000, 0x8000000, CRC(0c0a0ecd) SHA1(2dfd8437de17fc9975698f1933dd81fbac78466d) )
-ROM_END
-
-ROM_START( lpgm240 )
- ROM_REGION( 0x800000, "mainrom", 0 )
- ROM_LOAD( "w25q64jv.u1", 0x00000, 0x800000, CRC(b973e65b) SHA1(36ff137068ea56b4679c2db386ac0067de0a9eaf) )
-ROM_END
-
-ROM_START( sy889 )
- ROM_REGION( 0x800000, "mainrom", 0 )
- ROM_LOAD( "sy889_w25q64.bin", 0x00000, 0x800000, CRC(fcdaa6fc) SHA1(0493747facf2172b8af22010851668bb18cbb3e4) )
-ROM_END
-
-ROM_START( sy888b )
- ROM_REGION( 0x400000, "mainrom", 0 )
- ROM_LOAD( "sy888b_f25q32.bin", 0x00000, 0x400000, CRC(a8298c33) SHA1(7112dd13d5fb5f9f9d496816758defd22773ec6e) )
-ROM_END
-
-ROM_START( dgun2573 ) // this one lacked a DreamGear logo but was otherwise physically identical, is it a clone product or did DreamGear drop the logo in favor of just using the 'My Arcade' brand?
- ROM_REGION( 0x2000000, "mainrom", 0 )
- ROM_LOAD( "myarcadegamerportable_s29gl256p10tfi01_0001227e.bin", 0x00000, 0x2000000, CRC(8f8c8da7) SHA1(76a18458922e39abe1982f05f184babb5e65acf2) )
-ROM_END
-
-ROM_START( dgun2573a )
- ROM_REGION( 0x2000000, "mainrom", 0 )
- ROM_LOAD( "myarcadegamerportabledreamgear_s29gl256p10tfi01_0001227e.bin", 0x00000, 0x2000000, CRC(928c41ad) SHA1(c0119a13a47a5b784d0b834d1451973ff0b4a84f) )
-ROM_END
-
-ROM_START( bittboy )
- ROM_REGION( 0x2000000, "mainrom", 0 )
- ROM_LOAD( "bittboy_flash_read_s29gl256n-tf-v2.bin", 0x00000, 0x2000000, CRC(24c802d7) SHA1(c1300ff799b93b9b53060b94d3985db4389c5d3a) )
-ROM_END
-
-ROM_START( mc_cb280 )
- ROM_REGION( 0x400000, "mainrom", 0 )
- ROM_LOAD( "w25q32.u5", 0x00000, 0x400000, CRC(c9541bdf) SHA1(f0ce46f18658ca5dbed881e5a80460e59820bbd0) )
-ROM_END
-
-ROM_START( mc_pg150 )
- ROM_REGION( 0x2000000, "mainrom", 0 )
- ROM_LOAD( "pocketgames150-in1.bin", 0x00000, 0x2000000, CRC(32f1176b) SHA1(2cfd9b61ebdfc328f020ae9bd5e5e2219321e828) )
-ROM_END
-
-ROM_START( mc_hh210 )
- ROM_REGION( 0x1000000, "mainrom", 0 )
- ROM_LOAD( "msp55lv128t.u4", 0x00000, 0x1000000, CRC(9ba520d4) SHA1(627f811b24314197e289a2ade668ff4115421bed) )
-ROM_END
-
-ROM_START( dvnimbus )
- ROM_REGION( 0x1000000, "mainrom", 0 )
- ROM_LOAD( "2012-7-4-v1.bin", 0x00000, 0x1000000, CRC(a91d7aa6) SHA1(9421b70b281bb630752bc352c3715258044c0bbe) )
-ROM_END
-
-ROM_START( unkra200 ) // "Winbond 25Q64FVSIG 1324" SPI ROM
- ROM_REGION( 0x800000, "mainrom", 0 )
- ROM_LOAD( "retro_machine_rom", 0x00000, 0x800000, CRC(0e824aa7) SHA1(957e98868559ecc22b3fa42c76692417b76bf132) )
-ROM_END
-
-ROM_START( rminitv )
- ROM_REGION( 0x2000000, "mainrom", 0 )
- ROM_LOAD( "29gl256.bin", 0x00000, 0x2000000, CRC(cb4048d4) SHA1(9877ce5716d13f8498abfc1cbfaefa9426205d3e) )
-ROM_END
-
-ROM_START( denv150 )
- ROM_REGION( 0x1000000, "mainrom", 0 )
- ROM_LOAD( "denver150in1.bin", 0x00000, 0x1000000, CRC(6b3819d7) SHA1(b0039945ce44a52ea224ab736d5f3c6980409b5d) ) // 2nd half is blank
-ROM_END
-
-ROM_START( mog_m320 )
- ROM_REGION( 0x800000, "mainrom", 0 )
- ROM_LOAD( "w25q64fv.bin", 0x00000, 0x800000, CRC(3c5e1b36) SHA1(4bcbf35ebf2b1714ccde5de758a89a6a39528f89) )
-ROM_END
-
-ROM_START( fcpocket )
- ROM_REGION( 0x8000000, "mainrom", 0 )
- ROM_LOAD( "s29gl01gp.bin", 0x00000, 0x8000000, CRC(8703b18a) SHA1(07943443294e80ca93f83181c8bdbf950b87c52f) ) // 2nd half = 0x00 (so 64MByte of content)
-ROM_END
-
-ROM_START( fapocket )
- ROM_REGION( 0x4000000, "mainrom", 0 )
- ROM_LOAD( "s29gl512n.bin", 0x00000, 0x4000000, CRC(37d0fb06) SHA1(0146a2fae32e23b65d4032c508f0d12cedd399c3) )
-ROM_END
-
-ROM_START( otrail )
- ROM_REGION( 0x100000, "mainrom", 0 )
- ROM_LOAD( "g25q80cw.bin", 0x00000, 0x100000, CRC(b20a03ba) SHA1(c4ca8e590b07baaebed747537bc8f92e44bdd219) ) // dumped as QD25Q80C
-
- ROM_REGION( 0x200, "seeprom", 0 )
- ROM_LOAD( "t24c04a.bin", 0x000, 0x200, CRC(ce1fad6f) SHA1(82878996765739edba42042b6336460d5c8f8096) )
-ROM_END
-
-ROM_START( zonefusn )
- ROM_REGION( 0x1000000, "mainrom", 0 )
- ROM_LOAD( "fusion.bin", 0x00000, 0x1000000, CRC(240bf970) SHA1(1b82d95a252c08e52fb8da6320276574a30b60db) )
-ROM_END
-
-void nes_vt3x_state::init_lxcmcypp()
-{
- int size = memregion("mainrom")->bytes()/2;
- uint16_t* ROM = (uint16_t*)memregion("mainrom")->base();
-
- for (int i = 0; i < size; i++)
- {
- ROM[i] = bitswap<16>(ROM[i], 4, 5, 6, 7, 0, 1, 2, 3, 12, 13, 14, 15, 8, 9, 10, 11);
- }
-}
-
-// Runs well, only issues in SMB3 which crashes
-CONS( 2017, bittboy, 0, 0, nes_vt3x_bt_2x16mb, nes_vt3x, nes_vt3x_cy_state, empty_init, "BittBoy", "BittBoy Mini FC 300 in 1", MACHINE_IMPERFECT_GRAPHICS ) // has external banking (2x 16mbyte banks)
-// Broken GFX, investigate, is this really a system? research indicates it's a multicart for a regular NES?
-CONS( 201?, mc_pg150, 0, 0, nes_vt3x_bt_2x16mb, nes_vt3x, nes_vt3x_cy_state, empty_init, "<unknown>", "Pocket Games 150 in 1", MACHINE_NOT_WORKING ) // has external banking
-// No title screen, but press start and menu and games run fine. Makes odd
-// memory accesses which probably explain broken title screen
-CONS( 201?, mc_hh210, 0, 0, nes_vt3x_4k_ram_16mb, nes_vt3x, nes_vt3x_state, empty_init, "<unknown>", "Handheld 210 in 1", MACHINE_NOT_WORKING )
-// First half of games don't work, probably bad dump
-CONS( 201?, dvnimbus, 0, 0, nes_vt3x_unk_16mb, nes_vt3x, nes_vt3x_unk_state, empty_init, "<unknown>", "DVTech Nimbus 176 in 1", MACHINE_NOT_WORKING )
- // probably another Thumbs Up product? cursor doesn't work unless nes_vt3x_hh machine is used? possibly newer than VT02 as it runs from an SPI ROM, might just not use enhanced features. Some minor game name changes to above (eg Smackdown just becomes Wrestling)
-CONS( 201?, unkra200, mc_tv200, 0, nes_vt3x_hh_8mb, nes_vt3x, nes_vt3x_unk_state, empty_init, "<unknown>", "200 in 1 Retro Arcade", MACHINE_IMPERFECT_GRAPHICS )
-
-// is this vt09 or vt32?
-// Use DIP switch to select console or cartridge, as cartridge is fake and just toggles a ROM high address bit
-// (which can also be overriden by GPIO)
-CONS( 2017, fapocket, 0, 0, nes_vt3x_fa_4x16mb, nes_vt3x_fa, nes_vt3x_dg_fapocket_state, empty_init, "<unknown>", "Family Pocket 638 in 1", MACHINE_IMPERFECT_GRAPHICS ) // has external banking (4x 16mbyte banks)
-
-
-// Runs well, minor GFX issues in intro
-CONS( 2017, sy889, 0, 0, nes_vt3x_hh_8mb, nes_vt3x, nes_vt3x_unk_state, empty_init, "SY Corp", "SY-889 300 in 1 Handheld", MACHINE_IMPERFECT_GRAPHICS )
-CONS( 2016, sy888b, 0, 0, nes_vt3x_hh_4mb, nes_vt3x, nes_vt3x_unk_state, empty_init, "SY Corp", "SY-888B 288 in 1 Handheld", MACHINE_IMPERFECT_GRAPHICS )
-
-// Same hardware as SY-889
-CONS( 201?, mc_cb280, 0, 0, nes_vt3x_hh_4mb, nes_vt3x, nes_vt3x_unk_state, empty_init, "CoolBoy", "Coolboy RS-18 (280 in 1)", MACHINE_IMPERFECT_GRAPHICS )
-
-// Plays intro music but then crashes. same hardware as SY-88x but uses more features
-CONS( 2016, mog_m320, 0, 0, nes_vt3x_hh_8mb, nes_vt3x, nes_vt3x_unk_state, empty_init, "MOGIS", "MOGIS M320 246 in 1 Handheld", MACHINE_NOT_WORKING )
-
-// similar menus to above, but with opcode scrambling
-CONS( 2015, dgun2573, 0, 0, nes_vt3x_fp_32mb, nes_vt3x, nes_vt3x_unk_state, empty_init, "dreamGEAR", "My Arcade Gamer V Portable Gaming System (DGUN-2573) (set 1, newer)", MACHINE_WRONG_COLORS | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND )
-CONS( 2015, dgun2573a, dgun2573, 0, nes_vt3x_fp_32mb, nes_vt3x, nes_vt3x_unk_state, empty_init, "dreamGEAR", "My Arcade Gamer V Portable Gaming System (DGUN-2573) (set 2, older)", MACHINE_WRONG_COLORS | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND ) // some menu graphics haven't been updated to reflect 'Panda' theme to the sports games
-
-CONS( 2015, rminitv, 0, 0, nes_vt3x_fp_pal_32mb, nes_vt3x, nes_vt3x_unk_state, empty_init, "Orb Gaming", "Retro 'Mini TV' Console 300-in-1", MACHINE_IMPERFECT_GRAPHICS ) // single 32Mbyte bank!
-// New platform with scrambled opcodes, same as DGUN-2561. Runs fine with minor GFX and sound issues in menu
-// Use DIP switch to select console or cartridge, as cartridge is fake and just toggles a GPIO
-CONS( 2016, fcpocket, 0, 0, nes_vt3x_fp_4x16mb, nes_vt3x_fp, nes_vt3x_unk_state, empty_init, "<unknown>", "FC Pocket 600 in 1", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND ) // has external banking (2x 32mbyte banks)
-
-
-/****************************************************************************************************************
-
- Things below seem on heavily enhanced hardware of unknown VT type
-
- It's possible some of these are the same as some of the ones above (sy889, rminitv, dgun2573 etc.) but with
- more features used.
-
- In some cases these might be almost entirely different, and it is likely a number don't belong in this
- driver at all.
-
-****************************************************************************************************************/
-
-// don't even get to menu. very enhanced chipset, VT368/9?
-CONS( 2012, dgun2561, 0, 0, nes_vt3x_cy_bigger, nes_vt3x, nes_vt3x_cy_state, empty_init, "dreamGEAR", "My Arcade Portable Gaming System with 140 Games (DGUN-2561)", MACHINE_NOT_WORKING ) // 64Mbyte ROM, must be externally banked, or different addressing scheme
-CONS( 2016, dgun2593, 0, 0, nes_vt3x_cy_bigger, nes_vt3x, nes_vt3x_cy_state, empty_init, "dreamGEAR", "My Arcade Retro Arcade Machine - 300 Handheld Video Games (DGUN-2593)", MACHINE_NOT_WORKING ) // 128Mbyte ROM, must be externally banked or different addressing scheme
-
-CONS( 200?, lxcmcy, 0, 0, nes_vt3x_cy_bigger, nes_vt3x, nes_vt3x_cy_state, empty_init, "Lexibook", "Lexibook Compact Cyber Arcade", MACHINE_NOT_WORKING ) // 64Mbyte ROM, must be externally banked, or different addressing scheme
-CONS( 200?, lxcmc250, 0, 0, nes_vt3x_cy_bigger, nes_vt3x, nes_vt3x_cy_state, empty_init, "Lexibook", "Lexibook Compact Cyber Arcade - 250-in-1 (JL2375)", MACHINE_NOT_WORKING ) // 64Mbyte ROM, must be externally banked, or different addressing scheme
-CONS( 200?, lxcmcysw, 0, 0, nes_vt3x_cy_bigger, nes_vt3x, nes_vt3x_cy_state, empty_init, "Lexibook", "Lexibook Compact Cyber Arcade - Star Wars Rebels", MACHINE_NOT_WORKING ) // 64Mbyte ROM, must be externally banked, or different addressing scheme
-CONS( 200?, lxcmcyfz, 0, 0, nes_vt3x_cy_bigger, nes_vt3x, nes_vt3x_cy_state, empty_init, "Lexibook", "Lexibook Compact Cyber Arcade - Frozen", MACHINE_NOT_WORKING ) // 64Mbyte ROM, must be externally banked, or different addressing scheme
-CONS( 200?, lxcmcydp, 0, 0, nes_vt3x_cy_bigger, nes_vt3x, nes_vt3x_cy_state, empty_init, "Lexibook", "Lexibook Compact Cyber Arcade - Disney Princess", MACHINE_NOT_WORKING ) // 64Mbyte ROM, must be externally banked, or different addressing scheme
-CONS( 200?, lxcmcysp, 0, 0, nes_vt3x_cy_bigger, nes_vt3x, nes_vt3x_cy_state, empty_init, "Lexibook", "Lexibook Compact Cyber Arcade - Marvel Ultimate Spider-Man", MACHINE_NOT_WORKING ) // 64Mbyte ROM, must be externally banked, or different addressing scheme
-CONS( 200?, lxcmcycr, 0, 0, nes_vt3x_cy_bigger, nes_vt3x, nes_vt3x_cy_state, empty_init, "Lexibook", "Lexibook Compact Cyber Arcade - Cars", MACHINE_NOT_WORKING ) // 64Mbyte ROM, must be externally banked, or different addressing scheme
-// the data order is swapped for this one, maybe other internal differences?
-CONS( 200?, lxcmcypp, 0, 0, nes_vt3x_cy_bigger, nes_vt3x, nes_vt3x_cy_state, init_lxcmcypp, "Lexibook", "Lexibook Compact Cyber Arcade - Paw Patrol", MACHINE_NOT_WORKING ) // 64Mbyte ROM, must be externally banked, or different addressing scheme
-
-
-CONS( 200?, lxccminn, 0, 0, nes_vt3x_cy_bigger, nes_vt3x, nes_vt3x_cy_state, empty_init, "Lexibook", "Lexibook Console Colour - Minnie Mouse", MACHINE_NOT_WORKING ) // 64Mbyte (used) ROM, must be externally banked, or different addressing scheme
-CONS( 200?, lxccplan, 0, 0, nes_vt3x_cy_bigger, nes_vt3x, nes_vt3x_cy_state, empty_init, "Lexibook", "Lexibook Console Colour - Disney's Planes", MACHINE_NOT_WORKING ) // 64Mbyte (used) ROM, must be externally banked, or different addressing scheme
-
-
-// GB-NO13-Main-VT389-2 on PCBs
-CONS( 2016, rtvgc300, 0, 0, nes_vt3x_cy_bigger, nes_vt3x, nes_vt3x_cy_state, empty_init, "Lexibook", "Lexibook Retro TV Game Console - 300 Games", MACHINE_NOT_WORKING ) // 64Mbyte ROM, must be externally banked, or different addressing scheme
-CONS( 2017, rtvgc300fz,0, 0, nes_vt3x_cy_bigger, nes_vt3x, nes_vt3x_cy_state, empty_init, "Lexibook", "Lexibook Retro TV Game Console - Frozen - 300 Games", MACHINE_NOT_WORKING ) // 64Mbyte ROM, must be externally banked, or different addressing scheme
-
-
-/* The following are also confirmed to be NES/VT derived units, most having a standard set of games with a handful of lazy graphic mods thrown in to fit the unit theme
-
- (handheld units, use standard AAA batteries)
- Lexibook Compact Cyber Arcade - Barbie
- Lexibook Compact Cyber Arcade - Finding Dory
- Lexibook Compact Cyber Arcade - PJ Masks
-
- (Handheld units, but different form factor to Compact Cyber Arcade, charged via USB)
- Lexibook Console Colour - Barbie
-
- (units for use with TV)
- Lexibook Retro TV Game Console (300 Games) - Cars
- Lexibook Retro TV Game Console (300 Games) - PJ Masks
-
- (more?)
-
- There are also updated 'Compact Cyber Arcade' branded units with a large + D-pad and internal battery / USB charger for
- Spiderman
- Frozen
- (generic)
- it isn't verified if these use the same ROMs as the original Compact Cyber Arcade releases, or if the software has been updated
-
-*/
-
-// intial code isn't valid? scrambled?
-CONS( 201?, red5mam, 0, 0, nes_vt3x_cy_bigger, nes_vt3x, nes_vt3x_cy_state, empty_init, "Red5", "Mini Arcade Machine (Red5)", MACHINE_NOT_WORKING ) // 128Mbyte ROM, must be externally banked or different addressing scheme
-
-CONS( 201?, denv150, 0, 0, nes_vt3x_cy_bigger, nes_vt3x, nes_vt3x_cy_state, empty_init, "Denver", "Denver Game Console GMP-240C 150-in-1", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS )
-
-// same encryption as above, but seems like newer hardware (or the above aren't using most of the features)
-CONS( 200?, lpgm240, 0, 0, nes_vt3x_vh2009_8mb, nes_vt3x, nes_vt3x_swap_op_d5_d6_state, empty_init, "<unknown>", "Let's Play! Game Machine 240 in 1", MACHINE_NOT_WORKING ) // mini 'retro-arcade' style cabinet
-
-CONS( 2017, otrail, 0, 0, nes_vt3x_unk_1mb, nes_vt3x, nes_vt3x_unk_state, empty_init, "Basic Fun", "The Oregon Trail", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS )
-
-CONS( 200?, zonefusn, 0, 0, nes_vt3x_fp_16mb, nes_vt3x, nes_vt3x_unk_state, empty_init, "Ultimate Products / Jungle's Soft", "Zone Fusion", MACHINE_NOT_WORKING )
diff --git a/src/mame/drivers/nes_vt369_vtunknown.cpp b/src/mame/drivers/nes_vt369_vtunknown.cpp
new file mode 100644
index 00000000000..4ab07556ca5
--- /dev/null
+++ b/src/mame/drivers/nes_vt369_vtunknown.cpp
@@ -0,0 +1,868 @@
+// license:BSD-3-Clause
+// copyright-holders:David Haywood
+/***************************************************************************
+
+ nes_vt369_vtunknown.cpp
+
+ VT369 and unknown/higher
+
+ - new screen modes
+ - new registers for controlling banking
+ - can run from SPI ROM
+ - additional audio cpu (like VT1682) and multiplier on VT369 models
+
+ (not all features are used all games, but anything that has an SPI ROM
+ must at least be this tech level)
+
+ TODO:
+ this still needs significant cleanups before work is started on individual
+ systems
+
+ some of these might be older systems eg. fapocket
+
+ ***************************************************************************/
+
+#include "emu.h"
+#include "machine/nes_vt369_vtunknown_soc.h"
+#include "machine/nes_vt32_soc.h"
+
+class nes_vt369_vtunknown_base_state : public driver_device
+{
+public:
+ nes_vt369_vtunknown_base_state(const machine_config& mconfig, device_type type, const char* tag) :
+ driver_device(mconfig, type, tag),
+ m_io0(*this, "IO0"),
+ m_io1(*this, "IO1"),
+ m_cartsel(*this, "CARTSEL"),
+ m_exin(*this, "EXTRAIN%u", 0U),
+ m_prgrom(*this, "mainrom")
+ { }
+
+protected:
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
+
+ virtual uint8_t in0_r();
+ virtual uint8_t in1_r();
+ virtual void in0_w(uint8_t data);
+
+ void nes_vt369_vtunknown_map(address_map& map);
+
+ optional_ioport m_io0;
+ optional_ioport m_io1;
+
+ uint8_t m_latch0;
+ uint8_t m_latch1;
+ uint8_t m_previous_port0;
+
+ optional_ioport m_cartsel;
+ optional_ioport_array<4> m_exin;
+
+ /* Misc */
+ uint32_t m_ahigh; // external banking bits
+ uint8_t m_4242;
+ uint8_t m_411c;
+ uint8_t m_411d;
+
+ required_region_ptr<uint8_t> m_prgrom;
+
+ uint8_t vt_rom_r(offs_t offset);
+ void vtspace_w(offs_t offset, uint8_t data);
+
+ void configure_soc(nes_vt02_vt03_soc_device* soc);
+
+ uint8_t upper_412c_r();
+ uint8_t upper_412d_r();
+ void upper_412c_w(uint8_t data);
+
+private:
+ /* Extra IO */
+ template <uint8_t NUM> uint8_t extrain_r();
+};
+
+class nes_vt369_vtunknown_state : public nes_vt369_vtunknown_base_state
+{
+public:
+ nes_vt369_vtunknown_state(const machine_config& mconfig, device_type type, const char* tag) :
+ nes_vt369_vtunknown_base_state(mconfig, type, tag),
+ m_soc(*this, "soc")
+ { }
+
+ void nes_vt369_vtunknown_4k_ram(machine_config& config);
+ void nes_vt369_vtunknown_4k_ram_16mb(machine_config& config);
+
+ void vt_external_space_map_32mbyte(address_map& map);
+ void vt_external_space_map_16mbyte(address_map& map);
+ void vt_external_space_map_8mbyte(address_map& map);
+ void vt_external_space_map_4mbyte(address_map& map);
+ void vt_external_space_map_2mbyte(address_map& map);
+ void vt_external_space_map_1mbyte(address_map& map);
+ void vt_external_space_map_512kbyte(address_map& map);
+
+ void init_lxcmcypp();
+
+protected:
+ required_device<nes_vt02_vt03_soc_device> m_soc;
+};
+
+
+class nes_vt369_vtunknown_swap_op_d5_d6_state : public nes_vt369_vtunknown_state
+{
+public:
+ nes_vt369_vtunknown_swap_op_d5_d6_state(const machine_config& mconfig, device_type type, const char* tag) :
+ nes_vt369_vtunknown_state(mconfig, type, tag)
+ { }
+
+ void nes_vt369_vtunknown_vh2009_8mb(machine_config& config);
+protected:
+};
+
+
+class nes_vt369_vtunknown_cy_state : public nes_vt369_vtunknown_state
+{
+public:
+ nes_vt369_vtunknown_cy_state(const machine_config& mconfig, device_type type, const char* tag) :
+ nes_vt369_vtunknown_state(mconfig, type, tag)
+ { }
+
+ void nes_vt369_vtunknown_cy(machine_config& config);
+ void nes_vt369_vtunknown_cy_bigger(machine_config& config);
+ void nes_vt369_vtunknown_bt(machine_config& config);
+ void nes_vt369_vtunknown_bt_2x16mb(machine_config& config);
+
+ void vt_external_space_map_bitboy_2x16mbyte(address_map& map);
+
+private:
+
+ void bittboy_412c_w(uint8_t data);
+
+ uint8_t vt_rom_banked_r(offs_t offset);
+};
+
+
+
+class nes_vt369_vtunknown_dg_fapocket_state : public nes_vt369_vtunknown_state
+{
+public:
+ nes_vt369_vtunknown_dg_fapocket_state(const machine_config& mconfig, device_type type, const char* tag) :
+ nes_vt369_vtunknown_state(mconfig, type, tag)
+ { }
+
+ void nes_vt369_vtunknown_fa_4x16mb(machine_config& config);
+
+protected:
+ virtual void machine_reset() override;
+
+private:
+ uint8_t vt_rom_banked_r(offs_t offset);
+ void vt_external_space_map_fapocket_4x16mbyte(address_map& map);
+
+ uint8_t fapocket_412c_r();
+ void fapocket_412c_w(uint8_t data);
+
+};
+
+
+class nes_vt369_vtunknown_unk_state : public nes_vt369_vtunknown_state
+{
+public:
+ nes_vt369_vtunknown_unk_state(const machine_config& mconfig, device_type type, const char* tag) :
+ nes_vt369_vtunknown_state(mconfig, type, tag)
+ { }
+
+ void nes_vt369_vtunknown_hh(machine_config& config);
+ void nes_vt369_vtunknown_hh_4mb(machine_config& config);
+ void nes_vt369_vtunknown_hh_8mb(machine_config& config);
+
+ void nes_vt369_vtunknown_unk(machine_config& config);
+ void nes_vt369_vtunknown_unk_1mb(machine_config& config);
+ void nes_vt369_vtunknown_unk_16mb(machine_config& config);
+
+ void nes_vt369_vtunknown_fp(machine_config& config);
+ void nes_vt369_vtunknown_fp_16mb(machine_config& config);
+
+private:
+ uint8_t vt_rom_banked_r(offs_t offset);
+ void vt_external_space_map_fp_2x32mbyte(address_map& map);
+};
+
+uint8_t nes_vt369_vtunknown_base_state::vt_rom_r(offs_t offset)
+{
+ return m_prgrom[offset];
+}
+
+void nes_vt369_vtunknown_base_state::vtspace_w(offs_t offset, uint8_t data)
+{
+ logerror("%s: vtspace_w %08x : %02x", machine().describe_context(), offset, data);
+}
+
+// VTxx can address 25-bit address space (32MB of ROM) so use maps with mirroring in depending on ROM size
+void nes_vt369_vtunknown_state::vt_external_space_map_32mbyte(address_map &map)
+{
+ map(0x0000000, 0x1ffffff).r(FUNC(nes_vt369_vtunknown_state::vt_rom_r));
+}
+
+void nes_vt369_vtunknown_state::vt_external_space_map_16mbyte(address_map &map)
+{
+ map(0x0000000, 0x0ffffff).mirror(0x1000000).r(FUNC(nes_vt369_vtunknown_state::vt_rom_r));
+}
+
+void nes_vt369_vtunknown_state::vt_external_space_map_8mbyte(address_map &map)
+{
+ map(0x0000000, 0x07fffff).mirror(0x1800000).r(FUNC(nes_vt369_vtunknown_state::vt_rom_r));
+}
+
+void nes_vt369_vtunknown_state::vt_external_space_map_4mbyte(address_map &map)
+{
+ map(0x0000000, 0x03fffff).mirror(0x1c00000).r(FUNC(nes_vt369_vtunknown_state::vt_rom_r));
+}
+
+void nes_vt369_vtunknown_state::vt_external_space_map_2mbyte(address_map &map)
+{
+ map(0x0000000, 0x01fffff).mirror(0x1e00000).r(FUNC(nes_vt369_vtunknown_state::vt_rom_r));
+}
+
+void nes_vt369_vtunknown_state::vt_external_space_map_1mbyte(address_map &map)
+{
+ map(0x0000000, 0x00fffff).mirror(0x1f00000).r(FUNC(nes_vt369_vtunknown_state::vt_rom_r));
+}
+
+void nes_vt369_vtunknown_state::vt_external_space_map_512kbyte(address_map &map)
+{
+ map(0x0000000, 0x007ffff).mirror(0x1f80000).r(FUNC(nes_vt369_vtunknown_state::vt_rom_r));
+}
+
+// bitboy is 2 16Mbyte banks
+uint8_t nes_vt369_vtunknown_cy_state::vt_rom_banked_r(offs_t offset)
+{
+ return m_prgrom[m_ahigh | offset];
+}
+
+void nes_vt369_vtunknown_cy_state::vt_external_space_map_bitboy_2x16mbyte(address_map &map)
+{
+ map(0x0000000, 0x0ffffff).mirror(0x1000000).r(FUNC(nes_vt369_vtunknown_cy_state::vt_rom_banked_r));
+}
+
+// fapocket is 4 16Mbyte banks
+uint8_t nes_vt369_vtunknown_dg_fapocket_state::vt_rom_banked_r(offs_t offset)
+{
+ return m_prgrom[m_ahigh | offset];
+}
+
+void nes_vt369_vtunknown_dg_fapocket_state::vt_external_space_map_fapocket_4x16mbyte(address_map &map)
+{
+ map(0x0000000, 0x0ffffff).mirror(0x1000000).r(FUNC(nes_vt369_vtunknown_dg_fapocket_state::vt_rom_banked_r));
+}
+
+uint8_t nes_vt369_vtunknown_unk_state::vt_rom_banked_r(offs_t offset)
+{
+ return m_prgrom[m_ahigh | offset];
+}
+
+void nes_vt369_vtunknown_unk_state::vt_external_space_map_fp_2x32mbyte(address_map &map)
+{
+ map(0x0000000, 0x1ffffff).r(FUNC(nes_vt369_vtunknown_unk_state::vt_rom_banked_r));
+}
+
+
+template <uint8_t NUM> uint8_t nes_vt369_vtunknown_base_state::extrain_r()
+{
+ if (m_exin[NUM])
+ return m_exin[NUM]->read();
+ else
+ {
+ logerror("%s: extrain_r (port %d) (not hooked up)\n", NUM, machine().describe_context());
+ }
+ return 0x00;
+}
+
+
+/* Standard I/O handlers (NES Controller clone) */
+
+uint8_t nes_vt369_vtunknown_base_state::in0_r()
+{
+ //logerror("%s: in0_r\n", machine().describe_context());
+ uint8_t ret = 0x40;
+ ret |= m_latch0 & 1;
+ m_latch0 >>= 1;
+ return ret;
+}
+
+uint8_t nes_vt369_vtunknown_base_state::in1_r()
+{
+ //logerror("%s: in1_r\n", machine().describe_context());
+ uint8_t ret = 0x40;
+ ret |= m_latch1 & 1;
+ m_latch1 >>= 1;
+ return ret;
+}
+
+void nes_vt369_vtunknown_base_state::in0_w(uint8_t data)
+{
+ //logerror("%s: in0_w %02x\n", machine().describe_context(), data);
+ if ((data & 0x01) != (m_previous_port0 & 0x01))
+ {
+ if (data & 0x01)
+ {
+ m_latch0 = m_io0->read();
+ m_latch1 = m_io1->read();
+ }
+ }
+
+ m_previous_port0 = data;
+}
+
+
+void nes_vt369_vtunknown_base_state::machine_start()
+{
+ m_latch0 = 0;
+ m_latch1 = 0;
+ m_previous_port0 = 0;
+
+ m_ahigh = 0;
+ m_4242 = 0;
+ m_411c = 0;
+ m_411d = 0;
+
+ save_item(NAME(m_latch0));
+ save_item(NAME(m_latch1));
+ save_item(NAME(m_previous_port0));
+
+ save_item(NAME(m_ahigh));
+ save_item(NAME(m_4242));
+ save_item(NAME(m_411c));
+ save_item(NAME(m_411d));
+}
+
+void nes_vt369_vtunknown_base_state::machine_reset()
+{
+
+}
+
+void nes_vt369_vtunknown_dg_fapocket_state::machine_reset()
+{
+ nes_vt369_vtunknown_base_state::machine_reset();
+
+ // fapocket needs this, fcpocket instead reads the switch in software?
+ if (m_cartsel)
+ m_ahigh = (m_cartsel->read() == 0x01) ? (1 << 25) : 0x0;
+ else
+ m_ahigh = 0;
+}
+void nes_vt369_vtunknown_base_state::configure_soc(nes_vt02_vt03_soc_device* soc)
+{
+ soc->set_addrmap(AS_PROGRAM, &nes_vt369_vtunknown_state::vt_external_space_map_32mbyte);
+ soc->read_0_callback().set(FUNC(nes_vt369_vtunknown_base_state::in0_r));
+ soc->read_1_callback().set(FUNC(nes_vt369_vtunknown_base_state::in1_r));
+ soc->write_0_callback().set(FUNC(nes_vt369_vtunknown_base_state::in0_w));
+
+ soc->extra_read_0_callback().set(FUNC(nes_vt369_vtunknown_base_state::extrain_r<0>));
+ soc->extra_read_1_callback().set(FUNC(nes_vt369_vtunknown_base_state::extrain_r<1>));
+ soc->extra_read_2_callback().set(FUNC(nes_vt369_vtunknown_base_state::extrain_r<2>));
+ soc->extra_read_3_callback().set(FUNC(nes_vt369_vtunknown_base_state::extrain_r<3>));
+}
+
+uint8_t nes_vt369_vtunknown_base_state::upper_412c_r()
+{
+ logerror("%s: upper_412c_r\n", machine().describe_context());
+ return 0x00;
+}
+
+uint8_t nes_vt369_vtunknown_base_state::upper_412d_r()
+{
+ logerror("%s: upper_412d_r\n", machine().describe_context());
+ return 0x00;
+}
+
+void nes_vt369_vtunknown_base_state::upper_412c_w(uint8_t data)
+{
+ logerror("%s: upper_412c_w %02x\n", machine().describe_context(), data);
+}
+
+void nes_vt369_vtunknown_state::nes_vt369_vtunknown_4k_ram(machine_config &config)
+{
+ /* basic machine hardware */
+ NES_VT09_SOC(config, m_soc, NTSC_APU_CLOCK);
+ configure_soc(m_soc);
+
+ dynamic_cast<nes_vt09_soc_device&>(*m_soc).upper_read_412c_callback().set(FUNC(nes_vt369_vtunknown_state::upper_412c_r));
+ dynamic_cast<nes_vt09_soc_device&>(*m_soc).upper_read_412d_callback().set(FUNC(nes_vt369_vtunknown_state::upper_412d_r));
+ dynamic_cast<nes_vt09_soc_device&>(*m_soc).upper_write_412c_callback().set(FUNC(nes_vt369_vtunknown_state::upper_412c_w));
+}
+
+void nes_vt369_vtunknown_state::nes_vt369_vtunknown_4k_ram_16mb(machine_config &config)
+{
+ nes_vt369_vtunknown_4k_ram(config);
+ m_soc->set_addrmap(AS_PROGRAM, &nes_vt369_vtunknown_state::vt_external_space_map_16mbyte);
+}
+
+void nes_vt369_vtunknown_cy_state::nes_vt369_vtunknown_cy(machine_config &config)
+{
+ nes_vt369_vtunknown_4k_ram(config);
+
+ NES_VTUNKNOWN_SOC_CY(config.replace(), m_soc, NTSC_APU_CLOCK);
+ configure_soc(m_soc);
+}
+
+void nes_vt369_vtunknown_cy_state::nes_vt369_vtunknown_cy_bigger(machine_config &config)
+{
+ nes_vt369_vtunknown_cy(config);
+ m_soc->set_addrmap(AS_PROGRAM, &nes_vt369_vtunknown_cy_state::vt_external_space_map_32mbyte); // must be some banking of this kind of VT can address over 32mb
+}
+
+void nes_vt369_vtunknown_cy_state::nes_vt369_vtunknown_bt(machine_config &config)
+{
+ nes_vt369_vtunknown_4k_ram(config);
+
+ NES_VTUNKNOWN_SOC_BT(config.replace(), m_soc, NTSC_APU_CLOCK);
+ configure_soc(m_soc);
+}
+
+void nes_vt369_vtunknown_cy_state::bittboy_412c_w(uint8_t data)
+{
+ //bittboy (ok), mc_pg150 (not working)
+ logerror("%s: vt03_412c_extbank_w %02x\n", machine().describe_context(), data);
+ m_ahigh = (data & 0x04) ? (1 << 24) : 0x0;
+}
+
+void nes_vt369_vtunknown_cy_state::nes_vt369_vtunknown_bt_2x16mb(machine_config& config)
+{
+ nes_vt369_vtunknown_bt(config);
+ m_soc->set_addrmap(AS_PROGRAM, &nes_vt369_vtunknown_cy_state::vt_external_space_map_bitboy_2x16mbyte);
+
+ dynamic_cast<nes_vt09_soc_device&>(*m_soc).upper_write_412c_callback().set(FUNC(nes_vt369_vtunknown_cy_state::bittboy_412c_w));
+}
+
+void nes_vt369_vtunknown_unk_state::nes_vt369_vtunknown_unk(machine_config &config)
+{
+ nes_vt369_vtunknown_4k_ram(config);
+
+ NES_VTUNKNOWN_SOC_DG(config.replace(), m_soc, NTSC_APU_CLOCK);
+ configure_soc(m_soc);
+ m_soc->force_bad_dma();
+}
+
+void nes_vt369_vtunknown_unk_state::nes_vt369_vtunknown_unk_16mb(machine_config& config)
+{
+ nes_vt369_vtunknown_unk(config);
+ m_soc->set_addrmap(AS_PROGRAM, &nes_vt369_vtunknown_unk_state::vt_external_space_map_16mbyte);
+}
+
+void nes_vt369_vtunknown_unk_state::nes_vt369_vtunknown_unk_1mb(machine_config& config)
+{
+ nes_vt369_vtunknown_unk(config);
+ m_soc->set_addrmap(AS_PROGRAM, &nes_vt369_vtunknown_unk_state::vt_external_space_map_1mbyte);
+}
+
+
+
+
+
+// New mystery handheld architecture, VTxx derived
+void nes_vt369_vtunknown_unk_state::nes_vt369_vtunknown_hh(machine_config &config)
+{
+ nes_vt369_vtunknown_4k_ram(config);
+
+ NES_VT369_SOC(config.replace(), m_soc, NTSC_APU_CLOCK);
+ configure_soc(m_soc);
+
+ m_soc->set_default_palette_mode(PAL_MODE_NEW_RGB);
+ m_soc->force_bad_dma();
+}
+
+void nes_vt369_vtunknown_unk_state::nes_vt369_vtunknown_hh_8mb(machine_config& config)
+{
+ nes_vt369_vtunknown_hh(config);
+ m_soc->set_addrmap(AS_PROGRAM, &nes_vt369_vtunknown_unk_state::vt_external_space_map_8mbyte);
+}
+
+void nes_vt369_vtunknown_unk_state::nes_vt369_vtunknown_hh_4mb(machine_config& config)
+{
+ nes_vt369_vtunknown_hh(config);
+ m_soc->set_addrmap(AS_PROGRAM, &nes_vt369_vtunknown_unk_state::vt_external_space_map_4mbyte);
+}
+
+
+static INPUT_PORTS_START( nes_vt369_vtunknown )
+ PORT_START("IO0")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(1) PORT_NAME("A")
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_NAME("B")
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SELECT ) PORT_PLAYER(1)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START ) PORT_PLAYER(1)
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(1) PORT_8WAY
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) PORT_8WAY
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) PORT_8WAY
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) PORT_8WAY
+
+ PORT_START("IO1")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_NAME("A")
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_NAME("B")
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SELECT ) PORT_PLAYER(2)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START ) PORT_PLAYER(2)
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(2) PORT_8WAY
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) PORT_8WAY
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) PORT_8WAY
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) PORT_8WAY
+INPUT_PORTS_END
+
+
+void nes_vt369_vtunknown_unk_state::nes_vt369_vtunknown_fp(machine_config &config)
+{
+ nes_vt369_vtunknown_4k_ram(config);
+
+ NES_VT32_SOC(config.replace(), m_soc, NTSC_APU_CLOCK);
+ configure_soc(m_soc);
+
+ m_soc->set_default_palette_mode(PAL_MODE_NEW_RGB12);
+ m_soc->force_bad_dma();
+}
+
+
+void nes_vt369_vtunknown_unk_state::nes_vt369_vtunknown_fp_16mb(machine_config& config)
+{
+ nes_vt369_vtunknown_fp(config);
+ m_soc->set_addrmap(AS_PROGRAM, &nes_vt369_vtunknown_unk_state::vt_external_space_map_16mbyte);
+}
+
+
+
+
+uint8_t nes_vt369_vtunknown_dg_fapocket_state::fapocket_412c_r()
+{
+ if (m_cartsel)
+ return m_cartsel->read();
+ else
+ return 0;
+}
+
+void nes_vt369_vtunknown_dg_fapocket_state::fapocket_412c_w(uint8_t data)
+{
+ // fapocket (ok?) (also uses bank from config switch for fake cartridge slot)
+ logerror("%s: vtfa_412c_extbank_w %02x\n", machine().describe_context(), data);
+ m_ahigh = 0;
+ m_ahigh |= (data & 0x01) ? (1 << 25) : 0x0;
+ m_ahigh |= (data & 0x02) ? (1 << 24) : 0x0;
+}
+
+
+
+
+
+void nes_vt369_vtunknown_dg_fapocket_state::nes_vt369_vtunknown_fa_4x16mb(machine_config& config) // fapocket
+{
+ nes_vt369_vtunknown_4k_ram(config);
+
+ NES_VTUNKNOWN_SOC_FA(config.replace(), m_soc, NTSC_APU_CLOCK);
+ configure_soc(m_soc);
+
+ m_soc->set_addrmap(AS_PROGRAM, &nes_vt369_vtunknown_dg_fapocket_state::vt_external_space_map_fapocket_4x16mbyte);
+
+ dynamic_cast<nes_vt09_soc_device&>(*m_soc).upper_read_412c_callback().set(FUNC(nes_vt369_vtunknown_dg_fapocket_state::fapocket_412c_r));
+ dynamic_cast<nes_vt09_soc_device&>(*m_soc).upper_write_412c_callback().set(FUNC(nes_vt369_vtunknown_dg_fapocket_state::fapocket_412c_w));
+}
+
+
+void nes_vt369_vtunknown_swap_op_d5_d6_state::nes_vt369_vtunknown_vh2009_8mb(machine_config& config)
+{
+ NES_VT02_VT03_SOC(config, m_soc, NTSC_APU_CLOCK);
+ configure_soc(m_soc);
+
+ NES_VT02_VT03_SOC_SCRAMBLE(config.replace(), m_soc, NTSC_APU_CLOCK);
+ configure_soc(m_soc);
+
+ m_soc->set_addrmap(AS_PROGRAM, &nes_vt369_vtunknown_swap_op_d5_d6_state::vt_external_space_map_8mbyte);
+}
+
+
+static INPUT_PORTS_START( nes_vt369_vtunknown_fa )
+ PORT_INCLUDE(nes_vt369_vtunknown)
+
+ PORT_START("CARTSEL")
+ PORT_DIPNAME( 0x01, 0x00, "Cartridge Select" ) PORT_CODE(KEYCODE_3) PORT_TOGGLE
+ PORT_DIPSETTING( 0x00, "508-in-1" )
+ PORT_DIPSETTING( 0x01, "130-in-1" )
+INPUT_PORTS_END
+
+
+
+
+ROM_START( dgun2561 )
+ ROM_REGION( 0x4000000, "mainrom", 0 )
+ 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
+
+ROM_START( rtvgc300fz )
+ ROM_REGION( 0x8000000, "mainrom", 0 )
+ // some of the higher address lines might be swapped
+ ROM_LOAD( "jg7800fz.bin", 0x00000, 0x4000000, CRC(c9d319d2) SHA1(9d0d1435b802f63ce11b94ce54d11f4065b324cc) )
+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.
+ROM_START( lxcmcy )
+ ROM_REGION( 0x4000000, "mainrom", 0 )
+ ROM_LOAD( "lxcmcy.bin", 0x00000, 0x4000000, CRC(3f3af72c) SHA1(76127054291568fcce1431d21af71f775cfb05a6) )
+ROM_END
+
+ROM_START( lxcmcysw )
+ ROM_REGION( 0x4000000, "mainrom", 0 )
+ ROM_LOAD( "jl2365swr-1.u2", 0x2000000, 0x2000000, CRC(60ece391) SHA1(655de6b36ba596d873de2839522b948ccf45e006) )
+ ROM_CONTINUE(0x0000000, 0x2000000)
+ROM_END
+
+ROM_START( lxcmcyfz )
+ ROM_REGION( 0x4000000, "mainrom", 0 )
+ // sub-board was marked for 2GB capacity (A0-A26 address lines), but only address lines A0-A24 are connected to the chip
+ ROM_LOAD( "jl2365_frozen.u1", 0x00000, 0x4000000, CRC(64d4c708) SHA1(1bc2d161326ce3039ab9ba46ad62695060cfb2e1) )
+ROM_END
+
+ROM_START( lxcmcydp )
+ ROM_REGION( 0x4000000, "mainrom", 0 )
+ // sub-board was marked for 2GB capacity (A0-A26 address lines), but only address lines A0-A24 are connected to the chip
+ ROM_LOAD( "cyberarcade-disneyprincess.bin", 0x00000, 0x4000000, CRC(05946f81) SHA1(33eea2b70f5427e7613c836b8a08148731fac231) )
+ROM_END
+
+ROM_START( lxcmcysp )
+ ROM_REGION( 0x4000000, "mainrom", 0 )
+ // sub-board was marked for 2GB capacity (A0-A26 address lines), but only address lines A0-A24 are connected to the chip
+ ROM_LOAD( "lexibookspiderman.bin", 0x00000, 0x4000000, CRC(ef6e8847) SHA1(0012df193c52fd48595d85886fd431619c5d5e3e) )
+ROM_END
+
+ROM_START( lxcmcycr )
+ ROM_REGION( 0x4000000, "mainrom", 0 )
+ ROM_LOAD( "lexibook cars.bin", 0x00000, 0x4000000, CRC(198fe11b) SHA1(5e35caa3fc319ec69812c187a3ec89f01749f749) )
+ROM_END
+
+ROM_START( lxcmcypp )
+ ROM_REGION( 0x4000000, "mainrom", 0 )
+ // marked 512mbit, possible A22 / A23 are swapped as they were marked on the board in a different way.
+ ROM_LOAD( "pawpatrol_compact.bin", 0x00000, 0x4000000, CRC(bf536762) SHA1(80dde8426a636bae33a82d779e564fa743eb3776) )
+ROM_END
+
+ROM_START( lxcmc250 )
+ ROM_REGION( 0x4000000, "mainrom", 0 )
+ // sub-board was marked for 2GB capacity (A0-A26 address lines), but only address lines A0-A24 are connected to the chip
+ ROM_LOAD( "cca250in1.u1", 0x00000, 0x4000000, CRC(6ccd6ad6) SHA1(fafed339097c3d1538faa306021a8373c1b799b3) )
+ROM_END
+
+ROM_START( lxccminn )
+ ROM_REGION( 0x4000000, "mainrom", 0 ) // sub-board was hardwired to only be able to address the lower 64MByte, was rewired to also dump upper half when dumping, upper half contains only garbage, hence ROM_IGNORE
+ ROM_LOAD( "minnie_lexibook.bin", 0x00000, 0x4000000, CRC(3f8e5a69) SHA1(c9f11f3e5f9b73832a191f4d1620a85c1b70f79e) )
+ ROM_IGNORE(0x4000000)
+ROM_END
+
+ROM_START( lxccplan )
+ ROM_REGION( 0x4000000, "mainrom", 0 ) // sub-board was hardwired to only be able to address the lower 64MByte, was rewired to also dump upper half when dumping, upper half contains only garbage, hence ROM_IGNORE
+ ROM_LOAD( "planes_lexibook.bin", 0x00000, 0x4000000, CRC(76e1a962) SHA1(83b801c0e0e941ceb1c93e565e833b07c09412c3))
+ ROM_IGNORE(0x4000000)
+ROM_END
+
+ROM_START( red5mam )
+ ROM_REGION( 0x8000000, "mainrom", 0 )
+ ROM_LOAD( "mam.u3", 0x00000, 0x8000000, CRC(0c0a0ecd) SHA1(2dfd8437de17fc9975698f1933dd81fbac78466d) )
+ROM_END
+
+ROM_START( lpgm240 )
+ ROM_REGION( 0x800000, "mainrom", 0 )
+ ROM_LOAD( "w25q64jv.u1", 0x00000, 0x800000, CRC(b973e65b) SHA1(36ff137068ea56b4679c2db386ac0067de0a9eaf) )
+ROM_END
+
+ROM_START( sy889 )
+ ROM_REGION( 0x800000, "mainrom", 0 )
+ ROM_LOAD( "sy889_w25q64.bin", 0x00000, 0x800000, CRC(fcdaa6fc) SHA1(0493747facf2172b8af22010851668bb18cbb3e4) )
+ROM_END
+
+ROM_START( sy888b )
+ ROM_REGION( 0x400000, "mainrom", 0 )
+ ROM_LOAD( "sy888b_f25q32.bin", 0x00000, 0x400000, CRC(a8298c33) SHA1(7112dd13d5fb5f9f9d496816758defd22773ec6e) )
+ROM_END
+
+
+ROM_START( bittboy )
+ ROM_REGION( 0x2000000, "mainrom", 0 )
+ ROM_LOAD( "bittboy_flash_read_s29gl256n-tf-v2.bin", 0x00000, 0x2000000, CRC(24c802d7) SHA1(c1300ff799b93b9b53060b94d3985db4389c5d3a) )
+ROM_END
+
+ROM_START( mc_cb280 )
+ ROM_REGION( 0x400000, "mainrom", 0 )
+ ROM_LOAD( "w25q32.u5", 0x00000, 0x400000, CRC(c9541bdf) SHA1(f0ce46f18658ca5dbed881e5a80460e59820bbd0) )
+ROM_END
+
+ROM_START( mc_pg150 )
+ ROM_REGION( 0x2000000, "mainrom", 0 )
+ ROM_LOAD( "pocketgames150-in1.bin", 0x00000, 0x2000000, CRC(32f1176b) SHA1(2cfd9b61ebdfc328f020ae9bd5e5e2219321e828) )
+ROM_END
+
+ROM_START( mc_hh210 )
+ ROM_REGION( 0x1000000, "mainrom", 0 )
+ ROM_LOAD( "msp55lv128t.u4", 0x00000, 0x1000000, CRC(9ba520d4) SHA1(627f811b24314197e289a2ade668ff4115421bed) )
+ROM_END
+
+ROM_START( dvnimbus )
+ ROM_REGION( 0x1000000, "mainrom", 0 )
+ ROM_LOAD( "2012-7-4-v1.bin", 0x00000, 0x1000000, CRC(a91d7aa6) SHA1(9421b70b281bb630752bc352c3715258044c0bbe) )
+ROM_END
+
+ROM_START( unkra200 ) // "Winbond 25Q64FVSIG 1324" SPI ROM
+ ROM_REGION( 0x800000, "mainrom", 0 )
+ ROM_LOAD( "retro_machine_rom", 0x00000, 0x800000, CRC(0e824aa7) SHA1(957e98868559ecc22b3fa42c76692417b76bf132) )
+ROM_END
+
+
+ROM_START( denv150 )
+ ROM_REGION( 0x1000000, "mainrom", 0 )
+ ROM_LOAD( "denver150in1.bin", 0x00000, 0x1000000, CRC(6b3819d7) SHA1(b0039945ce44a52ea224ab736d5f3c6980409b5d) ) // 2nd half is blank
+ROM_END
+
+ROM_START( mog_m320 )
+ ROM_REGION( 0x800000, "mainrom", 0 )
+ ROM_LOAD( "w25q64fv.bin", 0x00000, 0x800000, CRC(3c5e1b36) SHA1(4bcbf35ebf2b1714ccde5de758a89a6a39528f89) )
+ROM_END
+
+
+ROM_START( fapocket )
+ ROM_REGION( 0x4000000, "mainrom", 0 )
+ ROM_LOAD( "s29gl512n.bin", 0x00000, 0x4000000, CRC(37d0fb06) SHA1(0146a2fae32e23b65d4032c508f0d12cedd399c3) )
+ROM_END
+
+ROM_START( otrail )
+ ROM_REGION( 0x100000, "mainrom", 0 )
+ ROM_LOAD( "g25q80cw.bin", 0x00000, 0x100000, CRC(b20a03ba) SHA1(c4ca8e590b07baaebed747537bc8f92e44bdd219) ) // dumped as QD25Q80C
+
+ ROM_REGION( 0x200, "seeprom", 0 )
+ ROM_LOAD( "t24c04a.bin", 0x000, 0x200, CRC(ce1fad6f) SHA1(82878996765739edba42042b6336460d5c8f8096) )
+ROM_END
+
+ROM_START( zonefusn )
+ ROM_REGION( 0x1000000, "mainrom", 0 )
+ ROM_LOAD( "fusion.bin", 0x00000, 0x1000000, CRC(240bf970) SHA1(1b82d95a252c08e52fb8da6320276574a30b60db) )
+ROM_END
+
+void nes_vt369_vtunknown_state::init_lxcmcypp()
+{
+ int size = memregion("mainrom")->bytes()/2;
+ uint16_t* ROM = (uint16_t*)memregion("mainrom")->base();
+
+ for (int i = 0; i < size; i++)
+ {
+ ROM[i] = bitswap<16>(ROM[i], 4, 5, 6, 7, 0, 1, 2, 3, 12, 13, 14, 15, 8, 9, 10, 11);
+ }
+}
+
+// Runs well, only issues in SMB3 which crashes
+CONS( 2017, bittboy, 0, 0, nes_vt369_vtunknown_bt_2x16mb, nes_vt369_vtunknown, nes_vt369_vtunknown_cy_state, empty_init, "BittBoy", "BittBoy Mini FC 300 in 1", MACHINE_IMPERFECT_GRAPHICS ) // has external banking (2x 16mbyte banks)
+// Broken GFX, investigate, is this really a system? research indicates it's a multicart for a regular NES?
+CONS( 201?, mc_pg150, 0, 0, nes_vt369_vtunknown_bt_2x16mb, nes_vt369_vtunknown, nes_vt369_vtunknown_cy_state, empty_init, "<unknown>", "Pocket Games 150 in 1", MACHINE_NOT_WORKING ) // has external banking
+// No title screen, but press start and menu and games run fine. Makes odd
+// memory accesses which probably explain broken title screen
+CONS( 201?, mc_hh210, 0, 0, nes_vt369_vtunknown_4k_ram_16mb, nes_vt369_vtunknown, nes_vt369_vtunknown_state, empty_init, "<unknown>", "Handheld 210 in 1", MACHINE_NOT_WORKING )
+// First half of games don't work, probably bad dump
+CONS( 201?, dvnimbus, 0, 0, nes_vt369_vtunknown_unk_16mb, nes_vt369_vtunknown, nes_vt369_vtunknown_unk_state, empty_init, "<unknown>", "DVTech Nimbus 176 in 1", MACHINE_NOT_WORKING )
+ // probably another Thumbs Up product? cursor doesn't work unless nes_vt369_vtunknown_hh machine is used? possibly newer than VT02 as it runs from an SPI ROM, might just not use enhanced features. Some minor game name changes to above (eg Smackdown just becomes Wrestling)
+CONS( 201?, unkra200, mc_tv200, 0, nes_vt369_vtunknown_hh_8mb, nes_vt369_vtunknown, nes_vt369_vtunknown_unk_state, empty_init, "<unknown>", "200 in 1 Retro Arcade", MACHINE_IMPERFECT_GRAPHICS )
+
+// is this vt09 or vt32?
+// Use DIP switch to select console or cartridge, as cartridge is fake and just toggles a ROM high address bit
+// (which can also be overriden by GPIO)
+CONS( 2017, fapocket, 0, 0, nes_vt369_vtunknown_fa_4x16mb, nes_vt369_vtunknown_fa, nes_vt369_vtunknown_dg_fapocket_state, empty_init, "<unknown>", "Family Pocket 638 in 1", MACHINE_IMPERFECT_GRAPHICS ) // has external banking (4x 16mbyte banks)
+
+
+
+
+
+// Runs well, minor GFX issues in intro
+CONS( 2017, sy889, 0, 0, nes_vt369_vtunknown_hh_8mb, nes_vt369_vtunknown, nes_vt369_vtunknown_unk_state, empty_init, "SY Corp", "SY-889 300 in 1 Handheld", MACHINE_IMPERFECT_GRAPHICS )
+CONS( 2016, sy888b, 0, 0, nes_vt369_vtunknown_hh_4mb, nes_vt369_vtunknown, nes_vt369_vtunknown_unk_state, empty_init, "SY Corp", "SY-888B 288 in 1 Handheld", MACHINE_IMPERFECT_GRAPHICS )
+
+// Same hardware as SY-889
+CONS( 201?, mc_cb280, 0, 0, nes_vt369_vtunknown_hh_4mb, nes_vt369_vtunknown, nes_vt369_vtunknown_unk_state, empty_init, "CoolBoy", "Coolboy RS-18 (280 in 1)", MACHINE_IMPERFECT_GRAPHICS )
+
+// Plays intro music but then crashes. same hardware as SY-88x but uses more features
+CONS( 2016, mog_m320, 0, 0, nes_vt369_vtunknown_hh_8mb, nes_vt369_vtunknown, nes_vt369_vtunknown_unk_state, empty_init, "MOGIS", "MOGIS M320 246 in 1 Handheld", MACHINE_NOT_WORKING )
+
+/****************************************************************************************************************
+
+ Things below seem on heavily enhanced hardware of unknown VT type
+
+ It's possible some of these are the same as some of the ones above (sy889, rminitv, dgun2573 etc.) but with
+ more features used.
+
+ In some cases these might be almost entirely different, and it is likely a number don't belong in this
+ driver at all.
+
+****************************************************************************************************************/
+
+// don't even get to menu. very enhanced chipset, VT368/9?
+CONS( 2012, dgun2561, 0, 0, nes_vt369_vtunknown_cy_bigger, nes_vt369_vtunknown, nes_vt369_vtunknown_cy_state, empty_init, "dreamGEAR", "My Arcade Portable Gaming System with 140 Games (DGUN-2561)", MACHINE_NOT_WORKING ) // 64Mbyte ROM, must be externally banked, or different addressing scheme
+
+CONS( 200?, lxcmcy, 0, 0, nes_vt369_vtunknown_cy_bigger, nes_vt369_vtunknown, nes_vt369_vtunknown_cy_state, empty_init, "Lexibook", "Lexibook Compact Cyber Arcade", MACHINE_NOT_WORKING ) // 64Mbyte ROM, must be externally banked, or different addressing scheme
+CONS( 200?, lxcmc250, 0, 0, nes_vt369_vtunknown_cy_bigger, nes_vt369_vtunknown, nes_vt369_vtunknown_cy_state, empty_init, "Lexibook", "Lexibook Compact Cyber Arcade - 250-in-1 (JL2375)", MACHINE_NOT_WORKING ) // 64Mbyte ROM, must be externally banked, or different addressing scheme
+CONS( 200?, lxcmcysw, 0, 0, nes_vt369_vtunknown_cy_bigger, nes_vt369_vtunknown, nes_vt369_vtunknown_cy_state, empty_init, "Lexibook", "Lexibook Compact Cyber Arcade - Star Wars Rebels", MACHINE_NOT_WORKING ) // 64Mbyte ROM, must be externally banked, or different addressing scheme
+CONS( 200?, lxcmcyfz, 0, 0, nes_vt369_vtunknown_cy_bigger, nes_vt369_vtunknown, nes_vt369_vtunknown_cy_state, empty_init, "Lexibook", "Lexibook Compact Cyber Arcade - Frozen", MACHINE_NOT_WORKING ) // 64Mbyte ROM, must be externally banked, or different addressing scheme
+CONS( 200?, lxcmcydp, 0, 0, nes_vt369_vtunknown_cy_bigger, nes_vt369_vtunknown, nes_vt369_vtunknown_cy_state, empty_init, "Lexibook", "Lexibook Compact Cyber Arcade - Disney Princess", MACHINE_NOT_WORKING ) // 64Mbyte ROM, must be externally banked, or different addressing scheme
+CONS( 200?, lxcmcysp, 0, 0, nes_vt369_vtunknown_cy_bigger, nes_vt369_vtunknown, nes_vt369_vtunknown_cy_state, empty_init, "Lexibook", "Lexibook Compact Cyber Arcade - Marvel Ultimate Spider-Man", MACHINE_NOT_WORKING ) // 64Mbyte ROM, must be externally banked, or different addressing scheme
+CONS( 200?, lxcmcycr, 0, 0, nes_vt369_vtunknown_cy_bigger, nes_vt369_vtunknown, nes_vt369_vtunknown_cy_state, empty_init, "Lexibook", "Lexibook Compact Cyber Arcade - Cars", MACHINE_NOT_WORKING ) // 64Mbyte ROM, must be externally banked, or different addressing scheme
+// the data order is swapped for this one, maybe other internal differences?
+CONS( 200?, lxcmcypp, 0, 0, nes_vt369_vtunknown_cy_bigger, nes_vt369_vtunknown, nes_vt369_vtunknown_cy_state, init_lxcmcypp, "Lexibook", "Lexibook Compact Cyber Arcade - Paw Patrol", MACHINE_NOT_WORKING ) // 64Mbyte ROM, must be externally banked, or different addressing scheme
+
+
+CONS( 200?, lxccminn, 0, 0, nes_vt369_vtunknown_cy_bigger, nes_vt369_vtunknown, nes_vt369_vtunknown_cy_state, empty_init, "Lexibook", "Lexibook Console Colour - Minnie Mouse", MACHINE_NOT_WORKING ) // 64Mbyte (used) ROM, must be externally banked, or different addressing scheme
+CONS( 200?, lxccplan, 0, 0, nes_vt369_vtunknown_cy_bigger, nes_vt369_vtunknown, nes_vt369_vtunknown_cy_state, empty_init, "Lexibook", "Lexibook Console Colour - Disney's Planes", MACHINE_NOT_WORKING ) // 64Mbyte (used) ROM, must be externally banked, or different addressing scheme
+
+
+// GB-NO13-Main-VT389-2 on PCBs
+CONS( 2016, rtvgc300, 0, 0, nes_vt369_vtunknown_cy_bigger, nes_vt369_vtunknown, nes_vt369_vtunknown_cy_state, empty_init, "Lexibook", "Lexibook Retro TV Game Console - 300 Games", MACHINE_NOT_WORKING ) // 64Mbyte ROM, must be externally banked, or different addressing scheme
+CONS( 2017, rtvgc300fz,0, 0, nes_vt369_vtunknown_cy_bigger, nes_vt369_vtunknown, nes_vt369_vtunknown_cy_state, empty_init, "Lexibook", "Lexibook Retro TV Game Console - Frozen - 300 Games", MACHINE_NOT_WORKING ) // 64Mbyte ROM, must be externally banked, or different addressing scheme
+
+
+/* The following are also confirmed to be NES/VT derived units, most having a standard set of games with a handful of lazy graphic mods thrown in to fit the unit theme
+
+ (handheld units, use standard AAA batteries)
+ Lexibook Compact Cyber Arcade - Barbie
+ Lexibook Compact Cyber Arcade - Finding Dory
+ Lexibook Compact Cyber Arcade - PJ Masks
+
+ (Handheld units, but different form factor to Compact Cyber Arcade, charged via USB)
+ Lexibook Console Colour - Barbie
+
+ (units for use with TV)
+ Lexibook Retro TV Game Console (300 Games) - Cars
+ Lexibook Retro TV Game Console (300 Games) - PJ Masks
+
+ (more?)
+
+ There are also updated 'Compact Cyber Arcade' branded units with a large + D-pad and internal battery / USB charger for
+ Spiderman
+ Frozen
+ (generic)
+ it isn't verified if these use the same ROMs as the original Compact Cyber Arcade releases, or if the software has been updated
+
+*/
+
+// confirmed VT369
+CONS( 201?, denv150, 0, 0, nes_vt369_vtunknown_cy_bigger, nes_vt369_vtunknown, nes_vt369_vtunknown_cy_state, empty_init, "Denver", "Denver Game Console GMP-240C 150-in-1", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS )
+
+// uncertain, uses SPI ROM
+CONS( 200?, lpgm240, 0, 0, nes_vt369_vtunknown_vh2009_8mb, nes_vt369_vtunknown, nes_vt369_vtunknown_swap_op_d5_d6_state, empty_init, "<unknown>", "Let's Play! Game Machine 240 in 1", MACHINE_NOT_WORKING ) // mini 'retro-arcade' style cabinet
+
+// incertain, uses SPI ROM
+CONS( 2017, otrail, 0, 0, nes_vt369_vtunknown_unk_1mb, nes_vt369_vtunknown, nes_vt369_vtunknown_unk_state, empty_init, "Basic Fun", "The Oregon Trail", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS )
+
+// uncertain, intial code isn't valid? scrambled?
+CONS( 201?, red5mam, 0, 0, nes_vt369_vtunknown_cy_bigger, nes_vt369_vtunknown, nes_vt369_vtunknown_cy_state, empty_init, "Red5", "Mini Arcade Machine (Red5)", MACHINE_NOT_WORKING ) // 128Mbyte ROM, must be externally banked or different addressing scheme
+// uncertain, very similar to red5mam
+CONS( 2016, dgun2593, 0, 0, nes_vt369_vtunknown_cy_bigger, nes_vt369_vtunknown, nes_vt369_vtunknown_cy_state, empty_init, "dreamGEAR", "My Arcade Retro Arcade Machine - 300 Handheld Video Games (DGUN-2593)", MACHINE_NOT_WORKING ) // 128Mbyte ROM, must be externally banked or different addressing scheme
+
+// uncertain, NOT SPI ROM
+CONS( 200?, zonefusn, 0, 0, nes_vt369_vtunknown_fp_16mb, nes_vt369_vtunknown, nes_vt369_vtunknown_unk_state, empty_init, "Ultimate Products / Jungle's Soft", "Zone Fusion", MACHINE_NOT_WORKING )