From fecee2418b6aea15008ed6d3a856d202d59a5cdb Mon Sep 17 00:00:00 2001 From: Leo C Date: Thu, 30 Apr 2015 20:34:28 +0200 Subject: Remove memory test and bank manager. First phys. 64K block contains common and system (debugger). Banks for user progs (CP/M) can be assigned from 0x10000. --- z180/config.inc | 44 ++++++++++++++++++++++++++++++++------------ 1 file changed, 32 insertions(+), 12 deletions(-) (limited to 'z180/config.inc') diff --git a/z180/config.inc b/z180/config.inc index 390d3bc..ed98656 100644 --- a/z180/config.inc +++ b/z180/config.inc @@ -1,13 +1,19 @@ + +FALSE equ 0 +TRUE equ NOT FALSE + ;----------------------------------------------------- ; CPU and BANKING types -CPU_Z180 equ 1 ; 0 = Z80, else Z180 -ROMSYS equ 0 +CPU_Z180 equ TRUE +CPU_Z80 equ FALSE + +ROMSYS equ FALSE AVRCLK equ 18432 ;[KHz] - if CPU_Z180 + if CPU_Z180 ;----------------------------------------------------- FOSC equ AVRCLK/2 ;Oscillator frequency [KHz] @@ -26,8 +32,21 @@ PRT_TC10MS equ PHI / (PRT_PRE/10) ;----------------------------------------------------- ; MMU -SYS$CBAR equ 0C8h -USR$CBAR equ 0F0h +COMMON_SIZE equ 4*1024 ;Common Area size in bytes + ;must be multiple of 4K + +if (COMMON_SIZE mod 1000h) + .printx COMMON_SIZE not multiple of 4K! + end ;stop assembly +endif + +CSK equ COMMON_SIZE/1000h ; +CA equ 10h - CSK ;common area start +BA equ 0 ;banked area start + +SYS$CBR equ 0 +SYS$CBAR equ CA<<4 + CA ;CBAR in system mode +USR$CBAR equ CA<<4 + BA ;CBAR in user mode (CP/M) BANKS equ 18 ;max nr. of banks @@ -37,7 +56,8 @@ BANKS equ 18 ;max nr. of banks CREFSH equ 0 ;Refresh rate register (disable refresh) CWAITIO equ 3 shl IWI0 ;Max I/O Wait States, 0 Memory Wait States - else ; Z80 + endif ;CPU_Z180 + if CPU_Z80 PHI equ AVRCLK/5 ;CPU frequency [KHz] BAUDCLCK equ AVRCLK/10 ;Baudrate clock [KHz] @@ -71,16 +91,16 @@ CTC3 EQU 0f7h ; 600 3072 16 192 ; 300 6144 64 92 - endif ; CPU_Z180 + endif ; CPU_Z80 - if ROMSYS + if ROMSYS c$rom equ 0a5h ROM_EN equ 0C0h ROM_DIS equ ROMEN+1 - if CPU_Z180 + if CPU_Z180 CWAITROM equ 2 shl MWI0 - endif - endif + endif + endif DRSTNUM equ 30h ;DDTZ Restart vector (breakpoints) @@ -100,7 +120,7 @@ AVRINT6 equ 5Fh ;PMSG equ 80h ;----------------------------------------------------- -; Definition of (locical) top 2 memory pages +; Definition of (logical) top 2 memory pages sysram_start equ 0FE00h stacksize equ 80 -- cgit v1.2.3