Looking for 68000 disassembler help
Looking for 68000 disassembler help
I worked this past weekend on disassembling the 4041R04 UTILITY1 ROM image that I posted on my github site:
https://github.com/mmcgraw74/Tektro...r/blob/master/4041 ROMs/4041UTILITY-16bit.BIN
The best results I had were with the "m68kdis" program that I found at
https://github.com/cr1901/m68kdis which I compiled from the source files on Ubuntu Linux for Windows 10.
This UTILITY1 option ROM adds several ROMCALLs to the 4041, which are shown immediately after the Copyright message at the beginning of the UTILITY ROM.
Most of this UTILITY1 ROM are text statements - typically error messages for 4041 BASIC that are not referenced by this option ROM.
However two of the text strings are referenced by the code in the disassembly and are the PROM list directory header strings shown in the PROM directory example below - and are therefore associated one of the functions I'm interested in: "PROM0".
PROM0 is a 4041 UTILITY1 ROM function that provides a file system similar to the 4041 tape file system - but the data is in an Option ROM slot!
This function is described on page 7-1 in the 4041 UTILITY1 ROM manual posted on bitsavers.org:
http://www.bitsavers.org/pdf/tektronix/404x/070-4699-00_4041R04_Utility_ROMPack_Jul1985.pdf
This page describes the PROM file system as automatically detecting the 'files' in an option slot in the option ROM carrier (which has six slots - each with two 8Kx8 EPROMs each in special sockets - see my photo below):
The three 4041 latest service manuals -03 were scanned at my request from microfiche by a volunteer at
vintagetek.org (fabulous collection of Tektronix microfiche! with an index of their collection) and posted on TekWiki 4041 page.
4041 Service Manual 1 page 2-17 indicates the six 16KB (two 8KB EPROMs) Option ROMs in the ROM Carrier are decoded at addresses xF8000 to F9FFFF.
What I am trying to figure out from the UTILITY ROM code is:
- What values at the beginning of the 16bit EPROM indicate it contains a PROM file system. All the Option ROMs have "M68K" at the beginning to indicate an Option ROM. I tried using "PROM:" in an image I created last night, but it is not detected.
- What is the format of the PROM file system in the EPROMs. I would think it could be the same as the primitive tape file system.
I believe I understand most of the 4041 DC100 tape file system - I wrote a 4041 BASIC program that dumps every 256 byte record on one of my tapes with several programs.
Here is the beginning of the dump of my tape:
Code:
games 01-JAN-81 00:02:19 SOFT ERRORS = 0
FILE FILE LENGTH START NUMBER LAST
NAME TYPE IN BYTES RECORD OF REC. MODIFICATION DATE
------ ---- -------- ------ ------- ------------------
AUTOLD AS 255 5 1 27-AUG-20 09:29:00
ARTLRY AS 3060 6 12 27-AUG-20 09:31:00
SARTLR AS 6630 18 26 27-AUG-20 18:11:00
MTPACK AS 1020 44 4 08-SEP-20 09:51:00
TDUMP AS 1275 48 5 08-SEP-20 20:40:00
TDUMPI IT 1530 53 6 08-SEP-20 20:41:00
155040
Tektronix 4041 Tape Dump
Address DATA
0 1 2 3 4 5 6 7 8 9 A B C D E F Text Characters
Record 1
0 67 61 6D 65 73 20 20 20 20 20 20 54 45 4B 20 34 games TEK 4
1 34 30 34 31 20 32 2E 31 20 02 00 03 00 9A 02 30 4041 2.1 ......0
2 31 2D 4A 41 4E 2D 38 31 20 30 30 3A 30 32 3A 31 1-JAN-81 00:02:1
3 39 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 9...............
4 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
5 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
6 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
7 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
9 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
A 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
B 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
D 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
E 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
Record 2
0 41 55 54 4F 4C 44 05 00 01 00 41 53 14 11 B2 5D AUTOLD....AS...]
1 5D 41 52 54 4C 52 59 06 00 0C 00 41 53 14 11 B2 ]ARTLRY....AS...
2 5F 53 41 52 54 4C 52 12 00 1A 00 41 53 14 11 B4 _SARTLR....AS...
3 8B 4D 54 50 41 43 4B 2C 00 04 00 41 53 14 12 82 .MTPACK,...AS...
4 73 54 44 55 4D 50 20 30 00 05 00 41 53 14 12 85 sTDUMP 0...AS...
5 28 54 44 55 4D 50 49 35 00 06 00 49 54 14 12 85 (TDUMPI5...IT...
6 29 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 )...............
7 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
9 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
A 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
B 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
D 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
E 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
Record 3
0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
1 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
2 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
3 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
4 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
5 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
6 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
7 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
9 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
A 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
B 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
D 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
E 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
Record 4
0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
1 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
2 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
3 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
4 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
5 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
6 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
7 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
9 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
A 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
B 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
D 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
E 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
Record 5
0 31 30 30 53 65 74 20 64 72 69 76 22 63 6F 6D 6D 100Set driv"comm
1 6D 30 28 62 61 75 64 3D 39 36 30 30 2C 66 6C 61 m0(baud=9600,fla
2 3D 62 69 64 2C 65 64 69 74 3D 73 74 6F 72 61 67 =bid,edit=storag
3 65 29 3A 22 0D 31 31 30 53 65 74 20 63 6F 6E 73 e):".110Set cons
4 22 63 6F 6D 6D 30 28 65 63 68 6F 3D 79 65 73 29 "comm0(echo=yes)
5 3A 22 0D 00 00 00 00 00 00 00 00 00 00 00 00 00 :"..............
6 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
7 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
9 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
A 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
B 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
D 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
E 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
Record 6
0 31 30 30 49 6E 69 74 20 0D 31 30 32 52 65 6D 20 100Init .102Rem
1 20 53 65 74 20 64 72 69 76 65 72 20 22 43 4F 4D Set driver "COM
2 4D 31 28 42 41 55 44 3D 39 36 30 30 2C 46 4C 41 M1(BAUD=9600,FLA
3 3D 42 49 44 2C 45 44 49 54 3D 53 54 4F 52 41 47 =BID,EDIT=STORAG
4 45 29 3A 22 0D 31 30 33 52 65 6D 20 53 65 74 20 E):".103Rem Set
5 63 6F 6E 73 6F 6C 65 20 22 43 4F 4D 4D 31 28 45 console "COMM1(E
6 43 48 4F 3D 59 45 53 29 3A 22 0D 31 30 34 4F 70 CHO=YES):".104Op
7 65 6E 23 31 2C 22 43 4F 4D 4D 30 3A 22 0D 31 30 en#1,"COMM0:".10
8 35 52 63 61 6C 22 47 49 4E 49 54 22 2C 31 2C 34 5Rcal"GINIT",1,4
9 30 35 32 2C 31 0D 31 31 30 44 69 6D 20 68 28 31 052,1.110Dim h(1
A 32 39 29 2C 61 31 28 32 29 2C 61 32 28 32 29 2C 29),a1(2),a2(2),
B 62 31 28 34 29 2C 62 32 28 34 29 2C 6C 28 32 29 b1(4),b2(4),l(2)
C 0D 31 31 35 5A 3D 30 0D 31 32 30 4E 3D 32 0D 31 .115Z=0.120N=2.1
D 32 35 41 31 3D 72 6E 64 28 2D 31 29 0D 31 33 30 25A1=rnd(-1).130
E 52 65 73 74 20 31 34 30 0D 31 34 30 44 61 74 61 Rest 140.140Data
F 20 35 2C 31 31 30 2C 39 30 2C 39 30 2C 2D 31 2C 5,110,90,90,-1,
First, my program prints a directory listing of the tape, then each of the 256 byte records in hex and character similar to DOS debug.
Tape Record1 begins with the name of the tape, then the 4041 firmware version, followed by the timedate stamp of when the tape was formatted. In this tape, I did not set the time before formatting
Tape Record2 through Record4 are a simple list of the files with starting record# and #records in 16-bit HEX, file type (AS=ASCII, IT=ITEM binary), followed by the time/date the file was recorded.
Tape Record5 is the first file - named AUTOLD, which is automatically loaded if the tape is installed when the 4041 is powered on. This file is in ASCII - which requires the two Program Development option ROMs be installed, which include the BASIC parser for ASCII programs. Note that each BASIC program statement is terminated by carriage return just like the 4050 graphics computers.
Tape Record6 is the beginning of the second program named ARTLRY (my port of my 4050 Artillery game to the 4041 using a 4052 as the graphics terminal). 4041 tape file system is limited to six character file names.
Here is the PROM file system listing example from the UTILITY manual:
Code:
File Type Size Creation Date
____ ____ ____ __________________
AUTOLD AS 1215 16-DEC-82 13:41:37
BACKUP AS 1728 16-DEC-82 13:44:23
SQUISH AS 2537 16-DEC-82 13:48:54
NEWRBT IT 3959 16-DEC-82 14:03:34
It is not specifically stated, but I believe the PROM file system will only support ONE file system EPROM slot, similar to the Tape file system only supports one tape.
This will limit the size of the PROM file system to 16KB which is the maximum size for each of the six PROM slots.
Notice in my photo of the 4041 ROM Carrier - that it is completely full - so you can't use the PROM file system
That ROM Carrier was in one of my two 4041 computers, which had the original CPU board in one slot in the backplane with a second slot for the memory.
When I looked at my third 4041 that had the disk drive DDU option - it had the newer CPU board with integrated memory and only two sockets for BASIC ROM and two sockets for Option 10 ROMs!
The service manuals indicate that Option 10 contained the four option ROMs in my ROM Carrier photo: Graphics, Plotting, Signal Processing, and Utility1 - which freed up ROM carrier slots for the PROM file system, or newer Option ROMs!
The UTILITY1 ROM also included a second interesting feature,
LOADROMS, which allowed an option ROM to be loaded from a file on tape.
This would allow the original 4041's to have a PROM file system in one option slot and load the 'missing' option ROM from tape after the system booted.
Bottom line - DC100 tapes are even more scarce than DC300 tapes, AND many of the 4041 owners do NOT have the Program Development ROMs which would allow them to load and save programs to a PC with the RS-232 port on the 4041.
A working DC100 tape (or even more scarce - a working disk drive unit) with the correct AUTOLD file is required to initialize the COMM port and set it as the CONSOLE.
I believe the service manual schematic diagram for the ROM carrier shows that it would be very easy to create a ROM Carrier with two 64Kbit EPROMs containing the Program Development ROMs, Utility1 ROM and PROM file system, that would automatically boot a 4041 without a tape drive to an RS-232 console to a PC.
I created a simple image with a duplicate of the tape file system capture above with only the AUTOLD file - but I did not see a PROM file system after the 4041 booted. I think I'm missing the correct characters at the beginning of the ROM that will be identified as a PROM file system by the UTILITY1 ROM - not an Option ROM.