-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdig_oasis56_test.ini
225 lines (192 loc) · 5.64 KB
/
dig_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
# SIMH/AltairZ80 Test for the Digitex Model 8200 running OASIS 5.6
#
# Copyright (c) 2020 Howard M. Harte.
# https://github.com/hharte/digitex
#
# Consists of:
# * ADC Super-Six SBC with two 8" floppies
# * ADC HDC-1001 Hard Disk Controller with a Quantum Q2020 drive.
# * DIGITEX Monitor version 1.2.A -- 10/06/83
# * AB Digital Design B810 256K DRAM card with common area from 0-3FFFh.
#
# Boot the floppy and run "INITSYS 8200" to create the bootable hard disk.
#
set env AZ80_TEST_NAME=Digitex OASIS 5.6 Test
set env AZ80_TEST_BIN=dig_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 dig_oasis56.imd dig_oasis_blank_*.imd oasis_q2020.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 banked
set cpu memory=1024k
set cpu noitrap
set cpu z80
set cpu noaltairrom
set hdsk dis
set cpu looponhalt
set debug stdout
# Set up banked memory: AB Digital Design B810 board for OASIS
# While the actual card is 256K, SIMH simulates 768K.
set cpu b810
d cpu commonlow 1
d cpu common 4000
# Configure Console UART (Z80-SIO)
set sio ansi
set sio nosleep
set sio port=00/0/0/0/0/F/0/T ; Data Port
set sio port=01/0/01/0/04/F/0/F ; Status Port
# Configure second serial port.
set sio port=02/0/0/0/0/F/0/T
set sio port=03/0/41/0/04/F/0/F
# Configure WD2793 disk controller on the Super-Six SBC
set wd179x en
set wd179x iobase=0c
set wd179x debug=ERROR
# Configure ADC Super-Six CPU Board
set adcs6 en
set adcs6 ROM=DIGITEX
att adcs60 dig_oasis56.imd
att adcs61 dig_oasis_blank_sssd.imd
set adcs6 debug=error
# Configure Super-Six J7 jumper to use the S-100 RAM card.
d adcs6 j7 4f
# Configure ADC HDC-1001 Disk Controller
set adchd en
set adchd iobase=e0
set adchd nodebug=error
att adchd oasis_q2020.dsk
# OASIS uses 256-byte sectors.
set adchd0 geometry=C:512/H:4/S:32/N:256
# Enable keyboard interrupt for console SIO.
d keybdh 2714
set sio interrupt
d kbdirqport 1
# Timer tick for the RTC, 1Hz.
d simh timh 310d
d simh timd 1
set simh timeron
call BOOTOASIS
# Create a bootable SSSD floppy disk.
call FLPYFORMAT 13 1 "TESTSSSD"
call COPYSYS 78K
# Boot from SSSD floppy disk.
detach adcs60
detach adcs61
att adcs60 dig_oasis_blank_sssd.imd
att adcs61 dig_oasis_blank_ssdd.imd
call BOOTOASIS
# Create a bootable SSDD floppy disk.
call FLPYFORMAT 26 1 "TESTSSDD"
call COPYSYS 325K
# Boot from SSDD floppy disk.
detach adcs60
detach adcs61
att adcs60 dig_oasis_blank_ssdd.imd
att adcs61 dig_oasis_blank_dsdd.imd
call BOOTOASIS
# Create a bootable DSDD floppy disk.
call FLPYFORMAT 26 2 "TESTDSDD"
call COPYSYS 819K
# Boot from DSDD floppy disk.
detach adcs60
detach adcs61
att adcs60 dig_oasis_blank_dsdd.imd
att adcs61 dig_oasis_blank_ssdd.imd
call BOOTOASIS
# Reboot from Digitex OASIS 5.6 distribution floppy and create a bootable
# hard disk.
noexpect
detach adcs60
detach adcs61
att adcs60 dig_oasis56.imd
att adcs61 dig_oasis_blank_dsdd.imd
expect "\r\n\r\n>"; call BOOTOASIS
expect "\r\n\r\n>"; send "INITSYS 8200\r"; go -q
expect "N<return>.\r\n:"; send "Y\r"; go -q
expect "FUTURE USE!!! ***\r\n"; goto BOOTHD
go -q
go -q
goto FAIL
# Boot OASIS from the hard disk.
:BOOTHD
detach adcs60
call BOOTOASIS
expect "\r\n\r\n>"; send "SHOW DISK\r"; go -q
expect "Capacity: 16,352K bytes"; goto MEMTEST
go -q
goto FAIL
# Run OASIS memory test.
:MEMTEST
expect "512"; goto PASS
send "MEMTEST\r"
go -q
goto FAIL
# Boot OASIS, accept time and date, logon if necessary.
:BOOTOASIS
echof "\r\n*** Booting OASIS 5.6"
expect "FDC COLD BOOT ERROR CODE " ; goto FAIL
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 Digitex Monitor ROM at F000h
reset
g f000
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
# 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
set sio port=00
set sio port=01
set sio port=02
set sio port=03
detach adchd0
set adchd disabled
detach adcs61
set adcs6 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