Test Socket Howto: Difference between revisions

From Bitchin100 DocGarden
Jump to navigationJump to search
(New page: 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 "automate...)
 
Line 54: Line 54:
   
   
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.
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.
== LCD Monitoring Facility Notes ==
LCD monitoring allows you to receive an echo of the text strings being printed to the Model 100/102 screen via the test socket. The mechanism results in just the actual data because there is an escape sequence for every character written to the LCD for cursor control.  It captures the output at the Character Plottling Level 6 routine and build "strings" based on an incrementing column number with a timeout.
In order to squelch noise from frequent screen updates, It has an lcd_ignore(li) command that allows up to 10 ignore regions.  The (row,col) coordinates are 1 based, so to ignore the date/time, the command is:
li (1,1)-(1,24)
The parser is fairly stupid and must follow the syntax exactly, although spaces after the comma are allowed.  All ignore regions can be clered with:
li none
LCD monitoring is turned on with the lcd_mon(lm) function.  The parameters are either "on" or "off".
events are reported as follows:
event, lcdwrite, (1, 1),Data to the LCD

Revision as of 13:42, 26 January 2008

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.

LCD Monitoring Facility Notes

LCD monitoring allows you to receive an echo of the text strings being printed to the Model 100/102 screen via the test socket. The mechanism results in just the actual data because there is an escape sequence for every character written to the LCD for cursor control. It captures the output at the Character Plottling Level 6 routine and build "strings" based on an incrementing column number with a timeout.

In order to squelch noise from frequent screen updates, It has an lcd_ignore(li) command that allows up to 10 ignore regions. The (row,col) coordinates are 1 based, so to ignore the date/time, the command is:

li (1,1)-(1,24)

The parser is fairly stupid and must follow the syntax exactly, although spaces after the comma are allowed. All ignore regions can be clered with:

li none

LCD monitoring is turned on with the lcd_mon(lm) function. The parameters are either "on" or "off".

events are reported as follows:

event, lcdwrite, (1, 1),Data to the LCD