Previous 15994 Revisions Next

r10602 Sunday 27th February, 2011 at 03:52:31 UTC by Robbbert
[VOTRTNT] Modernised. Added notes. Added some code.
[src/mess/drivers]votrtnt.c

src/mess/drivers/votrtnt.c
r10601r10602
55*  with loads of help (dumping, code disassembly, schematics, and other
66*  documentation) from Kevin 'kevtris' Horton
77*
8*  The Votrax TNT was sold from some time in early 1981 until at least 1983
9
8*  The Votrax TNT was sold from some time in early 1981 until at least 1983.
9*
10*  2011-02-27 The TNT communicates with its host via serial (RS-232) by
11*             using a 6850 ACIA. It will echo whatever is sent, back to the
12*             host. In order that we can examine it, I have connected the
13*             'terminal' so we can enter data, and see what gets sent back.
14*             I've also connected the 'votrax' device, but it is far from
15*             complete (the phoneme-to-sample table does not exist), and
16*             therefore produces no sound. Selected phonemes would show in
17*             the error log if the status return was working properly.
18*
19*             ACIA status code is set to E2 for no data and E3 for data.
20*
21*             On the CPU, A12 and A15 are not connected. A13 and A14 are used
22*             to select devices. A0-A9 address RAM. A0-A11 address ROM.
23*             A0 switches the ACIA between status/command, and data in/out.
24*
25*  Special codes: The Type 'N Talk will take notice of certain codes. They
26*                 are: 08, 0D, 1B, 20. I didn't investigate what the codes do.
27*
28*  ToDo:
29*  - Fix votrax audio device to produce sound.
30*  - Fix votrax device to perform a callback on change of status rather than
31*           having to poll it.
32*  - Allow votrax frequency to be changed via a callable routine.
33*  - Reconnect the ACIA when serial coms become viable in MESS.
34*
1035******************************************************************************/
36#define ADDRESS_MAP_MODERN
1137
1238/* Core includes */
1339#include "emu.h"
r10601r10602
1844#include "sound/votrax.h"
1945#include "machine/6850acia.h"
2046
47/* For testing */
48#include "machine/terminal.h"
2149
50
51
2252class votrtnt_state : public driver_device
2353{
2454public:
2555   votrtnt_state(running_machine &machine, const driver_device_config_base &config)
26      : driver_device(machine, config) { }
56      : driver_device(machine, config),
57   m_maincpu(*this, "maincpu"),
58   m_terminal(*this, TERMINAL_TAG),
59   //m_acia(*this, "acia_0"),
60   m_votrax(*this, "votrax")
61   { }
2762
63   required_device<cpu_device> m_maincpu;
64   required_device<device_t> m_terminal;
65   //required_device<device_t> m_acia;
66   required_device<device_t> m_votrax;
67   DECLARE_READ8_MEMBER( votrtnt_acia_status_r );
68   DECLARE_READ8_MEMBER( votrtnt_acia_data_r );
69   DECLARE_WRITE8_MEMBER( votrtnt_votrax_w );
70   DECLARE_WRITE8_MEMBER( votrtnt_kbd_put );
71   UINT8 m_term_data;
72   UINT8 m_term_status;
2873};
2974
75READ8_MEMBER( votrtnt_state::votrtnt_acia_status_r )
76{
77   return m_term_status;
78}
3079
31/* Devices */
80READ8_MEMBER( votrtnt_state::votrtnt_acia_data_r )
81{
82   m_term_status = 0xe2;
83   return m_term_data;
84}
3285
86WRITE8_MEMBER( votrtnt_state::votrtnt_votrax_w )
87{
88   data &= 0x3f;  // intonation bits are grounded
89   //printf("%X ",data);
90   votrax_w(m_votrax, 0, data);
91}
3392
93
94
3495/******************************************************************************
3596 Address Maps
3697******************************************************************************/
3798
38static ADDRESS_MAP_START(6802_mem, ADDRESS_SPACE_PROGRAM, 8)
39    ADDRESS_MAP_UNMAP_HIGH
40   ADDRESS_MAP_GLOBAL_MASK(0x7fff)
41    AM_RANGE(0x0000, 0x07ff) AM_RAM AM_MIRROR(0x9800)/* RAM, 2114*2 (0x400 bytes) mirrored 4x */
42   AM_RANGE(0x2000, 0x2000) AM_NOP AM_MIRROR(0x9ffe)//AM_DEVREADWRITE("acia_0",aciastat_r,aciactrl_w) AM_MIRROR(0x9ffe)/* 6850 ACIA */
43   AM_RANGE(0x2001, 0x2001) AM_NOP AM_MIRROR(0x9ffe)//AM_DEVREADWRITE("acia_0",aciadata_r,aciadata_w) AM_MIRROR(0x9ffe)/* 6850 ACIA */
44   AM_RANGE(0x4000, 0x4000) AM_NOP AM_MIRROR(0x9fff)/* low 6 bits write to 6 bit input of sc-01-a; high 2 bits are ignored (but by adding a buffer chip could be made to control the inflection bits of the sc-01-a which are normally grouned on the tnt) */
45   AM_RANGE(0x6000, 0x6fff) AM_ROM AM_MIRROR(0x9000)/* ROM in potted block */
99static ADDRESS_MAP_START(6802_mem, ADDRESS_SPACE_PROGRAM, 8, votrtnt_state)
100   ADDRESS_MAP_UNMAP_HIGH
101   ADDRESS_MAP_GLOBAL_MASK(0x6fff)
102   AM_RANGE(0x0000, 0x03ff) AM_RAM AM_MIRROR(0xc00)/* RAM, 2114*2 (0x400 bytes) mirrored 4x */
103   //AM_RANGE(0x2000, 0x2000) AM_NOP AM_MIRROR(0xffe)//AM_DEVREADWRITE("acia_0",aciastat_r,aciactrl_w)/* 6850 ACIA */
104   //AM_RANGE(0x2001, 0x2001) AM_NOP AM_MIRROR(0xffe)//AM_DEVREADWRITE("acia_0",aciadata_r,aciadata_w)/* 6850 ACIA */
105   AM_RANGE(0x2000, 0x2000) AM_MIRROR(0xffe) AM_READ(votrtnt_acia_status_r) AM_WRITENOP// temp testing
106   AM_RANGE(0x2001, 0x2001) AM_MIRROR(0xffe) AM_READ(votrtnt_acia_data_r) AM_DEVWRITE_LEGACY(TERMINAL_TAG, terminal_write) // temp testing
107   AM_RANGE(0x4000, 0x5fff) AM_WRITE(votrtnt_votrax_w) /* low 6 bits write to 6 bit input of sc-01-a; high 2 bits are ignored (but by adding a buffer chip could be made to control the inflection bits of the sc-01-a which are normally grounded on the tnt) */
108   AM_RANGE(0x6000, 0x6fff) AM_ROM /* ROM in potted block */
46109ADDRESS_MAP_END
47110
48111
r10601r10602
63126   PORT_DIPSETTING(    0x80, "9600" )
64127INPUT_PORTS_END
65128
129static MACHINE_RESET(votrtnt)
130{
131   votrtnt_state *state = machine->driver_data<votrtnt_state>();
132   state->m_term_data = 0;
133   state->m_term_status = 0xe2;
134}
66135
136WRITE8_MEMBER( votrtnt_state::votrtnt_kbd_put )
137{
138   m_term_data = data;
139   m_term_status = 0xe3;
140}
141
142static GENERIC_TERMINAL_INTERFACE( votrtnt_terminal_intf )
143{
144   DEVCB_DRIVER_MEMBER(votrtnt_state, votrtnt_kbd_put)
145};
146
147static TIMER_DEVICE_CALLBACK( votrtnt_poll_votrax )
148{
149   votrtnt_state *state = timer.machine->driver_data<votrtnt_state>();
150   UINT8 status = votrax_status_r(state->m_votrax);
151   //printf("%X ",status);
152   cpu_set_input_line(timer.machine->device("maincpu"), INPUT_LINE_IRQ0, status ? ASSERT_LINE : CLEAR_LINE);
153}
154
155
67156/******************************************************************************
68157 Machine Drivers
69158******************************************************************************/
70159
71160static MACHINE_CONFIG_START( votrtnt, votrtnt_state )
72    /* basic machine hardware */
73    MCFG_CPU_ADD("maincpu", M6802, XTAL_2_4576MHz)  /* 2.4576MHz XTAL, verified; divided by 4 inside the m6802*/
74    MCFG_CPU_PROGRAM_MAP(6802_mem)
75    MCFG_QUANTUM_TIME(attotime::from_hz(60))
161   /* basic machine hardware */
162   MCFG_CPU_ADD("maincpu", M6802, XTAL_2_4576MHz)  /* 2.4576MHz XTAL, verified; divided by 4 inside the m6802*/
163   MCFG_CPU_PROGRAM_MAP(6802_mem)
76164
77    /* video hardware */
78    MCFG_DEFAULT_LAYOUT(layout_votrtnt)
165   MCFG_MACHINE_RESET(votrtnt)
166   /* video hardware */
167   //MCFG_DEFAULT_LAYOUT(layout_votrtnt)
79168
80    /* serial hardware */
81    //MCFG_ACIA6850_ADD("acia_0", acia_intf)
169   /* serial hardware */
170   //MCFG_ACIA6850_ADD("acia_0", acia_intf)
82171
83    /* sound hardware */
84   //MCFG_SPEAKER_STANDARD_MONO("mono")
85   //MCFG_SOUND_ADD("sc-01-a", VOTRAX, 1700000) /* 1.70 MHz? needs verify */
86   //MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
172   /* sound hardware */
173   MCFG_SPEAKER_STANDARD_MONO("mono")
174   MCFG_SOUND_ADD("votrax", VOTRAX, 1700000) /* 1.70 MHz? needs verify */
175   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
87176
88   /* printer */
89   //MCFG_PRINTER_ADD("printer")
90
177   MCFG_FRAGMENT_ADD( generic_terminal )
178   MCFG_GENERIC_TERMINAL_ADD(TERMINAL_TAG, votrtnt_terminal_intf)
179   MCFG_TIMER_ADD_PERIODIC("votrtnt_timer", votrtnt_poll_votrax, attotime::from_hz(70) )
91180MACHINE_CONFIG_END
92181
93182
r10601r10602
97186******************************************************************************/
98187
99188ROM_START(votrtnt)
100    ROM_REGION(0x10000, "maincpu", 0)
189   ROM_REGION(0x10000, "maincpu", 0)
101190   ROM_LOAD("cn49752n.bin", 0x6000, 0x1000, CRC(a44e1af3) SHA1(af83b9e84f44c126b24ee754a22e34ca992a8d3d)) /* 2332 mask rom inside potted brick */
102
103191ROM_END
104192
105193
r10601r10602
110198/*
111199static ACIA6850_INTERFACE( acia_intf )
112200{
113    9600, // rx clock, actually based on dipswitches
114    9600, // tx clock, actually based on dipswitches
115    DEVCB_NULL, // rx callback
116    DEVCB_NULL, // tx callback
117    DEVCB_NULL,
118    DEVCB_NULL,
119    DEVCB_NULL,
120    DEVCB_NULL
201   9600, // rx clock, actually based on dipswitches
202   9600, // tx clock, actually based on dipswitches
203   DEVCB_NULL, // rx callback
204   DEVCB_NULL, // tx callback
205   DEVCB_NULL,
206   DEVCB_NULL,
207   DEVCB_NULL,
208   DEVCB_NULL
121209};*/
122210
123211/******************************************************************************
r10601r10602
125213******************************************************************************/
126214
127215/*    YEAR  NAME        PARENT      COMPAT  MACHINE     INPUT   INIT      COMPANY                     FULLNAME                            FLAGS */
128COMP( 1980, votrtnt,   0,          0,      votrtnt,   votrtnt, 0,     "Votrax",        "Type 'N Talk",                        GAME_NOT_WORKING | GAME_NO_SOUND)
216COMP( 1980, votrtnt,   0,          0,      votrtnt,   votrtnt, 0,     "Votrax",        "Type 'N Talk", GAME_NOT_WORKING | GAME_NO_SOUND)
129217

Previous 15994 Revisions Next


© 1998-2018 The MESS Team