mirror of
https://github.com/holub/mame
synced 2025-04-21 16:01:56 +03:00
wd177x_dsk: add support to mark tracks as deleted data
This commit is contained in:
parent
22ee342634
commit
d68270a157
@ -204,6 +204,12 @@ bool wd177x_format::load(io_generic *io, UINT32 form_factor, floppy_image *image
|
||||
|
||||
for(int track=0; track < f.track_count; track++)
|
||||
for(int head=0; head < f.head_count; head++) {
|
||||
|
||||
if (f.encoding == floppy_image::FM)
|
||||
desc[14].p1 = get_track_dam_fm(f, head, track);
|
||||
else
|
||||
desc[16].p1 = get_track_dam_mfm(f, head, track);
|
||||
|
||||
io_generic_read(io, sectdata, get_image_offset(f, head, track), track_size);
|
||||
generate_track(desc, track, head, sectors, f.sector_count, total_size, image);
|
||||
}
|
||||
@ -345,6 +351,18 @@ int wd177x_format::get_image_offset(const format &f, int head, int track)
|
||||
return (track * f.head_count + head) * compute_track_size(f);
|
||||
}
|
||||
|
||||
int wd177x_format::get_track_dam_fm(const format &f, int head, int track)
|
||||
{
|
||||
// everything marked as data by default
|
||||
return FM_DAM;
|
||||
}
|
||||
|
||||
int wd177x_format::get_track_dam_mfm(const format &f, int head, int track)
|
||||
{
|
||||
// everything marked as data by default
|
||||
return MFM_DAM;
|
||||
}
|
||||
|
||||
void wd177x_format::check_compatibility(floppy_image *image, std::vector<int> &candidates)
|
||||
{
|
||||
UINT8 bitstream[500000/8];
|
||||
|
@ -43,11 +43,16 @@ public:
|
||||
virtual bool supports_save() const;
|
||||
|
||||
protected:
|
||||
enum { FM_DAM = 0xf56f, FM_DDAM = 0xf56a, MFM_DAM = 0xfb, MFM_DDAM = 0xf8 };
|
||||
|
||||
const format *formats;
|
||||
|
||||
virtual floppy_image_format_t::desc_e* get_desc_fm(const format &f, int ¤t_size, int &end_gap_index);
|
||||
virtual floppy_image_format_t::desc_e* get_desc_mfm(const format &f, int ¤t_size, int &end_gap_index);
|
||||
virtual int find_size(io_generic *io, UINT32 form_factor);
|
||||
virtual int get_image_offset(const format &f, int head, int track);
|
||||
virtual int get_track_dam_fm(const format &f, int head, int track);
|
||||
virtual int get_track_dam_mfm(const format &f, int head, int track);
|
||||
|
||||
int compute_track_size(const format &f) const;
|
||||
void build_sector_description(const format &d, UINT8 *sectdata, desc_s *sectors) const;
|
||||
|
Loading…
Reference in New Issue
Block a user