Crude single-step with more blinkenlights

Using, learning, programming and modding the Gigatron and anything related.
Forum rules
Be nice. No drama.
Post Reply
BobWalance
Posts: 4
Joined: 20 Oct 2019, 23:06

Crude single-step with more blinkenlights

Post by BobWalance »

Hello,

I've had my Gigatron for a few weeks and I have added the ability to single-step the ROM address by using an external clock. Also, there is a display of the output of the ROM as follows:

Data (D)- 8 bits- msb on the left - these will become D7:0 and BUS7:0
Instruction (IR) - these will become IR7:0
….red leds: IR7:5 (msb on top) - INSTRUCTION
….green leds: IR4:2 (msb on top) - MODE
….yellow leds: IR1:0 (msb on top) - BUS ACCESS

I still would like to have the ability to single-step while maintaining the VGA output. Previous discussions have taught me that this would be very hard without code modification.

Here's a quick video of what I have now:
https://drive.google.com/open?id=1kNNg_ ... GF_0NAwnBP

Bob
at67
Site Admin
Posts: 647
Joined: 14 May 2018, 08:29

Re: Crude single-step with more blinkenlights

Post by at67 »

That's cool; it's one thing single stepping an emulation in software and assuming/hoping that's how the hardware works exactly, but all together a different thing seeing the physical beast single step.

The Gigatron is a great architecture for study, learning and modification; I'll be watching to see where you take your experimentation from here :)
User avatar
marcelk
Posts: 488
Joined: 13 May 2018, 08:26

Re: Crude single-step with more blinkenlights

Post by marcelk »

Looks very cool, thanks for sharing. [It reminds me that the 3-bit "instruction field" is really a misnomer for "operation field". But then, following that logic, "opcode" is also a misnomer for "inscode"(?), so I think we just stick with it.]

I was just reading the iWoz book and came across chapter 10 ("My Big Idea") where Wozniak notes that once his computer got a video terminal, it eliminated the need for a front panel (and he suggests he didn't miss it). I never realised it, but historically, you typically see computers either have front panels, or video terminals. Our Gigatron uses technology from the former generation but acts like the latter, so it's caught in the middle in that regard. BTW, at some point DEC even removed the PDP-11 front panels with an upgrade.

Still, you can find in the Apple 1 manual (on page 12) a nice extension for an LED address display and a single stepping circuit... Those two go hand in hand, as LEDs on a fast system are a bit boring to look at. Spencer Owen told me he tried that on his RC2014 and he didn't like the result. Still I hope we can achieve something like the Apple 1 extension on a Gigatron. Xopr's Arduino-based Gigatron tester is going in the same direction.

On a similar topic, I've convinced myself that the cleanest way for single-stepping vCPU while preserving video is simply by emulating vCPU completely in vCPU itself. Otherwise, it's quite a task to interrupt vCPU between every instruction, especially in the presence of SYS instructions. Single stepping the native instruction set while preserving video needs emulation as well, but pgavlin already demonstrated that with his C compiler.

What you can nicely see at the end of your video is that once we enter the video generation loop, the OR operation ("010") dominates. That is the instruction used in the pixel burst.

BTW: I took the opportunity to brush up our earlier startup documentation and place it in GitHub as
Docs/Startup-sequence.txt, so you can read up on what is happening.
BobWalance
Posts: 4
Joined: 20 Oct 2019, 23:06

Re: Crude single-step with more blinkenlights

Post by BobWalance »

marcelk wrote: 09 Nov 2019, 13:59 Looks very cool, thanks for sharing. [It reminds me that the 3-bit "instruction field" is really a misnomer for "operation field". But then, following that logic, "opcode" is also a misnomer for "inscode"(?), so I think we just stick with it.]

(SNIP)

What you can nicely see at the end of your video is that once we enter the video generation loop, the OR operation ("010") dominates. That is the instruction used in the pixel burst.
I added leds for the VGA sync and did another video. Green is horizontal and red is vertical.

The first part of the video focuses on horizontal sync and by chance I caught it doing vertical sync, too. I didn't realize this and cut it off too soon. I would have had to wait 42 years for that to happen again. Dang.

https://drive.google.com/open?id=1HD9VZ ... BZvvazR52d

Bob
User avatar
marcelk
Posts: 488
Joined: 13 May 2018, 08:26

Re: Crude single-step with more blinkenlights

Post by marcelk »

Here's an idea: I believe a simple frame grabber can be constructed that fixes the issue of losing video when lowering the clock rate (or stopping it).

All required signals are on the OUT chip already: 8 data bits and the clock. In essence such an adapter needs 128K of RAM and two address counters of 17 bits each. One counts the input position within the frame and is clocked by OUT. The OUT /vSync signal resets it. The memory stores the 8 data bits from the OUT register.

The second counter counts the read address and is clocked by a fixed clock at 6.25 MHz. It gets reset by the /vSync coming out of RAM. Buffer RAM access is interleaved at a fixed rate of 12.5 MHz: WRWRWR…, with the two counters alternating as address source. The buffer RAM output is fed through a color mixer and into the display. You would place one register in-between that keeps the pixel value steady (just like the OUT register does now). Either use the original color mixer on the Gigatron, or duplicate it on the adapter.

The logic can be constructed from TTL (10x 74'163, 5x 74'157, one 74'377 and a few logic gates?). You have to do something special with the reset signals (only trigger on the edge, not on the level). Otherwise it also looks certainly doable with an STM32 or a small FPGA.

I have more than enough projects ongoing. Any takers?
Post Reply