forked from hharte/altairz80-tests
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathz80cpu_test.ini
51 lines (45 loc) · 1.22 KB
/
z80cpu_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
# Z80 CPU test for SIMH/AltairZ80
#
# Copyright (c) 2022 Howard M. Harte.
# https://github.com/hharte
#
# Boot CP/M 2.2 and run EXZ80ALL.
#
set env AZ80_TEST_NAME=Z80 CPU Test
set env AZ80_TEST_BIN=cpm2
echof "\r\n*** %SIM_NAME%: %AZ80_TEST_NAME% starting:"
echof "\r\n*** Setting initial conditions"
if not exist %AZ80_TEST_BIN%.zip curl "https://schorn.ch/cpm/zip/%AZ80_TEST_BIN%.zip" --output %AZ80_TEST_BIN%.zip
!unzip -o %AZ80_TEST_BIN%.zip %AZ80_TEST_BIN%.dsk
noexpect
set runlimit 100M instructions
set on
on error ignore
on runtime echof "\r\n*** Test Runtime Limit %SIM_RUNLIMIT% %SIM_RUNLIMIT_UNITS% Exceeded ***\n"; goto FAIL
set dsk en
d tracks[0-7] 254
attach dsk0 cpm2.dsk
set cpu 64k
set cpu noitrap
set cpu z80
set cpu altairrom
set cpu nonbanked
reset cpu
set sio ansi
set sio nosleep
# Boot CP/M and run EXZ80ALL
expect "\r\nA>" ; set NORUNLIMIT; echof "\r\n*** Running EXZ80ALL..."; send "EXZ80ALL\n"; go -q
expect "\r\nAll tests successful." goto PASS
expect "ERROR" goto FAIL
expect "EXZ80ALL?" goto FAIL
reset
boot dsk
# All test failures wind up here.
:FAIL
echof "\n\r*** FAILED - %SIM_NAME%: %AZ80_TEST_NAME%.\n"
exit 1
# Test passed.
:PASS
detach dsk
rm cpm2.dsk
echof "\n\r*** PASSED - %SIM_NAME%: %AZ80_TEST_NAME%.\n"