GUIDE TO BBCIM
By Dextrovix / RetroBBC

What is it?

BBCIM.EXE is a rather useful utility that allows you to convert from Standard Archive Format (as seen on The BBC Lives! And The BBC Games Archive sites) to image files as used by pcBBC and BeebEm. I've had quite a few requests for help on using this, so I'll try to help here first. Please note: BBCIM is not particularly intuitive, so as I'm not an expert on all of its functions, I'll go through what I know, which should be enough to get the results you want.

Software requirements

Windows 9x, NT 4.0 or Win32 extensions to Windows 3.x.

Using BBCIM

Assuming that you've unzipped the game that you want, your folder will contain something like the following:

GAME
GAME.INF
LOADER
LOADER.INF
PROGPIC
PROGPIC.INF
DATA
DATA.INF

The files without the INF extension are the actual individual programs that the BBC would load from disk. The INF files are basically information files that contain data on the filename, its read/write status, the subdirectory and load/start/execution addresses, file lengths and CRC checks. Not all INF files contain all of these attributes. You can edit them with any text editor like Notepad or the MS-DOS EDIT command.

BBCIM will use the information in each INF file to correctly add each respective file to an image that you request. The syntax for this procedure is as follows.

BBCIM -a filename.img file1 file2 file3 file4

Typing should be done in lower case, as BBCIM was compiled from a UNIX-derived source (without hardly any changes for DOS/Windows), which is case sensitive. To explain the above: -a asks BBCIM to add to an image file as specified in filename.img. If the image already exists, files can be added to it, if not then a new image is created. file1 file2 etc indicate the names of the files to add. To follow on from the example game shown above, to create an image file using BBCIM do the following:

BBCIM -a invaders.img game loader progpic data

You can also specify a location to put the image file, its default is to put it into the current directory. E.G.

BBCIM -a c:\emulators\pcbbc\diskimg\invaders.img game loader progpic data

If you make a typing mistake in specifying the files to add BBCIM will warn you and carry on. You can then add just the files that were skipped afterwards. E.G.

BBCIM -a invaders.img data

You can also use invaders.ssd if you are a BeebEm user (it's default when browsing for images). pcBBC doesn't mind what extension you have.

A few people have pointed out to me that whilst they can get this far, the games still won't work. There can be many reasons as to the cause of this. Some games may have been converted from tape, and still have the *TAPE commands embedded, some can be expecting PAGE to be at E00h, some can have files missing from the archive, some may be expecting additional commands from the OS (like MRUN or MLOAD as in the Watford DFS), or simply that the wrong file is being CHAINed or *RUN. Getting the game into readable format is only half the battle: I've certainly got plenty of scars!

BBCIM can do many more things, but for me this is the main use. The only other function from it that I use is the -min function, which does the same as *COMPACT on the BBC and Disk Defragmenter in Windows. Using the following will compress the image file and remove any gaps (they won't be there if you've just created the image, but rather once you've deleted and/or added files to it later from a BBC or emulator):

BBCIM -min invaders.img

The original will be renamed with an additional % suffix (invaders.img%) as a backup and as a comparison to the newly compacted one.

 

MRUN and MLOAD

What are they?

These two utilities are part of the Watford DFS, and allow files that would otherwise load into DFS workspace and become corrupt to be successfully loaded and relocated. Such programs that may require this to be done are conversions from tape, where PAGE is set to E00 in that environment. On a disk filing system, PAGE is often at 1900 to accommodate the DFS functions and workspace, resulting in the games not loading.

If you find some games on sites such as The BBC Lives! or The BBC Games Archive, you may find that they implement either MLOAD or MRUN in order to get themselves working. The only ways to get around this issue is to either use the Watford DFS (I'm not a fan of it) to allow the use of these utilities, or find a DFS ROM that allows PAGE to be set at E00.

However, these two utilities have now been written as files to be placed on disk images, and should function in a similar way to those present in the Watford and ADT ROMs, basically allowing anyone using the Acorn 1770 DFS (the majority of BBC Micros) to enjoy these games.

Software andHardware requirements

An emulator or a real BBC. Please note that these utilities, whilst they have worked on every occasion I have tried them, may not fully function in the same way as the equivalent Watford or ADT utilities.

Using MLOAD/MRUN

You will see the disk image contains four files, two source (A.MLOAD and A.MRUN) and the assembled code ($.MLOAD and $.MRUN). The source is well documented and intuitively laid out, so feel free to LOAD A.MRUN or A.MLOAD and have a look. You may even need to change it and run off a modified version if you have a particular game that impedes on the commands workspace (A00). However, this is more advanced, and should not be required in the majority of cases.

To go through this example, we shall use the Fairground image from the Superior archive. Put this into your system and LOAD"FAIRGR" and LIST the contents. The original version looked like this.

10 IF PAGE<>&7000 THEN PAGE=&7000:CHAIN"FAIRGR"
20 MODE7:$&C00="FAIRGROUND":*SUPSCR
30 *MLOAD FAIRGR2
40 FORX%=&0DTO&16:READ?X%:NEXT
50 DATA 0,145,54,46,127,125,23,10,0,51
60 *FX18
70 *K.0O.|MRUN|M
80 *FX15,1
90 *FX138,0,128
100 PAGE=&E00:END

Using the Watford DFS, this program will work without alteration. Line 30 makes the call to MLOAD to load the file named FAIRGR2. Using another DFS would result in an error at line 30 because the file could not be found (e.g. MLOAD would be unrecognised).

The version that is in the archive has a modified line 30, which is

30 *RUN MLOAD FAIRGR2

By using *RUN, the DFS will run the file called MLOAD, which in turn uses the attribute FAIRGR2 to load that file and then relocate it. In theory, using just *MLOAD FAIRGR2 will work, but if you have a ROM that contains the utility MLOAD already (such as ADT) then that will take presidency over any files called MLOAD on you disk image. By using *RUN, this allows compatibility with all systems, regardless of which ROMs are installed.

Most BASIC loaders will have a similar structure. You need to replace the *MLOAD or *MRUN commands and substitute a *RUN (or */) prefix. You then need to copy the respective utility from the disk image onto the game image. Using pcBBC, you can use the copy command at the BBC BASIC prompt (assume the game is in Drive 0, and the MRUNLOAD image is in Drive 2).

*COPY 2 0 $.MLOAD <RETURN>

If not you'll need to extract the MLOAD/MRUN files individually by using DCONV to convert them to Standard Archive Format, and then add them to your game disk image using BBCIM. See the Links page to Tom Seddon's site which contains this utility and documentation.


This article originally appeared on the RetroBBC website.
http://www.geocities.com/SiliconValley/Lakes/7207/Index.htm