mirror of
https://github.com/davidgiven/fluxengine.git
synced 2025-10-31 11:17:01 -07:00
Factor Sector out into its own header. Sketch out Geometry.
This commit is contained in:
34
lib/sector.h
Normal file
34
lib/sector.h
Normal file
@@ -0,0 +1,34 @@
|
||||
#ifndef SECTOR_H
|
||||
#define SECTOR_H
|
||||
|
||||
/*
|
||||
* Note that sectors here used zero-based numbering throughout (to make the
|
||||
* maths easier); traditionally floppy disk use 0-based track numbering and
|
||||
* 1-based sector numbering, which makes no sense.
|
||||
*/
|
||||
class Sector
|
||||
{
|
||||
public:
|
||||
enum
|
||||
{
|
||||
OK,
|
||||
BAD_CHECKSUM
|
||||
};
|
||||
|
||||
Sector(int status, int track, int side, int sector, const std::vector<uint8_t>& data):
|
||||
status(status),
|
||||
track(track),
|
||||
side(side),
|
||||
sector(sector),
|
||||
data(data)
|
||||
{}
|
||||
|
||||
const int status;
|
||||
const int track;
|
||||
const int side;
|
||||
const int sector;
|
||||
const std::vector<uint8_t> data;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user