mirror of
https://github.com/bobbimanners/emailler.git
synced 2024-05-29 11:41:30 +00:00
git-svn-id: http://svn.code.sf.net/p/netboot65/code@26 93682198-c243-4bdb-bd91-e943c89aac3b
This commit is contained in:
parent
041608ff8e
commit
167d0009d0
|
@ -15,7 +15,7 @@ IP65LIB=../ip65/ip65.lib
|
|||
C64NETLIB=../drivers/c64net.lib
|
||||
APPLE2NETLIB=../drivers/apple2net.lib
|
||||
|
||||
BOOTA2.BIN=../../server/boot/BOOTA2.BIN
|
||||
BOOTA2.PG2=../../server/boot/BOOTA2.PG2
|
||||
|
||||
INCFILES=\
|
||||
../inc/common.i\
|
||||
|
@ -25,7 +25,7 @@ INCFILES=\
|
|||
all: \
|
||||
rrnetboot.bin \
|
||||
utherboot.dsk \
|
||||
$(BOOTA2.BIN) \
|
||||
$(BOOTA2.PG2) \
|
||||
|
||||
rrnetboot.bin: rrnetboot.o $(IP65LIB) $(C64NETLIB) $(INCFILES) ../cfg/rrbin.cfg
|
||||
$(LD) -m rrnetboot.map -C ../cfg/rrbin.cfg -o rrnetboot.bin $(AFLAGS) $< $(IP65LIB) $(C64NETLIB)
|
||||
|
@ -38,13 +38,14 @@ utherboot.dsk: utherboot.bin
|
|||
dsktool.rb --init dos33 utherboot.dsk -a utherboot.bin -t B
|
||||
dsktool.rb utherboot.dsk -a hello -t A
|
||||
|
||||
$(BOOTA2.BIN): bootmenu.o $(IP65LIB) $(APPLE2NETLIB) $(INCFILES) ../cfg/a2language_card.cfg
|
||||
$(LD) -m bootmenu.map -C ../cfg/a2language_card.cfg -o $(BOOTA2.BIN) $(AFLAGS) $< $(IP65LIB) $(APPLE2NETLIB)
|
||||
$(BOOTA2.PG2): bootmenu.o $(IP65LIB) $(APPLE2NETLIB) $(INCFILES) ../cfg/a2language_card.cfg
|
||||
$(LD) -m bootmenu.map -C ../cfg/a2language_card.cfg -o $(BOOTA2.PG2) $(AFLAGS) $< $(IP65LIB) $(APPLE2NETLIB)
|
||||
|
||||
clean:
|
||||
rm -f *.o
|
||||
rm -f rrnetboot.bin rrnetboot.map
|
||||
rm -f utherboot.bin utherboot.map utherboot.dsk
|
||||
rm -f $(BOOTA2.PG2)
|
||||
|
||||
distclean: clean
|
||||
rm -f *~
|
||||
|
|
|
@ -17,7 +17,8 @@
|
|||
.import tftp_load_address
|
||||
.import tftp_ip
|
||||
.import tftp_download
|
||||
|
||||
.import tftp_directory_listing
|
||||
|
||||
.import copymem
|
||||
.importzp copy_src
|
||||
.importzp copy_dest
|
||||
|
@ -49,6 +50,10 @@ bin_file_jmp: .res 3
|
|||
|
||||
; ------------------------------------------------------------------------
|
||||
|
||||
.bss
|
||||
tftp_dir_buffer: .res 1024
|
||||
|
||||
filename_locations: .res 256
|
||||
|
||||
.segment "STARTUP"
|
||||
|
||||
|
@ -141,7 +146,9 @@ init:
|
|||
jsr print_cr
|
||||
|
||||
init_ip_via_dhcp
|
||||
bcs bad_boot
|
||||
bcc :+
|
||||
jmp bad_boot
|
||||
:
|
||||
jsr print_ip_config
|
||||
|
||||
ldx #3
|
||||
|
@ -151,6 +158,42 @@ init:
|
|||
dex
|
||||
bpl :-
|
||||
|
||||
|
||||
ldax #tftp_dir_buffer
|
||||
stax tftp_load_address
|
||||
|
||||
ldax #getting_dir_listing_msg
|
||||
jsr print
|
||||
|
||||
ldax #tftp_dir_filemask
|
||||
stax tftp_filename
|
||||
jsr print
|
||||
jsr print_cr
|
||||
|
||||
jsr tftp_directory_listing
|
||||
bcs @dir_failed
|
||||
|
||||
ldax #$0000 ;load address will be first 2 bytes of file we download (LO/HI order)
|
||||
stax tftp_load_address
|
||||
|
||||
jsr select_filename_from_dir
|
||||
stax tftp_filename
|
||||
|
||||
ldax #downloading_msg
|
||||
jsr print
|
||||
|
||||
ldax tftp_filename
|
||||
jsr download
|
||||
bcc @file_downloaded_ok
|
||||
jmp bad_boot
|
||||
|
||||
@dir_failed:
|
||||
|
||||
ldax #tftp_dir_listing_fail_msg
|
||||
jsr print
|
||||
jsr print_cr
|
||||
|
||||
|
||||
ldax #$0000 ;load address will be first 2 bytes of file we download (LO/HI order)
|
||||
stax tftp_load_address
|
||||
|
||||
|
@ -220,11 +263,22 @@ download:
|
|||
clc
|
||||
rts
|
||||
|
||||
select_filename_from_dir:
|
||||
ldax #tftp_dir_buffer
|
||||
rts
|
||||
.rodata
|
||||
downloading_msg: .asciiz "DOWNLOADING "
|
||||
|
||||
getting_dir_listing_msg: .asciiz "RETRIEVING TFTP DIRECTORY "
|
||||
|
||||
tftp_dir_listing_fail_msg:
|
||||
.asciiz "DIR LISTING FAILED"
|
||||
|
||||
tftp_file:
|
||||
.asciiz "BOOTA2.BIN"
|
||||
.asciiz "BOOTA2.PG2"
|
||||
|
||||
tftp_dir_filemask:
|
||||
.asciiz "*.PG2"
|
||||
|
||||
tftp_download_fail_msg:
|
||||
.asciiz "DOWNLOAD FAILED"
|
||||
|
|
|
@ -126,7 +126,8 @@ class Netboot65TFTPServer
|
|||
Dir.chdir(bootfile_dir) do
|
||||
Dir.glob(filemask).each {|filename| data_to_send<<"#{filename}\000#{File.size(filename)}\000"}
|
||||
end
|
||||
Thread.new {send_data(client_ip,client_port,full_filename,data_to_send)}
|
||||
data_to_send<<0.chr
|
||||
Thread.new {send_data(client_ip,client_port,"DIR of #{filemask}",data_to_send)}
|
||||
end
|
||||
else
|
||||
send_error(client_ip,client_port,4,"opcode #{opcode} not supported")
|
||||
|
|
Loading…
Reference in New Issue
Block a user