mirror of
https://github.com/bobbimanners/emailler.git
synced 2025-01-15 20:29:53 +00:00
clean up ip65 build
git-svn-id: http://svn.code.sf.net/p/netboot65/code@306 93682198-c243-4bdb-bd91-e943c89aac3b
This commit is contained in:
parent
c6794ff026
commit
b65824fee4
@ -1,5 +1,3 @@
|
||||
TARGET=c64
|
||||
|
||||
|
||||
.PHONY: ip65 drivers test clean distclean kipperterm2 examples carts basic wiznet
|
||||
|
||||
|
@ -13,8 +13,9 @@ INCFILES=\
|
||||
|
||||
IP65LIB=../ip65/ip65_tcp.lib
|
||||
C64RRNETLIB=../drivers/c64rrnet.lib
|
||||
VIC20RRNETLIB=../drivers/vic20rrnet.lib
|
||||
|
||||
all: ip65 kipperbas.d64 bails.d64
|
||||
all: ip65 kipperbas.d64 bails.d64 kipperbasv20.prg
|
||||
|
||||
ip65:
|
||||
make -C ../ip65 all
|
||||
@ -24,6 +25,9 @@ ip65:
|
||||
|
||||
%.prg: %.o $(IP65LIB) $(C64RRNETLIB) $(INCFILES) ../cfg/kipperbas.cfg
|
||||
$(LD) -m $*.map -vm -C ../cfg/kipperbas.cfg -o $*.prg $(AFLAGS) $< $(IP65LIB) $(C64RRNETLIB)
|
||||
|
||||
kipperbasv20.prg: kipperbasv20.o $(IP65LIB) $(VIC20RRNETLIB) $(INCFILES) ../cfg/kipperbasv20.cfg
|
||||
$(LD) -m kipperbasv20.map -vm -C ../cfg/kipperbasv20.cfg -o kipperbasv20.prg $(AFLAGS) $< $(IP65LIB) $(VIC20RRNETLIB)
|
||||
|
||||
|
||||
bails.d64: bails.prg
|
||||
|
Binary file not shown.
Binary file not shown.
1658
client/basic/kipperbasv20.s
Normal file
1658
client/basic/kipperbasv20.s
Normal file
File diff suppressed because it is too large
Load Diff
@ -7,14 +7,14 @@ MEMORY {
|
||||
}
|
||||
SEGMENTS {
|
||||
EXEHDR: load = HEADER, type = ro;
|
||||
STARTUP: load = RAM,run=RAM, type = ro, define = yes;
|
||||
STARTUP: load = RAM,run=RAM, type = ro, define = yes, optional=yes;
|
||||
CODE: load = RAM, run=RAM, type = ro, define = yes;
|
||||
RODATA: load = RAM, run=RAM, type = ro , define = yes;
|
||||
IP65_DEFAULTS: load = RAM, run=RAM, type = ro , define = yes;
|
||||
DATA: load = RAM, run=RAM, type = rw , define = yes;
|
||||
BSS: load=RAM, type = bss, define = yes;
|
||||
TCP_VARS: load = RAM, type = bss;
|
||||
APP_SCRATCH: load = RAM, type = bss;
|
||||
TCP_VARS: load = RAM, type = bss, optional=yes;
|
||||
APP_SCRATCH: load = RAM, type = bss , optional=yes;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
IP65ZP: load = IP65ZP, type = zp;
|
||||
}
|
||||
|
26
client/cfg/kipperbasv20.cfg
Normal file
26
client/cfg/kipperbasv20.cfg
Normal file
@ -0,0 +1,26 @@
|
||||
|
||||
MEMORY {
|
||||
IP65ZP: start = $A3, size = $12, type = rw;
|
||||
STARTRAM: start = $11FF, size = $1000, file = %O;
|
||||
MAINRAM: start = $4000, size = $3FC9, define = yes, file = %O;
|
||||
HIRAM: start = $A000, size = $1fE0;
|
||||
}
|
||||
SEGMENTS {
|
||||
STARTUP: load = STARTRAM, type = rw;
|
||||
MAINSTART: load = MAINRAM, type = rw;
|
||||
|
||||
IP65_DEFAULTS: load = MAINRAM, type = ro;
|
||||
CODE: load = MAINRAM, type = ro;
|
||||
SELF_MODIFIED_CODE: load = MAINRAM, type = rw;
|
||||
RODATA: load = MAINRAM, type = ro;
|
||||
DATA: load = MAINRAM, type = rw, define = yes;
|
||||
HTTP_VARS: load = MAINRAM, type = rw, define = yes;
|
||||
BSS: load = MAINRAM, type = bss;
|
||||
|
||||
IP65ZP: load = IP65ZP, type = zp;
|
||||
|
||||
ZEROPAGE: load = IP65ZP, type = zp;
|
||||
|
||||
TCP_VARS: load = HIRAM, type = bss;
|
||||
|
||||
}
|
@ -1,23 +1,23 @@
|
||||
#assumes a fully expanded VIC 20
|
||||
MEMORY {
|
||||
ZP: start = $02, size = $1A, type = rw ;
|
||||
IP65ZP: start = $5f, size = $10, type = rw;
|
||||
MEMORY {
|
||||
ZP: start = $02, size = $1A, type = rw ;
|
||||
IP65ZP: start = $5f, size = $10, type = rw;
|
||||
RAM: start = $11FF, size = $6e00, file = %O;
|
||||
}
|
||||
SEGMENTS {
|
||||
STARTUP: load = RAM, type = ro ,define = yes, optional=yes;
|
||||
CODE: load = RAM, type = ro,define = yes;
|
||||
}
|
||||
SEGMENTS {
|
||||
STARTUP: load = RAM, type = ro ,define = yes, optional=yes;
|
||||
CODE: load = RAM, type = ro,define = yes;
|
||||
DATA: load = RAM, type = rw,define = yes;
|
||||
SELF_MODIFIED_CODE: load = RAM, type = rw,define = yes, optional=yes;
|
||||
VIC_DATA: load = RAM, type = rw,align = $800, optional=yes;
|
||||
VIC_DATA: load = RAM, type = rw,align = $800, optional=yes;
|
||||
RODATA: load = RAM, type = ro,define = yes, optional=yes;
|
||||
IP65_DEFAULTS: load = RAM, type = rw,define = yes, optional=yes;
|
||||
BSS: load = RAM, type = bss, optional=yes;
|
||||
# SAFE_BSS: load = RAM3000, type = bss, optional=yes;
|
||||
APP_SCRATCH: load = RAM, type = bss, optional=yes;
|
||||
ZEROPAGE: load = ZP, type = zp, optional=yes;
|
||||
APP_SCRATCH: load = RAM, type = bss, optional=yes;
|
||||
ZEROPAGE: load = ZP, type = zp, optional=yes;
|
||||
IP65ZP: load = IP65ZP, type = zp, optional=yes;
|
||||
TCP_VARS: load = RAM, type = bss, optional=yes;
|
||||
HTTP_VARS: load = RAM, type = bss, optional=yes;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -10,19 +10,27 @@ AFLAGS=
|
||||
$(AS) $(AFLAGS) $<
|
||||
|
||||
|
||||
# a2uther.lib Apple //, with an Uthernet card (cs8900a chipset) in slot #3
|
||||
# a2lancegs.lib Apple //, with a LANceGS card (lan91c96)
|
||||
# c64rrnet.lib C64 with RR-NET or clone at $de0x
|
||||
# c64wiznet.lib C64 with Wiznet W5100 addressed at $df2x
|
||||
# vic20rrnet.lib C64 with RR-NET or clone at $980x
|
||||
|
||||
|
||||
DRIVERS=\
|
||||
apple2prog.lib \
|
||||
a2uther.lib \
|
||||
a2lancegs.lib \
|
||||
c64rrnet.lib \
|
||||
c64wiznet.lib \
|
||||
vic20rrnet.lib \
|
||||
|
||||
|
||||
|
||||
all: $(DRIVERS)
|
||||
|
||||
a2lancegs.lib: a2print.o lan91c96.o a2timer.o a2kernal.o a2input.o a2charconv.o
|
||||
ar65 a $@ $^
|
||||
|
||||
apple2prog.lib: a2print.o uthernet.o a2timer.o a2kernal.o a2input.o a2charconv.o cs8900a.o
|
||||
a2uther.lib: a2print.o uthernet.o a2timer.o a2kernal.o a2input.o a2charconv.o cs8900a.o
|
||||
ar65 a $@ $^
|
||||
|
||||
c64rrnet.lib: c64print.o rr-net.o c64timer.o c64kernal.o c64inputs.o cbm_disk_access.o petscii_charconv.o c64_vt100.o cs8900a.o
|
||||
@ -31,9 +39,7 @@ c64rrnet.lib: c64print.o rr-net.o c64timer.o c64kernal.o c64inputs.o cbm_disk_ac
|
||||
c64wiznet.lib: w5100.o c64print.o c64timer.o c64kernal.o c64inputs.o cbm_disk_access.o petscii_charconv.o c64_vt100.o
|
||||
ar65 a $@ $^
|
||||
|
||||
|
||||
vic20rrnet.lib: vic20print.o vic20-rr-net.o vic20timer.o vic20input.o cbm_disk_access.o petscii_charconv.o cs8900a.o
|
||||
|
||||
ar65 a $@ $^
|
||||
|
||||
|
||||
|
75
client/drivers/lan91c96.s
Normal file
75
client/drivers/lan91c96.s
Normal file
@ -0,0 +1,75 @@
|
||||
; Ethernet driver for W5100 W5100 chip
|
||||
;
|
||||
|
||||
.ifndef KPR_API_VERSION_NUMBER
|
||||
.define EQU =
|
||||
.include "../inc/kipper_constants.i"
|
||||
.endif
|
||||
|
||||
.include "../inc/common.i"
|
||||
|
||||
.export eth_init
|
||||
.export eth_rx
|
||||
.export eth_tx
|
||||
.export eth_driver_name
|
||||
|
||||
.import eth_inp
|
||||
.import eth_inp_len
|
||||
.import eth_outp
|
||||
.import eth_outp_len
|
||||
|
||||
|
||||
.code
|
||||
|
||||
;initialize the ethernet adaptor
|
||||
;inputs: none
|
||||
;outputs: carry flag is set if there was an error, clear otherwise
|
||||
eth_init:
|
||||
sec ;FIX ME !
|
||||
rts
|
||||
|
||||
|
||||
;receive a packet
|
||||
;inputs: none
|
||||
;outputs:
|
||||
; if there was an error receiving the packet (or no packet was ready) then carry flag is set
|
||||
; if packet was received correctly then carry flag is clear,
|
||||
; eth_inp contains the received packet,
|
||||
; and eth_inp_len contains the length of the packet
|
||||
eth_rx:
|
||||
sec ;FIX ME !
|
||||
rts
|
||||
|
||||
|
||||
; send a packet
|
||||
;inputs:
|
||||
; eth_outp: packet to send
|
||||
; eth_outp_len: length of packet to send
|
||||
;outputs:
|
||||
; if there was an error sending the packet then carry flag is set
|
||||
; otherwise carry flag is cleared
|
||||
eth_tx:
|
||||
sec ;FIX ME !
|
||||
rts
|
||||
|
||||
|
||||
.rodata
|
||||
eth_driver_name:
|
||||
.asciiz "LANceGS (91C96)"
|
||||
|
||||
; The contents of this file are subject to the Mozilla Public License
|
||||
; Version 1.1 (the "License"); you may not use this file except in
|
||||
; compliance with the License. You may obtain a copy of the License at
|
||||
; http://www.mozilla.org/MPL/
|
||||
;
|
||||
; Software distributed under the License is distributed on an "AS IS"
|
||||
; basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||
; License for the specific language governing rights and limitations
|
||||
; under the License.
|
||||
;
|
||||
; The Original Code is ip65.
|
||||
;
|
||||
; The Initial Developer of the Original Code is <## TBD ##>
|
||||
; Portions created by the Initial Developer is Copyright (C) 2010
|
||||
; All Rights Reserved.
|
||||
; -- LICENSE END --
|
@ -1 +1 @@
|
||||
.byte "1.0.36"
|
||||
.byte "1.0.38"
|
||||
|
@ -3,6 +3,11 @@ LD=ld65
|
||||
AFLAGS=
|
||||
|
||||
|
||||
# ip65.lib : minimal IP stack (UDP only)
|
||||
# ip65_tcp.lib : full featured TCP/IP stack
|
||||
# ip65_wiznet.lib : hybrid stack for use with the w5100 chip : UDP,ICMP & ARP is done on host, TCP is on w5100
|
||||
|
||||
|
||||
%.o: %.c
|
||||
$(CC) -c $(CFLAGS) $<
|
||||
|
||||
@ -26,7 +31,6 @@ ETHOBJS= \
|
||||
dottedquad.o \
|
||||
output_buffer.o\
|
||||
tftp.o \
|
||||
sntp.o \
|
||||
parser.o \
|
||||
string_utils.o \
|
||||
telnet.o \
|
||||
|
@ -52,7 +52,7 @@ ip65_error: .res 1 ;last error code
|
||||
;outputs: AX set to a pseudo-random 16 bit number
|
||||
ip65_random_word:
|
||||
jsr timer_read ;sets AX
|
||||
; adc $d018 ;on a c64, this is the raster register
|
||||
adc $9004 ;on a VIC 20, this is the raster register
|
||||
adc $d41b; on a c64, this is a 'random' number from the SID
|
||||
pha
|
||||
adc ip65_ctr_arp
|
||||
|
@ -1,210 +0,0 @@
|
||||
; Simple Network Time Protocol implementation - per RFC 2030
|
||||
|
||||
MAX_SNTP_MESSAGES_SENT=8
|
||||
.include "../inc/common.i"
|
||||
.ifndef KPR_API_VERSION_NUMBER
|
||||
.define EQU =
|
||||
.include "../inc/kipper_constants.i"
|
||||
.endif
|
||||
|
||||
.export sntp_ip
|
||||
.export sntp_utc_timestamp
|
||||
.export sntp_get_time
|
||||
|
||||
.import ip65_process
|
||||
.import ip65_error
|
||||
|
||||
|
||||
.import udp_add_listener
|
||||
.import udp_remove_listener
|
||||
|
||||
.import udp_callback
|
||||
.import udp_send
|
||||
|
||||
.import udp_inp
|
||||
.import output_buffer
|
||||
.importzp udp_data
|
||||
|
||||
.import udp_send_dest
|
||||
.import udp_send_src_port
|
||||
.import udp_send_dest_port
|
||||
.import udp_send_len
|
||||
.import check_for_abort_key
|
||||
.import timer_read
|
||||
|
||||
.segment "IP65ZP" : zeropage
|
||||
|
||||
|
||||
.data
|
||||
sntp_ip: .byte $ff,$ff,$ff,$ff ;can be set to ip address of server that will be queried via sntp (default is a local LAN broadcast)
|
||||
|
||||
.bss
|
||||
|
||||
; sntp packet offsets
|
||||
sntp_inp = udp_inp + udp_data
|
||||
|
||||
sntp_server_port=123
|
||||
sntp_client_port=55123
|
||||
|
||||
sntp_utc_timestamp: .res 4 ; will be set to seconds (only) part of utc timestamp (seconds since 00:00 on Jan 1, 1900)
|
||||
|
||||
; sntp state machine
|
||||
sntp_initializing = 1 ; initial state
|
||||
sntp_query_sent = 2 ; sent a query, waiting for a response
|
||||
sntp_completed = 3 ; got a good response
|
||||
|
||||
sntp_timer: .res 1
|
||||
sntp_loop_count: .res 1
|
||||
sntp_break_polling_loop: .res 1
|
||||
|
||||
sntp_state: .res 1
|
||||
sntp_message_sent_count: .res 1
|
||||
|
||||
|
||||
.code
|
||||
|
||||
; query an sntp server for current UTC time
|
||||
; inputs:
|
||||
; sntp_ip must point to an SNTP server
|
||||
; outputs:
|
||||
; carry flag is set if there was an error, clear otherwise
|
||||
; sntp_utc_timestamp: set to the number of seconds (seconds since 00:00 on Jan 1, 1900) - timezone is UTC
|
||||
sntp_get_time:
|
||||
ldax #sntp_in
|
||||
stax udp_callback
|
||||
ldax #sntp_client_port
|
||||
jsr udp_add_listener
|
||||
bcc :+
|
||||
rts
|
||||
:
|
||||
|
||||
lda #sntp_initializing
|
||||
sta sntp_state
|
||||
lda #0 ;reset the "message sent" counter
|
||||
sta sntp_message_sent_count
|
||||
|
||||
jsr send_sntp_query
|
||||
|
||||
@sntp_polling_loop:
|
||||
lda sntp_message_sent_count
|
||||
adc #1
|
||||
sta sntp_loop_count ;we wait a bit longer between each resend
|
||||
@outer_delay_loop:
|
||||
lda #0
|
||||
sta sntp_break_polling_loop
|
||||
jsr timer_read
|
||||
stx sntp_timer ;we only care about the high byte
|
||||
|
||||
@inner_delay_loop:
|
||||
jsr ip65_process
|
||||
jsr check_for_abort_key
|
||||
bcc @no_abort
|
||||
lda #KPR_ERROR_ABORTED_BY_USER
|
||||
sta ip65_error
|
||||
rts
|
||||
@no_abort:
|
||||
|
||||
lda sntp_state
|
||||
cmp #sntp_completed
|
||||
beq @complete
|
||||
|
||||
lda sntp_break_polling_loop
|
||||
bne @break_polling_loop
|
||||
jsr timer_read
|
||||
cpx sntp_timer ;this will tick over after about 1/4 of a second
|
||||
beq @inner_delay_loop
|
||||
|
||||
dec sntp_loop_count
|
||||
bne @outer_delay_loop
|
||||
|
||||
@break_polling_loop:
|
||||
jsr send_sntp_query
|
||||
inc sntp_message_sent_count
|
||||
lda sntp_message_sent_count
|
||||
cmp #MAX_SNTP_MESSAGES_SENT-1
|
||||
bpl @too_many_messages_sent
|
||||
jmp @sntp_polling_loop
|
||||
|
||||
@complete:
|
||||
|
||||
ldax #sntp_client_port
|
||||
jsr udp_remove_listener
|
||||
rts
|
||||
|
||||
@too_many_messages_sent:
|
||||
@failed:
|
||||
ldax #sntp_client_port
|
||||
jsr udp_remove_listener
|
||||
lda #KPR_ERROR_TIMEOUT_ON_RECEIVE
|
||||
sta ip65_error
|
||||
sec ;signal an error
|
||||
rts
|
||||
|
||||
|
||||
|
||||
send_sntp_query:
|
||||
|
||||
lda #$1B ;LI=00, VN=011,MODE=011
|
||||
stax output_buffer
|
||||
lda #$0
|
||||
ldx #$30 ;pad remainder of query packet with 0 bytes
|
||||
stx udp_send_len
|
||||
sta udp_send_len+1
|
||||
:
|
||||
sta output_buffer+1,x
|
||||
dex
|
||||
bpl :-
|
||||
ldax #sntp_client_port
|
||||
stax udp_send_src_port
|
||||
ldax #sntp_server_port
|
||||
stax udp_send_dest_port
|
||||
ldx #3 ; set destination address
|
||||
: lda sntp_ip,x
|
||||
sta udp_send_dest,x
|
||||
dex
|
||||
bpl :-
|
||||
|
||||
ldax #output_buffer
|
||||
jsr udp_send
|
||||
bcs @error_on_send
|
||||
lda #sntp_query_sent
|
||||
sta sntp_state
|
||||
@error_on_send:
|
||||
rts
|
||||
|
||||
|
||||
sntp_in:
|
||||
|
||||
ldx #3
|
||||
ldy #0
|
||||
:
|
||||
lda sntp_inp+$28,x ;the 'transmit' timestamp (in big end order)
|
||||
sta sntp_utc_timestamp,y
|
||||
iny
|
||||
dex
|
||||
bpl :-
|
||||
|
||||
inc sntp_break_polling_loop
|
||||
lda #sntp_completed
|
||||
sta sntp_state
|
||||
rts
|
||||
|
||||
|
||||
;-- LICENSE FOR sntp.s --
|
||||
; The contents of this file are subject to the Mozilla Public License
|
||||
; Version 1.1 (the "License"); you may not use this file except in
|
||||
; compliance with the License. You may obtain a copy of the License at
|
||||
; http://www.mozilla.org/MPL/
|
||||
;
|
||||
; Software distributed under the License is distributed on an "AS IS"
|
||||
; basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||
; License for the specific language governing rights and limitations
|
||||
; under the License.
|
||||
;
|
||||
; The Original Code is ip65.
|
||||
;
|
||||
; The Initial Developer of the Original Code is Jonno Downes,
|
||||
; jonno@jamtronix.com.
|
||||
; Portions created by the Initial Developer are Copyright (C) 2009
|
||||
; Jonno Downes. All Rights Reserved.
|
||||
; -- LICENSE END --
|
@ -1 +1 @@
|
||||
.byte "2011-01-08"
|
||||
.byte "2011-01-15"
|
||||
|
@ -11,8 +11,10 @@ IP65TCPLIB=../ip65/ip65_tcp.lib
|
||||
C64RRNETLIB=../drivers/c64rrnet.lib
|
||||
C64WIZNETLIB=../drivers/c64wiznet.lib
|
||||
IP65WIZNETLIB=../ip65/ip65_wiznet.lib
|
||||
APPLE2PROGLIB=../drivers/apple2prog.lib
|
||||
VIC20RRNETLIB=../drivers/vic20rrnet.lib
|
||||
A2UTHERLIB=../drivers/a2uther.lib
|
||||
A2LANCEGSLIB=../drivers/a2lancegs.lib
|
||||
VIC20RRNETLIB=../drivers/vic20rrnet.lib
|
||||
|
||||
|
||||
INCFILES=\
|
||||
../inc/common.i\
|
||||
@ -34,15 +36,15 @@ all: \
|
||||
testdottedquad.pg2 \
|
||||
testdottedquad.prg \
|
||||
test_tcp.prg \
|
||||
test_xmodem.prg \
|
||||
test_xmodem.prg \
|
||||
test_vic20.prg \
|
||||
test_httpd.prg \
|
||||
test_parser.prg \
|
||||
test_ping.prg \
|
||||
test_sntp.prg \
|
||||
test_get_url.prg \
|
||||
test_wiznet.prg \
|
||||
test_parse_querystring.prg \
|
||||
test_wiznet.prg \
|
||||
test_parse_querystring.prg \
|
||||
test_lancegs.pg2 \
|
||||
# test_xmodem.d64 \
|
||||
# httpd_test.d64 \
|
||||
# ip65test.dsk \
|
||||
@ -86,19 +88,21 @@ test_ping.prg: test_ping.o $(IP65TCPLIB) $(C64RRNETLIB) $(INCFILES) ../cfg/c64pr
|
||||
|
||||
test_wiznet.prg: test_wiznet.o $(C64WIZNETLIB) $(IP65WIZNETLIB) $(INCFILES) ../cfg/c64prg.cfg
|
||||
$(LD) -m test_wiznet.map -vm -C ../cfg/c64prg.cfg -o test_wiznet.prg $(AFLAGS) $< $(IP65WIZNETLIB) $(C64WIZNETLIB)
|
||||
cp test_wiznet.prg ../../server/boot/autoexec.prg
|
||||
|
||||
|
||||
test_cifs.prg: test_cifs.o $(IP65TCPLIB) $(C64RRNETLIB) $(INCFILES) ../cfg/c64prg.cfg
|
||||
$(LD) -m test_cifs.map -vm -C ../cfg/c64prg.cfg -o test_cifs.prg $(AFLAGS) $< $(IP65TCPLIB) $(C64RRNETLIB)
|
||||
|
||||
test_vic20.prg: test_vic20.o $(IP65TCPLIB) $(VIC20RRNETLIB) $(INCFILES) ../cfg/vic20prg.cfg
|
||||
$(LD) -m test_vic20.map -vm -C ../cfg/vic20prg.cfg -o test_vic20.prg $(AFLAGS) $< $(IP65TCPLIB) $(VIC20RRNETLIB)
|
||||
|
||||
%.pg2: %.o $(IP65LIB) $(APPLE2PROGLIB) $(INCFILES) ../cfg/a2bin.cfg
|
||||
$(LD) -C ../cfg/a2bin.cfg -o $*.pg2 $(AFLAGS) $< $(IP65LIB) $(APPLE2PROGLIB)
|
||||
|
||||
|
||||
test_cifs.prg: test_cifs.o $(IP65TCPLIB) $(C64RRNETLIB) $(INCFILES) ../cfg/c64prg.cfg
|
||||
$(LD) -m test_cifs.map -vm -C ../cfg/c64prg.cfg -o test_cifs.prg $(AFLAGS) $< $(IP65TCPLIB) $(C64RRNETLIB)
|
||||
|
||||
|
||||
test_vic20.prg: test_vic20.o $(IP65TCPLIB) $(VIC20RRNETLIB) $(INCFILES) ../cfg/vic20prg.cfg
|
||||
$(LD) -m test_vic20.map -vm -C ../cfg/vic20prg.cfg -o test_vic20.prg $(AFLAGS) $< $(IP65TCPLIB) $(VIC20RRNETLIB)
|
||||
|
||||
|
||||
%.pg2: %.o $(IP65LIB) $(A2UTHERLIB) $(INCFILES) ../cfg/a2bin.cfg
|
||||
$(LD) -C ../cfg/a2bin.cfg -o $*.pg2 $(AFLAGS) $< $(IP65LIB) $(A2UTHERLIB)
|
||||
|
||||
test_lancegs.pg2: test_lancegs.o $(IP65LIB) $(A2LANCEGSLIB) $(INCFILES) ../cfg/a2bin.cfg
|
||||
$(LD) -C ../cfg/a2bin.cfg -o test_lancegs.pg2 $(AFLAGS) $< $(IP65LIB) $(A2LANCEGSLIB)
|
||||
|
||||
|
||||
httpd_test.d64: test_httpd.prg index.html file1.html
|
||||
|
47
client/test/test_lancegs.s
Normal file
47
client/test/test_lancegs.s
Normal file
@ -0,0 +1,47 @@
|
||||
.include "../inc/common.i"
|
||||
.include "../inc/commonprint.i"
|
||||
.include "../inc/net.i"
|
||||
|
||||
.import cfg_get_configuration_ptr
|
||||
.import copymem
|
||||
.importzp copy_src
|
||||
.importzp copy_dest
|
||||
|
||||
|
||||
.import __CODE_LOAD__
|
||||
.import __CODE_SIZE__
|
||||
.import __RODATA_SIZE__
|
||||
.import __DATA_SIZE__
|
||||
|
||||
.segment "EXEHDR" ;this is what gets put an the start of the file on the Apple 2
|
||||
.addr __CODE_LOAD__-$11 ; Start address
|
||||
.word __CODE_SIZE__+__RODATA_SIZE__+__DATA_SIZE__+4 ; Size
|
||||
jmp init
|
||||
|
||||
.code
|
||||
|
||||
init:
|
||||
jsr print_cr
|
||||
init_ip_via_dhcp
|
||||
jsr print_ip_config
|
||||
jsr print_cr
|
||||
rts
|
||||
|
||||
;-- LICENSE FOR test_ping.s --
|
||||
; The contents of this file are subject to the Mozilla Public License
|
||||
; Version 1.1 (the "License"); you may not use this file except in
|
||||
; compliance with the License. You may obtain a copy of the License at
|
||||
; http://www.mozilla.org/MPL/
|
||||
;
|
||||
; Software distributed under the License is distributed on an "AS IS"
|
||||
; basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||
; License for the specific language governing rights and limitations
|
||||
; under the License.
|
||||
;
|
||||
; The Original Code is ip65.
|
||||
;
|
||||
; The Initial Developer of the Original Code is Jonno Downes,
|
||||
; jonno@jamtronix.com.
|
||||
; Portions created by the Initial Developer are Copyright (C) 2009
|
||||
; Jonno Downes. All Rights Reserved.
|
||||
; -- LICENSE END --
|
@ -1,215 +0,0 @@
|
||||
.include "../inc/common.i"
|
||||
.include "../inc/commonprint.i"
|
||||
.include "../inc/net.i"
|
||||
|
||||
.import exit_to_basic
|
||||
.import cfg_get_configuration_ptr
|
||||
.import dns_set_hostname
|
||||
.import dns_resolve
|
||||
.import dns_ip
|
||||
.import dns_status
|
||||
.import sntp_ip
|
||||
.import sntp_utc_timestamp
|
||||
.import sntp_get_time
|
||||
|
||||
.import __CODE_LOAD__
|
||||
.import __CODE_SIZE__
|
||||
.import __RODATA_SIZE__
|
||||
.import __DATA_SIZE__
|
||||
|
||||
|
||||
.segment "STARTUP" ;this is what gets put at the start of the file on the C64
|
||||
|
||||
.word basicstub ; load address
|
||||
|
||||
basicstub:
|
||||
.word @nextline
|
||||
.word 2003
|
||||
.byte $9e
|
||||
.byte <(((init / 1000) .mod 10) + $30)
|
||||
.byte <(((init / 100 ) .mod 10) + $30)
|
||||
.byte <(((init / 10 ) .mod 10) + $30)
|
||||
.byte <(((init ) .mod 10) + $30)
|
||||
.byte 0
|
||||
@nextline:
|
||||
.word 0
|
||||
|
||||
.segment "EXEHDR" ;this is what gets put an the start of the file on the Apple 2
|
||||
.addr __CODE_LOAD__-$11 ; Start address
|
||||
.word __CODE_SIZE__+__RODATA_SIZE__+__DATA_SIZE__+4 ; Size
|
||||
jmp init
|
||||
|
||||
.code
|
||||
|
||||
init:
|
||||
|
||||
jsr test_vlb
|
||||
jsr print_cr
|
||||
init_ip_via_dhcp
|
||||
jsr print_ip_config
|
||||
|
||||
ldax #time_server_msg
|
||||
jsr print
|
||||
ldax #time_server_host
|
||||
jsr print
|
||||
jsr print_cr
|
||||
ldax #time_server_host
|
||||
jsr dns_set_hostname
|
||||
bcs @dns_error
|
||||
jsr dns_resolve
|
||||
bcs @dns_error
|
||||
ldx #3 ; set destination address
|
||||
: lda dns_ip,x
|
||||
sta sntp_ip,x
|
||||
dex
|
||||
bpl :-
|
||||
|
||||
|
||||
ldax #sending_query
|
||||
jsr print
|
||||
ldax #sntp_ip
|
||||
jsr print_dotted_quad
|
||||
jsr print_cr
|
||||
jsr sntp_get_time
|
||||
bcc @ok
|
||||
ldax #sntp_error
|
||||
jmp @print_error
|
||||
@ok:
|
||||
ldy #3
|
||||
:
|
||||
lda sntp_utc_timestamp,y
|
||||
jsr print_hex
|
||||
dey
|
||||
bpl :-
|
||||
jmp exit_to_basic
|
||||
|
||||
@dns_error:
|
||||
ldax #dns_error
|
||||
@print_error:
|
||||
jsr print
|
||||
jsr print_errorcode
|
||||
jmp exit_to_basic
|
||||
|
||||
|
||||
.bss
|
||||
vla: .res 4
|
||||
vlb: .res 4
|
||||
quotient: .res 4
|
||||
remainder: .res 4
|
||||
|
||||
.code
|
||||
div_32_32:
|
||||
lda #0
|
||||
sta remainder
|
||||
sta remainder+1
|
||||
sta remainder+2
|
||||
sta remainder+3
|
||||
ldx #32
|
||||
@loop:
|
||||
asl vla
|
||||
rol vla+1
|
||||
rol vla+2
|
||||
rol vla+3
|
||||
|
||||
rol remainder
|
||||
rol remainder+1
|
||||
rol remainder+2
|
||||
rol remainder+3
|
||||
|
||||
sec
|
||||
lda remainder+0
|
||||
sbc vlb+0
|
||||
sta remainder+0
|
||||
|
||||
lda remainder+1
|
||||
sbc vlb+1
|
||||
sta remainder+1
|
||||
|
||||
lda remainder+2
|
||||
sbc vlb+2
|
||||
sta remainder+2
|
||||
|
||||
lda remainder+3
|
||||
sbc vlb+3
|
||||
sta remainder+3
|
||||
|
||||
bcs @next
|
||||
lda remainder
|
||||
adc vlb
|
||||
sta remainder
|
||||
|
||||
lda remainder+1
|
||||
adc vlb+1
|
||||
sta remainder+1
|
||||
|
||||
lda remainder+2
|
||||
adc vlb+2
|
||||
sta remainder+2
|
||||
|
||||
lda remainder+3
|
||||
adc vlb+3
|
||||
sta remainder+3
|
||||
@next:
|
||||
rol quotient
|
||||
rol quotient+1
|
||||
rol quotient+2
|
||||
rol quotient+3
|
||||
dex
|
||||
bpl @loop
|
||||
rts
|
||||
.rodata
|
||||
|
||||
test_vlb:
|
||||
ldx #7
|
||||
:
|
||||
lda divs,x
|
||||
sta vla,x
|
||||
dex
|
||||
bpl :-
|
||||
|
||||
jsr div_32_32
|
||||
.byte $92
|
||||
|
||||
|
||||
|
||||
|
||||
time_server_msg:
|
||||
.byte "TIME SERVER : ",0
|
||||
|
||||
time_server_host:
|
||||
.byte "202.174.101.10",0
|
||||
.byte "1.AU.POOL.SNTP.ORG",0
|
||||
|
||||
sending_query:
|
||||
.byte "SENDING SNTP QUERY TO ",0
|
||||
sntp_error:
|
||||
.byte "ERROR DURING SNTP QUERY",13,0
|
||||
|
||||
dns_error:
|
||||
.byte "ERROR RESOLVING HOSTNAME",13,0
|
||||
|
||||
divs:
|
||||
.byte $02,$30,$00,$00
|
||||
.byte $05,$00,$00,$00
|
||||
|
||||
|
||||
|
||||
|
||||
;-- LICENSE FOR test_sntp.s --
|
||||
; The contents of this file are subject to the Mozilla Public License
|
||||
; Version 1.1 (the "License"); you may not use this file except in
|
||||
; compliance with the License. You may obtain a copy of the License at
|
||||
; http://www.mozilla.org/MPL/
|
||||
;
|
||||
; Software distributed under the License is distributed on an "AS IS"
|
||||
; basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||
; License for the specific language governing rights and limitations
|
||||
; under the License.
|
||||
;
|
||||
; The Original Code is ip65.
|
||||
;
|
||||
; The Initial Developer of the Original Code is Jonno Downes,
|
||||
; jonno@jamtronix.com.
|
||||
; Portions created by the Initial Developer are Copyright (C) 2009
|
||||
; Jonno Downes. All Rights Reserved.
|
||||
; -- LICENSE END --
|
@ -41,18 +41,22 @@ init:
|
||||
jsr print
|
||||
jsr print_ip_config
|
||||
|
||||
jsr beep
|
||||
@loop:
|
||||
jsr timer_seconds
|
||||
cmp last_seconds
|
||||
beq @loop
|
||||
sta last_seconds
|
||||
jsr print_hex
|
||||
jsr check_for_abort_key
|
||||
bcc @loop
|
||||
; jsr get_key_if_available
|
||||
; jsr beep
|
||||
;@loop:
|
||||
; jsr timer_seconds
|
||||
; cmp last_seconds
|
||||
; beq @loop
|
||||
; sta last_seconds
|
||||
; jsr print_hex
|
||||
; jsr check_for_abort_key
|
||||
; bcc @loop
|
||||
@loop2:
|
||||
|
||||
jsr get_key_if_available
|
||||
beq @loop2
|
||||
jsr print_hex
|
||||
jsr check_for_abort_key
|
||||
bcc @loop2
|
||||
rts
|
||||
|
||||
|
||||
|
@ -111,7 +111,6 @@ overwrite_with_hardcoded_dns_server:
|
||||
.rodata
|
||||
|
||||
|
||||
buffer1: .res 256
|
||||
hostname_1:
|
||||
.byte "SLASHDOT.ORG",0 ;this should be an A record
|
||||
|
||||
|
Binary file not shown.
3
dist/make_dist.rb
vendored
3
dist/make_dist.rb
vendored
@ -1,8 +1,7 @@
|
||||
|
||||
$:.unshift(File.dirname(__FILE__)) unless
|
||||
$:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
|
||||
|
||||
gem 'archive-zip'
|
||||
require 'RubyGems'
|
||||
require 'archive/zip'
|
||||
require 'ftools'
|
||||
|
||||
|
19
dist/make_dist_ip65.rb
vendored
19
dist/make_dist_ip65.rb
vendored
@ -1,14 +1,14 @@
|
||||
|
||||
$:.unshift(File.dirname(__FILE__)) unless
|
||||
$:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
|
||||
|
||||
require 'RubyGems'
|
||||
gem 'archive-zip'
|
||||
require 'archive/zip'
|
||||
require 'ftools'
|
||||
|
||||
WORKING_DIR=File.expand_path(File.dirname(__FILE__)+"/ip65")
|
||||
SRC_DIR=File.expand_path(File.dirname(__FILE__)+"/../")
|
||||
["","ip65","doc","cfg","drivers","inc","test","carts","examples"].each do |dir_suffix|
|
||||
["","ip65","doc","cfg","drivers","inc","test"].each do |dir_suffix|
|
||||
dir_path="#{WORKING_DIR}/#{dir_suffix}"
|
||||
Dir.mkdir(dir_path) unless File.exist?(dir_path)
|
||||
end
|
||||
@ -16,17 +16,6 @@ end
|
||||
[
|
||||
["client/ip65/*.[s|i]","ip65/"],
|
||||
["client/ip65/Makefile","ip65/"],
|
||||
["client/carts/*.[s|i]","carts/"],
|
||||
["client/carts/Makefile","carts/"],
|
||||
["client/carts/*.rb","carts/"],
|
||||
["client/carts/*.obj","carts/"],
|
||||
["client/carts/*.src","carts/"],
|
||||
["client/examples/*.[s|i]","examples/"],
|
||||
["client/examples/Makefile","examples/"],
|
||||
["client/examples/*.bin","examples/"],
|
||||
["client/examples/*.spr","examples/"],
|
||||
["client/examples/*.rb","examples/"],
|
||||
["client/examples/*.cfg","examples/"],
|
||||
["client/inc/*.i","inc/"],
|
||||
["client/inc/vt100_font.bin","inc/"],
|
||||
["client/test/*.[s|i]","test/"],
|
||||
@ -38,7 +27,6 @@ end
|
||||
["doc/ca65-doc*.*","doc/"],
|
||||
["doc/CONTRIBUTORS.txt","doc/"],
|
||||
["doc/LICENSE.txt","doc/"],
|
||||
["client/Makefile","/"],
|
||||
].each do |args|
|
||||
dest="#{WORKING_DIR}/#{args[1]}"
|
||||
Dir["#{SRC_DIR}/#{args[0]}"].each do |src|
|
||||
@ -47,9 +35,6 @@ end
|
||||
end
|
||||
end
|
||||
|
||||
#dummy_makefile=File.new("#{WORKING_DIR}/carts/Makefile","w")
|
||||
#dummy_makefile<<"#dummy makefile, so we can reuse the top level Makefile from the netboot65/client directory\nall:\n"
|
||||
#dummy_makefile.close
|
||||
|
||||
require 'document_ca65_source_as_html.rb'
|
||||
codebase_dir=WORKING_DIR
|
||||
|
2
dist/version_number.txt
vendored
2
dist/version_number.txt
vendored
@ -1 +1 @@
|
||||
1.0.36
|
||||
1.0.38
|
@ -121,19 +121,18 @@ IP65 is a TCP/IP stack for 6502 based computers.
|
||||
|
||||
<tr>
|
||||
<th>Ethernet driver</th>
|
||||
<td class="done" colspan="6">CS8900A</td>
|
||||
<td class="done" colspan="3">CS8900A (RR-NET/Uthernet)</td>
|
||||
<td class="done" colspan="3">Wiznet W5100</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>Ethernet interface</th>
|
||||
<td class="done" colspan="3">RR-Net / TFE</td>
|
||||
<td class="done" colspan="3">Uthernet</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>Host computer</th>
|
||||
<td class="done" colspan="3">C64/C128</td>
|
||||
<td class="done" colspan="3">Apple ][</td>
|
||||
<td class="done" colspan="2">C64/C128</td>
|
||||
<td class="done" colspan="2">Apple ][</td>
|
||||
<td class="done" colspan="2">VIC-20</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
@ -162,6 +161,7 @@ IP65 is a TCP/IP stack for 6502 based computers.
|
||||
<pre>
|
||||
Release Maintainer Changes
|
||||
------- ---------- -------
|
||||
2011-01-15 Jonno Downes drivers for Wiznet W5100 ethernet, VIC-20 host
|
||||
2009-12-23 Jonno Downes TCP and telnet bugfixes, vt100 emulation, XMODEM support
|
||||
2009-10-31 Jonno Downes Added Web Application Server functions
|
||||
2009-08-02 Jonno Downes More TCP functionality, includes telnet
|
||||
|
Loading…
x
Reference in New Issue
Block a user