mirror of
				https://github.com/davidgiven/fluxengine.git
				synced 2025-10-24 11:11:02 -07:00 
			
		
		
		
	Add some helper methods to make decoders easier. Port IBM to the new new
architecture.
This commit is contained in:
		| @@ -4,6 +4,7 @@ | ||||
| #include "bytes.h" | ||||
| #include "sector.h" | ||||
| #include "record.h" | ||||
| #include "fluxmapreader.h" | ||||
|  | ||||
| class Sector; | ||||
| class Fluxmap; | ||||
| @@ -48,6 +49,15 @@ public: | ||||
|     void decodeToSectors(Track& track) override; | ||||
|     void pushRecord(const Fluxmap::Position& start, const Fluxmap::Position& end); | ||||
|  | ||||
|     std::vector<bool> readRawBits(unsigned count) | ||||
|     { return _fmr->readRawBits(count, _sector->clock); } | ||||
|  | ||||
|     Fluxmap::Position tell() | ||||
|     { return _fmr->tell(); }  | ||||
|  | ||||
|     void seek(const Fluxmap::Position& pos) | ||||
|     { return _fmr->seek(pos); }  | ||||
|  | ||||
| protected: | ||||
|     virtual RecordType advanceToNextRecord() = 0; | ||||
|     virtual void decodeSectorRecord() = 0; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user