Leningrad construction Project Pt 2: hot swapping ROMS

 So at the end of the previous update one of the ROM sockets was modified to accept a 27c128 (instead of using two 27C64 as is standard) of course I didn't have any 27c128 so I ended up using a 27C256 32KB EPROM with the image of the operating system copied twice over (N.B this wasn't actually needed. I could've just burned it into the upper half). In my search for the stock ROM however I found this site. An archive of various ZX Spectrum ROMs from various countries and different machines.

So for reasons I will disclose in the future I have a bundle of 27C512s lying around, this got me thinking. There's a few different ROMS that caught my eyes when I was browsing so what if I could swap between them without having to go through the process of removing and replacing the EPROM. Now of course I could just put a dip switch on the extra address lines and be done with it but that might lead to crashes and instability if say, I flipped the switches whilst the computer was running. And in certain situations the ability to swaps ROMS under these conditions may be advantageous. 

 

So I devised this circuit. Instead of just connected straight to the address lines the signal from each switch is first fed through a 74HCT175 type D flip flop. They get their clock signal from the RDROM signal used to disable the output of the rom when it's not being read from. Doing this means any change in ROM bank selection will not occur until the processor is done reading from the ROM. Next time the processor looks at the ROM it won't even notice the change in the upper address bits  

 

 

Previously when i've constructed things i've drawn up a circuit diagram, then planned the board layout, then placed all the components and began wiring. This time I did not do this. Instead I started off by placing the components where I thought they should go. The turned pin SIP sockets with extended legs went in first, then the DIP switch and 74175, then the rest of the passives. 

After this I simply cut the board to size, first by scoring it with a knife, Then snipping along the lines with wire cutters, followed finally by sanding the edges so they weren't jagged. 



The next stage was simply to draw the rest of the owl. I just went through the circuit diagram and used kynar hookup wire to connect everything until I ran out of things to connect. Making a few little changes as I went, such as removing the LEDS because the DIP switch is a good enough indicator on its own and moving the pull down resistors to be under the 74HCT175 for tidiness' sake. If i was to make another one of these I could easily make it a few rows smaller, but I don't think that really gain me much


And there it was, when tested I could now freely switch between ROMs without having to reboot or even restart my ZX spectrum. This has some cool benefits I will discuss in a moment. 

Currently the ROMS I have flashed are 

PAGE 1: Thick fonted Baltik ROM (edited to have standard reset routine)

PAGE 2: Pretty Basic  

PAGE 3: 1991 RaK Turbo 

PAGE 4: 1986ES (for dumping ram to tape*) 

This lets me do some fun stuff like writing a program in pretty basic, then swapping over to RaK turbo to save it at double speed seamlessly. So far I haven't managed to crash the spectrum by hot swapping the ROMS, the only weird behaviour I've encountered occurs when you swap ROM whilst loaded into the RaK Turbo monitor or the 86ES tape dumping routine. Which is to be expected. I'm sure I'll be able to think of other ways I can utilise this expansion as I find more available ROMS, but even if I don't it’s still fun to have access to a few different ROMS on actual hardware without having to swap components, being able to hot swap is just an added bonus. 

Final notes:  As there are two unused flip flops in theory I could use the other two to add more address lines which allow me to use a 27C020 EPROM but I don't think I will, programming and organising that many rom files would be a bit of a pain. Plus I like the idea of having a little stack of EPROMs I can use. In future I may modify it to use a ZIF socket instead of my standard turned pin SIP sockets to make swapping a bit easier. It's a bit of a pain right now.

It also wouldn't be too hard to convert this circuit to work on the original spectrum hardware or even other computers that use similar EPROMs. As nice as having a proper banked ROM disk with software switching would be, I feel this would still be useful in that system as it allows an amount of sneakiness in situations where you don't have control of the running program to tell it to swap banks. 











Comments

Popular posts from this blog

Digging in to the Tei Processor Terminal PT. 1

The Tei Processor Terminal PT. 2

Leningrad construction Project Pt 1: The bare minimum.