summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/vii.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/vii.cpp')
-rw-r--r--src/mame/drivers/vii.cpp532
1 files changed, 70 insertions, 462 deletions
diff --git a/src/mame/drivers/vii.cpp b/src/mame/drivers/vii.cpp
index ebad019ebef..0fd09f99796 100644
--- a/src/mame/drivers/vii.cpp
+++ b/src/mame/drivers/vii.cpp
@@ -12,72 +12,32 @@
To-Do:
- Audio (SPG243)
-
- Known u'nSP-Based Systems:
-
- D - SPG240 - Radica Skateboarder (Sunplus QL8041C die)
- ND - SPG243 - Some form of Leapfrog "edutainment" system
- ND - SPG243 - Star Wars: Clone Wars
- ND - SPG243 - Toy Story
- ND - SPG243 - Animal Art Studio
- ND - SPG243 - Finding Nemo
- D - SPG243 - The Batman
- D - SPG243 - Wall-E
- D - SPG243 - KenSingTon / Siatronics / Jungle Soft Vii
- Partial D - SPG200 - VTech V.Smile
- ND - unknown - Zone 40
- D - SPG243 - Zone 60
- D - SPG243 - Wireless 60
- ND - unknown - Wireless Air 60
- ND - Likely many more
-
-
-Similar Systems: ( from http://en.wkikpedia.org/wiki/V.Smile )
-- V.Smile by VTech, a system designed for children under the age of 10
-- V.Smile Pocket (2 versions)
-- V.Smile Cyber Pocket
-- V.Smile PC Pal
-- V-Motion Active Learning System
-- Leapster
-- V.Smile Baby Infant Development System
-- V.Flash
-
-also on this hardware
-
- name PCB ID ROM width TSOP pads ROM size SEEPROM die markings
- Radica Play TV Football 2 L7278 x16 48 not dumped no Sunplus
- Dream Life ? x16 48 not dumped no Sunplus
-
-Detailed list of bugs:
-
-- all systems:
- Various inaccuracies in samples/envelopes.
-- vsmile:
- Games loop the first legal screen rather than continuing.
-- walle:
- Voice sample on the title screen is continually retriggered by the game code.
- Title screen lacks New Game / Continue Game menu options.
-- rad_skat:
- Palette issues on the High Score screen.
-- vii:
- Music does not loop.
- When loading a cart from file manager, sometimes MAME will crash.
- The "MOTOR" option in the diagnostic menu does nothing when selected.
- The "SPEECH IC" option in the diagnostic menu does nothing when selected.
- On 'vii_vc1' & 'vii_vc2' cart, the left-right keys are transposed with the up-down keys.
- This is not a bug per se, as the games are played with the controller physically rotated 90 degrees.
-- zone60/wirels60:
- All Games: Music does not loop.
- Basketball: MAME fatalerrors when starting the game due to jumping to invalid code.
-
+ Proper driver_device inheritance to untangle the mess of members
+
+ Detailed list of bugs:
+
+ All systems:
+ Various inaccuracies in samples/envelopes.
+
+ walle:
+ Game seems unhappy with NVRAM, clears contents on each boot.
+ rad_skat:
+ Palette issues on the High Score screen.
+ vii:
+ When loading a cart from file manager, sometimes MAME will crash.
+ The "MOTOR" option in the diagnostic menu does nothing when selected.
+ The "SPEECH IC" option in the diagnostic menu does nothing when selected.
+ On 'vii_vc1' & 'vii_vc2' cart, the left-right keys are transposed with the up-down keys.
+ - This is not a bug per se, as the games are played with the controller physically rotated 90 degrees.
+ When entering a game in Basketball, MAME fatalerrors when starting the game due to jumping to invalid code.
+ zone60/wirels60:
+ When entering a game in Basketball, MAME fatalerrors when starting the game due to jumping to invalid code.
*******************************************************************************/
#include "emu.h"
#include "cpu/unsp/unsp.h"
-#include "machine/bankdev.h"
#include "machine/i2cmem.h"
#include "machine/nvram.h"
#include "machine/spg2xx.h"
@@ -85,7 +45,6 @@ Detailed list of bugs:
#include "bus/generic/slot.h"
#include "bus/generic/carts.h"
-#include "emupal.h"
#include "screen.h"
#include "softlist.h"
#include "speaker.h"
@@ -97,17 +56,11 @@ public:
: driver_device(mconfig, type, tag)
, m_maincpu(*this, "maincpu")
, m_screen(*this, "screen")
-#if SPG2XX_VISUAL_AUDIO_DEBUG
- , m_debug_screen(*this, "debug_screen")
-#endif
, m_spg(*this, "spg")
, m_bank(*this, "cartbank")
, m_io_p1(*this, "P1")
, m_io_p2(*this, "P2")
, m_io_p3(*this, "P3")
- , m_io_motionx(*this, "MOTIONX")
- , m_io_motiony(*this, "MOTIONY")
- , m_io_motionz(*this, "MOTIONZ")
, m_i2cmem(*this, "i2cmem")
, m_nvram(*this, "nvram")
{ }
@@ -125,9 +78,10 @@ public:
void init_rad_crik();
protected:
- void switch_bank(uint32_t bank);
-
virtual void machine_start() override;
+ virtual void machine_reset() override;
+
+ void switch_bank(uint32_t bank);
DECLARE_WRITE8_MEMBER(eeprom_w);
DECLARE_READ8_MEMBER(eeprom_r);
@@ -139,39 +93,25 @@ protected:
required_device<cpu_device> m_maincpu;
required_device<screen_device> m_screen;
-#if SPG2XX_VISUAL_AUDIO_DEBUG
- required_device<screen_device> m_debug_screen;
-#endif
required_device<spg2xx_device> m_spg;
optional_memory_bank m_bank;
-protected:
- DECLARE_WRITE_LINE_MEMBER(poll_controls);
-
DECLARE_READ16_MEMBER(walle_portc_r);
DECLARE_WRITE16_MEMBER(walle_portc_w);
- virtual void machine_reset() override;
-
virtual void mem_map(address_map &map);
uint32_t m_current_bank;
std::unique_ptr<uint8_t[]> m_serial_eeprom;
- uint8_t m_controller_input[8];
uint8_t m_w60_controller_input;
uint16_t m_w60_porta_data;
uint16_t m_walle_portc_data;
- inline void verboselog(int n_level, const char *s_fmt, ...) ATTR_PRINTF(3, 4);
-
required_ioport m_io_p1;
optional_ioport m_io_p2;
optional_ioport m_io_p3;
- optional_ioport m_io_motionx;
- optional_ioport m_io_motiony;
- optional_ioport m_io_motionz;
optional_device<i2cmem_device> m_i2cmem;
optional_device<nvram_device> m_nvram;
@@ -179,96 +119,43 @@ protected:
DECLARE_READ16_MEMBER(rad_crik_hack_r);
};
-class vsmile_state : public spg2xx_game_state
+class vii_state : public spg2xx_game_state
{
public:
- vsmile_state(const machine_config &mconfig, device_type type, const char *tag)
+ vii_state(const machine_config &mconfig, device_type type, const char *tag)
: spg2xx_game_state(mconfig, type, tag)
, m_cart(*this, "cartslot")
- , m_bankdev(*this, "bank")
- , m_system_region(*this, "maincpu")
+ , m_io_motionx(*this, "MOTIONX")
+ , m_io_motiony(*this, "MOTIONY")
+ , m_io_motionz(*this, "MOTIONZ")
+ , m_cart_region(nullptr)
+ , m_ctrl_poll_timer(nullptr)
{ }
- void vsmile(machine_config &config);
- void vsmilep(machine_config &config);
+ void vii(machine_config &config);
private:
virtual void machine_start() override;
virtual void machine_reset() override;
- virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
-
- static const device_timer_id TIMER_PAD = 0;
-
- virtual void mem_map(address_map &map) override;
- void banked_map(address_map &map);
- DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cart);
-
- DECLARE_READ16_MEMBER(portb_r);
- DECLARE_READ16_MEMBER(portc_r);
- DECLARE_WRITE16_MEMBER(portb_w);
- DECLARE_WRITE16_MEMBER(portc_w);
-
- DECLARE_WRITE8_MEMBER(chip_sel_w);
-
- DECLARE_WRITE8_MEMBER(uart_tx);
-
- DECLARE_READ16_MEMBER(bank0_r);
- DECLARE_READ16_MEMBER(bank1_r);
- DECLARE_READ16_MEMBER(bank2_r);
- DECLARE_READ16_MEMBER(bank3_r);
- optional_device<generic_slot_device> m_cart;
- required_device<address_map_bank_device> m_bankdev;
- memory_region *m_cart_region;
- required_memory_region m_system_region;
-
- emu_timer *m_pad_timer;
- uint8_t m_pad_counter;
-
- uint16_t m_portb_data;
- uint16_t m_portc_data;
-};
-
-class spg2xx_cart_state : public spg2xx_game_state
-{
-public:
- spg2xx_cart_state(const machine_config &mconfig, device_type type, const char *tag)
- : spg2xx_game_state(mconfig, type, tag)
- , m_cart(*this, "cartslot")
- { }
-
- void vii(machine_config &config);
+ static const device_timer_id TIMER_CTRL_POLL = 0;
+ virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
-private:
DECLARE_WRITE16_MEMBER(vii_portb_w);
DECLARE_DEVICE_IMAGE_LOAD_MEMBER(vii_cart);
- virtual void machine_start() override;
- virtual void machine_reset() override;
+ virtual void poll_controls();
- optional_device<generic_slot_device> m_cart;
+ required_device<generic_slot_device> m_cart;
+ required_ioport m_io_motionx;
+ required_ioport m_io_motiony;
+ required_ioport m_io_motionz;
memory_region *m_cart_region;
-};
-#define VERBOSE_LEVEL (4)
-
-#define ENABLE_VERBOSE_LOG (1)
-
-inline void spg2xx_game_state::verboselog(int n_level, const char *s_fmt, ...)
-{
-#if ENABLE_VERBOSE_LOG
- if (VERBOSE_LEVEL >= n_level)
- {
- va_list v;
- char buf[32768];
- va_start(v, s_fmt);
- vsprintf(buf, s_fmt, v);
- logerror("%s", buf);
- va_end(v);
- }
-#endif
-}
+ emu_timer *m_ctrl_poll_timer;
+ uint8_t m_controller_input[8];
+};
/*************************
* Machine Hardware *
@@ -326,117 +213,23 @@ WRITE16_MEMBER(spg2xx_game_state::wireless60_portb_w)
switch_bank(data & 7);
}
-WRITE16_MEMBER(spg2xx_cart_state::vii_portb_w)
+void vii_state::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
{
- if (data == 0x7c) machine().debug_break();
- switch_bank(((data & 0x80) >> 7) | ((data & 0x20) >> 4));
-}
-
-void vsmile_state::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
-{
- if (id == TIMER_PAD)
+ switch (id)
{
- m_pad_counter++;
- if (m_pad_counter >= 100)
- {
- m_pad_counter = 0;
- //m_spg->uart_rx(0x55);
- }
+ case TIMER_CTRL_POLL:
+ poll_controls();
+ break;
+ default:
+ logerror("Unknown timer ID: %d\n", id);
+ break;
}
}
-#define VSMILE_PORTB_CS1 0x0001
-#define VSMILE_PORTB_CS2 0x0002
-#define VSMILE_PORTB_CART 0x0004
-#define VSMILE_PORTB_RESET 0x0008
-#define VSMILE_PORTB_FRONT24 0x0010
-#define VSMILE_PORTB_OFF 0x0020
-#define VSMILE_PORTB_OFF_SW 0x0040
-#define VSMILE_PORTB_ON_SW 0x0080
-
-#define VSMILE_PORTC_VER 0x000f
-#define VSMILE_PORTC_LOGO 0x0010
-#define VSMILE_PORTC_TEST 0x0020
-#define VSMILE_PORTC_AMP 0x0040
-#define VSMILE_PORTC_SYSRESET 0x0080
-
-READ16_MEMBER(vsmile_state::bank0_r)
-{
- return ((uint16_t*)m_cart_region->base())[offset];
-}
-
-READ16_MEMBER(vsmile_state::bank1_r)
-{
- return ((uint16_t*)m_cart_region->base())[offset + 0x100000];
-}
-
-READ16_MEMBER(vsmile_state::bank2_r)
-{
- return ((uint16_t*)m_cart_region->base())[offset + 0x200000];
-}
-
-READ16_MEMBER(vsmile_state::bank3_r)
-{
- return ((uint16_t*)m_system_region->base())[offset];
-}
-
-READ16_MEMBER(vsmile_state::portb_r)
-{
- //const uint8_t inputs = m_io_p2->read();
- //const uint16_t input_bits = BIT(inputs, 0) ? VSMILE_PORTB_ON_SW : 0;
- //const uint16_t data = VSMILE_PORTB_ON_SW | VSMILE_PORTB_OFF_SW | (m_cart && m_cart->exists() ? VSMILE_PORTB_CART : 0);
- //logerror("V.Smile Port B read %04x, mask %04x\n", data, mem_mask);
- //printf("V.Smile Port B read %04x, mask %04x\n", data, mem_mask);
- return m_portb_data;// | data;
-}
-
-READ16_MEMBER(vsmile_state::portc_r)
-{
- uint16_t data = 0x0004;
- if (m_portc_data & 0x0100)
- data |= 0x0400;
- if (m_portc_data & 0x0200)
- data |= 0x1000;
- //logerror("V.Smile Port C read %04x, mask %04x\n", data, mem_mask);
- return (m_portc_data & ~0x000f) | data;
-}
-
-WRITE16_MEMBER(vsmile_state::portb_w)
-{
- m_portb_data = data;//(m_portb_data &~ mem_mask) | (data & mem_mask);
- //logerror("V.Smile Port B write %04x, mask %04x\n", m_portb_data, mem_mask);
- //printf("V.Smile Port B write %04x, mask %04x\n", m_portb_data, mem_mask);
-}
-
-WRITE16_MEMBER(vsmile_state::portc_w)
-{
- m_portc_data = data;//(m_portc_data &~ mem_mask) | (data & mem_mask);
- //logerror("V.Smile Port C write %04x, mask %04x\n", m_portc_data, mem_mask);
- //printf("V.Smile Port C write %04x, mask %04x\n", m_portc_data, mem_mask);
- //printf("%02x ", data >> 8);
-}
-
-WRITE8_MEMBER(vsmile_state::uart_tx)
-{
- logerror("UART Tx: %02x\n", data);
-}
-
-WRITE8_MEMBER(vsmile_state::chip_sel_w)
+WRITE16_MEMBER(vii_state::vii_portb_w)
{
- const uint16_t cart_offset = m_cart && m_cart->exists() ? 4 : 0;
- switch (data)
- {
- case 0:
- m_bankdev->set_bank(cart_offset);
- break;
- case 1:
- m_bankdev->set_bank(1 + cart_offset);
- break;
- case 2:
- case 3:
- m_bankdev->set_bank(2 + cart_offset);
- break;
- }
+ if (data == 0x7c) machine().debug_break();
+ switch_bank(((data & 0x80) >> 7) | ((data & 0x20) >> 4));
}
READ16_MEMBER(spg2xx_game_state::walle_portc_r)
@@ -474,40 +267,6 @@ void spg2xx_game_state::mem_map(address_map &map)
map(0x000000, 0x003fff).m(m_spg, FUNC(spg2xx_device::map));
}
-void vsmile_state::banked_map(address_map &map)
-{
- map(0x0000000, 0x00fffff).rom().region("maincpu", 0);
- map(0x0100000, 0x01fffff).rom().region("maincpu", 0);
- map(0x0200000, 0x02fffff).rom().region("maincpu", 0);
- map(0x0300000, 0x03fffff).rom().region("maincpu", 0);
-
- map(0x0400000, 0x04fffff).rom().region("maincpu", 0);
- map(0x0500000, 0x05fffff).rom().region("maincpu", 0);
- map(0x0600000, 0x06fffff).rom().region("maincpu", 0);
- map(0x0700000, 0x07fffff).rom().region("maincpu", 0);
-
- map(0x0800000, 0x08fffff).rom().region("maincpu", 0);
- map(0x0900000, 0x09fffff).rom().region("maincpu", 0);
- map(0x0a00000, 0x0afffff).rom().region("maincpu", 0);
- map(0x0b00000, 0x0bfffff).rom().region("maincpu", 0);
-
- map(0x1000000, 0x13fffff).r(FUNC(vsmile_state::bank0_r));
-
- map(0x1400000, 0x15fffff).r(FUNC(vsmile_state::bank0_r));
- map(0x1600000, 0x17fffff).r(FUNC(vsmile_state::bank1_r));
-
- map(0x1800000, 0x18fffff).r(FUNC(vsmile_state::bank0_r));
- map(0x1900000, 0x19fffff).r(FUNC(vsmile_state::bank1_r));
- map(0x1a00000, 0x1afffff).nopr();
- map(0x1b00000, 0x1bfffff).r(FUNC(vsmile_state::bank3_r));
-}
-
-void vsmile_state::mem_map(address_map &map)
-{
- map(0x000000, 0x3fffff).r(m_bankdev, FUNC(address_map_bank_device::read16));
- map(0x000000, 0x003fff).m(m_spg, FUNC(spg2xx_device::map));
-}
-
static INPUT_PORTS_START( vii )
PORT_START("P1")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(1) PORT_NAME("Joypad Up")
@@ -541,26 +300,6 @@ static INPUT_PORTS_START( batman )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_PLAYER(1) PORT_NAME("X Button")
INPUT_PORTS_END
-static INPUT_PORTS_START( vsmile )
- PORT_START("P1")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(1) PORT_NAME("Joypad Up")
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) PORT_NAME("Joypad Down")
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) PORT_NAME("Joypad Left")
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) PORT_NAME("Joypad Right")
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_NAME("A Button")
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(1) PORT_NAME("Menu")
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_PLAYER(1) PORT_NAME("B Button")
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_PLAYER(1) PORT_NAME("X Button")
-
- PORT_START("P2")
- PORT_DIPNAME( 0x0001, 0x0001, "POWER ON" )
- PORT_DIPSETTING( 0x0001, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_DIPNAME( 0x0002, 0x0002, "POWER OFF" )
- PORT_DIPSETTING( 0x0002, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
-INPUT_PORTS_END
-
static INPUT_PORTS_START( walle )
PORT_START("P1")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(1) PORT_NAME("Joypad Up")
@@ -738,7 +477,7 @@ static INPUT_PORTS_START( rad_crik )
PORT_BIT( 0xffff, IP_ACTIVE_LOW, IPT_UNKNOWN )
INPUT_PORTS_END
-void spg2xx_cart_state::machine_start()
+void vii_state::machine_start()
{
spg2xx_game_state::machine_start();
@@ -747,50 +486,29 @@ void spg2xx_cart_state::machine_start()
{
std::string region_tag;
m_cart_region = memregion(region_tag.assign(m_cart->tag()).append(GENERIC_ROM_REGION_TAG).c_str());
- m_bank->configure_entries(0, ceilf((float)m_cart_region->bytes() / 0x800000), m_cart_region->base(), 0x800000);
+ m_bank->configure_entries(0, (m_cart_region->bytes() + 0x7fffff) / 0x800000, m_cart_region->base(), 0x800000);
m_bank->set_entry(0);
}
-}
-
-void vsmile_state::machine_start()
-{
- // if there's a cart, override the standard banking
- if (m_cart && m_cart->exists())
- {
- std::string region_tag;
- m_cart_region = memregion(region_tag.assign(m_cart->tag()).append(GENERIC_ROM_REGION_TAG).c_str());
- }
-
- m_bankdev->set_bank(m_cart && m_cart->exists() ? 4 : 0);
-
- m_serial_eeprom = std::make_unique<uint8_t[]>(0x400);
- if (m_nvram)
- m_nvram->set_base(&m_serial_eeprom[0], 0x400);
- m_pad_timer = timer_alloc(TIMER_PAD);
- m_pad_timer->adjust(attotime::never);
+ m_ctrl_poll_timer = timer_alloc(TIMER_CTRL_POLL);
+ m_ctrl_poll_timer->adjust(attotime::never);
}
-void vsmile_state::machine_reset()
+void vii_state::machine_reset()
{
- m_portb_data = 0;
- m_portc_data = 0;
+ spg2xx_game_state::machine_reset();
- m_pad_timer->adjust(attotime::from_hz(100), 0, attotime::from_hz(100));
- m_pad_counter = 0;
-}
-
-void spg2xx_cart_state::machine_reset()
-{
m_controller_input[0] = 0;
m_controller_input[4] = 0;
m_controller_input[6] = 0xff;
m_controller_input[7] = 0;
+
+ m_ctrl_poll_timer->adjust(attotime::from_hz(60), 0, attotime::from_hz(60));
}
void spg2xx_game_state::machine_start()
{
- m_bank->configure_entries(0, ceilf((float)memregion("maincpu")->bytes() / 0x800000), memregion("maincpu")->base(), 0x800000);
+ m_bank->configure_entries(0, (memregion("maincpu")->bytes() + 0x7fffff) / 0x800000, memregion("maincpu")->base(), 0x800000);
m_bank->set_entry(0);
m_serial_eeprom = std::make_unique<uint8_t[]>(0x400);
@@ -806,11 +524,8 @@ void spg2xx_game_state::machine_reset()
m_w60_porta_data = 0;
}
-WRITE_LINE_MEMBER(spg2xx_game_state::poll_controls)
+void vii_state::poll_controls()
{
- if (!state)
- return;
-
int32_t x = m_io_motionx ? ((int32_t)m_io_motionx->read() - 0x200) : 0;
int32_t y = m_io_motiony ? ((int32_t)m_io_motiony->read() - 0x200) : 0;
int32_t z = m_io_motionz ? ((int32_t)m_io_motionz->read() - 0x200) : 0;
@@ -837,7 +552,7 @@ WRITE_LINE_MEMBER(spg2xx_game_state::poll_controls)
}
}
-DEVICE_IMAGE_LOAD_MEMBER(spg2xx_cart_state, vii_cart)
+DEVICE_IMAGE_LOAD_MEMBER(vii_state, vii_cart)
{
uint32_t size = m_cart->common_get_size("rom");
@@ -853,16 +568,6 @@ DEVICE_IMAGE_LOAD_MEMBER(spg2xx_cart_state, vii_cart)
return image_init_result::PASS;
}
-DEVICE_IMAGE_LOAD_MEMBER(vsmile_state, cart)
-{
- uint32_t size = m_cart->common_get_size("rom");
-
- m_cart->rom_alloc(size, GENERIC_ROM16_WIDTH, ENDIANNESS_LITTLE);
- m_cart->common_load_rom(m_cart->get_rom_base(), size, "rom");
-
- return image_init_result::PASS;
-}
-
void spg2xx_game_state::spg2xx_base(machine_config &config)
{
UNSP(config, m_maincpu, XTAL(27'000'000));
@@ -875,14 +580,6 @@ void spg2xx_game_state::spg2xx_base(machine_config &config)
m_screen->set_screen_update("spg", FUNC(spg2xx_device::screen_update));
m_screen->screen_vblank().set(m_spg, FUNC(spg2xx_device::vblank));
-#if SPG2XX_VISUAL_AUDIO_DEBUG
- SCREEN(config, m_debug_screen, SCREEN_TYPE_RASTER);
- m_debug_screen->set_refresh_hz(60);
- m_debug_screen->set_size(1024, 768);
- m_debug_screen->set_visarea(0, 1024-1, 0, 768-1);
- m_debug_screen->set_screen_update("spg", FUNC(spg2xx_device::debug_screen_update));
-#endif
-
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
m_spg->add_route(ALL_OUTPUTS, "lspeaker", 0.5);
@@ -891,11 +588,7 @@ void spg2xx_game_state::spg2xx_base(machine_config &config)
void spg2xx_game_state::non_spg_base(machine_config &config)
{
-#if SPG2XX_VISUAL_AUDIO_DEBUG
- SPG24X(config, m_spg, XTAL(27'000'000), m_maincpu, m_screen, m_debug_screen);
-#else
SPG24X(config, m_spg, XTAL(27'000'000), m_maincpu, m_screen);
-#endif
spg2xx_base(config);
}
@@ -908,76 +601,29 @@ void spg2xx_game_state::spg2xx_basep(machine_config &config)
m_screen->set_size(320, 312);
}
-void spg2xx_cart_state::vii(machine_config &config)
+void vii_state::vii(machine_config &config)
{
-#if SPG2XX_VISUAL_AUDIO_DEBUG
- SPG24X(config, m_spg, XTAL(27'000'000), m_maincpu, m_screen, m_debug_screen);
-#else
SPG24X(config, m_spg, XTAL(27'000'000), m_maincpu, m_screen);
-#endif
spg2xx_base(config);
- m_screen->screen_vblank().append(FUNC(spg2xx_cart_state::poll_controls));
- m_spg->portb_out().set(FUNC(spg2xx_cart_state::vii_portb_w));
- m_spg->eeprom_w().set(FUNC(spg2xx_cart_state::eeprom_w));
- m_spg->eeprom_r().set(FUNC(spg2xx_cart_state::eeprom_r));
+ m_spg->portb_out().set(FUNC(vii_state::vii_portb_w));
+ m_spg->eeprom_w().set(FUNC(vii_state::eeprom_w));
+ m_spg->eeprom_r().set(FUNC(vii_state::eeprom_r));
NVRAM(config, m_nvram, nvram_device::DEFAULT_ALL_1);
GENERIC_CARTSLOT(config, m_cart, generic_plain_slot, "vii_cart");
m_cart->set_width(GENERIC_ROM16_WIDTH);
- m_cart->set_device_load(device_image_load_delegate(&spg2xx_cart_state::device_image_load_vii_cart, this));
+ m_cart->set_device_load(device_image_load_delegate(&vii_state::device_image_load_vii_cart, this));
SOFTWARE_LIST(config, "vii_cart").set_original("vii");
}
-void vsmile_state::vsmile(machine_config &config)
-{
-#if SPG2XX_VISUAL_AUDIO_DEBUG
- SPG24X(config, m_spg, XTAL(27'000'000), m_maincpu, m_screen, m_debug_screen);
-#else
- SPG24X(config, m_spg, XTAL(27'000'000), m_maincpu, m_screen);
-#endif
- spg2xx_base(config);
- m_maincpu->set_addrmap(AS_PROGRAM, &vsmile_state::mem_map);
-
- m_spg->portb_in().set(FUNC(vsmile_state::portb_r));
- m_spg->portc_in().set(FUNC(vsmile_state::portc_r));
- m_spg->portb_out().set(FUNC(vsmile_state::portb_w));
- m_spg->portc_out().set(FUNC(vsmile_state::portc_w));
- m_spg->chip_select().set(FUNC(vsmile_state::chip_sel_w));
- m_spg->uart_tx().set(FUNC(vsmile_state::uart_tx));
-
- GENERIC_CARTSLOT(config, m_cart, generic_plain_slot, "vsmile_cart");
- m_cart->set_width(GENERIC_ROM16_WIDTH);
- m_cart->set_device_load(device_image_load_delegate(&vsmile_state::device_image_load_cart, this));
-
- ADDRESS_MAP_BANK(config, m_bankdev);
- m_bankdev->set_addrmap(AS_PROGRAM, &vsmile_state::banked_map);
- m_bankdev->set_endianness(ENDIANNESS_LITTLE);
- m_bankdev->set_data_width(16);
- m_bankdev->set_shift(-1);
- m_bankdev->set_stride(0x400000);
-
- SOFTWARE_LIST(config, "cart_list").set_original("vsmile_cart");
-}
-
-void vsmile_state::vsmilep(machine_config &config)
-{
- vsmile(config);
- m_spg->set_pal(true);
-}
-
void spg2xx_game_state::wireless60(machine_config &config)
{
-#if SPG2XX_VISUAL_AUDIO_DEBUG
- SPG24X(config, m_spg, XTAL(27'000'000), m_maincpu, m_screen, m_debug_screen);
-#else
SPG24X(config, m_spg, XTAL(27'000'000), m_maincpu, m_screen);
-#endif
spg2xx_base(config);
- m_screen->screen_vblank().append(FUNC(spg2xx_game_state::poll_controls));
m_spg->porta_out().set(FUNC(spg2xx_game_state::wireless60_porta_w));
m_spg->portb_out().set(FUNC(spg2xx_game_state::wireless60_portb_w));
@@ -986,14 +632,10 @@ void spg2xx_game_state::wireless60(machine_config &config)
void spg2xx_game_state::jakks(machine_config &config)
{
-#if SPG2XX_VISUAL_AUDIO_DEBUG
- SPG24X(config, m_spg, XTAL(27'000'000), m_maincpu, m_screen, m_debug_screen);
-#else
SPG24X(config, m_spg, XTAL(27'000'000), m_maincpu, m_screen);
-#endif
spg2xx_base(config);
- m_spg->porta_in().set(FUNC(spg2xx_cart_state::jakks_porta_r));
+ m_spg->porta_in().set(FUNC(spg2xx_game_state::jakks_porta_r));
I2CMEM(config, m_i2cmem, 0).set_data_size(0x200);
}
@@ -1008,11 +650,7 @@ void spg2xx_game_state::walle(machine_config &config)
void spg2xx_game_state::rad_skat(machine_config &config)
{
-#if SPG2XX_VISUAL_AUDIO_DEBUG
- SPG24X(config, m_spg, XTAL(27'000'000), m_maincpu, m_screen, m_debug_screen);
-#else
SPG24X(config, m_spg, XTAL(27'000'000), m_maincpu, m_screen);
-#endif
spg2xx_base(config);
m_spg->porta_in().set_ioport("P1");
@@ -1032,11 +670,7 @@ void spg2xx_game_state::rad_skatp(machine_config &config)
void spg2xx_game_state::rad_crik(machine_config &config)
{
-#if SPG2XX_VISUAL_AUDIO_DEBUG
- SPG28X(config, m_spg, XTAL(27'000'000), m_maincpu, m_screen, m_debug_screen);
-#else
SPG28X(config, m_spg, XTAL(27'000'000), m_maincpu, m_screen);
-#endif
spg2xx_base(config);
m_spg->porta_in().set_ioport("P1");
@@ -1073,26 +707,6 @@ ROM_START( batmantv )
ROM_LOAD16_WORD_SWAP( "batman.bin", 0x000000, 0x400000, CRC(46f848e5) SHA1(5875d57bb3fe0cac5d20e626e4f82a0e5f9bb94c) )
ROM_END
-ROM_START( vsmile )
- ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASEFF )
- ROM_LOAD( "vsmilebios.bin", 0x000000, 0x200000, CRC(11f1b416) SHA1(11f77c4973d29c962567390e41879c86a759c93b) )
-ROM_END
-
-ROM_START( vsmileg )
- ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASEFF )
- ROM_LOAD16_WORD_SWAP( "bios german.bin", 0x000000, 0x200000, CRC(205c5296) SHA1(7fbcf761b5885c8b1524607aabaf364b4559c8cc) )
-ROM_END
-
-ROM_START( vsmilef )
- ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASEFF )
- ROM_LOAD16_WORD_SWAP( "sysrom_france", 0x000000, 0x200000, CRC(0cd0bdf5) SHA1(5c8d1eada1b6b545555b8d2b09325d7127681af8) )
-ROM_END
-
-ROM_START( vsmileb )
- ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASEFF )
- ROM_LOAD( "vbabybios.bin", 0x000000, 0x800000, CRC(ddc7f845) SHA1(2c17d0f54200070176d03d44a40c7923636e596a) )
-ROM_END
-
ROM_START( walle )
ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASEFF )
ROM_LOAD16_WORD_SWAP( "walle.bin", 0x000000, 0x400000, BAD_DUMP CRC(bd554cba) SHA1(6cd06a036ab12e7b0e1fd8003db873b0bb783868) )
@@ -1252,14 +866,8 @@ ROM_END
// year, name, parent, compat, machine, input, class, init, company, fullname, flags
-// VTech systems
-CONS( 2005, vsmile, 0, 0, vsmile, vsmile, vsmile_state, empty_init, "VTech", "V.Smile (US)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS | MACHINE_NOT_WORKING )
-CONS( 2005, vsmileg, vsmile, 0, vsmilep, vsmile, vsmile_state, empty_init, "VTech", "V.Smile (Germany)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS | MACHINE_NOT_WORKING )
-CONS( 2005, vsmilef, vsmile, 0, vsmilep, vsmile, vsmile_state, empty_init, "VTech", "V.Smile (France)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS | MACHINE_NOT_WORKING )
-CONS( 2005, vsmileb, 0, 0, vsmile, vsmile, vsmile_state, empty_init, "VTech", "V.Smile Baby (US)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS | MACHINE_NOT_WORKING )
-
// Jungle Soft TV games
-CONS( 2007, vii, 0, 0, vii, vii, spg2xx_cart_state, empty_init, "Jungle Soft / KenSingTon / Siatronics", "Vii", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // motion controls are awkward, but playable for the most part
+CONS( 2007, vii, 0, 0, vii, vii, vii_state, empty_init, "Jungle Soft / KenSingTon / Siatronics", "Vii", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // motion controls are awkward, but playable for the most part
CONS( 2010, zone60, 0, 0, wireless60, wirels60, spg2xx_game_state, empty_init, "Jungle's Soft / Ultimate Products (HK) Ltd", "Zone 60", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS )
CONS( 2010, wirels60, 0, 0, wireless60, wirels60, spg2xx_game_state, empty_init, "Jungle Soft / Kids Station Toys Inc", "Wireless 60", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS )