Previous 199869 Revisions Next

r24553 Monday 29th July, 2013 at 10:15:21 UTC by Robbbert
(MESS) kaypro : Added back the DSK format (still doesn't work!)
[src/lib]lib.mak
[src/lib/formats]kaypro_dsk.c* kaypro_dsk.h*
[src/mess/drivers]kaypro.c
[src/mess/includes]kaypro.h

trunk/src/lib/formats/kaypro_dsk.c
r0r24553
1/***************************************************************************
2
3    Copyright Olivier Galibert
4    All rights reserved.
5
6    Redistribution and use in source and binary forms, with or without
7    modification, are permitted provided that the following conditions are
8    met:
9
10        * Redistributions of source code must retain the above copyright
11          notice, this list of conditions and the following disclaimer.
12        * Redistributions in binary form must reproduce the above copyright
13          notice, this list of conditions and the following disclaimer in
14          the documentation and/or other materials provided with the
15          distribution.
16        * Neither the name 'MAME' nor the names of its contributors may be
17          used to endorse or promote products derived from this software
18          without specific prior written permission.
19
20    THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND ANY EXPRESS OR
21    IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
22    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23    DISCLAIMED. IN NO EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT,
24    INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
25    (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26    SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
28    STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
29    IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30    POSSIBILITY OF SUCH DAMAGE.
31
32****************************************************************************/
33
34/*********************************************************************
35
36    formats/kaypro_dsk.c
37
38    Kaypro disk image format
39
40    There is no inter-sector info on these disks. It is simply a
41    dump of the 512 bytes from each sector and track in order.
42    It is just like a headerless quickload.
43
44*********************************************************************/
45
46#include "emu.h"
47#include "formats/kaypro_dsk.h"
48
49kayproii_format::kayproii_format() : wd177x_format(formats)
50{
51}
52
53const char *kayproii_format::name() const
54{
55   return "kaypro";
56}
57
58const char *kayproii_format::description() const
59{
60   return "Kaypro disk image";
61}
62
63const char *kayproii_format::extensions() const
64{
65   return "dsk";
66}
67
68// gap info is a total guess
69const kayproii_format::format kayproii_format::formats[] = {
70   {   /*  191K 13cm double density single sided */
71      floppy_image::FF_525,  floppy_image::SSDD, floppy_image::MFM,
72      2000, 10, 40, 1, 512, {}, 1, {}, 32, 22, 31
73   },
74   {}
75};
76
77kaypro2x_format::kaypro2x_format() : wd177x_format(formats)
78{
79}
80
81const char *kaypro2x_format::name() const
82{
83   return "kaypro";
84}
85
86const char *kaypro2x_format::description() const
87{
88   return "Kaypro disk image";
89}
90
91const char *kaypro2x_format::extensions() const
92{
93   return "dsk";
94}
95
96// gap info is a total guess
97const kaypro2x_format::format kaypro2x_format::formats[] = {
98   {   /*  382K 13cm double density double sided */
99      floppy_image::FF_525,  floppy_image::DSDD, floppy_image::MFM,
100      2000, 10, 80, 2, 512, {}, 1, {}, 32, 22, 31
101   },
102   {}
103};
104
105const floppy_format_type FLOPPY_KAYPROII_FORMAT = &floppy_image_format_creator<kayproii_format>;
106const floppy_format_type FLOPPY_KAYPRO2X_FORMAT = &floppy_image_format_creator<kaypro2x_format>;
Property changes on: trunk/src/lib/formats/kaypro_dsk.c
Added: svn:eol-style
   + native
Added: svn:mime-type
   + text/plain
trunk/src/lib/formats/kaypro_dsk.h
r0r24553
1/*********************************************************************
2
3    formats/kaypro_dsk.h
4
5    Kaypro disk image format
6
7*********************************************************************/
8
9#ifndef KAYPRO_DSK_H_
10#define KAYPRO_DSK_H_
11
12#include "wd177x_dsk.h"
13
14class kayproii_format : public wd177x_format {
15public:
16   kayproii_format();
17
18   virtual const char *name() const;
19   virtual const char *description() const;
20   virtual const char *extensions() const;
21
22private:
23   static const format formats[];
24};
25
26class kaypro2x_format : public wd177x_format {
27public:
28   kaypro2x_format();
29
30   virtual const char *name() const;
31   virtual const char *description() const;
32   virtual const char *extensions() const;
33private:
34   static const format formats[];
35};
36
37extern const floppy_format_type FLOPPY_KAYPROII_FORMAT;
38extern const floppy_format_type FLOPPY_KAYPRO2X_FORMAT;
39
40#endif
Property changes on: trunk/src/lib/formats/kaypro_dsk.h
Added: svn:mime-type
   + text/plain
Added: svn:eol-style
   + native
trunk/src/lib/lib.mak
r24552r24553
141141   $(LIBOBJ)/formats/iq151_dsk.o   \
142142   $(LIBOBJ)/formats/imd_dsk.o     \
143143   $(LIBOBJ)/formats/ipf_dsk.o     \
144   $(LIBOBJ)/formats/kaypro_dsk.o  \
144145   $(LIBOBJ)/formats/kc_cas.o      \
145146   $(LIBOBJ)/formats/kc85_dsk.o    \
146147   $(LIBOBJ)/formats/kim1_cas.o    \
trunk/src/mess/drivers/kaypro.c
r24552r24553
3030**************************************************************************************************/
3131
3232#include "includes/kaypro.h"
33#include "formats/kaypro_dsk.h"
3334
3435
3536READ8_MEMBER( kaypro_state::kaypro2x_87_r ) { return 0x7f; }    /* to bypass unemulated HD controller */
r24552r24553
176177    Machine Driver
177178
178179************************************************************/
179#if 0
180static LEGACY_FLOPPY_OPTIONS_START(kayproii)
181   LEGACY_FLOPPY_OPTION(kayproii, "dsk", "Kaypro II disk image", basicdsk_identify_default, basicdsk_construct_default, NULL,
182      HEADS([1])
183      TRACKS([40])
184      SECTORS([10])
185      SECTOR_LENGTH([512])
186      FIRST_SECTOR_ID([0]))
187LEGACY_FLOPPY_OPTIONS_END
188180
189static LEGACY_FLOPPY_OPTIONS_START(kaypro2x)
190   LEGACY_FLOPPY_OPTION(kaypro2x, "dsk", "Kaypro 2x disk image", basicdsk_identify_default, basicdsk_construct_default, NULL,
191      HEADS([2])
192      TRACKS([80])
193      SECTORS([10])
194      SECTOR_LENGTH([512])
195      FIRST_SECTOR_ID([0]))
196LEGACY_FLOPPY_OPTIONS_END
197
198static const floppy_interface kayproii_floppy_interface =
199{
200   DEVCB_NULL,
201   DEVCB_NULL,
202   DEVCB_NULL,
203   DEVCB_NULL,
204   DEVCB_NULL,
205   FLOPPY_STANDARD_5_25_DSHD,
206   LEGACY_FLOPPY_OPTIONS_NAME(kayproii),
207   "floppy_5_25",
208   NULL
209};
210
211static const floppy_interface kaypro2x_floppy_interface =
212{
213   DEVCB_LINE(wd17xx_idx_w),
214   DEVCB_NULL,
215   DEVCB_NULL,
216   DEVCB_NULL,
217   DEVCB_NULL,
218   FLOPPY_STANDARD_5_25_DSHD,
219   LEGACY_FLOPPY_OPTIONS_NAME(kaypro2x),
220   "floppy_5_25",
221   NULL
222};
223
224181FLOPPY_FORMATS_MEMBER( kaypro_state::kayproii_floppy_formats )
225182   FLOPPY_KAYPROII_FORMAT
226183FLOPPY_FORMATS_END
r24552r24553
228185FLOPPY_FORMATS_MEMBER( kaypro_state::kaypro2x_floppy_formats )
229186   FLOPPY_KAYPRO2X_FORMAT
230187FLOPPY_FORMATS_END
231#endif
232188
233189static SLOT_INTERFACE_START( kaypro_floppies )
234190   SLOT_INTERFACE( "525dd", FLOPPY_525_DD )
r24552r24553
272228   MCFG_Z80SIO_ADD( "z80sio", 4800, kaypro_sio_intf )  /* start at 300 baud */
273229
274230   MCFG_FD1793x_ADD("fdc", XTAL_20MHz / 20)
275   MCFG_FLOPPY_DRIVE_ADD("fdc:0", kaypro_floppies, "525dd", floppy_image_device::default_floppy_formats)
276   MCFG_FLOPPY_DRIVE_ADD("fdc:1", kaypro_floppies, "525dd", floppy_image_device::default_floppy_formats)
231   MCFG_FLOPPY_DRIVE_ADD("fdc:0", kaypro_floppies, "525dd", kaypro_state::kayproii_floppy_formats)
232   MCFG_FLOPPY_DRIVE_ADD("fdc:1", kaypro_floppies, "525dd", kaypro_state::kayproii_floppy_formats)
277233   MCFG_SOFTWARE_LIST_ADD("flop_list","kayproii")
278234MACHINE_CONFIG_END
279235
r24552r24553
317273   MCFG_Z80SIO_ADD( "z80sio", 4800, kaypro_sio_intf )
318274   MCFG_Z80SIO_ADD( "z80sio_2x", 4800, kaypro_sio_intf )   /* extra sio for modem and printer */
319275   MCFG_FD1793x_ADD("fdc", XTAL_16MHz / 16)
320   MCFG_FLOPPY_DRIVE_ADD("fdc:0", kaypro_floppies, "525dd", floppy_image_device::default_floppy_formats)
321   MCFG_FLOPPY_DRIVE_ADD("fdc:1", kaypro_floppies, "525dd", floppy_image_device::default_floppy_formats)
276   MCFG_FLOPPY_DRIVE_ADD("fdc:0", kaypro_floppies, "525dd", kaypro_state::kaypro2x_floppy_formats)
277   MCFG_FLOPPY_DRIVE_ADD("fdc:1", kaypro_floppies, "525dd", kaypro_state::kaypro2x_floppy_formats)
322278MACHINE_CONFIG_END
323279
324280static MACHINE_CONFIG_DERIVED( omni2, kaypro4 )
trunk/src/mess/includes/kaypro.h
r24552r24553
5959   DECLARE_PALETTE_INIT(kaypro);
6060   DECLARE_MACHINE_RESET(kay_kbd);
6161   DECLARE_DRIVER_INIT(kaypro);
62   DECLARE_FLOPPY_FORMATS(floppy_formats);
62   DECLARE_FLOPPY_FORMATS(kayproii_floppy_formats);
63   DECLARE_FLOPPY_FORMATS(kaypro2x_floppy_formats);
6364   UINT32 screen_update_kayproii(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
6465   UINT32 screen_update_kaypro2x(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
6566   UINT32 screen_update_omni2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);

Previous 199869 Revisions Next


© 1997-2024 The MAME Team