Massive overhaul of how the physical/logical layout mapping is done, to make it

more consistent and bidirectional everywhere and just generally better.
Hopefully this fixes that pesky 1581 problem.
This commit is contained in:
David Given
2022-09-15 20:23:33 +02:00
parent 4bf5fd49d6
commit 9a8fc80220
31 changed files with 856 additions and 762 deletions

View File

@@ -1,13 +1,19 @@
#include "globals.h"
#include "flux.h"
#include "sector.h"
#include "layout.h"
#include "fmt/format.h"
Sector::Sector(const LogicalLocation& location):
LogicalLocation(location),
physicalTrack(Layout::remapTrackLogicalToPhysical(location.logicalTrack)),
physicalSide(Layout::remapSideLogicalToPhysical(location.logicalSide))
{}
Sector::Sector(const Location& location):
LogicalLocation({ location.logicalTrack, location.logicalSide, 0 }),
physicalTrack(location.physicalTrack),
physicalHead(location.head),
logicalTrack(location.logicalTrack),
logicalSide(location.head)
physicalSide(location.physicalSide)
{}
std::string Sector::statusToString(Status status)