summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/formats/mfm_hd.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/formats/mfm_hd.h')
-rw-r--r--src/lib/formats/mfm_hd.h19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/lib/formats/mfm_hd.h b/src/lib/formats/mfm_hd.h
index dfa4d3ffba7..4e583f46db8 100644
--- a/src/lib/formats/mfm_hd.h
+++ b/src/lib/formats/mfm_hd.h
@@ -80,7 +80,7 @@ public:
int headerlen;
int ecctype; // -1 is CRC
- bool sane_rec()
+ bool sane_rec() const
{
return ((interleave > 0 && interleave < 32) && (cylskew >= 0 && cylskew < 32) && (headskew >= 0 && headskew < 32)
&& (write_precomp_cylinder >= -1 && write_precomp_cylinder < 100000)
@@ -93,7 +93,7 @@ public:
write_precomp_cylinder = reduced_wcurr_cylinder = -1;
}
- bool sane_gap()
+ bool sane_gap() const
{
return ((gap1 >= 1 && gap1 < 1000) && (gap2 >= 1 && gap2 < 20) && (gap3 >= 1 && gap3 < 1000)
&& (sync >= 10 && sync < 20)
@@ -105,7 +105,7 @@ public:
gap1 = gap2 = gap3 = sync = headerlen = ecctype = 0;
}
- bool equals_rec(mfmhd_layout_params* other)
+ bool equals_rec(mfmhd_layout_params* other) const
{
return ((interleave == other->interleave) &&
(cylskew == other->cylskew) &&
@@ -114,7 +114,7 @@ public:
(reduced_wcurr_cylinder == other->reduced_wcurr_cylinder));
}
- bool equals_gap(mfmhd_layout_params* other)
+ bool equals_gap(mfmhd_layout_params* other) const
{
return ((gap1 == other->gap1) &&
(gap2 == other->gap2) &&
@@ -146,7 +146,8 @@ enum mfmhd_param_t
class mfmhd_image_format_t
{
public:
- mfmhd_image_format_t() { m_devtag = std::string("mfmhd_image_format_t"); };
+ mfmhd_image_format_t(): m_lastbit(false), m_current_crc(0)
+ { m_devtag = std::string("mfmhd_image_format_t"); };
virtual ~mfmhd_image_format_t() {};
// Load the image.
@@ -195,12 +196,12 @@ class mfmhd_generic_format : public mfmhd_image_format_t
{
public:
mfmhd_generic_format() { m_devtag = std::string("mfmhd_generic_format"); };
- chd_error load(chd_file* chdfile, UINT16* trackimage, int tracksize, int cylinder, int head);
- chd_error save(chd_file* chdfile, UINT16* trackimage, int tracksize, int cylinder, int head);
+ chd_error load(chd_file* chdfile, UINT16* trackimage, int tracksize, int cylinder, int head) override;
+ chd_error save(chd_file* chdfile, UINT16* trackimage, int tracksize, int cylinder, int head) override;
// Yes, we want to save all parameters
- virtual bool save_param(mfmhd_param_t type) { return true; }
- virtual int get_default(mfmhd_param_t type);
+ virtual bool save_param(mfmhd_param_t type) override { return true; }
+ virtual int get_default(mfmhd_param_t type) override;
protected:
virtual UINT8 cylinder_to_ident(int cylinder);