diff --git a/client/basic/Makefile b/client/basic/Makefile index 3034cf7..2cd4580 100644 --- a/client/basic/Makefile +++ b/client/basic/Makefile @@ -43,7 +43,7 @@ kipperbas.d64: kipperbas.prg chat ripxplore.rb $@ -I CbmDos -a kipperbas.prg # ripxplore.rb $@ -a kipperbas.prg cp chat autoexec.bas -# ripxplore.rb $@ -a autoexec.bas -t C64Prg + ripxplore.rb $@ -a autoexec.bas -t C64Prg clean: rm -f *.o *.bin *.map *.prg diff --git a/client/basic/bails.d64 b/client/basic/bails.d64 index 0bd5f6b..41be75c 100644 Binary files a/client/basic/bails.d64 and b/client/basic/bails.d64 differ diff --git a/client/basic/kipperbas.d64 b/client/basic/kipperbas.d64 index 7689374..1f41bdd 100644 Binary files a/client/basic/kipperbas.d64 and b/client/basic/kipperbas.d64 differ diff --git a/client/basic/kipperbas.s b/client/basic/kipperbas.s index 21655f4..5068258 100644 --- a/client/basic/kipperbas.s +++ b/client/basic/kipperbas.s @@ -211,7 +211,7 @@ install_new_vectors_loop: rts welcome_banner: -.byte " *** KIPPER BASIC 1.21" +.byte " *** KIPPER BASIC 1.22" .include "timestamp.i" .byte " ***" @@ -1323,18 +1323,24 @@ tcpconnect_callback: stax copy_dest ldax tcp_inbound_data_ptr stax copy_src + + lda tcp_inbound_data_length ldx tcp_inbound_data_length+1 - beq @short_packet cpx #$ff bne @not_end_packet + +@end_packet: lda #0 sta connection_state rts @not_end_packet: + jsr copymem + ldx tcp_inbound_data_length+1 + beq @short_packet lda #$ff @short_packet: - + lda tcp_inbound_data_length set_input_string: pha lda #'I' @@ -1355,10 +1361,31 @@ set_input_string: ldx #0 jsr copymem : + + lda #'I'+$80 + ldx #'P'+$80 + jsr find_var + lda #transfer_buffer + sta (VARPNT),y + + lda #'I'+$80 + ldx #'L'+$80 + jsr find_var + lda tcp_inbound_data_length+1 + sta (VARPNT),y + iny + lda tcp_inbound_data_length + sta (VARPNT),y + rts poll_keyword: lda #0 + sta tcp_inbound_data_length + sta tcp_inbound_data_length+1 jsr set_input_string jsr set_connection_state jsr ip65_process @@ -1462,7 +1489,7 @@ tcpblat_keyword: evaluate: lda #$00 - sta $0D ;set string flag to not string + sta $0D ;set string flag to not stringe jsr CHRGET cmp #$E3 ; PING keyword bne @done @@ -1636,7 +1663,7 @@ gateway_string: .res 15 temp_bcd: .res 2 ping_counter: .res 1 string_buffer: .res 128 -transfer_buffer: .res 256 +transfer_buffer: .res 1500 file_opened: .res 1 connection_state: .res 1 netcat_timeout: .res 1 diff --git a/client/wiznet/Makefile b/client/wiznet/Makefile index ca00765..943c05d 100644 --- a/client/wiznet/Makefile +++ b/client/wiznet/Makefile @@ -93,5 +93,5 @@ bootc64.prg: # cp wizbobcart.prg ../../server/boot/bootc64.prg # cp telnetd.prg ../../server/boot/bootc64.prg # cp wizboot2.prg ../../server/boot/bootc64.prg - cp wiztest.prg ../../server/boot/bootc64.prg -# cp wizflash.prg ../../server/boot/bootc64.prg \ No newline at end of file +# cp wiztest.prg ../../server/boot/bootc64.prg + cp wizflash.prg ../../server/boot/bootc64.prg \ No newline at end of file diff --git a/client/wiznet/wizflashheader.s b/client/wiznet/wizflashheader.s index 5214156..446afc2 100644 --- a/client/wiznet/wizflashheader.s +++ b/client/wiznet/wizflashheader.s @@ -49,20 +49,41 @@ init: sta $d011 jsr turn_off_write_protect + + ldax #$8000 + stax eeprom_ptr + +@reset_64_bytes: + inc $d020 + + ldy #0 +@reset_1_byte: + lda #$55 + sta (eeprom_ptr),y + iny + cpy #64 + bne @reset_1_byte + jsr poll_till_stable + + clc + tya + adc eeprom_ptr + sta eeprom_ptr + bcc :+ + inc eeprom_ptr+1 +: + + lda eeprom_ptr+1 + cmp #$A0 + bne @reset_64_bytes + + ldax #cart_data stax cart_data_ptr ldax #$8000 stax eeprom_ptr @copy_64_bytes: -; lda cart_data_ptr+1 -; jsr print_hex -; lda cart_data_ptr -; jsr print_hex -; lda eeprom_ptr+1 -; jsr print_hex -; lda eeprom_ptr -; jsr print_hex inc $d020 ldy #0 @@ -94,6 +115,15 @@ init: bne @copy_64_bytes ;now validate the data + lda #$0 + sta validation_counter + lda old_d011 + sta $d011 + + ldax #validating + jsr print + +@validation_loop: ldax #cart_data stax cart_data_ptr ldax #$8000 @@ -105,13 +135,22 @@ init: bne @validation_error iny bne @compare_loop + lda #'.' + jsr print_a + inc cart_data_ptr+1 inc eeprom_ptr+1 lda eeprom_ptr+1 cmp #$A0 bne @compare_loop + + inc validation_counter + lda validation_counter + cmp #$08 + bne @validation_loop ldax #ok jsr print + ldax #$8000 stax eeprom_ptr @@ -274,6 +313,7 @@ banner: .byte 13 .byte 0 ok: .byte 13,"OK",13,0 +validating: .byte 13,"CHECKING EEPROM DATA ",13,0 validation_error: .byte 13,"VALIDATION ERROR : $",0 offset: .byte " OFFSET : $",0 @@ -287,3 +327,4 @@ cart_data: ;this should point to where the cart data gets appended. error_offset: .res 1 byte_ptr: .res 1 old_d011: .res 1 +validation_counter: .res 1