Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 32 Next »

Use Case

Replacing the internal ROM with a 512KB flash chip allows for the Z88 to be upgraded to a more modern OZ version without consuming a flash card in Slot 1.

However some useful Z88 software does not function on the newer OZ versions, since these authors deviated from the Cambridge developer guidelines. SpellMaster, and Vision2 VT100 terminal are two such applications. Using a Z88 as a portable serial terminal, with its full size keyboard, remains a useful proposition even today.

Once a Z88 had a Slot 0 flash modification and OZ upgrade performed, it could no longer run these useful applications… until now!

OZ Version Selection

One of the most cumbersome constraints of OZ 3.0 and earlier was the dependence on a RAM card in Slot 1 for Expanded mode, which Vision requires. However, by using OZ 4.0 on a Z88 with an internal RAM upgrade we can achieve a fully backward compatible Expanded machine without needing any other cards.

Bundled Tools

  • XY-Modem - for fast file transfers over serial.

  • FlashStore - for managing flash file storage.

  • RomUpdate - for simple application ROM blowing to flash, and to update OZ (to return to 4.7.1 or 5.0).

  • RomCombiner - for managing multiple application ROMs on flash.

  • Installer - to install and run application ROMs from RAM (no flash card needed).

After using OZ 4.7.1 or OZ 5.0 it's easy to forget just how irritating it can be returning to one of the stock versions. Simply transferring files is a chore, often painfully slow since EazyLink2 standalone is limited to 9600bps. However, Dennis Gröning's XY-Modem can achieve around a 10x speed improvement, explained in this guide.

Since my own updates in 2022, all of the essential flash tools above have been updated to add compatibility for newer flash memory types - so they remain current even running on old OZ versions.

ROM Modifications

By copying the card header and the Application Front DOR to the end of the 512KB flash memory, editing the card size, and by amending the last of the linked application DORs in the OZ ROM image - we can add extra applications to the Index. We can also fix several bugs in OZ 4.0 at the same time. Both processes are explained on Dennis Gröning's website.

As was done with OZ 4.3 onwards, we can then add a file area to make use of the remaining unused flash. We can pre-populate this with the BBC BASIC versions of Installer, RomCombiner, and RomUpdate. These have the advantage of being usable without needing to be blown to a card and, since we will be running OZ 4.0, their requirement for an Expanded Z88 will always be met (assuming a Slot 0 RAM upgrade).

Installer Constraints

Note that to use RAM apps, Installer will require a dedicated RAM card because OZ 4.0 is not capable of detecting applications installed to the RAM portion of a hybrid RAM/flash card, nor in Slot 0 RAM. Installer cannot in fact use hybrid card RAM but, even were it possible, OZ 4.0 would only evaluate the Front DOR at bank $3f (63) at the top of the card (in flash), and that would contain no reference to any RAM app. The newer OZ versions have been modified to also scan bank $1f (31) of hybrid cards (top of RAM).

Patching Vision2 for Slot 0

Vision2 was sold as a 32KB EPROM. As explained in the Developer Notes, cards smaller than 1MB are addressable at repeating intervals within that Slot's address space. This allows OZ to easily scan the top bank of a card, without needing to know its size.

By default, Vision2 cannot run from other card sizes because its DORs presume it will occupy the last two banks, but its bank switching code presumes it will occupy the first two banks. Both conditions only hold true for a 32KB card.

Consider the Z88 memory map:

Banks &00 - &3F are internal Slot 0 (lower half ROM, upper half RAM) 
Banks &40 - &7F are wired to Slot 1 (usually RAM for Expanded mode in old OZ)
Banks &80 - &BF are wired to Slot 2 
Banks &C0 - &FF are wired to Slot 3 (usually EPROM, only Slot with 12V)

RomCombiner includes patches to lift the restrictive card limitations for both Vision2 (full version) and for Vision/L (reduced feature version). The Vision2 patch amends the following byte values in the bank switching code:

Original

Patched

Impact

C0

FE

Slot 3, from 1st bank to penultimate bank

C1

FF

Slot 3, from 2nd bank to last bank

80

BE

Slot 2, from 1st bank to penultimate bank

81

BF

Slot 2, from 2nd bank to last bank

Rather than masking out the top two bits of the bank address (which would make it Slot agnostic), Vision is limited to running in Slots 2 or 3 only, which is understandable considering early OZ needs a RAM card in Slot 1 for an Expanded machine.

Returning to the memory map above, our custom ROM will need one of these pairs of bytes patching to the addresses in Slot 0 which the Vision ROM will occupy (see $0a and $0b in the manifest below). The DORs of each bundled application were updated in a similar fashion.

image-20240411-150954.png

Downgrade ROM Manifest

CFG.V3
; OZ ROM for slot 0 and total of 16 banks to update.
OZ.0,16
; Bank file, CRC, destination bank in slot 0.
"ozs0-400.32",$9de67a39,$00
"ozs0-400.33",$1d32d297,$01
"ozs0-400.34",$65ed5623,$02
"ozs0-400.35",$e2e022c6,$03
"ozs0-400.36",$8758704a,$04
"ozs0-400.37",$b860cf23,$05
"ozs0-400.38",$d3104e3f,$06
"ozs0-400.39",$5c5de229,$07
"flashst-197.40",$88ce8262,$08
"zip-xymodem.41",$83cf1ae5,$09
"vision2-206.42",$fd18a731,$0a
"vision2-206.43",$71ee7ae3,$0b
"file-area.44",$1ec9d2c1,$0c
"file-area.45",$6666ce43,$0d
"file-area.46",$420c789c,$0e
"ozs0-400.63",$3d6adf54,$1f

To Do

There is over 256KB remaining on the file area - just enough to accommodate SpellMaster. It needs some disassembly to locate and patch its bank switching code.

  • No labels