NETMON

This couple of tools allows you to connect your PC to C64 via RR-Net. Communication is done via UDP/IP - Protocol and is based heavily on updslave by Mager Valp. Thanks a lot!

NETMON gives you a powerful monitoring tool for cross developping or remote accessing your c64 equipped with  a RR-Net. NETMON is available as Windows Executable or for Linux/Unix (Source and Binary)
NETSERV is the server that runs on C64-side.

On C64 just load NETSERV and start the server with


SYS 49152[,IP-ADDRESS]
NETSERV will report OK and wait for incoming ethernet packets if rr-net is present and initialized, else prompt a "device not present error".
The server can be quitted by hitting RUN/STOP on C64.
Netserv will start with IP Adress 192.168.0.64 by default but you may change this by typing an IP Address after the SYS Command seperated by COMMAS(!):

SYS 49152,192,168,1,99

When NETSERV is running, leave your C64 and start NETMON on the PC. You will be in some kind of shell now resembling strongly to a standard machine languag monitor, just that any commands will be sent over to the C64, executed there and a response will be send back which will be processed and displayed in the NETMON-Shell.

To make use of NETMON from within scripts, it is possible to avoid the shell and give a single command as parameter. See the Reference for details about this feature.

NETMON allows full access to all C64-RAM (including REU!!) and devices on the serial bus (disk drives).


DOWNLOAD NETMON

current release is v0.3

netmon-v0.3.zip

The ZIP contains everything you'll need including all sources and the Windows Executable.

QUICK REFERENCE

To start the netmon shell, simply type
netmon
at a command line prompt.
The default C64 IP is 192.168.0.64.

netmon [options] [direct command]
-ip addr		set ip address
-v			print version
-h --help		this help

Netmon will start in the SHELL-MODE by default. However it is possible to invoke Netmon just for one single command passed as parameter and bypass the shell-mode. Netmon will interpret any string from the command line that is not an option as a single command line.

All numeric input and output is in HEX only, except with the '#'-command (device numbers are decimals)!!
All parameters are seperated by spaces. To allow spaces within one (string) parameter, set it into quotation marks.
Also use quotation marks to specify string parameters

Attention: Most likely your local shell will interpret the quotation marks if given at the command line promt, so try masking them if giving commands as parameter so that Netmon will recognize them correctly - in Linux/UNIX bash you would need to preceed each quotation mark by a backslash to do so. Don't ask me how to do that under Windows, coz I don't know....

MEMORY COMMANDS


m
m [addr [addr]]
will display the memory content of the specified memory area as well-known hex ASCII & PetASCII dump

i
i [addr [addr]]
display the specified memory area as PetASCII dump

d
d [addr [addr]]
print a disassembly of the specified memory area to stdout.
if no address range is given for m,i or d it will start at 0x0000 and continue where it stopped last time

ram
ram [value]
set the type of memory access. If no value is given it will default to #$34. A value >$80 will set REU access. REU memory is then accessed just by specifying 24-bit-addresses (e.g. $034567 will acces address $4567 in bank 3).

rom
shortcut for ram $37

reu
shortcut for ram $ff

put
put filename [addr]
sends the contents of filename to c64 memory at addr. if addr is not given, the first two bytes of the file are used as "load address", else the whole file, including the first two bytes is sent to the given memory location.

get
get addr addr filename
get specified memroy area and save to filename.

poke
poke addr "string" | val[val[val...]]]
write string or val-byte(s) to addr. (try poke 0400 "hello world!")

f
f from to value
fill c64 memory with value in given range specified by from and to.

h
h from to "string" | [val[val[val...]]]
searches for occurances of "string" or val,val,val ... in memory area specified by from and to.

c
c from to with
compares the memory segment starting at from up to to with the memory segment starting at with. prints any mismatches to stdout.


EXECUTION COMMANDS


g
g addr
jump (goto) to the given address

call
call addr [areg[xreg[yreg[sreg]]]]
call a subroutine - performs a JSR to addr with the registers set to areg,xreg,yreg and sreg (status-register) before calling. registers not specified are set to zero.
If the called routine returns and NETSERV is still alive, it will report the register values upon re-entry.
basic
exit server to BASIC.

run
perform BASIC "RUN".

DISK ACCESS


$
$[pattern]
show directory of current device. Use any pattern that your drive supports, e.g. $*=SEQ

#
#[value]
set/ tell current device. if no value is specified, it will display the current device, else the device is set to value.

@
@[string]
will send any chars following the '@' to command channel and read it afterwards. Be aware that there is NO SPACE between @ and string and that in this exceptional case, no '#' is needed to specify a string parameter!

read
read localfile [remotefile]
read a file from disk to local filesystem - reads localfile from disk and saves it to remotefile in the local filesystem. if remotefile is not specified it will default to the same name as localfile.

write
write localfile [remotefile]
write a file from the local filesystem to disk - reads localfile from local filesystem disk and saves it to remotefile on disk. if remotefile is not specified it will default to the same name as localfile.

MISC COMMANDS


status
displays some info about server status.

quit, x
exit netmon.

help, ?
help | ? [command]
display help; you may specify a specific command to get help only for this command.

cmd
cmd string [parameter [parameter... ]]
send all following parameters to the local system's shell, e.g. try cmd ls -l to send the ls command with parameter -l to your linux shell.

HISTORY

05.03.2007: some more changes and bugfixes. version is v0.3 now. Some changes in parameter handling! Netserv now allows custom IP-Addresses. Start Address for Netserv changed to 49152!
02.03.2007: Did some more changes here and there, added "direct-command"-feature.
01.03.2007: added another Win32 port. Some minor changes. Rewrote Netserv in CA65. Version is 0.2 now.
19.19.2006: removed Win32 port since it seemed not to work and added the Win32 port of Ian Coog.
18.10.2006: added Win32 port of Netmon
17.10.2006: initial release v0.1

CONTACT

feel free to email me some feedback of whatever kind: hannenz@freenet.de

LICENSE

Copyright © 2006, Per Olofsson
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.