forked from hharte/altairz80-tests
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathibcmcc_oasis56_test.ini
253 lines (219 loc) · 6.29 KB
/
ibcmcc_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
# SIMH/AltairZ80 Test for the IBC Middi-Cadet (MultiStar) running OASIS 5.6
#
# Copyright (c) 2023 Howard M. Harte.
# https://github.com/hharte/integrated-business-computers
#
# Consists of:
# * IBC Middi-Cadet HP (MultiStar) one 5.25" floppy and one ST-506 hard drive.
#
# Boot the floppy and run "INITSYS 8200" to create the bootable hard disk.
#
set env AZ80_TEST_NAME=IBC MCC OASIS 5.6 Test
set env AZ80_TEST_BIN=ibcmcc_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 IBC_MIDDI_CADET_OASIS56.imd ibcmcc_oasis_blank_?s??.imd IBCDISK?.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 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 4
d m2dbval0 08
d m2inten0 1
set m2sio1 iobase=02
d m2vec1 5
d m2dbval1 0A
d m2inten1 1
attach m2sio1 connect=com7
set m2sio1 baud=19200
set m2sio1 dcd
#attach m2sio1 -U :8800
#set m2sio1 dtr
set sio ansi
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
set ibc debug=ERROR
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 IBC_MIDDI_CADET_OASIS56.imd
attach ibc1 ibcmcc_oasis_blank_ssdd.imd
set ibchdc debug=ERROR
set ibchdc en
set ibchdc0 geometry=C:680/H:15/S:32/N:256
set ibchdc3 geometry=C:612/H:2/S:32/N:256
attach ibchdc0 IBCDISK0.dsk
attach ibchdc3 IBCDISK3.dsk
# Enter ROM monitor (diagnostics)
#deposit dipswe 0xfe
# Hard disk auto-boot
#deposit dipswe 0xfd
# Floppy disk auto-boot
deposit dipswe 0xff
# Cartridge disk auto-boot
#deposit dipswe 0xdd
call BOOTOASIS
# Create a bootable SSDD floppy disk.
call FLPYFORMAT 26 1 "TESTSSDD"
call COPYSYS 284K
# Boot from SSDD floppy disk.
detach ibc0
detach ibc1
att ibc0 ibcmcc_oasis_blank_ssdd.imd
att ibc1 ibcmcc_oasis_blank_dsdd.imd
call BOOTOASIS
# Create a bootable DSDD floppy disk.
call FLPYFORMAT 26 2 "TESTDSDD"
call COPYSYS 778K
# Boot from DSDD floppy disk.
detach ibc0
detach ibc1
att ibc0 ibcmcc_oasis_blank_dsdd.imd
att ibc1 ibcmcc_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 IBC_MIDDI_CADET_OASIS56.imd
call HDFORMAT A "IBC56HD"
expect "14\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
deposit dipswe 0xfd
call BOOTOASIS
expect "\r\n\r\n>"; send "SHOW DISK\r"; go -q
expect "Capacity: 15,960K bytes"; goto MEMTEST
go -q
goto FAIL
# Run OASIS memory test.
:MEMTEST
expect "111"; goto CARTTEST
send "MEMTEST\r"
go -q
goto FAIL
:CARTTEST
call BOOTOASIS
send "A A DISK6\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
noexpect
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 ibchdc0
detach ibchdc3
set ibchdc 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