512K flash memory internal upgrade - no traces cut

Discussion forums for users of the Cambridge Z88 Portable Computer
patters
Posts: 123
Joined: Thu Mar 11, 2021 12:34 pm

512K flash memory internal upgrade - no traces cut

Post by patters »

Owning a Rakewell flashcard for your Z88 is recommended, but it's a pain when most of its capacity immediately has to be used for the operating system upgrade to run OZ 4.7.1, or indeed the new version 5.0. You can get around this by replacing the 128K internal ROM chip with a 512K flash memory chip. There are two reasons I'm writing this up:
  • All of the existing guides prescribe the destructive cutting of traces on the Z88 PCB, as if it's inevitable. I don't like doing this since then the mod cannot be reversed if it didn't work out. Perhaps people were a bit more cavalier about doing this when you could find a replacement machine for peanuts, but they're becoming quite expensive these days.
  • As with the internal RAM replacement the choice of available parts to use for this mod in 2021 is very limited. In fact there is only a single currently manufactured 512K flash memory part in a PDIP-32 package - the SST39SF040. At the time of writing this can be acquired for around £10.
Fortunately this particular SST flash memory part has been supported from OZ 4.7.1 onwards. However, because it will be used in Slot 0 to boot the machine this mod will need the chip to be externally programmed with an OZ ROM image - at least OZ 4.7.1 to allow it to be updated later. This is because although machines can boot OZ from a card in Slot 1, this relies on a hook in the ROM present in Slot 0 (which was discovered when it was disassembled). No ROM in Slot 0, no boot.

I had my chip programmed for me by someone with a programmer device, so unfortunately that task lies beyond the scope of this write-up.

My main source of wiring information was Dennis Berget's Z88 Hardware Modification guide, coupled with the SST39SF040 product datasheet. From these sources I could isolate the pin-out differences between the motherboard ROM socket and the 512K flash memory IC, indicated below with asterisks:

Code: Select all

       Z88 PCB ROM              512K JEDEC Flash Memory
    +--------------+                +--------------+       
VCC |1    +--+   32| VCC       *A18 |1    +--+   32| VCC   
ROE |2           31| VCC       *A16 |2           31|*WE  
A15 |3           30| VCC        A15 |3           30|*A17    
A12 |4           29| A14        A12 |4           29| A14   
A7  |5           28| A13        A7  |5           28| A13   
A6  |6           27| A8         A6  |6           27| A8    
A5  |7           26| A9         A5  |7           26| A9    
A4  |8           25| A11        A4  |8           25| A11   
A3  |9           24| A16        A3  |9           24|*ROE   
A2  |10          23| A10        A2  |10          23| A10   
A1  |11          22| CE         A1  |11          22| CE   
A0  |12          21| D7         A0  |12          21| D7    
D0  |13          20| D6         D0  |13          20| D6    
D1  |14          19| D5         D1  |14          19| D5    
D2  |15          18| D4         D2  |15          18| D4    
VSS |16          17| D3         VSS |16          17| D3    
    +--------------+                +--------------+       
Differences
There are only five pins that need re-wiring which can be achieved by bending up those specific pins so they don't connect with their socket positions. Address lines A17 & A18 can easily be taken from the internal 512K SRAM modification. A16 and ROE positions are swapped. Dennis' guide mentions that WE (Write Enable) can be picked up from Slot 2 pin 22. This can be confirmed by consulting the slot pin-outs in the Z88 Developer Notes.

Wiring points - labelled in blue on the below photos
WE can be traced to a free pad very near the supercapacitor on the top side of the PCB.
ROE presents to a free pad near the right edge of the ROM socket.
A16 is not so clear-cut. It can be picked up from a free pad over to the right of the top side of the PCB, but in the end I decided to pick it up from the rear of the board, directly from pin 24 of the ROM socket to avoid needing to route a long wire around the SRAM chip.

wiring points front.jpg
wiring points rear.jpg

Wire routing
You need to extract the solder from pin 24 of the ROM socket to properly insert and solder the wire quickly enough not to melt away its coating. Then it can be sent through to the top side through the via which is very close to that position. The risk here is that the kynar wire coating melts away very easily with the heat from the iron, so I played out a little extra length to make sure the coating was intact at the point it was threaded through the hole (see above photo). The wire must not short against the via.
To avoid lots of loose wires at the top of the PCB where the battery wiring is already in the way, I decided to thread the wires for A18 and A16 under the ROM socket between its legs. See below:

wiring routing.jpg

I clipped off the narrow parts of the bent up pins of the flash memory IC and tinned them up to make the wire soldering easier, as I had done with the legs of the SRAM IC. Some might argue that in clipping them I made it much harder to reprogram that IC if it was ever needed, but I think there is a very high chance of the legs breaking off after being bent even a couple of times, and the chip only cost about £10 including shipping. Once you have a working system, the ROM image on the flash chip can be updated using OZ's own update procedure, so I don't think this is much of a concern.

close-up1.jpg
close-up2.jpg
Last edited by patters on Wed Jun 30, 2021 2:08 pm, edited 36 times in total.
patters
Posts: 123
Joined: Thu Mar 11, 2021 12:34 pm

Re: 512K flash memory internal upgrade - no traces cut

Post by patters »

working.jpg
A quick test to make sure the patient survived the procedure!


reassembled.jpg
Fully re-assembled.


OZ5.jpg
And after testing for a week or so running OZ 5.0 from Slot 1, I decided to take the plunge and update my internal flash (Slot 0) to OZ 5.0 via the <>UPD command in Index. It completed successfully which proves that the flash memory was indeed wired up correctly.

Warning! - Make sure you pick the correct build when you update to OZ 5.0.

ozs0.. builds are for Slot 0
ozs1h.. builds are for hybrid 512K RAM/512K flash card in Slot 1
ozs1m.. builds are for 1MB flash card in Slot 1

OZ 5.0 is currently at roughly pre-beta maturity.
User avatar
Erm
Posts: 225
Joined: Thu Jun 20, 2019 7:07 pm
Contact:

Re: 512K flash memory internal upgrade - no traces cut

Post by Erm »

Excellent clear write-up. I now have the required bits to do this to my Z88. The website with the OZ ROMs is probably the most confusing part! There is a read-me that explains the naming, but there are a lot listed, mostly development versions.
I'm Chris, a Brit in Germany (Chr$ on the QL forum). https:\\QXL.WIN < QL related collection.
patters
Posts: 123
Joined: Thu Mar 11, 2021 12:34 pm

Re: 512K flash memory internal upgrade - no traces cut

Post by patters »

The OZ 5.0 roms get compiled automatically every time there's a commit I think (continuous integration), which is why there are so many. Use the most recent, but be cautious if the recent commit history indicates changes to the flash memory code. OZ 5.0 is going to hit beta status soon apparently.

Let me know how you get on with this mod. How will you program the chip before fitting?
User avatar
Erm
Posts: 225
Joined: Thu Jun 20, 2019 7:07 pm
Contact:

Re: 512K flash memory internal upgrade - no traces cut

Post by Erm »

I did it all at the weekend. I went for the OZ 4.7.1 official public release instead of looking into the v5 yet. It'll still be a massive improvement. Mine is actually a German model with German k/b so great that the newer OZ versions lets you configure the k/b type.

I programmed the SST flash chip with my Chinese XGecu Pro (AKA MiniPro). I changed the RAM chip first, also soldered it to the board because it's unlikely anything bigger/better will ever fit in that space! I checked it worked (it did) then did the ROM replacement. I didn't cut down the pins so that if I needed to I could remove and re-program - but I didn't need to, that all worked fine, too.
20210706_152538.jpg
I'm Chris, a Brit in Germany (Chr$ on the QL forum). https:\\QXL.WIN < QL related collection.
Crippen69
Posts: 1
Joined: Tue Jul 06, 2021 12:30 pm

Re: 512K flash memory internal upgrade - no traces cut

Post by Crippen69 »

Have had an OZ4 rom in component draw for a while. Didn't like the idea of cutting traces, so it sat there. Then I found this thread. Took the plunge, and thanks to your post, have now finally upgraded both rom and ram. Rom is OZ 4.4.1 on an AM29F040, used same ram ic as you. As I don't have an external flash card, I've not upgraded to 4.7 yet. Thanks 😊
Jbizzel
Posts: 65
Joined: Thu Apr 23, 2020 6:58 pm

Re: 512K flash memory internal upgrade - no traces cut

Post by Jbizzel »

I'm going to attempt this mod at the weekend. I've already doing the ram upgrade, following Patter's guide. I have the ROM chip, blown with OZ 4.7.1 ready!

Edit...

Just to report, I've managed to do this mod from the instructions.

Success! Thanks @patters for the clear guide!
tbug
Posts: 6
Joined: Wed Sep 15, 2021 2:42 am

Re: 512K flash memory internal upgrade - no traces cut

Post by tbug »

Sorry to barge in here but something doesn't seem right. Please correct me if I am wrong (and I often am) but I believe you have your wires crossed; literally!

I did the internal upgrade (without cut traces by bending chip pins) on my Z88 around 3-4 years ago using NOS AM29F040B-90PC flash and HM628512BLFP-5 SRAM, following Dennis Berget's guide and info from the Z88 wiki. I initially flashed OZ 4.7 using a USB FLASH/EPROM programmer and recently tried to upgrade to OZ 4.7.1 using the internal upgrade procedure which failed. To try and understand why it failed, my internet searches lead me to this post and after reading it I decided to open up my Z88 to compare and found I'd wired things differently, hence my concern.

I believe your initial RAM upgrade has the A17 and A18 address lines swapped (going by your photos of the solder points on Slot 2 compared with Dennis' guide) and hence your Flash upgrade. Looking at the photos in this post, it appears you have soldered your ROM A17 line to the RAM A18 line and vice versa.

I'm guessing the mistake hasn't been obvious because those address lines are for the very top memory banks that may not have been used yet?

However, I am very much an amateur so if I am wrong, could someone explain to me why please - and I might go about changing my wiring instead to see if that fixes the OZ upgrade procedure.
User avatar
Paul
Posts: 1573
Joined: Thu May 27, 2010 8:15 am
Location: Germanys west end

Re: 512K flash memory internal upgrade - no traces cut

Post by Paul »

Well on a RAM it just doesn't matter which line is which.
You cant mix Adress and datalines, but within its range it doesn't matter which bit goes to what Box as you have the same wiring when reading and writing
In theory, there is no difference between theory and practice. But, in practice, there is.
tbug
Posts: 6
Joined: Wed Sep 15, 2021 2:42 am

Re: 512K flash memory internal upgrade - no traces cut

Post by tbug »

Thanks Paul for the clarification. So does that mean that all the address lines could be mixed up and swapped and the software wouldn't care either way? It would just mean that a low HEX address would not necessarily live in the low section of the chip?
Post Reply