From: Toni Wilen Date: Sun, 9 Jul 2023 17:23:29 +0000 (+0300) Subject: Adjustable OCS Agnus max chip ram size. X-Git-Tag: 5.1.0~163 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=67f99b6c4aa014431be80f5e54dc25b0f69d7216;p=francis%2Fwinuae.git Adjustable OCS Agnus max chip ram size. --- diff --git a/memory.cpp b/memory.cpp index a266f4c2..678bd0ac 100644 --- a/memory.cpp +++ b/memory.cpp @@ -2432,10 +2432,21 @@ static void allocate_memory (void) } if (currprefs.cs_agnussize > AGNUSSIZE_AUTO) { - if (currprefs.cs_agnussize <= AGNUSSIZE_512) { - chipmem_full_mask = 0x80000 - 1; - } else if (currprefs.cs_agnussize == AGNUSSIZE_1M && chipmem_full_mask > 0x100000) { - chipmem_full_mask = 0x100000 - 1; + if (currprefs.chipset_mask & CSMASK_ECS_AGNUS) { + // if ECS: allow smaller than select chip RAM size DMA range + if (currprefs.cs_agnussize <= AGNUSSIZE_512) { + chipmem_full_mask = 0x80000 - 1; + } else if (currprefs.cs_agnussize == AGNUSSIZE_1M && chipmem_full_mask > 0x100000) { + chipmem_full_mask = 0x100000 - 1; + } + } else { + // if OCS: allow larger than 512k DMA range + if (currprefs.cs_agnussize == AGNUSSIZE_1M && chipmem_bank.allocated_size >= 0x100000) { + chipmem_full_mask = 0x100000 - 1; + } + if (currprefs.cs_agnussize == AGNUSSIZE_2M && chipmem_bank.allocated_size >= 0x180000) { + chipmem_full_mask = 0x200000 - 1; + } } }