From 49330ce10177f056c883cb9eab2a96b874a09faa Mon Sep 17 00:00:00 2001 From: drmortalwombat <90205530+drmortalwombat@users.noreply.github.com> Date: Mon, 22 Aug 2022 14:22:56 +0200 Subject: [PATCH] Extend zero bank crt copy to $3f00 bytes instead of $3800 --- oscar64/Compiler.cpp | 4 +++- oscar64/Linker.cpp | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/oscar64/Compiler.cpp b/oscar64/Compiler.cpp index d2eb35d..c2f4360 100644 --- a/oscar64/Compiler.cpp +++ b/oscar64/Compiler.cpp @@ -204,7 +204,9 @@ bool Compiler::GenerateCode(void) { if (!regionMain) { - if (regionBytecode) + if (!(mCompilerOptions & COPT_TARGET_PRG)) + regionMain = mLinker->AddRegion(identMain, 0x0900, 0x4700); + else if (regionBytecode) regionMain = mLinker->AddRegion(identMain, 0x0a00, 0xa000); else regionMain = mLinker->AddRegion(identMain, 0x0900, 0xa000); diff --git a/oscar64/Linker.cpp b/oscar64/Linker.cpp index 19755d8..058e303 100644 --- a/oscar64/Linker.cpp +++ b/oscar64/Linker.cpp @@ -616,7 +616,7 @@ bool Linker::WriteCrtFile(const char* filename) fwrite(&chipHeader, sizeof(chipHeader), 1, file); fwrite(mMemory + 0x0800, 1, 0x2000, file); - memcpy(bootmem, mMemory + 0x2800, 0x1800); + memcpy(bootmem, mMemory + 0x2800, 0x1f00); bootmem[0x1ffc] = 0x00; bootmem[0x1ffd] = 0xff;