Previous 15994 Revisions Next

r6458 Wednesday 25th November, 2009 at 12:44:51 UTC by Curt Coder
[PROF80] Added speaker and detrampolinization.
[src/mess/drivers]prof80.c
[src/mess/includes]prof80.h

src/mess/includes/prof80.h
r6457r6458
1111#define Z80STI_TAG            "z9"
1212
1313#define GRIP_Z80_TAG         "grip_z1"
14#define SPEAKER_TAG            "speaker"
1415
1516#define UNIO_Z80STI_TAG         "z5"
1617#define UNIO_Z80SIO_TAG         "z15"
src/mess/drivers/prof80.c
r6457r6458
3333#include "cpu/z80/z80.h"
3434#include "cpu/z80/z80daisy.h"
3535#include "video/mc6845.h"
36#include "formats/basicdsk.h"
37#include "devices/flopdrv.h"
38#include "devices/messram.h"
3639#include "machine/i8255a.h"
3740#include "machine/upd765.h"
3841#include "machine/upd1990a.h"
3942#include "machine/z80sti.h"
4043#include "machine/ctronics.h"
4144#include "machine/rescap.h"
42#include "devices/flopdrv.h"
43#include "formats/basicdsk.h"
44#include "devices/messram.h"
45#include "sound/speaker.h"
4546
46INLINE const device_config *get_floppy_image(running_machine *machine, int drive)
47{
48   return floppy_get_device(machine, drive);
49}
50
5147/* Keyboard HACK */
5248
5349static const UINT8 prof80_keycodes[3][9][8] =
r6457r6458
193189{
194190   prof80_state *state = machine->driver_data;
195191
196   floppy_drive_set_motor_state(get_floppy_image(machine, 0), 0);
197   floppy_drive_set_motor_state(get_floppy_image(machine, 1), 0);
198   floppy_drive_set_ready_state(get_floppy_image(machine, 0), 0, 1);
199   floppy_drive_set_ready_state(get_floppy_image(machine, 1), 0, 1);
192   floppy_drive_set_motor_state(floppy_get_device(machine, 0), 0);
193   floppy_drive_set_motor_state(floppy_get_device(machine, 1), 0);
194   floppy_drive_set_ready_state(floppy_get_device(machine, 0), 0, 1);
195   floppy_drive_set_ready_state(floppy_get_device(machine, 1), 0, 1);
200196
201197   state->motor = 0;
202198}
r6457r6458
242238      else
243239      {
244240         /* turn on floppy motor */
245         floppy_drive_set_motor_state(get_floppy_image(machine, 0), 1);
246         floppy_drive_set_motor_state(get_floppy_image(machine, 1), 1);
247         floppy_drive_set_ready_state(get_floppy_image(machine, 0), 1, 1);
248         floppy_drive_set_ready_state(get_floppy_image(machine, 1), 1, 1);
241         floppy_drive_set_motor_state(floppy_get_device(machine, 0), 1);
242         floppy_drive_set_motor_state(floppy_get_device(machine, 1), 1);
243         floppy_drive_set_ready_state(floppy_get_device(machine, 0), 1, 1);
244         floppy_drive_set_ready_state(floppy_get_device(machine, 1), 1, 1);
249245
250246         state->motor = 1;
251247
r6457r6458
867863   }
868864}
869865
870static WRITE_LINE_DEVICE_HANDLER( grip_de_w )
871{
872   prof80_state *driver_state = device->machine->driver_data;
873
874   z80sti_i1_w(driver_state->z80sti, state);
875}
876
877static WRITE_LINE_DEVICE_HANDLER( grip_cur_w )
878{
879   prof80_state *driver_state = device->machine->driver_data;
880
881   z80sti_i2_w(driver_state->z80sti, state);
882}
883
884866static const mc6845_interface grip_mc6845_interface =
885867{
886868   SCREEN_TAG,
r6457r6458
888870   NULL,
889871   grip_update_row,
890872   NULL,
891   DEVCB_LINE(grip_de_w),
892   DEVCB_LINE(grip_cur_w),
873   DEVCB_DEVICE_LINE(Z80STI_TAG, z80sti_i1_w),
874   DEVCB_DEVICE_LINE(Z80STI_TAG, z80sti_i2_w),
893875   DEVCB_NULL,
894876   DEVCB_NULL,
895877   NULL
r6457r6458
931913   NULL,
932914   NULL,
933915   UPD765_RDY_PIN_CONNECTED,
934   {FLOPPY_0,FLOPPY_1, FLOPPY_2, FLOPPY_3}
916   { FLOPPY_0, FLOPPY_1, FLOPPY_2, FLOPPY_3 }
935917};
936918
937919/* PPI8255 Interface */
r6457r6458
10681050   return centronics_busy_r(state->centronics) << 3;
10691051}
10701052
1071static WRITE_LINE_DEVICE_HANDLER( grip_z80sti_tbo_w )
1072{
1073   // connected to speaker
1074}
1075
1076static WRITE_LINE_DEVICE_HANDLER( grip_z80sti_irq_w )
1077{
1078   cputag_set_input_line(device->machine, GRIP_Z80_TAG, INPUT_LINE_IRQ0, state);
1079}
1080
10811053static Z80STI_INTERFACE( grip_z80sti_interface )
10821054{
10831055   0,                           /* serial receive clock */
r6457r6458
10871059   DEVCB_NULL,                     /* serial input */
10881060   DEVCB_NULL,                     /* serial output */
10891061   DEVCB_NULL,                     /* timer A output */
1090   DEVCB_LINE(grip_z80sti_tbo_w),      /* timer B output */
1062   DEVCB_DEVICE_LINE(SPEAKER_TAG, speaker_level_w),      /* timer B output */
10911063   DEVCB_LINE(z80sti_tc_w),         /* timer C output */
10921064   DEVCB_LINE(z80sti_rc_w),         /* timer D output */
1093   DEVCB_LINE(grip_z80sti_irq_w)      /* interrupt */
1065   DEVCB_CPU_INPUT_LINE(GRIP_Z80_TAG, INPUT_LINE_IRQ0)      /* interrupt */
10941066};
10951067
10961068/* Z80 Daisy Chain */
r6457r6458
12221194
12231195   MDRV_MC6845_ADD(MC6845_TAG, MC6845, XTAL_16MHz/4, grip_mc6845_interface)
12241196
1197   /* sound hardware */
1198   MDRV_SPEAKER_STANDARD_MONO("mono")
1199   MDRV_SOUND_ADD(SPEAKER_TAG, SPEAKER, 0)
1200   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
1201
12251202   /* devices */
12261203   MDRV_UPD1990A_ADD(UPD1990A_TAG, XTAL_32_768kHz, prof80_upd1990a_intf)
12271204   MDRV_UPD765A_ADD(UPD765_TAG, prof80_upd765_interface)

Previous 15994 Revisions Next


© 1998-2018 The MESS Team