Video Repeater

Using, learning, programming and modding the Gigatron and anything related.
Forum rules
Be nice. No drama.
lb3361
Posts: 360
Joined: 17 Feb 2021, 23:07

Re: Video Repeater

Post by lb3361 »

Seems we need to invent a CTRL instruction scheme that provides for a substantial number of GPIOs. I believe that the scheme should not demand a different ROM for the ordinary operation of the ram and i/o expansion. It would be very inconvenient to have to use different ROMs for different expansion boards.

In the original design, bits 2 to 5 are four SPI select bits. In the GAL design, bits 2 and 3 are two SPI select bits, bit 4 indicates the SPI clock polarity, and bit 5 controls the zero page banking feature. Although bits 4 and 5 have a different meaning, setting them to 1 is the safe and compatible choice. Note that it is possible, to some extent, to change how the gal-based board operates by simply programming the GALs differently.

Since these additional GPIOs can be used as additional SPI select lines, I believe our best shot is to hijack bits 2 to 5. We should however make sure that the program that use a SD card on SPI0 (e.g. CardBoot) can control /SS0 by using bit 2. Note that Bit 3 and 4 are always 1 when they do so. I would also avoid touching bit 5 because the gal-based board stores in GAL1 while all other three bits 2, 3, 4, are managed by GAL2. And finally we would like to cleanly reset the board state (including the GPIOs) when bits 2 to 4 are all set to 1 because this is how the Gigatron initializes the board on reset.

Here is attempt.

Code: Select all

Bits 4 3 2
     1 1 1   --> /ss0 deactivated. All GPIOS reset to default state1
     0 1 1   --> /ss0 deactivated. GPIOs are not changed
     1 1 0   --> /ss0 activated. putting back bit 2 to 1 will reset all the GPIOs.
     0 1 0   --> /ss0 activated. putting back bit 2 to 1 will not change the GPIOs
     p 0 1   --> not sure. /SS1 on the gal based board?
     p 0 0   --> control word that the GPIOs
                     -  p is the SPI clock polarity   (in case we need to implement different SPI modes)
                     -  High byte controls the GPIOs.  For instance ggggpppp where pppp 
                        is a page number and gggg sets four GPIOs in page pppp.
Update: This is way too complicated
lb3361
Posts: 360
Joined: 17 Feb 2021, 23:07

Re: Video Repeater

Post by lb3361 »

I thought about it overnight and believe that a simpler convention can be useful.

Here is a proposed convention: When bits 2 and 3 of the control argument are all zero, the remaining bits have a completely different interpretation, and this control code should not be stored into $1F8.
  • These two bits corresponds to /SS0 and /SS1 which should never be zero together in the first place. Giving a different interpretation to such codes is not only compatible but also safer.
  • One needs to change of SYS_ExpanderControl because we do not want to store such ctrl arguments in $1f8. Note that SYS_ExpanderControl always clears bits 0 and 1, which means that the special codes can use bits 4..15 as they please.
    [*} We can reprogram the GALs of the gal-based expansion board to ignore such control arguments and do nothing when something like this happen. I would do it by simply muting the CTRLCLK signal when A2-A3 are both zero. Therefore trying to do GPIO things without the GPIO hardware would not cause harm.
  • This does not tell anything about how to reset the GPIOs when the Gigatron resets. This is entirely the responsibility of the GPIO hardware, which can use the fact that it is know that the Gigatron starts with a CTRL(0x007c). There might be better ways to signal the reset, though.

My proposal would be to preemptively change the ROM and --to the extent possible-- the existing hardware designs, in order to make space for such additional hardware projects. But we need clarity first.
Hans61
Posts: 102
Joined: 29 Dec 2020, 16:15
Location: Saxonia
Contact:

Re: Video Repeater

Post by Hans61 »

This sounds like a good idea. If it would be possible to interpret 4 of the 12 available bits as address and 8 as output data and maybe select different 74HCT244N for the input, then we would have more than enough I/O ports. But this was just a spontaneous thought.
lb3361
Posts: 360
Joined: 17 Feb 2021, 23:07

Re: Video Repeater

Post by lb3361 »

Moving the ctrl discussion to a new forum topic
https://forum.gigatron.io/viewtopic.php?f=4&t=331
llevet
Posts: 2
Joined: 03 Jul 2022, 04:17

Re: Video Repeater

Post by llevet »

Hi axelb,
Have you a Gerber files for the card, i don't see it on your Github.
Thanks!
axelb
Posts: 41
Joined: 07 Jan 2021, 06:27

Re: Video Repeater

Post by axelb »

The original board was manufactured by https://www.eurocircuits.com/ directly from the repeater.kikad_pcb file ( they have an import filter ). I added my own gerbers to the repository now but they are untested.
You can use Hans61 version https://forum.gigatron.io/viewtopic.php?p=2309#p2309. The board works exactly as my original and has a better shape so that it can be used together with the Gigatron RAM & IO Expansion https://forum.gigatron.io/viewtopic.php?p=2139#p2139 !
Post Reply