Generalized Apple II slot setting.

In order to allow setting the Apple II slot from host computer independent code the slot setting function was renamed and dummies were added for the other host computers.
This commit is contained in:
Oliver Schmidt 2017-06-04 00:09:22 +02:00
parent 8166cf1667
commit b8f8c3085d
7 changed files with 44 additions and 18 deletions

View File

@ -62,34 +62,34 @@ VIC20OBJS=\
vic20vt100.o \ vic20vt100.o \
cbmcharconv.o cbmcharconv.o
c64rrnet.lib: rr-net.o cs8900a.o cs8900adriver.o ethernet.o $(C64OBJS) c64rrnet.lib: rr-net.o cs8900a.o cs8900adriver.o ethernet.o c64init.o $(C64OBJS)
ar65 a $@ $^ ar65 a $@ $^
c64eth64.lib: eth64.o lan91c96.o lan91c96driver.o ethernet.o $(C64OBJS) c64eth64.lib: eth64.o lan91c96.o lan91c96driver.o ethernet.o c64init.o $(C64OBJS)
ar65 a $@ $^ ar65 a $@ $^
c64wiz811.lib: wiz811mj.o w5100.o w5100driver.o ethernet.o $(C64OBJS) c64wiz811.lib: wiz811mj.o w5100.o w5100driver.o ethernet.o c64init.o $(C64OBJS)
ar65 a $@ $^ ar65 a $@ $^
c64combo.lib: rr-net.o cs8900a.o eth64.o lan91c96.o wiz811mj.o w5100.o ethernetcombo.o $(C64OBJS) c64combo.lib: rr-net.o cs8900a.o eth64.o lan91c96.o wiz811mj.o w5100.o ethernetcombo.o c64init.o $(C64OBJS)
ar65 a $@ $^ ar65 a $@ $^
a2uther.lib: uthernet.o cs8900a.o cs8900adriver.o ethernet.o a2slot.o $(A2OBJS) a2uther.lib: uthernet.o cs8900a.o cs8900adriver.o ethernet.o a2init.o $(A2OBJS)
ar65 a $@ $^ ar65 a $@ $^
a2lancegs.lib: lancegs.o lan91c96.o lan91c96driver.o ethernet.o a2slot.o $(A2OBJS) a2lancegs.lib: lancegs.o lan91c96.o lan91c96driver.o ethernet.o a2init.o $(A2OBJS)
ar65 a $@ $^ ar65 a $@ $^
a2uther2.lib: uthernet2.o w5100.o w5100driver.o ethernet.o a2slot.o $(A2OBJS) a2uther2.lib: uthernet2.o w5100.o w5100driver.o ethernet.o a2init.o $(A2OBJS)
ar65 a $@ $^ ar65 a $@ $^
a2combo.lib: uthernet.o cs8900a.o lancegs.o lan91c96.o uthernet2.o w5100.o ethernetcombo.o a2slotcombo.o $(A2OBJS) a2combo.lib: uthernet.o cs8900a.o lancegs.o lan91c96.o uthernet2.o w5100.o ethernetcombo.o a2initcombo.o $(A2OBJS)
ar65 a $@ $^ ar65 a $@ $^
atrdragon.lib: dragoncart.o cs8900a.o cs8900adriver.o ethernet.o $(ATROBJS) atrdragon.lib: dragoncart.o cs8900a.o cs8900adriver.o ethernet.o atrinit.o $(ATROBJS)
ar65 a $@ $^ ar65 a $@ $^
vic20rrnet.lib: vic20-rr-net.o cs8900a.o cs8900adriver.o ethernet.o $(VIC20OBJS) vic20rrnet.lib: vic20-rr-net.o cs8900a.o cs8900adriver.o ethernet.o vic20init.o $(VIC20OBJS)
ar65 a $@ $^ ar65 a $@ $^
clean: clean:

View File

@ -1,6 +1,7 @@
.include "zeropage.inc" .include "zeropage.inc"
.export a2_set_slot .export drv_init
.exportzp drv_init_default = 3 ; Apple 2 default slot
.import eth_driver_io_base .import eth_driver_io_base
@ -12,7 +13,7 @@
; A: slot number (1-7) ; A: slot number (1-7)
; outputs: ; outputs:
; none ; none
a2_set_slot: drv_init:
asl asl
asl asl
asl asl
@ -27,7 +28,7 @@ a2_set_slot:
; -- LICENSE FOR a2slot.s -- ; -- LICENSE FOR a2init.s --
; The contents of this file are subject to the Mozilla Public License ; 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 ; 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 ; compliance with the License. You may obtain a copy of the License at

View File

@ -1,6 +1,7 @@
.include "zeropage.inc" .include "zeropage.inc"
.export a2_set_slot .export drv_init
.exportzp drv_init_default = 3 ; Apple 2 default slot
.import _w5100_driver_io_base .import _w5100_driver_io_base
.import _cs8900a_driver_io_base .import _cs8900a_driver_io_base
@ -14,7 +15,7 @@
; A: slot number (1-7) ; A: slot number (1-7)
; outputs: ; outputs:
; none ; none
a2_set_slot: drv_init:
asl asl
asl asl
asl asl
@ -39,7 +40,7 @@ a2_set_slot:
; -- LICENSE FOR a2slotcombo.s -- ; -- LICENSE FOR a2initcombo.s --
; The contents of this file are subject to the Mozilla Public License ; 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 ; 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 ; compliance with the License. You may obtain a copy of the License at

8
drivers/atrinit.s Normal file
View File

@ -0,0 +1,8 @@
.export drv_init
.exportzp drv_init_default = 0
.code
drv_init:
rts

8
drivers/c64init.s Normal file
View File

@ -0,0 +1,8 @@
.export drv_init
.exportzp drv_init_default = 0
.code
drv_init:
rts

8
drivers/vic20init.s Normal file
View File

@ -0,0 +1,8 @@
.export drv_init
.exportzp drv_init_default = 0
.code
drv_init:
rts

View File

@ -12,14 +12,14 @@
.import dhcp_server .import dhcp_server
.ifdef A2_SLOT_SCAN .ifdef A2_SLOT_SCAN
.import a2_set_slot .import drv_init
.endif .endif
.macro init_ip_via_dhcp .macro init_ip_via_dhcp
.ifdef A2_SLOT_SCAN .ifdef A2_SLOT_SCAN
lda #1 lda #1
: pha : pha
jsr a2_set_slot jsr drv_init
jsr ip65_init jsr ip65_init
pla pla
bcc :+ bcc :+