Skip to content

Commit

Permalink
Fix for double sided disks
Browse files Browse the repository at this point in the history
  • Loading branch information
Markus Steinborn committed Sep 27, 2020
1 parent f44c9e0 commit 96d45b1
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions p64conv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,19 @@ int txt2p64(string infile, string outfile)
if (position == 0)
position = 1;

P64PulseStreamAddPulse(&P64Image.PulseStreams[side][track], position, 0xffffffff);
// printf( "Add pulse %i.%i\n", track, side);
// P64PulseStreamAddPulse(&P64Image.PulseStreams[side][track], position, 0xffffffff);
}
else if (RE2::FullMatch(line, trackPattern, &number))
{
track = int(2 * number + 0.1);

side = 0;
if (track > 128)
if (number > 128)
{
side = 1;
track -= 128;
number -= 128;
}
track = int(2 * number + 0.1);
}
else if (RE2::FullMatch(line, writeProtectPattern, &tmpInt))
{
Expand Down Expand Up @@ -136,7 +138,6 @@ int p642txt(string infile, string outfile)
{
TP64PulseStream & instance = P64Image.PulseStreams[side][track];
int current = instance.UsedFirst;

if (current >= 0)
{
sprintf(buffer2, "track %i%s\n", track / 2 + 128*side, track & 1 ? ".5" : "");
Expand Down

0 comments on commit 96d45b1

Please sign in to comment.