forked from hharte/altairz80-tests
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmsdos211_test.ini
More file actions
126 lines (108 loc) · 3.15 KB
/
msdos211_test.ini
File metadata and controls
126 lines (108 loc) · 3.15 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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
# MS-DOS 2.11 test for SIMH/AltairZ80
#
# Copyright (c) 2022 Howard M. Harte.
# https://github.com/hharte
#
# Boot MS-DOS 2.11, Assemble from source:
# * MS-DOS 2.11
# * SCP IO.SYS and utilities
# * SCP Assembler, HEX2BIN
# * SCP Monitor v1.6
# * Create new boot disk from source.
# * Compile READ and WRITE utilities.
# * Boot new boot disk to make sure it works.
#
set env AZ80_TEST_NAME=MS-DOS 2.11
set env AZ80_TEST_BIN=msdos211_test
echof "\r\n*** %SIM_NAME%: %AZ80_TEST_NAME% starting:"
echof "\r\n*** Setting initial conditions"
if not exist %AZ80_TEST_BIN%.zip curl "https://raw.githubusercontent.com/hharte/altairz80-packages/main/%AZ80_TEST_BIN%/%AZ80_TEST_BIN%.zip" --output %AZ80_TEST_BIN%.zip
!unzip -o %AZ80_TEST_BIN%.zip msdos211_scp_tarbell.imd msdos211_test_disk.imd msdos211_diskc.dsk
noexpect
set runlimit 2000M instructions
set on
on error ignore
on runtime echof "\r\n*** Test Runtime Limit %SIM_RUNLIMIT% %SIM_RUNLIMIT_UNITS% Exceeded ***\n"; goto FAIL
set debug stdout
# Some kind of strange interaction between SIMH restore and banked/memory size.
# Chanking back to CPU, setting banked, then memory size, then 8086 works around
# it, but need to dig into this more.
set cpu z80
set cpu banked
set cpu memory=1024k
set cpu 8086
set DSK disabled
set HDSK disabled
set MHDSK disabled
; Enable SCP300F
set scp300f enable
set scp300f ROM=TARBELL
d sr 18
; Set serial port for SCP
set sio port=f6/0/0/0/0/F/0/T
set sio port=f7/0/2/0/1/F/0/F
set sio ansi
; Enable WD1793-based Tarbell Double-density Disk Controller
set wd179x enable
set wd179x iobase=78
set tdd en
att tdd0 msdos211_scp_tarbell.imd
att tdd1 msdos211_test_disk.imd
; Morrow HDC-DMA Controller
set djhdc enable
set djhdc debug=ERROR;IRQ
attach djhdc0 msdos211_diskc.dsk
; Start monitor and boot MS-DOS
expect "Not enough core"; goto FAIL
expect "not built"; goto FAIL
expect "Disk full"; goto FAIL
expect "fatal error"; goto FAIL
expect "Monitor 1.6" ; send "B\r\n"; go -q
expect "A:\\"; send "C:\r\n"; go -q
expect "C:\\"; send "CD \\DOS211\r\n"; go -q
expect "C:\\"; send "MKSCPDOS.BAT B:\r\n"; go -q
expect "Boot disk created in drive"; goto DOSOK
reset
; Boot into SCP Monitor
boot scp300f
goto FAIL
:DOSOK
expect "File not found"; goto FAIL
expect "C:\\"; send "CD \\SRC\r\n"; go -q
expect "C:\\SRC"; send "MAKE RWMSDOS.MAK\r\n"; go -q
expect "C:\\SRC"; send "COPY READ.EXE B:\\R.EXE\r\n"; go -q
expect "C:\\SRC"; send "COPY WRITE.EXE B:\\W.EXE\r\n"; go -q
expect "C:\\SRC"; send "DIR *.EXE\r\n"; go -q
expect "2 File(s)"; goto RWOK
go -q
:RWOK
noexpect
det tdd1
att tdd0 msdos211_test_disk.imd
expect "Monitor 1.6" ; send "B\r\n"; go -q
expect "A:\\"; send "CHKDSK\r\n"; go -q
expect "bytes in 27 user files"; goto PASS
reset
boot scp300f
# All test failures wind up here.
:FAIL
echof "\n\r*** FAILED - %SIM_NAME%: %AZ80_TEST_NAME%.\n"
exit 1
# Test passed.
:PASS
detach tdd0
detach djhdc0
del msdos211_scp_tarbell.imd
del msdos211_test_disk.imd
del msdos211_diskc.dsk
# Unmap SIO ports
set sio port=f6
set sio port=f7
# Disable disk controllers
set tdd dis
set wd179x dis
# Disable SCP300F
reset scp300f
set scp300f disabled
echof "\n\r*** PASSED - %SIM_NAME%: %AZ80_TEST_NAME%.\n"
:DONE