Hi all.
Just wondering if anyone knows how to properly shut down ip65?
If I send the following small test (a cut down 'single packet' version of the testudpsend.s that was bundled with ip65) to my c64+ RR-Net + RetroReplay using codenet and run it once, it works fine. (errors on first send attempt, second send is successfully recieved at laptop).
However, if I subsequently run codenet, attempting to send a second .prg from my laptop fails, either with "c64 did not ack," or by crashing my laptop altogether(!) I don't see this behaviour if I reset the c64 before sending another test programme.
I'm also unclear as to when/how I'm meant to use ip65_process.
Any assistance would be much appreciated.
/Christopher Jam
Code:
init:
jsr ip65_init
bcc :+
ldax #failmsg
jmp print
: ldax #startmsg
jsr print
jmp main
send_err:
lda#2
sta $d020
jsr wait500ms
main:
jsr ip65_process
jsr send
bcs send_err
lda#4
sta $d020
: jsr ip65_process
rts
;jmp :-
send:
ldx #3
: lda serverip,x ; set destination
sta udp_send_dest,x
dex
bpl :-
ldax #3172 ; set source port
stax udp_send_src_port
ldax #3172 ; set dest port
stax udp_send_dest_port
ldax #udpsendend - udpsendmsg ; set length
stax udp_send_len
ldax #udpsendmsg
jsr udp_send
rts
wait500ms: ;25 frames
ldx #25
w1: bit $d011
bpl w1
w2: bit $d011
bmi w2
dex
bne w1
rts
; print elided for brevity - cf ip65 test directory.
udpsendmsg:
.byte "Greetings from the toad.", 13, 10
udpsendend:
serverip:
.byte 192, 168, 1, 1