;
;        PHUNSY hardware definitions
;        FP-2010-11-05 (www.philipse.info)
;
;                                      == port d outputs
ttyout   equ       001h                ; serial data out to tty (300 or 110 bps)
speaker  equ       002h                ; output to small speaker
keyback  equ       004h                ; keyboard ack
mdcrtst  equ       008h                ; mdcr test cassette in position
mdcrrev  equ       010h                ; reverse tape
mdcrfwd  equ       020h                ; forward tape
mdcrwcd  equ       040h                ; write command
mdcrwda  equ       080h                ; write data
;
;                                      == port c inputs
ttyin    equ       001h                ; serial data in from tty (300 or 110 bps)
paralel  equ       002h                ; if '1' keyboard and screen else tty in/out for user interface
bps300   equ       004h                ; if '1' 300 bps else 110 bps tty
mdcrwen  equ       008h                ; mdcr write enable
mdcrcip  equ       010h                ; mdcr cassette in position
mdcrbet  equ       020h                ; mdcr write enable
mdcrrda  equ       040h                ; mdcr read data
mdcrrdc  equ       080h                ; mdcr read clock
;
; port d input is used for keyboard
; If bit 7 is 0, a new key is available. Bit 7 is returned to 1 with keyback, indicating the key has been read.
;
; port c output is used for bank selection
; b7..4 selects one of 16 U-banks
; b3..0 selects one of 16 Q-banks
;
;                                       == some address locations
mram    equ     00e00h                  ; monitor ram
inpram  equ     00f00h                  ; input buffer user commands
screen  equ     01000h                  ; screen ram - displayed on monitor
ustrt   equ     01800h                  ; 'U-bank' start address
qstrt   equ     04000h                  ; 'Q-bank' start address
;
        END
