Gigatron
- pgimeno
- Top Contributor
- Posts: 710
- Joined: Thu Jun 11, 2020 9:44 am
- Has thanked: 277 times
- Been thanked: 226 times
Gigatron
The Gigatron is a new 8-bit computer without a CPU chip - instead the CPU is implemented via multiple TTL logic chips. The component list indicates a total of 39 chips, including the necessary ones for VGA output, basic sound and NES controller input. There's a separate adapter for a PS/2 keyboard. The clock is 6.25 MHz.
Resolution is 160x120, one byte per pixel, hence video RAM takes 19200 bytes. Pixels are 2 bits per colour for a total of 64 colours; the top 2 bits of each video RAM byte are not used for video output. Total RAM is 32K, leaving 13568 bytes for the rest. BASIC uses about 4K of these, leaving 9K for user programs.
https://gigatron.io/
Most of the work is done by the software. There is an emulator of the TTL circuitry in C (no video output, just the raw signals) which takes two pages (126 lines) of code. The ROM source is here:
https://github.com/kervinck/gigatron-rom
A JavaScript emulator is also available:
https://gigatron.io/emu/
How cool would it be to have a core for that?
Resolution is 160x120, one byte per pixel, hence video RAM takes 19200 bytes. Pixels are 2 bits per colour for a total of 64 colours; the top 2 bits of each video RAM byte are not used for video output. Total RAM is 32K, leaving 13568 bytes for the rest. BASIC uses about 4K of these, leaving 9K for user programs.
https://gigatron.io/
Most of the work is done by the software. There is an emulator of the TTL circuitry in C (no video output, just the raw signals) which takes two pages (126 lines) of code. The ROM source is here:
https://github.com/kervinck/gigatron-rom
A JavaScript emulator is also available:
https://gigatron.io/emu/
How cool would it be to have a core for that?
Converters I've written: Floppy DIM/FDI/FDD/HDM to D88, D88 to XDF, Tape SVI 318/328 CAS to WAV
Re: Gigatron
Looks like someone already made a core for the DE10-Nano. It does not look like it is finished. Maybe someone can add the MiSTer framework and make it complete.
https://github.com/menloparkinnovation/menlo_gigatron
https://github.com/menloparkinnovation/menlo_gigatron
- pgimeno
- Top Contributor
- Posts: 710
- Joined: Thu Jun 11, 2020 9:44 am
- Has thanked: 277 times
- Been thanked: 226 times
Re: Gigatron
Oh cool! It doesn't look like it's unfinished to me, but it's definitely not made for MiSTer. The joystick is supposed to be connected to the I/O pins, so it definitely needs some work to be ported to MiSTer, at least to be able to use the USB joysticks.
Converters I've written: Floppy DIM/FDI/FDD/HDM to D88, D88 to XDF, Tape SVI 318/328 CAS to WAV
-
- Core Developer
- Posts: 35
- Joined: Sun May 24, 2020 6:50 pm
- Location: BC, Canada
- Has thanked: 4 times
- Been thanked: 17 times
- Contact:
Re: Gigatron
Made a bit of progress on video output with Alan's help. Still need to fix the timings/aspect ratio/etc a bit, then ROM loading and controls.
- pgimeno
- Top Contributor
- Posts: 710
- Joined: Thu Jun 11, 2020 9:44 am
- Has thanked: 277 times
- Been thanked: 226 times
Re: Gigatron
Great! I'm eager to see it working!
Converters I've written: Floppy DIM/FDI/FDD/HDM to D88, D88 to XDF, Tape SVI 318/328 CAS to WAV
-
- Core Developer
- Posts: 35
- Joined: Sun May 24, 2020 6:50 pm
- Location: BC, Canada
- Has thanked: 4 times
- Been thanked: 17 times
- Contact:
Re: Gigatron
Got controller input working today. Next up is keyboard and rom loading, then just a few finishing touches.
- Alkadian
- Top Contributor
- Posts: 728
- Joined: Thu May 28, 2020 9:55 am
- Has thanked: 294 times
- Been thanked: 119 times
-
- Core Developer
- Posts: 35
- Joined: Sun May 24, 2020 6:50 pm
- Location: BC, Canada
- Has thanked: 4 times
- Been thanked: 17 times
- Contact:
Re: Gigatron
Got most of (not extended keys) the keyboard working today. Don't have a lot of time to work on this these days but I'm still getting a little bit done here and there.
- Alkadian
- Top Contributor
- Posts: 728
- Joined: Thu May 28, 2020 9:55 am
- Has thanked: 294 times
- Been thanked: 119 times
- pgimeno
- Top Contributor
- Posts: 710
- Joined: Thu Jun 11, 2020 9:44 am
- Has thanked: 277 times
- Been thanked: 226 times
Re: Gigatron
Great! Is this the intended conversion?
https://github.com/kervinck/gigatron-ro ... 2.ino#L133
Do you need help?
Converters I've written: Floppy DIM/FDI/FDD/HDM to D88, D88 to XDF, Tape SVI 318/328 CAS to WAV
-
- Core Developer
- Posts: 35
- Joined: Sun May 24, 2020 6:50 pm
- Location: BC, Canada
- Has thanked: 4 times
- Been thanked: 17 times
- Contact:
Re: Gigatron
I just need time and motivation . Do you guys want a "beta" core? The games built into the ROM are playable and I'd like to give something for your continued interest and support.
- Alkadian
- Top Contributor
- Posts: 728
- Joined: Thu May 28, 2020 9:55 am
- Has thanked: 294 times
- Been thanked: 119 times
Re: Gigatron
Please do take your time! Your hard work is really much appreciated, really is. I would love to test a beta version if/when that becomes available. Thanks again and keep up the great job
-
- Core Developer
- Posts: 35
- Joined: Sun May 24, 2020 6:50 pm
- Location: BC, Canada
- Has thanked: 4 times
- Been thanked: 17 times
- Contact:
Re: Gigatron
Enjoy folks https://github.com/sajattack/Gigatron_M ... 210523.rbf
Known issues:
- keys like shift, ctrl, alt, arrow keys on the keyboard don't work
- video is slightly offset to the right
- no external rom loading (most things are baked into the internal rom anyways)
Known issues:
- keys like shift, ctrl, alt, arrow keys on the keyboard don't work
- video is slightly offset to the right
- no external rom loading (most things are baked into the internal rom anyways)
- Alkadian
- Top Contributor
- Posts: 728
- Joined: Thu May 28, 2020 9:55 am
- Has thanked: 294 times
- Been thanked: 119 times
Re: Gigatron
Awesome, thanks! I have just tried it and the system booted up correctly. Even with the video offset (to the left in my case) I have enjoyed a quick play to snakesajattack wrote: ↑Mon May 24, 2021 8:24 pm Enjoy folks https://github.com/sajattack/Gigatron_M ... 210523.rbf
Known issues:
- keys like shift, ctrl, alt, arrow keys on the keyboard don't work
- video is slightly offset to the right
- no external rom loading (most things are baked into the internal rom anyways)
- pgimeno
- Top Contributor
- Posts: 710
- Joined: Thu Jun 11, 2020 9:44 am
- Has thanked: 277 times
- Been thanked: 226 times
Re: Gigatron
Ohh so great to have a beta core to put my hands on! Thank you!
I'm finding a couple problems. Both are readily noticeable with the Mandelbrot program.
1. The speed seems to depend on the number of scanlines selected (press the SELECT button in the controller to cycle them between 75%, 50%, 25% or 100%). At 100% it's the slowest, and I like 100% so that's a problem for me. I don't have a real machine to check, but I doubt the real machine behaves like this. (Edit: see next post)
2. From time to time, apparently at random, the screen flashes with what looks like garbage. Maybe a contention issue?
I'm finding a couple problems. Both are readily noticeable with the Mandelbrot program.
1. The speed seems to depend on the number of scanlines selected (press the SELECT button in the controller to cycle them between 75%, 50%, 25% or 100%). At 100% it's the slowest, and I like 100% so that's a problem for me. I don't have a real machine to check, but I doubt the real machine behaves like this. (Edit: see next post)
2. From time to time, apparently at random, the screen flashes with what looks like garbage. Maybe a contention issue?
I have the time, kind of, and lots of motivation. I'm still doing my first steps with Verilog but after my recent success I think I can at least help somewhat.
Converters I've written: Floppy DIM/FDI/FDD/HDM to D88, D88 to XDF, Tape SVI 318/328 CAS to WAV
- pgimeno
- Top Contributor
- Posts: 710
- Joined: Thu Jun 11, 2020 9:44 am
- Has thanked: 277 times
- Been thanked: 226 times
Re: Gigatron
My bad, this seems to be happening in the emulator too, so I don't think that's actually a problem with the core.pgimeno wrote: ↑Tue May 25, 2021 1:03 am 1. The speed seems to depend on the number of scanlines selected (press the SELECT button in the controller to cycle them between 75%, 50%, 25% or 100%). At 100% it's the slowest, and I like 100% so that's a problem for me. I don't have a real machine to check, but I doubt the real machine behaves like this.
Converters I've written: Floppy DIM/FDI/FDD/HDM to D88, D88 to XDF, Tape SVI 318/328 CAS to WAV
- Moondandy
- Top Contributor
- Posts: 535
- Joined: Mon May 25, 2020 2:14 am
- Location: Edinburgh, Scotland
- Has thanked: 32 times
- Been thanked: 102 times
Re: Gigatron
Does this Gigatron have any relation to this or just a coincidence?
https://bigbookofamigahardware.com/bboa ... px?id=1070
Also, does this core have an RTC?
https://bigbookofamigahardware.com/bboa ... px?id=1070
Also, does this core have an RTC?
Re: Gigatron
Hi.pgimeno wrote: ↑Tue May 25, 2021 11:50 amMy bad, this seems to be happening in the emulator too, so I don't think that's actually a problem with the core.pgimeno wrote: ↑Tue May 25, 2021 1:03 am 1. The speed seems to depend on the number of scanlines selected (press the SELECT button in the controller to cycle them between 75%, 50%, 25% or 100%). At 100% it's the slowest, and I like 100% so that's a problem for me. I don't have a real machine to check, but I doubt the real machine behaves like this.
There is nothing wrong with the core or the emulator. A real Gigatron (I have one) behaves exactly this way.
It can be explained by knowing how the Gigatron internally works: the "real" (8 bit) CPU is doing the VGA output in software. While this is done, it can't execute the 'virtual' (16 bit) CPU instructions (eg. of the user apps). So if you don't have scanlines, it can only run the vCPU user code while hsync and vsync. With more scanlines it has much more time to execute vCPU instructions, so it gets faster with more scanlines.
So if you want to do number crunching on the Gigatron, best thing is to turn of the graphics until you have a result to show
-
- Core Developer
- Posts: 35
- Joined: Sun May 24, 2020 6:50 pm
- Location: BC, Canada
- Has thanked: 4 times
- Been thanked: 17 times
- Contact:
Re: Gigatron
I'm open to pull requests on the linked repo if you think you can get it working before I have time to get back to it myself.pgimeno wrote: ↑Tue May 25, 2021 1:03 am I have the time, kind of, and lots of motivation. I'm still doing my first steps with Verilog but after my recent success I think I can at least help somewhat.
- pgimeno
- Top Contributor
- Posts: 710
- Joined: Thu Jun 11, 2020 9:44 am
- Has thanked: 277 times
- Been thanked: 226 times
Re: Gigatron
I've found how to reproduce the graphical issues. It seems more than just that, there's actual corruption going on. It can be seen by starting the Pictures demo. The first picture appears with every 4th pixel column displaced up:
The same problem happens in the second picture, but for me at least, before it finishes scrolling in, the whole screen gets corrupt, and from that point on, nothing seems to be working until the next reset.
On a different matter, I've managed to find a direct link for the download of Quartus 17.0.2 for Linux without requiring an Intel account, and with the help of a virtual machine with no internet connection, I feel safe enough. So, I am running Quartus myself now, yay!
I'm running into an issue though. I've tried to add keyboard language support, by doing this:
And the setting does appear in the main menu, yet it can't be changed: it's stuck at US when pressing Return on the setting. Any idea how to get it to change?
The same problem happens in the second picture, but for me at least, before it finishes scrolling in, the whole screen gets corrupt, and from that point on, nothing seems to be working until the next reset.
On a different matter, I've managed to find a direct link for the download of Quartus 17.0.2 for Linux without requiring an Intel account, and with the help of a virtual machine with no internet connection, I feel safe enough. So, I am running Quartus myself now, yay!
I'm running into an issue though. I've tried to add keyboard language support, by doing this:
Code: Select all
diff --git a/Gigatron.sv b/Gigatron.sv
index 0c5cdc7..e93381e 100644
--- a/Gigatron.sv
+++ b/Gigatron.sv
@@ -188,6 +188,8 @@ localparam CONF_STR = {
"R0,Reset and close OSD;",
"J1,A,B,Select,Start;",
"jn,A,B,Select,Start;",
+ "-;",
+ "O24,Keyboard language,US,UK,DE,FR,IT,ES;",
"V,v",`BUILD_DATE
};
Converters I've written: Floppy DIM/FDI/FDD/HDM to D88, D88 to XDF, Tape SVI 318/328 CAS to WAV
-
- Core Developer
- Posts: 35
- Joined: Sun May 24, 2020 6:50 pm
- Location: BC, Canada
- Has thanked: 4 times
- Been thanked: 17 times
- Contact:
Re: Gigatron
Interesting find. I wonder why it is only on the "Pictures" option though. For your menu option, did you try left and right to switch it?
- pgimeno
- Top Contributor
- Posts: 710
- Joined: Thu Jun 11, 2020 9:44 am
- Has thanked: 277 times
- Been thanked: 226 times
Re: Gigatron
It doesn't look like the same issue of screen noise flashes that I was having, which is completely random. This one seems to be 100% reproducible and seems to fail always at the same point, which suggests some bug in the implementation of the CPU. It also appears to make the CPU freeze, while the other one doesn't: it continues normally after the flash.
Yes but it doesn't change the option, it changes the menu screen. The Aspect Ratio option a few lines above that one works fine when pressing Return. I'm puzzled.
Converters I've written: Floppy DIM/FDI/FDD/HDM to D88, D88 to XDF, Tape SVI 318/328 CAS to WAV
- pgimeno
- Top Contributor
- Posts: 710
- Joined: Thu Jun 11, 2020 9:44 am
- Has thanked: 277 times
- Been thanked: 226 times
Re: Gigatron
Solved! I just had to place it *before* the joystick entries.
Converters I've written: Floppy DIM/FDI/FDD/HDM to D88, D88 to XDF, Tape SVI 318/328 CAS to WAV
- pgimeno
- Top Contributor
- Posts: 710
- Joined: Thu Jun 11, 2020 9:44 am
- Has thanked: 277 times
- Been thanked: 226 times
Re: Gigatron
Unfortunately I can't send pull requests because I'm not on GitHub.
Attached is the full patch that can be merged with 'git am'. I've also included the compiled result.
Sorry it took this long, I've been learning some Verilog along the way.
With this update:
- Arrows work as a substitute of joystick. Button A is End and Del, Button B is Home and Ins, Start is PgUp, Select is PgDn. Following PS2.ino in which it's based, Ctrl+Alt+Del also works as Start. Holding Start for a few seconds resets the machine.
- Ctrl AltL AltR can be used to reset like in other cores, and same goes for the User button.
- Caps Lock, and the corresponding LED, works. On Reset, the Caps Lock state is reset.
- Ctrl keys are implemented to generate characters 0-31 (although 0 probably does nothing).
- Multilanguage support works like in the original Gigatron.
I've left the strategy for clearing the key intact (i.e. it's done on key release), but I've noticed that PS2.ino keeps the key active for just a few scanlines, which would allow for keyboard auto-repeat. That's a possible future improvement, when I understand enough to implement that.
Is it possible to use a different boot.rom by placing it in games/Gigatron? I'd like to try with MS BASIC which probably supports INKEY$, to check if the codes that don't generate anything in Tiny BASIC (like TAB and other control keys) work. Edit: Never mind, tried in the emulator and it has no INKEY$. Still, it would be nice to be able to switch roms via boot.rom, and even better if that could be done on the fly via a menu option.
- Attachments
-
- Gigatron-source-patch.zip
- (4.09 KiB) Downloaded 241 times
-
- Gigatron-new-kb-rbf.zip
- (1.06 MiB) Downloaded 216 times
Converters I've written: Floppy DIM/FDI/FDD/HDM to D88, D88 to XDF, Tape SVI 318/328 CAS to WAV