summaryrefslogtreecommitdiffstats
path: root/src/lib/formats/hti_tape.h
diff options
context:
space:
mode:
author Vas Crabb <cuavas@users.noreply.github.com>2021-08-22 09:06:15 +1000
committer GitHub <noreply@github.com>2021-08-22 09:06:15 +1000
commite8bbea1fc6e94e14768509d322f6c624403ffb36 (patch)
tree74dd1606a900d83de8aecff17a6737af4113308d /src/lib/formats/hti_tape.h
parente319bde5fc3696d7f48f62b15b6366c4377fe5d1 (diff)
formats, osd, util: Started refactoring file I/O stuff. (#8456)
Added more modern generic I/O interfaces with implementation backed by stdio, osd_file and core_file, replacing io_generic. Also replaced core_file's build-in zlib compression with a filter. unzip.cpp, un7z.cpp: Added option to supply abstract I/O interface rather than filename. Converted osd_file, core_file, archive_file, chd_file and device_image_interface to use std::error_condition rather than their own error enums. Allow mounting TI-99 RPK from inside archives.
Diffstat (limited to 'src/lib/formats/hti_tape.h')
-rw-r--r--src/lib/formats/hti_tape.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/lib/formats/hti_tape.h b/src/lib/formats/hti_tape.h
index 7725b87fa2a..373c971d174 100644
--- a/src/lib/formats/hti_tape.h
+++ b/src/lib/formats/hti_tape.h
@@ -13,10 +13,12 @@
#pragma once
-#include "ioprocs.h"
+#include "utilfwd.h"
+#include <cstdint>
#include <map>
+
class hti_format_t
{
public:
@@ -71,8 +73,8 @@ public:
// Return number of tracks
unsigned no_of_tracks() const { return m_img_format == HTI_MANCHESTER_MOD ? 1 : 2; }
- bool load_tape(io_generic *io);
- void save_tape(io_generic *io);
+ bool load_tape(util::random_read &io);
+ void save_tape(util::random_read_write &io);
void clear_tape();
// Return physical length of a bit on tape
@@ -127,8 +129,8 @@ private:
// Image format
image_format_t m_img_format;
- bool load_track(io_generic *io , uint64_t& offset , tape_track_t& track , bool old_format);
- static void dump_sequence(io_generic *io , uint64_t& offset , tape_track_t::const_iterator it_start , unsigned n_words);
+ bool load_track(util::random_read &io , tape_track_t& track , bool old_format);
+ static void dump_sequence(util::random_read_write &io , tape_track_t::const_iterator it_start , unsigned n_words);
tape_pos_t word_end_pos(const track_iterator_t& it) const;
void adjust_it(tape_track_t& track , track_iterator_t& it , tape_pos_t pos) const;