Previous 15994 Revisions Next

r11917 Monday 13th June, 2011 at 09:18:43 UTC by Miodrag Milanović
Moved some formats to lib where they belong (no whatsnew)
[src/lib]lib.mak
[src/lib/formats]atari_dsk.c* atari_dsk.h* hect_dsk.c* hect_dsk.h* vtech1_dsk.c* vtech1_dsk.h*
[src/mess/drivers]vtech1.c
[src/mess/machine]atarifdc.c hecdisk2.c

src/lib/formats/vtech1_dsk.c
r0r11917
1/*********************************************************************
2
3    formats/vtech1_dsk.c
4
5    VTech1 disk images
6
7*********************************************************************/
8
9#include "formats/vtech1_dsk.h"
10
11static FLOPPY_IDENTIFY( vtech1_dsk_identify )
12{
13   *vote = 100;
14   return FLOPPY_ERROR_SUCCESS;
15}
16
17
18static FLOPPY_CONSTRUCT( vtech1_dsk_construct )
19{
20   return FLOPPY_ERROR_SUCCESS;
21}
22
23FLOPPY_OPTIONS_START( vtech1_only )
24   FLOPPY_OPTION(
25      vtech1_dsk,
26      "dsk",
27      "Laser floppy disk image",
28      vtech1_dsk_identify,
29      vtech1_dsk_construct,
30      NULL,
31      NULL
32   )
33FLOPPY_OPTIONS_END0
No newline at end of file
src/lib/formats/vtech1_dsk.h
r0r11917
1/*********************************************************************
2
3    formats/vtech1_dsk.h
4
5    VTech1 disk images
6
7*********************************************************************/
8
9#ifndef VTECH1_DSK_H
10#define VTECH1_DSK_H
11
12#include "flopimg.h"
13
14FLOPPY_OPTIONS_EXTERN(vtech1_only);
15
16#endif /* VTECH1_DSK_H */
src/lib/formats/hect_dsk.c
r0r11917
1/*********************************************************************
2
3    formats/hect_dsk.c
4
5    Hector disk images
6
7*********************************************************************/
8
9#include "formats/hect_dsk.h"
10#include "formats/basicdsk.h"
11
12/*****************************************************************************/
13/******  Management of the floppy images 200Ko and 800Ko *********************/
14/*****************************************************************************/
15/* For the 200Ko disk :
16        512 bytes per sectors,
17        10  sector per track,
18        From sector =0 to sector 9,
19        40  tracks,
20        1 Head
21    This format can be extract from a real disc with anadisk (*.IMG format rename in *.HE2).
22*/
23static FLOPPY_IDENTIFY(hector_disc2_dsk200_identify)
24{
25   *vote = (floppy_image_size(floppy) == (1*40*10*512)) ? 100 : 0;
26   return FLOPPY_ERROR_SUCCESS;
27}
28
29static FLOPPY_CONSTRUCT(hector_disc2_dsk200_construct)
30{
31   struct basicdsk_geometry geometry;
32   memset(&geometry, 0, sizeof(geometry));
33   geometry.heads = 1;
34   geometry.first_sector_id = 0;
35   geometry.sector_length = 512;
36   geometry.tracks = 40;
37   geometry.sectors = 10;
38   return basicdsk_construct(floppy, &geometry);
39}
40/* For the 720Ko disk :
41        512 bytes per sectors,
42        9  sector per track,
43        From sector =0 to sector 8,
44        80  tracks,
45        2 Head
46    This format can be extract from a real disc with anadisk (*.IMG format rename in *.HE7).
47*/
48static FLOPPY_IDENTIFY(hector_disc2_dsk720_identify)
49{
50   *vote = (floppy_image_size(floppy) == (2*80*9*512)) ? 100 : 0;
51   return FLOPPY_ERROR_SUCCESS;
52}
53
54static FLOPPY_CONSTRUCT(hector_disc2_dsk720_construct)
55{
56   struct basicdsk_geometry geometry;
57   memset(&geometry, 0, sizeof(geometry));
58   geometry.heads = 2;
59   geometry.first_sector_id = 0;
60   geometry.sector_length = 512;
61   geometry.tracks = 80;
62   geometry.sectors = 9;
63   return basicdsk_construct(floppy, &geometry);
64
65}/* For the 800Ko disk :
66        512 bytes per sectors,
67        10  sector per track,
68        From sector =0 to sector 9,
69        80  tracks
70        2 Heads
71    This format can be extract from a real disk with anadisk (*.IMG format rename in *.HE2).
72*/
73
74static FLOPPY_IDENTIFY(hector_disc2_dsk800_identify)
75{
76   *vote = (floppy_image_size(floppy) == (2*80*10*512)) ? 100 : 0;
77   return FLOPPY_ERROR_SUCCESS;
78}
79
80static FLOPPY_CONSTRUCT(hector_disc2_dsk800_construct)
81{
82   struct basicdsk_geometry geometry;
83   memset(&geometry, 0, sizeof(geometry));
84   geometry.heads = 2;
85   geometry.first_sector_id = 0;
86   geometry.sector_length = 512;
87   geometry.tracks = 80;
88   geometry.sectors = 10;
89   return basicdsk_construct(floppy, &geometry);
90}
91
92FLOPPY_OPTIONS_START( hector_disc2 )
93   FLOPPY_OPTION( hector_dsk, "HE2", "hector disc2 floppy disk image 200K", hector_disc2_dsk200_identify, hector_disc2_dsk200_construct, NULL, NULL)
94   FLOPPY_OPTION( hector_dsk, "HE7", "hector disc2 floppy disk image 720K", hector_disc2_dsk720_identify, hector_disc2_dsk720_construct, NULL, NULL)
95   FLOPPY_OPTION( hector_dsk, "HE8", "hector disc2 floppy disk image 800K", hector_disc2_dsk800_identify, hector_disc2_dsk800_construct, NULL, NULL)
96FLOPPY_OPTIONS_END
No newline at end of file
src/lib/formats/hect_dsk.h
r0r11917
1/*********************************************************************
2
3    formats/hect_dsk.h
4
5    Hector disk images
6
7*********************************************************************/
8
9#ifndef HECT_DSK_H
10#define HECT_DSK_H
11
12#include "flopimg.h"
13
14
15/**************************************************************************/
16
17FLOPPY_OPTIONS_EXTERN(hector_disc2);
18
19#endif /* HECT_DSK_H */
src/lib/formats/atari_dsk.c
r0r11917
1/*********************************************************************
2
3    formats/atari_dsk.c
4
5    Atari disk images
6
7*********************************************************************/
8
9#include "formats/atari_dsk.h"
10
11static FLOPPY_IDENTIFY( atari_dsk_identify )
12{
13   *vote = 100;
14   return FLOPPY_ERROR_SUCCESS;
15}
16
17
18static FLOPPY_CONSTRUCT( atari_dsk_construct )
19{
20   return FLOPPY_ERROR_SUCCESS;
21}
22
23FLOPPY_OPTIONS_START( atari_only )
24   FLOPPY_OPTION(
25      atari_dsk,
26      "atr,dsk,xfd",
27      "Atari floppy disk image",
28      atari_dsk_identify,
29      atari_dsk_construct,
30      NULL,
31      NULL
32   )
33FLOPPY_OPTIONS_END0
src/lib/formats/atari_dsk.h
r0r11917
1/*********************************************************************
2
3    formats/atari_dsk.h
4
5    Atari disk images
6
7*********************************************************************/
8
9#ifndef ATARI_DSK_H
10#define ATARI_DSK_H
11
12#include "flopimg.h"
13
14FLOPPY_OPTIONS_EXTERN(atari_only);
15
16#endif /* ATARI_DSK_H */
src/lib/lib.mak
r11916r11917
9191   $(LIBOBJ)/formats/apf_apt.o      \
9292   $(LIBOBJ)/formats/apridisk.o   \
9393   $(LIBOBJ)/formats/ap_dsk35.o   \
94   $(LIBOBJ)/formats/atari_dsk.o   \
9495   $(LIBOBJ)/formats/atarist_dsk.o   \
9596   $(LIBOBJ)/formats/atom_tap.o   \
9697   $(LIBOBJ)/formats/cbm_tap.o      \
r11916r11917
112113   $(LIBOBJ)/formats/fmsx_cas.o   \
113114   $(LIBOBJ)/formats/g64_dsk.o      \
114115   $(LIBOBJ)/formats/gtp_cas.o      \
116   $(LIBOBJ)/formats/hect_dsk.o   \
115117   $(LIBOBJ)/formats/hect_tap.o   \
116118   $(LIBOBJ)/formats/imd_dsk.o      \
117119   $(LIBOBJ)/formats/kim1_cas.o   \
r11916r11917
144146   $(LIBOBJ)/formats/vg5k_cas.o   \
145147   $(LIBOBJ)/formats/vt_cas.o      \
146148   $(LIBOBJ)/formats/vt_dsk.o      \
149   $(LIBOBJ)/formats/vtech1_dsk.o   \
147150   $(LIBOBJ)/formats/wavfile.o      \
148151   $(LIBOBJ)/formats/x1_tap.o      \
149152   $(LIBOBJ)/formats/z80ne_dsk.o   \
src/mess/machine/hecdisk2.c
r11916r11917
2222#include "sound/wave.h"         /* for K7 sound*/
2323#include "sound/discrete.h"      /* for 1 Bit sound*/
2424#include "machine/upd765.h"      /* for floppy disc controller */
25#include "formats/basicdsk.h"
25#include "formats/hect_dsk.h"
2626#include "cpu/z80/z80.h"
2727
2828#include "includes/hec2hrp.h"
r11916r11917
4848        * At this point the Z80 can read the RESULT in port 61h
4949*/
5050
51/*****************************************************************************/
52/******  Management of the floppy images 200Ko and 800Ko *********************/
53/*****************************************************************************/
54/* For the 200Ko disk :
55        512 bytes per sectors,
56        10  sector per track,
57        From sector =0 to sector 9,
58        40  tracks,
59        1 Head
60    This format can be extract from a real disc with anadisk (*.IMG format rename in *.HE2).
61*/
62static FLOPPY_IDENTIFY(hector_disc2_dsk200_identify)
63{
64   *vote = (floppy_image_size(floppy) == (1*40*10*512)) ? 100 : 0;
65   return FLOPPY_ERROR_SUCCESS;
66}
67
68static FLOPPY_CONSTRUCT(hector_disc2_dsk200_construct)
69{
70   struct basicdsk_geometry geometry;
71   memset(&geometry, 0, sizeof(geometry));
72   geometry.heads = 1;
73   geometry.first_sector_id = 0;
74   geometry.sector_length = 512;
75   geometry.tracks = 40;
76   geometry.sectors = 10;
77   return basicdsk_construct(floppy, &geometry);
78}
79/* For the 720Ko disk :
80        512 bytes per sectors,
81        9  sector per track,
82        From sector =0 to sector 8,
83        80  tracks,
84        2 Head
85    This format can be extract from a real disc with anadisk (*.IMG format rename in *.HE7).
86*/
87static FLOPPY_IDENTIFY(hector_disc2_dsk720_identify)
88{
89   *vote = (floppy_image_size(floppy) == (2*80*9*512)) ? 100 : 0;
90   return FLOPPY_ERROR_SUCCESS;
91}
92
93static FLOPPY_CONSTRUCT(hector_disc2_dsk720_construct)
94{
95   struct basicdsk_geometry geometry;
96   memset(&geometry, 0, sizeof(geometry));
97   geometry.heads = 2;
98   geometry.first_sector_id = 0;
99   geometry.sector_length = 512;
100   geometry.tracks = 80;
101   geometry.sectors = 9;
102   return basicdsk_construct(floppy, &geometry);
103
104}/* For the 800Ko disk :
105        512 bytes per sectors,
106        10  sector per track,
107        From sector =0 to sector 9,
108        80  tracks
109        2 Heads
110    This format can be extract from a real disk with anadisk (*.IMG format rename in *.HE2).
111*/
112
113static FLOPPY_IDENTIFY(hector_disc2_dsk800_identify)
114{
115   *vote = (floppy_image_size(floppy) == (2*80*10*512)) ? 100 : 0;
116   return FLOPPY_ERROR_SUCCESS;
117}
118
119static FLOPPY_CONSTRUCT(hector_disc2_dsk800_construct)
120{
121   struct basicdsk_geometry geometry;
122   memset(&geometry, 0, sizeof(geometry));
123   geometry.heads = 2;
124   geometry.first_sector_id = 0;
125   geometry.sector_length = 512;
126   geometry.tracks = 80;
127   geometry.sectors = 10;
128   return basicdsk_construct(floppy, &geometry);
129}
130
131FLOPPY_OPTIONS_START( hector_disc2 )
132   FLOPPY_OPTION( hector_dsk, "HE2", "hector disc2 floppy disk image 200K", hector_disc2_dsk200_identify, hector_disc2_dsk200_construct, NULL, NULL)
133   FLOPPY_OPTION( hector_dsk, "HE7", "hector disc2 floppy disk image 720K", hector_disc2_dsk720_identify, hector_disc2_dsk720_construct, NULL, NULL)
134   FLOPPY_OPTION( hector_dsk, "HE8", "hector disc2 floppy disk image 800K", hector_disc2_dsk800_identify, hector_disc2_dsk800_construct, NULL, NULL)
135FLOPPY_OPTIONS_END
136
13751// Define the hardware of the disk
13852 const floppy_config hector_disc2_floppy_config =
13953{
src/mess/machine/atarifdc.c
r11916r11917
1717#include "sound/pokey.h"
1818#include "machine/6821pia.h"
1919#include "imagedev/flopdrv.h"
20#include "formats/atari_dsk.h"
2021#include "image.h"
2122
2223#define VERBOSE_SERIAL   0
r11916r11917
775776   }
776777}
777778
778static FLOPPY_IDENTIFY( atari_dsk_identify )
779{
780   *vote = 100;
781   return FLOPPY_ERROR_SUCCESS;
782}
783
784
785static FLOPPY_CONSTRUCT( atari_dsk_construct )
786{
787   return FLOPPY_ERROR_SUCCESS;
788}
789
790FLOPPY_OPTIONS_START( atari_only )
791   FLOPPY_OPTION(
792      atari_dsk,
793      "atr,dsk,xfd",
794      "Atari floppy disk image",
795      atari_dsk_identify,
796      atari_dsk_construct,
797      NULL,
798      NULL
799   )
800FLOPPY_OPTIONS_END0
801
802779static const floppy_config atari_floppy_config =
803780{
804781   DEVCB_NULL,
src/mess/drivers/vtech1.c
r11916r11917
124124#include "imagedev/cassette.h"
125125#include "machine/ram.h"
126126#include "formats/vt_cas.h"
127#include "formats/vtech1_dsk.h"
127128
128
129129/***************************************************************************
130130    CONSTANTS & MACROS
131131***************************************************************************/
r11916r11917
448448   }
449449}
450450
451static FLOPPY_IDENTIFY( vtech1_dsk_identify )
452{
453   *vote = 100;
454   return FLOPPY_ERROR_SUCCESS;
455}
456
457
458static FLOPPY_CONSTRUCT( vtech1_dsk_construct )
459{
460   return FLOPPY_ERROR_SUCCESS;
461}
462
463FLOPPY_OPTIONS_START( vtech1_only )
464   FLOPPY_OPTION(
465      vtech1_dsk,
466      "dsk",
467      "Laser floppy disk image",
468      vtech1_dsk_identify,
469      vtech1_dsk_construct,
470      NULL,
471      NULL
472   )
473FLOPPY_OPTIONS_END0
474
475451static const floppy_config vtech1_floppy_config =
476452{
477453   DEVCB_NULL,

Previous 15994 Revisions Next


© 1998-2018 The MESS Team