-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrunscript.py
48 lines (40 loc) · 920 Bytes
/
runscript.py
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
import os
import subprocess
from time import sleep
filedata = r"""
[cpu]
cycles = max
[sdl]
fullresolution=640x400
windowresolution=640x400
output=openglpp
[autoexec]
mount C C:\8086\ParaParaPara_x86
C:
tasm /m2 *.asm
link Menu.obj main.obj Ball2.obj Ball.obj Bricks.obj Bricks2.obj Paddle.obj Paddle2.obj Multi.obj send.obj ;
"""
filedata += "\nMenu.exe"
filedata1 = (
filedata
+ r"""
[serial]
serial1=directserial realport:COM1
"""
)
filedata2 = (
filedata
+ r"""
[serial]
serial1=directserial realport:COM2
"""
)
with open("dosbox-x-generated1.conf", "w") as file:
file.write(filedata1)
with open("dosbox-x-generated2.conf", "w") as file:
file.write(filedata2)
prog1 = ["C:\8086\DOSBox-COM1\DOSBox.exe", "-conf", "dosbox-x-generated1.conf"]
prog2 = ["C:\8086\DOSBox-COM1\DOSBox.exe", "-conf", "dosbox-x-generated2.conf"]
subprocess.Popen(prog1)
sleep(2)
subprocess.Popen(prog2)