git-svn-id: http://svn.code.sf.net/p/netboot65/code@213 93682198-c243-4bdb-bd91-e943c89aac3b

This commit is contained in:
jonnosan 2009-10-30 20:42:50 +00:00
parent c8eacef1fc
commit 1c6f188cb3
20 changed files with 2894 additions and 168 deletions

View File

@ -4,13 +4,13 @@
.macro print_failed
ldax #failed_msg
jsr print
jsr print_ascii_as_native
jsr print_cr
.endmacro
.macro print_ok
ldax #ok_msg
jsr print
jsr print_ascii_as_native
jsr print_cr
.endmacro
@ -27,12 +27,6 @@
.include "../inc/c64keycodes.i"
.include "../inc/menu.i"
KEY_NEXT_PAGE=KEYCODE_F7
KEY_PREV_PAGE=KEYCODE_F1
KEY_SHOW_HISTORY=KEYCODE_F2
KEY_BACK_IN_HISTORY=KEYCODE_F3
KEY_NEW_SERVER=KEYCODE_F5
.include "../inc/ping.i"
.include "../inc/sidplay.i"
@ -134,6 +128,10 @@ cold_init:
warm_init:
lda #14
jsr print_a ;switch to lower case
;set some funky colours
LDA #$04 ;purple
@ -162,9 +160,9 @@ warm_init:
jsr copymem
ldax #netboot65_msg
jsr print
jsr print_ascii_as_native
ldax #init_msg+1
jsr print
jsr print_ascii_as_native
kippercall #KPR_INITIALIZE
bcc init_ok
@ -174,30 +172,29 @@ warm_init:
jmp exit_to_basic
print_main_menu:
lda #21 ;make sure we are in upper case
sta $d018
jsr cls
ldax #netboot65_msg
jsr print
jsr print_ascii_as_native
ldax #main_menu_msg
jmp print
jmp print_ascii_as_native
init_ok:
;look for an 'autoexec' file
jsr print_cr
ldax #loading_msg
jsr print
jsr print_ascii_as_native
ldax #autoexec_filename
stax io_filename
jsr print
jsr print_ascii_as_native
jsr print_cr
ldax #$0000
jsr io_read_file
bcs main_menu
@file_read_ok:
ldax #load_ok_msg
jsr print
jsr print_ascii_as_native
ldax io_load_address
jmp boot_into_file
@ -209,9 +206,6 @@ main_menu:
@get_key:
jsr get_key_ip65
; pha
; jsr print_hex
; pla
cmp #KEYCODE_F1
bne @not_f1
@ -241,10 +235,8 @@ main_menu:
cmp #KEYCODE_F6
bne @not_f6
jsr cls
lda #14
jsr print_a ;switch to lower case
ldax #ping_header
jsr print
jsr print_ascii_as_native
jsr ping_loop
jmp exit_ping
@ -252,6 +244,20 @@ main_menu:
cmp #KEYCODE_F7
beq @change_config
cmp #KEYCODE_F8
bne @not_f8
jsr cls
ldax #netboot65_msg
jsr print_ascii_as_native
ldax #credits
jsr print_ascii_as_native
ldax #press_a_key_to_continue
jsr print_ascii_as_native
jsr get_key_ip65
jmp main_menu
@not_f8:
jmp @get_key
@ -263,9 +269,9 @@ main_menu:
@change_config:
jsr cls
ldax #netboot65_msg
jsr print
jsr print_ascii_as_native
ldax #config_menu_msg
jsr print
jsr print_ascii_as_native
jsr print_ip_config
jsr print_cr
@get_key_config_menu:
@ -277,9 +283,9 @@ main_menu:
cmp #KEYCODE_F1
bne @not_ip
ldax #new
jsr print
jsr print_ascii_as_native
ldax #ip_address_msg
jsr print
jsr print_ascii_as_native
jsr print_cr
ldax #filter_ip
ldy #20
@ -302,9 +308,9 @@ main_menu:
cmp #KEYCODE_F2
bne @not_netmask
ldax #new
jsr print
jsr print_ascii_as_native
ldax #netmask_msg
jsr print
jsr print_ascii_as_native
jsr print_cr
ldax #filter_ip
ldy #20
@ -327,9 +333,9 @@ main_menu:
cmp #KEYCODE_F3
bne @not_gateway
ldax #new
jsr print
jsr print_ascii_as_native
ldax #gateway_msg
jsr print
jsr print_ascii_as_native
jsr print_cr
ldax #filter_ip
ldy #20
@ -354,9 +360,9 @@ main_menu:
cmp #KEYCODE_F4
bne @not_dns_server
ldax #new
jsr print
jsr print_ascii_as_native
ldax #dns_server_msg
jsr print
jsr print_ascii_as_native
jsr print_cr
ldax #filter_ip
ldy #20
@ -380,9 +386,9 @@ main_menu:
cmp #KEYCODE_F5
bne @not_tftp_server
ldax #new
jsr print
jsr print_ascii_as_native
ldax #tftp_server_msg
jsr print
jsr print_ascii_as_native
jsr print_cr
ldax #filter_dns
ldy #40
@ -391,7 +397,7 @@ main_menu:
stax kipper_param_buffer
jsr print_cr
ldax #resolving
jsr print
jsr print_ascii_as_native
ldax #kipper_param_buffer
kippercall #KPR_DNS_RESOLVE
bcs @resolve_error
@ -468,7 +474,7 @@ boot_into_file:
jmp exit_cart_via_ax ;good luck!
@not_a_basic_stub:
ldax #cant_boot_basic
jsr print
jsr print_ascii_as_native
jsr wait_for_keypress
jmp warm_init
@ -488,7 +494,7 @@ get_tftp_directory_listing:
stax kipper_param_buffer+KPR_TFTP_POINTER
ldax #getting_dir_listing_msg
jsr print
jsr print_ascii_as_native
ldax #kipper_param_buffer
kippercall #KPR_TFTP_DOWNLOAD
@ -500,10 +506,6 @@ get_tftp_directory_listing:
jmp @no_files_on_server
:
;switch to lower case charset
lda #23
sta $d018
ldax #directory_buffer
ldy #1 ;filenames will be ASCII
@ -548,13 +550,13 @@ get_tftp_directory_listing:
@dir_failed:
ldax #dir_listing_fail_msg
jsr print
jsr print_ascii_as_native
sec
rts
@no_files_on_server:
ldax #no_files
jsr print
jsr print_ascii_as_native
sec
rts
@ -575,8 +577,6 @@ disk_boot:
jmp @no_files_on_disk
:
;switch to lower case charset
ldax #directory_buffer
ldy #0 ;filenames will NOT be ASCII
@ -587,14 +587,14 @@ disk_boot:
@dir_failed:
ldax #dir_listing_fail_msg
@print_error:
jsr print
jsr print_ascii_as_native
jsr print_errorcode
jsr print_cr
jmp @wait_keypress_then_return_to_main
@no_files_on_disk:
ldax #no_files
jsr print
jsr print_ascii_as_native
@wait_keypress_then_return_to_main:
jsr wait_for_keypress
jmp main_menu
@ -602,9 +602,9 @@ disk_boot:
@disk_filename_set:
stax io_filename
ldax #loading_msg
jsr print
jsr print_ascii_as_native
ldax io_filename
jsr print
jsr print_ascii_as_native
jsr print_cr
ldax #$0000
jsr io_read_file
@ -613,7 +613,7 @@ disk_boot:
jmp @print_error
@file_read_ok:
ldax #load_ok_msg
jsr print
jsr print_ascii_as_native
ldax io_load_address
jmp boot_into_file
@ -677,7 +677,7 @@ download: ;AX should point at filename to download
download2:
ldax #downloading_msg
jsr print
jsr print_ascii_as_native
ldax kipper_param_buffer+KPR_TFTP_FILENAME
jsr print_ascii_as_native
jsr print_cr
@ -688,20 +688,20 @@ download2:
bcc :+
ldax #tftp_download_fail_msg
jsr print
jsr print_ascii_as_native
jsr print_errorcode
sec
rts
:
ldax #tftp_download_ok_msg
jsr print
jsr print_ascii_as_native
clc
rts
wait_for_keypress:
ldax #press_a_key_to_continue
jsr print
jsr print_ascii_as_native
@loop:
jsr $ffe4
beq @loop
@ -721,8 +721,6 @@ cfg_get_configuration_ptr:
rts
exit_ping:
lda #142
jsr print_a ;switch to upper case
lda #$05 ;petscii for white text
jsr print_a
jmp main_menu
@ -782,57 +780,57 @@ init_tod:
.rodata
netboot65_msg:
.byte 13,"KIPPERKART V"
.byte 10,"KipperKart V"
.include "../inc/version.i"
.byte 13,0
.byte 10,0
main_menu_msg:
.byte 13,"MAIN MENU",13,13
.byte "F1: TFTP BOOT F2: DISK BOOT",13
.byte "F3: UPLOAD D64 F4: DOWNLOAD D64",13
.byte "F5: SID NETPLAY F6: PING",13
.byte "F7: CONFIG",13,13
.byte 10,"Main Menu",10,10
.byte "F1: TFTP Boot F2: Disk Boot",10
.byte "F3: Upload D64 F4: Download D64",10
.byte "F5: SID Netplay F6: Ping",10
.byte "F7: Config F8: Credits",10,10
.byte 0
config_menu_msg:
.byte 13,"CONFIGURATION",13,13
.byte "F1: IP ADDRESS F2: NETMASK",13
.byte "F3: GATEWAY F4: DNS SERVER",13
.byte "F5: TFTP SERVER F6: RESET TO DEFAULT",13
.byte "F7: MAIN MENU",13,13
.byte 10,"Configuration",10,10
.byte "F1: IP Address F2: Netmask",10
.byte "F3: Gateway F4: DNS Server",10
.byte "F5: TFTP Server F6: Reset To Default",10
.byte "F7: Main Menu",10,10
.byte 0
cant_boot_basic:
.byte "BASIC FILE EXECUTION NOT SUPPORTED",13,0
.byte "BASIC file execution not supported",10,0
ping_header: .byte "ping",13,0
ping_header: .byte "ping",10,0
file_read_error: .asciiz "ERROR READING FILE"
file_read_error: .asciiz "Error reading file"
autoexec_filename: .byte "AUTOEXEC.PRG",0
downloading_msg: .byte "DOWN"
loading_msg: .asciiz "LOADING "
downloading_msg: .byte "down"
loading_msg: .asciiz "loading "
uploading_msg: .byte "UPLOADING ",0
uploading_msg: .byte "uploading ",0
getting_dir_listing_msg: .byte "FETCHING DIRECTORY",13,0
getting_dir_listing_msg: .byte "fetching directory",10,0
dir_listing_fail_msg:
.byte "DIR FAILED",13,0
.byte "directory listing failed",10,0
tftp_download_fail_msg:
.byte "DOWNLOAD FAILED", 13, 0
.byte "download failed", 10, 0
tftp_download_ok_msg:
.byte "DOWN"
.byte "down"
load_ok_msg:
.byte "LOAD OK", 13, 0
.byte "load OK", 10, 0
current:
.byte "CURRENT ",0
.byte "current ",0
new:
.byte"NEW ",0
.byte"new ",0
tftp_dir_filemask:
.asciiz "$/*.prg"
@ -844,12 +842,22 @@ sid_filemask:
.asciiz "$/*.sid"
no_files:
.byte "NO FILES",13,0
.byte "no files",10,0
resolving:
.byte "RESOLVING ",0
.byte "resolving ",0
remote_host: .byte "HOSTNAME (LEAVE BLANK TO QUIT)",13,": ",0
remote_host: .byte "hostname (return to quit)",10,": ",0
credits:
.byte 10,"License: Mozilla Public License v1.1",10,"http://www.mozilla.org/MPL/"
.byte 10
.byte 10,"Contributors:",10
.byte 10,"Jonno Downes"
.byte 10,"Glenn Holmmer"
.byte 10,"Per Olofsson"
.byte 10
.byte 10
.byte 0
;-- LICENSE FOR kipperkart.s --
; The contents of this file are subject to the Mozilla Public License

View File

@ -1,6 +1,7 @@
# CA65 config for a 16KB cart
MEMORY {
ZP: start = $02, size = $1A, type = rw ;
IP65ZP: start = $20, size = $13, type = rw, define = yes; #this cart replaces BASIC so ok to use that space
HEADER: start = $8000, size = $18, file = %O;
DEFAULTS: start = $8018, size = $1E, file = %O;
@ -22,5 +23,6 @@ SEGMENTS {
APP_SCRATCH: load = RAM4, type = bss;
TCP_VARS: load = RAM2, type = bss;
HTTP_VARS: load=ROM, run = RAM3, type = rw,define = yes;
IP65ZP: load = IP65ZP, type = zp;
IP65ZP: load = IP65ZP, type = zp;
ZEROPAGE: load = ZP, type = zp, optional=yes;
}

View File

@ -12,12 +12,15 @@
screen_current_row=$d6
screen_current_col=$d3
.data
;use C64 Kernel ROM function to print a character to the screen
;inputs: A contains petscii value of character to print
;outputs: none
print_a = $ffd2
.bss
beep_timer: .res 1
.code
;use C64 Kernel ROM function to move to a new line
@ -38,7 +41,44 @@ cls:
;inputs: none
;outputs: none
beep:
lda #15
sta $d418 ;set volume
lda #0
sta $d405
lda #240
sta $d406
lda #8
sta $d403
;tone values for voice 1
lda #48
sta $d400
lda #28
sta $d401
;enable tone register
lda #65
sta $d404
; pause for qtr second
lda $dd06 ;
sta beep_timer
inc beep_timer ;time counts backwards
:
lda $dd06 ;
cmp beep_timer
bne :-
;disable tone register
lda #65
sta $d404
lda #0
sta $d418 ;set volume
rts
;print a single char in inverse text:
print_a_inverse:

View File

@ -22,8 +22,6 @@
.import ip65_error
.export print_errorcode
.export press_a_key_to_continue
.import arp_cache
.importzp ac_size
.import ascii_to_native
@ -41,28 +39,28 @@ temp_ptr: .res 2
.code
.macro print_driver_init
ldax #cs_driver_name
jsr print
jsr print_ascii_as_native
ldax #init_msg
jsr print
jsr print_ascii_as_native
.endmacro
.macro print_dhcp_init
ldax #dhcp_msg
jsr print
jsr print_ascii_as_native
ldax #init_msg
jsr print
jsr print_ascii_as_native
.endmacro
.macro print_failed
ldax #failed_msg
jsr print
jsr print_ascii_as_native
jsr print_cr
.endmacro
.macro print_ok
ldax #ok_msg
jsr print
jsr print_ascii_as_native
jsr print_cr
.endmacro
@ -75,21 +73,21 @@ temp_ptr: .res 2
print_ip_config:
ldax #interface_type
jsr print
jsr print_ascii_as_native
ldax #cs_driver_name
jsr print
jsr print_ascii_as_native
jsr print_cr
ldax #mac_address_msg
jsr print
jsr print_ascii_as_native
jsr cfg_get_configuration_ptr ;ax=base config, carry flag clear
;first 6 bytes of cfg_get_configuration_ptr is MAC address
jsr print_mac
jsr print_cr
ldax #ip_address_msg
jsr print
jsr print_ascii_as_native
jsr cfg_get_configuration_ptr ;ax=base config, carry flag clear
adc #KPR_CFG_IP
bcc :+
@ -99,7 +97,7 @@ print_ip_config:
jsr print_cr
ldax #netmask_msg
jsr print
jsr print_ascii_as_native
jsr cfg_get_configuration_ptr ;ax=base config, carry flag clear
adc #KPR_CFG_NETMASK
bcc :+
@ -109,7 +107,7 @@ print_ip_config:
jsr print_cr
ldax #gateway_msg
jsr print
jsr print_ascii_as_native
jsr cfg_get_configuration_ptr ;ax=base config, carry flag clear
adc #KPR_CFG_GATEWAY
bcc :+
@ -119,7 +117,7 @@ print_ip_config:
jsr print_cr
ldax #dns_server_msg
jsr print
jsr print_ascii_as_native
jsr cfg_get_configuration_ptr ;ax=base config, carry flag clear
adc #KPR_CFG_DNS_SERVER
bcc :+
@ -128,13 +126,13 @@ print_ip_config:
jsr print_cr
ldax #tftp_server_msg
jsr print
jsr print_ascii_as_native
ldax #cfg_tftp_server
jsr print_dotted_quad
jsr print_cr
ldax #dhcp_server_msg
jsr print
jsr print_ascii_as_native
jsr cfg_get_configuration_ptr ;ax=base config, carry flag clear
adc #KPR_CFG_DHCP_SERVER
bcc :+
@ -319,52 +317,50 @@ hexdigits:
.byte "0123456789ABCDEF"
interface_type:
.byte "INTERFACE : ",0
.byte "Interface : ",0
mac_address_msg:
.byte "MAC ADDRESS : ", 0
.byte "MAC Address : ", 0
ip_address_msg:
.byte "IP ADDRESS : ", 0
.byte "IP Address : ", 0
netmask_msg:
.byte "NETMASK : ", 0
.byte "Netmask : ", 0
gateway_msg:
.byte "GATEWAY : ", 0
.byte "Gateway : ", 0
dns_server_msg:
.byte "DNS SERVER : ", 0
.byte "DNS Server : ", 0
dhcp_server_msg:
.byte "DHCP SERVER : ", 0
.byte "DHCP Server : ", 0
tftp_server_msg:
.byte "TFTP SERVER : ", 0
.byte "TFTP Server : ", 0
dhcp_msg:
.byte "DHCP",0
init_msg:
.byte " INITIALIZING ",0
.byte " Initializing ",0
arp_cache_header:
.byte " MEM MAC IP",13,0
failed_msg:
.byte "FAILED", 0
.byte "failed", 0
ok_msg:
.byte "OK", 0
dns_lookup_failed_msg:
.byte "DNS LOOKUP FAILED", 0
.byte "DNS lookup failed", 0
error_code:
.asciiz "ERROR CODE: "
.asciiz "error code: "
press_a_key_to_continue:
.byte "PRESS A KEY TO CONTINUE",13,0
.byte "Press a key to continue",10,0

View File

@ -119,7 +119,7 @@ select_option_from_menu:
jsr cls
ldax #select_from_following_options
jsr print
jsr print_ascii_as_native
jsr print_cr
@ -173,7 +173,7 @@ select_option_from_menu:
@jump_to:
jsr print_cr
ldax #jump_to_prompt
jsr print
jsr print_ascii_as_native
lda #'?'
jsr get_key
@ -218,7 +218,7 @@ select_option_from_menu:
bcc :+
@navigation_instructions:
ldax #navigation_instructions
jsr print
jsr print_ascii_as_native
:
@get_keypress:
lda #'?'
@ -311,13 +311,13 @@ select_option_from_menu:
.rodata
select_from_following_options: .byte "SELECT ONE OF THE FOLLOWING OPTIONS:",13,0
navigation_instructions: .byte 13,"ARROW KEYS NAVIGATE BETWEEN MENU PAGES",13
.byte "/ TO JUMP OR "
select_from_following_options: .byte "Select one of the following options:",10,0
navigation_instructions: .byte 10,"Arrow keys navigate between menu pages",10
.byte "/ to jump or "
.byte KEYNAME_ABORT
.byte " TO QUIT",13,0
.byte " to quit",10,0
jump_to_prompt: .byte "JUMP TO:",0
jump_to_prompt: .byte "jump to:",0

View File

@ -8,7 +8,7 @@ ping_retries: .res 1
.code
ping_loop:
ldax #remote_host
jsr print
jsr print_ascii_as_native
kippercall #KPR_INPUT_HOSTNAME
bcc @host_entered
;if no host entered, then bail.
@ -17,7 +17,7 @@ ping_loop:
stax kipper_param_buffer
jsr print_cr
ldax #resolving
jsr print
jsr print_ascii_as_native
ldax kipper_param_buffer
kippercall #KPR_PRINT_ASCIIZ
jsr print_cr
@ -35,7 +35,7 @@ ping_loop:
sta ping_retries
@ping_once:
ldax #pinging
jsr print
jsr print_ascii_as_native
ldax #kipper_param_buffer
jsr print_dotted_quad
lda #' '
@ -51,7 +51,7 @@ ping_loop:
bcs @ping_error
jsr print_integer
ldax #ms
jsr print
jsr print_ascii_as_native
@check_retries:
dec ping_retries
bpl @ping_once
@ -62,8 +62,8 @@ bcs @ping_error
jmp @check_retries
ms: .byte " MS",13,0
pinging: .byte "PINGING ",0
ms: .byte " ms",10,0
pinging: .byte "pinging ",0

View File

@ -1,22 +1 @@
.byte "0.9.37"
;-- LICENSE FOR version.i --
; 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 --
.byte "1.0.9"

BIN
client/inc/vt100_font.bin Normal file

Binary file not shown.

View File

@ -21,6 +21,7 @@ ETHOBJS= \
printf.o \
debug.o \
http.o \
vt100_c64.o \
httpd.o \
dhcp.o \
dns.o \

View File

@ -22,7 +22,10 @@
.import tcp_close
.import print_a
.import print_cr
.import vt100_init_terminal
.import vt100_process_inbound_char
.import vt100_transform_outbound_char
.import ip65_process
.import get_key_ip65
@ -48,6 +51,10 @@ buffer_ptr: .res 2 ; source pointer
.code
telnet_connect:
lda telnet_use_native_charset
beq :+
jsr vt100_init_terminal
:
ldax #telnet_callback
stax tcp_callback
ldx #3
@ -291,7 +298,7 @@ telnet_callback:
jmp @add_iac_response
@not_iac:
@convert_to_native:
@convert_to_native:
txa
cmp #$0a ;suppress LF (since it probably follows a CR which will have done the LF as well)
beq @byte_processed
@ -301,9 +308,6 @@ telnet_callback:
tya
pha
txa
; pha
; jsr print_hex
; pla
jsr print_a
pla
tay

2096
client/ip65/vt100_c64.s Normal file

File diff suppressed because it is too large Load Diff

View File

@ -21,11 +21,12 @@ INCFILES=\
all: \
testdns.prg \
test_disk_io.prg \
test_disk_io.d64 \
# test_disk_io.d64 \
testdns.pg2 \
testtftp.prg \
testtftp.pg2\
test_cart_api.prg\
test_vt100.prg\
testdottedquad.pg2\
testdottedquad.prg\
test_tcp.prg \
@ -35,7 +36,7 @@ all: \
test_sntp.prg \
test_get_url.prg \
test_parse_querystring.prg \
httpd_test.d64 \
# httpd_test.d64 \
# ip65test.dsk \
%.o: %.c

3
client/test/file1.html Normal file
View File

@ -0,0 +1,3 @@
<html>
This is file1
</html>

3
client/test/index.html Normal file
View File

@ -0,0 +1,3 @@
<html>
This is index.html
</html>

105
client/test/test_vt100.s Normal file
View File

@ -0,0 +1,105 @@
.ifndef KIPPER_API_VERSION_NUMBER
.define EQU =
.include "../inc/kipper_constants.i"
.endif
.include "../inc/common.i"
.include "../inc/commonprint.i"
.import print_a
.import cfg_get_configuration_ptr
.import get_key
.import timer_init
.import beep
.segment "STARTUP" ;this is what gets put at the start of the file on the C64
.word basicstub ; load address
.import vt100_init_terminal
.import vt100_process_inbound_char
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
.code
init:
jsr timer_init
jsr vt100_init_terminal
ldax #string1
jsr emit_string
rts
emit_string:
stax next_byte+1
:
jsr next_byte
beq @done
jsr vt100_process_inbound_char
jmp :-
@done:
rts
next_byte:
lda $ffff
inc next_byte+1
bne :+
inc next_byte+2
:
cmp #0
rts
.rodata
string1:
.byte $1b,"[H" ;HOME
.byte "hello world",13,10
.byte $1b,"[1m" ;BOLD
.byte "hello bold",13,10
.byte $1b,"[7m" ;reverse
.byte "hello reverse bold",13,10
.byte $1b,"7" ;save cursor position & attributes
.byte $1b,"[m" ;normal
.byte "hello normal",13,10
.byte 07
.byte "that was a beep!",13,10
.byte $1b,"8" ;restor cursor position & attributes
.byte $1b,"[20;1H"; ;move to row 20, pos 1
.byte "ABCDEFGhijklmnopqRsTuVwXyZ01234567890"
.byte $1b,"[20;10f"; ;move to row 20, pos 1
.byte $1b,"[1K"
.byte 0
;-- LICENSE FOR test_vt00.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 --

5
dist/make_dist.rb vendored
View File

@ -24,7 +24,7 @@ end
["client/carts/kipperkart.prg","c64/"],
["client/carts/kipperkart.bin","c64/"],
["client/carts/kipperkart_rr.bin","c64/"],
["client/carts/kipperterm.bin","c64/"],
#["client/carts/kipperterm.bin","c64/"],
["client/carts/netboot.bin","c64/"],
["client/nb65/d64_upload.prg","boot/"],
["client/examples/upnatom.prg","boot/"],
@ -38,6 +38,9 @@ end
["doc/netboot65.html","doc/index.html"],
#["doc/README.Apple2.html","doc"],
["doc/README.C64.html","doc"],
["doc/CONTRIBUTORS.txt","doc/"],
["doc/LICENSE.txt","doc/"],
["doc/kipper_api_technical_reference.doc","doc"],
["client/inc/common.i","inc"],
["client/inc/kipper_constants.i","inc"],

View File

@ -8,7 +8,7 @@ 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","nb65"].each do |dir_suffix|
["","ip65","doc","cfg","drivers","inc","test","carts"].each do |dir_suffix|
dir_path="#{WORKING_DIR}/#{dir_suffix}"
Dir.mkdir(dir_path) unless File.exist?(dir_path)
end
@ -16,7 +16,13 @@ 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/inc/*.i","inc/"],
["client/inc/vt100_font.bin","inc/"],
["client/test/*.[s|i]","test/"],
["client/test/Makefile","test/"],
["client/drivers/*.[s|i]","drivers/"],
@ -24,6 +30,8 @@ end
["client/cfg/*","cfg/"],
["doc/ip65.html","doc/index.html"],
["doc/ca65-doc*.*","doc/"],
["doc/CONTRIBUTORS.txt","doc/"],
["doc/LICENSE.txt","doc/"],
["client/Makefile","/"],
].each do |args|
dest="#{WORKING_DIR}/#{args[1]}"
@ -33,9 +41,9 @@ end
end
end
dummy_makefile=File.new("#{WORKING_DIR}/nb65/Makefile","w")
dummy_makefile<<"#dummy makefile, so we can reuse the top level Makefile from the netboot65/client directory\nall:\n"
dummy_makefile.close
#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

View File

@ -1 +1 @@
0.9.37
1.0.9

6
doc/CONTRIBUTORS.txt Normal file
View File

@ -0,0 +1,6 @@
CONTRIBUTORS
Jonno Downes - current maintainer of ip75, layers 4-7 (dhcp,dns,tcp,telnet, http, gopher)
Glenn Holmmer - icmp enhancements, bugfixes
Per Olofsson - initial creator of ip65, layers 1-3 (eth,arp,ip,icmp,udp)
Lars Stollenwerk - vt100 emulation

471
doc/LICENSE.txt Normal file
View File

@ -0,0 +1,471 @@
MOZILLA PUBLIC LICENSE
Version 1.1
---------------
1. Definitions.
1.0.1. "Commercial Use" means distribution or otherwise making the
Covered Code available to a third party.
1.1. "Contributor" means each entity that creates or contributes to
the creation of Modifications.
1.2. "Contributor Version" means the combination of the Original
Code, prior Modifications used by a Contributor, and the Modifications
made by that particular Contributor.
1.3. "Covered Code" means the Original Code or Modifications or the
combination of the Original Code and Modifications, in each case
including portions thereof.
1.4. "Electronic Distribution Mechanism" means a mechanism generally
accepted in the software development community for the electronic
transfer of data.
1.5. "Executable" means Covered Code in any form other than Source
Code.
1.6. "Initial Developer" means the individual or entity identified
as the Initial Developer in the Source Code notice required by Exhibit
A.
1.7. "Larger Work" means a work which combines Covered Code or
portions thereof with code not governed by the terms of this License.
1.8. "License" means this document.
1.8.1. "Licensable" means having the right to grant, to the maximum
extent possible, whether at the time of the initial grant or
subsequently acquired, any and all of the rights conveyed herein.
1.9. "Modifications" means any addition to or deletion from the
substance or structure of either the Original Code or any previous
Modifications. When Covered Code is released as a series of files, a
Modification is:
A. Any addition to or deletion from the contents of a file
containing Original Code or previous Modifications.
B. Any new file that contains any part of the Original Code or
previous Modifications.
1.10. "Original Code" means Source Code of computer software code
which is described in the Source Code notice required by Exhibit A as
Original Code, and which, at the time of its release under this
License is not already Covered Code governed by this License.
1.10.1. "Patent Claims" means any patent claim(s), now owned or
hereafter acquired, including without limitation, method, process,
and apparatus claims, in any patent Licensable by grantor.
1.11. "Source Code" means the preferred form of the Covered Code for
making modifications to it, including all modules it contains, plus
any associated interface definition files, scripts used to control
compilation and installation of an Executable, or source code
differential comparisons against either the Original Code or another
well known, available Covered Code of the Contributor's choice. The
Source Code can be in a compressed or archival form, provided the
appropriate decompression or de-archiving software is widely available
for no charge.
1.12. "You" (or "Your") means an individual or a legal entity
exercising rights under, and complying with all of the terms of, this
License or a future version of this License issued under Section 6.1.
For legal entities, "You" includes any entity which controls, is
controlled by, or is under common control with You. For purposes of
this definition, "control" means (a) the power, direct or indirect,
to cause the direction or management of such entity, whether by
contract or otherwise, or (b) ownership of more than fifty percent
(50%) of the outstanding shares or beneficial ownership of such
entity.
2. Source Code License.
2.1. The Initial Developer Grant.
The Initial Developer hereby grants You a world-wide, royalty-free,
non-exclusive license, subject to third party intellectual property
claims:
(a) under intellectual property rights (other than patent or
trademark) Licensable by Initial Developer to use, reproduce,
modify, display, perform, sublicense and distribute the Original
Code (or portions thereof) with or without Modifications, and/or
as part of a Larger Work; and
(b) under Patents Claims infringed by the making, using or
selling of Original Code, to make, have made, use, practice,
sell, and offer for sale, and/or otherwise dispose of the
Original Code (or portions thereof).
(c) the licenses granted in this Section 2.1(a) and (b) are
effective on the date Initial Developer first distributes
Original Code under the terms of this License.
(d) Notwithstanding Section 2.1(b) above, no patent license is
granted: 1) for code that You delete from the Original Code; 2)
separate from the Original Code; or 3) for infringements caused
by: i) the modification of the Original Code or ii) the
combination of the Original Code with other software or devices.
2.2. Contributor Grant.
Subject to third party intellectual property claims, each Contributor
hereby grants You a world-wide, royalty-free, non-exclusive license
(a) under intellectual property rights (other than patent or
trademark) Licensable by Contributor, to use, reproduce, modify,
display, perform, sublicense and distribute the Modifications
created by such Contributor (or portions thereof) either on an
unmodified basis, with other Modifications, as Covered Code
and/or as part of a Larger Work; and
(b) under Patent Claims infringed by the making, using, or
selling of Modifications made by that Contributor either alone
and/or in combination with its Contributor Version (or portions
of such combination), to make, use, sell, offer for sale, have
made, and/or otherwise dispose of: 1) Modifications made by that
Contributor (or portions thereof); and 2) the combination of
Modifications made by that Contributor with its Contributor
Version (or portions of such combination).
(c) the licenses granted in Sections 2.2(a) and 2.2(b) are
effective on the date Contributor first makes Commercial Use of
the Covered Code.
(d) Notwithstanding Section 2.2(b) above, no patent license is
granted: 1) for any code that Contributor has deleted from the
Contributor Version; 2) separate from the Contributor Version;
3) for infringements caused by: i) third party modifications of
Contributor Version or ii) the combination of Modifications made
by that Contributor with other software (except as part of the
Contributor Version) or other devices; or 4) under Patent Claims
infringed by Covered Code in the absence of Modifications made by
that Contributor.
3. Distribution Obligations.
3.1. Application of License.
The Modifications which You create or to which You contribute are
governed by the terms of this License, including without limitation
Section 2.2. The Source Code version of Covered Code may be
distributed only under the terms of this License or a future version
of this License released under Section 6.1, and You must include a
copy of this License with every copy of the Source Code You
distribute. You may not offer or impose any terms on any Source Code
version that alters or restricts the applicable version of this
License or the recipients' rights hereunder. However, You may include
an additional document offering the additional rights described in
Section 3.5.
3.2. Availability of Source Code.
Any Modification which You create or to which You contribute must be
made available in Source Code form under the terms of this License
either on the same media as an Executable version or via an accepted
Electronic Distribution Mechanism to anyone to whom you made an
Executable version available; and if made available via Electronic
Distribution Mechanism, must remain available for at least twelve (12)
months after the date it initially became available, or at least six
(6) months after a subsequent version of that particular Modification
has been made available to such recipients. You are responsible for
ensuring that the Source Code version remains available even if the
Electronic Distribution Mechanism is maintained by a third party.
3.3. Description of Modifications.
You must cause all Covered Code to which You contribute to contain a
file documenting the changes You made to create that Covered Code and
the date of any change. You must include a prominent statement that
the Modification is derived, directly or indirectly, from Original
Code provided by the Initial Developer and including the name of the
Initial Developer in (a) the Source Code, and (b) in any notice in an
Executable version or related documentation in which You describe the
origin or ownership of the Covered Code.
3.4. Intellectual Property Matters
(a) Third Party Claims.
If Contributor has knowledge that a license under a third party's
intellectual property rights is required to exercise the rights
granted by such Contributor under Sections 2.1 or 2.2,
Contributor must include a text file with the Source Code
distribution titled "LEGAL" which describes the claim and the
party making the claim in sufficient detail that a recipient will
know whom to contact. If Contributor obtains such knowledge after
the Modification is made available as described in Section 3.2,
Contributor shall promptly modify the LEGAL file in all copies
Contributor makes available thereafter and shall take other steps
(such as notifying appropriate mailing lists or newsgroups)
reasonably calculated to inform those who received the Covered
Code that new knowledge has been obtained.
(b) Contributor APIs.
If Contributor's Modifications include an application programming
interface and Contributor has knowledge of patent licenses which
are reasonably necessary to implement that API, Contributor must
also include this information in the LEGAL file.
(c) Representations.
Contributor represents that, except as disclosed pursuant to
Section 3.4(a) above, Contributor believes that Contributor's
Modifications are Contributor's original creation(s) and/or
Contributor has sufficient rights to grant the rights conveyed by
this License.
3.5. Required Notices.
You must duplicate the notice in Exhibit A in each file of the Source
Code. If it is not possible to put such notice in a particular Source
Code file due to its structure, then You must include such notice in a
location (such as a relevant directory) where a user would be likely
to look for such a notice. If You created one or more Modification(s)
You may add your name as a Contributor to the notice described in
Exhibit A. You must also duplicate this License in any documentation
for the Source Code where You describe recipients' rights or ownership
rights relating to Covered Code. You may choose to offer, and to
charge a fee for, warranty, support, indemnity or liability
obligations to one or more recipients of Covered Code. However, You
may do so only on Your own behalf, and not on behalf of the Initial
Developer or any Contributor. You must make it absolutely clear than
any such warranty, support, indemnity or liability obligation is
offered by You alone, and You hereby agree to indemnify the Initial
Developer and every Contributor for any liability incurred by the
Initial Developer or such Contributor as a result of warranty,
support, indemnity or liability terms You offer.
3.6. Distribution of Executable Versions.
You may distribute Covered Code in Executable form only if the
requirements of Section 3.1-3.5 have been met for that Covered Code,
and if You include a notice stating that the Source Code version of
the Covered Code is available under the terms of this License,
including a description of how and where You have fulfilled the
obligations of Section 3.2. The notice must be conspicuously included
in any notice in an Executable version, related documentation or
collateral in which You describe recipients' rights relating to the
Covered Code. You may distribute the Executable version of Covered
Code or ownership rights under a license of Your choice, which may
contain terms different from this License, provided that You are in
compliance with the terms of this License and that the license for the
Executable version does not attempt to limit or alter the recipient's
rights in the Source Code version from the rights set forth in this
License. If You distribute the Executable version under a different
license You must make it absolutely clear that any terms which differ
from this License are offered by You alone, not by the Initial
Developer or any Contributor. You hereby agree to indemnify the
Initial Developer and every Contributor for any liability incurred by
the Initial Developer or such Contributor as a result of any such
terms You offer.
3.7. Larger Works.
You may create a Larger Work by combining Covered Code with other code
not governed by the terms of this License and distribute the Larger
Work as a single product. In such a case, You must make sure the
requirements of this License are fulfilled for the Covered Code.
4. Inability to Comply Due to Statute or Regulation.
If it is impossible for You to comply with any of the terms of this
License with respect to some or all of the Covered Code due to
statute, judicial order, or regulation then You must: (a) comply with
the terms of this License to the maximum extent possible; and (b)
describe the limitations and the code they affect. Such description
must be included in the LEGAL file described in Section 3.4 and must
be included with all distributions of the Source Code. Except to the
extent prohibited by statute or regulation, such description must be
sufficiently detailed for a recipient of ordinary skill to be able to
understand it.
5. Application of this License.
This License applies to code to which the Initial Developer has
attached the notice in Exhibit A and to related Covered Code.
6. Versions of the License.
6.1. New Versions.
Netscape Communications Corporation ("Netscape") may publish revised
and/or new versions of the License from time to time. Each version
will be given a distinguishing version number.
6.2. Effect of New Versions.
Once Covered Code has been published under a particular version of the
License, You may always continue to use it under the terms of that
version. You may also choose to use such Covered Code under the terms
of any subsequent version of the License published by Netscape. No one
other than Netscape has the right to modify the terms applicable to
Covered Code created under this License.
6.3. Derivative Works.
If You create or use a modified version of this License (which you may
only do in order to apply it to code which is not already Covered Code
governed by this License), You must (a) rename Your license so that
the phrases "Mozilla", "MOZILLAPL", "MOZPL", "Netscape",
"MPL", "NPL" or any confusingly similar phrase do not appear in your
license (except to note that your license differs from this License)
and (b) otherwise make it clear that Your version of the license
contains terms which differ from the Mozilla Public License and
Netscape Public License. (Filling in the name of the Initial
Developer, Original Code or Contributor in the notice described in
Exhibit A shall not of themselves be deemed to be modifications of
this License.)
7. DISCLAIMER OF WARRANTY.
COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF
DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING.
THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE
IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT,
YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE
COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER
OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF
ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
8. TERMINATION.
8.1. This License and the rights granted hereunder will terminate
automatically if You fail to comply with terms herein and fail to cure
such breach within 30 days of becoming aware of the breach. All
sublicenses to the Covered Code which are properly granted shall
survive any termination of this License. Provisions which, by their
nature, must remain in effect beyond the termination of this License
shall survive.
8.2. If You initiate litigation by asserting a patent infringement
claim (excluding declatory judgment actions) against Initial Developer
or a Contributor (the Initial Developer or Contributor against whom
You file such action is referred to as "Participant") alleging that:
(a) such Participant's Contributor Version directly or indirectly
infringes any patent, then any and all rights granted by such
Participant to You under Sections 2.1 and/or 2.2 of this License
shall, upon 60 days notice from Participant terminate prospectively,
unless if within 60 days after receipt of notice You either: (i)
agree in writing to pay Participant a mutually agreeable reasonable
royalty for Your past and future use of Modifications made by such
Participant, or (ii) withdraw Your litigation claim with respect to
the Contributor Version against such Participant. If within 60 days
of notice, a reasonable royalty and payment arrangement are not
mutually agreed upon in writing by the parties or the litigation claim
is not withdrawn, the rights granted by Participant to You under
Sections 2.1 and/or 2.2 automatically terminate at the expiration of
the 60 day notice period specified above.
(b) any software, hardware, or device, other than such Participant's
Contributor Version, directly or indirectly infringes any patent, then
any rights granted to You by such Participant under Sections 2.1(b)
and 2.2(b) are revoked effective as of the date You first made, used,
sold, distributed, or had made, Modifications made by that
Participant.
8.3. If You assert a patent infringement claim against Participant
alleging that such Participant's Contributor Version directly or
indirectly infringes any patent where such claim is resolved (such as
by license or settlement) prior to the initiation of patent
infringement litigation, then the reasonable value of the licenses
granted by such Participant under Sections 2.1 or 2.2 shall be taken
into account in determining the amount or value of any payment or
license.
8.4. In the event of termination under Sections 8.1 or 8.2 above,
all end user license agreements (excluding distributors and resellers)
which have been validly granted by You or any distributor hereunder
prior to termination shall survive termination.
9. LIMITATION OF LIABILITY.
UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT
(INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL
DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE,
OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR
ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY
CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL,
WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER
COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN
INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF
LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY
RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW
PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE
EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO
THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
10. U.S. GOVERNMENT END USERS.
The Covered Code is a "commercial item," as that term is defined in
48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer
software" and "commercial computer software documentation," as such
terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48
C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995),
all U.S. Government End Users acquire Covered Code with only those
rights set forth herein.
11. MISCELLANEOUS.
This License represents the complete agreement concerning subject
matter hereof. If any provision of this License is held to be
unenforceable, such provision shall be reformed only to the extent
necessary to make it enforceable. This License shall be governed by
California law provisions (except to the extent applicable law, if
any, provides otherwise), excluding its conflict-of-law provisions.
With respect to disputes in which at least one party is a citizen of,
or an entity chartered or registered to do business in the United
States of America, any litigation relating to this License shall be
subject to the jurisdiction of the Federal Courts of the Northern
District of California, with venue lying in Santa Clara County,
California, with the losing party responsible for costs, including
without limitation, court costs and reasonable attorneys' fees and
expenses. The application of the United Nations Convention on
Contracts for the International Sale of Goods is expressly excluded.
Any law or regulation which provides that the language of a contract
shall be construed against the drafter shall not apply to this
License.
12. RESPONSIBILITY FOR CLAIMS.
As between Initial Developer and the Contributors, each party is
responsible for claims and damages arising, directly or indirectly,
out of its utilization of rights under this License and You agree to
work with Initial Developer and Contributors to distribute such
responsibility on an equitable basis. Nothing herein is intended or
shall be deemed to constitute any admission of liability.
13. MULTIPLE-LICENSED CODE.
Initial Developer may designate portions of the Covered Code as
"Multiple-Licensed". "Multiple-Licensed" means that the Initial
Developer permits you to utilize portions of the Covered Code under
Your choice of the NPL or the alternative licenses, if any, specified
by the Initial Developer in the file described in Exhibit A.
EXHIBIT A -Mozilla Public License.
``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 ______________________________________.
The Initial Developer of the Original Code is ________________________.
Portions created by ______________________ are Copyright (C) ______
_______________________. All Rights Reserved.
Contributor(s): ______________________________________.
Alternatively, the contents of this file may be used under the terms
of the _____ license (the "[___] License"), in which case the
provisions of [______] License are applicable instead of those
above. If you wish to allow use of your version of this file only
under the terms of the [____] License and not to allow others to use
your version of this file under the MPL, indicate your decision by
deleting the provisions above and replace them with the notice and
other provisions required by the [___] License. If you do not delete
the provisions above, a recipient may use your version of this file
under either the MPL or the [___] License."
[NOTE: The text of this Exhibit A may differ slightly from the text of
the notices in the Source Code files of the Original Code. You should
use the text of this Exhibit A rather than the text found in the
Original Code Source Code for Your Modifications.]