summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/formats/hpi_dsk.h
diff options
context:
space:
mode:
author fulivi <fulivi@users.noreply.github.com>2019-01-12 18:57:39 +0100
committer fulivi <fulivi@users.noreply.github.com>2019-01-12 18:57:39 +0100
commitc6dff30d7a815d318029a30baf0f85a538dc883e (patch)
treedb6b8093ca8d0c77efbffc177ff6f7a4db8b471e /src/lib/formats/hpi_dsk.h
parent933ab296274761c8ba422fc23952aad7b7f2e0dd (diff)
hp9825: added HLE of HP9885 floppy drive. Extended HPI format to
handle single-sided disks.
Diffstat (limited to 'src/lib/formats/hpi_dsk.h')
-rw-r--r--src/lib/formats/hpi_dsk.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/formats/hpi_dsk.h b/src/lib/formats/hpi_dsk.h
index 8457db1ea24..287f37fd302 100644
--- a/src/lib/formats/hpi_dsk.h
+++ b/src/lib/formats/hpi_dsk.h
@@ -36,6 +36,7 @@ public:
private:
typedef std::array<uint8_t , HPI_SECTORS> sector_list_t;
+ static bool geometry_from_size(uint64_t image_size , unsigned& heads , unsigned& tracks);
static void interleaved_sectors(unsigned il_factor , sector_list_t& sector_list);
void write_mmfm_bit(std::vector<uint32_t> &buffer , bool data_bit , bool clock_bit);
void write_mmfm_byte(std::vector<uint32_t> &buffer , uint8_t data , uint8_t clock = 0);
@@ -43,7 +44,7 @@ private:
void write_crc(std::vector<uint32_t> &buffer , uint16_t crc);
void write_sector(std::vector<uint32_t> &buffer , uint8_t track_no , uint8_t sect_head_no , const uint8_t *sect_data);
void fill_with_gap3(std::vector<uint32_t> &buffer);
- static unsigned chs_to_lba(unsigned cylinder , unsigned head , unsigned sector);
+ static unsigned chs_to_lba(unsigned cylinder , unsigned head , unsigned sector , unsigned heads);
std::vector<uint8_t> get_next_id_n_block(const uint8_t *bitstream , int bitstream_size , int& pos , int& start_pos);
bool get_next_sector(const uint8_t *bitstream , int bitstream_size , int& pos , unsigned& track , unsigned& head , unsigned& sector , uint8_t *sector_data);