microtron

Using, learning, programming and modding the Gigatron and anything related.
Forum rules
Be nice. No drama.
steve
Posts: 40
Joined: 08 Jul 2019, 19:40

Re: microtron

Post by steve »

Lerc wrote: 16 Aug 2020, 21:05 I must say, that seems like a little bit of genius. I especially like the first comment saying it won't work. A brave choice of words to place under a photo of it working. II would expect it to maybe a little temperamental.
Infact pretty boldish, and many considerations he put out were proved wrong.

What I can say is that anyway the video signal seems suffering a bit from a "rudimental clock circuit", but in our case we have already a very very precise one to use!...

Lerc wrote: 16 Aug 2020, 21:05 One issue with a self managed video output is you potentially need some feedback for the CPU to know what's going on. When the CPU is driving the display itself it implicitly knows when vblank is etc.
On the other hand if you had it working, you wouldn't necessarily have to maintain a whole video page you could output just one or two scanlines. Have one scanline outputted repeatedly until the CPU has created the contents of the next one. Then you could do things like the current video modes only instead of having blank scanlines you would keep displaying the current line for free. If that provided enough time to generate a scanline for a tiled mode then the world opens up greatly (and if there were any leftover time after that, Sprites!).
I wasn't thinking this useful, but infact it might be good to have on some input bit the hsync and vsync to synchronize also the program!

Lerc wrote: 16 Aug 2020, 21:05 As an aside, I've been thinking about world of microcontroller VGA and was looking at running the lines of an SPI RAM out to video for a somewhat similar effect. Using Quad mode, First scanline in write mode (screen gets a copy going past), repeating scanlines in read mode with the microcontroller ignoring the data and it just turning up on screen. It might have a few command pixels visible on the left side of the screen.

Combined with this timing trick above you could just about do a decent picture with an ATTiny and SPI Ram, that would be a thing. (Off topic for gigatron, but cool nonetheless)
Didn't get fully the idea, but for the ATTiny output on VGA the demos of Brad "AtomicZombie" were really impressive and I think inspiration also for Gigatron!

In case you can discuss on the AVR freak forum https://www.avrfreaks.net/forum/impossi ... y85?page=3
steve
Posts: 40
Joined: 08 Jul 2019, 19:40

VGA schema

Post by steve »

Trying to be a bit more concrete for the VGA circuit idea I tryed to depict the circuit in kikad (have mercy please, is my first time for me drawing a circuit).
screen.jpg
screen.jpg (122.1 KiB) Viewed 4874 times
The low address counter is using the main clock (that for now runs at around VGA dot /4), and the reset should be at 200 (=800/4).
The high address counter is using the most significant bit from the low address as clock and reset should be at 525.
With the clock timing the RAM data is then read (on negative clock) into VGA output register that is connected as usual via the weighted resistors to the RGB channels.

Code: Select all

    Name          640x480p60
    Short Name       DMT0659
    Aspect Ratio         4:3
    Pixel Clock       25.175 MHz
    Horizontal Freq.  31.469 kHz
    Vertical Freq.    59.940 Hz

    Horizontal Timings
    Active Pixels        640
    Front Porch           16
    Sync Width            96
    Back Porch            48
    (Total = 800)

    Vertical Timings
    Active Lines         480
    Front Porch           10
    Sync Width             2
    Back Porch            33
    (Total = 525)
The circuit has surely a lot to be corrected (hope anyway little at least for the high address since I tryed to reuse all the part of the NES Zapper Video Synth), but I hope that at least give the idea of what I was saying before.
Attachments
VGA_kikad.zip
(4.53 KiB) Downloaded 192 times
alastair
Posts: 68
Joined: 10 Oct 2019, 14:28

Re: microtron

Post by alastair »

You probably want to look at the 161/163 synchronous counters for doing memory addressing. The 4040 ripple counters have a 35ns propagation delay per flip-flop. The clock needs to transition through 18 stages to get to the MSB in this circuit. This is around 630ns to change from the clock edge which will limit the clock to less than 1.5MHz.
steve
Posts: 40
Joined: 08 Jul 2019, 19:40

Re: microtron

Post by steve »

alastair wrote: 19 Aug 2020, 16:48 You probably want to look at the 161/163 synchronous counters for doing memory addressing. The 4040 ripple counters have a 35ns propagation delay per flip-flop. The clock needs to transition through 18 stages to get to the MSB in this circuit. This is around 630ns to change from the clock edge which will limit the clock to less than 1.5MHz.
Gulp! I didn't expect a "per flip-flop" delay! Thank you for pointing it out!

Regarding HIGH address this should not be a problem, so we might still use the 10 bits, instead for the low address we migh use the two 74HC393 counters connected. What do you think about it? (16* ones have the presettable feature we don't need and unfortunately are available just in 4 bit chips)

PS: looking at counters, I've also found some interesting ones that were having 8 bit and preload capabilities (as the 461 or 469,but also others) that might be evaluated for used for the standard X register, but not much found around. Are they discontinued?
klf
Posts: 17
Joined: 10 Jan 2019, 22:48

Re: microtron

Post by klf »

74HC393 is a ripple counter, like the 4040. Better use a 74HC163.
steve
Posts: 40
Joined: 08 Jul 2019, 19:40

Re: microtron

Post by steve »

klf wrote: 20 Aug 2020, 17:25 74HC393 is a ripple counter, like the 4040. Better use a 74HC163.
The 163 has the preset capabilities that are not used in this case but is just 4 bit, so 2 chips will be required. There is no other option for a single chip 8-bit counter fast enough (with preset capabilities or not)?
klf
Posts: 17
Joined: 10 Jan 2019, 22:48

Re: microtron

Post by klf »

Up only: 74xx461, 463, 590, 591, 592, 593
Up and down: 74xx469, 579, 869, 867

74HC(T)590 should be the most common one.
steve
Posts: 40
Joined: 08 Jul 2019, 19:40

Re: microtron

Post by steve »

klf wrote: 21 Aug 2020, 16:09 Up only: 74xx461, 463, 590, 591, 592, 593
Up and down: 74xx469, 579, 869, 867

74HC(T)590 should be the most common one.
Wonderful! So any of them can in general be used for the VGA low address!

The 74xx461 as I was mentioning before is very interesting and with the potential to replace 4 ICs of X and PC LOW with 2, but I didn't find much references and availability: are they still available or are they discontinued? (unfortunately gigatron philosophy here is a bit stringent: on one side the ICs should be '80s or before, on the other side they should be still in production!...)
alastair
Posts: 68
Joined: 10 Oct 2019, 14:28

Re: microtron

Post by alastair »

I'm not sure you're going to find any 74xx461 chips these days. You can still get hold of the 74LS469, but they tend to be expensive. The easiest approach is to "pretend" you are using one of these chips and program a GAL22V10 to look like one (found this discussed on SE below).

https://electronics.stackexchange.com/q ... cmos-16f87
steve
Posts: 40
Joined: 08 Jul 2019, 19:40

Re: microtron

Post by steve »

The 867 seems from 1982 and still in production!

Despite not reducing logic gates, replacing the four X and PC incrementers with two 867 might reduce even further chip count also in "standard gigatron" (as a "type 1" change with full hw/sw compatibility). And without external carry ripple might be even marginally faster.

The 590 instead seems to me a viable option to explore for the design of the separate VGA card.
Post Reply