Previous 199869 Revisions Next

r34884 Friday 6th February, 2015 at 06:45:53 UTC by Robbbert
(MESS) kaypro: reinstated support for the old DSK format, but you need to rename your disks to KAY.
[src/lib/formats]kaypro_dsk.c
[src/mess/drivers]kaypro.c
[src/mess/includes]kaypro.h
[src/mess/machine]kaypro.c

trunk/src/lib/formats/kaypro_dsk.c
r243395r243396
11// license:BSD-3-Clause
2// copyright-holders:Olivier Galibert
2// copyright-holders:Olivier Galibert, Robbbert
33/*********************************************************************
44
55    formats/kaypro_dsk.c
r243395r243396
99    There is no inter-sector info on these disks. It is simply a
1010    dump of the 512 bytes from each sector and track in order.
1111    It is just like a headerless quickload.
12    No idea about how to calculate the gaps. Used the ones recommended
13    in the wd177x_dsk notes, works for most disks. Please note that
14    these disks usually have DSK extension, but that conflicts with
15    the CPCEMU DSK format. You need to rename your Kaypro DSK disks
16    to KAY extension.
1217
1318*********************************************************************/
1419
r243395r243396
3136
3237const char *kayproii_format::extensions() const
3338{
34   return "dsk";
39   return "kay";
3540}
3641
3742// gap info is a total guess
3843const kayproii_format::format kayproii_format::formats[] = {
3944   {   /*  191K 13cm double density single sided */
4045      floppy_image::FF_525,  floppy_image::SSDD, floppy_image::MFM,
41      2000, 10, 40, 1, 512, {}, 1, {}, 32, 22, 31
46      2000, 10, 40, 1, 512, {}, 0, {}, 80, 22, 24
4247   },
4348   {}
4449};
r243395r243396
5964
6065const char *kaypro2x_format::extensions() const
6166{
62   return "dsk";
67   return "kay";
6368}
6469
6570// gap info is a total guess
6671const kaypro2x_format::format kaypro2x_format::formats[] = {
6772   {   /*  382K 13cm double density double sided */
6873      floppy_image::FF_525,  floppy_image::DSDD, floppy_image::MFM,
69      2000, 10, 80, 2, 512, {}, 1, {}, 32, 22, 31
74      2000, 10, 40, 2, 512, {}, 0, {}, 80, 22, 24
7075   },
7176   {}
7277};
trunk/src/mess/drivers/kaypro.c
r243395r243396
163163
164164************************************************************/
165165
166FLOPPY_FORMATS_MEMBER( kaypro_state::kayproii_floppy_formats )
167   FLOPPY_KAYPROII_FORMAT
168FLOPPY_FORMATS_END
169
170FLOPPY_FORMATS_MEMBER( kaypro_state::kaypro2x_floppy_formats )
171   FLOPPY_KAYPRO2X_FORMAT
172FLOPPY_FORMATS_END
173
166174static SLOT_INTERFACE_START( kaypro_floppies )
167175   SLOT_INTERFACE( "drive0", FLOPPY_525_DD )
168176   SLOT_INTERFACE( "drive1", FLOPPY_525_DD )
r243395r243396
224232   MCFG_WD_FDC_INTRQ_CALLBACK(WRITELINE(kaypro_state, fdc_intrq_w))
225233   MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE(kaypro_state, fdc_drq_w))
226234   MCFG_WD_FDC_FORCE_READY
227   MCFG_FLOPPY_DRIVE_ADD("fdc:0", kaypro_floppies, "drive0", floppy_image_device::default_floppy_formats)
228   MCFG_FLOPPY_DRIVE_ADD("fdc:1", kaypro_floppies, "drive1", floppy_image_device::default_floppy_formats)
235   MCFG_FLOPPY_DRIVE_ADD("fdc:0", kaypro_floppies, "drive0", kaypro_state::kayproii_floppy_formats)
236   MCFG_FLOPPY_DRIVE_ADD("fdc:1", kaypro_floppies, "drive1", kaypro_state::kayproii_floppy_formats)
229237   MCFG_SOFTWARE_LIST_ADD("flop_list","kayproii")
230238MACHINE_CONFIG_END
231239
r243395r243396
287295   MCFG_WD_FDC_INTRQ_CALLBACK(WRITELINE(kaypro_state, fdc_intrq_w))
288296   MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE(kaypro_state, fdc_drq_w))
289297   MCFG_WD_FDC_FORCE_READY
290   MCFG_FLOPPY_DRIVE_ADD("fdc:0", kaypro_floppies, "drive0", floppy_image_device::default_floppy_formats)
291   MCFG_FLOPPY_DRIVE_ADD("fdc:1", kaypro_floppies, "drive1", floppy_image_device::default_floppy_formats)
298   MCFG_FLOPPY_DRIVE_ADD("fdc:0", kaypro_floppies, "drive0", kaypro_state::kaypro2x_floppy_formats)
299   MCFG_FLOPPY_DRIVE_ADD("fdc:1", kaypro_floppies, "drive1", kaypro_state::kaypro2x_floppy_formats)
292300MACHINE_CONFIG_END
293301
294302static MACHINE_CONFIG_DERIVED( omni2, kaypro4 )
trunk/src/mess/includes/kaypro.h
r243395r243396
5959   DECLARE_PALETTE_INIT(kaypro);
6060   DECLARE_MACHINE_RESET(kay_kbd);
6161   DECLARE_DRIVER_INIT(kaypro);
62   DECLARE_FLOPPY_FORMATS(kayproii_floppy_formats);
63   DECLARE_FLOPPY_FORMATS(kaypro2x_floppy_formats);
6264   UINT32 screen_update_kayproii(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
6365   UINT32 screen_update_kaypro2x(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
6466   UINT32 screen_update_omni2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
trunk/src/mess/machine/kaypro.c
r243395r243396
114114      m_floppy = m_floppy1->get_device();
115115
116116   m_fdc->set_floppy(m_floppy);
117   m_fdc->dden_w(BIT(data, 5)); // not connected
117   m_fdc->dden_w(BIT(data, 5));
118118
119119   if (m_floppy)
120120   {
r243395r243396
252252   m_system_port = 0x80;
253253   m_fdc_rq = 0;
254254   m_maincpu->reset();
255   timer_set(attotime::from_hz(1), TIMER_FLOPPY);   /* timer for rtc */
255   timer_set(attotime::from_hz(1), TIMER_FLOPPY);   /* kick-start the nmi timer */
256256}
257257
258258


Previous 199869 Revisions Next


© 1997-2024 The MAME Team