forked from hharte/altairz80-tests
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathibcscc_oasis56_test.ini
286 lines (250 loc) · 7.25 KB
/
ibcscc_oasis56_test.ini
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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
# SIMH/AltairZ80 Test for the IBC Super-Cadet (MegaStar) running OASIS 5.6
#
# Copyright (c) 2023 Howard M. Harte.
# https://github.com/hharte/integrated-business-computers
#
# Consists of:
# * IBC SuperCadet-Cadet (MegaStar) two 8" floppies and dual SMD hard drives
#
#
#
set env AZ80_TEST_NAME=IBC SCC OASIS 5.6 Test
set env AZ80_TEST_BIN=ibcscc_oasis56
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 OASIS56_SC.imd ibcscc_oasis_blank_?s??.imd IBCSC48MB_?.dsk
noexpect
set runlimit 800M instructions
d sleep 0
set on
on error ignore
on runtime echof "\r\n*** Test Runtime Limit %SIM_RUNLIMIT% %SIM_RUNLIMIT_UNITS% Exceeded ***\n"; goto FAIL
set cpu 1M
set cpu banked
set cpu itrap
set cpu z80
set cpu noaltairrom
set hdsk disable
set dsk disable
set cpu looponhalt
set debug stdout
set cpu history=1000
# Set up banked memory: IBC Bank Select
d cpu commonlow 1
d cpu common 4000
# Configure 6850 UART for serial ports 1-10.
set m2sio0 en
set m2sio1 en
set m2sio0 iobase=00
set m2sio0 debug
d m2vec0 6
d m2dbval0 0C
d m2inten0 1
set m2sio1 iobase=02
set m2sio1 baud=9600
d m2vec1 7
d m2dbval1 0E
d m2inten1 1
attach m2sio1 connect=com7
set m2sio1 dcd
#attach m2sio1 -U :8800
#set m2sio1 dtr
set sio ansi
#set sio verbose
set sio nosleep
set sio port=04/2/01/00/02/F/00/F
set sio port=05/2/00/00/00/F/00/T
set sio port=06/3/01/00/02/F/00/F
set sio port=07/3/00/00/00/F/00/T
set sio port=08/4/01/00/02/F/00/F
set sio port=09/4/00/00/00/F/00/T
set sio port=0a/5/01/00/02/F/00/F
set sio port=0b/5/00/00/00/F/00/T
set sio port=0c/6/01/00/02/F/00/F
set sio port=0d/6/00/00/00/F/00/T
set sio port=0e/7/01/00/02/F/00/F
set sio port=0f/7/00/00/00/F/00/T
set sio port=10/8/01/00/02/F/00/F
set sio port=11/8/00/00/00/F/00/T
set sio port=12/9/01/00/02/F/00/F
set sio port=13/9/00/00/00/F/00/T
# Super Cadet Serial Ports 11-16
set sio port=2c/9/01/00/02/F/00/F
set sio port=2d/9/00/00/00/F/00/T
set sio port=2e/9/01/00/02/F/00/F
set sio port=2f/9/00/00/00/F/00/T
set sio port=30/9/01/00/02/F/00/F
set sio port=31/9/00/00/00/F/00/T
set sio port=32/9/01/00/02/F/00/F
set sio port=33/9/00/00/00/F/00/T
set sio port=34/9/01/00/02/F/00/F
set sio port=35/9/00/00/00/F/00/T
set sio port=36/9/01/00/02/F/00/F
set sio port=37/9/00/00/00/F/00/T
#set ibc Debug=ERROR
#;VERBOSE;PIO;RTC;SBD;CACHE ; BANK;DRIVE;UART
set ibc scc
set ibc enable
# Enable WD1793-based IBC Disk Controller
set wd179x enable
set wd179x debug=ERROR
set wd179x iobase=0x24
deposit fdctype 1795
# Attach to OASIS 5.6 Boot Disk
attach ibc0 OASIS56_SC.imd
#attach ibc0 OASIS_MU_OS_M5_6A_IBC_CADET_CACHE.imd
attach ibc1 ibcscc_oasis_blank_ssdd.imd
#attach ibc0 OASIS_M5_6A_MU_OS_IBC_CADET_WITH_SORT_CONTROL_FORMS_SER_16-2780.imd
#attach ibc1 SDS_SBC-200_GOPH000A_V5_6_Version-03-04-83.imd
# IBC Timer
#set ibctimer debug
set ibctimer timeron
set ibcsmd debug=ERROR
set ibcsmd en
set ibcsmd0 geometry=C:823/H:3/S:64/N:256
set ibcsmd1 geometry=C:823/H:3/S:64/N:256
attach ibcsmd0 IBCSC48MB_0.dsk
attach ibcsmd1 IBCSC48MB_1.dsk
# Enter ROM monitor (diagnostics)
#deposit dipswe 0xf1
# Hard disk auto-boot
#deposit dipswe 0xf2
# Floppy disk auto-boot
deposit dipswe 0xf0
call BOOTOASIS
# Create a bootable SSDD floppy disk.
call FLPYFORMAT 26 1 "TESTSSDD"
call COPYSYS 334K
# Boot from SSDD floppy disk.
detach ibc0
detach ibc1
att ibc0 ibcscc_oasis_blank_ssdd.imd
att ibc1 ibcscc_oasis_blank_dsdd.imd
call BOOTOASIS
# Create a bootable DSDD floppy disk.
call FLPYFORMAT 26 2 "TESTDSDD"
call COPYSYS 828K
# Boot from DSDD floppy disk.
detach ibc0
detach ibc1
att ibc0 ibcscc_oasis_blank_dsdd.imd
att ibc1 ibcscc_oasis_blank_sssd.imd
call BOOTOASIS
# Reboot from IBC OASIS 5.6 distribution floppy and create a bootable
# hard disk.
noexpect
detach ibc1
attach ibc1 OASIS56_SC.imd
#attach ibc1 OASIS_MU_OS_M5_6A_IBC_CADET_CACHE.imd
expect "\r\n\r\n>"; send "A A DISK1\r"; go -q
call HDFORMAT A "IBC56HD"
expect "Cylinder: 340 Head: 2\r\n>"; send "COPYFILE *.*:B = = A (NOQ\r"; go -q
expect "\r\n>"; goto BOOTHD
go -q
go -q
goto DONE
goto FAIL
# Boot OASIS from the hard disk.
:BOOTHD
# Hard disk auto-boot
deposit dipswe 0xf2
call BOOTOASIS
expect "\r\n\r\n>"; send "SHOW DISK\r"; go -q
expect "Capacity: 16,368K bytes"; goto CACHETEST
go -q
goto FAIL
:CACHETEST
call BOOTOASIS
expect "\r\n\r\n>"; send "CACHE (TEST\r"; go -q
expect "Should be:"; goto FAIL
expect "Memory errors found during tests."; goto FAIL
expect "Memory tests completed - no errors."; goto MEMTEST
go -q
goto FAIL
# Run OASIS memory test.
:MEMTEST
expect "111"; goto PASS
send "MEMTEST\r"
go -q
goto FAIL
:CARTTEST
call BOOTOASIS
send "A A DISK4\r"
call HDFORMAT A "HDBKUP"
expect "Cylinder: 611 Head: 1\r\n>"; send "ARCHIVE S,A\r"; go -q
expect "Mount volumes now - "; send "\r"; go -q
expect "OK to start archive (Y/N)? "; send "Y"; go -q
expect "EOF: 01 HDBKUP at sector"; send "SHOW DISK\r"; go -q
expect "Archived to disk "; goto PASS
go -q
goto FAIL
# Boot OASIS, accept time and date, logon if necessary.
:BOOTOASIS
echof "\r\n*** Booting OASIS 5.6"
expect "Time (HH:MM:SS) "; send "\r"; go -q
expect "Date (MM/DD/YY) "; send "\r"; go -q
expect "Logon please: "; send "SYSTEM\r"; go -q
expect "\r\n\r\n>"; send "ATTACH B FLOPPY2\r"; go -q
expect "\r\n\r\n>"; send "\r"; return
# Boot IBC
reset
boot ibc
goto FAIL
# Format floppy <sectors> <heads> <label>
:FLPYFORMAT
noexpect
expect "\r\n\r\n>" ; send "INITDISK B (FORMAT,BOOT=S,SECTOR %1,HEAD %2)\r"; go -q
expect "Do you wish to continue (Y/N)? "; send "Y\r"; go -q
expect "Enter disk Label: " ; send "%3\r"; go -q
expect "Is above information correct (Y/N)? " ; send "Y\r"; go -q
expect "Track: 76\r\n\r\n>" ; goto PUTBOOT
expect "Cylinder: 76 Head: 1\r\n\r\n>" ; goto PUTBOOT
go -q
goto FAIL
# Write boot track to floppy.
:PUTBOOT
expect "\r\n\r\n>" ; return
send "INITDISK B (BOOT=S\r"
go -q
goto FAIL
# Format Hard Disk <drive> <label>
:HDFORMAT
expect "\r\n\r\n>" ; send "INITDISK %1 (FORMAT,BOOT=S)\r"; go -q
expect "Do you wish to continue (Y/N)? "; send "Y\r"; go -q
expect "Enter disk Label: " ; send "%2\r"; go -q
expect "Is above information correct (Y/N)? " ; send "Y\r"; go -q
expect "HEAD (in hex)"; send "\r"; return
go -q
goto FAIL
# Copy minimal files needed to boot OASIS.
:COPYSYS
expect "\r\n\r\n>"; send "COPYFILE SYSTEM.*:S = = B (NOQ\r"; go -q
expect "\r\n\r\n>"; send "COPYFILE FILELIST.COMMAND:S = = B (NOQ\r"; go -q
expect "\r\n\r\n>"; send "COPYFILE SHOW.COMMAND:S = = B (NOQ\r"; go -q
expect "\r\n\r\n>"; send "COPYFILE INITDISK.COMMAND:S = = B (NOQ\r"; go -q
expect "\r\n\r\n>"; send "COPYFILE ATTACH.COMMAND:S = = B (NOQ\r"; go -q
expect "\r\n\r\n>"; send "COPYFILE COPYFILE.COMMAND:S = = B (NOQ\r"; go -q
expect "\r\n\r\n>"; send "SHOW DISK B\r"; go -q
expect "\r\n Available: %1"; return
send "COPYFILE SYSTEM.NUCLEUS:S = = B\r"
go -q
goto FAIL
# All test failures wind up here.
:FAIL
echof "\n\r*** FAILED - %SIM_NAME%: %AZ80_TEST_NAME%.\n"
exit 1
# Test passed.
:PASS
detach ibcsmd0
detach ibcsmd1
set ibcsmd disabled
detach ibc0
detach ibc1
set ibc disabled
; Set wd179x iobase back to default and disable.
set wd179x iobase=30
set wd179x disabled
echof "\n\r*** PASSED - %SIM_NAME%: %AZ80_TEST_NAME%.\n"
goto DONE
:DONE