forked from hharte/altairz80-tests
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathccpm68k11_generate.ini
163 lines (137 loc) · 4.38 KB
/
ccpm68k11_generate.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
# SIMH/AltairZ80 Test for CompuPro 68000 CP/M-68K v1.1
#
# Copyright (c) 2022 Howard M. Harte.
# https://github.com/hharte
#
# This installs CompuPro CP/M-68K v1.1 to the hard disk from System
# Master disks
#
# * Assemble CompuPro CPMLDR.SYS
# * Assemble CompuPro utilities
# * Compile SIMH read and write utilities.
# * Build a four-disk CP/M-68K v1.3 System Master disk set.
# BIOS supports four 8" floppies, A-D, and a 20MB hard disk E.
# * Disk 1 boots on the 68000 CPU, disk 2 boots on the 68010.
#
# Reference:
# https://bitsavers.org/pdf/compupro/CPM_68K_Technical_Manual_and_Installation_Feb84.pdf
#
set env AZ80_TEST_NAME=CompuPro CP/M-68K v1.1 System Master Disk Installation
set env AZ80_TEST_BIN=ccpm68k11_test
echof "\r\n*** %SIM_NAME%: %AZ80_TEST_NAME% starting:"
echof "\r\n*** Setting initial conditions"
if not exist CompuPro_68K_System_Masters.zip curl "https://bitsavers.org/bits/Compupro/CompuPro_68K_System_Masters.zip" --output CompuPro_68K_System_Masters.zip
!unzip -o CompuPro_68K_System_Masters.zip
if not exist %AZ80_TEST_BIN%.zip curl "https://raw.githubusercontent.com/hharte/altairz80-packages/main/ccpm68k11_test/%AZ80_TEST_BIN%.zip" --output %AZ80_TEST_BIN%.zip
!unzip -o %AZ80_TEST_BIN%.zip
noexpect
set runlimit 465M 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
set hdsk disable
set cpu m68k
reset cpu
set sio ansi
set sio port=5c/0/0/0/0/f/0/t
set sio port=5d/0/2/0/81/f/0/f
# Configure floppy disks, A-D
set i8272 enabled
set disk1a enabled
set disk1a nodebug
att disk1a0 CompuPro_68K_System_Master_Disk_1_of_3.imd
att disk1a1 CompuPro_68K_System_Master_Disk_2_of_3.imd
att disk1a2 CompuPro_68K_System_Master_Disk_3_of_3.imd
att disk1a3 ccpm68k11_d1.imd
set disk1a0 norom
# The controller ROM is not accessible to the M68K CPU because
# the MDEV / mmu_table is not implemented for M68K. Instead,
# load the CompuPro 68K bootstrap from a file to low RAM.
# Go at address 0xC to boot.
#d disk1a bootstrap 8
load CPRO68K.BIN 0
# System Support 1 Board
set ss1 enabled
# CompuPro DISK2 subsystem
# Fujitsu 20M: Drives E,F,G
set selchan enabled
set disk2 enabled
att disk20 ccpm68k11_20mb.dsk
# CompuPro MDRIVE-H
set mdriveh enabled
set mdriveh1 enabled
set mdriveh2 enabled
set mdriveh3 enabled
set mdriveh4 enabled
set mdriveh5 enabled
set mdriveh6 enabled
set mdriveh7 enabled
d sleep 0
# Messages that indicate failure in various utilities.
expect "Exception" goto FAIL
expect "not object file" goto FAIL
expect "not archive format" goto FAIL
expect "read error on file" goto FAIL
expect "Cannot open" goto FAIL
expect "Open or Read error on" goto FAIL
expect "ERROR:" goto FAIL
expect "\r\nA>" send "PIP D:=A:CPMLIB\n"; go -q
expect "\r\nA>" send "PIP D:=A:CPM.REL\n"; go -q
expect "\r\nA>" send "PIP D:=B:AS.68K\n"; go -q
expect "\r\nA>" send "PIP D:=B:LO.68K\n"; go -q
expect "\r\nA>" send "PIP D:=B:RELOC.68K\n"; go -q
expect "\r\nA>" send "PIP D:=B:AS68SYMB.DAT\n"; go -q
expect "\r\nA>" send "D:\n"; go -q
expect "\r\nD>" send "B:MAKESYS\n"; go -q
expect "ERA BIOS.O\r\n\r\nD>" goto DORC
# Execute the DISK1A bootstrap from RAM.
g c
goto FAIL
:DORC
expect "D>ERA CPM.REL\r\n\r\nD>" goto PUTBOOT
send "B:RC D\n"
go -q
goto FAIL
:PUTBOOT
expect "\r\n\r\nD>" goto REBOOT
send "A:PUTBOOT A:CPMLDR.SYS D\n"
go -q
goto FAIL
:REBOOT
detach disk1a0
detach disk1a1
detach disk1a2
detach disk1a3
reset cpu
load CPRO68K.BIN 0
att disk1a0 ccpm68k11_d1.imd
att disk1a1 CompuPro_68K_System_Master_Disk_1_of_3.imd
att disk1a2 CompuPro_68K_System_Master_Disk_2_of_3.imd
att disk1a3 CompuPro_68K_System_Master_Disk_3_of_3.imd
expect "\r\nA>" send "B:DISK2 FORMAT DATA\n"; go -q
expect "\r\nA>" send "B:PIP E:=B:*.*\n"; go -q
expect "\r\nA>" send "B:PIP E:=C:*.*\n"; go -q
expect "\r\nA>" send "B:PIP E:=D:*.*\n"; go -q
expect "\r\nA>" send "B:PIP E:=A:*.*\n"; go -q
expect "\r\nA>" send "E:\n"; go -q
expect "\r\nE>" send "STAT E:*.*\n"; go -q
expect "E: RW, FREE SPACE:" goto PASS
go c
# All test failures wind up here.
:FAIL
echof "\n\r*** FAILED - %SIM_NAME%: %AZ80_TEST_NAME%.\n"
exit 1
# Test passed.
:PASS
echof "\n\rTests succeeded, generating package"
del ccpm68k11.zip
!zip ccpm68k11.zip ccpm68k11_d1.imd ccpm68k11.ini CPRO68K.BIN ccpm68k11_20mb.dsk README.TXT
echof "\n\r*** PASSED - %SIM_NAME%: %AZ80_TEST_NAME%.\n"
:DONE
detach disk1a0
detach disk1a1
detach disk1a2
detach disk1a3
detach disk20
:FAILW