mirror of
https://github.com/holub/mame
synced 2025-04-16 13:34:55 +03:00
added E0C6200 cpu skeleton.
also commented out some cpu cores from mame.lua, not needed anymore for unidasm compile due to this check: if (CPUS["MYCPU"]~=null or _OPTIONS["with-tools"]) then
This commit is contained in:
parent
96b6c8ec08
commit
fc68370aa5
@ -359,6 +359,22 @@ if (CPUS["ESRIP"]~=null or _OPTIONS["with-tools"]) then
|
||||
table.insert(disasm_files , MAME_DIR .. "src/emu/cpu/esrip/esripdsm.c")
|
||||
end
|
||||
|
||||
--------------------------------------------------
|
||||
-- Seiko Epson E0C6200 series
|
||||
---@src/emu/cpu/e0c6200/e0c6200.h,CPUS += E0C6200
|
||||
--------------------------------------------------
|
||||
|
||||
if (CPUS["E0C6200"]~=null) then
|
||||
files {
|
||||
MAME_DIR .. "src/emu/cpu/e0c6200/e0c6200.c",
|
||||
MAME_DIR .. "src/emu/cpu/e0c6200/e0c6200.h",
|
||||
}
|
||||
end
|
||||
|
||||
if (CPUS["E0C6200"]~=null or _OPTIONS["with-tools"]) then
|
||||
table.insert(disasm_files , MAME_DIR .. "src/emu/cpu/e0c6200/e0c6200d.c")
|
||||
end
|
||||
|
||||
--------------------------------------------------
|
||||
-- RCA COSMAC
|
||||
---@src/emu/cpu/cosmac/cosmac.h,CPUS += COSMAC
|
||||
|
@ -100,7 +100,7 @@ CPUS["SM8500"] = true
|
||||
CPUS["MINX"] = true
|
||||
CPUS["SSEM"] = true
|
||||
CPUS["AVR8"] = true
|
||||
CPUS["TMS0980"] = true
|
||||
--CPUS["TMS0980"] = true
|
||||
CPUS["I4004"] = true
|
||||
CPUS["SUPERFX"] = true
|
||||
CPUS["Z8"] = true
|
||||
@ -123,9 +123,10 @@ CPUS["ALTO2"] = true
|
||||
--CPUS["W65816"] = true
|
||||
CPUS["ARC"] = true
|
||||
CPUS["ARCOMPACT"] = true
|
||||
CPUS["AMIS2000"] = true
|
||||
CPUS["UCOM4"] = true
|
||||
CPUS["HMCS40"] = true
|
||||
--CPUS["AMIS2000"] = true
|
||||
--CPUS["UCOM4"] = true
|
||||
--CPUS["HMCS40"] = true
|
||||
--CPUS["E0C6200"] = true
|
||||
|
||||
--------------------------------------------------
|
||||
-- specify available sound cores
|
||||
|
@ -123,6 +123,7 @@ CPUS["ARCOMPACT"] = true
|
||||
CPUS["AMIS2000"] = true
|
||||
CPUS["UCOM4"] = true
|
||||
CPUS["HMCS40"] = true
|
||||
CPUS["E0C6200"] = true
|
||||
|
||||
--------------------------------------------------
|
||||
-- specify available sound cores; some of these are
|
||||
|
@ -83,7 +83,7 @@ protected:
|
||||
virtual void execute_run();
|
||||
|
||||
// device_memory_interface overrides
|
||||
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return(spacenum == AS_PROGRAM) ? &m_program_config :((spacenum == AS_DATA) ? &m_data_config : NULL); }
|
||||
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return(spacenum == AS_PROGRAM) ? &m_program_config : ((spacenum == AS_DATA) ? &m_data_config : NULL); }
|
||||
|
||||
// device_disasm_interface overrides
|
||||
virtual UINT32 disasm_min_opcode_bytes() const { return 1; }
|
||||
|
104
src/emu/cpu/e0c6200/e0c6200.c
Normal file
104
src/emu/cpu/e0c6200/e0c6200.c
Normal file
@ -0,0 +1,104 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:hap
|
||||
/*
|
||||
|
||||
Seiko Epson E0C6200 CPU core and E0C62 MCU family
|
||||
|
||||
References:
|
||||
- 1998 MF297-06a E0C6200/E0C6200A Core CPU Manual
|
||||
- 1998 MF1049-01a E0C6S46 Technical Manual
|
||||
|
||||
TODO:
|
||||
- niks
|
||||
|
||||
*/
|
||||
|
||||
#include "e0c6200.h"
|
||||
#include "debugger.h"
|
||||
|
||||
#include "e0c6200op.inc"
|
||||
|
||||
|
||||
const device_type EPSON_E0C6S46 = &device_creator<e0c6s46_device>;
|
||||
|
||||
|
||||
// internal memory maps
|
||||
static ADDRESS_MAP_START(program_1k, AS_PROGRAM, 16, e0c6200_cpu_device)
|
||||
AM_RANGE(0x0000, 0x03ff) AM_ROM
|
||||
ADDRESS_MAP_END
|
||||
|
||||
|
||||
static ADDRESS_MAP_START(data_64x4, AS_DATA, 8, e0c6200_cpu_device)
|
||||
AM_RANGE(0x00, 0x3f) AM_RAM
|
||||
ADDRESS_MAP_END
|
||||
|
||||
|
||||
// device definitions
|
||||
e0c6s46_device::e0c6s46_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||
: e0c6200_cpu_device(mconfig, EPSON_E0C6S46, "E0C6S46", tag, owner, clock, 10, ADDRESS_MAP_NAME(program_1k), 6, ADDRESS_MAP_NAME(data_64x4), "e0c6s46", __FILE__)
|
||||
{ }
|
||||
|
||||
|
||||
// disasm
|
||||
void e0c6200_cpu_device::state_string_export(const device_state_entry &entry, std::string &str)
|
||||
{
|
||||
switch (entry.index())
|
||||
{
|
||||
case STATE_GENFLAGS:
|
||||
break;
|
||||
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
||||
offs_t e0c6200_cpu_device::disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options)
|
||||
{
|
||||
extern CPU_DISASSEMBLE(e0c6200);
|
||||
return CPU_DISASSEMBLE_NAME(e0c6200)(this, buffer, pc, oprom, opram, options);
|
||||
}
|
||||
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_start - device-specific startup
|
||||
//-------------------------------------------------
|
||||
|
||||
void e0c6200_cpu_device::device_start()
|
||||
{
|
||||
m_program = &space(AS_PROGRAM);
|
||||
m_data = &space(AS_DATA);
|
||||
m_prgmask = (1 << m_prgwidth) - 1;
|
||||
m_datamask = (1 << m_datawidth) - 1;
|
||||
|
||||
// zerofill
|
||||
|
||||
// register for savestates
|
||||
|
||||
// register state for debugger
|
||||
|
||||
m_icountptr = &m_icount;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_reset - device-specific reset
|
||||
//-------------------------------------------------
|
||||
|
||||
void e0c6200_cpu_device::device_reset()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// execute
|
||||
//-------------------------------------------------
|
||||
|
||||
void e0c6200_cpu_device::execute_run()
|
||||
{
|
||||
while (m_icount > 0)
|
||||
{
|
||||
m_icount--;
|
||||
}
|
||||
}
|
73
src/emu/cpu/e0c6200/e0c6200.h
Normal file
73
src/emu/cpu/e0c6200/e0c6200.h
Normal file
@ -0,0 +1,73 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:hap
|
||||
/*
|
||||
|
||||
Seiko Epson E0C6200 CPU core and E0C62 MCU family
|
||||
|
||||
*/
|
||||
|
||||
#ifndef _E06200_H_
|
||||
#define _E06200_H_
|
||||
|
||||
#include "emu.h"
|
||||
|
||||
|
||||
class e0c6200_cpu_device : public cpu_device
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
e0c6200_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source)
|
||||
: cpu_device(mconfig, type, name, tag, owner, clock, shortname, source)
|
||||
, m_program_config("program", ENDIANNESS_LITTLE, 16, prgwidth, 0, program)
|
||||
, m_data_config("data", ENDIANNESS_LITTLE, 8, datawidth, 0, data)
|
||||
, m_prgwidth(prgwidth)
|
||||
, m_datawidth(datawidth)
|
||||
{ }
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_start();
|
||||
virtual void device_reset();
|
||||
|
||||
// device_execute_interface overrides
|
||||
virtual UINT32 execute_min_cycles() const { return 5; }
|
||||
virtual UINT32 execute_max_cycles() const { return 12; }
|
||||
virtual UINT32 execute_input_lines() const { return 1; }
|
||||
virtual void execute_run();
|
||||
|
||||
// device_memory_interface overrides
|
||||
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return(spacenum == AS_PROGRAM) ? &m_program_config : ((spacenum == AS_DATA) ? &m_data_config : NULL); }
|
||||
|
||||
// device_disasm_interface overrides
|
||||
virtual UINT32 disasm_min_opcode_bytes() const { return 2; }
|
||||
virtual UINT32 disasm_max_opcode_bytes() const { return 2; }
|
||||
virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options);
|
||||
|
||||
void state_string_export(const device_state_entry &entry, std::string &str);
|
||||
|
||||
address_space_config m_program_config;
|
||||
address_space_config m_data_config;
|
||||
address_space *m_program;
|
||||
address_space *m_data;
|
||||
|
||||
int m_prgwidth;
|
||||
int m_datawidth;
|
||||
int m_prgmask;
|
||||
int m_datamask;
|
||||
|
||||
int m_icount;
|
||||
};
|
||||
|
||||
|
||||
class e0c6s46_device : public e0c6200_cpu_device
|
||||
{
|
||||
public:
|
||||
e0c6s46_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
};
|
||||
|
||||
|
||||
|
||||
extern const device_type EPSON_E0C6S46;
|
||||
|
||||
|
||||
#endif /* _E06200_H_ */
|
18
src/emu/cpu/e0c6200/e0c6200d.c
Normal file
18
src/emu/cpu/e0c6200/e0c6200d.c
Normal file
@ -0,0 +1,18 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:hap
|
||||
/*
|
||||
|
||||
Seiko Epson E0C6200 disassembler
|
||||
|
||||
*/
|
||||
|
||||
#include "emu.h"
|
||||
#include "debugger.h"
|
||||
#include "e0c6200.h"
|
||||
|
||||
|
||||
|
||||
CPU_DISASSEMBLE(e0c6200)
|
||||
{
|
||||
return 2;
|
||||
}
|
1
src/emu/cpu/e0c6200/e0c6200op.inc
Normal file
1
src/emu/cpu/e0c6200/e0c6200op.inc
Normal file
@ -0,0 +1 @@
|
||||
// E0C6200 opcode handlers
|
@ -153,7 +153,7 @@ protected:
|
||||
virtual void execute_run();
|
||||
|
||||
// device_memory_interface overrides
|
||||
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return(spacenum == AS_PROGRAM) ? &m_program_config :((spacenum == AS_DATA) ? &m_data_config : NULL); }
|
||||
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return(spacenum == AS_PROGRAM) ? &m_program_config : ((spacenum == AS_DATA) ? &m_data_config : NULL); }
|
||||
|
||||
// device_disasm_interface overrides
|
||||
virtual UINT32 disasm_min_opcode_bytes() const { return 2; }
|
||||
|
@ -90,7 +90,7 @@ protected:
|
||||
virtual void execute_run();
|
||||
|
||||
// device_memory_interface overrides
|
||||
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return(spacenum == AS_PROGRAM) ? &m_program_config :((spacenum == AS_DATA) ? &m_data_config : NULL); }
|
||||
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return(spacenum == AS_PROGRAM) ? &m_program_config : ((spacenum == AS_DATA) ? &m_data_config : NULL); }
|
||||
|
||||
// device_disasm_interface overrides
|
||||
virtual UINT32 disasm_min_opcode_bytes() const { return 1; }
|
||||
|
@ -144,7 +144,7 @@ protected:
|
||||
virtual void execute_run();
|
||||
|
||||
// device_memory_interface overrides
|
||||
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return(spacenum == AS_PROGRAM) ? &m_program_config :((spacenum == AS_DATA) ? &m_data_config : NULL); }
|
||||
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return(spacenum == AS_PROGRAM) ? &m_program_config : ((spacenum == AS_DATA) ? &m_data_config : NULL); }
|
||||
|
||||
// device_disasm_interface overrides
|
||||
virtual UINT32 disasm_min_opcode_bytes() const { return 1; }
|
||||
|
@ -1968,7 +1968,7 @@ MACHINE_CONFIG_END
|
||||
NOTE!: MESS external artwork is recommended
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#if 0
|
||||
class epacman2_state : public egalaxn2_state
|
||||
{
|
||||
public:
|
||||
@ -1976,7 +1976,7 @@ public:
|
||||
: egalaxn2_state(mconfig, type, tag)
|
||||
{ }
|
||||
};
|
||||
|
||||
#endif
|
||||
// handlers are identical to Galaxian 2, so we can use those
|
||||
|
||||
// config
|
||||
|
Loading…
Reference in New Issue
Block a user