Start adding the m37640

This commit is contained in:
Olivier Galibert 2024-03-10 10:42:21 +01:00
parent 758a61efe2
commit 7fe04d0f8e
3 changed files with 72 additions and 0 deletions

View File

@ -1642,6 +1642,7 @@ end
--@src/devices/cpu/m6502/gew7.h,CPUS["M6502"] = true
--@src/devices/cpu/m6502/gew12.h,CPUS["M6502"] = true
--@src/devices/cpu/m6502/m3745x.h,CPUS["M6502"] = true
--@src/devices/cpu/m6502/m37640.h,CPUS["M6502"] = true
--@src/devices/cpu/m6502/m4510.h,CPUS["M6502"] = true
--@src/devices/cpu/m6502/m50734.h,CPUS["M6502"] = true
--@src/devices/cpu/m6502/m5074x.h,CPUS["M6502"] = true
@ -1681,6 +1682,8 @@ if CPUS["M6502"] then
MAME_DIR .. "src/devices/cpu/m6502/gew12.h",
MAME_DIR .. "src/devices/cpu/m6502/m3745x.cpp",
MAME_DIR .. "src/devices/cpu/m6502/m3745x.h",
MAME_DIR .. "src/devices/cpu/m6502/m37640.cpp",
MAME_DIR .. "src/devices/cpu/m6502/m37640.h",
MAME_DIR .. "src/devices/cpu/m6502/m4510.cpp",
MAME_DIR .. "src/devices/cpu/m6502/m4510.h",
MAME_DIR .. "src/devices/cpu/m6502/m50734.cpp",

View File

@ -0,0 +1,31 @@
// license:BSD-3-Clause
// copyright-holders:Olivier Galibert
// Mitsubishi M37640 8-bit microcontroller with usb support
#include "emu.h"
#include "m37640.h"
DEFINE_DEVICE_TYPE(M37640, m37640_device, "m37640", "Mitsubishi M37640")
m37640_device::m37640_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock, u32 mode) :
m740_device(mconfig, M37640, tag, owner, clock),
m_mode(mode)
{
program_config.m_internal_map = address_map_constructor(FUNC(m37640_device::map), this);
}
void m37640_device::device_start()
{
m740_device::device_start();
}
void m37640_device::device_reset()
{
m740_device::device_start();
}
void m37640_device::map(address_map &map)
{
(void)m_mode;
}

View File

@ -0,0 +1,38 @@
// license:BSD-3-Clause
// copyright-holders:Olivier Galibert
#ifndef MAME_CPU_M6502_M37640_H
#define MAME_CPU_M6502_M37640_H
#pragma once
#include "m740.h"
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
// ======================> m37640_device
class m37640_device : public m740_device
{
public:
enum {
INT1_LINE = INPUT_LINE_IRQ0,
INT2_LINE,
};
m37640_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock, u32 mode = 2);
protected:
virtual void device_start() override;
virtual void device_reset() override;
private:
u32 m_mode;
void map(address_map &map);
};
DECLARE_DEVICE_TYPE(M37640, m37640_device)
#endif // MAME_CPU_M6502_M37640_H