Previous 199869 Revisions Next

r41455 Thursday 29th October, 2015 at 19:21:01 UTC by David Haywood
create derived CPU type so that code can be put in the correct place (nw)
[scripts/src]cpu.lua
[src/devices/bus/vcs]harmony_melody.c harmony_melody.h
[src/devices/cpu/arm7]lpc210x.c* lpc210x.h*

trunk/scripts/src/cpu.lua
r249966r249967
132132      MAME_DIR .. "src/devices/cpu/arm7/arm7.h",
133133      MAME_DIR .. "src/devices/cpu/arm7/arm7thmb.c",
134134      MAME_DIR .. "src/devices/cpu/arm7/arm7ops.c",
135      MAME_DIR .. "src/devices/cpu/arm7/lpc210x.c",
136      MAME_DIR .. "src/devices/cpu/arm7/lpc210x.h",
135137   }
136138end
137139
trunk/src/devices/bus/vcs/harmony_melody.c
r249966r249967
120120ADDRESS_MAP_END
121121
122122static MACHINE_CONFIG_FRAGMENT( a26_harmony )
123   MCFG_CPU_ADD("arm", ARM7, 70000000)
123   MCFG_CPU_ADD("arm", LPC2103, 70000000)
124124   MCFG_CPU_PROGRAM_MAP(harmony_arm7_map)
125125MACHINE_CONFIG_END
126126
trunk/src/devices/bus/vcs/harmony_melody.h
r249966r249967
44#define __VCS_HARMONY_H
55
66#include "rom.h"
7#include "cpu/arm7/arm7.h"
7#include "cpu/arm7/lpc210x.h"
88
99
1010// ======================> a26_rom_harmony_device
trunk/src/devices/cpu/arm7/lpc210x.c
r0r249967
1// license:BSD-3-Clause
2// copyright-holders:David Haywood
3/***************************************************************************
4
5 NXP (Phillips) LPC2103 series
6 covering LPC2101, LPC2102, LPC2103*
7
8 *currently only LPC2103
9
10 these are based on an ARM7TDMI-S CPU
11 internal flash and integrated peripherals
12
13***************************************************************************/
14
15#include "lpc210x.h"
16
17const device_type LPC2103 = &device_creator<lpc210x_device>;
18
19
20lpc210x_device::lpc210x_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
21   : arm7_cpu_device(mconfig, LPC2103, "LPC2103", tag, owner, clock, "lpc2103", __FILE__, 4, eARM_ARCHFLAGS_T, ENDIANNESS_LITTLE)
22{
23}
24
25
26
27//-------------------------------------------------
28//  device_start - device-specific startup
29//-------------------------------------------------
30
31void lpc210x_device::device_start()
32{
33   arm7_cpu_device::device_start();
34}
35
36
37//-------------------------------------------------
38//  device_reset - device-specific reset
39//-------------------------------------------------
40
41void lpc210x_device::device_reset()
42{
43   arm7_cpu_device::device_reset();
44}
45
46
47static MACHINE_CONFIG_FRAGMENT( lpc210x )
48MACHINE_CONFIG_END
49
50machine_config_constructor lpc210x_device::device_mconfig_additions() const
51{
52   return MACHINE_CONFIG_NAME( lpc210x );
53}
trunk/src/devices/cpu/arm7/lpc210x.h
r0r249967
1// license:BSD-3-Clause
2// copyright-holders:David Haywood
3
4#pragma once
5
6#ifndef __LPC2103__
7#define __LPC2103__
8
9#include "emu.h"
10#include "arm7.h"
11#include "arm7core.h"
12
13/***************************************************************************
14    DEVICE CONFIGURATION MACROS
15***************************************************************************/
16
17
18/***************************************************************************
19    TYPE DEFINITIONS
20***************************************************************************/
21
22class lpc210x_device : public arm7_cpu_device
23{
24public:
25   lpc210x_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32);
26
27   // static configuration helpers
28
29protected:
30   // device-level overrides
31   virtual machine_config_constructor device_mconfig_additions() const;
32   virtual void device_start();
33   virtual void device_reset();
34
35
36private:
37};
38
39
40// device type definition
41extern const device_type LPC2103;
42
43
44#endif /// __LPC2103__


Previous 199869 Revisions Next


© 1997-2024 The MAME Team