Added support for the upcoming 'Dracarys' ATARI PBI device.

See https://atariage.com/forums/topic/287376-preannouncement-dragon-cart-ii/
This commit is contained in:
Oliver Schmidt 2019-05-08 17:23:00 +02:00
parent 023c87fc03
commit 0fb3869716
9 changed files with 167 additions and 21 deletions

View File

@ -16,10 +16,11 @@ else ifeq ($(eth),sm)
A2DRIVERLIB = ../drivers/a2lancegs.lib A2DRIVERLIB = ../drivers/a2lancegs.lib
else ifeq ($(eth),wn) else ifeq ($(eth),wn)
A2DRIVERLIB = ../drivers/a2uther2.lib A2DRIVERLIB = ../drivers/a2uther2.lib
ATRDRIVERLIB = ../drivers/atrdracarys.lib
else else
C64DRIVERLIB = ../drivers/c64combo.lib C64DRIVERLIB = ../drivers/c64combo.lib
A2DRIVERLIB = ../drivers/a2combo.lib A2DRIVERLIB = ../drivers/a2combo.lib
ATRDRIVERLIB = ../drivers/atrdragon.lib ATRDRIVERLIB = ../drivers/atrcombo.lib
endif endif
C64_DRIVERLIB = ../drivers/ip65_c64.lib C64_DRIVERLIB = ../drivers/ip65_c64.lib

View File

@ -1,21 +1,23 @@
# For assembler programs # For assembler programs
# ---------------------- # ----------------------
# c64rrnet.lib : C64 with RR-Net (or clone) # c64rrnet.lib : C64 with RR-Net (or clone)
# c64eth64.lib : C64 with ETH64 # c64eth64.lib : C64 with ETH64
# c64combo.lib : C64 with RR-Net or ETH64 # c64combo.lib : C64 with RR-Net or ETH64
# a2uther.lib : Apple ][ with Uthernet (default slot: #3) # a2uther.lib : Apple ][ with Uthernet (default slot: #3)
# a2lancegs.lib : Apple ][ with LANceGS (default slot: #3) # a2lancegs.lib : Apple ][ with LANceGS (default slot: #3)
# a2uther2.lib : Apple ][ with Uthernet II (default slot: #3) # a2uther2.lib : Apple ][ with Uthernet II (default slot: #3)
# a2combo.lib : Apple ][ with Uthernet or LANceGS or Uthernet II (default slot: #3) # a2combo.lib : Apple ][ with Uthernet or LANceGS or Uthernet II (default slot: #3)
# atrdragon.lib : ATARI 8-bit with Dragon Cart # atrdragon.lib : ATARI 8-bit with Dragon Cart
# vic20rrnet.lib : VIC20 with RR-Net (or clone) # atrdracarys.lib : ATARI 8-bit with Dracarys (default PBI device ID: #8)
# atrcombo.lib : ATARI 8-bit with Dragon Cart or Dracarys (default PBI device ID: #8)
# vic20rrnet.lib : VIC20 with RR-Net (or clone)
# For C programs # For C programs
# -------------- # --------------
# ip65_c64.lib : C64 with RR-Net or ETH64 # ip65_c64.lib : C64 with RR-Net or ETH64
# ip65_apple2.lib : Apple ][ with Uthernet or LANceGS or Uthernet II (default slot: #3) # ip65_apple2.lib : Apple ][ with Uthernet or LANceGS or Uthernet II (default slot: #3)
# ip65_atari.lib : ATARI 8-bit with Dragon Cart # ip65_atari.lib : ATARI 8-bit with Dragon Cart or Dracarys (default PBI device ID: #8)
# ip65_atarixl.lib : ATARI XL with Dragon Cart # ip65_atarixl.lib : ATARI XL with Dragon Cart or Dracarys (default PBI device ID: #8)
DRIVERS=\ DRIVERS=\
c64rrnet.lib \ c64rrnet.lib \
@ -29,6 +31,8 @@ DRIVERS=\
ip65_apple2.lib \ ip65_apple2.lib \
ip65_apple2_uther2.lib \ ip65_apple2_uther2.lib \
atrdragon.lib \ atrdragon.lib \
atrdracarys.lib \
atrcombo.lib \
ip65_atari.lib \ ip65_atari.lib \
ip65_atarixl.lib \ ip65_atarixl.lib \
vic20rrnet.lib vic20rrnet.lib
@ -114,9 +118,9 @@ rr-net.o uthernet.o dragoncart.o vic20-rr-net.o: cs8900a.s
eth64.o lancegs.o: lan91c96.s eth64.o lancegs.o: lan91c96.s
uthernet2.o: w5100.s uthernet2.o dracarys.o: w5100.s
c64combo.o a2combo.o: ethernetcombo.s c64combo.o a2combo.o atrcombo.o: ethernetcombo.s
c64rrnet.lib: rr-net.o $(CS8900AOBJS) c64init.o $(C64OBJS) c64rrnet.lib: rr-net.o $(CS8900AOBJS) c64init.o $(C64OBJS)
@ -140,9 +144,13 @@ ip65_apple2_uther2.lib: uthernet2.o $(W5100OBJS) a2init.o $(A2_OBJS)
atrdragon.lib: dragoncart.o $(CS8900AOBJS) atrinit.o $(ATROBJS) atrdragon.lib: dragoncart.o $(CS8900AOBJS) atrinit.o $(ATROBJS)
ip65_atari.lib: dragoncart.o $(CS8900AOBJS) atrinit.o $(ATR_OBJS) atrdracarys.lib: dracarys.o $(W5100OBJS) atrinit.o $(ATROBJS)
ip65_atarixl.lib: dragoncart.o $(CS8900AOBJS) atrinit.o $(ATRXL_OBJS) atrcombo.lib: dragoncart.o dracarys.o atrcombo.o atrinit.o $(ATROBJS)
ip65_atari.lib: dragoncart.o dracarys.o atrcombo.o atrinit.o $(ATR_OBJS)
ip65_atarixl.lib: dragoncart.o dracarys.o atrcombo.o atrinit.o $(ATRXL_OBJS)
vic20rrnet.lib: vic20-rr-net.o $(CS8900AOBJS) vic20init.o $(VIC20OBJS) vic20rrnet.lib: vic20-rr-net.o $(CS8900AOBJS) vic20init.o $(VIC20OBJS)

24
drivers/atrcombo.s Normal file
View File

@ -0,0 +1,24 @@
__ATARI__ = 1
.include "ethernetcombo.s"
; -- LICENSE FOR atrcombo.s --
; The contents of this file are subject to the Mozilla Public License
; Version 1.1 (the "License"); you may not use this file except in
; compliance with the License. You may obtain a copy of the License at
; http://www.mozilla.org/MPL/
;
; Software distributed under the License is distributed on an "AS IS"
; basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
; License for the specific language governing rights and limitations
; under the License.
;
; The Original Code is ip65.
;
; The Initial Developer of the Original Code is Jonno Downes,
; jonno@jamtronix.com.
; Portions created by the Initial Developer are Copyright (C) 2009
; Jonno Downes. All Rights Reserved.
; -- LICENSE END --

View File

@ -1 +1 @@
.exportzp eth_init_default = 0 .exportzp eth_init_default = 8 ; PBI default device ID

36
drivers/dracarys.s Normal file
View File

@ -0,0 +1,36 @@
; Dracarys driver
.export _w5100_name
__ATARI__ = 1
DYN_DRV = 0
.include "w5100.s"
.rodata
_w5100_name:
.byte "Dracarys",0
; -- LICENSE FOR dracarys.s --
; The contents of this file are subject to the Mozilla Public License
; Version 1.1 (the "License"); you may not use this file except in
; compliance with the License. You may obtain a copy of the License at
; http://www.mozilla.org/MPL/
;
; Software distributed under the License is distributed on an "AS IS"
; basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
; License for the specific language governing rights and limitations
; under the License.
;
; The Original Code is ip65.
;
; The Initial Developer of the Original Code is Jonno Downes,
; jonno@jamtronix.com.
; Portions created by the Initial Developer are Copyright (C) 2009
; Jonno Downes. All Rights Reserved.
; -- LICENSE END --

View File

@ -132,7 +132,7 @@ set_name:
eth_init: eth_init:
sta eth_init_value sta eth_init_value
.ifdef __APPLE2__ .if .defined (__APPLE2__) .or .defined (__ATARI__)
ldax #_w5100 ldax #_w5100
jsr patch_wrapper jsr patch_wrapper
ldax #_w5100_name ldax #_w5100_name
@ -148,11 +148,14 @@ eth_init:
jsr init_adaptor jsr init_adaptor
bcc @done bcc @done
.if .defined (__C64__) .or .defined (__APPLE2__)
ldax #_lan91c96 ldax #_lan91c96
jsr patch_wrapper jsr patch_wrapper
ldax #_lan91c96_name ldax #_lan91c96_name
jsr set_name jsr set_name
jsr init_adaptor jsr init_adaptor
.endif
@done: @done:
rts rts

View File

@ -41,7 +41,12 @@
; Ethernet address ; Ethernet address
mac: .byte $00, $08, $DC ; OUI of WIZnet mac: .byte $00, $08, $DC ; OUI of WIZnet
.ifdef __APPLE2__
.byte $A2, $A2, $A2 .byte $A2, $A2, $A2
.endif
.ifdef __ATARI__
.byte $A8, $A8, $A8
.endif
; Buffer attributes ; Buffer attributes
bufaddr:.res 2 ; Address bufaddr:.res 2 ; Address
@ -84,7 +89,9 @@ tmp := tmp4 ; Temporary value
.endif .endif
;--------------------------------------------------------------------- ;=====================================================================
.ifdef __APPLE2__
.rodata .rodata
@ -148,6 +155,56 @@ init:
bcs :- ; Always bcs :- ; Always
: :
.endif
;=====================================================================
.ifdef __ATARI__
.rodata
pdtab: .byte %00000001
.byte %00000010
.byte %00000100
.byte %00001000
.byte %00010000
.byte %00100000
.byte %01000000
.byte %10000000
;---------------------------------------------------------------------
.bss
pdbit: .res 1
;---------------------------------------------------------------------
mode := $D1F0
addr := $D1F1
data := $D1F3
pdvs := $D1FF ; parallel device select
shpdvs := $0248 ; shadow parallel device select
;---------------------------------------------------------------------
.code
init:
; Convert parallel device ID (1-8) to parallel device bit
tay
lda pdtab-1,y
sta pdbit
; Select parallel device
sta shpdvs
sta pdvs
.endif
;=====================================================================
; Indirect Bus I/F mode, Address Auto-Increment ; Indirect Bus I/F mode, Address Auto-Increment
fixup01:lda mode fixup01:lda mode
ora #$03 ora #$03
@ -230,6 +287,13 @@ fixup14:sta data
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
poll: poll:
.ifdef __ATARI__
; Select parallel device
lda pdbit
sta shpdvs
sta pdvs
.endif
; Check for completion of previous command ; Check for completion of previous command
; Socket 0 Command Register: = 0 ? ; Socket 0 Command Register: = 0 ?
jsr set_addrcmdreg0 jsr set_addrcmdreg0
@ -337,6 +401,13 @@ send:
sta adv sta adv
stx adv+1 stx adv+1
.ifdef __ATARI__
; Select parallel device
lda pdbit
sta shpdvs
sta pdvs
.endif
; Set parameters for transmitting data ; Set parameters for transmitting data
lda #>$4000 ; Socket 0 TX Base Address lda #>$4000 ; Socket 0 TX Base Address
ldx #$01 ; Write ldx #$01 ; Write

View File

@ -25,8 +25,10 @@ extern uint8_t ip65_error;
// Ethernet driver initialization parameter values // Ethernet driver initialization parameter values
// //
#ifdef __APPLE2__ #if defined(__APPLE2__)
#define ETH_INIT_DEFAULT 3 // Apple II slot number #define ETH_INIT_DEFAULT 3 // Apple II slot number
#elif defined(__ATARI__)
#define ETH_INIT_DEFAULT 8 // ATARI PBI device ID
#else #else
#define ETH_INIT_DEFAULT 0 // Unused #define ETH_INIT_DEFAULT 0 // Unused
#endif #endif

View File

@ -17,10 +17,11 @@ else ifeq ($(eth),sm)
A2DRIVERLIB = ../drivers/a2lancegs.lib A2DRIVERLIB = ../drivers/a2lancegs.lib
else ifeq ($(eth),wn) else ifeq ($(eth),wn)
A2DRIVERLIB = ../drivers/a2uther2.lib A2DRIVERLIB = ../drivers/a2uther2.lib
ATRDRIVERLIB = ../drivers/atrdracarys.lib
else else
C64DRIVERLIB = ../drivers/c64combo.lib C64DRIVERLIB = ../drivers/c64combo.lib
A2DRIVERLIB = ../drivers/a2combo.lib A2DRIVERLIB = ../drivers/a2combo.lib
ATRDRIVERLIB = ../drivers/atrdragon.lib ATRDRIVERLIB = ../drivers/atrcombo.lib
VICDRIVERLIB = ../drivers/vic20rrnet.lib VICDRIVERLIB = ../drivers/vic20rrnet.lib
endif endif