mirror of
https://github.com/holub/mame
synced 2025-04-26 10:13:37 +03:00
notes
This commit is contained in:
parent
4b6c552073
commit
bbb49e299e
@ -4,6 +4,11 @@
|
|||||||
|
|
||||||
Seiko Epson E0C6S46 MCU
|
Seiko Epson E0C6S46 MCU
|
||||||
|
|
||||||
|
TODO:
|
||||||
|
- K input interrupts
|
||||||
|
- serial interface
|
||||||
|
- output ports
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "e0c6s46.h"
|
#include "e0c6s46.h"
|
||||||
@ -45,8 +50,6 @@ e0c6s46_device::e0c6s46_device(const machine_config &mconfig, const char *tag, d
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
// device_start - device-specific startup
|
// device_start - device-specific startup
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
@ -154,6 +157,7 @@ void e0c6s46_device::device_reset()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
// execute
|
// execute
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
@ -169,6 +173,10 @@ void e0c6s46_device::execute_one()
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//-------------------------------------------------
|
||||||
|
// interrupts
|
||||||
|
//-------------------------------------------------
|
||||||
|
|
||||||
bool e0c6s46_device::check_interrupt()
|
bool e0c6s46_device::check_interrupt()
|
||||||
{
|
{
|
||||||
// priority order is not the same as register order
|
// priority order is not the same as register order
|
||||||
@ -218,6 +226,13 @@ void e0c6s46_device::execute_set_input(int line, int state)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//-------------------------------------------------
|
||||||
|
// timers
|
||||||
|
//-------------------------------------------------
|
||||||
|
|
||||||
|
// clock timer
|
||||||
|
|
||||||
void e0c6s46_device::clock_watchdog()
|
void e0c6s46_device::clock_watchdog()
|
||||||
{
|
{
|
||||||
// initial reset after 3 to 4 seconds
|
// initial reset after 3 to 4 seconds
|
||||||
@ -256,6 +271,9 @@ TIMER_CALLBACK_MEMBER(e0c6s46_device::clktimer_cb)
|
|||||||
clock_watchdog();
|
clock_watchdog();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// stopwatch timer
|
||||||
|
|
||||||
void e0c6s46_device::clock_stopwatch()
|
void e0c6s46_device::clock_stopwatch()
|
||||||
{
|
{
|
||||||
m_swl_slice++;
|
m_swl_slice++;
|
||||||
@ -300,6 +318,9 @@ TIMER_CALLBACK_MEMBER(e0c6s46_device::stopwatch_cb)
|
|||||||
m_stopwatch_handle->adjust(attotime::from_ticks(64, unscaled_clock()));
|
m_stopwatch_handle->adjust(attotime::from_ticks(64, unscaled_clock()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// programmable timer
|
||||||
|
|
||||||
void e0c6s46_device::clock_prgtimer()
|
void e0c6s46_device::clock_prgtimer()
|
||||||
{
|
{
|
||||||
// irq and reload when it reaches zero
|
// irq and reload when it reaches zero
|
||||||
@ -340,8 +361,14 @@ TIMER_CALLBACK_MEMBER(e0c6s46_device::prgtimer_cb)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//-------------------------------------------------
|
||||||
|
// LCD Driver
|
||||||
|
//-------------------------------------------------
|
||||||
|
|
||||||
UINT32 e0c6s46_device::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
UINT32 e0c6s46_device::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||||
{
|
{
|
||||||
|
// call this 32 times per second (osc1/1024: 32hz at default clock of 32768hz)
|
||||||
for (int bank = 0; bank < 2; bank++)
|
for (int bank = 0; bank < 2; bank++)
|
||||||
{
|
{
|
||||||
const UINT8* vram = bank ? m_vram2 : m_vram1;
|
const UINT8* vram = bank ? m_vram2 : m_vram1;
|
||||||
@ -379,6 +406,12 @@ UINT32 e0c6s46_device::screen_update(screen_device &screen, bitmap_ind16 &bitmap
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//-------------------------------------------------
|
||||||
|
// internal I/O
|
||||||
|
//-------------------------------------------------
|
||||||
|
|
||||||
READ8_MEMBER(e0c6s46_device::io_r)
|
READ8_MEMBER(e0c6s46_device::io_r)
|
||||||
{
|
{
|
||||||
switch (offset)
|
switch (offset)
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
// license:BSD-3-Clause
|
// license:BSD-3-Clause
|
||||||
// copyright-holders:hap
|
// copyright-holders:hap
|
||||||
|
|
||||||
// HMCS40 opcode handlers
|
// HMCS40 opcode handlers
|
||||||
|
|
||||||
// internal helpers
|
// internal helpers
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// license:BSD-3-Clause
|
// license:BSD-3-Clause
|
||||||
// copyright-holders:R. Belmont, Karl Stenerud
|
// copyright-holders:R. Belmont, Karl Stenerud, hap
|
||||||
/*
|
/*
|
||||||
Mitsubishi M37702/37710 CPU Emulator
|
Mitsubishi M37702/37710 CPU Emulator
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// license:BSD-3-Clause
|
// license:BSD-3-Clause
|
||||||
// copyright-holders:R. Belmont, Karl Stenerud
|
// copyright-holders:R. Belmont, Karl Stenerud, hap
|
||||||
#ifndef __M37710_H__
|
#ifndef __M37710_H__
|
||||||
#define __M37710_H__
|
#define __M37710_H__
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// license:BSD-3-Clause
|
// license:BSD-3-Clause
|
||||||
// copyright-holders:R. Belmont, Karl Stenerud
|
// copyright-holders:R. Belmont, Karl Stenerud, hap
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#ifndef __M37710CM_H__
|
#ifndef __M37710CM_H__
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// license:BSD-3-Clause
|
// license:BSD-3-Clause
|
||||||
// copyright-holders:R. Belmont, Karl Stenerud
|
// copyright-holders:R. Belmont, Karl Stenerud, hap
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#ifndef __M37710IL_H__
|
#ifndef __M37710IL_H__
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// license:BSD-3-Clause
|
// license:BSD-3-Clause
|
||||||
// copyright-holders:R. Belmont, Karl Stenerud
|
// copyright-holders:R. Belmont, Karl Stenerud, hap
|
||||||
#include "emu.h"
|
#include "emu.h"
|
||||||
#include "debugger.h"
|
#include "debugger.h"
|
||||||
#include "m37710cm.h"
|
#include "m37710cm.h"
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// license:BSD-3-Clause
|
// license:BSD-3-Clause
|
||||||
// copyright-holders:R. Belmont, Karl Stenerud
|
// copyright-holders:R. Belmont, Karl Stenerud, hap
|
||||||
#include "emu.h"
|
#include "emu.h"
|
||||||
#include "debugger.h"
|
#include "debugger.h"
|
||||||
#include "m37710cm.h"
|
#include "m37710cm.h"
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// license:BSD-3-Clause
|
// license:BSD-3-Clause
|
||||||
// copyright-holders:R. Belmont, Karl Stenerud
|
// copyright-holders:R. Belmont, Karl Stenerud, hap
|
||||||
#include "emu.h"
|
#include "emu.h"
|
||||||
#include "debugger.h"
|
#include "debugger.h"
|
||||||
#include "m37710cm.h"
|
#include "m37710cm.h"
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// license:BSD-3-Clause
|
// license:BSD-3-Clause
|
||||||
// copyright-holders:R. Belmont, Karl Stenerud
|
// copyright-holders:R. Belmont, Karl Stenerud, hap
|
||||||
#include "emu.h"
|
#include "emu.h"
|
||||||
#include "debugger.h"
|
#include "debugger.h"
|
||||||
#include "m37710cm.h"
|
#include "m37710cm.h"
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// license:BSD-3-Clause
|
// license:BSD-3-Clause
|
||||||
// copyright-holders:R. Belmont, Karl Stenerud
|
// copyright-holders:R. Belmont, Karl Stenerud, hap
|
||||||
/* ======================================================================== */
|
/* ======================================================================== */
|
||||||
/* ============================= CONFIGURATION ============================ */
|
/* ============================= CONFIGURATION ============================ */
|
||||||
/* ======================================================================== */
|
/* ======================================================================== */
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// license:BSD-3-Clause
|
// license:BSD-3-Clause
|
||||||
// copyright-holders:Ville Linde
|
// copyright-holders:Ville Linde, Angelo Salese, hap
|
||||||
|
|
||||||
const mc68hc11_cpu_device::hc11_opcode_list_struct mc68hc11_cpu_device::hc11_opcode_list[] =
|
const mc68hc11_cpu_device::hc11_opcode_list_struct mc68hc11_cpu_device::hc11_opcode_list[] =
|
||||||
{
|
{
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
// license:BSD-3-Clause
|
||||||
|
// copyright-holders:Ville Linde, Angelo Salese, hap
|
||||||
|
|
||||||
#define SET_Z8(r) (m_ccr |= ((UINT8)r == 0) ? CC_Z : 0)
|
#define SET_Z8(r) (m_ccr |= ((UINT8)r == 0) ? CC_Z : 0)
|
||||||
#define SET_Z16(r) (m_ccr |= ((UINT16)r == 0) ? CC_Z : 0)
|
#define SET_Z16(r) (m_ccr |= ((UINT16)r == 0) ? CC_Z : 0)
|
||||||
#define SET_N8(r) (m_ccr |= (r & 0x80) ? CC_N : 0)
|
#define SET_N8(r) (m_ccr |= (r & 0x80) ? CC_N : 0)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// license:BSD-3-Clause
|
// license:BSD-3-Clause
|
||||||
// copyright-holders:Ville Linde, Angelo Salese
|
// copyright-holders:Ville Linde, Angelo Salese, hap
|
||||||
/*
|
/*
|
||||||
Motorola MC68HC11 emulator
|
Motorola MC68HC11 emulator
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// license:BSD-3-Clause
|
// license:BSD-3-Clause
|
||||||
// copyright-holders:Ville Linde, Angelo Salese
|
// copyright-holders:Ville Linde, Angelo Salese, hap
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#ifndef __MC68HC11_H__
|
#ifndef __MC68HC11_H__
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// license:???
|
// license:???
|
||||||
// copyright-holders:Tony La Porta
|
// copyright-holders:Tony La Porta, hap
|
||||||
/**************************************************************************\
|
/**************************************************************************\
|
||||||
* Texas Instruments TMS320x25 DSP Disassembler *
|
* Texas Instruments TMS320x25 DSP Disassembler *
|
||||||
* *
|
* *
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// license:???
|
// license:???
|
||||||
// copyright-holders:Tony La Porta
|
// copyright-holders:Tony La Porta, hap
|
||||||
/**************************************************************************\
|
/**************************************************************************\
|
||||||
* Texas Instruments TMS320x25 DSP Disassembler *
|
* Texas Instruments TMS320x25 DSP Disassembler *
|
||||||
* *
|
* *
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// license:???
|
// license:???
|
||||||
// copyright-holders:Tony La Porta
|
// copyright-holders:Tony La Porta, hap
|
||||||
/**************************************************************************\
|
/**************************************************************************\
|
||||||
* Texas Instruments TMS320x25 DSP Emulator *
|
* Texas Instruments TMS320x25 DSP Emulator *
|
||||||
* *
|
* *
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// license:???
|
// license:???
|
||||||
// copyright-holders:Tony La Porta
|
// copyright-holders:Tony La Porta, hap
|
||||||
/**************************************************************************\
|
/**************************************************************************\
|
||||||
* Texas Instruments TMS320x25 DSP Emulator *
|
* Texas Instruments TMS320x25 DSP Emulator *
|
||||||
* *
|
* *
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
// license:BSD-3-Clause
|
// license:BSD-3-Clause
|
||||||
// copyright-holders:hap
|
// copyright-holders:hap
|
||||||
|
|
||||||
// uCOM-4 opcode handlers
|
// uCOM-4 opcode handlers
|
||||||
|
|
||||||
// internal helpers
|
// internal helpers
|
||||||
|
@ -30,16 +30,16 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/***************************************************************************
|
||||||
|
|
||||||
PALETTE_INIT_MEMBER(tamag1_state, tama)
|
Video
|
||||||
{
|
|
||||||
palette.set_pen_color(0, rgb_t(0xff, 0xff, 0xff));
|
|
||||||
palette.set_pen_color(1, rgb_t(0x00, 0x00, 0x00));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
***************************************************************************/
|
||||||
|
|
||||||
static E0C6S46_PIXEL_UPDATE_CB(tama_pixel_update)
|
static E0C6S46_PIXEL_UPDATE_CB(tama_pixel_update)
|
||||||
{
|
{
|
||||||
|
// 16 COM(common) pins, 40 SEG(segment) pins from MCU,
|
||||||
|
// 32x16 LCD screen and 2 rows of indicators
|
||||||
static const int seg2x[0x28] =
|
static const int seg2x[0x28] =
|
||||||
{
|
{
|
||||||
0, 1, 2, 3, 4, 5, 6, 7,
|
0, 1, 2, 3, 4, 5, 6, 7,
|
||||||
@ -49,11 +49,34 @@ static E0C6S46_PIXEL_UPDATE_CB(tama_pixel_update)
|
|||||||
20,19,18,17,16,37,38,39
|
20,19,18,17,16,37,38,39
|
||||||
};
|
};
|
||||||
|
|
||||||
bitmap.pix16(com, seg2x[seg]) = state;
|
int y = com, x = seg2x[seg];
|
||||||
|
if (cliprect.contains(x, y))
|
||||||
|
bitmap.pix16(y, x) = state;
|
||||||
|
}
|
||||||
|
|
||||||
|
PALETTE_INIT_MEMBER(tamag1_state, tama)
|
||||||
|
{
|
||||||
|
palette.set_pen_color(0, rgb_t(138, 146, 148));
|
||||||
|
palette.set_pen_color(1, rgb_t(92, 83, 88));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/***************************************************************************
|
||||||
|
|
||||||
|
Inputs
|
||||||
|
|
||||||
|
***************************************************************************/
|
||||||
|
|
||||||
|
INPUT_CHANGED_MEMBER(tamag1_state::input_changed)
|
||||||
|
{
|
||||||
|
// inputs are hooked up backwards here, because MCU input
|
||||||
|
// ports are all tied to its interrupt controller
|
||||||
|
int line = (int)(FPTR)param;
|
||||||
|
int state = newval ? ASSERT_LINE : CLEAR_LINE;
|
||||||
|
m_maincpu->set_input_line(line, state);
|
||||||
|
}
|
||||||
|
|
||||||
static INPUT_PORTS_START( tama )
|
static INPUT_PORTS_START( tama )
|
||||||
PORT_START("K0")
|
PORT_START("K0")
|
||||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_CHANGED_MEMBER(DEVICE_SELF, tamag1_state, input_changed, (void *)0)
|
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_CHANGED_MEMBER(DEVICE_SELF, tamag1_state, input_changed, (void *)0)
|
||||||
@ -62,16 +85,13 @@ static INPUT_PORTS_START( tama )
|
|||||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED )
|
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||||
INPUT_PORTS_END
|
INPUT_PORTS_END
|
||||||
|
|
||||||
INPUT_CHANGED_MEMBER(tamag1_state::input_changed)
|
|
||||||
{
|
|
||||||
// Inputs are hooked up backwards here, because MCU input
|
|
||||||
// ports are all tied to its interrupt controller.
|
|
||||||
int line = (int)(FPTR)param;
|
|
||||||
int state = newval ? ASSERT_LINE : CLEAR_LINE;
|
|
||||||
m_maincpu->set_input_line(line, state);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
/***************************************************************************
|
||||||
|
|
||||||
|
Machine Config
|
||||||
|
|
||||||
|
***************************************************************************/
|
||||||
|
|
||||||
static MACHINE_CONFIG_START( tama, tamag1_state )
|
static MACHINE_CONFIG_START( tama, tamag1_state )
|
||||||
|
|
||||||
@ -84,7 +104,7 @@ static MACHINE_CONFIG_START( tama, tamag1_state )
|
|||||||
MCFG_SCREEN_REFRESH_RATE(XTAL_32_768kHz/1024)
|
MCFG_SCREEN_REFRESH_RATE(XTAL_32_768kHz/1024)
|
||||||
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
|
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
|
||||||
MCFG_SCREEN_SIZE(40, 16)
|
MCFG_SCREEN_SIZE(40, 16)
|
||||||
MCFG_SCREEN_VISIBLE_AREA(0, 40-1, 0, 16-1)
|
MCFG_SCREEN_VISIBLE_AREA(0, 32-1, 0, 16-1)
|
||||||
// MCFG_DEFAULT_LAYOUT(layout_tama)
|
// MCFG_DEFAULT_LAYOUT(layout_tama)
|
||||||
MCFG_SCREEN_UPDATE_DEVICE("maincpu", e0c6s46_device, screen_update)
|
MCFG_SCREEN_UPDATE_DEVICE("maincpu", e0c6s46_device, screen_update)
|
||||||
MCFG_SCREEN_PALETTE("palette")
|
MCFG_SCREEN_PALETTE("palette")
|
||||||
@ -108,7 +128,7 @@ MACHINE_CONFIG_END
|
|||||||
|
|
||||||
ROM_START( tama )
|
ROM_START( tama )
|
||||||
ROM_REGION( 0x3000, "maincpu", 0 )
|
ROM_REGION( 0x3000, "maincpu", 0 )
|
||||||
ROM_LOAD( "test.b", 0x0000, 0x3000, CRC(4372220e) SHA1(6e13d015113e16198c0059b9d0c38d7027ae7324) )
|
ROM_LOAD( "test.b", 0x0000, 0x3000, CRC(4372220e) SHA1(6e13d015113e16198c0059b9d0c38d7027ae7324) ) // this rom is on the die too, test pin enables it?
|
||||||
ROM_LOAD( "tama.b", 0x0000, 0x3000, CRC(5c864cb1) SHA1(4b4979cf92dc9d2fb6d7295a38f209f3da144f72) )
|
ROM_LOAD( "tama.b", 0x0000, 0x3000, CRC(5c864cb1) SHA1(4b4979cf92dc9d2fb6d7295a38f209f3da144f72) )
|
||||||
ROM_END
|
ROM_END
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user