Test Socket Howto
VirtualT offers a socket through which you can script many emulator operations or validate functionality of software running within the emulator.
This is a powerful facility for "automated testing." It is hoped that this will make high quality Model T software even easier to develop under VirtualT.
Here are some quick tips from Kenneth Pettit to get started using the vt_client (other clients are possible, a Perl module by John Hogerhuis is in the works):
Using vt_client
Start VirtualT first with a command line parameter to specify the socket port number:
virtualt -p 20000
Then start the vt_client with the same socket number:
vt_client 20000 (socket number is a param, not a switch)
The client prints a few lines of helper info, but the real help is embedded in VT. Type help to receive a list of supported commands from VT. All the commands listed work. For the commands that it makes sense, multiple arguments can be specified, such as:
read_reg a b pc sp
key enter "10 a=2" enter "20 print a" enter
key left left left code+shift+a "This is sample text that will be \"typed\" at the keyboard"
wm 0x9000 2 54 11 89 0xa2 0xb1 89 122
flags s z c
flags s=1 z=0
wr a=0x12 b=0x32 hl=32441
etc.
For the key command, to "type" a quote, it is escaped with \ so
" = \"
\ = \\
You can set a breakpoint on every address if you really want. When setting a breakpoint you can specify which bank or banks the breakpoint is valid for. If you don't specify, it defaults to all banks (that make sense for the address). All breakpoints call be cleared with:
cb all
and listed with
lb
etc., etc, etc.
I didn't add any ReMem read / write functions yet or memory load/save to a file. The number of things that could be added is endless it seems.