Previous 15994 Revisions Next

r6252 Monday 2nd November, 2009 at 11:33:56 UTC by Curt Coder
[PC88] Added cassette device, and D88 disk image plumbing.
[src/mess/drivers]pc8801.c
[src/mess/formats]d88_dsk.c d88_dsk.h*
[src/mess/includes]pc8801.h
[src/mess/machine]pc8801.c

src/mess/includes/pc8801.h
r6251r6252
88#define __PC8801__
99
1010#define UPD1990A_TAG   "upd1990a"
11#define CASSETTE_TAG   "cassette"
1112#define CENTRONICS_TAG   "centronics"
1213
1314#include "machine/upd765.h"
r6251r6252
2021   int rtc_data;
2122
2223   const device_config *upd1990a;
24   const device_config *cassette;
2325   const device_config *centronics;
2426};
2527
src/mess/machine/pc8801.c
r6251r6252
142142
143143WRITE8_HANDLER(pc88sr_outport_40)
144144{
145     /* bit 3,4,6 not implemented */
146     /* bit 7 incorrect behavior */
145   /* bit 3,4,6 not implemented */
146   /* bit 7 incorrect behavior */
147147   pc88_state *state = space->machine->driver_data;
148148   const device_config *speaker = devtag_get_device(space->machine, "beep");
149149
r6251r6252
174174}
175175
176176READ8_HANDLER(pc88sr_inport_40)
177     /* bit0, 2 not implemented */
178177{
178   /* bit 2 not implemented */
179179   pc88_state *state = space->machine->driver_data;
180180   int r;
181181
r6251r6252
679679
680680   /* find devices */
681681   state->upd1990a = devtag_get_device(machine, UPD1990A_TAG);
682   state->cassette = devtag_get_device(machine, CASSETTE_TAG);
682683   state->centronics = devtag_get_device(machine, CENTRONICS_TAG);
683684
684685   /* initialize RTC */
r6251r6252
767768static void pc8801_init_5fd(running_machine *machine)
768769{
769770   use_5FD = (input_port_read(machine, "DSW2") & 0x80) != 0x00;
771   
770772   if (!use_5FD)
771773      cputag_suspend(machine, "sub", SUSPEND_REASON_DISABLE, 1);
772774   else
773775      cputag_resume(machine, "sub", SUSPEND_REASON_DISABLE);
776
774777   cpu_set_input_line_vector(cputag_get_cpu(machine, "sub"), 0, 0);
775778   
776   logerror("READY 1\n");
777779   floppy_drive_set_motor_state(floppy_get_device(machine, 0), 1);
778780   floppy_drive_set_motor_state(floppy_get_device(machine, 1), 1);
779781   floppy_drive_set_ready_state(floppy_get_device(machine, 0), 1, 1);
src/mess/formats/d88_dsk.c
r6251r6252
333333
334334   return FLOPPY_ERROR_SUCCESS;
335335}
336
337FLOPPY_OPTIONS_START( d88 )
338   FLOPPY_OPTION( d88, "d88", "D88 disk image", d88_dsk_identify, d88_dsk_construct, NULL )
339FLOPPY_OPTIONS_END
src/mess/formats/d88_dsk.h
r0r6252
1/*********************************************************************
2
3    d88_dsk.h
4
5    D88 disk images
6
7*********************************************************************/
8
9#ifndef D88_DISK_H
10#define D88_DISK_H
11
12#include "formats/flopimg.h"
13
14/**************************************************************************/
15
16FLOPPY_OPTIONS_EXTERN( d88 );
17
18#endif /* D88_DISK_H */
src/mess/drivers/pc8801.c
r6251r6252
8585#include "includes/pc8801.h"
8686#include "cpu/z80/z80.h"
8787#include "cpu/v30mz/nec.h"
88#include "devices/cassette.h"
8889#include "devices/flopdrv.h"
90#include "formats/d88_dsk.h"
8991#include "machine/ctronics.h"
9092#include "machine/i8255a.h"
9193#include "machine/upd1990a.h"
r6251r6252
594596   DEVCB_NULL,
595597   DEVCB_NULL,
596598   FLOPPY_DRIVE_DS_80,
597   FLOPPY_OPTIONS_NAME(default),
599   FLOPPY_OPTIONS_NAME(d88),
598600   DO_NOT_KEEP_GEOMETRY
599601};
600602
603static const cassette_config pc88_cassette_config =
604{
605   cassette_default_formats,
606   NULL,
607   CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_MUTED
608};
609
601610static MACHINE_DRIVER_START( pc88srl )
602611   MDRV_DRIVER_DATA(pc88_state)
603612
r6251r6252
649658   MDRV_UPD765A_ADD("upd765", pc8801_fdc_interface)
650659   MDRV_UPD1990A_ADD(UPD1990A_TAG, XTAL_32_768kHz, pc88_upd1990a_intf)
651660   MDRV_CENTRONICS_ADD(CENTRONICS_TAG, standard_centronics)
661   MDRV_CASSETTE_ADD(CASSETTE_TAG, pc88_cassette_config)
652662
653663   MDRV_FLOPPY_2_DRIVES_ADD(pc88_floppy_config)
654664MACHINE_DRIVER_END

Previous 15994 Revisions Next


© 1998-2018 The MESS Team