From f2bd8d63d0af42a96fc923272abfde0a3ee4822d Mon Sep 17 00:00:00 2001 From: mamehaze <140764005+mamehaze@users.noreply.github.com> Date: Thu, 2 Nov 2023 16:15:48 +0000 Subject: skeleton/evolution_handheld.cpp: Added skeleton for Kidz Delight Evolution Max. (#11676) cpu/evolution: Added dummy CPU core so disassembly will show in debugger. * new skeleton - Evolution New systems marked not working ------------------- Kidz Delight Evolution Max [TeamEurope, David Haywood] --- scripts/src/cpu.lua | 9 +++- src/devices/cpu/evolution/evo.cpp | 51 ++++++++++++++++++++ src/devices/cpu/evolution/evo.h | 40 +++++++++++++++ src/mame/mame.lst | 5 +- src/mame/skeleton/evolution_handheld.cpp | 83 ++++++++++++++++++++++++++++++++ 5 files changed, 186 insertions(+), 2 deletions(-) create mode 100644 src/devices/cpu/evolution/evo.cpp create mode 100644 src/devices/cpu/evolution/evo.h create mode 100644 src/mame/skeleton/evolution_handheld.cpp diff --git a/scripts/src/cpu.lua b/scripts/src/cpu.lua index 2a652595ef4..60bdee13b54 100644 --- a/scripts/src/cpu.lua +++ b/scripts/src/cpu.lua @@ -3894,10 +3894,17 @@ if opt_tool(CPUS, "DDP516") then end -------------------------------------------------- --- Whatever is in the Evolution, disassembler only +-- Whatever is in the Evolution --@src/devices/cpu/evolution/evo.h,CPUS["EVOLUTION"] = true -------------------------------------------------- +if CPUS["EVOLUTION"] then + files { + MAME_DIR .. "src/devices/cpu/evolution/evo.cpp", + MAME_DIR .. "src/devices/cpu/evolution/evo.h", + } +end + if opt_tool(CPUS, "EVOLUTION") then table.insert(disasm_files , MAME_DIR .. "src/devices/cpu/evolution/evod.cpp") table.insert(disasm_files , MAME_DIR .. "src/devices/cpu/evolution/evod.h") diff --git a/src/devices/cpu/evolution/evo.cpp b/src/devices/cpu/evolution/evo.cpp new file mode 100644 index 00000000000..335a2e191e0 --- /dev/null +++ b/src/devices/cpu/evolution/evo.cpp @@ -0,0 +1,51 @@ +// license:BSD-3-Clause +// copyright-holders:David Haywood + +#include "emu.h" +#include "evo.h" + +#include "evod.h" + + +DEFINE_DEVICE_TYPE(EVOLUTION_CPU, evo_cpu_device, "evo_cpu", "Evolution CPU") + +evo_cpu_device::evo_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) + : cpu_device(mconfig, EVOLUTION_CPU, tag, owner, clock) + , m_program_config("program", ENDIANNESS_LITTLE, 16, 24, -1) + , m_pc(0) + , m_icount(0) +{ +} + +std::unique_ptr evo_cpu_device::create_disassembler() +{ + return std::make_unique(); +} + +device_memory_interface::space_config_vector evo_cpu_device::memory_space_config() const +{ + return space_config_vector { + std::make_pair(AS_PROGRAM, &m_program_config) + }; +} + +void evo_cpu_device::device_start() +{ + state_add(STATE_GENPC, "PC", m_pc); + state_add(STATE_GENPCBASE, "CURPC", m_pc).noshow(); + set_icountptr(m_icount); +} + +void evo_cpu_device::device_reset() +{ + m_pc = 0x400000; +} + +void evo_cpu_device::execute_set_input(int irqline, int state) +{ +} + +void evo_cpu_device::execute_run() +{ + m_icount = 0; +} diff --git a/src/devices/cpu/evolution/evo.h b/src/devices/cpu/evolution/evo.h new file mode 100644 index 00000000000..992e302e835 --- /dev/null +++ b/src/devices/cpu/evolution/evo.h @@ -0,0 +1,40 @@ +// license:BSD-3-Clause +// copyright-holders:David Haywood + +#ifndef MAME_CPU_EVO_EVO_H +#define MAME_CPU_EVO_EVO_H + +#pragma once + + +class evo_cpu_device : public cpu_device +{ +public: + evo_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + +protected: + virtual void device_start() override; + virtual void device_reset() override; + + virtual uint32_t execute_min_cycles() const noexcept override { return 1; } + virtual uint32_t execute_max_cycles() const noexcept override { return 1; } + virtual uint32_t execute_input_lines() const noexcept override { return 0; } + virtual void execute_run() override; + virtual void execute_set_input(int inputnum, int state) override; + + virtual space_config_vector memory_space_config() const override; + + virtual std::unique_ptr create_disassembler() override; + +private: + address_space_config m_program_config; + + uint32_t m_pc; + + int m_icount; +}; + + +DECLARE_DEVICE_TYPE(EVOLUTION_CPU, evo_cpu_device) + +#endif // MAME_CPU_EVO_EVO_H diff --git a/src/mame/mame.lst b/src/mame/mame.lst index 6561487baff..054241ce7b3 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -41398,8 +41398,11 @@ eurit30 // @source:skeleton/eurocom2.cpp eurocom2 // -waveterm // microtrol // +waveterm // + +@source:skeleton/evolution_handheld.cpp +evolhh @source:skeleton/fanucs15.cpp fanucs15 // 1990 diff --git a/src/mame/skeleton/evolution_handheld.cpp b/src/mame/skeleton/evolution_handheld.cpp new file mode 100644 index 00000000000..ef3691d2e1b --- /dev/null +++ b/src/mame/skeleton/evolution_handheld.cpp @@ -0,0 +1,83 @@ +// license:BSD-3-Clause +// copyright-holders:David Haywood + +// TODO: identify the CPU type! - there are vectors(?) near the start + +#include "emu.h" + +#include "cpu/evolution/evo.h" + +#include "screen.h" +#include "speaker.h" + + +namespace { + +class evolution_handheldgame_state : public driver_device +{ +public: + evolution_handheldgame_state(const machine_config &mconfig, device_type type, const char *tag) : + driver_device(mconfig, type, tag), + m_maincpu(*this, "maincpu") + { } + + void evolhh(machine_config &config); + +private: + virtual void machine_start() override; + virtual void machine_reset() override; + + uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + + required_device m_maincpu; + + void evolution_map(address_map &map); +}; + +void evolution_handheldgame_state::machine_start() +{ +} + +void evolution_handheldgame_state::machine_reset() +{ +} + +static INPUT_PORTS_START( evolhh ) +INPUT_PORTS_END + + +uint32_t evolution_handheldgame_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) +{ + return 0; +} + +void evolution_handheldgame_state::evolution_map(address_map &map) +{ + map(0x400000, 0x41ffff).rom().region("maincpu", 0x00000); +} + + +void evolution_handheldgame_state::evolhh(machine_config &config) +{ + EVOLUTION_CPU(config, m_maincpu, XTAL(16'000'000)); + m_maincpu->set_addrmap(AS_PROGRAM, &evolution_handheldgame_state::evolution_map); + + screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); + screen.set_refresh_hz(60); + screen.set_vblank_time(ATTOSECONDS_IN_USEC(0)); + screen.set_size(256, 256); // resolution not confirmed + screen.set_visarea(0, 256-1, 0, 256-1); + screen.set_screen_update(FUNC(evolution_handheldgame_state::screen_update)); + + SPEAKER(config, "speaker").front_center(); +} + +ROM_START( evolhh ) + ROM_REGION( 0x400000, "maincpu", 0 ) + ROM_LOAD( "s29gl032m90tfir4.u4", 0x000000, 0x400000, CRC(c647ca01) SHA1(a88f512d3fe8803dadc4eb6a94b5babd40c698de) ) +ROM_END + +} // anonymous namespace + + +CONS( 2006, evolhh, 0, 0, evolhh, evolhh, evolution_handheldgame_state, empty_init, "Kidz Delight", "Evolution Max", MACHINE_IS_SKELETON ) // from a pink 'for girls' unit, exists in other colours, software likely the same -- cgit v1.2.3