-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathrundev.py
More file actions
92 lines (69 loc) · 1.76 KB
/
rundev.py
File metadata and controls
92 lines (69 loc) · 1.76 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
import os
import subprocess
import shutil
import sys
import sys
import prep
TOWNSTYPE="DEV"
THISFILE=os.path.realpath(__file__)
THISDIR=os.path.dirname(THISFILE)
TSUGARUDIR=os.path.join(THISDIR,"..","TOWNSEMU")
BUILDDIR=os.path.join(TSUGARUDIR,"build")
SRCDIR=os.path.join(TSUGARUDIR,"src")
ROMDIR=os.path.join(TSUGARUDIR,"..","TOWNSEMU_TEST","ROM_"+TOWNSTYPE)
DISKDIR=os.path.join(TSUGARUDIR,"..","TOWNSEMU_TEST","DISKIMG")
MEMCARDDIR=os.path.join(TSUGARUDIR,"..","TOWNSEMU_TEST","MEMCARD")
DISCDIR=os.path.join("/","d","TownsISO")
def ExeExtension():
if sys.platform.startswith('win'):
return ".exe"
else:
return ""
def TsugaruExe():
fName=os.path.join(BUILDDIR,"main_cui","Tsugaru_CUI"+ExeExtension())
if os.path.isfile(fName):
return fName
fName=os.path.join(BUILDDIR,"main_cui","Release","Tsugaru_CUI"+ExeExtension())
if os.path.isfile(fName):
return fName
print("Tsugaru executable not found")
ErrorExit()
def Run(argv):
subprocess.Popen([
TsugaruExe(),
ROMDIR,
"-SYM",
os.path.join(TSUGARUDIR,"symtables","RUN"+TOWNSTYPE+".txt"),
"-HD0",
os.path.join(DISKDIR,"hddimage.bin"),
"-HD1",
os.path.join(DISKDIR,"40MB.h1"),
"-JEIDA4",
os.path.join(MEMCARDDIR,"4MB.bin"),
"-CMOS",
os.path.join(THISDIR,"townstst","CMOS.DAT"),
"-DONTAUTOSAVECMOS",
#"-HIGHRES",
"-DEBUG",
#"-PAUSE",
"-CD",
"C:/d/townsiso/TownsOSV2.1L20.cue",
"-HD0",
os.path.join(THISDIR,"scratch","TESTHD.H0"),
"-FD0",
os.path.join(THISDIR,"townstst","TESTFREAD.BIN"),
"-FD0WP",
"-GENFD",
os.path.join(THISDIR,"scratch","blank1232KB.bin"),
"1232",
"-FD1",
os.path.join(THISDIR,"scratch","blank1232KB.bin"),
"-MEMSIZE",
"16",
]+argv).wait()
def ErrorExit():
print("Error.")
quit()
if __name__=="__main__":
prep.Prep()
Run(sys.argv[1:])