-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart_ITS.sh
More file actions
60 lines (59 loc) · 1.64 KB
/
start_ITS.sh
File metadata and controls
60 lines (59 loc) · 1.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/bin/bash -xv
# Script to start Mazewar
# 1) Stops running PDP-10 emulator if running
# 2) Starts PDP-10 Emulator ready for loading ITS
# 3) Starts ITS
# 4) Starts Imlac smart terminal, logs in, and runs Mazewar
sleep 10
pdpcontrol stop
sleep 10
pdpcontrol start 1
sleep 20
echo "its" | ncat localhost 1025
echo -e "\eG" | ncat localhost 1025
sleep 20
pdp imlac
sleep 5
imlac=$(xdotool search --name 'Imlac - CRT - Imlac Display')
while [ -z "imlac" ]; do #wait until there is a window
sleep 2
imlac=$(xdotool search --name 'Imlac - CRT - Imlac Display')
done
echo $imlac
xdotool windowactivate $imlac
xdotool key ctrl+z
sleep 5
d=200 ###delay between keystrokes
xdotool windowactivate $imlac #redo this each command in case a user clicks away
xdotool type --window $imlac --delay $d ':LOGIN MADE'
xdotool key 0xff0d ###carriage return
sleep 1
xdotool windowactivate $imlac
xdotool type --window $imlac --delay $d ':TCTYPE OIMLAC'
xdotool key 0xff0d
sleep 1
xdotool windowactivate $imlac
xdotool type --window $imlac --delay $d ':CWD GAMES'
xdotool key 0xff0d
sleep 1
xdotool windowactivate $imlac
xdotool type --window $imlac --delay $d ':RUN MAZE C'
xdotool key 0xff0d
xdotool windowactivate $imlac
sleep 2
xdotool windowactivate $imlac
xdotool key 0xff0d #### return to accept default maze
sleep 10
#should now be looking at the map of the maze
xdotool windowactivate $imlac
xdotool key Right
#xdotool key F11 #make full screen
#done. Now in the maze
#start bots
python3 /home/pi/mazewar_bot.py &
sleep 30
python3 /home/pi/mazewar_bot.py &
sleep 30
python3 /home/pi/mazewar_bot.py &
#sleep forever, otherwise the imlac terminal will be killed
sleep infinity