forked from hharte/altairz80-tests
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcpm3_test.ini
More file actions
executable file
·53 lines (47 loc) · 1.38 KB
/
cpm3_test.ini
File metadata and controls
executable file
·53 lines (47 loc) · 1.38 KB
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
# CP/M 3 test for SIMH/AltairZ80
#
# Copyright (c) 2023 Peter Schorn
# https://schorn.ch
# based on z80cpu_test.ini by Howard M. Harte.
#
# Boot CP/M 3 with banked memory and run DO SYSGENB.
#
set env AZ80_TEST_NAME=CP/M 3 Test
set env AZ80_TEST_BIN=cpm3
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
# On MacOS and Windows
#!tar -xf %AZ80_TEST_BIN%.zip %AZ80_TEST_BIN%.dsk
# On MacOS and Linux
!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 cpm3.dsk
d common c000
set cpu 64k
set cpu banked
set cpu z80
set cpu altairrom
reset cpu
set sio nosleep
# Boot CP/M 3 with banked memory and run DO SYSGENB.
expect "\r\n\r\nDate format used - UK" ; set NORUNLIMIT; echof "\r\n*** Running DO SYSGENB..."; send "DO SYSGENB\n"; go -q
expect "\r\n\r\nDate format used - UK" goto PASS
expect "ERROR" 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 cpm3.dsk
echof "\n\r*** PASSED - %SIM_NAME%: %AZ80_TEST_NAME%.\n"