summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/machine/nes_vt_soc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/machine/nes_vt_soc.cpp')
-rw-r--r--src/mame/machine/nes_vt_soc.cpp412
1 files changed, 0 insertions, 412 deletions
diff --git a/src/mame/machine/nes_vt_soc.cpp b/src/mame/machine/nes_vt_soc.cpp
index 420290396d6..6989db28bfb 100644
--- a/src/mame/machine/nes_vt_soc.cpp
+++ b/src/mame/machine/nes_vt_soc.cpp
@@ -51,40 +51,16 @@
add support for VT368 (?) in DGUN-2561 and lxcmcy
add support for the VT369 (?) featurs used by the MOGIS M320
- (general)
- split into multipe files once feature boundaries are properly established
-
**************************************************************************/
#include "emu.h"
#include "nes_vt_soc.h"
-// TODO: identify what kind of SoCs each of these are (some are probably meant to be the same chip, just with subsets of the features added at the moment, especially the CY/BT/HH ones)
-// also work out if some of these features (eg. opcode scrambling) should be done with external callbacks, sometimes the die was the same (VH2009) but encryption not always present (pin control or external feature?)
DEFINE_DEVICE_TYPE(NES_VT02_VT03_SOC, nes_vt02_vt03_soc_device, "nes_vt02_vt03_soc", "VT02/03 series System on a Chip (NTSC)")
DEFINE_DEVICE_TYPE(NES_VT02_VT03_SOC_PAL, nes_vt02_vt03_soc_pal_device, "nes_vt02_vt03_soc_pal", "VT02/03 series System on a Chip (PAL)")
DEFINE_DEVICE_TYPE(NES_VT02_VT03_SOC_SCRAMBLE, nes_vt02_vt03_soc_scramble_device, "nes_vt02_vt03_soc_scram", "VT02/03 series System on a Chip (NTSC, with simple Opcode scrambling)")
-DEFINE_DEVICE_TYPE(NES_VT09_SOC, nes_vt09_soc_device, "nes_vt09_soc", "VT09 series System on a Chip (NTSC)")
-
-// everything below is still uncertain
-
-// these might not be VT09, but VT32
-DEFINE_DEVICE_TYPE(NES_VT09_SOC_CY, nes_vt09_soc_cy_device, "nes_vt09_soc_cy", "VT09/32 series System on a Chip (CY)")
-DEFINE_DEVICE_TYPE(NES_VT09_SOC_BT, nes_vt09_soc_bt_device, "nes_vt09_soc_bt", "VT09/32 series System on a Chip (BT)")
-
-// these have RGB12 output mode
-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)")
-
-// this has a new RGB555 mode
-DEFINE_DEVICE_TYPE(NES_VT369_SOC, nes_vt369_soc_device, "nes_vt369_soc_hh", "VT369 series System on a Chip")
-
-// unknown
-DEFINE_DEVICE_TYPE(NES_VT3X_SOC_DG, nes_vt3x_soc_dg_device, "nes_vt3x_soc_dg", "VT3x series System on a Chip (DG)")
-DEFINE_DEVICE_TYPE(NES_VT3X_SOC_FA, nes_vt3x_soc_fa_device, "nes_vt3x_soc_fa", "VT3x series System on a Chip (Family Pocket)")
-
void nes_vt02_vt03_soc_device::program_map(address_map &map)
{
}
@@ -151,71 +127,6 @@ nes_vt02_vt03_soc_scramble_device::nes_vt02_vt03_soc_scramble_device(const machi
{
}
-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_vt02_vt03_soc_device(mconfig, type, tag, owner, clock),
- m_upper_write_412c_callback(*this),
- m_upper_read_412c_callback(*this),
- m_upper_read_412d_callback(*this)
-{
-}
-
-nes_vt09_soc_cy_device::nes_vt09_soc_cy_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock) :
- nes_vt09_soc_device(mconfig, NES_VT09_SOC_CY, tag, owner, clock)
-{
-}
-
-nes_vt09_soc_bt_device::nes_vt09_soc_bt_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock) :
- nes_vt09_soc_device(mconfig, NES_VT09_SOC_BT, tag, owner, clock)
-{
-}
-
-
-nes_vt369_soc_device::nes_vt369_soc_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, uint32_t clock) :
- nes_vt09_soc_device(mconfig, type, tag, owner, clock)
-{
-}
-
-nes_vt369_soc_device::nes_vt369_soc_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock) :
- nes_vt369_soc_device(mconfig, NES_VT369_SOC, tag, owner, clock)
-{
-}
-
-
-nes_vt32_soc_device::nes_vt32_soc_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock) :
- nes_vt32_soc_device(mconfig, NES_VT32_SOC, tag, owner, clock)
-{
-}
-
-nes_vt32_soc_device::nes_vt32_soc_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, uint32_t clock) :
- nes_vt369_soc_device(mconfig, type, tag, owner, clock)
-{
-}
-
-nes_vt32_soc_pal_device::nes_vt32_soc_pal_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock) :
- nes_vt32_soc_device(mconfig, NES_VT32_SOC_PAL, tag, owner, clock)
-{
-}
-
-nes_vt3x_soc_dg_device::nes_vt3x_soc_dg_device(const machine_config& mconfig, device_type type, const char* tag, device_t* owner, uint32_t clock) :
- nes_vt09_soc_device(mconfig, type, tag, owner, clock)
-{
-}
-
-nes_vt3x_soc_dg_device::nes_vt3x_soc_dg_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock) :
- nes_vt3x_soc_dg_device(mconfig, NES_VT3X_SOC_DG, tag, owner, clock)
-{
-}
-
-nes_vt3x_soc_fa_device::nes_vt3x_soc_fa_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock) :
- nes_vt3x_soc_dg_device(mconfig, NES_VT3X_SOC_FA, tag, owner, clock)
-{
-}
-
void nes_vt02_vt03_soc_device::device_start()
{
save_item(NAME(m_410x));
@@ -1277,326 +1188,3 @@ void nes_vt02_vt03_soc_scramble_device::device_add_mconfig(machine_config& confi
N2A03_CORE_SWAP_OP_D5_D6(config.replace(), m_maincpu, NTSC_APU_CLOCK); // Insect Chase in polmega confirms N2A03 core type, not 6502
m_maincpu->set_addrmap(AS_PROGRAM, &nes_vt02_vt03_soc_scramble_device::nes_vt_map);
}
-
-/***********************************************************************************************************************************************************/
-/* '4K' specifics */
-/***********************************************************************************************************************************************************/
-
-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);
-}
-
-void nes_vt09_soc_device::device_start()
-{
- nes_vt02_vt03_soc_device::device_start();
-
- m_upper_write_412c_callback.resolve_safe();
- m_upper_read_412c_callback.resolve_safe(0xff);
- m_upper_read_412d_callback.resolve_safe(0xff);
-}
-
-void nes_vt09_soc_device::nes_vt_4k_ram_map(address_map &map)
-{
- nes_vt02_vt03_soc_device::nes_vt_map(map);
- map(0x0800, 0x0fff).ram();
-
-// map(0x412c, 0x412c).rw(FUNC(nes_vt09_soc_device::vtfp_412c_r, FUNC(nes_vt09_soc_device::vtfp_412c_extbank_w)); // GPIO
-// map(0x412d, 0x412d).r(FUNC(nes_vt09_soc_device::vtfp_412d_r)); // GPIO
-
-}
-
-/***********************************************************************************************************************************************************/
-/* 'CY' specifics (base = '4K') */
-/***********************************************************************************************************************************************************/
-
-void nes_vt09_soc_cy_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_cy_device::nes_vt_cy_map);
-}
-
-void nes_vt09_soc_cy_device::nes_vt_cy_map(address_map &map)
-{
- nes_vt_4k_ram_map(map);
- map(0x41b0, 0x41bf).r(FUNC(nes_vt09_soc_cy_device::vt03_41bx_r)).w(FUNC(nes_vt09_soc_cy_device::vt03_41bx_w));
- map(0x4130, 0x4136).r(FUNC(nes_vt09_soc_cy_device::vt03_413x_r)).w(FUNC(nes_vt09_soc_cy_device::vt03_413x_w));
- map(0x414f, 0x414f).r(FUNC(nes_vt09_soc_cy_device::vt03_414f_r));
- map(0x415c, 0x415c).r(FUNC(nes_vt09_soc_cy_device::vt03_415c_r));
-
- map(0x48a0, 0x48af).r(FUNC(nes_vt09_soc_cy_device::vt03_48ax_r)).w(FUNC(nes_vt09_soc_cy_device::vt03_48ax_w));
-}
-
-void nes_vt09_soc_cy_device::device_start()
-{
- nes_vt02_vt03_soc_device::device_start();
- save_item(NAME(m_413x));
-}
-
-
-uint8_t nes_vt09_soc_cy_device::vt03_41bx_r(offs_t offset)
-{
- switch (offset)
- {
- case 0x07:
- return 0x04;
- default:
- return 0x00;
- }
-}
-
-void nes_vt09_soc_cy_device::vt03_41bx_w(offs_t offset, uint8_t data)
-{
- logerror("vt03_41bx_w %02x %02x\n", offset, data);
-}
-
-uint8_t nes_vt09_soc_cy_device::vt03_413x_r(offs_t offset)
-{
- logerror("vt03_413x_r %02x\n", offset);
- return m_413x[offset];
-}
-
-void nes_vt09_soc_cy_device::vt03_413x_w(offs_t offset, uint8_t data)
-{
- logerror("vt03_413x_w %02x %02x\n", offset, data);
- // VT168 style ALU ??
- m_413x[offset] = data;
- if (offset == 0x5)
- {
- uint32_t res = uint32_t((m_413x[5] << 8) | m_413x[4]) * uint32_t((m_413x[1] << 8) | m_413x[0]);
- m_413x[0] = res & 0xFF;
- m_413x[1] = (res >> 8) & 0xFF;
- m_413x[2] = (res >> 16) & 0xFF;
- m_413x[3] = (res >> 24) & 0xFF;
- m_413x[6] = 0x00;
-
- }
- else if (offset == 0x6)
- {
- /*uint32_t res = uint32_t((m_413x[5] << 8) | m_413x[4]) * uint32_t((m_413x[1] << 8) | m_413x[0]);
- m_413x[0] = res & 0xFF;
- m_413x[1] = (res >> 8) & 0xFF;
- m_413x[2] = (res >> 16) & 0xFF;
- m_413x[3] = (res >> 24) & 0xFF;*/
- m_413x[6] = 0x00;
- }
-}
-
-uint8_t nes_vt09_soc_cy_device::vt03_414f_r()
-{
- return 0xff;
-}
-
-uint8_t nes_vt09_soc_cy_device::vt03_415c_r()
-{
- return 0xff;
-}
-
-
-void nes_vt09_soc_cy_device::vt03_48ax_w(offs_t offset, uint8_t data)
-{
- logerror("vt03_48ax_w %02x %02x\n", offset, data);
-}
-
-uint8_t nes_vt09_soc_cy_device::vt03_48ax_r(offs_t offset)
-{
- switch (offset)
- {
- case 0x04:
- return 0x01;
- case 0x05:
- return 0x01;
- default:
- return 0x00;
- }
-}
-
-/***********************************************************************************************************************************************************/
-/* 'BT' specifics (base = '4K') */
-/***********************************************************************************************************************************************************/
-
-void nes_vt09_soc_bt_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_bt_device::nes_vt_bt_map);
-}
-
-void nes_vt09_soc_bt_device::nes_vt_bt_map(address_map &map)
-{
- nes_vt_4k_ram_map(map);
- map(0x412c, 0x412c).w(FUNC(nes_vt09_soc_bt_device::vt03_412c_extbank_w));
-}
-
-void nes_vt09_soc_bt_device::vt03_412c_extbank_w(uint8_t data)
-{
- m_upper_write_412c_callback(data);
-}
-
-
-/***********************************************************************************************************************************************************/
-/* 'HH' specifics (base = '4K') */
-/***********************************************************************************************************************************************************/
-
-void nes_vt369_soc_device::device_add_mconfig(machine_config& config)
-{
- nes_vt02_vt03_soc_device::device_add_mconfig(config);
- m_maincpu->set_addrmap(AS_PROGRAM, &nes_vt369_soc_device::nes_vt_hh_map);
-}
-
-void nes_vt369_soc_device::vtfp_411d_w(uint8_t data)
-{
- // controls chram access and mapper emulation modes in later models
- logerror("vtfp_411d_w %02x\n", data);
- m_411d = data;
- update_banks();
-}
-
-uint8_t nes_vt369_soc_device::vthh_414a_r()
-{
- return 0x80;
-}
-
-void nes_vt369_soc_device::nes_vt_hh_map(address_map &map)
-{
- nes_vt02_vt03_soc_device::nes_vt_map(map);
-
- map(0x0000, 0x1fff).mask(0x0fff).ram();
-
- map(0x414a, 0x414a).r(FUNC(nes_vt369_soc_device::vthh_414a_r));
- map(0x411d, 0x411d).w(FUNC(nes_vt369_soc_device::vtfp_411d_w));
-}
-
-/***********************************************************************************************************************************************************/
-/* 'FP' specifics (base = 'HH') */ // used by fcpocket, dgun2573, rminitv
-/***********************************************************************************************************************************************************/
-
-void nes_vt32_soc_device::device_add_mconfig(machine_config& config)
-{
- nes_vt02_vt03_soc_device::device_add_mconfig(config);
-
- M6502_VTSCR(config.replace(), m_maincpu, NTSC_APU_CLOCK); // are these later chips N2A03 core, or 6502 core derived?
- m_maincpu->set_addrmap(AS_PROGRAM, &nes_vt32_soc_device::nes_vt_fp_map);
-}
-
-
-uint8_t nes_vt32_soc_device::vtfp_4119_r()
-{
- // would be PAL/NTSC etc. in base system, maybe different here?
- return 0x00;
-}
-
-void nes_vt32_soc_device::vtfp_411e_w(uint8_t data)
-{
- logerror("411e_w %02x\n", data);
- if (data == 0x05)
- dynamic_cast<m6502_vtscr&>(*m_maincpu).set_next_scramble(true);
- else if (data == 0x00)
- dynamic_cast<m6502_vtscr&>(*m_maincpu).set_next_scramble(false);
-}
-
-void nes_vt32_soc_device::vtfp_4a00_w(uint8_t data)
-{
- logerror("4a00_w %02x\n", data);
- //if(data == 0x80)
- // dynamic_cast<m6502_vtscr&>(*m_maincpu).set_scramble(false);
-}
-
-
-void nes_vt32_soc_device::vtfp_412c_extbank_w(uint8_t data)
-{
- m_upper_write_412c_callback(data);
-}
-
-uint8_t nes_vt32_soc_device::vtfp_412d_r()
-{
- return m_upper_read_412d_callback();
-}
-
-void nes_vt32_soc_device::vtfp_4242_w(uint8_t data)
-{
- logerror("vtfp_4242_w %02x\n", data);
- m_4242 = data;
-}
-
-void nes_vt32_soc_device::nes_vt_fp_map(address_map &map)
-{
- nes_vt369_soc_device::nes_vt_hh_map(map);
-
- map(0x4119, 0x4119).r(FUNC(nes_vt32_soc_device::vtfp_4119_r));
- map(0x411e, 0x411e).w(FUNC(nes_vt32_soc_device::vtfp_411e_w)); // encryption toggle
-
- map(0x412c, 0x412c).w(FUNC(nes_vt32_soc_device::vtfp_412c_extbank_w)); // GPIO
- map(0x412d, 0x412d).r(FUNC(nes_vt32_soc_device::vtfp_412d_r)); // GPIO
-
- map(0x4242, 0x4242).w(FUNC(nes_vt32_soc_device::vtfp_4242_w));
-
- map(0x4a00, 0x4a00).w(FUNC(nes_vt32_soc_device::vtfp_4a00_w));
-}
-
-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);
-}
-
-/***********************************************************************************************************************************************************/
-/* 'DG' specifics (base = '4K') */
-/***********************************************************************************************************************************************************/
-
-void nes_vt3x_soc_dg_device::device_add_mconfig(machine_config& config)
-{
- nes_vt02_vt03_soc_device::device_add_mconfig(config);
- m_maincpu->set_addrmap(AS_PROGRAM, &nes_vt3x_soc_dg_device::nes_vt_dg_map);
-}
-
-void nes_vt3x_soc_dg_device::vt03_411c_w(uint8_t data)
-{
- logerror("vt03_411c_w %02x\n", data);
- m_411c = data;
- update_banks();
-}
-
-void nes_vt3x_soc_dg_device::nes_vt_dg_map(address_map &map)
-{
- nes_vt02_vt03_soc_device::nes_vt_map(map);
-
- map(0x0000, 0x1fff).ram();
- map(0x411c, 0x411c).w(FUNC(nes_vt3x_soc_dg_device::vt03_411c_w));
-}
-
-/***********************************************************************************************************************************************************/
-/* 'FA' specifics (base = 'DG') */ // used by fapocket
-/***********************************************************************************************************************************************************/
-
-void nes_vt3x_soc_fa_device::device_add_mconfig(machine_config& config)
-{
- nes_vt02_vt03_soc_device::device_add_mconfig(config);
- m_maincpu->set_addrmap(AS_PROGRAM, &nes_vt3x_soc_fa_device::nes_vt_fa_map);
-}
-
-uint8_t nes_vt3x_soc_fa_device::vtfa_412c_r()
-{
- return m_upper_read_412c_callback();
-}
-
-void nes_vt3x_soc_fa_device::vtfa_412c_extbank_w(uint8_t data)
-{
- m_upper_write_412c_callback(data);
-
-}
-
-void nes_vt3x_soc_fa_device::vtfp_4242_w(uint8_t data)
-{
- logerror("vtfp_4242_w %02x\n", data);
- m_4242 = data;
-}
-
-void nes_vt3x_soc_fa_device::nes_vt_fa_map(address_map &map)
-{
- nes_vt3x_soc_dg_device::nes_vt_dg_map(map);
-
- map(0x412c, 0x412c).r(FUNC(nes_vt3x_soc_fa_device::vtfa_412c_r)).w(FUNC(nes_vt3x_soc_fa_device::vtfa_412c_extbank_w));
- map(0x4242, 0x4242).w(FUNC(nes_vt3x_soc_fa_device::vtfp_4242_w));
-}
-