Previous 199869 Revisions Next

r22077 Monday 25th March, 2013 at 14:29:03 UTC by Curt Coder
(MESS) kc85: Added RS-232 port. (nw)
[src/mess/drivers]kyocera.c
[src/mess/includes]kyocera.h

trunk/src/mess/drivers/kyocera.c
r22076r22077
3131    - un-Y2K-hack tandy200
3232    - keyboard is unresponsive for couple of seconds after boot
3333    - soft power on/off
34    - IM6042 UART
3534    - pc8201 48K RAM option
3635    - pc8201 NEC PC-8241A video interface (TMS9918, 16K videoRAM, 8K ROM)
3736    - pc8201 NEC PC-8233 floppy controller
r22076r22077
3938    - trsm100 Tandy Portable Disk Drive (TPDD: 100k 3?", TPDD2: 200k 3?") (undumped HD63A01V1 MCU + full custom uPD65002, serial comms via the missing IM6042, not going to happen anytime soon)
4039    - trsm100 Chipmunk disk drive (384k 3?") (full custom logic, not going to happen)
4140    - trsm100 RS232/modem select
42    - tandy200 UART8251
4341    - tandy200 RTC alarm
4442    - tandy200 TCM5089 DTMF sound
4543    - international keyboard option ROMs
r22076r22077
239237
240238   UINT8 data = 0x40;
241239
242   // TODO carrier detect
240   // carrier detect
241   data |= m_rs232->dcd_r();
243242
244243   // overrun error
245244   data |= m_uart->oe_r() << 1;
r22076r22077
281280
282281   UINT8 data = 0x40;
283282
284   // TODO data carrier detect / ring detect
283   // data carrier detect / ring detect
284   data |= m_rs232->dcd_r();
285285
286286   // overrun error
287287   data |= m_uart->oe_r() << 1;
r22076r22077
965965   m_bell = BIT(data, 5);
966966
967967   if (m_buzzer) speaker_level_w(m_speaker, m_bell);
968
969   // RS-232
970   m_rs232->dtr_w(BIT(data, 6));
971   m_rs232->rts_w(BIT(data, 7));
968972}
969973
970974READ8_MEMBER( kc85_state::i8155_pc_r )
r22076r22077
991995   data |= m_centronics->not_busy_r() << 1;
992996   data |= m_centronics->busy_r() << 2;
993997
998   // RS-232
999   data |= m_rs232->cts_r() << 4;
1000   data |= m_rs232->dsr_r() << 5;
1001
9941002   return data;
9951003}
9961004
r22076r22077
10821090
10831091   UINT8 data = 0x01;
10841092
1093   // centronics
10851094   data |= m_centronics->not_busy_r() << 1;
10861095   data |= m_centronics->busy_r() << 2;
10871096
1097   // RS-232
1098   data |= m_rs232->dcd_r() << 4;
1099
10881100   return data;
10891101}
10901102
r22076r22077
11131125{
11141126   0,
11151127   0,
1128   DEVCB_DEVICE_LINE_MEMBER(RS232_TAG, serial_port_device, rx),
1129   DEVCB_DEVICE_LINE_MEMBER(RS232_TAG, serial_port_device, tx),
11161130   DEVCB_NULL,
11171131   DEVCB_NULL,
1118   DEVCB_NULL,
1119   DEVCB_NULL,
11201132   DEVCB_NULL
11211133};
11221134
r22076r22077
11241136
11251137static const i8251_interface tandy200_uart_intf =
11261138{
1139   DEVCB_DEVICE_LINE_MEMBER(RS232_TAG, serial_port_device, rx),
1140   DEVCB_DEVICE_LINE_MEMBER(RS232_TAG, serial_port_device, tx),
1141   DEVCB_DEVICE_LINE_MEMBER(RS232_TAG, rs232_port_device, dsr_r),
1142   DEVCB_DEVICE_LINE_MEMBER(RS232_TAG, rs232_port_device, dtr_w),
1143   DEVCB_DEVICE_LINE_MEMBER(RS232_TAG, rs232_port_device, rts_w),
11271144   DEVCB_NULL,
11281145   DEVCB_NULL,
11291146   DEVCB_NULL,
1147   DEVCB_NULL
1148};
1149
1150//-------------------------------------------------
1151//  rs232_port_interface rs232_intf
1152//-------------------------------------------------
1153
1154static const rs232_port_interface rs232_intf =
1155{
11301156   DEVCB_NULL,
11311157   DEVCB_NULL,
11321158   DEVCB_NULL,
11331159   DEVCB_NULL,
1134   DEVCB_NULL,
11351160   DEVCB_NULL
11361161};
11371162
r22076r22077
12811306   NULL
12821307};
12831308
1284WRITE_LINE_MEMBER(kc85_state::kc85_sod_w)
1309WRITE_LINE_MEMBER( kc85_state::kc85_sod_w )
12851310{
1286   device_t *device = machine().device(CASSETTE_TAG);
1287   dynamic_cast<cassette_image_device *>(device)->output(state ? +1.0 : -1.0);
1311   m_cassette->output(state ? +1.0 : -1.0);
12881312}
12891313
1290READ_LINE_MEMBER(kc85_state::kc85_sid_r)
1314READ_LINE_MEMBER( kc85_state::kc85_sid_r )
12911315{
1292   device_t *device = machine().device(CASSETTE_TAG);
1293   return dynamic_cast<cassette_image_device *>(device)->input() > 0.0;
1316   return m_cassette->input() > 0.0;
12941317}
12951318
12961319static I8085_CONFIG( kc85_i8085_config )
r22076r22077
13271350   MCFG_I8155_ADD(I8155_TAG, XTAL_4_9152MHz/2, kc85_8155_intf)
13281351   MCFG_UPD1990A_ADD(UPD1990A_TAG, XTAL_32_768kHz, kc85_upd1990a_intf)
13291352   MCFG_IM6402_ADD(IM6402_TAG, uart_intf)
1353   MCFG_RS232_PORT_ADD(RS232_TAG, rs232_intf, default_rs232_devices, NULL, NULL)
13301354   MCFG_CENTRONICS_PRINTER_ADD(CENTRONICS_TAG, standard_centronics)
13311355   MCFG_CASSETTE_ADD(CASSETTE_TAG, kc85_cassette_interface)
13321356
r22076r22077
13641388   MCFG_I8155_ADD(I8155_TAG, XTAL_4_9152MHz/2, kc85_8155_intf)
13651389   MCFG_UPD1990A_ADD(UPD1990A_TAG, XTAL_32_768kHz, kc85_upd1990a_intf)
13661390   MCFG_IM6402_ADD(IM6402_TAG, uart_intf)
1391   MCFG_RS232_PORT_ADD(RS232_TAG, rs232_intf, default_rs232_devices, NULL, NULL)
13671392   MCFG_CENTRONICS_PRINTER_ADD(CENTRONICS_TAG, standard_centronics)
13681393   MCFG_CASSETTE_ADD(CASSETTE_TAG, kc85_cassette_interface)
13691394
r22076r22077
14071432   MCFG_I8155_ADD(I8155_TAG, XTAL_4_9152MHz/2, kc85_8155_intf)
14081433   MCFG_UPD1990A_ADD(UPD1990A_TAG, XTAL_32_768kHz, kc85_upd1990a_intf)
14091434   MCFG_IM6402_ADD(IM6402_TAG, uart_intf)
1435   MCFG_RS232_PORT_ADD(RS232_TAG, rs232_intf, default_rs232_devices, NULL, NULL)
14101436   MCFG_CENTRONICS_PRINTER_ADD(CENTRONICS_TAG, standard_centronics)
14111437   MCFG_CASSETTE_ADD(CASSETTE_TAG, kc85_cassette_interface)
14121438//  MCFG_MC14412_ADD(MC14412_TAG, XTAL_1MHz)
r22076r22077
14551481   MCFG_I8155_ADD(I8155_TAG, XTAL_4_9152MHz/2, tandy200_8155_intf)
14561482   MCFG_RP5C01_ADD(RP5C01A_TAG, XTAL_32_768kHz, tandy200_rtc_intf)
14571483   MCFG_I8251_ADD(I8251_TAG, /*XTAL_4_9152MHz/2,*/ tandy200_uart_intf)
1484   MCFG_RS232_PORT_ADD(RS232_TAG, rs232_intf, default_rs232_devices, NULL, NULL)
14581485//  MCFG_MC14412_ADD(MC14412_TAG, XTAL_1MHz)
14591486   MCFG_CENTRONICS_PRINTER_ADD(CENTRONICS_TAG, standard_centronics)
14601487   MCFG_CASSETTE_ADD(CASSETTE_TAG, kc85_cassette_interface)
trunk/src/mess/includes/kyocera.h
r22076r22077
1414#include "machine/im6402.h"
1515#include "machine/ram.h"
1616#include "machine/rp5c01.h"
17#include "machine/serial.h"
1718#include "machine/upd1990a.h"
1819#include "video/hd44102.h"
1920#include "video/hd61830.h"
r22076r22077
3738#define HD44102_8_TAG   "m9"
3839#define HD44102_9_TAG   "m10"
3940#define CENTRONICS_TAG  "centronics"
41#define RS232_TAG      "rs232"
4042
4143//#define I8085_TAG     "m19"
4244//#define I8155_TAG     "m12"
r22076r22077
6870         m_speaker(*this, SPEAKER_TAG),
6971         m_cassette(*this, CASSETTE_TAG),
7072         m_ram(*this, RAM_TAG),
73         m_rs232(*this, RS232_TAG),
7174         m_rom(*this, I8085_TAG),
7275         m_option(*this, "option"),
7376         m_y0(*this, "Y0"),
r22076r22077
99102   required_device<speaker_sound_device> m_speaker;
100103   required_device<cassette_image_device> m_cassette;
101104   required_device<ram_device> m_ram;
105   required_device<rs232_port_device> m_rs232;
102106   required_memory_region m_rom;
103107   required_memory_region m_option;
104108   required_ioport m_y0;
r22076r22077
191195         m_speaker(*this, SPEAKER_TAG),
192196         m_cassette(*this, CASSETTE_TAG),
193197         m_ram(*this, RAM_TAG),
198         m_rs232(*this, RS232_TAG),
194199         m_rom(*this, I8085_TAG),
195200         m_option(*this, "option"),
196201         m_y0(*this, "Y0"),
r22076r22077
211216   required_device<speaker_sound_device> m_speaker;
212217   required_device<cassette_image_device> m_cassette;
213218   required_device<ram_device> m_ram;
219   required_device<rs232_port_device> m_rs232;
214220   required_memory_region m_rom;
215221   required_memory_region m_option;
216222   required_ioport m_y0;

Previous 199869 Revisions Next


© 1997-2024 The MAME Team