ROM switching:

Using, learning, programming and modding the Gigatron and anything related.
Forum rules
Be nice. No drama.
at67
Site Admin
Posts: 654
Joined: 14 May 2018, 08:29

ROM switching:

Post by at67 »

A thread for ROM switching, ROM cartridges, etc.
at67
Site Admin
Posts: 654
Joined: 14 May 2018, 08:29

Re: ROM switching:

Post by at67 »

A first attempt at a hardware ROM switcher:

https://youtu.be/gdF33IdJ85U

ROM Switcher.png
ROM Switcher.png (72.95 KiB) Viewed 7439 times
at67
Site Admin
Posts: 654
Joined: 14 May 2018, 08:29

Re: ROM switching:

Post by at67 »

emulix wrote: 09 Jun 2018, 15:21 Would it be possible to add a software bank commutation ? Like writing at ROM 0x0 for bank 0, 0x1 for bank 1, 0x2 for bank 2 etc... ?

So a software like Enhanced Basic could use many ROM bank and switch when needed.
It wouldn't be difficult, you could re-purpose as many of the Blinkenlights as you needed and add those as inputs to the truth table. It would also require modification to the original ROM as the Blinkenlights state machine would need to be modified as well, (otherwise all hell would break loose when the LED's were activated).

One of the things I noticed about the ROM switcher is that you can switch ROM's in real time without having to perform a reset as long as the code being run is exactly the same in the ROM's when you switch. This makes sense of course, assuming setup and hold times are met, and metastability isn't introduced in the process of switching, as the program counter and instruction decoder have no idea or care which ROM the next instruction comes from. If instability is introduced because of a metastable window of opportunity, then you would have to get more complicated and probably halt the program counter during the switching process.

So if you have a set of duplicated code within the ROM's, (which you need to have for a realistic ROM banking system anyway), then you can make sure you always switch banks within that code and extend your ROM to theoretically any size that you want, (within the limits of Blinkenlights, when decoded gives 16 possible ROM outputs).
Hans61
Posts: 104
Joined: 29 Dec 2020, 16:15
Location: Saxonia
Contact:

Re: ROM switching:

Post by Hans61 »

I have a question about the circuit. How is the /RST output of the Q1 (MCP100) connected? There is no real RESET input on the Gigatron?
at67
Site Admin
Posts: 654
Joined: 14 May 2018, 08:29

Re: ROM switching:

Post by at67 »

If you look at the schematic in the Gigatron manual, page 48, you'll see the MCP100 with a !RST output, then on page 49 you'll see the !RST output fed to the four 161's !MR input, (the program counter).

All I did was add a de-bounced reset switch to the MCP100; when switching ROM's, (my ROM switcher can switch them live and from EEPROM), you need to HW reset the Gigatron.

The whole purpose of my switcher was to able to burn real ROM's in seconds and switch between three of them whilst the Gigatron is powered. You could take this even further and build EEPROM programmability into the ROM switcher over a suitable USB/Serial interface and then you could program the EEPROM's live as well.
at67
Site Admin
Posts: 654
Joined: 14 May 2018, 08:29

Re: ROM switching:

Post by at67 »

Here is some more information on the original design that got lost in a different thread:
at67 wrote: 08 Jun 2018, 14:32
emulix wrote: 07 Jun 2018, 14:16 Other vintage computers use writing to address 0x0, 0x1, 0x2, 0x3 to switch the bank
...
For 32 and 64 kb, it's very simple: one or two D flip-flops that are set to 1 or 0 by writing to the address 0 or 1 (2 and 3 more for the 64 KB). As a writing is basically groundless in this area (ROM), Thomson has quickly rocked a little door and and one or two rocker probably type 7474, to do the trick.
xopr wrote: 07 Jun 2018, 13:44 I think you can put the EPROM in stand-by by having pin 2 (/CE, chip enable) high.

in short: wire everything in parallel to the new sockets except pin 2:
lead pin 2 to the common of a toggle switch, lead the remaining pins to both sockets -> pin 2 and have those pins pulled up by adding 10k resistors to pin 40.

You could use the A15 line to 'toggle the bank' but that will give problems when iterating/counting the upper area of the RAM
emulix wrote: 07 Jun 2018, 12:41 Hello,

could it be possible to add a cartridge on the ROM socket? This cartridge would contains two ou three software switchable ROMs. then the size of the BASIC would not be a problem.
Here's a video of my current switchable ROM setup, writing software on the emulator and not being able to see real results on the hardware was getting old fast:

https://youtu.be/gdF33IdJ85U

- The first 4-5 seconds are a close up of the daughter board, it contains the original Gigatron ROM plus two SST39SF010A 128Kx8 NOR Flash devices that I have configured as two banks of 64Kx16 EEROM; this allows me to instantly switch between three ROMS.
- Low 128Kx8 is 2 banks of native opcode ROM, (instructions).
- High 128Kx8 is 2 banks of native operand ROM, (data).
- The three LEDS signify which ROM is active.
- ROM0 = original, ROM1 = original with VideoB scanline modification, (you can see how fast Racer is running, almost twice as fast), ROM2 is VideoB scanline modded with my Tetris demo replacing the credits.
- The two push buttons are for RESET and ROM SELECT.
- I replaced the MCP-475 with a MCP-450 and wired it's VCC pin to the debounced RESET button.
- The glue chips are a 74HC14 hex schmitt inverter and a 4017 decade counter.
- The schmitt provides debouncing for the two buttons and some inverting for control signals.
- The 4017 is setup as a MOD 3 counter to switch between the ROMS, (I didn't want to use a rotary switch or SP3T monstrosity, I wanted something a little more elegant).
- Selection of the ROMs is performed by the 4017 controlling the ROMs with chip enables.
- Selection of the 64K banks within the SST39SF010A's is also controlled by the 4017, using A16, (the truth table is quite simple).
- I've written a simple utility that is part of Contrib/at67 that splits the ROM files into separate opcode and operand streams/files, I then combine them within the TL866A software to program each 128Kx8 SST39SF010A.
- ZIF sockets and a proper PCB will be next.

I'll post a circuit diagram when I get a chance.
at67 wrote: 08 Jun 2018, 15:35
xopr wrote: 08 Jun 2018, 15:19 So the A16 you are referring to is the spare bit of the RAM address?
If so, doesn't that give problems when counting the RAM on boot time?
RAM A15 on the Gigatron PCB is the spare bit of the RAM address, you can use that to expand your RAM to 64Kx8.

I wasn't very clear, the ROM A16 that I mentioned is a signal generated by the 4017, the truth table looks something like this:

Code: Select all

_______  _______  _______
GROM_CE  ROM0_CE  ROM1_CE  ROM_A16
  0        1        1         X
  1        0        0         0
  1        0        0         1   
- How you generate these signals is up to you, I used the 4017 and inverters; but you can see that A16 chooses between the upper and lower 64K banks of ROM0 and ROM1, (the EEPROMS).
- Because the EEPROMS I chose, (they are super cheap and easy to get), are 8 bits wide, they both need to be active for a 16 bit data bus; so ROM0 and ROM1 CE's are mirrored and A16 chooses which 64Kx16 bank within the 128Kx16 is enabled.

ROM Switcher.png
Hans61
Posts: 104
Joined: 29 Dec 2020, 16:15
Location: Saxonia
Contact:

Re: ROM switching:

Post by Hans61 »

Thank you very much for the detailed reply.
I was looking for a way to add an external reset to the Gigatron without having to change the hardware on the motherboard. This does not seem to be possible. The MCP100 has a push-pull output.

The goal was to be able to switch between ROM versions without having to open the Gigatron's case.

For a quick ROM test there is this project: https://forum.gigatron.io/viewtopic.php?f=4&t=112.

I built it, it's a nice toy and certainly useful in ROM development.

Thanks again for the support, the lost thread explains it.
bmwtcu
Posts: 152
Joined: 01 Nov 2018, 12:02

Re: ROM switching:

Post by bmwtcu »

Hans61 wrote: 25 Apr 2023, 15:22 The MCP100 has a push-pull output.
Not sure if you meant changing the hardware as in board layout or if component changes were also out, but could you swap the MCP100 out for a MCP131?
https://ww1.microchip.com/downloads/en/ ... 01906D.pdf
at67
Site Admin
Posts: 654
Joined: 14 May 2018, 08:29

Re: ROM switching:

Post by at67 »

Hans61 wrote: 25 Apr 2023, 15:22 I was looking for a way to add an external reset to the Gigatron without having to change the hardware on the motherboard. This does not seem to be possible. The MCP100 has a push-pull output.
It's only one trace you have to cut and then insert your circuit; even if you use the device bmwtcu pointed out, you still need to solder something to the Gigatron PCB and insert your circuit, it's a much of a muchness.
Hans61
Posts: 104
Joined: 29 Dec 2020, 16:15
Location: Saxonia
Contact:

Re: ROM switching:

Post by Hans61 »

Thanks for the hint. I didn't know the MCP131 yet. Before the Gigatron, I had nothing to do with these types of components.

Unfortunately I could only find the MCP at Mouser so far. Here on site I only found it as an SMD.

A wire would then have to be soldered on for the reset. I don't really want any changes to the mainboard to make it easier for other Gigatron users to replicate it.

With the M27C1024 I can already choose between 4 ROMs via switches. The switches can certainly be extended to the outside without any problems, they are only static signals.

I'm still waiting for a PCB with a try for an M27C160. You would have the choice between 16 ROMs for the Gigatron. I decided to switch electronically using a button with a 7-segment display. My draft can be found here:
https://github.com/hans61/gtrom16

I don't know yet if I can do without a reset. On power-up, the current ROM is activated from the EEPROM.
Post Reply