Previous 199869 Revisions Next

r18095 Sunday 23rd September, 2012 at 16:22:00 UTC by R. Belmont
(MESS) Apple II: Add preliminary support for TME Arcade Board [R. Belmont]
[src/mess]mess.mak
[src/mess/drivers]apple2.c
[src/mess/machine]a2arcadebd.c* a2arcadebd.h*

trunk/src/mess/machine/a2arcadebd.c
r0r18095
1/*********************************************************************
2
3    a2arcadeboard.c
4
5    Implementation of the Third Millenium Engineering Arcade Board
6
7*********************************************************************/
8
9#include "emu.h"
10#include "machine/a2arcadebd.h"
11
12
13/***************************************************************************
14    PARAMETERS
15***************************************************************************/
16
17#define TMS_TAG "arcbd_tms"
18#define AY_TAG "arcbd_ay"
19#define SCREEN_TAG "screen"
20
21//**************************************************************************
22//  GLOBAL VARIABLES
23//**************************************************************************
24
25const device_type A2BUS_ARCADEBOARD = &device_creator<a2bus_arcboard_device>;
26
27static const ay8910_interface arcadeboard_ay8910_interface =
28{
29   AY8910_LEGACY_OUTPUT,
30   AY8910_DEFAULT_LOADS,
31   DEVCB_NULL
32};
33
34static TMS9928A_INTERFACE(arcadeboard_tms9918a_interface)
35{
36   SCREEN_TAG,
37   0x4000,         // 16k of VRAM
38   DEVCB_NULL      // VBL interrupt
39};
40
41MACHINE_CONFIG_FRAGMENT( arcadeboard )
42   MCFG_TMS9928A_ADD( TMS_TAG, TMS9918A, arcadeboard_tms9918a_interface )
43   MCFG_TMS9928A_SCREEN_ADD_NTSC( SCREEN_TAG )
44   MCFG_SCREEN_UPDATE_DEVICE( TMS_TAG, tms9918a_device, screen_update )
45
46   MCFG_SPEAKER_STANDARD_MONO("mono")
47    MCFG_SOUND_ADD(AY_TAG, AY8910, 1022727)
48    MCFG_SOUND_CONFIG(arcadeboard_ay8910_interface)
49    MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
50MACHINE_CONFIG_END
51
52//-------------------------------------------------
53//  machine_config_additions - device-specific
54//  machine configurations
55//-------------------------------------------------
56
57machine_config_constructor a2bus_arcboard_device::device_mconfig_additions() const
58{
59   return MACHINE_CONFIG_NAME( arcadeboard );
60}
61
62//**************************************************************************
63//  LIVE DEVICE
64//**************************************************************************
65
66a2bus_arcboard_device::a2bus_arcboard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
67    device_t(mconfig, A2BUS_ARCADEBOARD, "Third Millenium Engineering Arcade Board", tag, owner, clock),
68   device_a2bus_card_interface(mconfig, *this),
69    m_tms(*this, TMS_TAG),
70    m_ay(*this, AY_TAG)
71{
72   m_shortname = "a2arcbd";
73}
74
75a2bus_arcboard_device::a2bus_arcboard_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock) :
76    device_t(mconfig, type, name, tag, owner, clock),
77   device_a2bus_card_interface(mconfig, *this),
78    m_tms(*this, TMS_TAG),
79    m_ay(*this, AY_TAG)
80{
81   m_shortname = "a2arcbd";
82}
83
84//-------------------------------------------------
85//  device_start - device-specific startup
86//-------------------------------------------------
87
88void a2bus_arcboard_device::device_start()
89{
90   // set_a2bus_device makes m_slot valid
91   set_a2bus_device();
92}
93
94void a2bus_arcboard_device::device_reset()
95{
96}
97
98/*
99    C0nx map:
100    0 - TMS read vram
101    1 - TMS read status
102    2 - TMS write vram
103    3 - TMS write register
104    5 - AY register select
105    6 - AY data
106*/
107
108    UINT8 a2bus_arcboard_device::read_c0nx(address_space &space, UINT8 offset)
109{
110    switch (offset)
111    {
112        case 0:
113            return m_tms->vram_read(space, 0);
114
115        case 1:
116            return m_tms->register_read(space, 0);
117
118        case 6:
119            return ay8910_r(m_ay, space, 0);
120    }
121
122    return 0xff;
123}
124
125void a2bus_arcboard_device::write_c0nx(address_space &space, UINT8 offset, UINT8 data)
126{
127    switch (offset)
128    {
129        case 2:
130            m_tms->vram_write(space, 0, data);
131            break;
132
133        case 3:
134            m_tms->register_write(space, 0, data);
135            break;
136
137        case 5:
138            ay8910_address_w(m_ay, space, 0, data);
139            break;
140
141        case 6:
142            ay8910_data_w(m_ay, space, 0, data);
143            break;
144    }       
145}
trunk/src/mess/machine/a2arcadebd.h
r0r18095
1/*********************************************************************
2
3    a2arcadebd.h
4
5    Third Millenium Engineering Arcade Board
6
7*********************************************************************/
8
9#ifndef __A2BUS_ARCADEBOARD__
10#define __A2BUS_ARCADEBOARD__
11
12#include "emu.h"
13#include "machine/a2bus.h"
14#include "video/tms9928a.h"
15#include "sound/ay8910.h"
16
17//**************************************************************************
18//  TYPE DEFINITIONS
19//**************************************************************************
20
21class a2bus_arcboard_device:
22    public device_t,
23    public device_a2bus_card_interface
24{
25public:
26    // construction/destruction
27    a2bus_arcboard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
28    a2bus_arcboard_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock);
29
30    // optional information overrides
31    virtual machine_config_constructor device_mconfig_additions() const;
32
33protected:
34    virtual void device_start();
35    virtual void device_reset();
36
37    // overrides of standard a2bus slot functions
38    virtual UINT8 read_c0nx(address_space &space, UINT8 offset);
39    virtual void write_c0nx(address_space &space, UINT8 offset, UINT8 data);
40
41    required_device<tms9918a_device> m_tms;
42    required_device<device_t> m_ay;
43
44private:
45};
46
47// device type definition
48extern const device_type A2BUS_ARCADEBOARD;
49
50#endif  /* __A2BUS_ARCADEBOARD__ */
51
trunk/src/mess/drivers/apple2.c
r18094r18095
209209#include "machine/a2alfam2.h"
210210#include "machine/laser128.h"
211211#include "machine/a2echoii.h"
212#include "machine/a2arcadebd.h"
212213
213214/***************************************************************************
214215    PARAMETERS
r18094r18095
632633    SLOT_INTERFACE("ap16alt", A2BUS_IBSAP16ALT)    /* IBS AP16 (German VideoTerm clone), alternate revision */
633634    SLOT_INTERFACE("vtc1", A2BUS_VTC1)    /* Unknown VideoTerm clone #1 */
634635    SLOT_INTERFACE("vtc2", A2BUS_VTC2)    /* Unknown VideoTerm clone #2 */
636    SLOT_INTERFACE("arcbd", A2BUS_ARCADEBOARD)    /* Third Millenium Engineering Arcade Board */
635637//    SLOT_INTERFACE("scsi", A2BUS_SCSI)  /* Apple II SCSI Card */
636638SLOT_INTERFACE_END
637639
trunk/src/mess/mess.mak
r18094r18095
678678    $(MESS_MACHINE)/a2alfam2.o \
679679    $(MESS_MACHINE)/laser128.o \
680680    $(MESS_MACHINE)/a2echoii.o \
681    $(MESS_MACHINE)/a2arcadebd.o \
681682   $(MESS_MACHINE)/lisa.o      \
682683   $(MESS_DRIVERS)/lisa.o      \
683684   $(MESS_MACHINE)/nubus.o     \

Previous 199869 Revisions Next


© 1997-2024 The MAME Team