diff --git a/BaS_gcc/Makefile b/BaS_gcc/Makefile index 77af505..ac0c945 100644 --- a/BaS_gcc/Makefile +++ b/BaS_gcc/Makefile @@ -9,7 +9,7 @@ # can be either "Y" or "N" (without quotes). "Y" for using the m68k-elf-, "N" for using the m68k-atari-mint # toolchain -COMPILE_ELF=Y +COMPILE_ELF=N ifeq (Y,$(COMPILE_ELF)) TCPREFIX=m68k-elf- diff --git a/BaS_gcc/include/mmu.h b/BaS_gcc/include/mmu.h index 1d69c29..75561c7 100644 --- a/BaS_gcc/include/mmu.h +++ b/BaS_gcc/include/mmu.h @@ -26,6 +26,34 @@ #include "bas_types.h" +/* + * ACR register handling macros + */ +#define ACR_BA(x) ((x) & 0xffff0000) +#define ACR_ADMSK(x) (((x) & 0xffff) << 16) +#define ACR_E(x) (((x) & 1) << 15) + +#define ACR_S(x) (((x) & 3) << 13) +#define ACR_S_USERMODE 0 +#define ACR_S_SUPERVISOR_MODE 1 +#define ACR_S_ALL 2 + +#define ACR_AMM(x) (((x) & 1) << 10) + +#define ACR_CM(x) (((x) & 3) << 5) +#define ACR_CM_CACHEABLE_WT 0x0 +#define ACR_CM_CACHEABLE_CB 0x1 +#define ACR_CM_CACHE_INH_PRECISE 0x2 +#define ACR_CM_CACHE_INH_IMPRECISE 0x3 + +#define ACR_SP(x) (((x) & 1) << 3) +#define ACR_W(x) (((x) & 1) << 2) + + +/* + * MMU register handling macros + */ + #define SCA_PAGE_ID 6 /* indicates video memory page */ #define MMU_PAGE_SIZE_1M 0 diff --git a/BaS_gcc/sys/mmu.c b/BaS_gcc/sys/mmu.c index 30423cf..3d8707e 100644 --- a/BaS_gcc/sys/mmu.c +++ b/BaS_gcc/sys/mmu.c @@ -24,26 +24,6 @@ * Copyright 2013 M. Froeschle */ -#define ACR_BA(x) ((x) & 0xffff0000) -#define ACR_ADMSK(x) (((x) & 0xffff) << 16) -#define ACR_E(x) (((x) & 1) << 15) - -#define ACR_S(x) (((x) & 3) << 13) -#define ACR_S_USERMODE 0 -#define ACR_S_SUPERVISOR_MODE 1 -#define ACR_S_ALL 2 - -#define ACR_AMM(x) (((x) & 1) << 10) - -#define ACR_CM(x) (((x) & 3) << 5) -#define ACR_CM_CACHEABLE_WT 0x0 -#define ACR_CM_CACHEABLE_CB 0x1 -#define ACR_CM_CACHE_INH_PRECISE 0x2 -#define ACR_CM_CACHE_INH_IMPRECISE 0x3 - -#define ACR_SP(x) (((x) & 1) << 3) -#define ACR_W(x) (((x) & 1) << 2) - #include #include "bas_printf.h" #include "bas_types.h"