2017-01-29 20:18:49 +00:00
|
|
|
;
|
|
|
|
; Oric Telemon definition
|
2017-10-16 14:11:37 +00:00
|
|
|
; Telemon 2.4 & Telemon 3.x
|
|
|
|
; For telemon 3.x check http://orix.oric.org
|
2017-01-29 20:18:49 +00:00
|
|
|
;
|
|
|
|
|
|
|
|
|
|
|
|
; ---------------------------------------------------------------------------
|
|
|
|
; Constants
|
|
|
|
|
|
|
|
SCREEN_XSIZE = 40 ; screen columns
|
|
|
|
SCREEN_YSIZE = 28 ; screen rows
|
|
|
|
|
|
|
|
FUNCTKEY = $A5
|
|
|
|
|
|
|
|
FNAME_LEN = 11 ; maximum length of file-name
|
|
|
|
|
2017-10-16 14:11:37 +00:00
|
|
|
; ---------------------------------------------------------------------------
|
|
|
|
; I/O Identifier
|
|
|
|
; this identifers are used for channel management
|
|
|
|
;
|
|
|
|
|
|
|
|
XKBD = $80 ; Keyboard
|
|
|
|
XRSE = $83 ; RS232 in
|
|
|
|
XSCR = $88 ; Screen
|
|
|
|
XRSS = $90 ; RS232 out
|
2017-09-25 19:47:05 +00:00
|
|
|
|
2017-01-29 20:18:49 +00:00
|
|
|
|
|
|
|
; ---------------------------------------------------------------------------
|
|
|
|
; Zero page
|
|
|
|
|
2017-01-31 21:09:14 +00:00
|
|
|
; ---------------------------------------------------------------------------
|
|
|
|
; Page 00
|
|
|
|
RES := $00
|
|
|
|
RESB := $02
|
|
|
|
|
2017-02-01 22:58:33 +00:00
|
|
|
TR0 := $0C
|
|
|
|
TR1 := $0D
|
2017-09-24 09:46:52 +00:00
|
|
|
TR2 := $0E
|
|
|
|
TR3 := $0F
|
|
|
|
TR4 := $10
|
|
|
|
TR5 := $11
|
|
|
|
TR6 := $12
|
|
|
|
TR7 := $13
|
|
|
|
|
2017-10-16 14:11:37 +00:00
|
|
|
PTR_READ_DEST := $2C ; used for XFREAD and XWRITE only in telemon 3.x
|
2017-01-31 21:09:14 +00:00
|
|
|
|
|
|
|
HRSX := $46
|
|
|
|
HRSY := $47
|
|
|
|
|
|
|
|
HRS1 := $4D
|
|
|
|
HRS2 := $4F
|
|
|
|
HRS3 := $51
|
|
|
|
HRS4 := $53
|
|
|
|
HRS5 := $55
|
2017-01-29 20:18:49 +00:00
|
|
|
|
2017-10-20 19:03:30 +00:00
|
|
|
HRSFB := $57
|
|
|
|
|
|
|
|
; RS232T
|
|
|
|
; b0-b3 : speed
|
2017-10-20 19:29:16 +00:00
|
|
|
; 1111 => 19200 bps (please note that telestrat can't handle this speed without stopping all IRQ except ACIA's one)
|
2017-10-20 19:03:30 +00:00
|
|
|
; 1100 => 9600 bps (default from telemon)
|
|
|
|
; 1110 => 4800 bps
|
|
|
|
; 1010 => 2400 bps
|
|
|
|
; 1000 => 1200 bps
|
|
|
|
; 0111 => 600 bps
|
|
|
|
; 0110 => 300 bps
|
|
|
|
; 0101 => 150 bps
|
|
|
|
; 0010 => 75 bps
|
|
|
|
|
|
|
|
; b4 : 0 external clock, 1 internal clock
|
|
|
|
; b6-b5 : 00 8 bits
|
|
|
|
; 01 7 bits
|
|
|
|
; 10 6 bits
|
|
|
|
; 11 5 bits
|
|
|
|
; b7 : 0 a stop
|
|
|
|
|
|
|
|
RS232T := $59
|
|
|
|
|
|
|
|
; RS232C
|
|
|
|
; b0-b3 : 0
|
|
|
|
; b4 : 1 if echo
|
|
|
|
; b5 : 1 if parity
|
|
|
|
; b7-b6 : 00 in/out parity odd
|
|
|
|
; : 01 on/out parity even
|
|
|
|
; : 10 parity sent, answer not tested
|
|
|
|
; : 11 SPACE SENT, reception not tested
|
|
|
|
|
|
|
|
RS232C := $5A
|
2017-01-29 20:18:49 +00:00
|
|
|
|
|
|
|
; ---------------------------------------------------------------------------
|
|
|
|
; Low memory
|
2017-10-20 19:03:30 +00:00
|
|
|
IRQVec := $02FB ; "fast" interrupt vector
|
2017-01-29 20:18:49 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
; ---------------------------------------------------------------------------
|
|
|
|
; I/O locations
|
|
|
|
|
|
|
|
; 6522
|
|
|
|
.struct VIA ; Versatile Interface Adapter
|
|
|
|
.res $0300
|
|
|
|
PRB .byte ; Port Register B
|
|
|
|
PRA .byte ; Port Register A
|
|
|
|
DDRB .byte ; Data Direction Register B
|
|
|
|
DDRA .byte ; Data Direction Register A
|
|
|
|
T1 .word ; Timer 1
|
|
|
|
T1L .word ; Timer 1 Latch
|
|
|
|
T2 .word ; Timer 2
|
|
|
|
SR .byte ; Shift Register
|
|
|
|
ACR .byte ; Auxiliary Control Register
|
|
|
|
PCR .byte ; Peripheral Control Register
|
|
|
|
IFR .byte ; Interrupt Flags Register
|
|
|
|
IER .byte ; Interrupt Enable Register
|
|
|
|
PRA2 .byte ; Port Register A without handshaking
|
|
|
|
.endstruct
|
|
|
|
|
|
|
|
|
2017-10-20 19:03:30 +00:00
|
|
|
.struct VIA2 ; Versatile Interface Adapter
|
2017-01-29 20:18:49 +00:00
|
|
|
.res $0320
|
|
|
|
PRB .byte ; Port Register B
|
|
|
|
PRA .byte ; Port Register A
|
|
|
|
DDRB .byte ; Data Direction Register B
|
|
|
|
DDRA .byte ; Data Direction Register A
|
|
|
|
T1 .word ; Timer 1
|
|
|
|
T1L .word ; Timer 1 Latch
|
|
|
|
T2 .word ; Timer 2
|
|
|
|
SR .byte ; Shift Register
|
|
|
|
ACR .byte ; Auxiliary Control Register
|
|
|
|
PCR .byte ; Peripheral Control Register
|
|
|
|
IFR .byte ; Interrupt Flags Register
|
|
|
|
IER .byte ; Interrupt Enable Register
|
|
|
|
PRA2 .byte ; Port Register A without handshaking
|
|
|
|
.endstruct
|
|
|
|
|
|
|
|
; 6551
|
|
|
|
.struct ACIA ; Asynchronous Communications Interface Adapter
|
|
|
|
.res $031C
|
|
|
|
DATA .byte
|
|
|
|
STATUS .byte
|
|
|
|
CMD .byte ; Command register
|
|
|
|
CTRL .byte ; Control register
|
|
|
|
.endstruct
|
|
|
|
|
|
|
|
SCREEN := $BB80
|
|
|
|
|
|
|
|
|
|
|
|
; ---------------------------------------------------------------------------
|
|
|
|
; ROM entries
|
|
|
|
|
2017-10-20 19:03:30 +00:00
|
|
|
; telemon primitives (2.4 & 3.x)
|
2017-01-31 21:09:14 +00:00
|
|
|
XRD0 = $08
|
|
|
|
XRDW0 = $0C
|
|
|
|
XWR0 = $10
|
|
|
|
XWSTR0 = $14
|
|
|
|
XTEXT = $19
|
|
|
|
XHIRES = $1A
|
2017-02-25 20:32:06 +00:00
|
|
|
XFILLM = $1C
|
2017-01-31 21:09:14 +00:00
|
|
|
XMINMA = $1F
|
2017-10-16 14:06:18 +00:00
|
|
|
XVARS = $24 ; only in TELEMON 3.x, in telemon 2.4, it's XNOMFI ($24)
|
|
|
|
XFREAD = $27 ; only in TELEMON 3.x
|
|
|
|
XOPEN = $30 ; only in TELEMON 3.x
|
2017-01-31 21:20:19 +00:00
|
|
|
XCOSCR = $34 ; switch off cursor
|
|
|
|
XCSSCR = $35 ; switch on cursor
|
2017-10-16 14:06:18 +00:00
|
|
|
XCLOSE = $3A ; only in TELEMON 3.x Close file
|
|
|
|
XFWRITE = $3B ; only in TELEMON 3.x write file
|
2017-01-31 21:09:14 +00:00
|
|
|
XSONPS = $40
|
|
|
|
XOUPS = $42
|
|
|
|
XPLAY = $43
|
|
|
|
XSOUND = $44
|
|
|
|
XMUSIC = $45
|
|
|
|
XZAP = $46
|
|
|
|
XSHOOT = $47
|
2017-10-16 14:06:18 +00:00
|
|
|
XSOUT = $67 ; Send A register to RS232, available in telemon 2.4 & 3.x
|
2017-10-20 19:03:30 +00:00
|
|
|
XHRSSE = $8C ; Put in X and Y
|
|
|
|
XDRAWA = $8D ; Draw a line
|
|
|
|
XDRAWR = $8E ; Draw a line
|
2017-01-31 21:09:14 +00:00
|
|
|
XCIRCL = $8F
|
|
|
|
XCURSE = $90
|
2017-10-20 19:03:30 +00:00
|
|
|
XCURMO = $91
|
2017-01-31 21:09:14 +00:00
|
|
|
XPAPER = $92
|
|
|
|
XINK = $93
|
2017-10-20 19:03:30 +00:00
|
|
|
XBOX = $94
|
|
|
|
XABOX = $95
|
|
|
|
XFILL = $96
|
|
|
|
XCHAR = $97
|
|
|
|
XSCHAR = $98 ; Draw a string
|
2017-02-01 22:58:33 +00:00
|
|
|
XEXPLO = $9C
|
|
|
|
XPING = $9D
|
|
|
|
|
2017-09-24 17:22:43 +00:00
|
|
|
; ---------------------------------------------------------------------------
|
|
|
|
; ROM entries variables
|
|
|
|
|
|
|
|
PWD_PTR = $00
|
|
|
|
|
2017-02-25 20:32:06 +00:00
|
|
|
; ---------------------------------------------------------------------------
|
|
|
|
; Page $200
|
|
|
|
SCRX := $220
|
|
|
|
SCRY := $224
|
2017-02-25 21:10:13 +00:00
|
|
|
ADSCRL := $218
|
|
|
|
ADSCRH := $21C
|
2017-10-20 19:03:30 +00:00
|
|
|
HRSPAT := $2AA ; Hires pattern : it's used to draw pattern for a line or a circle
|
2017-09-25 19:39:57 +00:00
|
|
|
IRQVECTOR := $2FA
|
2017-02-25 21:10:13 +00:00
|
|
|
|
2017-01-29 20:18:49 +00:00
|
|
|
|
|
|
|
; ---------------------------------------------------------------------------
|
|
|
|
; Page $500
|
|
|
|
|
2017-01-31 21:09:14 +00:00
|
|
|
BUFNOM := $517
|
|
|
|
BUFEDT := $590
|
2017-01-29 20:18:49 +00:00
|
|
|
|
|
|
|
MAX_BUFEDT_LENGTH=110
|
|
|
|
|
|
|
|
; Hardware
|
2017-09-24 09:46:52 +00:00
|
|
|
CH376_DATA := $340
|
|
|
|
CH376_COMMAND := $341
|
2017-01-29 20:18:49 +00:00
|
|
|
|
|
|
|
; MACRO
|
|
|
|
|
|
|
|
.macro BRK_TELEMON value
|
|
|
|
.byte $00,value
|
|
|
|
.endmacro
|