From 18ea7216d8025ed8a2ef62649d8b342d97924f48 Mon Sep 17 00:00:00 2001 From: jonnosan Date: Tue, 22 Sep 2009 09:51:10 +0000 Subject: [PATCH] git-svn-id: http://svn.code.sf.net/p/netboot65/code@193 93682198-c243-4bdb-bd91-e943c89aac3b --- client/nb65/Makefile | 95 --- client/nb65/bootmenu.s | 145 ----- client/nb65/crt8040.obj | Bin 8192 -> 0 bytes client/nb65/crt8040.src | 107 ---- client/nb65/d64_upload.s | 544 ----------------- client/nb65/fix_cart.rb | 26 - client/nb65/hello | Bin 256 -> 0 bytes client/nb65/nb65_c64.s | 938 ------------------------------ client/nb65/nb65_c64_ram_header.s | 73 --- client/nb65/nb65_skeleton.s | 155 ----- client/nb65/set_ip_config.rb | 105 ---- client/nb65/utherboot.s | 313 ---------- 12 files changed, 2501 deletions(-) delete mode 100644 client/nb65/Makefile delete mode 100644 client/nb65/bootmenu.s delete mode 100644 client/nb65/crt8040.obj delete mode 100644 client/nb65/crt8040.src delete mode 100644 client/nb65/d64_upload.s delete mode 100644 client/nb65/fix_cart.rb delete mode 100644 client/nb65/hello delete mode 100644 client/nb65/nb65_c64.s delete mode 100644 client/nb65/nb65_c64_ram_header.s delete mode 100644 client/nb65/nb65_skeleton.s delete mode 100644 client/nb65/set_ip_config.rb delete mode 100644 client/nb65/utherboot.s diff --git a/client/nb65/Makefile b/client/nb65/Makefile deleted file mode 100644 index 7edfab3..0000000 --- a/client/nb65/Makefile +++ /dev/null @@ -1,95 +0,0 @@ -AS=ca65 -LD=ld65 -CFLAGS=-Oirs -t $(TARGET) -AFLAGS= - -INCFILES=\ - ../inc/common.i\ - ../inc/commonprint.i\ - ../inc/net.i\ - ../inc/menu.i\ - ../inc/nb65_constants.i\ - ../inc/version.i\ - -TCP_INCFILES=../inc/gopher.i ../inc/telnet.i ../inc/ping.i -IP65LIB=../ip65/ip65.lib - -IP65TCPLIB=../ip65/ip65_tcp.lib - -C64PROGLIB=../drivers/c64prog.lib -C64NB65LIB=../drivers/c64nb65.lib -APPLE2PROGLIB=../drivers/apple2prog.lib - -BOOTA2.PG2=../../server/boot/BOOTA2.PG2 - -#all: utherboot.dsk $(BOOTA2.PG2) nb65_rrnet.bin nb65_std_cart.bin nb65_c64_ram.prg d64_upload.prg c64boot.d64 d64_upload.d64 -all: nb65_std_cart.bin nb65_tcp_cart.bin nb65_tcp_cart_rr.bin nb65_c64_ram.prg - -nb65_c64_ram.o: nb65_c64.s $(INCFILES) - $(AS) -DBANKSWITCH_SUPPORT=0 $(AFLAGS) -o $@ $< - -nb65_std_cart.o: nb65_c64.s $(INCFILES) - $(AS) -DBANKSWITCH_SUPPORT=1 $(AFLAGS) -o $@ $< - -nb65_tcp_cart.o: nb65_c64.s $(INCFILES) $(TCP_INCFILES) - $(AS) -DBANKSWITCH_SUPPORT=3 $(AFLAGS) -o $@ $< - -nb65_rrnet.o: nb65_c64.s $(INCFILES) - $(AS) -DBANKSWITCH_SUPPORT=2 $(AFLAGS) -o $@ $< - -%.o: %.s $(INCFILES) - $(AS) $(AFLAGS) $< - -nb65_c64_ram_header.bin: nb65_c64_ram_header.o ../cfg/c64prg.cfg - $(LD) -C ../cfg/c64prg.cfg -o $@ nb65_c64_ram_header.o - -nb65_c64_ram.prg: nb65_c64_ram_header.bin nb65_c64_ram.o $(IP65LIB) $(C64NB65LIB) $(INCFILES) ../cfg/rrbin.cfg - $(LD) -m nb65_c64_ram.map -vm -C ../cfg/rrbin.cfg -o nb65_c64_ram.bin nb65_c64_ram.o $(IP65LIB) $(C64NB65LIB) - cat nb65_c64_ram_header.bin nb65_c64_ram.bin> nb65_c64_ram.prg - -%.prg: %.o $(IP65LIB) $(C64PROGLIB) $(INCFILES) ../cfg/c64prg.cfg - $(LD) -m $*.map -vm -C ../cfg/c64prg.cfg -o $*.prg $(AFLAGS) $< $(IP65LIB) $(C64PROGLIB) - -nb65_std_cart.bin: nb65_std_cart.o $(IP65LIB) $(C64NB65LIB) $(INCFILES) ../cfg/rrbin.cfg - $(LD) -m nb65_std_cart.map -vm -C ../cfg/rrbin.cfg -o $@ $< $(IP65LIB) $(C64NB65LIB) - ruby fix_cart.rb $@ 8192 - - -nb65_tcp_cart.bin: nb65_tcp_cart.o $(IP65TCPLIB) $(C64NB65LIB) $(INCFILES) ../cfg/c64_16kcart.cfg - $(LD) -m nb65_tcp_cart.map -vm -C ../cfg/c64_16kcart.cfg -o $@ $< $(IP65TCPLIB) $(C64NB65LIB) - ruby fix_cart.rb $@ 16384 - ruby dupe_cart.rb nb65_tcp_cart.bin nb65_29c040.bin 32 - -nb65_rrnet.bin: nb65_rrnet.o $(IP65LIB) $(C64NB65LIB) $(INCFILES) ../cfg/rrbin.cfg - $(LD) -m nb65_rrnet.map -Ln nb65_rr.lab -vm -C ../cfg/rrbin.cfg -o $@ $< $(IP65LIB) $(C64NB65LIB) - ruby fix_cart.rb $@ 8193 - -nb65_tcp_cart_rr.bin: nb65_tcp_cart.bin - cp crt8040.obj rrnet_header.bin - cat rrnet_header.bin nb65_tcp_cart.bin > nb65_tcp_cart_rr.bin - ruby fix_cart.rb $@ 32768 - -utherboot.pg2: utherboot.o $(IP65LIB) $(APPLE2PROGLIB) $(INCFILES) ../cfg/a2language_card.cfg - $(LD) -m utherboot.map -C ../cfg/a2language_card.cfg -o $@ $< $(IP65LIB) $(APPLE2PROGLIB) - -utherboot.dsk: utherboot.pg2 - ripxplore.rb --init AppleDos utherboot.dsk -a utherboot.pg2 -t AppleBinary - ripxplore.rb utherboot.dsk -a hello -t Applesoft - -c64boot.d64: nb65_c64_ram.prg - ripxplore.rb --init CbmDos $@ -a nb65_c64_ram.prg - ripxplore.rb $@ -a ..\test\test_cart_api.prg - -d64_upload.d64: d64_upload.prg - cp d64_upload.prg ../../server/boot/ - ripxplore.rb --init CbmDos $@ -a d64_upload.prg - -$(BOOTA2.PG2): bootmenu.o $(IP65LIB) $(APPLE2PROGLIB) $(INCFILES) ../cfg/a2language_card.cfg - $(LD) -m bootmenu.map -C ../cfg/a2language_card.cfg -o $(BOOTA2.PG2) $< $(IP65LIB) $(APPLE2PROGLIB) - -clean: - rm -f *.o *.bin *.map *.prg *.pg2 *.dsk *.d64 - rm -f $(BOOTA2.PG2) - -distclean: clean - rm -f *~ diff --git a/client/nb65/bootmenu.s b/client/nb65/bootmenu.s deleted file mode 100644 index a54c934..0000000 --- a/client/nb65/bootmenu.s +++ /dev/null @@ -1,145 +0,0 @@ -;############# -; -; This program looks for a TNDP server on the network, presents a catalog of volumes on that server, and allows a volume to be attached -; -; jonno@jamtronix.com - January 2009 -; - - .include "../inc/common.i" - .include "../inc/commonprint.i" - .include "../inc/net.i" - .import cls - - .import exit_to_basic - - .import copymem - .importzp copy_src - .importzp copy_dest - - .import __STARTUP_LOAD__ - .import __STARTUP_SIZE__ - .import __BSS_LOAD__ - .import __DATA_LOAD__ - .import __DATA_RUN__ - .import __DATA_SIZE__ - .import __RODATA_LOAD__ - .import __RODATA_RUN__ - .import __RODATA_SIZE__ - .import __CODE_LOAD__ - .import __CODE_RUN__ - .import __CODE_SIZE__ - -.segment "PAGE3" - -disable_language_card: .res 3 -bin_file_jmp: .res 3 - -; ------------------------------------------------------------------------ - - .segment "EXEHDR" - - .addr __STARTUP_LOAD__ ; Start address - .word __STARTUP_SIZE__+__CODE_SIZE__+__RODATA_SIZE__+__DATA_SIZE__+4 ; Size - -; ------------------------------------------------------------------------ - - -.segment "STARTUP" - - - lda $c089 ;enable language : card read ROM, write RAM, BANK 1 - - ;copy the monitor rom on to the language card - ldax #$f800 - stax copy_src - stax copy_dest - ldax #$0800 - jsr startup_copymem - - - lda $c08b ;enable language : card read RAM, write RAM, BANK 1 - lda $c08b ;this soft switch needs to be read twice - - - ;relocate the CODE segment - ldax #__CODE_LOAD__ - stax copy_src - ldax #__CODE_RUN__ - stax copy_dest - ldax #__CODE_SIZE__ - jsr startup_copymem - - - ;relocate the RODATA segment - ldax #__RODATA_LOAD__ - stax copy_src - ldax #__RODATA_RUN__ - stax copy_dest - ldax #__RODATA_SIZE__ - jsr startup_copymem - - ;relocate the DATA segment - ldax #__DATA_LOAD__ - stax copy_src - ldax #__DATA_RUN__ - stax copy_dest - ldax #__DATA_SIZE__ - jsr startup_copymem - - jmp init - -; copy memory -; set copy_src and copy_dest, length in A/X - - -end: .res 1 - -startup_copymem: - sta end - ldy #0 - - cpx #0 - beq @tail - -: lda (copy_src),y - sta (copy_dest),y - iny - bne :- - inc copy_src+1 ;next page - inc copy_dest+1 ;next page - dex - bne :- - -@tail: - lda end - beq @done - -: lda (copy_src),y - sta (copy_dest),y - iny - cpy end - bne :- - -@done: - rts - -.code - - -init: - - jsr cls - - ldax #startup_msg - jsr print - jsr print_cr - - jmp exit_to_basic - - .rodata -startup_msg: .byte "NETBOOT65 FOR APPLE 2 V0.1",13 -.byte "SEE README.TXT FOR MORE INFO (INCLUDING",13 -.byte "HOW TO RUN SOMETHING MORE INTERESTING)",13 -.byte 0 - - diff --git a/client/nb65/crt8040.obj b/client/nb65/crt8040.obj deleted file mode 100644 index b5ab5c15fb4a1333c78f131e17485bb29ccd71fa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8192 zcmeIuAqoOP7>40r*fL>ts~~7F2o}YlH_%}41fIY{%mwxU8w8p5hdqG7;+ADWm;>ly zHcZ_jqCvcY?fv5Wwa3`)t2kd46J4gQ+HFofyBAX>&037>A4JEg)Q{3Xk8;l>Dt)7~ zUx_lYpAtGI3{4pLD)Bn~zIlAj<6FDyb-vQV$!I557y<|&fB*srAbcname - jsr SETNAM - lda #02 - ldx #08 - ldy #02 - jsr SETLFS - jsr OPEN - bcs @error - ldx #command_buffer - lda #12 - jsr SETNAM - lda #15 - ldx $BA ;use whatever was last device # - ldy #15 - jsr SETLFS - jsr OPEN - bcs @error - - - jsr check_error_channel - lda #$30 - cmp error_buffer - beq @was_not_an_error - print #error_buffer - - @was_not_an_error: - ldx #$02 ; filenumber 2 - jsr CHKIN ;(file 2 now used as input) - - lda sector_buffer_address - sta temp_ptr - lda sector_buffer_address+1 - sta temp_ptr+1 - ldy #$00 -@loop: - jsr CHRIN ;(get a byte from file) - sta (temp_ptr),Y ; write byte to memory - iny - bne @loop ; next byte, end when 256 bytes are read -@close: - lda #15 ; filenumber 15 - jsr CLOSE - lda #$02 ; filenumber 2 - jsr CLOSE - ldx #$00 ; filenumber 0 = keyboard - jsr CHKIN ;(keyboard now input device again) - rts -@error: - pha - print #error_opening_channel - pla - call #NB65_PRINT_HEX - jmp @close - -check_error_channel: - LDX #$0F ; filenumber 15 - JSR CHKIN ;(file 15 now used as input) - LDY #$00 -@loop: - JSR READST ;(read status byte) - BNE @eof ; either EOF or read error - JSR CHRIN ;(get a byte from file) - sta error_buffer,y - iny - JMP @loop ; next byte - -@eof: - lda #0 - sta error_buffer,y - LDX #$00 ; filenumber 0 = keyboard - JSR CHKIN ;(keyboard now input device again) - RTS - -bad_boot: - print #press_a_key_to_continue -restart: - jsr get_key - jmp $fce2 ;do a cold start - - -print_a_as_errorcode: - pha - lda #' ' - jsr print_a - print #error_code - pla - call #NB65_PRINT_HEX - rts - -print_nb65_errorcode: - print #error_code - call #NB65_GET_LAST_ERROR - call #NB65_PRINT_HEX - print_cr - rts - -nb65_signature_not_found: - - ldy #0 -: - lda nb65_signature_not_found_message,y - beq restart - jsr print_a - iny - jmp :- - - - -make_read_sector_command: -;fill command buffer with command to read in track & sector -;returns length of command in Y - - ldy #0 - lda #85 ;"U" - sta command_buffer,y - iny - lda #$31 ;"1" - sta command_buffer,y - iny - lda #$20 ;" " - sta command_buffer,y - iny - lda #$32 ;"2" - file number - sta command_buffer,y - iny - lda #$20 ;" " - sta command_buffer,y - iny - lda #$30 ;"0" - drive number - sta command_buffer,y - iny - lda #$20 ;" " - sta command_buffer,y - iny - lda track - jsr byte_to_ascii - pha - txa - sta command_buffer,y - pla - iny - sta command_buffer,y - iny - lda #$20 ;" " - sta command_buffer,y - iny - lda sector - jsr byte_to_ascii - pha - txa - sta command_buffer,y - pla - iny - sta command_buffer,y - iny - - lda #0 - sta command_buffer,y ;make it ASCIIZ so we can print it - - rts - -byte_to_ascii: - cmp #30 - bmi @not_30 - ldx #$33 - clc - adc #18 - rts -@not_30: - cmp #20 - bmi @not_20 - ldx #$32 - clc - adc #28 - rts -@not_20: - cmp #10 - bmi @not_10 - ldx #$31 - clc - adc #38 - rts -@not_10: - ldx #$30 - clc - adc #48 - rts - - -reset_counters_to_first_sector: - ldx #1 - stx track - dex - stx sector - ldx #21 - stx sectors_in_track - rts - -move_to_next_sector: - inc sector - lda sector - cmp sectors_in_track - beq @move_to_next_track - rts -@move_to_next_track: - lda #0 - sta sector - inc track - lda track - cmp #18 - bne @not_track_18 - lda #19 - sta sectors_in_track - clc - rts -@not_track_18: - cmp #25 - bne @not_track_25 - lda #18 - sta sectors_in_track - clc - rts -@not_track_25: - cmp #31 - bne @not_track_31 - lda #17 - sta sectors_in_track - clc - rts -@not_track_31: - lda track - cmp #36 ;carry will be set if hit track 36 - rts - - -.rodata - -error_code: - .byte "ERROR CODE: $",0 -press_a_key_to_continue: - .byte "PRESS A KEY TO CONTINUE",13,0 - -failed: - .byte "FAILED ", 0 - -ok: - .byte "OK ", 0 - -initializing: - .byte "INITIALIZING ",0 -track_no: - .byte "TRACK ",0 - - -sector_no: - .byte " SECTOR ",0 - -signon_message: - .byte "D64 UPLOADER V0.1",13,0 - -enter_filename: -.byte "SEND AS: ",0 - -drive_error: - .byte "DRIVE ACCESS ERROR - ",0 - nb65_signature_not_found_message: - .byte "NO NB65 API FOUND",13,"PRESS ANY KEY TO RESET", 0 - error_opening_channel: - .byte "ERROR OPENING CHANNEL $",0 - -disk_access: -.byte 13,13,13,13,13,"SENDING TO CHANNEL $",0 - -nb65_signature: - .byte $4E,$42,$36,$35 ; "NB65" - API signature - .byte ' ',0 ; so we can use this as a string -position_cursor_for_track_display: -; .byte $13,13,13,13,13,13,13,13,13,13,13," SENDING ",0 -.byte $13,13,13,"SENDING ",0 -position_cursor_for_error_display: - .byte $13,13,13,13,"LAST ",0 - -cname: .byte '#' \ No newline at end of file diff --git a/client/nb65/fix_cart.rb b/client/nb65/fix_cart.rb deleted file mode 100644 index 2aca81d..0000000 --- a/client/nb65/fix_cart.rb +++ /dev/null @@ -1,26 +0,0 @@ -# -# Vice will treat a cartridge bin file that is of an even length as if the first 2 bytes in the file are a load address to be skipped over -# so we want to make sure the bin file is an odd length - specifically 8193 bytes -# - - -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" -outfile=File.open(filename,"wb") -outfile< offset, length - :mac=>[0x18,6], - :ip=>[0x1e,4], - :netmask=>[0x22,4], - :gateway=>[0x26,4], - :dns=>[0x2a,4], - :tftp=>[0x2e,4], - } - - @progname=File.basename($0) - def show_options - puts "valid options are: #{@cartridge_offsets.keys.join(", ")}" - puts "mac auto will automagically generate a pseudorandom MAC" -end - def usage - puts "#{@progname}