summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author mamehaze <140764005+mamehaze@users.noreply.github.com>2026-04-17 05:15:05 +0100
committer GitHub <noreply@github.com>2026-04-17 06:15:05 +0200
commit0034dde186fa6f594125ac3dc2b5977f18e7a062 (patch)
tree3ec6772687fdca188023c9af2b5d0b121bb96ef8
parented1d1a42bf1f5dfd709c52e963c3f16e1ac7231e (diff)
nes_vt: added 2 not working Go Retro sets + cleanups + lxcap research (#15228)
New clones marked not working ----------------------------- Go Retro Portable 250+ Games (US, V1.3) [Sean Riddle, David Haywood] Go Retro Portable 250+ Games (US, V1.2) [Sean Riddle, David Haywood] these licensed devices are protected like the other 2 sets (~0x100 bytes of code read from mystery device) * simulated protection for lxcap, tetrtin, pactin rather than bypassing it * also hooked up lxcap protection device to otrail, which boots with it present * hooked it up to mog_m320 and pixel246, the former of which now goes to menu (pixel246 seems to ignore the results anyway) * hooked up seeprom to otrail, allowing for game to be loaded / saved and high score table to show correctly * various cleanups (ATTR_COLD, formatting)
-rw-r--r--src/mame/mame.lst2
-rw-r--r--src/mame/nintendo/nes_clone.cpp40
-rw-r--r--src/mame/nintendo/nes_sh6578.cpp22
-rw-r--r--src/mame/nintendo/nes_vt02_vt03.cpp150
-rw-r--r--src/mame/nintendo/nes_vt09.cpp42
-rw-r--r--src/mame/nintendo/nes_vt09_soc.cpp6
-rw-r--r--src/mame/nintendo/nes_vt09_soc.h6
-rw-r--r--src/mame/nintendo/nes_vt32.cpp36
-rw-r--r--src/mame/nintendo/nes_vt32_soc.cpp12
-rw-r--r--src/mame/nintendo/nes_vt32_soc.h12
-rw-r--r--src/mame/nintendo/nes_vt369_vtunknown.cpp426
-rw-r--r--src/mame/nintendo/nes_vt369_vtunknown_soc.cpp168
-rw-r--r--src/mame/nintendo/nes_vt369_vtunknown_soc.h82
-rw-r--r--src/mame/nintendo/nes_vt42xx.cpp46
-rw-r--r--src/mame/nintendo/nes_vt42xx_soc.cpp12
-rw-r--r--src/mame/nintendo/nes_vt42xx_soc.h12
-rw-r--r--src/mame/nintendo/nes_vt_soc.cpp42
-rw-r--r--src/mame/nintendo/nes_vt_soc.h28
-rw-r--r--src/mame/nintendo/vt_menu_protection_lxcap.cpp113
-rw-r--r--src/mame/nintendo/vt_menu_protection_lxcap.h36
20 files changed, 859 insertions, 434 deletions
diff --git a/src/mame/mame.lst b/src/mame/mame.lst
index c88d6e48f34..5678a9a50db 100644
--- a/src/mame/mame.lst
+++ b/src/mame/mame.lst
@@ -36141,6 +36141,8 @@ gcs2mgp
gon100
goretrop
goretropa
+goretropu12
+goretropu13
gtct885
h12p1000
hkb502
diff --git a/src/mame/nintendo/nes_clone.cpp b/src/mame/nintendo/nes_clone.cpp
index 0a30b409e6b..132778164ca 100644
--- a/src/mame/nintendo/nes_clone.cpp
+++ b/src/mame/nintendo/nes_clone.cpp
@@ -106,10 +106,10 @@ private:
class nes_clone_dnce2000_state : public nes_clone_state
{
public:
- nes_clone_dnce2000_state(const machine_config& mconfig, device_type type, const char* tag) :
+ nes_clone_dnce2000_state(const machine_config &mconfig, device_type type, const char *tag) :
nes_clone_state(mconfig, type, tag)
{ }
- void nes_clone_dnce2000(machine_config& config) ATTR_COLD;
+ void nes_clone_dnce2000(machine_config &config) ATTR_COLD;
private:
void nes_clone_dnce2000_map(address_map &map) ATTR_COLD;
@@ -123,13 +123,13 @@ private:
class nes_clone_sudoku_state : public nes_clone_state
{
public:
- nes_clone_sudoku_state(const machine_config& mconfig, device_type type, const char* tag) :
+ nes_clone_sudoku_state(const machine_config &mconfig, device_type type, const char *tag) :
nes_clone_state(mconfig, type, tag)
{ }
void init_sudoku() ATTR_COLD;
- void nes_clone_sudoku(machine_config& config) ATTR_COLD;
+ void nes_clone_sudoku(machine_config &config) ATTR_COLD;
private:
void nes_clone_sudoku_map(address_map &map) ATTR_COLD;
@@ -143,12 +143,12 @@ private:
class nes_clone_vtvsocr_state : public nes_clone_state
{
public:
- nes_clone_vtvsocr_state(const machine_config& mconfig, device_type type, const char* tag) :
+ nes_clone_vtvsocr_state(const machine_config &mconfig, device_type type, const char *tag) :
nes_clone_state(mconfig, type, tag)
{ }
- void nes_clone_vtvsocr(machine_config& config);
- void nes_clone_danzkara_pal(machine_config& config);
+ void nes_clone_vtvsocr(machine_config &config) ATTR_COLD;
+ void nes_clone_danzkara_pal(machine_config &config) ATTR_COLD;
private:
void nes_clone_vtvsocr_map(address_map &map) ATTR_COLD;
@@ -164,7 +164,7 @@ private:
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_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),
@@ -172,7 +172,7 @@ public:
m_charbank(*this, "charbank"),
m_rom_solderpad_bank(*this, "rom_sldpad_bank")
{ }
- void nes_clone_afbm7800(machine_config& config) ATTR_COLD;
+ void nes_clone_afbm7800(machine_config &config) ATTR_COLD;
protected:
virtual void machine_start() override ATTR_COLD;
@@ -316,7 +316,7 @@ void nes_clone_state::in0_w(uint8_t data)
}
-void nes_clone_state::nes_clone_basemap(address_map& map)
+void nes_clone_state::nes_clone_basemap(address_map &map)
{
map(0x0000, 0x07ff).ram();
map(0x2000, 0x3fff).rw(m_ppu, FUNC(ppu2c0x_device::read), FUNC(ppu2c0x_device::write));
@@ -327,7 +327,7 @@ void nes_clone_state::nes_clone_basemap(address_map& map)
map(0x4017, 0x4017).r(FUNC(nes_clone_state::in1_r));
}
-void nes_clone_state::nes_clone_map(address_map& map)
+void nes_clone_state::nes_clone_map(address_map &map)
{
nes_clone_basemap(map);
map(0x8000, 0xffff).rom();
@@ -647,13 +647,13 @@ void nes_clone_dancexpt_state::nes_clone_dancexpt_map(address_map &map)
Dance 2000 Specifics
**************************************************/
-void nes_clone_dnce2000_state::nes_clone_dnce2000(machine_config& config)
+void nes_clone_dnce2000_state::nes_clone_dnce2000(machine_config &config)
{
nes_clone_pal(config);
m_maincpu->set_addrmap(AS_PROGRAM, &nes_clone_dnce2000_state::nes_clone_dnce2000_map);
}
-void nes_clone_dnce2000_state::nes_clone_dnce2000_map(address_map& map)
+void nes_clone_dnce2000_state::nes_clone_dnce2000_map(address_map &map)
{
nes_clone_basemap(map);
map(0x8000, 0xffff).rw(FUNC(nes_clone_dnce2000_state::rom_r), FUNC(nes_clone_dnce2000_state::bank_w));
@@ -685,7 +685,7 @@ void nes_clone_dnce2000_state::bank_w(uint8_t data)
Atari Flashback Specifics
**************************************************/
-void nes_clone_afbm7800_state::nes_clone_afbm7800(machine_config& config)
+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);
@@ -1090,7 +1090,7 @@ void nes_clone_afbm7800_state::vram_map(address_map &map)
map(0x3800, 0x3fff).bankrw("cbank1");
}
-void nes_clone_afbm7800_state::ntram_map(address_map& map)
+void nes_clone_afbm7800_state::ntram_map(address_map &map)
{
map(0x0000, 0x03ff).bankrw("nametable0");
map(0x0400, 0x07ff).bankrw("nametable1");
@@ -1229,13 +1229,13 @@ void nes_clone_sudoku_state::machine_start()
save_item(NAME(m_rombase));
}
-void nes_clone_sudoku_state::nes_clone_sudoku(machine_config& config)
+void nes_clone_sudoku_state::nes_clone_sudoku(machine_config &config)
{
nes_clone(config);
m_maincpu->set_addrmap(AS_PROGRAM, &nes_clone_sudoku_state::nes_clone_sudoku_map);
}
-void nes_clone_sudoku_state::nes_clone_sudoku_map(address_map& map)
+void nes_clone_sudoku_state::nes_clone_sudoku_map(address_map &map)
{
nes_clone_basemap(map);
map(0x8000, 0xffff).rw(FUNC(nes_clone_sudoku_state::rom_r), FUNC(nes_clone_sudoku_state::bank_w));
@@ -1295,19 +1295,19 @@ void nes_clone_vtvsocr_state::machine_start()
save_item(NAME(m_bankregs));
}
-void nes_clone_vtvsocr_state::nes_clone_vtvsocr(machine_config& config)
+void nes_clone_vtvsocr_state::nes_clone_vtvsocr(machine_config &config)
{
nes_clone(config);
m_maincpu->set_addrmap(AS_PROGRAM, &nes_clone_vtvsocr_state::nes_clone_vtvsocr_map);
}
-void nes_clone_vtvsocr_state::nes_clone_danzkara_pal(machine_config& config)
+void nes_clone_vtvsocr_state::nes_clone_danzkara_pal(machine_config &config)
{
nes_clone_pal(config);
m_maincpu->set_addrmap(AS_PROGRAM, &nes_clone_vtvsocr_state::nes_clone_vtvsocr_map);
}
-void nes_clone_vtvsocr_state::nes_clone_vtvsocr_map(address_map& map)
+void nes_clone_vtvsocr_state::nes_clone_vtvsocr_map(address_map &map)
{
nes_clone_basemap(map);
map(0x4800, 0x4803).w(FUNC(nes_clone_vtvsocr_state::bank_w));
diff --git a/src/mame/nintendo/nes_sh6578.cpp b/src/mame/nintendo/nes_sh6578.cpp
index 5c263dbdcd2..62055bf023c 100644
--- a/src/mame/nintendo/nes_sh6578.cpp
+++ b/src/mame/nintendo/nes_sh6578.cpp
@@ -37,7 +37,7 @@ namespace {
class nes_sh6578_state : public driver_device
{
public:
- nes_sh6578_state(const machine_config& mconfig, device_type type, const char* tag) :
+ nes_sh6578_state(const machine_config &mconfig, device_type type, const char *tag) :
driver_device(mconfig, type, tag),
m_bank(*this, "cartbank"),
m_maincpu(*this, "maincpu"),
@@ -50,10 +50,10 @@ public:
m_ext(*this, "EXT")
{ }
- void nes_sh6578(machine_config& config);
- void nes_sh6578_pal(machine_config& config);
+ void nes_sh6578(machine_config &config) ATTR_COLD;
+ void nes_sh6578_pal(machine_config &config) ATTR_COLD;
- void init_nes_sh6578();
+ void init_nes_sh6578() ATTR_COLD;
int unknown_random_r()
{
@@ -138,7 +138,7 @@ private:
void rom_map(address_map &map) ATTR_COLD;
void nes_sh6578_map(address_map &map) ATTR_COLD;
- void ppu_map(address_map &map);
+ void ppu_map(address_map &map) ATTR_COLD;
//uint16_t get_tileaddress(uint8_t x, uint8_t y, bool ishigh);
@@ -157,7 +157,7 @@ private:
class nes_sh6578_abl_wikid_state : public nes_sh6578_state
{
public:
- nes_sh6578_abl_wikid_state(const machine_config& mconfig, device_type type, const char* tag) :
+ nes_sh6578_abl_wikid_state(const machine_config &mconfig, device_type type, const char *tag) :
nes_sh6578_state(mconfig, type, tag)
{ }
@@ -168,7 +168,7 @@ protected:
class nes_sh6578_max10in1_state : public nes_sh6578_state
{
public:
- nes_sh6578_max10in1_state(const machine_config& mconfig, device_type type, const char* tag) :
+ nes_sh6578_max10in1_state(const machine_config &mconfig, device_type type, const char *tag) :
nes_sh6578_state(mconfig, type, tag)
{ }
@@ -475,7 +475,7 @@ uint8_t nes_sh6578_state::apu_read_mem(offs_t offset)
-void nes_sh6578_state::nes_sh6578_map(address_map& map)
+void nes_sh6578_state::nes_sh6578_map(address_map &map)
{
map(0x0000, 0x1fff).ram();
map(0x2000, 0x2007).rw(m_ppu, FUNC(ppu2c0x_device::read), FUNC(ppu2c0x_device::write));
@@ -605,7 +605,7 @@ void nes_sh6578_state::machine_start()
}
// SH6578 can address 20-bit address space (1MB of ROM)
-void nes_sh6578_state::rom_map(address_map& map)
+void nes_sh6578_state::rom_map(address_map &map)
{
map(0x00000, 0xfffff).bankr("cartbank");
}
@@ -640,7 +640,7 @@ void nes_sh6578_state::ppu_map(address_map &map)
}
-void nes_sh6578_state::nes_sh6578(machine_config& config)
+void nes_sh6578_state::nes_sh6578(machine_config &config)
{
/* basic machine hardware */
M6502(config, m_maincpu, NTSC_APU_CLOCK); // regular M6502 core, not RP2A03?
@@ -676,7 +676,7 @@ void nes_sh6578_state::nes_sh6578(machine_config& config)
m_apu->add_route(ALL_OUTPUTS, "mono", 0.50);
}
-void nes_sh6578_state::nes_sh6578_pal(machine_config& config)
+void nes_sh6578_state::nes_sh6578_pal(machine_config &config)
{
nes_sh6578(config);
diff --git a/src/mame/nintendo/nes_vt02_vt03.cpp b/src/mame/nintendo/nes_vt02_vt03.cpp
index 843203eceb0..3ec59db6a80 100644
--- a/src/mame/nintendo/nes_vt02_vt03.cpp
+++ b/src/mame/nintendo/nes_vt02_vt03.cpp
@@ -24,7 +24,7 @@ namespace {
class nes_vt_base_state : public driver_device
{
public:
- nes_vt_base_state(const machine_config& mconfig, device_type type, const char* tag) :
+ nes_vt_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"),
@@ -50,7 +50,7 @@ protected:
optional_ioport_array<4> m_exin;
- void configure_soc(nes_vt02_vt03_soc_device* soc);
+ void configure_soc(nes_vt02_vt03_soc_device *soc);
[[maybe_unused]] uint8_t upper_412c_r();
[[maybe_unused]] uint8_t upper_412d_r();
@@ -64,26 +64,26 @@ private:
class nes_vt_state : public nes_vt_base_state
{
public:
- nes_vt_state(const machine_config& mconfig, device_type type, const char* tag) :
+ nes_vt_state(const machine_config &mconfig, device_type type, const char *tag) :
nes_vt_base_state(mconfig, type, tag),
m_soc(*this, "soc")
{ }
- void nes_vt_pal_1mb(machine_config& config) ATTR_COLD;
- void nes_vt_pal_2mb(machine_config& config) ATTR_COLD;
- void nes_vt_pal_4mb(machine_config& config) ATTR_COLD;
- void nes_vt_pal_8mb(machine_config& config) ATTR_COLD;
- void nes_vt_pal_16mb(machine_config& config) ATTR_COLD;
+ void nes_vt_pal_1mb(machine_config &config) ATTR_COLD;
+ void nes_vt_pal_2mb(machine_config &config) ATTR_COLD;
+ void nes_vt_pal_4mb(machine_config &config) ATTR_COLD;
+ void nes_vt_pal_8mb(machine_config &config) ATTR_COLD;
+ void nes_vt_pal_16mb(machine_config &config) ATTR_COLD;
- void nes_vt_512kb(machine_config& config) ATTR_COLD;
- void nes_vt_1mb(machine_config& config) ATTR_COLD;
- void nes_vt_2mb(machine_config& config) ATTR_COLD;
- void nes_vt_4mb(machine_config& config) ATTR_COLD;
- void nes_vt_8mb(machine_config& config) ATTR_COLD;
- void nes_vt_16mb(machine_config& config) ATTR_COLD;
- [[maybe_unused]] void nes_vt_32mb(machine_config& config) ATTR_COLD;
+ void nes_vt_512kb(machine_config &config) ATTR_COLD;
+ void nes_vt_1mb(machine_config &config) ATTR_COLD;
+ void nes_vt_2mb(machine_config &config) ATTR_COLD;
+ void nes_vt_4mb(machine_config &config) ATTR_COLD;
+ void nes_vt_8mb(machine_config &config) ATTR_COLD;
+ void nes_vt_16mb(machine_config &config) ATTR_COLD;
+ [[maybe_unused]] void nes_vt_32mb(machine_config &config) ATTR_COLD;
- void nes_vt_1mb_majkon(machine_config& config) ATTR_COLD;
+ void nes_vt_1mb_majkon(machine_config &config) ATTR_COLD;
[[maybe_unused]] void vt_external_space_map_32mbyte(address_map &map) ATTR_COLD;
void vt_external_space_map_16mbyte(address_map &map) ATTR_COLD;
@@ -106,19 +106,19 @@ protected:
class nes_vt_swap_op_d5_d6_state : public nes_vt_state
{
public:
- nes_vt_swap_op_d5_d6_state(const machine_config& mconfig, device_type type, const char* tag) :
+ nes_vt_swap_op_d5_d6_state(const machine_config &mconfig, device_type type, const char *tag) :
nes_vt_state(mconfig, type, tag)
{ }
- void nes_vt_vh2009(machine_config& config) ATTR_COLD;
- void nes_vt_vh2009_pal(machine_config& config) ATTR_COLD;
- void nes_vt_vh2009_1mb(machine_config& config) ATTR_COLD;
- void nes_vt_vh2009_2mb(machine_config& config) ATTR_COLD;
- void nes_vt_vh2009_pal_2mb(machine_config& config) ATTR_COLD;
- void nes_vt_vh2009_4mb(machine_config& config) ATTR_COLD;
- void nes_vt_vh2009_8mb(machine_config& config) ATTR_COLD;
+ void nes_vt_vh2009(machine_config &config) ATTR_COLD;
+ void nes_vt_vh2009_pal(machine_config &config) ATTR_COLD;
+ void nes_vt_vh2009_1mb(machine_config &config) ATTR_COLD;
+ void nes_vt_vh2009_2mb(machine_config &config) ATTR_COLD;
+ void nes_vt_vh2009_pal_2mb(machine_config &config) ATTR_COLD;
+ void nes_vt_vh2009_4mb(machine_config &config) ATTR_COLD;
+ void nes_vt_vh2009_8mb(machine_config &config) ATTR_COLD;
- void nes_vt_senwld_512kb(machine_config& config) ATTR_COLD;
+ void nes_vt_senwld_512kb(machine_config &config) ATTR_COLD;
protected:
void vt_external_space_map_senwld_512kbyte(address_map &map) ATTR_COLD;
@@ -127,23 +127,23 @@ protected:
class nes_vt_pjoy_state : public nes_vt_state
{
public:
- nes_vt_pjoy_state(const machine_config& mconfig, device_type type, const char* tag) :
+ nes_vt_pjoy_state(const machine_config &mconfig, device_type type, const char *tag) :
nes_vt_state(mconfig, type, tag)
{ }
- void nes_vt_pjoy_4mb(machine_config& config) ATTR_COLD;
+ void nes_vt_pjoy_4mb(machine_config &config) ATTR_COLD;
};
class nes_vt_waixing_state : public nes_vt_state
{
public:
- nes_vt_waixing_state(const machine_config& mconfig, device_type type, const char* tag) :
+ nes_vt_waixing_state(const machine_config &mconfig, device_type type, const char *tag) :
nes_vt_state(mconfig, type, tag)
{ }
- void nes_vt_waixing_512kb(machine_config& config) ATTR_COLD;
- void nes_vt_waixing_512kb_rasterhack(machine_config& config) ATTR_COLD;
- void nes_vt_waixing_2mb(machine_config& config) ATTR_COLD;
+ void nes_vt_waixing_512kb(machine_config &config) ATTR_COLD;
+ void nes_vt_waixing_512kb_rasterhack(machine_config &config) ATTR_COLD;
+ void nes_vt_waixing_2mb(machine_config &config) ATTR_COLD;
void init_hs36in1() ATTR_COLD;
};
@@ -151,23 +151,23 @@ public:
class nes_vt_waixing_alt_state : public nes_vt_waixing_state
{
public:
- nes_vt_waixing_alt_state(const machine_config& mconfig, device_type type, const char* tag) :
+ nes_vt_waixing_alt_state(const machine_config &mconfig, device_type type, const char *tag) :
nes_vt_waixing_state(mconfig, type, tag)
{ }
- void nes_vt_waixing_alt_4mb(machine_config& config) ATTR_COLD;
- void nes_vt_waixing_alt_pal_8mb(machine_config& config) ATTR_COLD;
+ void nes_vt_waixing_alt_4mb(machine_config &config) ATTR_COLD;
+ void nes_vt_waixing_alt_pal_8mb(machine_config &config) ATTR_COLD;
};
class nes_vt_waixing_alt_sporzpp_state : public nes_vt_waixing_alt_state
{
public:
- nes_vt_waixing_alt_sporzpp_state(const machine_config& mconfig, device_type type, const char* tag) :
+ nes_vt_waixing_alt_sporzpp_state(const machine_config &mconfig, device_type type, const char *tag) :
nes_vt_waixing_alt_state(mconfig, type, tag)
{ }
- void nes_vt_waixing_alt_4mb_sporzpp(machine_config& config) ATTR_COLD;
- void nes_vt_pal_4mb_sporzbxa(machine_config& config) ATTR_COLD;
+ void nes_vt_waixing_alt_4mb_sporzpp(machine_config &config) ATTR_COLD;
+ void nes_vt_pal_4mb_sporzbxa(machine_config &config) ATTR_COLD;
private:
uint8_t in1_r() override
@@ -181,7 +181,7 @@ private:
class nes_vt_wldsoctv_state : public nes_vt_state
{
public:
- nes_vt_wldsoctv_state(const machine_config& mconfig, device_type type, const char* tag) :
+ nes_vt_wldsoctv_state(const machine_config &mconfig, device_type type, const char *tag) :
nes_vt_state(mconfig, type, tag)
{ }
@@ -197,7 +197,7 @@ private:
class nes_vt_timetp36_state : public nes_vt_state
{
public:
- nes_vt_timetp36_state(const machine_config& mconfig, device_type type, const char* tag) :
+ nes_vt_timetp36_state(const machine_config &mconfig, device_type type, const char *tag) :
nes_vt_state(mconfig, type, tag)
{ }
};
@@ -205,33 +205,33 @@ public:
class nes_vt_hum_state : public nes_vt_state
{
public:
- nes_vt_hum_state(const machine_config& mconfig, device_type type, const char* tag) :
+ nes_vt_hum_state(const machine_config &mconfig, device_type type, const char *tag) :
nes_vt_state(mconfig, type, tag)
{ }
- void nes_vt_hummer_2mb(machine_config& config) ATTR_COLD;
- void nes_vt_hummer_4mb(machine_config& config) ATTR_COLD;
+ void nes_vt_hummer_2mb(machine_config &config) ATTR_COLD;
+ void nes_vt_hummer_4mb(machine_config &config) ATTR_COLD;
};
class nes_vt_sp69_state : public nes_vt_state
{
public:
- nes_vt_sp69_state(const machine_config& mconfig, device_type type, const char* tag) :
+ nes_vt_sp69_state(const machine_config &mconfig, device_type type, const char *tag) :
nes_vt_state(mconfig, type, tag)
{ }
- void nes_vt_4mb_sp69(machine_config& config) ATTR_COLD;
+ void nes_vt_4mb_sp69(machine_config &config) ATTR_COLD;
};
class nes_vt_ablping_state : public nes_vt_state
{
public:
- nes_vt_ablping_state(const machine_config& mconfig, device_type type, const char* tag) :
+ nes_vt_ablping_state(const machine_config &mconfig, device_type type, const char *tag) :
nes_vt_state(mconfig, type, tag)
{ }
- void nes_vt_2mb_ablping(machine_config& config) ATTR_COLD;
- void nes_vt_2mb_vfootbal(machine_config& config) ATTR_COLD;
+ void nes_vt_2mb_ablping(machine_config &config) ATTR_COLD;
+ void nes_vt_2mb_vfootbal(machine_config &config) ATTR_COLD;
private:
uint8_t ablping_extraio_r();
@@ -242,13 +242,13 @@ private:
class nes_vt_ablpinb_state : public nes_vt_state
{
public:
- nes_vt_ablpinb_state(const machine_config& mconfig, device_type type, const char* tag) :
+ nes_vt_ablpinb_state(const machine_config &mconfig, device_type type, const char *tag) :
nes_vt_state(mconfig, type, tag),
m_ablpinb_in0_val(0),
m_plunger(*this, "PLUNGER")
{ }
- void nes_vt_waixing_alt_4mb_sporzpp(machine_config& config) ATTR_COLD;
+ void nes_vt_waixing_alt_4mb_sporzpp(machine_config &config) ATTR_COLD;
protected:
virtual void machine_start() override ATTR_COLD;
@@ -271,13 +271,13 @@ private:
class nes_vt_tvmjfc_state : public nes_vt_state
{
public:
- nes_vt_tvmjfc_state(const machine_config& mconfig, device_type type, const char* tag) :
+ nes_vt_tvmjfc_state(const machine_config &mconfig, device_type type, const char *tag) :
nes_vt_state(mconfig, type, tag),
m_mj_panel_index(0),
m_mj_panel(*this, "MJ%u", 0U)
{ }
- void nes_vt_tvmjfc(machine_config& config) ATTR_COLD;
+ void nes_vt_tvmjfc(machine_config &config) ATTR_COLD;
protected:
virtual void machine_start() override ATTR_COLD;
@@ -528,7 +528,7 @@ void nes_vt_tvmjfc_state::in0_w(uint8_t data)
}
-void nes_vt_base_state::configure_soc(nes_vt02_vt03_soc_device* soc)
+void nes_vt_base_state::configure_soc(nes_vt02_vt03_soc_device *soc)
{
soc->set_addrmap(AS_PROGRAM, &nes_vt_state::vt_external_space_map_32mbyte);
soc->read_0_callback().set(FUNC(nes_vt_base_state::in0_r));
@@ -541,21 +541,21 @@ void nes_vt_base_state::configure_soc(nes_vt02_vt03_soc_device* soc)
soc->extra_read_3_callback().set(FUNC(nes_vt_base_state::extrain_r<3>));
}
-void nes_vt_state::nes_vt_512kb(machine_config& config)
+void nes_vt_state::nes_vt_512kb(machine_config &config)
{
NES_VT02_VT03_SOC(config, m_soc, NTSC_APU_CLOCK);
configure_soc(m_soc);
m_soc->set_addrmap(AS_PROGRAM, &nes_vt_state::vt_external_space_map_512kbyte);
}
-void nes_vt_state::nes_vt_1mb(machine_config& config)
+void nes_vt_state::nes_vt_1mb(machine_config &config)
{
NES_VT02_VT03_SOC(config, m_soc, NTSC_APU_CLOCK);
configure_soc(m_soc);
m_soc->set_addrmap(AS_PROGRAM, &nes_vt_state::vt_external_space_map_1mbyte);
}
-void nes_vt_state::nes_vt_2mb(machine_config& config)
+void nes_vt_state::nes_vt_2mb(machine_config &config)
{
NES_VT02_VT03_SOC(config, m_soc, NTSC_APU_CLOCK);
configure_soc(m_soc);
@@ -564,63 +564,63 @@ void nes_vt_state::nes_vt_2mb(machine_config& config)
-void nes_vt_state::nes_vt_4mb(machine_config& config)
+void nes_vt_state::nes_vt_4mb(machine_config &config)
{
NES_VT02_VT03_SOC(config, m_soc, NTSC_APU_CLOCK);
configure_soc(m_soc);
m_soc->set_addrmap(AS_PROGRAM, &nes_vt_state::vt_external_space_map_4mbyte);
}
-void nes_vt_state::nes_vt_8mb(machine_config& config)
+void nes_vt_state::nes_vt_8mb(machine_config &config)
{
NES_VT02_VT03_SOC(config, m_soc, NTSC_APU_CLOCK);
configure_soc(m_soc);
m_soc->set_addrmap(AS_PROGRAM, &nes_vt_state::vt_external_space_map_8mbyte);
}
-void nes_vt_state::nes_vt_16mb(machine_config& config)
+void nes_vt_state::nes_vt_16mb(machine_config &config)
{
NES_VT02_VT03_SOC(config, m_soc, NTSC_APU_CLOCK);
configure_soc(m_soc);
m_soc->set_addrmap(AS_PROGRAM, &nes_vt_state::vt_external_space_map_16mbyte);
}
-void nes_vt_state::nes_vt_32mb(machine_config& config)
+void nes_vt_state::nes_vt_32mb(machine_config &config)
{
NES_VT02_VT03_SOC(config, m_soc, NTSC_APU_CLOCK);
configure_soc(m_soc);
m_soc->set_addrmap(AS_PROGRAM, &nes_vt_state::vt_external_space_map_32mbyte);
}
-void nes_vt_state::nes_vt_pal_1mb(machine_config& config)
+void nes_vt_state::nes_vt_pal_1mb(machine_config &config)
{
NES_VT02_VT03_SOC_PAL(config, m_soc, PAL_APU_CLOCK);
configure_soc(m_soc);
m_soc->set_addrmap(AS_PROGRAM, &nes_vt_state::vt_external_space_map_1mbyte);
}
-void nes_vt_state::nes_vt_pal_2mb(machine_config& config)
+void nes_vt_state::nes_vt_pal_2mb(machine_config &config)
{
NES_VT02_VT03_SOC_PAL(config, m_soc, PAL_APU_CLOCK);
configure_soc(m_soc);
m_soc->set_addrmap(AS_PROGRAM, &nes_vt_state::vt_external_space_map_2mbyte);
}
-void nes_vt_state::nes_vt_pal_4mb(machine_config& config)
+void nes_vt_state::nes_vt_pal_4mb(machine_config &config)
{
NES_VT02_VT03_SOC_PAL(config, m_soc, PAL_APU_CLOCK);
configure_soc(m_soc);
m_soc->set_addrmap(AS_PROGRAM, &nes_vt_state::vt_external_space_map_4mbyte);
}
-void nes_vt_state::nes_vt_pal_8mb(machine_config& config)
+void nes_vt_state::nes_vt_pal_8mb(machine_config &config)
{
NES_VT02_VT03_SOC_PAL(config, m_soc, PAL_APU_CLOCK);
configure_soc(m_soc);
m_soc->set_addrmap(AS_PROGRAM, &nes_vt_state::vt_external_space_map_8mbyte);
}
-void nes_vt_state::nes_vt_pal_16mb(machine_config& config)
+void nes_vt_state::nes_vt_pal_16mb(machine_config &config)
{
NES_VT02_VT03_SOC_PAL(config, m_soc, PAL_APU_CLOCK);
configure_soc(m_soc);
@@ -667,7 +667,7 @@ void nes_vt_waixing_alt_state::nes_vt_waixing_alt_pal_8mb(machine_config &config
//m_soc->set_8006_scramble(0x7, 0x8); // this is the default config in the SoC device;
}
-void nes_vt_waixing_alt_sporzpp_state::nes_vt_waixing_alt_4mb_sporzpp(machine_config& config)
+void nes_vt_waixing_alt_sporzpp_state::nes_vt_waixing_alt_4mb_sporzpp(machine_config &config)
{
NES_VT02_VT03_SOC_WAIXING(config, m_soc, NTSC_APU_CLOCK);
configure_soc(m_soc);
@@ -677,14 +677,14 @@ void nes_vt_waixing_alt_sporzpp_state::nes_vt_waixing_alt_4mb_sporzpp(machine_co
//m_soc->set_8006_scramble(0x7, 0x8); // this is the default config in the SoC device
}
-void nes_vt_waixing_alt_sporzpp_state::nes_vt_pal_4mb_sporzbxa(machine_config& config)
+void nes_vt_waixing_alt_sporzpp_state::nes_vt_pal_4mb_sporzbxa(machine_config &config)
{
NES_VT02_VT03_SOC_PAL(config, m_soc, PAL_APU_CLOCK);
configure_soc(m_soc);
m_soc->set_addrmap(AS_PROGRAM, &nes_vt_state::vt_external_space_map_4mbyte);
}
-void nes_vt_hum_state::nes_vt_hummer_2mb(machine_config& config)
+void nes_vt_hum_state::nes_vt_hummer_2mb(machine_config &config)
{
NES_VT02_VT03_SOC_HUMMER(config, m_soc, NTSC_APU_CLOCK);
configure_soc(m_soc);
@@ -693,7 +693,7 @@ void nes_vt_hum_state::nes_vt_hummer_2mb(machine_config& config)
//m_soc->set_8006_scramble(0x7, 0x8); // this is the default config in the SoC device
}
-void nes_vt_hum_state::nes_vt_hummer_4mb(machine_config& config)
+void nes_vt_hum_state::nes_vt_hummer_4mb(machine_config &config)
{
nes_vt_hummer_2mb(config);
m_soc->set_addrmap(AS_PROGRAM, &nes_vt_hum_state::vt_external_space_map_4mbyte);
@@ -710,7 +710,7 @@ void nes_vt_pjoy_state::nes_vt_pjoy_4mb(machine_config &config)
}
-void nes_vt_sp69_state::nes_vt_4mb_sp69(machine_config& config)
+void nes_vt_sp69_state::nes_vt_4mb_sp69(machine_config &config)
{
NES_VT02_VT03_SOC_SPORTS(config, m_soc, NTSC_APU_CLOCK);
configure_soc(m_soc);
@@ -763,7 +763,7 @@ void nes_vt_base_state::upper_412c_w(uint8_t data)
}
-void nes_vt_state::nes_vt_1mb_majkon(machine_config& config)
+void nes_vt_state::nes_vt_1mb_majkon(machine_config &config)
{
NES_VT02_VT03_SOC(config, m_soc, NTSC_APU_CLOCK);
configure_soc(m_soc);
@@ -860,31 +860,31 @@ void nes_vt_swap_op_d5_d6_state::nes_vt_vh2009_pal(machine_config &config)
configure_soc(m_soc);
}
-void nes_vt_swap_op_d5_d6_state::nes_vt_vh2009_1mb(machine_config& config)
+void nes_vt_swap_op_d5_d6_state::nes_vt_vh2009_1mb(machine_config &config)
{
nes_vt_vh2009(config);
m_soc->set_addrmap(AS_PROGRAM, &nes_vt_swap_op_d5_d6_state::vt_external_space_map_1mbyte);
}
-void nes_vt_swap_op_d5_d6_state::nes_vt_vh2009_2mb(machine_config& config)
+void nes_vt_swap_op_d5_d6_state::nes_vt_vh2009_2mb(machine_config &config)
{
nes_vt_vh2009(config);
m_soc->set_addrmap(AS_PROGRAM, &nes_vt_swap_op_d5_d6_state::vt_external_space_map_2mbyte);
}
-void nes_vt_swap_op_d5_d6_state::nes_vt_vh2009_pal_2mb(machine_config& config)
+void nes_vt_swap_op_d5_d6_state::nes_vt_vh2009_pal_2mb(machine_config &config)
{
nes_vt_vh2009_pal(config);
m_soc->set_addrmap(AS_PROGRAM, &nes_vt_swap_op_d5_d6_state::vt_external_space_map_2mbyte);
}
-void nes_vt_swap_op_d5_d6_state::nes_vt_vh2009_4mb(machine_config& config)
+void nes_vt_swap_op_d5_d6_state::nes_vt_vh2009_4mb(machine_config &config)
{
nes_vt_vh2009(config);
m_soc->set_addrmap(AS_PROGRAM, &nes_vt_swap_op_d5_d6_state::vt_external_space_map_4mbyte);
}
-void nes_vt_swap_op_d5_d6_state::nes_vt_vh2009_8mb(machine_config& config)
+void nes_vt_swap_op_d5_d6_state::nes_vt_vh2009_8mb(machine_config &config)
{
nes_vt_vh2009(config);
m_soc->set_addrmap(AS_PROGRAM, &nes_vt_swap_op_d5_d6_state::vt_external_space_map_8mbyte);
diff --git a/src/mame/nintendo/nes_vt09.cpp b/src/mame/nintendo/nes_vt09.cpp
index e1581588adc..4fa069c7d2a 100644
--- a/src/mame/nintendo/nes_vt09.cpp
+++ b/src/mame/nintendo/nes_vt09.cpp
@@ -31,7 +31,7 @@ namespace {
class nes_vt09_common_base_state : public driver_device
{
public:
- nes_vt09_common_base_state(const machine_config& mconfig, device_type type, const char* tag) :
+ nes_vt09_common_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"),
@@ -57,7 +57,7 @@ protected:
optional_ioport_array<4> m_exin;
- void configure_soc(nes_vt02_vt03_soc_device* soc);
+ void configure_soc(nes_vt02_vt03_soc_device *soc);
uint8_t upper_412c_r();
uint8_t upper_412d_r();
@@ -71,7 +71,7 @@ private:
class nes_vt09_common_state : public nes_vt09_common_base_state
{
public:
- nes_vt09_common_state(const machine_config& mconfig, device_type type, const char* tag) :
+ nes_vt09_common_state(const machine_config &mconfig, device_type type, const char *tag) :
nes_vt09_common_base_state(mconfig, type, tag),
m_soc(*this, "soc")
{ }
@@ -92,17 +92,17 @@ protected:
class nes_vt09_state : public nes_vt09_common_state
{
public:
- nes_vt09_state(const machine_config& mconfig, device_type type, const char* tag) :
+ nes_vt09_state(const machine_config &mconfig, device_type type, const char *tag) :
nes_vt09_common_state(mconfig, type, tag)
{ }
- void nes_vt09(machine_config& config);
- void nes_vt09_1mb(machine_config& config);
- void nes_vt09_2mb(machine_config& config);
- void nes_vt09_4mb(machine_config& config);
- void nes_vt09_4mb_rasterhack(machine_config& config);
- void nes_vt09_8mb(machine_config& config);
- void nes_vt09_16mb(machine_config& config);
+ void nes_vt09(machine_config &config);
+ void nes_vt09_1mb(machine_config &config);
+ void nes_vt09_2mb(machine_config &config);
+ void nes_vt09_4mb(machine_config &config);
+ void nes_vt09_4mb_rasterhack(machine_config &config);
+ void nes_vt09_8mb(machine_config &config);
+ void nes_vt09_16mb(machine_config &config);
private:
};
@@ -110,14 +110,14 @@ private:
class nes_vt09_cart_state : public nes_vt09_state
{
public:
- nes_vt09_cart_state(const machine_config& mconfig, device_type type, const char* tag) :
+ nes_vt09_cart_state(const machine_config &mconfig, device_type type, const char *tag) :
nes_vt09_state(mconfig, type, tag),
m_bank(*this, "cartbank"),
m_cart(*this, "cartslot"),
m_cart_region(nullptr)
{ }
- void nes_vt09_cart(machine_config& config);
+ void nes_vt09_cart(machine_config &config);
protected:
void machine_start() override ATTR_COLD;
@@ -264,7 +264,7 @@ void nes_vt09_common_base_state::machine_reset()
{
}
-void nes_vt09_common_base_state::configure_soc(nes_vt02_vt03_soc_device* soc)
+void nes_vt09_common_base_state::configure_soc(nes_vt02_vt03_soc_device *soc)
{
soc->set_addrmap(AS_PROGRAM, &nes_vt09_common_state::vt_external_space_map_32mbyte);
soc->read_0_callback().set(FUNC(nes_vt09_common_base_state::in0_r));
@@ -310,43 +310,43 @@ void nes_vt09_state::nes_vt09(machine_config &config)
m_soc->force_bad_dma();
}
-void nes_vt09_state::nes_vt09_16mb(machine_config& config)
+void nes_vt09_state::nes_vt09_16mb(machine_config &config)
{
nes_vt09(config);
m_soc->set_addrmap(AS_PROGRAM, &nes_vt09_state::vt_external_space_map_16mbyte);
}
-void nes_vt09_state::nes_vt09_8mb(machine_config& config)
+void nes_vt09_state::nes_vt09_8mb(machine_config &config)
{
nes_vt09(config);
m_soc->set_addrmap(AS_PROGRAM, &nes_vt09_state::vt_external_space_map_8mbyte);
}
-void nes_vt09_state::nes_vt09_1mb(machine_config& config)
+void nes_vt09_state::nes_vt09_1mb(machine_config &config)
{
nes_vt09(config);
m_soc->set_addrmap(AS_PROGRAM, &nes_vt09_state::vt_external_space_map_1mbyte);
}
-void nes_vt09_state::nes_vt09_2mb(machine_config& config)
+void nes_vt09_state::nes_vt09_2mb(machine_config &config)
{
nes_vt09(config);
m_soc->set_addrmap(AS_PROGRAM, &nes_vt09_state::vt_external_space_map_2mbyte);
}
-void nes_vt09_state::nes_vt09_4mb(machine_config& config)
+void nes_vt09_state::nes_vt09_4mb(machine_config &config)
{
nes_vt09(config);
m_soc->set_addrmap(AS_PROGRAM, &nes_vt09_state::vt_external_space_map_4mbyte);
}
-void nes_vt09_state::nes_vt09_4mb_rasterhack(machine_config& config)
+void nes_vt09_state::nes_vt09_4mb_rasterhack(machine_config &config)
{
nes_vt09_4mb(config);
m_soc->force_raster_timing_hack();
}
-void nes_vt09_cart_state::nes_vt09_cart(machine_config& config)
+void nes_vt09_cart_state::nes_vt09_cart(machine_config &config)
{
nes_vt09(config);
m_soc->set_addrmap(AS_PROGRAM, &nes_vt09_cart_state::vt_external_space_map_cart);
diff --git a/src/mame/nintendo/nes_vt09_soc.cpp b/src/mame/nintendo/nes_vt09_soc.cpp
index 3235f689ea5..d0a792e9bfe 100644
--- a/src/mame/nintendo/nes_vt09_soc.cpp
+++ b/src/mame/nintendo/nes_vt09_soc.cpp
@@ -7,12 +7,12 @@
DEFINE_DEVICE_TYPE(NES_VT09_SOC, nes_vt09_soc_device, "nes_vt09_soc", "VT09 series System on a Chip (NTSC)")
-nes_vt09_soc_device::nes_vt09_soc_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock) :
+nes_vt09_soc_device::nes_vt09_soc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
nes_vt09_soc_device(mconfig, NES_VT09_SOC, tag, owner, clock)
{
}
-nes_vt09_soc_device::nes_vt09_soc_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, uint32_t clock) :
+nes_vt09_soc_device::nes_vt09_soc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) :
nes_vt02_vt03_soc_device(mconfig, type, tag, owner, clock),
m_upper_write_412c_callback(*this),
m_upper_read_412c_callback(*this, 0xff),
@@ -24,7 +24,7 @@ nes_vt09_soc_device::nes_vt09_soc_device(const machine_config& mconfig, device_t
/* '4K' specifics */
/***********************************************************************************************************************************************************/
-void nes_vt09_soc_device::device_add_mconfig(machine_config& config)
+void nes_vt09_soc_device::device_add_mconfig(machine_config &config)
{
nes_vt02_vt03_soc_device::device_add_mconfig(config);
m_maincpu->set_addrmap(AS_PROGRAM, &nes_vt09_soc_device::nes_vt_4k_ram_map);
diff --git a/src/mame/nintendo/nes_vt09_soc.h b/src/mame/nintendo/nes_vt09_soc.h
index bff0cb4c61f..b0165bbbb6d 100644
--- a/src/mame/nintendo/nes_vt09_soc.h
+++ b/src/mame/nintendo/nes_vt09_soc.h
@@ -10,7 +10,7 @@
class nes_vt09_soc_device : public nes_vt02_vt03_soc_device
{
public:
- nes_vt09_soc_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock);
+ nes_vt09_soc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// are these even part of vt09, or should they be moved out of here rather than this being treated as a base class for them?
auto upper_read_412c_callback() { return m_upper_read_412c_callback.bind(); }
@@ -20,9 +20,9 @@ public:
protected:
- nes_vt09_soc_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, uint32_t clock);
+ nes_vt09_soc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
- virtual void device_add_mconfig(machine_config& config) override;
+ virtual void device_add_mconfig(machine_config &config) override;
void nes_vt_4k_ram_map(address_map &map) ATTR_COLD;
diff --git a/src/mame/nintendo/nes_vt32.cpp b/src/mame/nintendo/nes_vt32.cpp
index a3e157ead05..c698e3f9598 100644
--- a/src/mame/nintendo/nes_vt32.cpp
+++ b/src/mame/nintendo/nes_vt32.cpp
@@ -19,7 +19,7 @@ namespace {
class nes_vt32_base_state : public driver_device
{
public:
- nes_vt32_base_state(const machine_config& mconfig, device_type type, const char* tag) :
+ 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"),
@@ -48,7 +48,7 @@ protected:
/* Misc */
uint32_t m_ahigh; // external banking bits
- void configure_soc(nes_vt02_vt03_soc_device* soc);
+ void configure_soc(nes_vt02_vt03_soc_device *soc);
uint8_t upper_412c_r();
uint8_t upper_412d_r();
@@ -62,7 +62,7 @@ private:
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_state(const machine_config &mconfig, device_type type, const char *tag) :
nes_vt32_base_state(mconfig, type, tag),
m_soc(*this, "soc")
{ }
@@ -81,19 +81,19 @@ protected:
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_unk_state(const machine_config &mconfig, device_type type, const char *tag) :
nes_vt32_state(mconfig, type, tag),
m_prgrom(*this, "mainrom")
{ }
- void nes_vt32_fp(machine_config& config);
- void nes_vt32_2mb(machine_config& config);
- void nes_vt32_8mb(machine_config& config);
- void nes_vt32_16mb(machine_config& config);
- void nes_vt32_32mb(machine_config& config);
- void nes_vt32_4x16mb(machine_config& config);
+ void nes_vt32_fp(machine_config &config) ATTR_COLD;
+ void nes_vt32_2mb(machine_config &config) ATTR_COLD;
+ void nes_vt32_8mb(machine_config &config) ATTR_COLD;
+ void nes_vt32_16mb(machine_config &config) ATTR_COLD;
+ void nes_vt32_32mb(machine_config &config) ATTR_COLD;
+ void nes_vt32_4x16mb(machine_config &config) ATTR_COLD;
- void nes_vt32_pal_32mb(machine_config& config);
+ void nes_vt32_pal_32mb(machine_config &config) ATTR_COLD;
protected:
uint8_t vt_rom_banked_r(offs_t offset);
@@ -218,7 +218,7 @@ void nes_vt32_base_state::machine_reset()
}
-void nes_vt32_base_state::configure_soc(nes_vt02_vt03_soc_device* soc)
+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));
@@ -288,7 +288,7 @@ void nes_vt32_unk_state::nes_vt32_fp(machine_config &config)
m_soc->force_bad_dma();
}
-void nes_vt32_unk_state::nes_vt32_pal_32mb(machine_config& config)
+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
@@ -304,7 +304,7 @@ void nes_vt32_unk_state::nes_vt32_pal_32mb(machine_config& config)
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)
+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);
@@ -313,25 +313,25 @@ void nes_vt32_unk_state::nes_vt32_4x16mb(machine_config& config)
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_2mb(machine_config& config)
+void nes_vt32_unk_state::nes_vt32_2mb(machine_config &config)
{
nes_vt32_fp(config);
m_soc->set_addrmap(AS_PROGRAM, &nes_vt32_unk_state::vt_external_space_map_2mbyte);
}
-void nes_vt32_unk_state::nes_vt32_8mb(machine_config& config)
+void nes_vt32_unk_state::nes_vt32_8mb(machine_config &config)
{
nes_vt32_fp(config);
m_soc->set_addrmap(AS_PROGRAM, &nes_vt32_unk_state::vt_external_space_map_8mbyte);
}
-void nes_vt32_unk_state::nes_vt32_16mb(machine_config& config)
+void nes_vt32_unk_state::nes_vt32_16mb(machine_config &config)
{
nes_vt32_fp(config);
m_soc->set_addrmap(AS_PROGRAM, &nes_vt32_unk_state::vt_external_space_map_16mbyte);
}
-void nes_vt32_unk_state::nes_vt32_32mb(machine_config& config)
+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);
diff --git a/src/mame/nintendo/nes_vt32_soc.cpp b/src/mame/nintendo/nes_vt32_soc.cpp
index 803483f31cb..c9969cd93e8 100644
--- a/src/mame/nintendo/nes_vt32_soc.cpp
+++ b/src/mame/nintendo/nes_vt32_soc.cpp
@@ -18,17 +18,17 @@
DEFINE_DEVICE_TYPE(NES_VT32_SOC, nes_vt32_soc_device, "nes_vt32_soc", "VT32 series System on a Chip (FP) (NTSC)")
DEFINE_DEVICE_TYPE(NES_VT32_SOC_PAL, nes_vt32_soc_pal_device, "nes_vt32_soc_pal", "VT32 series System on a Chip (FP) (PAL)")
-nes_vt32_soc_device::nes_vt32_soc_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, u32 clock) :
+nes_vt32_soc_device::nes_vt32_soc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) :
nes_vt09_soc_device(mconfig, type, tag, owner, clock)
{
}
-nes_vt32_soc_device::nes_vt32_soc_device(const machine_config& mconfig, const char* tag, device_t* owner, u32 clock) :
+nes_vt32_soc_device::nes_vt32_soc_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) :
nes_vt32_soc_device(mconfig, NES_VT32_SOC, tag, owner, clock)
{
}
-nes_vt32_soc_pal_device::nes_vt32_soc_pal_device(const machine_config& mconfig, const char* tag, device_t* owner, u32 clock) :
+nes_vt32_soc_pal_device::nes_vt32_soc_pal_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) :
nes_vt32_soc_device(mconfig, NES_VT32_SOC_PAL, tag, owner, clock)
{
}
@@ -75,7 +75,7 @@ u8 nes_vt32_soc_device::chr_r(offs_t offset)
}
-void nes_vt32_soc_device::device_add_mconfig(machine_config& config)
+void nes_vt32_soc_device::device_add_mconfig(machine_config &config)
{
RP2A03_VTSCR(config, m_maincpu, NTSC_APU_CLOCK);
m_maincpu->set_addrmap(AS_PROGRAM, &nes_vt32_soc_device::nes_vt32_soc_map);
@@ -106,7 +106,7 @@ void nes_vt32_soc_device::device_add_mconfig(machine_config& config)
m_apu->add_route(ALL_OUTPUTS, "mono", 0.50);
}
-void nes_vt32_soc_pal_device::do_pal_timings_and_ppu_replacement(machine_config& config)
+void nes_vt32_soc_pal_device::do_pal_timings_and_ppu_replacement(machine_config &config)
{
m_maincpu->set_clock(PALC_APU_CLOCK);
@@ -124,7 +124,7 @@ void nes_vt32_soc_pal_device::do_pal_timings_and_ppu_replacement(machine_config&
m_screen->set_visarea(0 * 8, 32 * 8 - 1, 0 * 8, 30 * 8 - 1);
}
-void nes_vt32_soc_pal_device::device_add_mconfig(machine_config& config)
+void nes_vt32_soc_pal_device::device_add_mconfig(machine_config &config)
{
nes_vt32_soc_device::device_add_mconfig(config);
do_pal_timings_and_ppu_replacement(config);
diff --git a/src/mame/nintendo/nes_vt32_soc.h b/src/mame/nintendo/nes_vt32_soc.h
index e9280c9c208..8ecbf3b968d 100644
--- a/src/mame/nintendo/nes_vt32_soc.h
+++ b/src/mame/nintendo/nes_vt32_soc.h
@@ -11,15 +11,15 @@
class nes_vt32_soc_device : public nes_vt09_soc_device
{
public:
- nes_vt32_soc_device(const machine_config& mconfig, const char* tag, device_t* owner, u32 clock);
+ nes_vt32_soc_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
protected:
virtual void device_start() override;
virtual void device_reset() override;
- nes_vt32_soc_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, u32 clock);
+ nes_vt32_soc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock);
- virtual void device_add_mconfig(machine_config& config) override ATTR_COLD;
+ virtual void device_add_mconfig(machine_config &config) override ATTR_COLD;
void nes_vt32_soc_map(address_map &map) ATTR_COLD;
@@ -61,12 +61,12 @@ private:
class nes_vt32_soc_pal_device : public nes_vt32_soc_device
{
public:
- nes_vt32_soc_pal_device(const machine_config& mconfig, const char* tag, device_t* owner, u32 clock);
+ nes_vt32_soc_pal_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
protected:
- virtual void device_add_mconfig(machine_config& config) override ATTR_COLD;
+ virtual void device_add_mconfig(machine_config &config) override ATTR_COLD;
- virtual void do_pal_timings_and_ppu_replacement(machine_config& config) override;
+ virtual void do_pal_timings_and_ppu_replacement(machine_config &config) override;
};
diff --git a/src/mame/nintendo/nes_vt369_vtunknown.cpp b/src/mame/nintendo/nes_vt369_vtunknown.cpp
index ea1d7483486..8fca43adf81 100644
--- a/src/mame/nintendo/nes_vt369_vtunknown.cpp
+++ b/src/mame/nintendo/nes_vt369_vtunknown.cpp
@@ -24,15 +24,20 @@
#include "nes_vt369_vtunknown_soc.h"
#include "vt_menu_protection.h"
+#include "vt_menu_protection_lxcap.h"
+
+#include "machine/eepromser.h"
+#include "machine/i2cmem.h"
#include "multibyte.h"
+#include "speaker.h"
namespace {
class vt369_base_state : public driver_device
{
public:
- vt369_base_state(const machine_config& mconfig, device_type type, const char* tag) :
+ vt369_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"),
@@ -69,7 +74,7 @@ protected:
required_region_ptr<u8> m_prgrom;
- void configure_soc(nes_vt02_vt03_soc_device* soc);
+ void configure_soc(vt3xx_soc_base_device *soc);
void extbank_w(u8 data);
void extbank_red5mam_w(u8 data);
@@ -78,12 +83,14 @@ protected:
private:
/* Extra IO */
template <u8 NUM> u8 extrain_r();
+ u8 default_4139_r();
+ u8 default_414b_r();
};
class vt369_state : public vt369_base_state
{
public:
- vt369_state(const machine_config& mconfig, device_type type, const char* tag) :
+ vt369_state(const machine_config &mconfig, device_type type, const char *tag) :
vt369_base_state(mconfig, type, tag),
m_soc(*this, "soc")
{ }
@@ -114,54 +121,55 @@ protected:
class vt36x_state : public vt369_state
{
public:
- vt36x_state(const machine_config& mconfig, device_type type, const char* tag) :
+ vt36x_state(const machine_config &mconfig, device_type type, const char *tag) :
vt369_state(mconfig, type, tag)
{ }
- void vt36x(machine_config& config);
- void vt36x_1mb(machine_config& config);
- void vt36x_4mb(machine_config& config);
- void vt36x_8mb(machine_config& config);
- void vt36x_16mb(machine_config& config);
- void vt36x_16mb_sdcard(machine_config& config);
- void vt36x_32mb(machine_config& config);
- void vt36x_32mb_2banks_lexi(machine_config& config);
- void vt36x_32mb_2banks_lexi300(machine_config& config);
- void vt36x_h12p1000(machine_config& config);
-
- void vt36x_swap(machine_config& config);
- void vt36x_swap_2mb(machine_config& config);
- void vt36x_swap_4mb(machine_config& config);
- void vt36x_swap_8mb(machine_config& config);
- void vt36x_swap_16mb(machine_config& config);
- void vt36x_swap_512kb(machine_config& config);
-
- void vt36x_altswap(machine_config& config);
- void vt36x_altswap_2mb(machine_config& config);
- void vt36x_altswap_4mb(machine_config& config);
- void vt36x_altswap_16mb(machine_config& config);
- void vt36x_altswap_32mb_4banks_red5mam(machine_config& config);
-
- void vt36x_vibesswap_8mb(machine_config& config);
- void vt36x_vibesswap_16mb(machine_config& config);
- void vt36x_gbox2020_8mb(machine_config& config);
- void vt36x_gbox2020_16mb(machine_config& config);
- void vt36x_s10swap_8mb(machine_config& config);
- void vt36x_rsps300swap_16mb(machine_config& config);
-
- void vt369_unk(machine_config& config);
- void vt369_unk_16mb(machine_config& config);
+ void vt36x(machine_config &config) ATTR_COLD;
+ void vt36x_1mb(machine_config &config) ATTR_COLD;
+ void vt36x_4mb(machine_config &config) ATTR_COLD;
+ void vt36x_8mb(machine_config &config) ATTR_COLD;
+ void vt36x_16mb(machine_config &config) ATTR_COLD;
+ void vt36x_16mb_sdcard(machine_config &config) ATTR_COLD;
+ void vt36x_32mb(machine_config &config) ATTR_COLD;
+ void vt36x_32mb_2banks_lexi(machine_config &config) ATTR_COLD;
+ void vt36x_32mb_2banks_lexi300(machine_config &config) ATTR_COLD;
+ void vt36x_h12p1000(machine_config &config) ATTR_COLD;
+
+ void vt36x_swap(machine_config &config) ATTR_COLD;
+ void vt36x_swap_2mb(machine_config &config) ATTR_COLD;
+ void vt36x_swap_4mb(machine_config &config) ATTR_COLD;
+ void vt36x_swap_8mb(machine_config &config) ATTR_COLD;
+ void vt36x_swap_16mb(machine_config &config) ATTR_COLD;
+ void vt36x_swap_512kb(machine_config &config) ATTR_COLD;
+
+ void vt36x_altswap(machine_config &config) ATTR_COLD;
+ void vt36x_altswap_2mb(machine_config &config) ATTR_COLD;
+ void vt36x_altswap_4mb(machine_config &config) ATTR_COLD;
+ void vt36x_altswap_16mb(machine_config &config) ATTR_COLD;
+ void vt36x_altswap_32mb_4banks_red5mam(machine_config &config) ATTR_COLD;
+
+ void vt36x_vibesswap_8mb(machine_config &config) ATTR_COLD;
+ void vt36x_vibesswap_16mb(machine_config &config) ATTR_COLD;
+ void vt36x_gbox2020_8mb(machine_config &config) ATTR_COLD;
+ void vt36x_gbox2020_16mb(machine_config &config) ATTR_COLD;
+ void vt36x_s10swap_8mb(machine_config &config) ATTR_COLD;
+ void vt36x_rsps300swap_16mb(machine_config &config) ATTR_COLD;
+
+ void vt369_unk(machine_config &config) ATTR_COLD;
+ void vt369_unk_16mb(machine_config &config) ATTR_COLD;
};
class vt36x_gtct885_state : public vt36x_state
{
public:
- vt36x_gtct885_state(const machine_config& mconfig, device_type type, const char* tag) :
+ vt36x_gtct885_state(const machine_config &mconfig, device_type type, const char *tag) :
vt36x_state(mconfig, type, tag),
m_protection(*this, "protection")
{ }
- void vt36x_8mb_gtct885(machine_config& config);
+ void vt36x_8mb_gtct885(machine_config &config) ATTR_COLD;
+ void vt36x_altswap_2mb_36pcase(machine_config &config) ATTR_COLD;
private:
u8 gtct885_prot_r();
@@ -173,13 +181,13 @@ private:
class vt36x_goretrop_state : public vt36x_state
{
public:
- vt36x_goretrop_state(const machine_config& mconfig, device_type type, const char* tag) :
+ vt36x_goretrop_state(const machine_config &mconfig, device_type type, const char *tag) :
vt36x_state(mconfig, type, tag),
m_protection(*this, "protection")
{ }
- void vt36x_32mb_goretrop(machine_config& config);
- void vt36x_1mb_rbbrite(machine_config& config);
+ void vt36x_32mb_goretrop(machine_config &config) ATTR_COLD;
+ void vt36x_1mb_rbbrite(machine_config &config) ATTR_COLD;
private:
u8 goretrop_prot_r();
@@ -191,59 +199,47 @@ private:
class vt36x_tetrtin_state : public vt36x_state
{
public:
- vt36x_tetrtin_state(const machine_config& mconfig, device_type type, const char* tag) :
- vt36x_state(mconfig, type, tag)
+ vt36x_tetrtin_state(const machine_config &mconfig, device_type type, const char *tag) :
+ vt36x_state(mconfig, type, tag),
+ m_protection(*this, "protection")
{ }
-protected:
- virtual void machine_reset() override;
+ void vt36x_1mb_tetrtin(machine_config& config) ATTR_COLD;
+ void vt36x_8mb_lxcap(machine_config &config) ATTR_COLD;
+ void vt36x_8mb_pixel(machine_config &config) ATTR_COLD;
+ void vt36x_16mb_nesvt270(machine_config &config) ATTR_COLD;
+protected:
+ u8 lxcap_prot_r();
+ void lxcap_prot_w(u8 data);
+ u8 pixel_prot_r();
+ void pixel_prot_w(u8 data);
+ u8 nesvt270_prot_r();
+ void nesvt270_prot_w(u8 data);
+
+ required_device<vt_menu_protection_lxcap_device> m_protection;
};
-void vt36x_tetrtin_state::machine_reset()
+class vt36x_otrail_state : public vt36x_tetrtin_state
{
- vt36x_state::machine_reset();
- // the game appears to require code/data from an additional device (not just the standard internal ROM)
- // there's an 8-pin chip on the PCB which is likely responsible
+public:
+ vt36x_otrail_state(const machine_config &mconfig, device_type type, const char *tag) :
+ vt36x_tetrtin_state(mconfig, type, tag),
+ m_i2cmem(*this, "i2cmem"),
+ m_dac(*this, "dac")
+ { }
- // simulate what that code might be doing
- // copy VT369 internal ROM 0x0000 to 0x4ff4 in CPU space (copying boot vectors for sound CPU, as other games do in code)
- int src = 0;
- u8 *introm = memregion("soc:internal")->base();
- for (int i = 0x4ff4; i < 0x5000; i++)
- {
- m_soc->write_byte_to_cpu(i, introm[src++]);
- }
- u8* gamerom = memregion("mainrom")->base();
+ void vt36x_1mb_otrail(machine_config &config) ATTR_COLD;
- int patchaddress;
+private:
+ void otrail_seeprom_w(u8 data);
+ u8 otrail_seeprom_r();
+ void otrail_sound_w(u8 data);
+ required_device<i2cmem_device> m_i2cmem;
+ required_device<dac_byte_interface> m_dac;
+};
- // tetrtin - jump over a whole lot of code, this is crude, there might be other code still in the startup we could be executing
- patchaddress = 0x7f675;
- if ((gamerom[patchaddress] == 0x20) && (gamerom[patchaddress+1] == 0xcb) && (gamerom[patchaddress+2] == 0xf5))
- {
- gamerom[patchaddress] = 0x4c;
- gamerom[patchaddress+1] = 0xcb;
- gamerom[patchaddress+2] = 0xf6;
- }
- // same for pactin
- patchaddress = 0x7f5a3;
- if ((gamerom[patchaddress] == 0x20) && (gamerom[patchaddress+1] == 0x04) && (gamerom[patchaddress+2] == 0xf5))
- {
- gamerom[patchaddress] = 0x4c;
- gamerom[patchaddress+1] = 0xf9;
- gamerom[patchaddress+2] = 0xf5;
- }
- // lxcap (will show menu, but accesses device again afterwards)
- patchaddress = 0x7ecd4;
- if ((gamerom[patchaddress] == 0x20) && (gamerom[patchaddress+1] == 0x96) && (gamerom[patchaddress+2] == 0xeb))
- {
- gamerom[patchaddress] = 0x4c;
- gamerom[patchaddress+1] = 0x2a;
- gamerom[patchaddress+2] = 0xed;
- }
-}
u8 vt369_state::vt_rom_banked_r(offs_t offset)
{
@@ -307,6 +303,18 @@ template <u8 NUM> u8 vt369_base_state::extrain_r()
return 0x00;
}
+u8 vt369_base_state::default_4139_r()
+{
+ logerror("%s: default_4139_r (not hooked up)\n", machine().describe_context());
+ return 0x00;
+}
+
+u8 vt369_base_state::default_414b_r()
+{
+ // pixel246 and mog_m320 at least require something to be here
+ logerror("%s: default_414b_r (not hooked up)\n", machine().describe_context());
+ return 0x00;
+}
/* Standard I/O handlers (NES Controller clone) */
@@ -369,7 +377,7 @@ void vt369_base_state::machine_reset()
m_ahigh = 0;
}
-void vt369_base_state::configure_soc(nes_vt02_vt03_soc_device* soc)
+void vt369_base_state::configure_soc(vt3xx_soc_base_device *soc)
{
soc->set_addrmap(AS_PROGRAM, &vt369_state::vt_external_space_map_32mbyte);
soc->read_0_callback().set(FUNC(vt369_base_state::in0_r));
@@ -380,6 +388,9 @@ void vt369_base_state::configure_soc(nes_vt02_vt03_soc_device* soc)
soc->extra_read_1_callback().set(FUNC(vt369_base_state::extrain_r<1>));
soc->extra_read_2_callback().set(FUNC(vt369_base_state::extrain_r<2>));
soc->extra_read_3_callback().set(FUNC(vt369_base_state::extrain_r<3>));
+
+ soc->io_4139_read_callback().set(FUNC(vt369_base_state::default_4139_r));
+ soc->io_414b_read_callback().set(FUNC(vt369_base_state::default_414b_r));
}
@@ -392,7 +403,7 @@ void vt36x_state::vt369_unk(machine_config &config)
m_soc->force_bad_dma();
}
-void vt36x_state::vt369_unk_16mb(machine_config& config)
+void vt36x_state::vt369_unk_16mb(machine_config &config)
{
vt369_unk(config);
m_soc->set_addrmap(AS_PROGRAM, &vt36x_state::vt_external_space_map_16mbyte);
@@ -466,7 +477,7 @@ void vt36x_state::vt36x_altswap_4mb(machine_config &config)
m_soc->set_addrmap(AS_PROGRAM, &vt36x_state::vt_external_space_map_4mbyte);
}
-void vt36x_state::vt36x_altswap_16mb(machine_config& config)
+void vt36x_state::vt36x_altswap_16mb(machine_config &config)
{
vt36x_altswap(config);
m_soc->set_addrmap(AS_PROGRAM, &vt36x_state::vt_external_space_map_16mbyte);
@@ -524,7 +535,81 @@ u8 vt36x_goretrop_state::goretrop_prot_r()
return (m_protection->read() ? 0x08 : 0x00);
}
-void vt36x_state::vt36x_altswap_32mb_4banks_red5mam(machine_config& config)
+
+
+void vt36x_tetrtin_state::lxcap_prot_w(u8 data)
+{
+ /*
+ direction is set to 0x03 before writing
+
+ uses the following RAM addresses while accessing device
+ (lxcap / pactin / tetrtin)
+
+ dad / e40 / e42 (80 - command)
+ daf / e42 / e44 (xx - param)
+ db1 / e44 / e46 (direction register?)
+ db3 / e46 / e48 (data bits)
+
+ */
+
+ m_protection->write_data((data & 0x02) ? true : false);
+ m_protection->write_clock((data & 0x01) ? true : false);
+}
+
+u8 vt36x_tetrtin_state::lxcap_prot_r()
+{
+ // direction set to 0x01 before reading (making 0x02 the input)
+ return (m_protection->read() ? 0x02 : 0x00);
+}
+
+
+
+void vt36x_tetrtin_state::pixel_prot_w(u8 data)
+{
+ m_protection->write_data((data & 0x10) ? true : false);
+ m_protection->write_clock((data & 0x20) ? true : false);
+}
+
+u8 vt36x_tetrtin_state::pixel_prot_r()
+{
+ return (m_protection->read() ? 0x10 : 0x00);
+}
+
+u8 vt36x_tetrtin_state::nesvt270_prot_r()
+{
+ return 0x00;// (m_protection->read() ? 0x40 : 0x00);
+}
+
+void vt36x_tetrtin_state::nesvt270_prot_w(u8 data)
+{
+ //m_protection->write_data((data & 0x40) ? true : false);
+ //m_protection->write_clock((data & 0x80) ? true : false);
+}
+
+void vt36x_otrail_state::otrail_seeprom_w(u8 data)
+{
+ m_i2cmem->write_scl((data & 0x04) ? true : false);
+ m_i2cmem->write_sda((data & 0x08) ? true : false);
+}
+
+void vt36x_otrail_state::otrail_sound_w(u8 data)
+{
+ // is this really a DAC?
+ //
+ // it might be an another chip playing samples from an internal ROM
+ // as there are longer sound clips and only short bursts of writes that
+ // look more like commands
+ m_dac->write(data & 0x07);
+}
+
+u8 vt36x_otrail_state::otrail_seeprom_r()
+{
+ return (m_i2cmem->read_sda() ? 0xff : 0xf7);
+}
+
+
+
+void vt36x_state::vt36x_altswap_32mb_4banks_red5mam(machine_config &config)
{
vt36x_altswap(config);
m_soc->set_addrmap(AS_PROGRAM, &vt36x_state::vt_external_space_map_32mbyte_bank);
@@ -589,57 +674,57 @@ void vt36x_state::vt36x_rsps300swap_16mb(machine_config &config)
-void vt36x_state::vt36x_1mb(machine_config& config)
+void vt36x_state::vt36x_1mb(machine_config &config)
{
vt36x(config);
m_soc->set_addrmap(AS_PROGRAM, &vt36x_state::vt_external_space_map_1mbyte);
}
-void vt36x_state::vt36x_4mb(machine_config& config)
+void vt36x_state::vt36x_4mb(machine_config &config)
{
vt36x(config);
m_soc->set_addrmap(AS_PROGRAM, &vt36x_state::vt_external_space_map_4mbyte);
}
-void vt36x_state::vt36x_8mb(machine_config& config)
+void vt36x_state::vt36x_8mb(machine_config &config)
{
vt36x(config);
m_soc->set_addrmap(AS_PROGRAM, &vt36x_state::vt_external_space_map_8mbyte);
}
-void vt36x_state::vt36x_16mb(machine_config& config)
+void vt36x_state::vt36x_16mb(machine_config &config)
{
vt36x(config);
m_soc->set_addrmap(AS_PROGRAM, &vt36x_state::vt_external_space_map_16mbyte);
}
-void vt36x_state::vt36x_16mb_sdcard(machine_config& config)
+void vt36x_state::vt36x_16mb_sdcard(machine_config &config)
{
vt36x(config);
m_soc->set_addrmap(AS_PROGRAM, &vt36x_state::vt_external_space_map_16mbyte);
}
-void vt36x_state::vt36x_32mb(machine_config& config)
+void vt36x_state::vt36x_32mb(machine_config &config)
{
vt36x(config);
m_soc->set_addrmap(AS_PROGRAM, &vt36x_state::vt_external_space_map_32mbyte);
}
-void vt36x_state::vt36x_32mb_2banks_lexi(machine_config& config)
+void vt36x_state::vt36x_32mb_2banks_lexi(machine_config &config)
{
vt36x_32mb(config);
m_soc->set_addrmap(AS_PROGRAM, &vt36x_state::vt_external_space_map_32mbyte_bank);
m_soc->io_4152_write_callback().set(FUNC(vt36x_state::extbank_w));
}
-void vt36x_state::vt36x_32mb_2banks_lexi300(machine_config& config)
+void vt36x_state::vt36x_32mb_2banks_lexi300(machine_config &config)
{
vt36x_32mb(config);
m_soc->set_addrmap(AS_PROGRAM, &vt36x_state::vt_external_space_map_32mbyte_bank);
m_soc->set_411e_write_cb().set(FUNC(vt36x_state::extbank_w)); // could be on 411d
}
-void vt36x_gtct885_state::vt36x_8mb_gtct885(machine_config& config)
+void vt36x_gtct885_state::vt36x_8mb_gtct885(machine_config &config)
{
vt36x_8mb(config);
m_soc->io_4153_read_callback().set(FUNC(vt36x_gtct885_state::gtct885_prot_r));
@@ -648,7 +733,17 @@ void vt36x_gtct885_state::vt36x_8mb_gtct885(machine_config& config)
VT_MENU_PROTECTION(config, m_protection, 0);
}
-void vt36x_goretrop_state::vt36x_32mb_goretrop(machine_config& config)
+void vt36x_gtct885_state::vt36x_altswap_2mb_36pcase(machine_config &config)
+{
+ vt36x_altswap_2mb(config);
+
+ m_soc->io_4153_read_callback().set(FUNC(vt36x_gtct885_state::gtct885_prot_r));
+ m_soc->io_4152_write_callback().set(FUNC(vt36x_gtct885_state::gtct885_prot_w));
+
+ VT_MENU_PROTECTION(config, m_protection, 0);
+}
+
+void vt36x_goretrop_state::vt36x_32mb_goretrop(machine_config &config)
{
vt36x_32mb(config);
m_soc->io_4139_read_callback().set(FUNC(vt36x_goretrop_state::goretrop_prot_r));
@@ -657,19 +752,77 @@ void vt36x_goretrop_state::vt36x_32mb_goretrop(machine_config& config)
VT_MENU_PROTECTION(config, m_protection, 0);
}
-void vt36x_goretrop_state::vt36x_1mb_rbbrite(machine_config& config)
+void vt36x_goretrop_state::vt36x_1mb_rbbrite(machine_config &config)
{
vt36x_32mb_goretrop(config);
m_soc->set_addrmap(AS_PROGRAM, &vt36x_state::vt_external_space_map_1mbyte);
}
-void vt36x_state::vt36x_h12p1000(machine_config& config)
+void vt36x_state::vt36x_h12p1000(machine_config &config)
{
vt36x_16mb(config);
m_soc->set_addrmap(AS_PROGRAM, &vt36x_state::vt_external_space_map_16mbyte_bank);
m_soc->io_4139_write_callback().set(FUNC(vt36x_state::extbank_h12p1000_w));
}
+// there are also accesses to 4158 and 4151 which may be related to the I/O ports
+void vt36x_tetrtin_state::vt36x_1mb_tetrtin(machine_config &config)
+{
+ vt36x_1mb(config);
+ VT_MENU_PROTECTION_LXCAP(config, m_protection, 0);
+
+ m_soc->io_4153_read_callback().set(FUNC(vt36x_tetrtin_state::lxcap_prot_r));
+ m_soc->io_4152_write_callback().set(FUNC(vt36x_tetrtin_state::lxcap_prot_w));
+}
+
+void vt36x_tetrtin_state::vt36x_8mb_lxcap(machine_config &config)
+{
+ vt36x_8mb(config);
+ VT_MENU_PROTECTION_LXCAP(config, m_protection, 0);
+
+ m_soc->io_4153_read_callback().set(FUNC(vt36x_tetrtin_state::lxcap_prot_r));
+ m_soc->io_4152_write_callback().set(FUNC(vt36x_tetrtin_state::lxcap_prot_w));
+}
+
+void vt36x_tetrtin_state::vt36x_8mb_pixel(machine_config &config)
+{
+ vt36x_8mb(config);
+ VT_MENU_PROTECTION_LXCAP(config, m_protection, 0);
+
+ m_soc->io_414b_read_callback().set(FUNC(vt36x_tetrtin_state::pixel_prot_r));
+ m_soc->io_414a_write_callback().set(FUNC(vt36x_tetrtin_state::pixel_prot_w));
+}
+
+void vt36x_tetrtin_state::vt36x_16mb_nesvt270(machine_config &config)
+{
+ vt36x_16mb(config);
+ VT_MENU_PROTECTION_LXCAP(config, m_protection, 0); // might not be this device
+
+ m_soc->io_414b_read_callback().set(FUNC(vt36x_tetrtin_state::nesvt270_prot_r));
+ m_soc->io_414b_write_callback().set(FUNC(vt36x_tetrtin_state::nesvt270_prot_w));
+}
+
+
+void vt36x_otrail_state::vt36x_1mb_otrail(machine_config &config)
+{
+ vt36x_1mb(config);
+ VT_MENU_PROTECTION_LXCAP(config, m_protection, 0);
+
+ I2C_24C04(config, "i2cmem", 0);
+
+ SPEAKER(config, "internal").front_center();
+
+ DAC_3BIT_R2R(config, m_dac, 0).add_route(ALL_OUTPUTS, "internal", 0.15); // unknown sound device (maybe a DAC)
+
+ m_soc->io_414b_read_callback().set(FUNC(vt36x_otrail_state::pixel_prot_r));
+ m_soc->io_414a_write_callback().set(FUNC(vt36x_otrail_state::pixel_prot_w));
+
+ m_soc->io_4153_read_callback().set(FUNC(vt36x_otrail_state::otrail_seeprom_r));
+ m_soc->io_4152_write_callback().set(FUNC(vt36x_otrail_state::otrail_seeprom_w));
+ m_soc->io_4153_write_callback().set(FUNC(vt36x_otrail_state::otrail_sound_w));
+}
+
+
static INPUT_PORTS_START( vt369 )
PORT_START("IO0")
@@ -998,7 +1151,7 @@ ROM_START( 36pcase )
ROM_REGION( 0x200000, "mainrom", 0 )
ROM_LOAD( "25q16.ic3", 0x00000, 0x200000, CRC(a8edb73e) SHA1(1028656530e411607ffa3b63788b42e41bf971d7) )
- ROM_REGION( 0x100, "extra", 0 ) // data from additional 8-pin chip for protection (put at 0xe01 in RAM) (checks for something before this)
+ ROM_REGION( 0x100, "protection", 0 ) // data from additional 8-pin chip for protection (put at 0xe01 in RAM) (checks for something before this)
ROM_LOAD( "mystery chip.bin", 0x00000, 0x100, NO_DUMP )
ROM_END
@@ -1127,8 +1280,14 @@ ROM_START( lxcap )
VT3XX_INTERNAL_NO_SWAP // verified for this set
- ROM_REGION( 0x100, "extra", 0 ) // data from additional 8-pin chip for protection
- ROM_LOAD( "mystery chip.bin", 0x00000, 0x100, CRC(491d206b) SHA1(a5411a7afe3b4df93b1b22e5533f5010bd3aaa93) )
+ //ROM_REGION( 0x100, "protection", 0 ) // data from additional 8-pin chip for protection
+ // This table is just (0x100 - offset) & 0xff with a nibble swap applied at the end
+ //
+ // The chip here (which is accessed in a different way to gtct885 etc.) might not
+ // be fetching data from a table, but doing a calculation
+ //
+ // we just do the calculation instead
+ //ROM_LOAD( "mystery chip.bin", 0x00000, 0x100, CRC(491d206b) SHA1(a5411a7afe3b4df93b1b22e5533f5010bd3aaa93) )
ROM_END
ROM_START( denv150 )
@@ -1156,8 +1315,10 @@ 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) )
+ //VT3XX_INTERNAL_NO_SWAP // not verified for this set, used for testing
+
+ //ROM_REGION( 0x200, "seeprom", 0 )
+ //ROM_LOAD( "t24c04a.bin", 0x000, 0x200, CRC(ce1fad6f) SHA1(82878996765739edba42042b6336460d5c8f8096) )
ROM_END
ROM_START( pactin )
@@ -1238,8 +1399,8 @@ ROM_START( matetsl )
ROM_END
ROM_START( nesvt270 )
- ROM_REGION( 0x2000000, "mainrom", 0 )
- ROM_LOAD( "w25q128jvs.u3", 0x00000, 0x1000300, CRC(fe189a90) SHA1(7f07ae89ae7ff49f139e936b08c9ef2a3467ea92) )
+ ROM_REGION( 0x1000000, "mainrom", 0 )
+ ROM_LOAD( "w25q128jvs.u3", 0x00000, 0x1000000, CRC(8ff28dcc) SHA1(ea1aab0beb54c0b5a9a79211542f8f0f7fce676d) )
ROM_END
ROM_START( rbbrite )
@@ -1330,6 +1491,22 @@ ROM_START( goretropa )
ROM_LOAD( "mystery chip.bin", 0x00000, 0x100, NO_DUMP )
ROM_END
+ROM_START( goretropu13 )
+ ROM_REGION( 0x2000000, "mainrom", 0 )
+ ROM_LOAD( "goretroportable250p_v13.bin", 0x00000, 0x2000000, CRC(b2a94173) SHA1(e64989f4b0a29820b0dce5e0ca91abb8f247c269) )
+
+ ROM_REGION( 0x100, "protection", 0 ) // data from additional 8-pin chip for protection (copied to 0x701 - 0x7ff)
+ ROM_LOAD( "mystery chip.bin", 0x00000, 0x100, NO_DUMP )
+ROM_END
+
+ROM_START( goretropu12 )
+ ROM_REGION( 0x2000000, "mainrom", 0 )
+ ROM_LOAD( "goretroportable250p_v12.bin", 0x00000, 0x2000000, CRC(fda93863) SHA1(75e48ac27e5520953676894747d6d06307cdc1af) )
+
+ ROM_REGION( 0x100, "protection", 0 ) // data from additional 8-pin chip for protection (copied to 0x701 - 0x7ff)
+ ROM_LOAD( "mystery chip.bin", 0x00000, 0x100, NO_DUMP )
+ROM_END
+
ROM_START( s10fake )
ROM_REGION( 0x800000, "mainrom", 0 )
ROM_LOAD( "s29gl064a90tfir4.bin", 0x00000, 0x800000, CRC(8ba78851) SHA1(d482fc56efbbdf6ff890b775144fd49ecaa1b539) )
@@ -1626,8 +1803,8 @@ CONS( 201?, 240in1ar, 0, 0, vt36x_altswap_32mb_4banks_red5mam, vt369, vt36x_s
// portable fan + famiclone combo handheld, very similar to 240in1ar
CONS( 2020, nubsupmf, 0, 0, vt36x_altswap_4mb, vt369, vt36x_state, empty_init, "<unknown>", "NubSup Mini Game Fan", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS )
-// protected
-CONS( 202?, 36pcase, 0, 0, vt36x_altswap_2mb, vt369, vt36x_state, empty_init, "<unknown>", "36-in-1 Classic Games phone case", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS )
+// protected both with accesses involving 41e7 / 41eb / 414f (probably more IO ports, to get 2 bytes in RAM) and the serial devices to get ~0x100 bytes of code
+CONS( 202?, 36pcase, 0, 0, vt36x_altswap_2mb_36pcase, vt369, vt36x_gtct885_state, empty_init, "<unknown>", "36-in-1 Classic Games phone case", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS )
/*****************************************************************************
@@ -1687,9 +1864,9 @@ CONS( 2016, sy888b, 0, 0, vt36x_4mb, vt369, vt36x_state, empty_init,
CONS( 201?, mc_cb280, 0, 0, vt36x_swap_4mb, vt369, vt36x_state, empty_init, "CoolBoy", "Coolboy RS-18 (280 in 1)", MACHINE_IMPERFECT_GRAPHICS )
// this is similar to mog_m320 below, but gets to the menu (still has chr banking issues)
-CONS( 201?, pixel246, 0, 0, vt36x_8mb, vt369, vt36x_state, empty_init, "Shanghai Weimeng Network Technology Co.,Ltd / dreamhax", "Pixels 246-in-1 Game Player (DH-628)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS )
-// Plays intro music but then crashes. same hardware as SY-88x but uses more features
-CONS( 2016, mog_m320, pixel246, 0, vt36x_8mb, vt369, vt36x_state, empty_init, "MOGIS", "MOGIS M320 246 in 1 Handheld", MACHINE_NOT_WORKING )
+// both of these access a protection device (same as lxcap but on a different port?) but only mog_m320 cares about the result?
+CONS( 201?, pixel246, 0, 0, vt36x_8mb_pixel, vt369, vt36x_tetrtin_state, empty_init, "Shanghai Weimeng Network Technology Co.,Ltd / dreamhax", "Pixels 246-in-1 Game Player (DH-628)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS )
+CONS( 2016, mog_m320, pixel246, 0, vt36x_8mb_pixel, vt369, vt36x_tetrtin_state, empty_init, "MOGIS", "MOGIS M320 246 in 1 Handheld", MACHINE_NOT_WORKING )
// VT369, but doesn't use most features
CONS( 200?, lpgm240, 0, 0, vt36x_swap_8mb, vt369, vt36x_state, empty_init, "<unknown>", "Let's Play! Game Machine 240 in 1", MACHINE_NOT_WORKING ) // mini 'retro-arcade' style cabinet
@@ -1715,10 +1892,17 @@ CONS( 202?, 168pcase, 0, 0, vt36x_4mb, vt369, vt36x_state, empty_init, "<u
// uses a LCD with resolution of 160x128 (image scaled to fit for some games, others run natively at 160x128)
// contains a protection chip, command 80 XX returns a byte
-CONS( 201?, lxcap, 0, 0, vt36x_8mb, vt369, vt36x_tetrtin_state, empty_init, "Lexibook", "Cyber Arcade Pocket (JL1895)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS )
+// game 13 (Powerpul Girl) has entirely broken graphics even on the real device
+CONS( 201?, lxcap, 0, 0, vt36x_8mb_lxcap, vt369, vt36x_tetrtin_state, empty_init, "Lexibook", "Cyber Arcade Pocket (JL1895)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS )
+
+// seems to be running the NES version of Pac-Man with some extra splash screens, has extra protection
+// (protection is the same as lxcap)
+CONS( 2021, pactin, 0, 0, vt36x_1mb_tetrtin, vt369, vt36x_tetrtin_state, empty_init, "Fizz Creations", "Pac-Man Arcade in a Tin", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS )
+// (protection is the same as lxcap)
+CONS( 2021, tetrtin, 0, 0, vt36x_1mb_tetrtin, vt369, vt36x_tetrtin_state, empty_init, "Fizz Creations", "Tetris Arcade in a Tin", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS )
// 2022 date on 'BL-867 PCB03' PCB, has extra protection?
-CONS( 2022, nesvt270, 0, 0, vt36x_16mb, vt369, vt36x_state, empty_init, "<unknown>", "unknown VT3xx based 270-in-1 (BL-867 PCB03)", MACHINE_NOT_WORKING )
+CONS( 2022, nesvt270, 0, 0, vt36x_16mb_nesvt270, vt369, vt36x_tetrtin_state, empty_init, "<unknown>", "unknown VT3xx based 270-in-1 (BL-867 PCB03)", MACHINE_NOT_WORKING )
// VT369, but doesn't use most features
CONS( 201?, myarccn, 0, 0, vt36x_1mb, vt369, vt36x_state, empty_init, "dreamGEAR", "My Arcade Caveman Ninja", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS )
@@ -1728,12 +1912,7 @@ CONS( 201?, denv150, 0, 0, vt36x_8mb, vt369, vt36x_state, empty_init,
CONS( 201?, egame150, denv150, 0, vt36x_swap_8mb, vt369, vt36x_state, empty_init, "<unknown>", "E-Game! 150-in-1", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS )
// uncertain, uses SPI ROM so probably VT369, has extra protection? (but RAM test goes up to 0x2000, over the internal ROM area?)
-CONS( 2017, otrail, 0, 0, vt36x_1mb, vt369, vt36x_state, empty_init, "Basic Fun", "The Oregon Trail", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS )
-
-// seems to be running the NES version of Pac-Man with some extra splash screens, has extra protection
-CONS( 2021, pactin, 0, 0, vt36x_1mb, vt369, vt36x_tetrtin_state, empty_init, "Fizz Creations", "Pac-Man Arcade in a Tin", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS )
-// has extra protection
-CONS( 2021, tetrtin, 0, 0, vt36x_1mb, vt369, vt36x_tetrtin_state, empty_init, "Fizz Creations", "Tetris Arcade in a Tin", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS )
+CONS( 2017, otrail, 0, 0, vt36x_1mb_otrail, vt369, vt36x_otrail_state, empty_init, "Basic Fun", "The Oregon Trail", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS )
// uses a low res display (so vt3xx?)
CONS( 2021, matet10, 0, 0, vt36x_swap_2mb, vt369, vt36x_state, empty_init, "dreamGEAR", "My Arcade Tetris (DGUNL-7083, Pixel Pocket, with 10 bonus games)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS )
@@ -1775,8 +1954,9 @@ CONS( 202?, unk198vt, 0, 0, vt36x_8mb, vt369, vt36x_state, empty_init,
// has extra protection (using ports at 4138 / 4139, copied to 0x701)
CONS( 2018, rbbrite, 0, 0, vt36x_1mb_rbbrite, vt369, vt36x_goretrop_state, empty_init, "Coleco", "Rainbow Brite (mini-arcade)", MACHINE_NOT_WORKING )
-// there's also a 250+ version of the unit below at least
// has extra protection (using ports at 4138 / 4139, copied to 0x701)
CONS( 2018, goretrop, 0, 0, vt36x_32mb_goretrop, vt369, vt36x_goretrop_state, empty_init, "Retro-Bit", "Go Retro Portable 260+ Games", MACHINE_NOT_WORKING )
CONS( 2018, goretropa, goretrop, 0, vt36x_32mb_goretrop, vt369, vt36x_goretrop_state, empty_init, "Retro-Bit", "Go Retro Portable 260+ Games (older)", MACHINE_NOT_WORKING ) // doesn't have commando or higemaru
-
+// these US versions have 1.2 and 1.3 printed on the packaging
+CONS( 2018, goretropu13,goretrop, 0, vt36x_32mb_goretrop, vt369, vt36x_goretrop_state, empty_init, "Retro-Bit", "Go Retro Portable 250+ Games (US, V1.3)", MACHINE_NOT_WORKING )
+CONS( 2018, goretropu12,goretrop, 0, vt36x_32mb_goretrop, vt369, vt36x_goretrop_state, empty_init, "Retro-Bit", "Go Retro Portable 250+ Games (US, V1.2)", MACHINE_NOT_WORKING )
diff --git a/src/mame/nintendo/nes_vt369_vtunknown_soc.cpp b/src/mame/nintendo/nes_vt369_vtunknown_soc.cpp
index c5643c9fff7..3c390e10353 100644
--- a/src/mame/nintendo/nes_vt369_vtunknown_soc.cpp
+++ b/src/mame/nintendo/nes_vt369_vtunknown_soc.cpp
@@ -36,12 +36,12 @@ DEFINE_DEVICE_TYPE(VT3XX_SOC, vt3xx_soc_base_device, "vt3xx_unknown_soc
DEFINE_DEVICE_TYPE(VT3XX_SOC_UNK_DG, vt3xx_soc_unk_dg_device, "vt3xx_unknown_soc_dg", "VT3xx series System on a Chip (DG)")
-vt3xx_soc_base_device::vt3xx_soc_base_device(const machine_config& mconfig, const char* tag, device_t* owner, u32 clock) :
+vt3xx_soc_base_device::vt3xx_soc_base_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) :
vt3xx_soc_base_device(mconfig, VT3XX_SOC, tag, owner, clock)
{
}
-vt3xx_soc_base_device::vt3xx_soc_base_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, u32 clock) :
+vt3xx_soc_base_device::vt3xx_soc_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) :
nes_vt02_vt03_soc_device(mconfig, type, tag, owner, clock),
m_soundcpu(*this, "soundcpu"),
m_sound_timer(nullptr),
@@ -50,65 +50,71 @@ vt3xx_soc_base_device::vt3xx_soc_base_device(const machine_config& mconfig, devi
m_vt369adpcm(*this, "vt369adpcm"),
m_leftdac(*this, "leftdac"),
m_rightdac(*this, "rightdac"),
- m_io_415x_write_callback(*this),
- m_io_415x_read_callback(*this, 0xff),
+ m_io_4152_read_callback(*this, 0xff),
+ m_io_4152_write_callback(*this),
+ m_io_4153_read_callback(*this, 0xff),
+ m_io_4153_write_callback(*this),
m_io_413x_write_callback(*this),
- m_io_413x_read_callback(*this, 0xff)
+ m_io_413x_read_callback(*this, 0xff),
+ m_io_414a_read_callback(*this, 0xff),
+ m_io_414a_write_callback(*this),
+ m_io_414b_read_callback(*this, 0xff),
+ m_io_414b_write_callback(*this)
{
}
-vt369_soc_introm_noswap_device::vt369_soc_introm_noswap_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, u32 clock) :
+vt369_soc_introm_noswap_device::vt369_soc_introm_noswap_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) :
vt3xx_soc_base_device(mconfig, type, tag, owner, clock)
{
}
-vt369_soc_introm_noswap_device::vt369_soc_introm_noswap_device(const machine_config& mconfig, const char* tag, device_t* owner, u32 clock) :
+vt369_soc_introm_noswap_device::vt369_soc_introm_noswap_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) :
vt369_soc_introm_noswap_device(mconfig, VT369_SOC_INTROM_NOSWAP, tag, owner, clock)
{
}
-vt369_soc_introm_swap_device::vt369_soc_introm_swap_device(const machine_config& mconfig, const char* tag, device_t* owner, u32 clock) :
+vt369_soc_introm_swap_device::vt369_soc_introm_swap_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) :
vt369_soc_introm_noswap_device(mconfig, VT369_SOC_INTROM_SWAP, tag, owner, clock)
{
}
-vt369_soc_introm_altswap_device::vt369_soc_introm_altswap_device(const machine_config& mconfig, const char* tag, device_t* owner, u32 clock) :
+vt369_soc_introm_altswap_device::vt369_soc_introm_altswap_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) :
vt369_soc_introm_noswap_device(mconfig, VT369_SOC_INTROM_ALTSWAP, tag, owner, clock)
{
}
-vt369_soc_introm_vibesswap_device::vt369_soc_introm_vibesswap_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, u32 clock) :
+vt369_soc_introm_vibesswap_device::vt369_soc_introm_vibesswap_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) :
vt369_soc_introm_noswap_device(mconfig, type, tag, owner, clock)
{
}
-vt369_soc_introm_vibesswap_device::vt369_soc_introm_vibesswap_device(const machine_config& mconfig, const char* tag, device_t* owner, u32 clock) :
+vt369_soc_introm_vibesswap_device::vt369_soc_introm_vibesswap_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) :
vt369_soc_introm_vibesswap_device(mconfig, VT369_SOC_INTROM_VIBESSWAP, tag, owner, clock)
{
}
-vt369_soc_introm_gbox2020_device::vt369_soc_introm_gbox2020_device(const machine_config& mconfig, const char* tag, device_t* owner, u32 clock) :
+vt369_soc_introm_gbox2020_device::vt369_soc_introm_gbox2020_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) :
vt369_soc_introm_vibesswap_device(mconfig, VT369_SOC_INTROM_GBOX2020, tag, owner, clock)
{
}
-vt369_soc_introm_s10swap_device::vt369_soc_introm_s10swap_device(const machine_config& mconfig, const char* tag, device_t* owner, u32 clock) :
+vt369_soc_introm_s10swap_device::vt369_soc_introm_s10swap_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) :
vt369_soc_introm_vibesswap_device(mconfig, VT369_SOC_INTROM_S10SWAP, tag, owner, clock)
{
}
-vt369_soc_introm_rsps300swap_device::vt369_soc_introm_rsps300swap_device(const machine_config& mconfig, const char* tag, device_t* owner, u32 clock) :
+vt369_soc_introm_rsps300swap_device::vt369_soc_introm_rsps300swap_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) :
vt369_soc_introm_noswap_device(mconfig, VT369_SOC_INTROM_RSPS300SWAP, tag, owner, clock)
{
}
-vt3xx_soc_unk_dg_device::vt3xx_soc_unk_dg_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, u32 clock) :
+vt3xx_soc_unk_dg_device::vt3xx_soc_unk_dg_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) :
vt3xx_soc_base_device(mconfig, type, tag, owner, clock)
{
}
-vt3xx_soc_unk_dg_device::vt3xx_soc_unk_dg_device(const machine_config& mconfig, const char* tag, device_t* owner, u32 clock) :
+vt3xx_soc_unk_dg_device::vt3xx_soc_unk_dg_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) :
vt3xx_soc_unk_dg_device(mconfig, VT3XX_SOC_UNK_DG, tag, owner, clock)
{
}
@@ -117,7 +123,7 @@ vt3xx_soc_unk_dg_device::vt3xx_soc_unk_dg_device(const machine_config& mconfig,
/* VT369? */
/***********************************************************************************************************************************************************/
-void vt3xx_soc_base_device::device_add_mconfig(machine_config& config)
+void vt3xx_soc_base_device::device_add_mconfig(machine_config &config)
{
nes_vt02_vt03_soc_device::device_add_mconfig(config);
m_maincpu->set_addrmap(AS_PROGRAM, &vt3xx_soc_base_device::vt369_map);
@@ -311,13 +317,18 @@ void vt3xx_soc_base_device::vt369_map(address_map &map)
// 4144
// 4147
+ // based on nesvt270, otrail, pixel246 this looks like another I/O port?
+ map(0x4148, 0x4148).rw(FUNC(vt3xx_soc_base_device::vt_414x_port_direction_r), FUNC(vt3xx_soc_base_device::vt_414x_port_direction_w));
+ map(0x414a, 0x414a).rw(FUNC(vt3xx_soc_base_device::vt_414a_port_in_r), FUNC(vt3xx_soc_base_device::vt_414a_port_out_w));
+ map(0x414b, 0x414b).rw(FUNC(vt3xx_soc_base_device::vt_414b_port_in_r), FUNC(vt3xx_soc_base_device::vt_414b_port_out_w));
+
map(0x414f, 0x414f).r(FUNC(vt3xx_soc_base_device::vt369_414f_r));
// several games use these addresses for what seem to be extra protection data
map(0x4150, 0x4150).rw(FUNC(vt3xx_soc_base_device::vt_415x_port_direction_r), FUNC(vt3xx_soc_base_device::vt_415x_port_direction_w));
// 4151 also sometimes written
- map(0x4152, 0x4152).rw(FUNC(vt3xx_soc_base_device::vt_415x_port_out_r), FUNC(vt3xx_soc_base_device::vt_415x_port_out_w));
- map(0x4153, 0x4153).rw(FUNC(vt3xx_soc_base_device::vt_415x_port_in_r), FUNC(vt3xx_soc_base_device::vt_415x_port_in_w));
+ map(0x4152, 0x4152).rw(FUNC(vt3xx_soc_base_device::vt_4152_port_in_r), FUNC(vt3xx_soc_base_device::vt_4152_port_out_w));
+ map(0x4153, 0x4153).rw(FUNC(vt3xx_soc_base_device::vt_4153_port_in_r), FUNC(vt3xx_soc_base_device::vt_4153_port_out_w));
// 0x4158 is written before the above
map(0x415c, 0x415c).r(FUNC(vt3xx_soc_base_device::vt369_415c_r)); // related to getting into menus in some games
@@ -378,7 +389,7 @@ void vt3xx_soc_base_device::vt_dma_w(u8 data)
}
// this reads from the 'extra ROM' area (serial style protocol) and code is copied on gtct885 to e00 in RAM, jumps to it at EDF9: jsr $0e1c
-// vt_415x_port_in_r is used by lxccminn, lxccplan and dgun2561 to check battery state instead? reports low battery and does nothing else if unhappy
+// vt_4153_port_in_r is used by lxccminn, lxccplan and dgun2561 to check battery state instead? reports low battery and does nothing else if unhappy
// pactin and tetrtin use these for something similar, seems to want code/data for jumps?
// 4150 - direction port (high = write)
@@ -396,33 +407,40 @@ void vt3xx_soc_base_device::vt_415x_port_direction_w(u8 data)
}
// 4152 - write port (can also read last thing written?)
-u8 vt3xx_soc_base_device::vt_415x_port_out_r()
+u8 vt3xx_soc_base_device::vt_4152_port_in_r()
{
// return the last write
- logerror("%s: vt_415x_port_out_r\n", machine().describe_context());
- return m_415x_port_data;
+ logerror("%s: vt_4152_port_in_r\n", machine().describe_context());
+
+ u8 dat = m_io_4152_read_callback() & ~m_415x_port_direction;
+ dat |= m_4152_port_data & m_415x_port_direction;
+ return dat;
}
-void vt3xx_soc_base_device::vt_415x_port_out_w(u8 data)
+void vt3xx_soc_base_device::vt_4152_port_out_w(u8 data)
{
- logerror("%s: vt_415x_port_out_w %02x (with direction register %02x)\n", machine().describe_context(), data, m_415x_port_direction);
- m_415x_port_data = data;
+ logerror("%s: vt_4152_port_out_w %02x (with direction register %02x)\n", machine().describe_context(), data, m_415x_port_direction);
+ m_4152_port_data = data;
// TODO: use direction register
- m_io_415x_write_callback(data);
+ m_io_4152_write_callback(data);
}
// 4153
-u8 vt3xx_soc_base_device::vt_415x_port_in_r()
+u8 vt3xx_soc_base_device::vt_4153_port_in_r()
{
- logerror("%s: vt_415x_port_in_r (with direction register %02x)\n", machine().describe_context(), m_415x_port_direction);
+ logerror("%s: vt_4153_port_in_r (with direction register %02x)\n", machine().describe_context(), m_415x_port_direction);
// TODO: use the direction register
- return m_io_415x_read_callback();
+ u8 dat = m_io_4153_read_callback() & ~m_415x_port_direction;
+ dat |= m_4153_port_data & m_415x_port_direction;
+ return dat;
}
-void vt3xx_soc_base_device::vt_415x_port_in_w(u8 data)
+void vt3xx_soc_base_device::vt_4153_port_out_w(u8 data)
{
- // write to the in port, might not exist / not be used at all
- logerror("%s: vt_415x_port_in_w %02x (writing to input port?!) (with direction register %02x)\n", machine().describe_context(), data, m_415x_port_direction);
+ // otrail writes here (for sound?)
+ logerror("%s: vt_4153_port_out_w %02x (writing to input port?!) (with direction register %02x)\n", machine().describe_context().c_str(), data, m_415x_port_direction);
+ m_4153_port_data = data;
+ m_io_4153_write_callback(data);
}
// goretrop seems to use a port with 4138 as direction, and 4139 as data for a similar protection
@@ -455,6 +473,59 @@ u8 vt3xx_soc_base_device::vt_413x_port_in_r()
return (ret & ~m_413x_port_direction) | (m_413x_port_data & m_413x_port_direction);
}
+// nesvt270 uses 4148 and 414b like they're a port and direction register
+// input doesn't appear to require clocking?
+// 41e7 / 4147 / / 414a / 414f also get used in some cases in code near these accesses
+
+// code in otrail sets vt_414x_port_direction_w 0x30 (0011 0000)
+// then writes to 414a using bits 0011 0000
+// it then sets vt_414x_port_direction_w to 0x20 (0010 0000)
+// and reads from 414b masking with 0x10
+// pixel246 does similar. (of note, both otrail and pixel246 test more RAM than usual too)
+//
+// maybe the port can be configured in different modes?
+
+u8 vt3xx_soc_base_device::vt_414x_port_direction_r()
+{
+ logerror("%s: vt_414x_port_direction_r (reg 4148 - port 414b direction)\n", machine().describe_context());
+ return m_414x_port_direction;
+}
+
+void vt3xx_soc_base_device::vt_414x_port_direction_w(u8 data)
+{
+ logerror("%s: vt_414x_port_direction_w %02x (reg 4148 - port 414b direction)\n", machine().describe_context(), data);
+ m_414x_port_direction = data;
+}
+
+void vt3xx_soc_base_device::vt_414a_port_out_w(u8 data)
+{
+ logerror("%s: vt_414a_port_out_w %02x (with direction register %02x)\n", machine().describe_context(), data, m_414x_port_direction);
+ m_414a_port_data = data;
+ m_io_414a_write_callback(data & m_414x_port_direction);
+}
+
+u8 vt3xx_soc_base_device::vt_414a_port_in_r()
+{
+ logerror("%s: vt_414a_port_in_r (with direction register %02x)\n", machine().describe_context(), m_414x_port_direction);
+ u8 ret = m_io_414a_read_callback();
+ return (ret & ~m_414x_port_direction) | (m_414a_port_data & m_414x_port_direction);
+}
+
+void vt3xx_soc_base_device::vt_414b_port_out_w(u8 data)
+{
+ logerror("%s: vt_414b_port_out_w %02x (with direction register %02x)\n", machine().describe_context(), data, m_414x_port_direction);
+ m_414b_port_data = data;
+ m_io_414b_write_callback(data & m_414x_port_direction);
+}
+
+u8 vt3xx_soc_base_device::vt_414b_port_in_r()
+{
+ logerror("%s: vt_414b_port_in_r (with direction register %02x)\n", machine().describe_context(), m_414x_port_direction);
+ // TODO: pass the direction register
+ u8 ret = m_io_414b_read_callback();
+ return (ret & ~m_414x_port_direction) | (m_414b_port_data & m_414x_port_direction);
+}
+
void vt3xx_soc_base_device::extra_io_41e6_w(u8 data) { logerror("%s: extra_io_41e6_w %02x (external banking?)\n", machine().describe_context(), data); m_41e6_write_cb(data); }
@@ -781,9 +852,13 @@ void vt3xx_soc_base_device::device_start()
save_item(NAME(m_sound_dac));
save_item(NAME(m_415x_port_direction));
- save_item(NAME(m_415x_port_data));
+ save_item(NAME(m_4152_port_data));
+ save_item(NAME(m_4153_port_data));
save_item(NAME(m_413x_port_direction));
save_item(NAME(m_413x_port_data));
+ save_item(NAME(m_414x_port_direction));
+ save_item(NAME(m_414a_port_data));
+ save_item(NAME(m_414b_port_data));
m_ppu->space(AS_PROGRAM).install_readwrite_handler(0x3c00, 0x3fff, read8sm_delegate(*this, FUNC(vt3xx_soc_base_device::vt3xx_palette_r)), write8sm_delegate(*this, FUNC(vt3xx_soc_base_device::vt3xx_palette_w)));
}
@@ -814,9 +889,13 @@ void vt3xx_soc_base_device::device_reset()
m_sound_timer->adjust(attotime::never);
m_415x_port_direction = 0x00;
- m_415x_port_data = 0x00;
+ m_4152_port_data = 0x00;
+ m_4153_port_data = 0x00;
m_413x_port_direction = 0x00;
m_413x_port_data = 0x00;
+ m_414x_port_direction = 0x00;
+ m_414a_port_data = 0x00;
+ m_414b_port_data = 0x00;
}
@@ -872,7 +951,7 @@ u8 vt3xx_soc_base_device::read_onespace_bus_with_relative_offset(offs_t offset)
/* this might just be the same as vt369 but with the games not using all features */
/***********************************************************************************************************************************************************/
-void vt369_soc_introm_noswap_device::device_add_mconfig(machine_config& config)
+void vt369_soc_introm_noswap_device::device_add_mconfig(machine_config &config)
{
vt3xx_soc_base_device::device_add_mconfig(config);
@@ -887,13 +966,6 @@ void vt369_soc_introm_noswap_device::device_start()
m_encryption_allowed = false;
}
-
-u8 vt369_soc_introm_noswap_device::vthh_414a_r()
-{
- return 0x80;
-}
-
-
void vt369_soc_introm_noswap_device::vt369_introm_map(address_map &map)
{
vt3xx_soc_base_device::vt369_map(map);
@@ -901,8 +973,6 @@ void vt369_soc_introm_noswap_device::vt369_introm_map(address_map &map)
map(0x0000, 0x0fff).ram();
map(0x1000, 0x1fff).r(FUNC(vt369_soc_introm_noswap_device::read_internal));
- map(0x414a, 0x414a).r(FUNC(vt369_soc_introm_noswap_device::vthh_414a_r));
-
map(0x4169, 0x4169).w(FUNC(vt369_soc_introm_noswap_device::encryption_4169_w));
}
@@ -937,7 +1007,7 @@ void vt369_soc_introm_altswap_device::device_start()
m_encryption_allowed = true;
}
-void vt369_soc_introm_vibesswap_device::device_add_mconfig(machine_config& config)
+void vt369_soc_introm_vibesswap_device::device_add_mconfig(machine_config &config)
{
vt369_soc_introm_noswap_device::device_add_mconfig(config);
@@ -1014,7 +1084,7 @@ void vt369_soc_introm_gbox2020_device::nes_vt_gbox_map(address_map &map)
map(0x411c, 0x411c).w(FUNC(vt369_soc_introm_gbox2020_device::gbox_411c_w));
}
-void vt369_soc_introm_gbox2020_device::device_add_mconfig(machine_config& config)
+void vt369_soc_introm_gbox2020_device::device_add_mconfig(machine_config &config)
{
vt369_soc_introm_noswap_device::device_add_mconfig(config);
@@ -1040,7 +1110,7 @@ void vt369_soc_introm_rsps300swap_device::nes_vt_rsps_map(address_map &map)
map(0x411c, 0x411c).w(FUNC(vt369_soc_introm_rsps300swap_device::rsps_411c_w));
}
-void vt369_soc_introm_rsps300swap_device::device_add_mconfig(machine_config& config)
+void vt369_soc_introm_rsps300swap_device::device_add_mconfig(machine_config &config)
{
vt369_soc_introm_noswap_device::device_add_mconfig(config);
@@ -1051,7 +1121,7 @@ void vt369_soc_introm_rsps300swap_device::device_add_mconfig(machine_config& con
/* this might also just be the same as vt369 but with the games not using all features */
/***********************************************************************************************************************************************************/
-void vt3xx_soc_unk_dg_device::device_add_mconfig(machine_config& config)
+void vt3xx_soc_unk_dg_device::device_add_mconfig(machine_config &config)
{
vt3xx_soc_base_device::device_add_mconfig(config);
m_maincpu->set_addrmap(AS_PROGRAM, &vt3xx_soc_unk_dg_device::nes_vt_dg_map);
diff --git a/src/mame/nintendo/nes_vt369_vtunknown_soc.h b/src/mame/nintendo/nes_vt369_vtunknown_soc.h
index 710f984941e..75099e04afd 100644
--- a/src/mame/nintendo/nes_vt369_vtunknown_soc.h
+++ b/src/mame/nintendo/nes_vt369_vtunknown_soc.h
@@ -13,17 +13,23 @@
class vt3xx_soc_base_device : public nes_vt02_vt03_soc_device
{
public:
- vt3xx_soc_base_device(const machine_config& mconfig, const char* tag, device_t* owner, u32 clock);
+ vt3xx_soc_base_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
- auto io_4153_read_callback() { return m_io_415x_read_callback.bind(); }
- auto io_4152_write_callback() { return m_io_415x_write_callback.bind(); }
+ auto io_4153_read_callback() { return m_io_4153_read_callback.bind(); }
+ auto io_4153_write_callback() { return m_io_4153_write_callback.bind(); }
+ auto io_4152_read_callback() { return m_io_4152_read_callback.bind(); }
+ auto io_4152_write_callback() { return m_io_4152_write_callback.bind(); }
auto io_4139_read_callback() { return m_io_413x_read_callback.bind(); }
auto io_4139_write_callback() { return m_io_413x_write_callback.bind(); }
+ auto io_414a_read_callback() { return m_io_414a_read_callback.bind(); }
+ auto io_414a_write_callback() { return m_io_414a_write_callback.bind(); }
+ auto io_414b_read_callback() { return m_io_414b_read_callback.bind(); }
+ auto io_414b_write_callback() { return m_io_414b_write_callback.bind(); }
protected:
- vt3xx_soc_base_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, u32 clock);
+ vt3xx_soc_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock);
- virtual void device_add_mconfig(machine_config& config) override ATTR_COLD;
+ virtual void device_add_mconfig(machine_config &config) override ATTR_COLD;
void device_start() override ATTR_COLD;
void device_reset() override ATTR_COLD;
@@ -35,17 +41,24 @@ protected:
u8 vt369_414f_r();
u8 vt_415x_port_direction_r();
- u8 vt_415x_port_out_r();
- u8 vt_415x_port_in_r();
+ u8 vt_4152_port_in_r();
+ u8 vt_4153_port_in_r();
void vt_415x_port_direction_w(u8 data);
- void vt_415x_port_out_w(u8 data);
- void vt_415x_port_in_w(u8 data);
+ void vt_4152_port_out_w(u8 data);
+ void vt_4153_port_out_w(u8 data);
u8 vt_413x_port_direction_r();
void vt_413x_port_direction_w(u8 data);
void vt_413x_port_out_w(u8 data);
u8 vt_413x_port_in_r();
+ u8 vt_414x_port_direction_r();
+ void vt_414x_port_direction_w(u8 data);
+ void vt_414b_port_out_w(u8 data);
+ u8 vt_414b_port_in_r();
+ void vt_414a_port_out_w(u8 data);
+ u8 vt_414a_port_in_r();
+
void extra_io_41e6_w(u8 data);
u8 vt369_415c_r();
@@ -68,7 +81,7 @@ protected:
private:
void vt369_sound_map(address_map &map) ATTR_COLD;
- void vt369_sound_external_map(address_map& map) ATTR_COLD;
+ void vt369_sound_external_map(address_map &map) ATTR_COLD;
u8 sound_read_external(offs_t offset) { return this->space(AS_PROGRAM).read_byte(get_relative() + offset); }
@@ -106,11 +119,16 @@ private:
u8 m_bank6000_enable = 0;
u8 m_415x_port_direction;
- u8 m_415x_port_data;
+ u8 m_4152_port_data;
+ u8 m_4153_port_data;
u8 m_413x_port_direction;
u8 m_413x_port_data;
+ u8 m_414x_port_direction;
+ u8 m_414a_port_data;
+ u8 m_414b_port_data;
+
u16 m_timerperiod;
u8 m_timercontrol;
u8 m_alu_params[8];
@@ -127,22 +145,28 @@ private:
required_device<vt369_adpcm_decoder_device> m_vt369adpcm;
required_device<dac_16bit_r2r_twos_complement_device> m_leftdac;
required_device<dac_16bit_r2r_twos_complement_device> m_rightdac;
- devcb_write8 m_io_415x_write_callback;
- devcb_read8 m_io_415x_read_callback;
+ devcb_read8 m_io_4152_read_callback;
+ devcb_write8 m_io_4152_write_callback;
+ devcb_read8 m_io_4153_read_callback;
+ devcb_write8 m_io_4153_write_callback;
devcb_write8 m_io_413x_write_callback;
devcb_read8 m_io_413x_read_callback;
+ devcb_read8 m_io_414a_read_callback;
+ devcb_write8 m_io_414a_write_callback;
+ devcb_read8 m_io_414b_read_callback;
+ devcb_write8 m_io_414b_write_callback;
};
class vt369_soc_introm_noswap_device : public vt3xx_soc_base_device
{
public:
- vt369_soc_introm_noswap_device(const machine_config& mconfig, const char* tag, device_t* owner, u32 clock);
+ vt369_soc_introm_noswap_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
protected:
- vt369_soc_introm_noswap_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, u32 clock);
+ vt369_soc_introm_noswap_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock);
virtual void device_start() override ATTR_COLD;
- virtual void device_add_mconfig(machine_config& config) override ATTR_COLD;
+ virtual void device_add_mconfig(machine_config &config) override ATTR_COLD;
void vt369_introm_map(address_map &map) ATTR_COLD;
@@ -155,7 +179,7 @@ protected:
class vt369_soc_introm_swap_device : public vt369_soc_introm_noswap_device
{
public:
- vt369_soc_introm_swap_device(const machine_config& mconfig, const char* tag, device_t* owner, u32 clock);
+ vt369_soc_introm_swap_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
protected:
virtual void device_start() override;
@@ -164,7 +188,7 @@ protected:
class vt369_soc_introm_altswap_device : public vt369_soc_introm_noswap_device
{
public:
- vt369_soc_introm_altswap_device(const machine_config& mconfig, const char* tag, device_t* owner, u32 clock);
+ vt369_soc_introm_altswap_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
protected:
virtual void device_start() override;
@@ -173,12 +197,12 @@ protected:
class vt369_soc_introm_vibesswap_device : public vt369_soc_introm_noswap_device
{
public:
- vt369_soc_introm_vibesswap_device(const machine_config& mconfig, const char* tag, device_t* owner, u32 clock);
+ vt369_soc_introm_vibesswap_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
protected:
- vt369_soc_introm_vibesswap_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, u32 clock);
+ vt369_soc_introm_vibesswap_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock);
- virtual void device_add_mconfig(machine_config& config) override ATTR_COLD;
+ virtual void device_add_mconfig(machine_config &config) override ATTR_COLD;
virtual void device_start() override ATTR_COLD;
private:
@@ -190,10 +214,10 @@ private:
class vt369_soc_introm_gbox2020_device : public vt369_soc_introm_vibesswap_device
{
public:
- vt369_soc_introm_gbox2020_device(const machine_config& mconfig, const char* tag, device_t* owner, u32 clock);
+ vt369_soc_introm_gbox2020_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
protected:
- virtual void device_add_mconfig(machine_config& config) override ATTR_COLD;
+ virtual void device_add_mconfig(machine_config &config) override ATTR_COLD;
virtual void device_start() override ATTR_COLD;
private:
@@ -205,7 +229,7 @@ private:
class vt369_soc_introm_s10swap_device : public vt369_soc_introm_vibesswap_device
{
public:
- vt369_soc_introm_s10swap_device(const machine_config& mconfig, const char* tag, device_t* owner, u32 clock);
+ vt369_soc_introm_s10swap_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
protected:
virtual void device_start() override ATTR_COLD;
@@ -214,10 +238,10 @@ protected:
class vt369_soc_introm_rsps300swap_device : public vt369_soc_introm_noswap_device
{
public:
- vt369_soc_introm_rsps300swap_device(const machine_config& mconfig, const char* tag, device_t* owner, u32 clock);
+ vt369_soc_introm_rsps300swap_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
protected:
- virtual void device_add_mconfig(machine_config& config) override ATTR_COLD;
+ virtual void device_add_mconfig(machine_config &config) override ATTR_COLD;
virtual void device_start() override ATTR_COLD;
void rsps_411c_w(u8 data);
@@ -229,12 +253,12 @@ protected:
class vt3xx_soc_unk_dg_device : public vt3xx_soc_base_device
{
public:
- vt3xx_soc_unk_dg_device(const machine_config& mconfig, const char* tag, device_t* owner, u32 clock);
+ vt3xx_soc_unk_dg_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
protected:
- vt3xx_soc_unk_dg_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, u32 clock);
+ vt3xx_soc_unk_dg_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock);
- virtual void device_add_mconfig(machine_config& config) override;
+ virtual void device_add_mconfig(machine_config &config) override;
void nes_vt_dg_map(address_map &map) ATTR_COLD;
diff --git a/src/mame/nintendo/nes_vt42xx.cpp b/src/mame/nintendo/nes_vt42xx.cpp
index c8c58c43227..2684af7d103 100644
--- a/src/mame/nintendo/nes_vt42xx.cpp
+++ b/src/mame/nintendo/nes_vt42xx.cpp
@@ -20,7 +20,7 @@ namespace {
class nes_vt42xx_base_state : public driver_device
{
public:
- nes_vt42xx_base_state(const machine_config& mconfig, device_type type, const char* tag) :
+ nes_vt42xx_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"),
@@ -52,7 +52,7 @@ protected:
required_region_ptr<uint8_t> m_prgrom;
- void configure_soc(nes_vt02_vt03_soc_device* soc);
+ void configure_soc(nes_vt02_vt03_soc_device *soc);
uint8_t upper_412c_r();
uint8_t upper_412d_r();
@@ -66,7 +66,7 @@ private:
class nes_vt42xx_state : public nes_vt42xx_base_state
{
public:
- nes_vt42xx_state(const machine_config& mconfig, device_type type, const char* tag) :
+ nes_vt42xx_state(const machine_config &mconfig, device_type type, const char *tag) :
nes_vt42xx_base_state(mconfig, type, tag),
m_soc(*this, "soc")
{ }
@@ -77,12 +77,12 @@ public:
void vt_external_space_map_8mbyte(address_map &map) ATTR_COLD;
void vt_external_space_map_16mbyte(address_map &map) ATTR_COLD;
- void nes_vt42xx(machine_config& config);
- void nes_vt42xx_1mb(machine_config& config);
- void nes_vt42xx_2mb(machine_config& config);
- void nes_vt42xx_4mb(machine_config& config);
- void nes_vt42xx_8mb(machine_config& config);
- void nes_vt42xx_16mb(machine_config& config);
+ void nes_vt42xx(machine_config &config) ATTR_COLD;
+ void nes_vt42xx_1mb(machine_config &config) ATTR_COLD;
+ void nes_vt42xx_2mb(machine_config &config) ATTR_COLD;
+ void nes_vt42xx_4mb(machine_config &config) ATTR_COLD;
+ void nes_vt42xx_8mb(machine_config &config) ATTR_COLD;
+ void nes_vt42xx_16mb(machine_config &config) ATTR_COLD;
void init_rfcp168();
void init_g9_666();
@@ -98,12 +98,12 @@ protected:
class nes_vt42xx_bitboy_state : public nes_vt42xx_state
{
public:
- nes_vt42xx_bitboy_state(const machine_config& mconfig, device_type type, const char* tag) :
+ nes_vt42xx_bitboy_state(const machine_config &mconfig, device_type type, const char *tag) :
nes_vt42xx_state(mconfig, type, tag)
{ }
- void nes_vt42xx_bitboy_2x16mb(machine_config& config);
- void nes_vt42xx_gprnrs16_2x16mb(machine_config& config);
+ void nes_vt42xx_bitboy_2x16mb(machine_config &config) ATTR_COLD;
+ void nes_vt42xx_gprnrs16_2x16mb(machine_config &config) ATTR_COLD;
void vt_external_space_map_bitboy_2x16mbyte(address_map &map) ATTR_COLD;
@@ -115,11 +115,11 @@ private:
class nes_vt42xx_fapocket_state : public nes_vt42xx_state
{
public:
- nes_vt42xx_fapocket_state(const machine_config& mconfig, device_type type, const char* tag) :
+ nes_vt42xx_fapocket_state(const machine_config &mconfig, device_type type, const char *tag) :
nes_vt42xx_state(mconfig, type, tag)
{ }
- void nes_vt42xx_fa(machine_config& config);
+ void nes_vt42xx_fa(machine_config &config) ATTR_COLD;
protected:
virtual void machine_reset() override ATTR_COLD;
@@ -249,7 +249,7 @@ void nes_vt42xx_fapocket_state::machine_reset()
m_ahigh = 0;
}
-void nes_vt42xx_base_state::configure_soc(nes_vt02_vt03_soc_device* soc)
+void nes_vt42xx_base_state::configure_soc(nes_vt02_vt03_soc_device *soc)
{
soc->set_addrmap(AS_PROGRAM, &nes_vt42xx_state::vt_external_space_map_16mbyte);
soc->read_0_callback().set(FUNC(nes_vt42xx_base_state::in0_r));
@@ -304,31 +304,31 @@ void nes_vt42xx_state::nes_vt42xx(machine_config &config)
m_soc->force_bad_dma();
}
-void nes_vt42xx_state::nes_vt42xx_1mb(machine_config& config)
+void nes_vt42xx_state::nes_vt42xx_1mb(machine_config &config)
{
nes_vt42xx(config);
m_soc->set_addrmap(AS_PROGRAM, &nes_vt42xx_state::vt_external_space_map_1mbyte);
}
-void nes_vt42xx_state::nes_vt42xx_2mb(machine_config& config)
+void nes_vt42xx_state::nes_vt42xx_2mb(machine_config &config)
{
nes_vt42xx(config);
m_soc->set_addrmap(AS_PROGRAM, &nes_vt42xx_state::vt_external_space_map_2mbyte);
}
-void nes_vt42xx_state::nes_vt42xx_4mb(machine_config& config)
+void nes_vt42xx_state::nes_vt42xx_4mb(machine_config &config)
{
nes_vt42xx(config);
m_soc->set_addrmap(AS_PROGRAM, &nes_vt42xx_state::vt_external_space_map_4mbyte);
}
-void nes_vt42xx_state::nes_vt42xx_8mb(machine_config& config)
+void nes_vt42xx_state::nes_vt42xx_8mb(machine_config &config)
{
nes_vt42xx(config);
m_soc->set_addrmap(AS_PROGRAM, &nes_vt42xx_state::vt_external_space_map_8mbyte);
}
-void nes_vt42xx_state::nes_vt42xx_16mb(machine_config& config)
+void nes_vt42xx_state::nes_vt42xx_16mb(machine_config &config)
{
nes_vt42xx(config);
m_soc->set_addrmap(AS_PROGRAM, &nes_vt42xx_state::vt_external_space_map_16mbyte);
@@ -348,7 +348,7 @@ void nes_vt42xx_bitboy_state::gprnrs16_412c_w(u8 data)
m_ahigh = (data & 0x02) ? (1 << 24) : 0x0;
}
-void nes_vt42xx_bitboy_state::nes_vt42xx_bitboy_2x16mb(machine_config& config)
+void nes_vt42xx_bitboy_state::nes_vt42xx_bitboy_2x16mb(machine_config &config)
{
nes_vt42xx(config);
m_soc->set_addrmap(AS_PROGRAM, &nes_vt42xx_bitboy_state::vt_external_space_map_bitboy_2x16mbyte);
@@ -356,7 +356,7 @@ void nes_vt42xx_bitboy_state::nes_vt42xx_bitboy_2x16mb(machine_config& config)
dynamic_cast<nes_vt09_soc_device&>(*m_soc).upper_write_412c_callback().set(FUNC(nes_vt42xx_bitboy_state::bittboy_412c_w));
}
-void nes_vt42xx_bitboy_state::nes_vt42xx_gprnrs16_2x16mb(machine_config& config)
+void nes_vt42xx_bitboy_state::nes_vt42xx_gprnrs16_2x16mb(machine_config &config)
{
nes_vt42xx(config);
m_soc->set_addrmap(AS_PROGRAM, &nes_vt42xx_bitboy_state::vt_external_space_map_bitboy_2x16mbyte);
@@ -382,7 +382,7 @@ void nes_vt42xx_fapocket_state::fapocket_412c_w(u8 data)
m_ahigh |= (data & 0x02) ? (1 << 24) : 0x0;
}
-void nes_vt42xx_fapocket_state::nes_vt42xx_fa(machine_config& config)
+void nes_vt42xx_fapocket_state::nes_vt42xx_fa(machine_config &config)
{
nes_vt42xx(config);
m_soc->set_addrmap(AS_PROGRAM, &nes_vt42xx_fapocket_state::vt_external_space_map_fa_4x16mbyte);
diff --git a/src/mame/nintendo/nes_vt42xx_soc.cpp b/src/mame/nintendo/nes_vt42xx_soc.cpp
index d9eea9e01de..b244989bc4c 100644
--- a/src/mame/nintendo/nes_vt42xx_soc.cpp
+++ b/src/mame/nintendo/nes_vt42xx_soc.cpp
@@ -14,17 +14,17 @@
DEFINE_DEVICE_TYPE(NES_VT42XX_SOC, nes_vt42xx_soc_device, "nes_vt42xx_soc", "unknown VT series System on a Chip with $42xx registers (NTSC)")
DEFINE_DEVICE_TYPE(NES_VT42XX_SOC_PAL, nes_vt42xx_soc_pal_device, "nes_vt42xx_soc_pal", "unknown VT series System on a Chip with $42xx registers (PAL)")
-nes_vt42xx_soc_device::nes_vt42xx_soc_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, u32 clock) :
+nes_vt42xx_soc_device::nes_vt42xx_soc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) :
nes_vt09_soc_device(mconfig, type, tag, owner, clock)
{
}
-nes_vt42xx_soc_device::nes_vt42xx_soc_device(const machine_config& mconfig, const char* tag, device_t* owner, u32 clock) :
+nes_vt42xx_soc_device::nes_vt42xx_soc_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) :
nes_vt42xx_soc_device(mconfig, NES_VT42XX_SOC, tag, owner, clock)
{
}
-nes_vt42xx_soc_pal_device::nes_vt42xx_soc_pal_device(const machine_config& mconfig, const char* tag, device_t* owner, u32 clock) :
+nes_vt42xx_soc_pal_device::nes_vt42xx_soc_pal_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) :
nes_vt42xx_soc_device(mconfig, NES_VT42XX_SOC_PAL, tag, owner, clock)
{
}
@@ -37,7 +37,7 @@ u8 nes_vt42xx_soc_device::read_onespace_bus(offs_t offset)
}
-void nes_vt42xx_soc_device::device_add_mconfig(machine_config& config)
+void nes_vt42xx_soc_device::device_add_mconfig(machine_config &config)
{
RP2A03_CORE(config, m_maincpu, NTSC_APU_CLOCK);
m_maincpu->set_addrmap(AS_PROGRAM, &nes_vt42xx_soc_device::nes_vt42xx_soc_map);
@@ -68,7 +68,7 @@ void nes_vt42xx_soc_device::device_add_mconfig(machine_config& config)
m_apu->add_route(ALL_OUTPUTS, "mono", 0.50);
}
-void nes_vt42xx_soc_pal_device::do_pal_timings_and_ppu_replacement(machine_config& config)
+void nes_vt42xx_soc_pal_device::do_pal_timings_and_ppu_replacement(machine_config &config)
{
m_maincpu->set_clock(PALC_APU_CLOCK);
@@ -86,7 +86,7 @@ void nes_vt42xx_soc_pal_device::do_pal_timings_and_ppu_replacement(machine_confi
m_screen->set_visarea(0 * 8, 32 * 8 - 1, 0 * 8, 30 * 8 - 1);
}
-void nes_vt42xx_soc_pal_device::device_add_mconfig(machine_config& config)
+void nes_vt42xx_soc_pal_device::device_add_mconfig(machine_config &config)
{
nes_vt42xx_soc_device::device_add_mconfig(config);
do_pal_timings_and_ppu_replacement(config);
diff --git a/src/mame/nintendo/nes_vt42xx_soc.h b/src/mame/nintendo/nes_vt42xx_soc.h
index 0de7211efe3..70d0a00449b 100644
--- a/src/mame/nintendo/nes_vt42xx_soc.h
+++ b/src/mame/nintendo/nes_vt42xx_soc.h
@@ -11,15 +11,15 @@
class nes_vt42xx_soc_device : public nes_vt09_soc_device
{
public:
- nes_vt42xx_soc_device(const machine_config& mconfig, const char* tag, device_t* owner, u32 clock);
+ nes_vt42xx_soc_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
protected:
virtual void device_start() override;
virtual void device_reset() override;
- nes_vt42xx_soc_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, u32 clock);
+ nes_vt42xx_soc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock);
- virtual void device_add_mconfig(machine_config& config) override ATTR_COLD;
+ virtual void device_add_mconfig(machine_config &config) override ATTR_COLD;
void nes_vt42xx_soc_map(address_map &map) ATTR_COLD;
@@ -43,12 +43,12 @@ private:
class nes_vt42xx_soc_pal_device : public nes_vt42xx_soc_device
{
public:
- nes_vt42xx_soc_pal_device(const machine_config& mconfig, const char* tag, device_t* owner, u32 clock);
+ nes_vt42xx_soc_pal_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
protected:
- virtual void device_add_mconfig(machine_config& config) override ATTR_COLD;
+ virtual void device_add_mconfig(machine_config &config) override ATTR_COLD;
- virtual void do_pal_timings_and_ppu_replacement(machine_config& config) override;
+ virtual void do_pal_timings_and_ppu_replacement(machine_config &config) override;
};
diff --git a/src/mame/nintendo/nes_vt_soc.cpp b/src/mame/nintendo/nes_vt_soc.cpp
index f86cb0e0d90..07d798e96b3 100644
--- a/src/mame/nintendo/nes_vt_soc.cpp
+++ b/src/mame/nintendo/nes_vt_soc.cpp
@@ -79,7 +79,7 @@ void nes_vt02_vt03_soc_device::program_map(address_map &map)
{
}
-nes_vt02_vt03_soc_device::nes_vt02_vt03_soc_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, u32 clock) :
+nes_vt02_vt03_soc_device::nes_vt02_vt03_soc_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) :
device_t(mconfig, type, tag, owner, clock),
device_memory_interface(mconfig, *this),
m_maincpu(*this, "maincpu"),
@@ -125,61 +125,61 @@ nes_vt02_vt03_soc_device::nes_vt02_vt03_soc_device(const machine_config& mconfig
m_use_raster_timing_hack = false;
}
-nes_vt02_vt03_soc_device::nes_vt02_vt03_soc_device(const machine_config& mconfig, const char* tag, device_t* owner, u32 clock) :
+nes_vt02_vt03_soc_device::nes_vt02_vt03_soc_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) :
nes_vt02_vt03_soc_device(mconfig, NES_VT02_VT03_SOC, tag, owner, clock)
{
}
-nes_vt02_vt03_soc_pal_device::nes_vt02_vt03_soc_pal_device(const machine_config& mconfig, const char* tag, device_t* owner, u32 clock) :
+nes_vt02_vt03_soc_pal_device::nes_vt02_vt03_soc_pal_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) :
nes_vt02_vt03_soc_device(mconfig, NES_VT02_VT03_SOC_PAL, tag, owner, clock)
{
}
-nes_vt02_vt03_soc_waixing_device::nes_vt02_vt03_soc_waixing_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, u32 clock) :
+nes_vt02_vt03_soc_waixing_device::nes_vt02_vt03_soc_waixing_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) :
nes_vt02_vt03_soc_device(mconfig, type, tag, owner, clock)
{
}
-nes_vt02_vt03_soc_waixing_device::nes_vt02_vt03_soc_waixing_device(const machine_config& mconfig, const char* tag, device_t* owner, u32 clock) :
+nes_vt02_vt03_soc_waixing_device::nes_vt02_vt03_soc_waixing_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) :
nes_vt02_vt03_soc_waixing_device(mconfig, NES_VT02_VT03_SOC_WAIXING, tag, owner, clock)
{
}
-nes_vt02_vt03_soc_waixing_pal_device::nes_vt02_vt03_soc_waixing_pal_device(const machine_config& mconfig, const char* tag, device_t* owner, u32 clock) :
+nes_vt02_vt03_soc_waixing_pal_device::nes_vt02_vt03_soc_waixing_pal_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) :
nes_vt02_vt03_soc_waixing_device(mconfig, NES_VT02_VT03_SOC_WAIXING_PAL, tag, owner, clock)
{
}
-nes_vt02_vt03_soc_hummer_device::nes_vt02_vt03_soc_hummer_device(const machine_config& mconfig, const char* tag, device_t* owner, u32 clock) :
+nes_vt02_vt03_soc_hummer_device::nes_vt02_vt03_soc_hummer_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) :
nes_vt02_vt03_soc_device(mconfig, NES_VT02_VT03_SOC_HUMMER, tag, owner, clock)
{
}
-nes_vt02_vt03_soc_sports_device::nes_vt02_vt03_soc_sports_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, u32 clock) :
+nes_vt02_vt03_soc_sports_device::nes_vt02_vt03_soc_sports_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) :
nes_vt02_vt03_soc_device(mconfig, type, tag, owner, clock)
{
}
-nes_vt02_vt03_soc_sports_device::nes_vt02_vt03_soc_sports_device(const machine_config& mconfig, const char* tag, device_t* owner, u32 clock) :
+nes_vt02_vt03_soc_sports_device::nes_vt02_vt03_soc_sports_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) :
nes_vt02_vt03_soc_sports_device(mconfig, NES_VT02_VT03_SOC_SPORTS, tag, owner, clock)
{
}
-nes_vt02_vt03_soc_sports_pal_device::nes_vt02_vt03_soc_sports_pal_device(const machine_config& mconfig, const char* tag, device_t* owner, u32 clock) :
+nes_vt02_vt03_soc_sports_pal_device::nes_vt02_vt03_soc_sports_pal_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) :
nes_vt02_vt03_soc_sports_device(mconfig, NES_VT02_VT03_SOC_SPORTS_PAL, tag, owner, clock)
{
}
-nes_vt02_vt03_soc_scramble_device::nes_vt02_vt03_soc_scramble_device(const machine_config& mconfig, const char* tag, device_t* owner, u32 clock) :
+nes_vt02_vt03_soc_scramble_device::nes_vt02_vt03_soc_scramble_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) :
nes_vt02_vt03_soc_device(mconfig, NES_VT02_VT03_SOC_SCRAMBLE, tag, owner, clock)
{
}
-nes_vt02_vt03_soc_scramble_pal_device::nes_vt02_vt03_soc_scramble_pal_device(const machine_config& mconfig, const char* tag, device_t* owner, u32 clock) :
+nes_vt02_vt03_soc_scramble_pal_device::nes_vt02_vt03_soc_scramble_pal_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) :
nes_vt02_vt03_soc_device(mconfig, NES_VT02_VT03_SOC_SCRAMBLE_PAL, tag, owner, clock)
{
}
@@ -1128,7 +1128,7 @@ void nes_vt02_vt03_soc_device::nes_vt_2012_to_2017_regs(address_map &map)
map(0x2017, 0x2017).mirror(0x00e0).rw(m_ppu, FUNC(ppu_vt03_device::videobank0_5_r), FUNC(ppu_vt03_device::videobank0_5_w));
}
-void nes_vt02_vt03_soc_waixing_device::nes_vt_2012_to_2017_regs(address_map& map)
+void nes_vt02_vt03_soc_waixing_device::nes_vt_2012_to_2017_regs(address_map &map)
{
map(0x2012, 0x2012).mirror(0x00e0).rw(m_ppu, FUNC(ppu_vt03_device::videobank0_1_r), FUNC(ppu_vt03_device::videobank0_1_w));
map(0x2013, 0x2013).mirror(0x00e0).rw(m_ppu, FUNC(ppu_vt03_device::videobank0_0_r), FUNC(ppu_vt03_device::videobank0_0_w));
@@ -1138,7 +1138,7 @@ void nes_vt02_vt03_soc_waixing_device::nes_vt_2012_to_2017_regs(address_map& map
map(0x2017, 0x2017).mirror(0x00e0).rw(m_ppu, FUNC(ppu_vt03_device::videobank0_2_r), FUNC(ppu_vt03_device::videobank0_2_w));
}
-void nes_vt02_vt03_soc_hummer_device::nes_vt_2012_to_2017_regs(address_map& map)
+void nes_vt02_vt03_soc_hummer_device::nes_vt_2012_to_2017_regs(address_map &map)
{
map(0x2012, 0x2012).mirror(0x00e0).rw(m_ppu, FUNC(ppu_vt03_device::videobank0_5_r), FUNC(ppu_vt03_device::videobank0_5_w));
map(0x2013, 0x2013).mirror(0x00e0).rw(m_ppu, FUNC(ppu_vt03_device::videobank0_4_r), FUNC(ppu_vt03_device::videobank0_4_w));
@@ -1148,7 +1148,7 @@ void nes_vt02_vt03_soc_hummer_device::nes_vt_2012_to_2017_regs(address_map& map)
map(0x2017, 0x2017).mirror(0x00e0).rw(m_ppu, FUNC(ppu_vt03_device::videobank0_1_r), FUNC(ppu_vt03_device::videobank0_1_w));
}
-void nes_vt02_vt03_soc_sports_device::nes_vt_2012_to_2017_regs(address_map& map)
+void nes_vt02_vt03_soc_sports_device::nes_vt_2012_to_2017_regs(address_map &map)
{
map(0x2012, 0x2012).mirror(0x00e0).rw(m_ppu, FUNC(ppu_vt03_device::videobank0_2_r), FUNC(ppu_vt03_device::videobank0_2_w));
map(0x2013, 0x2013).mirror(0x00e0).rw(m_ppu, FUNC(ppu_vt03_device::videobank0_5_r), FUNC(ppu_vt03_device::videobank0_5_w));
@@ -1185,7 +1185,7 @@ device_memory_interface::space_config_vector nes_vt02_vt03_soc_device::memory_sp
};
}
-void nes_vt02_vt03_soc_device::do_pal_timings_and_ppu_replacement(machine_config& config)
+void nes_vt02_vt03_soc_device::do_pal_timings_and_ppu_replacement(machine_config &config)
{
m_maincpu->set_clock(PALC_APU_CLOCK);
@@ -1233,20 +1233,20 @@ void nes_vt02_vt03_soc_device::device_add_mconfig(machine_config &config)
m_apu->add_route(ALL_OUTPUTS, "mono", 0.50);
}
-void nes_vt02_vt03_soc_pal_device::device_add_mconfig(machine_config& config)
+void nes_vt02_vt03_soc_pal_device::device_add_mconfig(machine_config &config)
{
nes_vt02_vt03_soc_device::device_add_mconfig(config);
do_pal_timings_and_ppu_replacement(config);
}
-void nes_vt02_vt03_soc_waixing_pal_device::device_add_mconfig(machine_config& config)
+void nes_vt02_vt03_soc_waixing_pal_device::device_add_mconfig(machine_config &config)
{
nes_vt02_vt03_soc_waixing_device::device_add_mconfig(config);
do_pal_timings_and_ppu_replacement(config);
}
-void nes_vt02_vt03_soc_sports_pal_device::device_add_mconfig(machine_config& config)
+void nes_vt02_vt03_soc_sports_pal_device::device_add_mconfig(machine_config &config)
{
nes_vt02_vt03_soc_sports_device::device_add_mconfig(config);
do_pal_timings_and_ppu_replacement(config);
@@ -1256,7 +1256,7 @@ void nes_vt02_vt03_soc_sports_pal_device::device_add_mconfig(machine_config& con
/* 'Scramble' specifics */
/***********************************************************************************************************************************************************/
-void nes_vt02_vt03_soc_scramble_device::device_add_mconfig(machine_config& config)
+void nes_vt02_vt03_soc_scramble_device::device_add_mconfig(machine_config &config)
{
nes_vt02_vt03_soc_device::device_add_mconfig(config);
@@ -1264,7 +1264,7 @@ void nes_vt02_vt03_soc_scramble_device::device_add_mconfig(machine_config& confi
m_maincpu->set_addrmap(AS_PROGRAM, &nes_vt02_vt03_soc_scramble_device::nes_vt_map);
}
-void nes_vt02_vt03_soc_scramble_pal_device::device_add_mconfig(machine_config& config)
+void nes_vt02_vt03_soc_scramble_pal_device::device_add_mconfig(machine_config &config)
{
nes_vt02_vt03_soc_device::device_add_mconfig(config);
diff --git a/src/mame/nintendo/nes_vt_soc.h b/src/mame/nintendo/nes_vt_soc.h
index bb49ba75951..e199bc62059 100644
--- a/src/mame/nintendo/nes_vt_soc.h
+++ b/src/mame/nintendo/nes_vt_soc.h
@@ -102,7 +102,7 @@ protected:
// additional relative offset for everything on vt3xx sets (seems to address up to 32mbytes only still?)
int get_relative() { return (m_relative[0] + ((m_relative[1] & 0x0f) << 8)) * 0x2000; }
- virtual void do_pal_timings_and_ppu_replacement(machine_config& config);
+ virtual void do_pal_timings_and_ppu_replacement(machine_config &config);
u32 screen_update(screen_device& screen, bitmap_rgb32& bitmap, const rectangle& cliprect);
@@ -169,17 +169,17 @@ private:
class nes_vt02_vt03_soc_pal_device : public nes_vt02_vt03_soc_device
{
public:
- nes_vt02_vt03_soc_pal_device(const machine_config& mconfig, const char* tag, device_t* owner, u32 clock);
+ nes_vt02_vt03_soc_pal_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
protected:
- virtual void device_add_mconfig(machine_config& config) override;
+ virtual void device_add_mconfig(machine_config &config) override;
};
class nes_vt02_vt03_soc_waixing_device : public nes_vt02_vt03_soc_device
{
public:
- nes_vt02_vt03_soc_waixing_device(const machine_config& mconfig, const char* tag, device_t* owner, u32 clock);
+ nes_vt02_vt03_soc_waixing_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
protected:
nes_vt02_vt03_soc_waixing_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock);
@@ -190,16 +190,16 @@ protected:
class nes_vt02_vt03_soc_waixing_pal_device : public nes_vt02_vt03_soc_waixing_device
{
public:
- nes_vt02_vt03_soc_waixing_pal_device(const machine_config& mconfig, const char* tag, device_t* owner, u32 clock);
+ nes_vt02_vt03_soc_waixing_pal_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
protected:
- virtual void device_add_mconfig(machine_config& config) override;
+ virtual void device_add_mconfig(machine_config &config) override;
};
class nes_vt02_vt03_soc_hummer_device : public nes_vt02_vt03_soc_device
{
public:
- nes_vt02_vt03_soc_hummer_device(const machine_config& mconfig, const char* tag, device_t* owner, u32 clock);
+ nes_vt02_vt03_soc_hummer_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
protected:
virtual void nes_vt_2012_to_2017_regs(address_map &map) override;
@@ -208,7 +208,7 @@ protected:
class nes_vt02_vt03_soc_sports_device : public nes_vt02_vt03_soc_device
{
public:
- nes_vt02_vt03_soc_sports_device(const machine_config& mconfig, const char* tag, device_t* owner, u32 clock);
+ nes_vt02_vt03_soc_sports_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
protected:
nes_vt02_vt03_soc_sports_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock);
@@ -220,28 +220,28 @@ protected:
class nes_vt02_vt03_soc_sports_pal_device : public nes_vt02_vt03_soc_sports_device
{
public:
- nes_vt02_vt03_soc_sports_pal_device(const machine_config& mconfig, const char* tag, device_t* owner, u32 clock);
+ nes_vt02_vt03_soc_sports_pal_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
protected:
- virtual void device_add_mconfig(machine_config& config) override;
+ virtual void device_add_mconfig(machine_config &config) override;
};
class nes_vt02_vt03_soc_scramble_device : public nes_vt02_vt03_soc_device
{
public:
- nes_vt02_vt03_soc_scramble_device(const machine_config& mconfig, const char* tag, device_t* owner, u32 clock);
+ nes_vt02_vt03_soc_scramble_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
protected:
- virtual void device_add_mconfig(machine_config& config) override;
+ virtual void device_add_mconfig(machine_config &config) override;
};
class nes_vt02_vt03_soc_scramble_pal_device : public nes_vt02_vt03_soc_device
{
public:
- nes_vt02_vt03_soc_scramble_pal_device(const machine_config& mconfig, const char* tag, device_t* owner, u32 clock);
+ nes_vt02_vt03_soc_scramble_pal_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
protected:
- virtual void device_add_mconfig(machine_config& config) override;
+ virtual void device_add_mconfig(machine_config &config) override;
};
DECLARE_DEVICE_TYPE(NES_VT02_VT03_SOC, nes_vt02_vt03_soc_device)
diff --git a/src/mame/nintendo/vt_menu_protection_lxcap.cpp b/src/mame/nintendo/vt_menu_protection_lxcap.cpp
new file mode 100644
index 00000000000..fe665f4c0d9
--- /dev/null
+++ b/src/mame/nintendo/vt_menu_protection_lxcap.cpp
@@ -0,0 +1,113 @@
+// license:BSD-3-Clause
+// copyright-holders:David Haywood
+
+// some kind of 2-wire protocol (but not SPI?)
+// might be doing a calculation rather than returning data from a table
+
+#include "emu.h"
+
+#include "vt_menu_protection_lxcap.h"
+
+DEFINE_DEVICE_TYPE(VT_MENU_PROTECTION_LXCAP, vt_menu_protection_lxcap_device, "vtmenuprot_lxcap", "VT Menu Protection (lxcap)")
+
+vt_menu_protection_lxcap_device::vt_menu_protection_lxcap_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+ device_t(mconfig, VT_MENU_PROTECTION_LXCAP, tag, owner, clock)
+{
+}
+
+uint8_t vt_menu_protection_lxcap_device::read()
+{
+ logerror("reading data bit\n");
+ return m_outlatch;
+}
+
+void vt_menu_protection_lxcap_device::write_clock(bool state)
+{
+ if (state != m_clock)
+ {
+ if (state)
+ {
+ logerror("%s vt_menu_protection_lxcap_device::write_clock HIGH\n", machine().describe_context());
+ logerror("reading/writing data bit %d\n", m_data ? 1 : 0);
+
+ if (m_phase == 0)
+ {
+ m_command = (m_command << 1) | (m_data ? 1 : 0);
+ m_bitcount++;
+
+ if (m_bitcount == 20)
+ {
+
+ // c0328 - 1 10000000 0 11001010 00 (from 80 ca)
+ //
+ u8 type = (m_command >> 11) & 0xff;
+ u8 param = (m_command >> 2) & 0xff;
+ //m_retdat = m_extrarom->base()[param]; // use the old table
+ m_retdat = (0x100 - param) & 0xff;
+ m_retdat = bitswap<8>(m_retdat, 3, 2, 1, 0, 7, 6, 5, 4);
+
+ logerror("got command %04x (%02x %02x) ready to return %02x\n", m_command, type, param, m_retdat);
+
+ m_phase = 1;
+ m_bitcount = 0;
+ }
+ }
+ else if (m_phase == 1)
+ {
+ m_bitcount++;
+
+ m_outlatch = (m_retdat & 0x80) ? 1 : 0;
+ m_retdat <<= 1;
+
+ if (m_bitcount == 9)
+ {
+ m_phase = 0;
+ m_bitcount = 0;
+ logerror("setting back to phase 0\n");
+ }
+ }
+
+ }
+ else
+ {
+ logerror("%s vt_menu_protection_lxcap_device::write_clock LOW\n", machine().describe_context());
+ }
+ }
+
+ m_clock = state;
+}
+
+void vt_menu_protection_lxcap_device::write_data(bool state)
+{
+ if (state != m_data)
+ {
+ if (state)
+ logerror("%s vt_menu_protection_lxcap_device::write_data HIGH\n", machine().describe_context());
+ else
+ logerror("%s vt_menu_protection_lxcap_device::write_data LOW\n", machine().describe_context());
+ }
+
+ m_data = state;
+}
+
+void vt_menu_protection_lxcap_device::device_start()
+{
+ save_item(NAME(m_data));
+ save_item(NAME(m_clock));
+ save_item(NAME(m_bitcount));
+ save_item(NAME(m_command));
+ save_item(NAME(m_phase));
+ save_item(NAME(m_retdat));
+ save_item(NAME(m_outlatch));
+}
+
+void vt_menu_protection_lxcap_device::device_reset()
+{
+ m_data = false;
+ m_clock = false;
+ m_bitcount = 0;
+ m_command = 0;
+ m_phase = 0;
+ m_retdat = 0;
+ m_outlatch = 0;
+}
diff --git a/src/mame/nintendo/vt_menu_protection_lxcap.h b/src/mame/nintendo/vt_menu_protection_lxcap.h
new file mode 100644
index 00000000000..d4812541d25
--- /dev/null
+++ b/src/mame/nintendo/vt_menu_protection_lxcap.h
@@ -0,0 +1,36 @@
+// license:BSD-3-Clause
+// copyright-holders:David Haywood
+
+#ifndef MAME_NINTENDO_VT_MENU_PROTECTION_LXCAP_H
+#define MAME_NINTENDO_VT_MENU_PROTECTION_LXCAP_H
+
+#pragma once
+
+DECLARE_DEVICE_TYPE(VT_MENU_PROTECTION_LXCAP, vt_menu_protection_lxcap_device)
+
+
+class vt_menu_protection_lxcap_device : public device_t
+{
+public:
+ vt_menu_protection_lxcap_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+
+ uint8_t read();
+ void write_clock(bool state);
+ void write_data(bool state);
+
+protected:
+ virtual void device_start() override ATTR_COLD;
+ virtual void device_reset() override ATTR_COLD;
+
+private:
+ bool m_clock;
+ bool m_data;
+
+ u8 m_bitcount;
+ u32 m_command;
+ u8 m_phase;
+ u8 m_retdat;
+ u8 m_outlatch;
+};
+
+#endif // MAME_NINTENDO_VT_MENU_PROTECTION_LXCAP_H