From e5cbdfc67cbee48de8e7340a9c4e466360958a44 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Tue, 24 Mar 2020 21:59:55 -0400 Subject: [PATCH] It turns out that 5-and-3 disks have a different header prologue. --- Storage/Disk/Encodings/AppleGCR/Encoder.hpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Storage/Disk/Encodings/AppleGCR/Encoder.hpp b/Storage/Disk/Encodings/AppleGCR/Encoder.hpp index 08fc69a6e..3f6cdd149 100644 --- a/Storage/Disk/Encodings/AppleGCR/Encoder.hpp +++ b/Storage/Disk/Encodings/AppleGCR/Encoder.hpp @@ -16,12 +16,14 @@ namespace Storage { namespace Encodings { namespace AppleGCR { -/// Describes the standard three-byte prologue that begins a header. -const uint8_t header_prologue[3] = {0xd5, 0xaa, 0x96}; +/// Describes the standard three-byte prologue that begins a header on both the Macintosh and the Apple II from DOS 3.3. +constexpr uint8_t header_prologue[3] = {0xd5, 0xaa, 0x96}; /// Describes the standard three-byte prologue that begins a data section. -const uint8_t data_prologue[3] = {0xd5, 0xaa, 0xad}; +constexpr uint8_t data_prologue[3] = {0xd5, 0xaa, 0xad}; /// Describes the epilogue that ends both data sections and headers. -const uint8_t epilogue[3] = {0xde, 0xaa, 0xeb}; +constexpr uint8_t epilogue[3] = {0xde, 0xaa, 0xeb}; +/// Describes the standard three-byte prologue used by DOS 3.2 and earlier. +constexpr uint8_t five_and_three_header_prologue[3] = {0xd5, 0xaa, 0xb5}; namespace AppleII {