Skip to content

Commit 5259b74

Browse files
author
David Haywood
committed
looking at nesvt270 protection
1 parent 9a58aad commit 5259b74

2 files changed

Lines changed: 26 additions & 4 deletions

File tree

src/mame/nintendo/nes_vt369_vtunknown.cpp

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,13 +207,15 @@ class vt36x_tetrtin_state : public vt36x_state
207207
void vt36x_1mb_tetrtin(machine_config& config) ATTR_COLD;
208208
void vt36x_8mb_lxcap(machine_config &config) ATTR_COLD;
209209
void vt36x_8mb_pixel(machine_config &config) ATTR_COLD;
210-
void vt36x_1mb_otrail(machine_config &config) ATTR_COLD;
210+
void vt36x_16mb_nesvt270(machine_config &config) ATTR_COLD;
211211

212212
protected:
213213
u8 lxcap_prot_r();
214214
void lxcap_prot_w(u8 data);
215215
u8 pixel_prot_r();
216216
void pixel_prot_w(u8 data);
217+
u8 nesvt270_prot_r();
218+
void nesvt270_prot_w(u8 data);
217219

218220
required_device<vt_menu_protection_lxcap_device> m_protection;
219221
};
@@ -573,6 +575,17 @@ u8 vt36x_tetrtin_state::pixel_prot_r()
573575
return (m_protection->read() ? 0x10 : 0x00);
574576
}
575577

578+
u8 vt36x_tetrtin_state::nesvt270_prot_r()
579+
{
580+
return 0x00;// (m_protection->read() ? 0x40 : 0x00);
581+
}
582+
583+
void vt36x_tetrtin_state::nesvt270_prot_w(u8 data)
584+
{
585+
//m_protection->write_data((data & 0x40) ? true : false);
586+
//m_protection->write_clock((data & 0x80) ? true : false);
587+
}
588+
576589
void vt36x_otrail_state::otrail_seeprom_w(u8 data)
577590
{
578591
m_i2cmem->write_scl((data & 0x04) ? true : false);
@@ -780,6 +793,16 @@ void vt36x_tetrtin_state::vt36x_8mb_pixel(machine_config &config)
780793
m_soc->io_414a_write_callback().set(FUNC(vt36x_tetrtin_state::pixel_prot_w));
781794
}
782795

796+
void vt36x_tetrtin_state::vt36x_16mb_nesvt270(machine_config &config)
797+
{
798+
vt36x_16mb(config);
799+
VT_MENU_PROTECTION_LXCAP(config, m_protection, 0); // might not be this device
800+
801+
m_soc->io_414b_read_callback().set(FUNC(vt36x_tetrtin_state::nesvt270_prot_r));
802+
m_soc->io_414b_write_callback().set(FUNC(vt36x_tetrtin_state::nesvt270_prot_w));
803+
}
804+
805+
783806
void vt36x_otrail_state::vt36x_1mb_otrail(machine_config &config)
784807
{
785808
vt36x_1mb(config);
@@ -1879,7 +1902,7 @@ CONS( 2021, pactin, 0, 0, vt36x_1mb_tetrtin, vt369, vt36x_tetrtin_st
18791902
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 )
18801903

18811904
// 2022 date on 'BL-867 PCB03' PCB, has extra protection?
1882-
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 )
1905+
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 )
18831906

18841907
// VT369, but doesn't use most features
18851908
CONS( 201?, myarccn, 0, 0, vt36x_1mb, vt369, vt36x_state, empty_init, "dreamGEAR", "My Arcade Caveman Ninja", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS )

src/mame/nintendo/nes_vt369_vtunknown_soc.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,6 @@ void vt3xx_soc_base_device::vt_414a_port_out_w(u8 data)
507507
u8 vt3xx_soc_base_device::vt_414a_port_in_r()
508508
{
509509
logerror("%s: vt_414a_port_in_r (with direction register %02x)\n", machine().describe_context(), m_414x_port_direction);
510-
// this is a read from an output port? (or the ports can be configured)
511510
u8 ret = m_io_414a_read_callback();
512511
return (ret & ~m_414x_port_direction) | (m_414a_port_data & m_414x_port_direction);
513512
}
@@ -516,7 +515,7 @@ void vt3xx_soc_base_device::vt_414b_port_out_w(u8 data)
516515
{
517516
logerror("%s: vt_414b_port_out_w %02x (with direction register %02x)\n", machine().describe_context(), data, m_414x_port_direction);
518517
m_414b_port_data = data;
519-
// this is a write to an input port? (or the ports can be configured)
518+
m_io_414b_write_callback(data & m_414x_port_direction);
520519
}
521520

522521
u8 vt3xx_soc_base_device::vt_414b_port_in_r()

0 commit comments

Comments
 (0)