How to use

This Version can be compiled on Linux and Windows/MinGW
This version requires 32 bit CPU (or 64Bit CPU in 32 bit mode)

Compile from source on linux,
Required - gcc3.4 (gcc 4.x is not supported)
1. Edit Make file, and customize lines
CC=gcc-3.4
HOST_CC=gcc-3.4
CC specifies gcc-3.4 executable - in some systems it could be just gcc.
2. Type "make"

Compile from source on Windows
Requires MinGw and eventually some other libs and header (like libz)
1. Edit Makefile and uncomment line
CONFIG_WIN32=YES
Change CC and HOST_CC lines to 
CC=gcc
HOST_CC=gcc
2. Compile as any other mingw program

How to use:
1. Download PIXOS image from somewhere
2. Edit pemu.ini, it should look like:
-----
serial=0x12345678  <--- PUT Your Serial Number here
image=pix722.bin   <--- PUT YOUR PIXOS image name here

If using PIXOS 6.x, add following line with valid key for specified SN

key=0x00000000,0x00000000,0x00000000,0x00000000
-----
If you already have image installed in flash, edit the second line to:
image=NONE
3. Decide how to connect virtual pix to real world or lab.

Virtual network interfaces can implemented in following ways:
  1. TAP interfaces - tap
  2. Using UDP packets to send ethernet frames - udp
  3. Using direct connection to physical interface - pcap
  4. Using direct connection to physical interface - lcap - Only on linux!!

Interfaces are specified with following option:
-net nic,vlan=1,macaddr=00:aa:00:00:02:01
Pemu supports max 5 interfaces.
MAC addresses should be different for each interface, and each pix 
connected to network.

Each of these options (-net nic ...) is paired with second option, specifying
how the virtual interface is implemented (tap, lcap, udp, pcap)

1. Using TAP interfaces on linux
Edit ifup.ini to configure how interfaces are initialized it should look 
like this:
------
tap0 10.0.0.1 255.255.255.0
tap1 10.1.0.1 255.255.255.0
tap2 10.2.0.1 255.255.255.0
tap3 10.3.0.1 255.255.255.0
------
Tap interfaces are connected to virtual interface using option like this
"-net tap,vlan=1,ifname=tap1,script=ifup"
vlan parameter correspond to virtual interface (created with -net nic)
script=ifup is name of the script that initializes interfaces
ifname=tap1 specifies interface name
Tap interfaces could be routed or bridged via HOST OS.

2. Direct connection to eth interface (pcap or lcap).
It is specified with options like this: 
"-net lpap,vlan=1,ifname=eth0"
Vlan parameter correspond to virtual interface (created with -net nic)
ifname=... specifies interface to connect to.
WARNING - using this method will not allow traffic to/from host machine via
this interface on linux.
If name, specified with "ifname=" is incorrect, the program will display all
supported interfaces, so You can choose correct one.

3. Using UDP packet sending
Interfaces are specified using 
"-net udp,vlan=1,sport=SOURCE_PORT,dport=DEST_PORT,daddr=DES_IP"
Vlan parameter correspond to virtual interface (created with -net nic)
sport specifies source port (and port to listen to)
dport specifies destionation port - where packets are send
daddr specifies destionation IP address

Emulator should be started with command like this
./pemu \
  -net nic,vlan=1,macaddr=00:aa:00:00:02:01 -net tap,vlan=1,script=ifup\
  -net nic,vlan=2,macaddr=00:aa:00:00:02:02 -net pcap,vlan=2,ifname=eth1\
  -net nic,vlan=3,macaddr=00:aa:00:00:02:03 -net lcap,vlan=3,ifname=eth0\
  -net nic,vlan=4,macaddr=00:aa:00:00:02:04 \
      -net udp,sport=2000,dport=2001,daddr=127.0.0.1\
  -serial stdio\
  -m 128\
  FLASH

or in windows - \
pemu.exe ... (everything on same line)
-serial stdio doesn't work on windows (see bellow for alternatives)

Amount of RAM for emulated pix is specified with -m option
for pixos 6.x -m 32 should be enough
for pixos 7.x and 8.x -m 128 is required (some earlier 7.0 version can run
restricted software with 64 RAM)
WARNING choose number that looks like possible amount of RAM e.g.
16,32,64,128,192,256 ....

The latest argument is FLASH image file. If you run several PIX instances,
from same directory, different FLASH images should be chosen, as it is not
recommended for several processes to write to one file

serial console is specified with -serial parameter
tested options are
-serial stdio - it will send all traffic to stdio (only on linux)
-serial telnet::PORT,server,nowait - in this case serial console is
accessible with command "telnet localhost PORT" (replace "PORT" which any
number between 1024 and 65536)
There are other ways of using -serial option - check qemu documentation for
more info

Program is terminated with pressing ctrl-c, on terminal where it is started
(which could be annoying if using -serial stdio)

There is no official web page for this software. If you have any questions,
ask them in HACKI FORUM - http://7200emu.hacki.at/

If You intend to create whole lab with pemu, try dynagen http://www.dynagen.org
