diff options
author | Leo C | 2014-10-03 12:14:01 +0200 |
---|---|---|
committer | Leo C | 2014-10-03 12:14:01 +0200 |
commit | 349c01b10d1f6e223f963c6cbdf6a94d0b618895 (patch) | |
tree | 611bfc9e038fed23bcfc68fe21b542bafcc48b2e | |
parent | 04a63b0d5660f1c0c0b7e8123e4f56d188e52a5d (diff) | |
download | z180-stamp-349c01b10d1f6e223f963c6cbdf6a94d0b618895.zip |
not working
-rw-r--r-- | avr/z80-if.c | 2 | ||||
-rw-r--r-- | z180/r3init.180 | 62 |
2 files changed, 62 insertions, 2 deletions
diff --git a/avr/z80-if.c b/avr/z80-if.c index dd0dd96..25a71b0 100644 --- a/avr/z80-if.c +++ b/avr/z80-if.c @@ -715,6 +715,8 @@ static void tim1_setup(void) void z80_setup_msg_fifo(void) { + + // gpio_set_mode(P_BUSACK, GPIO_MODE_INPUT, // GPIO_CNF_INPUT_FLOAT, GPIO_BUSACK | GPIO_IOCS1); diff --git a/z180/r3init.180 b/z180/r3init.180 index 8156ed7..0d3e5be 100644 --- a/z180/r3init.180 +++ b/z180/r3init.180 @@ -32,8 +32,15 @@ rsti defl 1 jp bpent
rsti defl rsti+1
endm
+ db 0, 0, 0, 0, 0
;----------------------------------------------------------------------
+
+ ;org 40h
+
+ dw 0
+ db 0
+
if ROMSYS
$crom: defb c$rom ;
@@ -310,8 +317,59 @@ buf.init: ret
;----------------------------------------------------------------------
+if 0
+ extrn msginit,msg.sout,msg_fifo
+ extrn tx.buf,rx.buf
+
+
+bufferinit:
+ call msginit
+
+ ld hl,buffers
+ ld bc,0300h
+bfi_1:
+ ld e,(hl)
+ inc hl
+ ld d,(hl)
+ inc hl
+ push hl
+ in0 a,cbr
+ call log2phys
+ ld (40h+0),hl
+ ld (40h+2),a
+ ld a,c
+ ld (bufdat+0),a
+ ld hl,inimsg
+ call msg.sout
+ pop hl
+ inc c
+ djnz bfi_1
+ ret
+
+ rept 20
+ db 0
+ endm
+
+buffers:
+ dw msg_fifo
+ dw tx.buf
+ dw rx.buf
-.comment *
+inimsg:
+ db inimsg_e - $ -2
+ db PMSG
+ db 81h
+ db inimsg_e - $ -1
+ db 0
+bufdat:
+ db 0
+ dw 0
+ db 0
+inimsg_e:
+endif
+;----------------------------------------------------------------------
+;
+if 0
extrn msginit,msg.sout,msg_fifo
extrn tx.buf,rx.buf
@@ -362,7 +420,7 @@ bufdat: db 0
inimsg_e:
- *
+endif
;
;----------------------------------------------------------------------
|