summaryrefslogtreecommitdiff
path: root/z180/config.inc
diff options
context:
space:
mode:
authorLeo C2015-05-10 12:54:12 +0200
committerLeo C2015-05-10 12:54:12 +0200
commite4c4b148ced1347935dff6200380e90cb3bfcde3 (patch)
tree9ec51f8058aebc22d1b3ff415f4b15ab01ceedb6 /z180/config.inc
parent1a2460dcd3bed50d5f2b7ba53e6e21a12935639b (diff)
downloadz180-stamp-e4c4b148ced1347935dff6200380e90cb3bfcde3.zip
Add unique id to fifos
Diffstat (limited to 'z180/config.inc')
-rw-r--r--z180/config.inc31
1 files changed, 20 insertions, 11 deletions
diff --git a/z180/config.inc b/z180/config.inc
index 33152de..0c945ae 100644
--- a/z180/config.inc
+++ b/z180/config.inc
@@ -47,8 +47,8 @@ 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)
+SYS$CBAR equ CA*16 + CA ;CBAR in system mode
+USR$CBAR equ CA*16 + BA ;CBAR in user mode (CP/M)
BANKS equ 18 ;max nr. of banks
@@ -57,6 +57,7 @@ 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
+PHI_X2 equ 0 ;set to M_X2CM to enable the clock doubler
endif ;CPU_Z180
if CPU_Z80
@@ -108,14 +109,20 @@ CWAITROM equ 2 shl MWI0
DRSTNUM equ 30h ;DDTZ Restart vector (breakpoints)
-mrx.fifo_len equ 256
-mtx.fifo_len equ 256
+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
-ci.fifo_len equ 128
-co.fifo_len equ 256
+ci.fifo_len equ 32 ;AVRCON Character I/O via AVR
+ci.fifo_id equ 2
+co.fifo_len equ 32
+co.fifo_id equ 3
-s1.rx_len equ 256 ;Serial 1 (ASCI1) buffers
-s1.tx_len equ 256 ;
+s1.rx_len equ 128 ;Serial 1 (ASCI1) buffers
+s1.rx_id equ 4 ;
+s1.tx_len equ 128 ;
+s1.tx_id equ 5 ;
AVRINT5 equ 4Fh
AVRINT6 equ 5Fh
@@ -136,24 +143,26 @@ iv2tab equ ivtab + 2*9
;-----------------------------------------------------
-
+o.id equ -4
o.mask equ -3
o.in_idx equ -2
o.out_idx equ -1
.lall
-mkbuf macro name,size
- if ((size & (size-1)) ne 0) or (size gt 256)
+mkbuf macro id,name,size
+ if ((size AND (size-1)) NE 0) OR (size GT 256)
.printx Error: buffer ^size must be power of 2 and in range 0..256!
name&.mask equ ;wrong size error
else
+ db id
ds 3
name:: ds size
name&.mask equ low (size-1)
if size ne 0
name&.end equ $-1
name&.len equ size
+ name&.id equ id
endif
endif
endm