Notes on getting VMEBug running on an MVME110-1.Using a tip from here;
https://www.eevblog.com/forum/vintage-computing/mvme-110-eprom-monitor-program/I got the source code from here;
http://www.bitsavers.org/pdf/motorola/VME/MVME110/VME110_Monitor_Source_4.1/I don’t have a computer running VersaDos (yet!) and so I have to work on a PC running W10.
Copy all the files into a directory on the PC. I only used the .imd files. There are two of them which are readable using a program I found here;
http://www.z80.info/zip/ImageBuild.zipNote: Well that link doesn't work! Dunno what I'm doing wrong but if you go to the site ad then add zip to the URL, you can find the zip file I'm on about.
There are several incarnations of the ImageBuild program; you want to start this one;
VDFS.exe
Once the program is running, point it at each of the .imd files in turn. Once the program has read one of the .imd files, it will populate the various windows which is totally amazing. Anyway all I did was click on the menu option;
File -> Save all files
The program helpfully creates a directory tree to store the files, but to be honest I let it do its thing then copied the files I needed to a single directory.
You should end up with 51 files (I didn’t bother copying the Copyright information from the 0000 catalog).
I don’t know how to run the Motorola Assembler, I’ve only used this;
http://sun.hasenbraten.de/vasm/Initially I was going to convert all the Motorola format source into a form that could be read by VASM. I’ve done this in the past using a mix of Python and eye-balling for the EPROM monitor program running on a Sage II described here;
https://en.wikipedia.org/wiki/Sage_Computer_TechnologyAnyway I realised that the .imd disk images don’t just contain the source, they also contain the output of the assembler -> linker. It’s in a file called ROM.LO.
There are two really well written documents about the assembler and linker here;
http://www.bitsavers.org/pdf/motorola/VME_10/M68KMASM_D8_M68000_Family_Resident_Structured_Assembler_Reference_Manual_Jul84.pdfand…
http://www.bitsavers.org/pdf/motorola/versados/M68KLINK_D7_M68000Link_Jan86.pdfUsing the second document (i.e. The linker manual), you can see in appendix B how to read about the .LO file format.
You can read the ROM.LO file into a hex editor and then work through appendix B to figure out where the program image actually starts. The hex editor I use does not seem to exist at the URL given in its own help screen (!), but it was produced by “Expert Commercial Software” and my version is copyrighted 2012.
Note: I think there’s a tiny error in the appendix; top of pg.72, first para, I think the MID’s start at $B0, not $B1. I’m not the sharpest tool in the box so I might have this wrong.
If you work through that appendix looking at the ROM.LO file, you work out that the PROG image starts at file offset $800 and runs to the end of the file.
Note: I don’t understand what to do with the DATA segment (which seems to be initialised with some values) as we’re building an EPROM image that surely has to assume that RAM will contain random values on start up. Anyway I’ve ignored the DATA segment completely and the program runs so there we go…Use the Hex Editor to remove the bytes 0000 -> 07FF. You’ll have this right if the file now starts with the bytes shown in the attached "startOfFile" image.
And editor should show the last byte at offset 07FFF like you can see in the "endOfFile" image.
Now save the file using a different name and/or extension.
What happens next depends on how you’re going to make the MVME110-1 run the code in the file.
For me, there are two routes;
1. Blow the program into a number of EPROMs. Normal practice seems to be to use 4 off 8K bytes EPROMs but you might be able to use a pair of 16K devices…. I’ve not tried the latter.
2. Load the program into a pair of EPROM emulators like these;
https://mygeekyhobby.com/2020/07/05/eprom-emulator/. I’ve not tired this yet (because I don’t envisage changing the VMEBug program).
So focusing on option (1) above, I used a Python program to split up the EPROM image into something which can be sent to an EPROM programmer. Here’s the program which I called “splitbinm110-1.py”. Don’t ask me to explain that; it seemed a good idea at the time;
# Split in single binary file into the following
# - Even bytes Sent to the filenameHI.bin file
# - Odd bytes Sent to the filenameLO.bin file
# So if the input file is 32768 bytes long, each of the output files will be 16384 bytes long
# Then each of the above output files is split into two
# - FilenameHI.bin First half sent to filenameHI-0.bin
# Second half sent to filenameHI-1.bin
# - FilenameLO.bin First half sent to filenameLO-0.bin
# Second half sent to filenameLO-1.bin
# D. Waine Version 1 17/04/24
import os
import sys
fileExtension = '.bin'
if len (sys.argv) != 2:
print ('Incorrect number of arguments. You need to supply the input' + fileExtension + ' file without an extension')
sys.exit (2)
inputFile = sys.argv [1]
fdInputFile = open (inputFile + fileExtension, 'rb')
fdOutputFileHi = open (inputFile + 'Hi' + fileExtension, 'wb')
fdOutputFileLo = open (inputFile + 'Lo' + fileExtension, 'wb')
inputFileLength = os.path.getsize(inputFile + fileExtension)
if inputFileLength % 2 == 1:
print ('Input file length on an even number of bytes')
sys.exit (3)
print ('Doing Hi/Lo spilt')
print ('Input File name ', inputFile + fileExtension)
print ('Input file length ', inputFileLength)
loopCounter = 0
while True:
byteHi = fdInputFile.read (1)
byteLo = fdInputFile.read (1)
if byteHi == b'':
break
fdOutputFileHi.write (byteHi)
fdOutputFileLo.write (byteLo)
loopCounter += 1
fdInputFile.close ()
fdOutputFileHi.close ()
fdOutputFileLo.close ()
print ('Hi/Lo split complete')
print ('Bytes written to each output file ', loopCounter)
print ()
# Create a list of the files to process
inputFiles = [inputFile + 'Hi', inputFile + 'Lo']
for inputFileToChop in inputFiles:
inputFileLength = os.path.getsize(inputFileToChop + fileExtension)
# Check that file length is even: If it's not then the output files will not be the same length
if inputFileLength % 2 == 1:
print ('Input file length on an even number of bytes so output files will not be the same length')
loopCounter = 0
fdInputFile = open (inputFileToChop + fileExtension, 'rb')
fdOutputFileFirst = open (inputFileToChop + '-0' + fileExtension, 'wb')
fdOutputFileSecond = open (inputFileToChop + '-1' + fileExtension, 'wb')
while True:
byteRead = fdInputFile.read (1)
loopCounter += 1
if byteRead == b'':
break
if loopCounter <= (inputFileLength / 2):
fdOutputFileFirst.write (byteRead)
else:
fdOutputFileSecond.write (byteRead)
fdInputFile.close ()
fdOutputFileFirst.close ()
fdOutputFileSecond.close ()
inputFileLength = os.path.getsize(inputFileToChop + fileExtension)
outputFileLengthFirst = os.path.getsize(inputFileToChop + '-0' + fileExtension)
outputFileLengthSecond = os.path.getsize(inputFileToChop + '-1' + fileExtension)
print ('Input file name ', inputFileToChop + fileExtension)
print ('Input file length ', inputFileLength)
print ('First output file name ', inputFileToChop + '-01' + fileExtension)
print ('First output file length ', outputFileLengthFirst)
print ('Second output file name ', inputFileToChop + '-02' + fileExtension)
print ('Second output file length ', outputFileLengthSecond)
print ()
Start a command line session (i.e. cmd.exe) and navigate to the directory holding the binary file you saved in the previous step (i.e. ROM.bin). Then run the python program like this;
splitbinm110-1 ROM
You should see some output like this;
Doing Hi/Lo spilt
Input File name ROM.bin
Input file length 32768
Hi/Lo split complete
Bytes written to each output file 16384
Input file name ROMHi.bin
Input file length 16384
First output file name ROMHi-01.bin
First output file length 8192
Second output file name ROMHi-02.bin
Second output file length 8192
Input file name ROMLo.bin
Input file length 16384
First output file name ROMLo-01.bin
First output file length 8192
Second output file name ROMLo-02.bin
Second output file length 8192
Now you have four binary files that you can use to blow the EPROMs if you’re using 8K devices. You also have two binary files if you’re using 16K devices.
Before programming the EPROMs, you may need to erase them. Make sure the device window is clean. You may need to use a solvent to remove any glue / labels. Failure to do this may result in a poor erase experience (as I found out!).
I use a Dataman Speed-E+ eraser and I gave the EPROMs 10 minutes… Check they’re erased then give them 10 minutes more.
Fire up the EPROM programmer. I use a Dataman MemPro. Select the device. For me it’s a AMD 27C128 which came with the MVME110-1. This is handy because the there’s no need to change the device straps on the PCB.
After selecting the device, check the device is erased then load the file. I did the upper byte first (which goes in socket XU1). You need to load the ROMHi.bin file into the buffer. Then click on the Program icon. It only takes a few seconds.
Repeat for the lower byte using the ROMLo.bin file, this device goes in socket XU5.
Pop the devices into the sockets on the PCB.
Put the PCB in the rack.
Start your terminal emulator. I use puTTY set to the following;
9600 bps
8 data bits
1 stop bit
No parity
XON/OFF (not sure if this is correct)
I used a USB – serial cable with a 9-25 way adaptor on the end. There’s no need for a null modem adaptor.
When everything’s connected and puTTY is running, power up the VME rack. VMEBug starts really quickly and responds thus;
COLD start
MVME110 4.1>
That’s basically it. I’ve not managed to find a user manual for the exact version of MVMEBug I’m using but this seems to be close;
https://bitsavers.org/pdf/motorola/VME_10/M68KTENBG_D1_TENbug_Debugging_Package_Users_Manual_Sept83.pdf