X-Git-Url: http://cloudbase.mooo.com/gitweb/z180-stamp.git/blobdiff_plain/e4c4b148ced1347935dff6200380e90cb3bfcde3..b08e079d1541c80028e3a11affec3f863eb9129d:/z180/config.inc diff --git a/z180/config.inc b/z180/config.inc index 0c945ae..ffab6e6 100644 --- a/z180/config.inc +++ b/z180/config.inc @@ -2,6 +2,9 @@ FALSE equ 0 TRUE equ NOT FALSE + +DEBUG equ true + banked equ true ;----------------------------------------------------- @@ -18,23 +21,32 @@ AVRCLK equ 18432 ;[KHz] if CPU_Z180 ;----------------------------------------------------- -FOSC equ AVRCLK/2 ;Oscillator frequency [KHz] -PHI equ FOSC*2 ;CPU frequency (clock doubler enabled) +;FOSC equ AVRCLK/2 ;Oscillator frequency [KHz] +;PHI equ FOSC*2 ;CPU frequency (clock doubler enabled) + +;---------------------------------------------------------------------- +; Baudrate Generator for x16 clock mode: +; TC = (f PHI / (32 * baudrate)) - 2 +; +; PHI [MHz]: 9.216 18.432 +; baudrate TC TC +; ---------------------- +; 115200 - 3 +; 57600 3 8 +; 38400 - 13 +; 19200 13 28 +; 9600 28 58 + ;----------------------------------------------------- ; Programmable Reload Timer (PRT) PRT_PRE equ 20 ;PRT prescaler -; Reload value for 10 ms Int. (0.1KHz): -; tc10ms = phi/prescale/0.1KHz = phi / (prescale/10) - -PRT_TC10MS equ PHI / (PRT_PRE/10) - ;----------------------------------------------------- ; MMU -COMMON_SIZE equ 4*1024 ;Common Area size in bytes +COMMON_SIZE equ 16*1024 ;Common Area size in bytes ;must be multiple of 4K if (COMMON_SIZE mod 1000h) @@ -106,13 +118,15 @@ CWAITROM equ 2 shl MWI0 endif -DRSTNUM equ 30h ;DDTZ Restart vector (breakpoints) +DDTZRSTVEC equ 030h ;DDTZ Restart vector (breakpoints) +INIDONE equ 03Fh ;CP/M skip hw init, if this address +INIDONEVAL equ 080h ; is set to this value. -mtx.fifo_len equ 32 ;Message transfer fifos -mtx.fifo_id equ 0 ; This *must* have #0 -mrx.fifo_len equ 32 -mrx.fifo_id equ 1 +mtx.fifo_len equ 64 ;Message transfer fifos +mtx.fifo_id equ 0 ; This *must* have #0 +mrx.fifo_len equ 64 +mrx.fifo_id equ 1 ci.fifo_len equ 32 ;AVRCON Character I/O via AVR ci.fifo_id equ 2 @@ -132,7 +146,7 @@ AVRINT6 equ 5Fh ; Definition of (logical) top 2 memory pages sysram_start equ 0FE00h -stacksize equ 80 +bs$stack$size equ 80 isvsw_loc equ 0FEE0h @@ -156,7 +170,8 @@ mkbuf macro id,name,size name&.mask equ ;wrong size error else db id - ds 3 + db size-1 + ds 2 name:: ds size name&.mask equ low (size-1) if size ne 0 @@ -179,3 +194,10 @@ inidate macro dseg ds ??ps.len endm + +;----------------------------------------------------- + +b0call macro address + call _b0call + dw address + endm