From 4da77b54bf5d5b48498125d84d7b5cce66ff46a6 Mon Sep 17 00:00:00 2001 From: jonnosan Date: Fri, 10 Apr 2009 10:51:19 +0000 Subject: [PATCH] git-svn-id: http://svn.code.sf.net/p/netboot65/code@96 93682198-c243-4bdb-bd91-e943c89aac3b --- client/clients/Makefile | 28 ++++++++++++++++++---------- client/clients/fix_cart.rb | 14 ++++++++++---- client/clients/rrnetboot.s | 35 ++++++++++++++++++++++++++++++++--- client/ip65/dhcp.s | 3 +++ client/ip65/dns.s | 5 ++++- client/ip65/tftp.s | 4 +++- dist/make_dist.rb | 1 + 7 files changed, 71 insertions(+), 19 deletions(-) diff --git a/client/clients/Makefile b/client/clients/Makefile index b62faa0..808ba9e 100644 --- a/client/clients/Makefile +++ b/client/clients/Makefile @@ -1,4 +1,3 @@ -CC=cl65 AS=ca65 LD=ld65 CFLAGS=-Oirs -t $(TARGET) @@ -11,11 +10,6 @@ INCFILES=\ ../inc/menu.i\ ../inc/nb65_constants.i\ -%.o: %.c - $(CC) -c $(CFLAGS) $< - -%.o: %.s $(INCFILES) - $(AS) $(AFLAGS) $< IP65LIB=../ip65/ip65.lib @@ -23,17 +17,30 @@ C64NETLIB=../drivers/c64net.lib APPLE2NETLIB=../drivers/apple2net.lib BOOTA2.PG2=../../server/boot/BOOTA2.PG2 - all: \ rrnetboot.bin \ utherboot.dsk \ + 64nicboot.bin \ $(BOOTA2.PG2) \ - + +rrnetboot.o: rrnetboot.s $(INCFILES) + $(AS) -DBANKSWITCH_SUPPORT=2 $(AFLAGS) $< + +64nicboot.o: rrnetboot.s $(INCFILES) + $(AS) -DBANKSWITCH_SUPPORT=1 $(AFLAGS) -o 64nicboot.o $< + +%.o: %.s $(INCFILES) + $(AS) $(AFLAGS) $< + rrnetboot.bin: rrnetboot.o $(IP65LIB) $(C64NETLIB) $(INCFILES) ../cfg/rrbin.cfg $(LD) -m rrnetboot.map -vm -C ../cfg/rrbin.cfg -o rrnetboot.bin $< $(IP65LIB) $(C64NETLIB) - ruby fix_cart.rb rrnetboot.bin - + ruby fix_cart.rb rrnetboot.bin 8193 + +64nicboot.bin: 64nicboot.o $(IP65LIB) $(C64NETLIB) $(INCFILES) ../cfg/rrbin.cfg + $(LD) -C ../cfg/rrbin.cfg -o 64nicboot.bin $< $(IP65LIB) $(C64NETLIB) + ruby fix_cart.rb 64nicboot.bin 8192 + utherboot.pg2: utherboot.o $(IP65LIB) $(APPLE2NETLIB) $(INCFILES) ../cfg/a2language_card.cfg $(LD) -m utherboot.map -C ../cfg/a2language_card.cfg -o utherboot.pg2 $< $(IP65LIB) $(APPLE2NETLIB) @@ -47,6 +54,7 @@ $(BOOTA2.PG2): bootmenu.o $(IP65LIB) $(APPLE2NETLIB) $(INCFILES) ../cfg/a2langua clean: rm -f *.o rm -f rrnetboot.bin rrnetboot.map + rm -f 64nicboot.bin 64nicboot.map rm -f utherboot.pg2 utherboot.map utherboot.dsk rm -f $(BOOTA2.PG2) diff --git a/client/clients/fix_cart.rb b/client/clients/fix_cart.rb index 88a33a7..2aca81d 100644 --- a/client/clients/fix_cart.rb +++ b/client/clients/fix_cart.rb @@ -3,18 +3,24 @@ # so we want to make sure the bin file is an odd length - specifically 8193 bytes # -FILE_LENGTH=8193 + PAD_BYTE=0xff.chr filename=ARGV[0] + if filename.nil? then puts "no filename specified" exit end - + +if ARGV[1].nil? then + puts "no padding length specified" + exit +end +file_length=ARGV[1].to_i infile=File.open(filename,"rb").read -puts "fixing length of #{filename} from #{infile.length} to #{FILE_LENGTH} bytes" +puts "fixing length of #{filename} from #{infile.length} to #{file_length} bytes" outfile=File.open(filename,"wb") outfile<