mirror of
https://github.com/holub/mame
synced 2025-04-21 16:01:56 +03:00
pps41: add skeleton MM76-derived devices
This commit is contained in:
parent
2d692d7570
commit
d65c5159f1
@ -2878,6 +2878,7 @@ end
|
||||
|
||||
--------------------------------------------------
|
||||
-- Rockwell PPS-4/1
|
||||
--@src/devices/cpu/pps41/mm75.h,CPUS["PPS41"] = true
|
||||
--@src/devices/cpu/pps41/mm76.h,CPUS["PPS41"] = true
|
||||
--------------------------------------------------
|
||||
|
||||
@ -2885,6 +2886,9 @@ if CPUS["PPS41"] then
|
||||
files {
|
||||
MAME_DIR .. "src/devices/cpu/pps41/pps41base.cpp",
|
||||
MAME_DIR .. "src/devices/cpu/pps41/pps41base.h",
|
||||
MAME_DIR .. "src/devices/cpu/pps41/mm75.cpp",
|
||||
MAME_DIR .. "src/devices/cpu/pps41/mm75.h",
|
||||
MAME_DIR .. "src/devices/cpu/pps41/mm75op.cpp",
|
||||
MAME_DIR .. "src/devices/cpu/pps41/mm76.cpp",
|
||||
MAME_DIR .. "src/devices/cpu/pps41/mm76.h",
|
||||
MAME_DIR .. "src/devices/cpu/pps41/mm76op.cpp",
|
||||
|
@ -15,6 +15,12 @@
|
||||
DEFINE_DEVICE_TYPE(MM5799, mm5799_device, "mm5799", "National Semiconductor MM5799")
|
||||
|
||||
|
||||
// constructor
|
||||
mm5799_device::mm5799_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) :
|
||||
cops1_base_device(mconfig, MM5799, tag, owner, clock, 11, address_map_constructor(FUNC(mm5799_device::program_map), this), 7, address_map_constructor(FUNC(mm5799_device::data_map), this))
|
||||
{ }
|
||||
|
||||
|
||||
// internal memory maps
|
||||
void mm5799_device::program_map(address_map &map)
|
||||
{
|
||||
@ -41,12 +47,6 @@ void mm5799_device::data_map(address_map &map)
|
||||
}
|
||||
|
||||
|
||||
// device definitions
|
||||
mm5799_device::mm5799_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) :
|
||||
cops1_base_device(mconfig, MM5799, tag, owner, clock, 11, address_map_constructor(FUNC(mm5799_device::program_map), this), 7, address_map_constructor(FUNC(mm5799_device::data_map), this))
|
||||
{ }
|
||||
|
||||
|
||||
// disasm
|
||||
std::unique_ptr<util::disasm_interface> mm5799_device::create_disassembler()
|
||||
{
|
||||
|
27
src/devices/cpu/pps41/mm75.cpp
Normal file
27
src/devices/cpu/pps41/mm75.cpp
Normal file
@ -0,0 +1,27 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:hap
|
||||
/*
|
||||
|
||||
Rockwell MM75 MCU
|
||||
|
||||
*/
|
||||
|
||||
#include "emu.h"
|
||||
#include "mm75.h"
|
||||
|
||||
|
||||
DEFINE_DEVICE_TYPE(MM75, mm75_device, "mm75", "Rockwell MM75")
|
||||
|
||||
|
||||
// constructor
|
||||
mm75_device::mm75_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) :
|
||||
mm76_device(mconfig, MM75, tag, owner, clock, 10, address_map_constructor(FUNC(mm75_device::program_0_6k), this), 6, address_map_constructor(FUNC(mm75_device::data_48x4), this))
|
||||
{ }
|
||||
|
||||
|
||||
// initialize
|
||||
void mm75_device::device_start()
|
||||
{
|
||||
mm76_device::device_start();
|
||||
m_d_pins--;
|
||||
}
|
52
src/devices/cpu/pps41/mm75.h
Normal file
52
src/devices/cpu/pps41/mm75.h
Normal file
@ -0,0 +1,52 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:hap
|
||||
/*
|
||||
|
||||
Rockwell MM75 MCU
|
||||
|
||||
*/
|
||||
|
||||
#ifndef MAME_CPU_PPS41_MM75_H
|
||||
#define MAME_CPU_PPS41_MM75_H
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "mm76.h"
|
||||
|
||||
// pinout reference
|
||||
|
||||
/*
|
||||
____ ____
|
||||
RIO8 1 |* \_/ | 28 RIO7
|
||||
RIO1 2 | | 27 RIO6
|
||||
RIO2 3 | | 26 RIO5
|
||||
RIO3 4 | | 25 INT0
|
||||
RIO4 5 | | 24 PO
|
||||
DIO0 6 | | 23 PI4
|
||||
DIO1 7 | MM75 | 22 PI3
|
||||
DIO2 8 | | 21 PI2
|
||||
DIO3 9 | | 20 PI1
|
||||
DIO4 10 | | 19 TEST
|
||||
DIO5 11 | | 18 Vdd
|
||||
DIO6 12 | | 17 VC
|
||||
DIO7 13 | | 16 A
|
||||
Vss 14 |___________| 15 DIO8
|
||||
|
||||
*/
|
||||
|
||||
class mm75_device : public mm76_device
|
||||
{
|
||||
public:
|
||||
mm75_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
|
||||
|
||||
protected:
|
||||
virtual void device_start() override;
|
||||
|
||||
// opcode handlers
|
||||
virtual void op_ios() override;
|
||||
};
|
||||
|
||||
|
||||
DECLARE_DEVICE_TYPE(MM75, mm75_device)
|
||||
|
||||
#endif // MAME_CPU_PPS41_MM75_H
|
16
src/devices/cpu/pps41/mm75op.cpp
Normal file
16
src/devices/cpu/pps41/mm75op.cpp
Normal file
@ -0,0 +1,16 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:hap
|
||||
|
||||
// MM75 opcode handlers
|
||||
|
||||
#include "emu.h"
|
||||
#include "mm75.h"
|
||||
|
||||
|
||||
// opcodes (differences with mm76_device)
|
||||
|
||||
void mm75_device::op_ios()
|
||||
{
|
||||
// IOS: does not have serial I/O
|
||||
op_illegal();
|
||||
}
|
@ -13,28 +13,56 @@
|
||||
|
||||
|
||||
DEFINE_DEVICE_TYPE(MM76, mm76_device, "mm76", "Rockwell MM76")
|
||||
DEFINE_DEVICE_TYPE(MM76L, mm76l_device, "mm76l", "Rockwell MM76L")
|
||||
DEFINE_DEVICE_TYPE(MM76E, mm76e_device, "mm76e", "Rockwell MM76E")
|
||||
DEFINE_DEVICE_TYPE(MM76EL, mm76el_device, "mm76el", "Rockwell MM76EL")
|
||||
|
||||
|
||||
// constructor
|
||||
mm76_device::mm76_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) :
|
||||
mm76_device(mconfig, MM76, tag, owner, clock, 10, address_map_constructor(FUNC(mm76_device::program_0_6k), this), 6, address_map_constructor(FUNC(mm76_device::data_48x4), this))
|
||||
{ }
|
||||
|
||||
mm76_device::mm76_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data) :
|
||||
pps41_base_device(mconfig, type, tag, owner, clock, prgwidth, program, datawidth, data)
|
||||
{ }
|
||||
|
||||
mm76l_device::mm76l_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) :
|
||||
mm76_device(mconfig, MM76L, tag, owner, clock, 10, address_map_constructor(FUNC(mm76l_device::program_0_6k), this), 6, address_map_constructor(FUNC(mm76l_device::data_48x4), this))
|
||||
{ }
|
||||
|
||||
mm76e_device::mm76e_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) :
|
||||
mm76e_device(mconfig, MM76E, tag, owner, clock, 10, address_map_constructor(FUNC(mm76e_device::program_1k), this), 6, address_map_constructor(FUNC(mm76e_device::data_48x4), this))
|
||||
{ }
|
||||
|
||||
mm76e_device::mm76e_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data) :
|
||||
mm76_device(mconfig, type, tag, owner, clock, prgwidth, program, datawidth, data)
|
||||
{ }
|
||||
|
||||
mm76el_device::mm76el_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) :
|
||||
mm76e_device(mconfig, MM76EL, tag, owner, clock, 10, address_map_constructor(FUNC(mm76el_device::program_1k), this), 6, address_map_constructor(FUNC(mm76el_device::data_48x4), this))
|
||||
{ }
|
||||
|
||||
|
||||
// internal memory maps
|
||||
void mm76_device::program_map(address_map &map)
|
||||
void mm76_device::program_0_6k(address_map &map)
|
||||
{
|
||||
map(0x000, 0x17f).mirror(0x200).rom();
|
||||
map(0x180, 0x1ff).rom();
|
||||
map(0x380, 0x3ff).rom();
|
||||
}
|
||||
|
||||
void mm76_device::data_map(address_map &map)
|
||||
void mm76e_device::program_1k(address_map &map)
|
||||
{
|
||||
map(0x000, 0x3ff).rom();
|
||||
}
|
||||
|
||||
void mm76_device::data_48x4(address_map &map)
|
||||
{
|
||||
map(0x00, 0x2f).ram();
|
||||
}
|
||||
|
||||
|
||||
// device definitions
|
||||
mm76_device::mm76_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) :
|
||||
pps41_base_device(mconfig, MM76, tag, owner, clock, 10, address_map_constructor(FUNC(mm76_device::program_map), this), 6, address_map_constructor(FUNC(mm76_device::data_map), this))
|
||||
{ }
|
||||
|
||||
|
||||
// machine config
|
||||
void mm76_device::device_add_mconfig(machine_config &config)
|
||||
{
|
||||
@ -54,6 +82,7 @@ void mm76_device::device_start()
|
||||
{
|
||||
pps41_base_device::device_start();
|
||||
m_stack_levels = 1;
|
||||
m_d_pins = 10;
|
||||
}
|
||||
|
||||
void mm76_device::device_reset()
|
||||
|
@ -16,7 +16,28 @@
|
||||
// pinout reference
|
||||
|
||||
/*
|
||||
...
|
||||
____ ____ ____ ____
|
||||
A 1 |* \_/ | 42 BP BP 1 |* \_/ | 40 A
|
||||
EXCLK 2 | | 41 DIO9 VC 2 | | 39 DIO9
|
||||
CLKIN 3 | | 40 DIO8 XTLIN 3 | | 38 DIO8
|
||||
VC 4 | | 39 N/C XTLOUT 4 | | 37 DIO7
|
||||
Vdd 5 | | 38 DIO7 Vdd 5 | | 36 DIO6
|
||||
Vss 6 | | 37 DIO6 PI2 6 | | 35 DIO5
|
||||
TEST 7 | | 36 DIO5 TEST 7 | | 34 DIO4
|
||||
PI2 8 | | 35 DIO4 PI6 8 | | 33 DIO3
|
||||
PI6 9 | | 34 DIO3 PI1 9 | | 32 DIO2
|
||||
PI1 10 | MM76 | 33 DIO2 PI5 10 | MM76L | 31 DIO1
|
||||
PI5 11 | MM76E | 32 DIO1 PI7 11 | MM76EL | 30 DIO0
|
||||
PI7 12 | | 31 DIO0 PI3 12 | | 29 CLOCK
|
||||
PI3 13 | | 30 CLOCK PI8 13 | | 28 DATAO
|
||||
PI8 14 | | 29 DATAO PI4 14 | | 27 DATAI
|
||||
PI4 15 | | 28 DATAI PO 15 | | 26 RIO4
|
||||
Vdd 16 | | 27 RIO4 INT0 16 | | 25 RIO3
|
||||
PO 17 | | 26 RIO3 INT1 17 | | 24 RIO2
|
||||
INT0 18 | | 25 RIO2 RIO5 18 | | 23 RIO1
|
||||
INT1 19 | | 24 RIO1 RIO6 19 | | 22 RIO8
|
||||
RIO5 20 | | 23 RIO8 Vss 20 |___________| 21 RIO7
|
||||
RIO6 21 |___________| 22 RIO7
|
||||
|
||||
*/
|
||||
|
||||
@ -26,6 +47,8 @@ public:
|
||||
mm76_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
|
||||
|
||||
protected:
|
||||
mm76_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data);
|
||||
|
||||
// device-level overrides
|
||||
virtual void device_start() override;
|
||||
virtual void device_reset() override;
|
||||
@ -37,8 +60,8 @@ protected:
|
||||
// device_execute_interface overrides
|
||||
virtual void execute_one() override;
|
||||
|
||||
void data_map(address_map &map);
|
||||
void program_map(address_map &map);
|
||||
void data_48x4(address_map &map);
|
||||
void program_0_6k(address_map &map);
|
||||
|
||||
// opcode helpers
|
||||
u8 ram_r();
|
||||
@ -51,9 +74,36 @@ protected:
|
||||
|
||||
// opcode handlers
|
||||
void op_nop();
|
||||
virtual void op_ios();
|
||||
};
|
||||
|
||||
class mm76l_device : public mm76_device
|
||||
{
|
||||
public:
|
||||
mm76l_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
|
||||
};
|
||||
|
||||
class mm76e_device : public mm76_device
|
||||
{
|
||||
public:
|
||||
mm76e_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
|
||||
|
||||
protected:
|
||||
mm76e_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data);
|
||||
|
||||
void program_1k(address_map &map);
|
||||
};
|
||||
|
||||
class mm76el_device : public mm76e_device
|
||||
{
|
||||
public:
|
||||
mm76el_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
|
||||
};
|
||||
|
||||
|
||||
DECLARE_DEVICE_TYPE(MM76, mm76_device)
|
||||
DECLARE_DEVICE_TYPE(MM76L, mm76l_device)
|
||||
DECLARE_DEVICE_TYPE(MM76E, mm76e_device)
|
||||
DECLARE_DEVICE_TYPE(MM76EL, mm76el_device)
|
||||
|
||||
#endif // MAME_CPU_PPS41_MM76_H
|
||||
|
@ -44,3 +44,7 @@ void mm76_device::op_illegal()
|
||||
void mm76_device::op_nop()
|
||||
{
|
||||
}
|
||||
|
||||
void mm76_device::op_ios()
|
||||
{
|
||||
}
|
||||
|
@ -12,8 +12,8 @@ Part numbers:
|
||||
- A76xx = MM76 - 42 pin spider
|
||||
- A77xx = MM77 - 42 pin spider
|
||||
- A78xx = MM78 - 42 pin spider
|
||||
- A79xx = MM76C - 52 pin spider
|
||||
- A86xx = MM76E - 42 pin spider
|
||||
- A79xx = MM76C - 52 pin spider - counter
|
||||
- A86xx = MM76E - 42 pin spider - extended ROM
|
||||
- B76xx = MM76L - 40 pin dip
|
||||
- B77xx = MM77L - 40 pin dip
|
||||
- B78xx = MM78L - 40 pin dip
|
||||
@ -21,7 +21,7 @@ Part numbers:
|
||||
- B90xx = MM78LA - 42 pin spider
|
||||
|
||||
"spider" = 2 rows of pins on each side, just like standard PPS-4 CPUs.
|
||||
"L" only difference is low-power
|
||||
"L" main difference is low-power
|
||||
|
||||
References:
|
||||
- Series MM76 Product Description
|
||||
|
@ -69,6 +69,7 @@ protected:
|
||||
u8 m_prev2_op;
|
||||
int m_stack_levels;
|
||||
u16 m_stack[2]; // max 2
|
||||
int m_d_pins;
|
||||
|
||||
u8 m_a;
|
||||
u8 m_b;
|
||||
|
@ -12,13 +12,14 @@
|
||||
|
||||
#include "emu.h"
|
||||
|
||||
#include "cpu/pps41/mm75.h"
|
||||
#include "cpu/pps41/mm76.h"
|
||||
#include "video/pwm.h"
|
||||
#include "sound/spkrdev.h"
|
||||
#include "speaker.h"
|
||||
|
||||
// internal artwork
|
||||
//#include "mastmind.lh"
|
||||
#include "mastmind.lh"
|
||||
|
||||
//#include "hh_pps41_test.lh" // common test-layout - use external artwork
|
||||
|
||||
@ -127,12 +128,12 @@ INPUT_PORTS_END
|
||||
void mastmind_state::mastmind(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
MM76(config, m_maincpu, 100000); // approximation
|
||||
MM75(config, m_maincpu, 100000); // approximation
|
||||
|
||||
/* video hardware */
|
||||
PWM_DISPLAY(config, m_display).set_size(4, 8);
|
||||
m_display->set_segmask(3, 0xff);
|
||||
//config.set_default_layout(layout_mastmind);
|
||||
config.set_default_layout(layout_mastmind);
|
||||
|
||||
/* no sound! */
|
||||
}
|
||||
|
24
src/mame/layout/mastmind.lay
Normal file
24
src/mame/layout/mastmind.lay
Normal file
@ -0,0 +1,24 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
license:CC0
|
||||
-->
|
||||
<mamelayout version="2">
|
||||
|
||||
<element name="digit" defstate="0">
|
||||
<led7seg><color red="0.2" green="1.0" blue="0.85" /></led7seg>
|
||||
</element>
|
||||
|
||||
<view name="Internal Layout">
|
||||
<bounds left="0" right="90" top="0" bottom="15" />
|
||||
|
||||
<element name="digit7" ref="digit"><bounds x="0" y="0" width="10" height="15" /></element> <!-- N/C on mastmind -->
|
||||
<element name="digit0" ref="digit"><bounds x="10" y="0" width="10" height="15" /></element>
|
||||
<element name="digit1" ref="digit"><bounds x="20" y="0" width="10" height="15" /></element>
|
||||
<element name="digit2" ref="digit"><bounds x="30" y="0" width="10" height="15" /></element>
|
||||
<element name="digit3" ref="digit"><bounds x="40" y="0" width="10" height="15" /></element>
|
||||
<element name="digit4" ref="digit"><bounds x="50" y="0" width="10" height="15" /></element>
|
||||
<element ref="digit"><bounds x="60" y="0" width="10" height="15" /></element> <!-- N/C -->
|
||||
<element name="digit5" ref="digit"><bounds x="70" y="0" width="10" height="15" /></element>
|
||||
<element name="digit6" ref="digit"><bounds x="80" y="0" width="10" height="15" /></element>
|
||||
</view>
|
||||
</mamelayout>
|
Loading…
Reference in New Issue
Block a user