Previous 15994 Revisions Next

r6251 Monday 2nd November, 2009 at 11:20:34 UTC by Curt Coder
[PC88] Added Centronics device.
[src/mess/drivers]pc8801.c
[src/mess/includes]pc8801.h
[src/mess/machine]pc8801.c

src/mess/includes/pc8801.h
r6250r6251
88#define __PC8801__
99
1010#define UPD1990A_TAG   "upd1990a"
11#define CENTRONICS_TAG   "centronics"
1112
1213#include "machine/upd765.h"
1314#include "machine/i8255a.h"
r6250r6251
1920   int rtc_data;
2021
2122   const device_config *upd1990a;
23   const device_config *centronics;
2224};
2325
2426/*----------- defined in machine/pc8801.c -----------*/
src/mess/machine/pc8801.c
r6250r6251
1616***************************************************************************/
1717
1818#include "driver.h"
19#include "includes/pc8801.h"
20#include "machine/ctronics.h"
1921#include "machine/i8255a.h"
20#include "includes/pc8801.h"
2122#include "machine/upd1990a.h"
2223#include "machine/upd765.h"
2324#include "sound/beep.h"
r6250r6251
4849{
4950   pc88_state *state = space->machine->driver_data;
5051
52   /* real time clock */
5153   upd1990a_c0_w(state->upd1990a, BIT(data, 0));
5254   upd1990a_c1_w(state->upd1990a, BIT(data, 1));
5355   upd1990a_c2_w(state->upd1990a, BIT(data, 2));
5456   upd1990a_data_w(state->upd1990a, BIT(data, 3));
5557
56   /* printer (not yet) */
58   /* printer */
59   centronics_data_w(state->centronics, 0, data);
60
5761   /* UOP3 (bit 7 -- not yet) */
5862}
5963
r6250r6251
143147   pc88_state *state = space->machine->driver_data;
144148   const device_config *speaker = devtag_get_device(space->machine, "beep");
145149
150   /* printer */
151   centronics_strobe_w(state->centronics, BIT(data, 0));
152
153   /* real time clock */
146154   upd1990a_stb_w(state->upd1990a, BIT(data, 1));
147155   upd1990a_clk_w(state->upd1990a, BIT(data, 2));
148156
r6250r6251
171179   pc88_state *state = space->machine->driver_data;
172180   int r;
173181
174   r = pc8801_is_24KHz ? 0x00 : 0x02;
182   r = centronics_busy_r(state->centronics);
183   r |= pc8801_is_24KHz ? 0x00 : 0x02;
175184   r |= use_5FD ? 0x00 : 0x08;
176185   r |= state->rtc_data ? 0x10 : 0x00;
177186   if(video_screen_get_vblank(space->machine->primary_screen)) r|=0x20;
r6250r6251
670679
671680   /* find devices */
672681   state->upd1990a = devtag_get_device(machine, UPD1990A_TAG);
682   state->centronics = devtag_get_device(machine, CENTRONICS_TAG);
673683
674684   /* initialize RTC */
675685   upd1990a_cs_w(state->upd1990a, 1);
src/mess/drivers/pc8801.c
r6250r6251
8282*****************************************************************************************************/
8383
8484#include "driver.h"
85#include "includes/pc8801.h"
8586#include "cpu/z80/z80.h"
8687#include "cpu/v30mz/nec.h"
87#include "sound/beep.h"
88#include "devices/flopdrv.h"
89#include "machine/ctronics.h"
8890#include "machine/i8255a.h"
89#include "includes/pc8801.h"
9091#include "machine/upd1990a.h"
9192#include "machine/upd765.h"
92#include "devices/flopdrv.h"
9393#include "sound/2203intf.h"
94#include "sound/beep.h"
9495
9596static const gfx_layout char_layout_40L_h =
9697{
r6250r6251
647648
648649   MDRV_UPD765A_ADD("upd765", pc8801_fdc_interface)
649650   MDRV_UPD1990A_ADD(UPD1990A_TAG, XTAL_32_768kHz, pc88_upd1990a_intf)
651   MDRV_CENTRONICS_ADD(CENTRONICS_TAG, standard_centronics)
650652
651653   MDRV_FLOPPY_2_DRIVES_ADD(pc88_floppy_config)
652654MACHINE_DRIVER_END

Previous 15994 Revisions Next


© 1998-2018 The MESS Team