Previous 15994 Revisions Next

r10404 Sunday 13th February, 2011 at 05:55:41 UTC by Jonathan Gevaryahu
Add Pacific Educational Systems TMS5220C based speech box skeleton [Lord Nightmare, kevtris]
[src/mess]mess.mak messdriv.c
[src/mess/drivers]pes.c*
[src/mess/includes]pes.h*

src/mess/includes/pes.h
r0r10404
1/***************************************************************************
2
3        pes.h
4
5****************************************************************************/
6
7#pragma once
8
9#ifndef _PES_H_
10#define _PES_H_
11
12class pes_state : public driver_device
13{
14public:
15   pes_state(running_machine &machine, const driver_device_config_base &config)
16      : driver_device(machine, config) { }
17
18   UINT8 m_tmslatch;         // latched data for speech chip
19   UINT8 m_wsstate;         // /WS
20   UINT8 m_rsstate;         // /RS
21   UINT8 m_serial_cts;         // CTS
22
23   virtual void machine_reset();
24   DECLARE_WRITE8_MEMBER(rsws_w);
25};
26
27
28#endif   // _PES_H_
src/mess/messdriv.c
r10403r10404
18501850   DRIVER( bigboard )
18511851   DRIVER( bigbord2 )
18521852   DRIVER( savia84 )
1853   DRIVER( pes )
18531854
18541855#endif /* DRIVER_RECURSIVE */
src/mess/mess.mak
r10403r10404
17521752   $(MESS_DRIVERS)/p8k.o      \
17531753   $(MESS_DRIVERS)/pegasus.o   \
17541754   $(MESS_VIDEO)/pegasus.o    \
1755   $(MESS_DRIVERS)/pes.o      \
17551756   $(MESS_DRIVERS)/phunsy.o   \
17561757   $(MESS_DRIVERS)/pimps.o      \
17571758   $(MESS_DRIVERS)/pipbug.o   \
src/mess/drivers/pes.c
r0r10404
1/******************************************************************************
2*
3*  Pacific Educational Systems 'PES' Speech box
4*  Part number VPU-1 V1
5*  By Kevin 'kevtris' Horton and Jonathan Gevaryahu AKA Lord Nightmare
6*
7*  RE work done by Kevin 'kevtris' Horton and Jonathan Gevaryahu
8*
9*  DONE:
10*  compiles correctly
11*  rom loads correctly
12*
13*  TODO:
14*  pretty much everything else
15*
16***********************************************************************
17This is almost as simple as hardware gets from the digital side:
18Hardware consists of:
1910.245Mhz xtal
208031 cpu
2127c64 rom (holds less than 256 bytes of code)
22unpopulated 6116? sram, which isn't used
23TSP5220C speech chip (aka tms5220c)
24mc145406 RS232 driver/reciever (+-24v to 0-5v converter for serial i/o)
2574hc573b1 octal tri-state D-latch (used for latching bus state for speech chip)
2674hc74b1 dual d-flipflop with set/reset, positive edge trigger (for driving /WS and /RS of speech chip)
2774hc02b1 quad 2-input NOR gate (for /WS and /RS logic)
28mc14520b dual 4-bit binary up counter (honestly not sure what this is used for, maybe for the analog filter)
29Big messy analog section to allow voice output to be filtered extensively by a 4th order filter
30
31Address map:
3280C31 ADDR:
33  0000-1FFF: ROM
34  2000-FFFF: open bus
3580C31 IO:
36  00 W: d0 and d1 are the /RS and /WS bits
37  01 W: ? to tms5220 bus?
38  03 W: ? to serial?
39  03 R: ? from serial
40
41*/
42
43#define ADDRESS_MAP_MODERN
44#define CPU_CLOCK      XTAL_10_245MHz
45
46/* Core includes */
47#include "emu.h"
48#include "includes/pes.h"
49#include "cpu/mcs51/mcs51.h"
50#include "sound/tms5220.h"
51#include "machine/terminal.h"
52
53/* Devices */
54static WRITE8_DEVICE_HANDLER( pes_kbd_put )
55{
56   //duart68681_rx_data(device->machine->device("duart68681"), 1, data);
57   // nothing, yet
58}
59
60static GENERIC_TERMINAL_INTERFACE( pes_terminal_intf )
61{
62   DEVCB_HANDLER(pes_kbd_put)
63};
64
65/* Handlers */
66WRITE8_MEMBER( pes_state::rsws_w )
67{
68   m_wsstate = data&0x1;
69   m_rsstate = (data&0x2)>>1;
70   logerror("RSWS states updated: RS: %d, WS: %d\n", m_rsstate, m_wsstate);
71   // poke tms5220
72}
73
74/* Reset */
75void pes_state::machine_reset()
76{
77   const device_t *devconf = machine->device("tms5220");
78   m_tmslatch = 0;
79   m_wsstate = 1;
80   m_rsstate = 1;
81   m_serial_cts = 1;
82   DEVICE_RESET(devconf);
83   devconf = devconf; // hack to make gcc shut up about unused variables
84}
85
86/******************************************************************************
87 Address Maps
88******************************************************************************/
89
90static ADDRESS_MAP_START(i80c31_mem, ADDRESS_SPACE_PROGRAM, 8, pes_state)
91   ADDRESS_MAP_UNMAP_HIGH
92   AM_RANGE(0x0000, 0x1fff) AM_ROM /* 27C64 ROM */
93   // AM_RANGE(0x2000, 0x7ff) AM_RAM /* 6116? SRAM, not populated */
94ADDRESS_MAP_END
95
96static ADDRESS_MAP_START(i80c31_io, ADDRESS_SPACE_IO, 8, pes_state)
97   ADDRESS_MAP_GLOBAL_MASK(0xff)
98   /*  00 W: d0 and d1 are the /RS and /WS bits
99  01 W: ? to tms5220 bus?
100  03 W: ? to serial?
101  03 R: ? from serial*/
102   AM_RANGE(0x0, 0x0) AM_WRITE(rsws_w) /* /RS and /WS */
103ADDRESS_MAP_END
104
105/******************************************************************************
106 Input Ports
107******************************************************************************/
108static INPUT_PORTS_START( pes )
109   PORT_INCLUDE(generic_terminal)
110INPUT_PORTS_END
111
112/******************************************************************************
113 Machine Drivers
114******************************************************************************/
115static MACHINE_CONFIG_START( pes, pes_state )
116    /* basic machine hardware */
117    MCFG_CPU_ADD("maincpu", I80C31, CPU_CLOCK)
118    MCFG_CPU_PROGRAM_MAP(i80c31_mem)
119    MCFG_CPU_IO_MAP(i80c31_io)
120   
121    /* sound hardware */
122    MCFG_SPEAKER_STANDARD_MONO("mono")
123    MCFG_SOUND_ADD("tms5220", TMS5220C, 640000) /* 720Khz clock, 10khz output */
124    MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
125
126   MCFG_FRAGMENT_ADD( generic_terminal )
127   MCFG_GENERIC_TERMINAL_ADD(TERMINAL_TAG,pes_terminal_intf)
128MACHINE_CONFIG_END
129
130/******************************************************************************
131 ROM Definitions
132******************************************************************************/
133ROM_START( pes )
134   ROM_REGION( 0x10000, "maincpu", 0 )
135   ROM_DEFAULT_BIOS("kevbios")
136   ROM_SYSTEM_BIOS( 0, "orig", "PES box with original firmware v2.5")
137   ROMX_LOAD( "vpu_2-5.bin",   0x0000, 0x2000, CRC(B27CFDF7) SHA1(C52ACF9C080823DE5EF26AC55ABE168AD53A7D38), ROM_BIOS(1)) // original firmware, rather buggy, 4800bps serial, buggy RTS/CTS flow control, no buffer
138   ROM_SYSTEM_BIOS( 1, "kevbios", "PES box with kevtris' rewritten firmware")
139   ROMX_LOAD( "pes.bin",   0x0000, 0x2000, CRC(22C1C4EC) SHA1(042E139CD0CF6FFAFCD88904F1636C6FA1B38F25), ROM_BIOS(2)) // rewritten firmware by kevtris, 9600bps serial, RTS/CTS plus XON/XOFF flow control, 64 byte buffer
140ROM_END
141
142/******************************************************************************
143 Drivers
144******************************************************************************/
145
146/*    YEAR  NAME   PARENT   COMPAT   MACHINE      INPUT   INIT   COMPANY     FULLNAME            FLAGS */
147COMP( 1987, pes,   0,      0,      pes,      pes,   0,      "Pacific Educational Systems",   "VPU-01 Speech box",   GAME_NOT_WORKING )

Previous 15994 Revisions Next


© 1998-2018 The MESS Team