From 1019985e8dee02f6568776311b43b934e788a470 Mon Sep 17 00:00:00 2001 From: Oliver Schmidt Date: Wed, 8 Jul 2015 15:51:59 +0200 Subject: [PATCH] Made use of recent changes for the web server demo. The Apple 2 web server now uses the "combo" library and optionally uses a2_set_slot to scan all slots for the Ethernet card. Combining both with DHCP allows for complete auto configuration. --- inc/net.i | 17 +++++++++++++++++ test/Makefile | 21 ++++++++------------- 2 files changed, 25 insertions(+), 13 deletions(-) diff --git a/inc/net.i b/inc/net.i index c234816..30d6359 100644 --- a/inc/net.i +++ b/inc/net.i @@ -13,8 +13,25 @@ .import cfg_get_configuration_ptr +.ifdef A2_SLOT_SCAN +.import a2_set_slot +.endif + .macro init_ip_via_dhcp +.ifdef A2_SLOT_SCAN + lda #1 +: pha + jsr a2_set_slot jsr ip65_init + pla + bcc :+ + adc #0 + cmp #8 + bcc :- +: +.else + jsr ip65_init +.endif php print_driver_init plp diff --git a/test/Makefile b/test/Makefile index ae30977..96f59a0 100644 --- a/test/Makefile +++ b/test/Makefile @@ -84,15 +84,6 @@ drivers: %.vicprg: %.o ip65 drivers $(INCFILES) ld65 -o $*.vicprg -C vic20-32k.cfg -m $*.vic.map -vm $< $(IP65LIB) $(VICDRIVERLIB) vic20.lib -webserver-uther.bin: httpd.o ip65 drivers $(INCFILES) - ld65 -o $@ -C apple2.cfg $< ../ip65/ip65_tcp.lib ../drivers/a2uther.lib apple2.lib - -webserver-uther2.bin: httpd.o ip65 drivers $(INCFILES) - ld65 -o $@ -C apple2.cfg $< ../ip65/ip65_tcp.lib ../drivers/a2uther2.lib apple2.lib - -webserver-lancegs.bin: httpd.o ip65 drivers $(INCFILES) - ld65 -o $@ -C apple2.cfg $< ../ip65/ip65_tcp.lib ../drivers/a2lancegs.lib apple2.lib - ip65.d64: prg $(C1541) -format ip65,00 d64 $@ $(C1541) -attach $@ -write dns.prg dns,p @@ -117,11 +108,15 @@ ip65.dsk: bin java -jar $(AC) -cc65 $@ tcp bin < tcp.bin java -jar $(AC) -cc65 $@ tftp bin < tftp.bin -ip65demo.dsk: webserver-uther.bin webserver-uther2.bin webserver-lancegs.bin +%-slotscan.o: %.s + ca65 -D A2_SLOT_SCAN -o $@ $< + +httpd-slotscan.bin: IP65LIB = ../ip65/ip65_tcp.lib + +ip65demo.dsk: httpd.bin httpd-slotscan.bin cp dos33.dsk $@ - java -jar $(AC) -cc65 $@ webserver-uther B < webserver-uther.bin - java -jar $(AC) -cc65 $@ webserver-uther2 B < webserver-uther2.bin - java -jar $(AC) -cc65 $@ webserver-lancegs B < webserver-lancegs.bin + java -jar $(AC) -cc65 $@ webserver-slot3 B < httpd.bin + java -jar $(AC) -cc65 $@ webserver-slotscan B < httpd-slotscan.bin clean: make -C ../ip65 clean