NETBOOT FOR THE C64
There are 2 major 'flavours' of clients, the major difference being whether the cart supports UDP only (but allows access to BASIC), or UDP + TCP (but loses access to BASIC). The
reason for this is the UDP only version of the client fits into an 8KB cartridge, whereas the TCP code pushes the cartridge size up to 16KB, and the upper half of a 16KB cartridge sits in the same
memory location as BASIC.
Within the major flavours, there are also variations in media - the majority of code is identical between the different media but there are different headers etc. The supported media are:
- A program that can be loaded from disk (filename will end with .prg)
- 'ordinary' cartridge images (that can be burned into an eeprom on e.g. a 64NIC+ card) (filename will end with .bin)
- 'Retro Replay' cartridge images - these are actually 'ordinary' cartridge images that have been converted into a form suitable for use in a Retro Replay using Doc Bacardi's
CRT8040 tool (filename will end with _rr.bin)
filename | flavour | cartidge size |
netboot.bin | UDP only (+ BASIC) | 8KB cart |
kipperkart.bin | UDP/TCP (no BASIC) | 16KB cart |
kippergo.bin | basic telnet & gopher client | 16KB cart |
kipperterm.bin | enhanced telnet | 16KB cart |
USING THE CARTRIDGES
When one of the cartridge images start, it will attempt to configure the IP stack via DHCP. If the DHCP config fails (either by timing out, or the user press RUN/STOP)
then the IP stack will fall back to using the IP configuration built into the cartridge. See the section "IP CONFIGURATION" for info on how to modify the
cartridge defaults prior to burning an image.
NETBOOT - UDP only cart
Once the IP stack is initialised, an attempt to boot from the network will take place. a TFTP server will be queried for a list of PRG files, and then a menu appears allowing the selection of a file to be downloaded and executed. Most 'single load' applications should work
KIPPERKART - UDP/TCP cart
- F1 : TFTP BOOT. This will query a TFTP server for a list of PRG files, and allow the selection of a file to be downloaded and executed. This version of TFTP BOOT is restricted to running only
pure machine language programs, since BASIC is not available when this cart is active. (NB - programs that are pure M/L except for a BASIC stub consisting of a single SYS call will be executed).
- F2 : DISK BOOT. This will display a catalogue of files in drive #8 and allow the selection of a file to be executed. This version of DISK BOOT is restricted to running only
pure machine language programs, since BASIC is not available when this cart is active. (NB - programs that are pure M/L except for a BASIC stub consisting of a single SYS call will be executed).
- F3 : UPLOAD D64. You will prompted to specify a filename, then the disk in the default drive will be read and sent to the tftp server
- F4 : DOWNLOAD D64. A TFTP server is queried for a list of D64 files, which can be selected from a menu. Once a D64 file is selected, it will be downloaded and written to the default drive (usually #8).
- F5 : SID NETPLAY. A TFTP server is queried for a list of SID files, which can be selected from a menu. Once a SID file is selected, it will be played. Not all SIDs work yet.
- F6 : PING. You will be prompted for a hostname which will be pinged 3 times, and a response time (in milliseconds) is printed for each ping.
- F7 : CONFIG. This brings up a menu where the IP configuration can be modified. Changes made here will be persistent until the next reboot.
AUTOEXEC
Once the 16KB cartridge image has initialised the IP stack, it will look for a file called "autoexec.prg" on the default drive. If this file is found it will be loaded (using the load address specified by the first 2
bytes of the file) and executed. NB - since BASIC is not available only 100% Machine Language programs can be executed, although if there is a BASIC stub consisting of a single line that does a SYS
call, the target of the SYS call will be used as the address to start execution from.
KIPPERGO cart
- F1 : TELNET. You will be prompted to enter a hostname, a port number, and a connection mode. Connection mode is either
- VT100 - keypresses are converted to ASCII before being sent out, and incoming data is converted to PETSCII before being displayed. Many common VT100 escape codes are interpreted, and keystrokes are sent a character at a time.
- PETSCII - no translation is done on data coming in or out. This mode is suitable for connecting to PETSCII BBSs
Once a connection is made, it can be terminated by hitting RUN/STOP
- F3 : GOPHER. You will be prompted to enter the hostname (only - no port number can be specified) of a gopher server, and the gopher client will be launched connecting to the specified server.
- F5 : GOPHER.FLOODGAP.COM. This will launch the Gopher client, and connect to the gopher portal at gopher://gopher.floodgap.com/
- F7 : CONFIG. This brings up a menu where the IP configuration can be modified. Changes made here will be persistent until the next reboot.
Gopher Client
Once a gopher resource is loaded, the following keys are active:
- SPACE, F7 or down arrow : scroll down to next page
- F1 or up arror : scroll up to previous page
- F2 : show recently visited resource
- F3 or left arrow : go back to last visited resource
- F5 : prompt to enter a new server (nb server name only - not resource or port)
- RUN/STOP : quit
If the page currently being displayed has links to further resources in it, each link will be displayed
starting with a highlighted letter (e.g. the first link on a page will have an inverse "A" next to it,
the 2nd link on a page will have an inverse "B" next to it etc). Press the letter assigned to the link
to load up that resource.
KIPPERTERM cart
- F1 : TELNET. You will be prompted to enter a hostname, a port number, and a connection mode. Connection mode is either
- VT100 - keypresses are converted to ASCII before being sent out, and incoming data is converted to PETSCII before being displayed. Many common VT100 escape codes are interpreted, and keystrokes are sent a character at a time.
- PETSCII - no translation is done on data coming in or out. This mode is suitable for connecting to PETSCII BBSs
Once a connection is made, it can be terminated by hitting RUN/STOP
File Transfer
While connected, you can hit F1 to bring up a file transfer menu. This menu presents the following options:
- F1 : D/L File (XMODEM). Select this option after you have started the file download process on the remote server. You will be prompted for a filename for the file to be saved as after the download has completed.
- F3 : U/L File (XMODEM). Select this option after you have started the file upload process on the remote server. You will be given a menu of files on the local disk to transfer.
- F5 : Send ASCII char. You will be prompted to enter a number between 0 and 255, and the corresponding byte will be sent. This is useful for sending characters which can't be entered on a C64 keyboard.
- F7 : Return. Selecting this option will restore the screen return you to your connection
IP CONFIGURATION
There is a script in the "bin" folder called "set_ip_config.rb" that can be used to modify the MAC address and IP config details in the cart image before
it is burned. For example, to set the MAC address and DNS servers, use this command:
set_ip_config.rb nb65_std_cart.bin mac ab:cd:ef:12:34:56 dns 10.5.1.1
run "set_ip_config.rb" with no parameters to see all the options for what can be configured.
STARTING THE SERVER
- unzip the archive somewhere on your local hard drive
- start the bin/tftp_server.rb script (e.g. by double-clicking on it)
ADDING MORE FILES
Only single-load files can be used. The files need to be in "PRG" format, i.e.the first 2 bytes of the file must be
the load address (little-endian, i.e. low/high). The files also need to have a file extension of ".PRG" (in upper case, if your operating system of choice
is case sensitive).
Files need to be placed in the 'boot/' folder.
Due to a limitation in the menu selection code, only the first 128 PRG files in the boot/ folder can be selected.
ERROR CODES
Most network functions will return an 8 bit error code if things go wrong.
ERROR CODE | DESCRIPTION |
$80 | PORT IN USE |
$81 | TIMEOUT ON RECEIVE |
$82 | TRANSMIT FAILED |
$83 | TRANSMISSION REJECTED BY PEER |
$84 | INPUT TOO LARGE |
$85 | DEVICE FAILURE |
$86 | ABORTED BY USER |
$87 | LISTENER NOT AVAILABLE |
$88 | NO SUCH LISTENER |
$89 | CONNECTION RESET BY PEER |
$8A | CONNECTION CLOSED |
$8B | TOO MANY ERRORS |
$90 | FILE ACCESS FAILURE |
$A0 | MALFORMED URL |
$A1 | DNS LOOKUP FAILED |
$FE | OPTION NOT SUPPORTED |
$FF | FUNCTION NOT SUPPORTED |
REQUIREMENTS
- RR-NET or compatible adaptor (to use under VICE, you will need pcap or winpcap installed)
- (RECOMMENDED) a DHCP server on your network
- a working ruby installation
LICENSE
NETBOOT65 is licensed under the same terms as IP65, the Mozilla Public License Version 1.1.
SOURCE CODE
Browse online at http://netboot65.svn.sourceforge.net/viewvc/netboot65/ or else download the whole tree through SVN with the following instruction set:
svn co https://netboot65.svn.sourceforge.net/svnroot/netboot65 netboot65
CREDITS
Package is maintained by Jonno Downes - jonno@jamtronix.com
Contributors
- Jonno Downes - current maintainer of ip65, original developer of layers 4-7 (dhcp,dns,tcp,telnet, http, gopher)
- Glenn Holmer - icmp enhancements, bugfixes
- Per Olofsson - initial creator of ip65, original developer of layers 1-3 (eth,arp,ip,icmp,udp)
- Lars Stollenwerk - vt100 emulation