Skip to content

Commit

Permalink
Fix D64 creation
Browse files Browse the repository at this point in the history
  • Loading branch information
markusC64 authored and markusC64 committed Mar 12, 2017
1 parent dd6dde9 commit 2599faa
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions software/drive/disk_image.cc
Original file line number Diff line number Diff line change
Expand Up @@ -884,20 +884,7 @@ int BinImage :: format(const char *name)
uint8_t *track_18 = &bin_data[17*21*256];
uint8_t *bam_name = track_18 + 144;

uint8_t sector[256];
for (int i=0; i<256; i++) {
sector[i] = ~((uint8_t)i);
}
sector[0] = 0;
sector[1] = 0;

// memset(bin_data, 0, C1541_MAX_D64_LEN);
uint8_t *dest = bin_data;
int num_sectors = C1541_MAX_D64_LEN >> 8;
for (int i=0; i < num_sectors; i++, dest += 256) {
memcpy(dest, sector, 256);
}

memset(bin_data, 0, C1541_MAX_D64_LEN);
memcpy(track_18, bam_header, 144);

// part that comes after bam header
Expand Down

0 comments on commit 2599faa

Please sign in to comment.