~ubuntu-branches/ubuntu/raring/mame/raring-proposed

« back to all changes in this revision

Viewing changes to src/lib/formats/cqm_dsk.c

  • Committer: Package Import Robot
  • Author(s): Jordi Mallach, Jordi Mallach, Emmanuel Kasper
  • Date: 2011-12-19 22:56:27 UTC
  • mfrom: (0.1.2)
  • Revision ID: package-import@ubuntu.com-20111219225627-ub5oga1oys4ogqzm
Tags: 0.144-1
[ Jordi Mallach ]
* Fix syntax errors in DEP5 copyright file (lintian).
* Use a versioned copyright Format specification field.
* Update Vcs-* URLs.
* Move transitional packages to the new metapackages section, and make
  them priority extra.
* Remove references to GNU/Linux and MESS sources from copyright.
* Add build variables for s390x.
* Use .xz tarballs as it cuts 4MB for the upstream sources.
* Add nplayers.ini as a patch. Update copyright file to add CC-BY-SA-3.0.

[ Emmanuel Kasper ]
* New upstream release. Closes: #651538.
* Add Free Desktop compliant png icons of various sizes taken from
  the hydroxygen iconset
* Mess is now built from a new source package, to avoid possible source
  incompatibilities between mame and the mess overlay.
* Mame-tools are not built from the mame source package anymore, but
  from the mess source package

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
};
27
27
 
28
28
 
29
 
static struct cqmdsk_tag *get_tag(floppy_image *floppy)
 
29
static struct cqmdsk_tag *get_tag(floppy_image_legacy *floppy)
30
30
{
31
31
        struct cqmdsk_tag *tag;
32
32
        tag = (cqmdsk_tag *)floppy_tag(floppy );
48
48
        return FLOPPY_ERROR_SUCCESS;
49
49
}
50
50
 
51
 
static int cqm_get_heads_per_disk(floppy_image *floppy)
 
51
static int cqm_get_heads_per_disk(floppy_image_legacy *floppy)
52
52
{
53
53
        return get_tag(floppy)->heads;
54
54
}
55
55
 
56
 
static int cqm_get_tracks_per_disk(floppy_image *floppy)
 
56
static int cqm_get_tracks_per_disk(floppy_image_legacy *floppy)
57
57
{
58
58
        return get_tag(floppy)->tracks;
59
59
}
60
60
 
61
 
static UINT64 cqm_get_track_offset(floppy_image *floppy, int head, int track)
 
61
static UINT64 cqm_get_track_offset(floppy_image_legacy *floppy, int head, int track)
62
62
{
63
63
        return get_tag(floppy)->track_offsets[(track<<1) + head];
64
64
}
65
65
 
66
 
static floperr_t get_offset(floppy_image *floppy, int head, int track, int sector, int sector_is_index, UINT64 *offset)
 
66
static floperr_t get_offset(floppy_image_legacy *floppy, int head, int track, int sector, int sector_is_index, UINT64 *offset)
67
67
{
68
68
        UINT64 pos = 0;
69
69
        UINT8 data;
98
98
 
99
99
 
100
100
 
101
 
static floperr_t internal_cqm_read_sector(floppy_image *floppy, int head, int track, int sector, int sector_is_index, void *buffer, size_t buflen)
 
101
static floperr_t internal_cqm_read_sector(floppy_image_legacy *floppy, int head, int track, int sector, int sector_is_index, void *buffer, size_t buflen)
102
102
{
103
103
        UINT64 offset;
104
104
        floperr_t err;
112
112
}
113
113
 
114
114
 
115
 
static floperr_t cqm_read_sector(floppy_image *floppy, int head, int track, int sector, void *buffer, size_t buflen)
 
115
static floperr_t cqm_read_sector(floppy_image_legacy *floppy, int head, int track, int sector, void *buffer, size_t buflen)
116
116
{
117
117
        return internal_cqm_read_sector(floppy, head, track, sector, FALSE, buffer, buflen);
118
118
}
119
119
 
120
 
static floperr_t cqm_read_indexed_sector(floppy_image *floppy, int head, int track, int sector, void *buffer, size_t buflen)
 
120
static floperr_t cqm_read_indexed_sector(floppy_image_legacy *floppy, int head, int track, int sector, void *buffer, size_t buflen)
121
121
{
122
122
        return internal_cqm_read_sector(floppy, head, track, sector, TRUE, buffer, buflen);
123
123
}
124
124
 
125
 
static floperr_t cqm_get_sector_length(floppy_image *floppy, int head, int track, int sector, UINT32 *sector_length)
 
125
static floperr_t cqm_get_sector_length(floppy_image_legacy *floppy, int head, int track, int sector, UINT32 *sector_length)
126
126
{
127
127
        floperr_t err;
128
128
        err = get_offset(floppy, head, track, sector, FALSE, NULL);
135
135
        return FLOPPY_ERROR_SUCCESS;
136
136
}
137
137
 
138
 
static floperr_t cqm_get_indexed_sector_info(floppy_image *floppy, int head, int track, int sector_index, int *cylinder, int *side, int *sector, UINT32 *sector_length, unsigned long *flags)
 
138
static floperr_t cqm_get_indexed_sector_info(floppy_image_legacy *floppy, int head, int track, int sector_index, int *cylinder, int *side, int *sector, UINT32 *sector_length, unsigned long *flags)
139
139
{
140
140
        if (sector_index >= get_tag(floppy)->sector_per_track) return FLOPPY_ERROR_SEEKERROR;
141
141