Gigatron

User avatar
pgimeno
Top Contributor
Posts: 675
Joined: Thu Jun 11, 2020 9:44 am
Has thanked: 253 times
Been thanked: 208 times

Re: Gigatron

Unread post by pgimeno »

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:

20210530_181518-screen.png
20210530_181518-screen.png (16.5 KiB) Viewed 5597 times
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! :lol:

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 
 };
 
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?
sajattack
Core Developer
Posts: 35
Joined: Sun May 24, 2020 6:50 pm
Location: BC, Canada
Has thanked: 3 times
Been thanked: 17 times
Contact:

Re: Gigatron

Unread post by sajattack »

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?
User avatar
pgimeno
Top Contributor
Posts: 675
Joined: Thu Jun 11, 2020 9:44 am
Has thanked: 253 times
Been thanked: 208 times

Re: Gigatron

Unread post by pgimeno »

sajattack wrote: Mon May 31, 2021 3:04 pm Interesting find. I wonder why it is only on the "Pictures" option though.
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.

sajattack wrote: Mon May 31, 2021 3:04 pm For your menu option, did you try left and right to switch it?
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.
User avatar
pgimeno
Top Contributor
Posts: 675
Joined: Thu Jun 11, 2020 9:44 am
Has thanked: 253 times
Been thanked: 208 times

Re: Gigatron

Unread post by pgimeno »

pgimeno wrote: Tue Jun 01, 2021 1:44 am 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.
Solved! I just had to place it *before* the joystick entries.
User avatar
pgimeno
Top Contributor
Posts: 675
Joined: Thu Jun 11, 2020 9:44 am
Has thanked: 253 times
Been thanked: 208 times

Re: Gigatron

Unread post by pgimeno »

sajattack wrote: Wed May 26, 2021 5:04 am 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.
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 173 times
Gigatron-new-kb-rbf.zip
(1.06 MiB) Downloaded 177 times
sajattack
Core Developer
Posts: 35
Joined: Sun May 24, 2020 6:50 pm
Location: BC, Canada
Has thanked: 3 times
Been thanked: 17 times
Contact:

Re: Gigatron

Unread post by sajattack »

Thanks for the patch. One question, why did you change the clock for the keyboard from famicom_pulse to clk_app? For F12, I think ao486 uses win+f12 or ctrl+f12 or something. Maybe worth looking into. In terms of the rom loading, that's next, I want to do gt1 loading for external programs, but I can do the full rom too.
User avatar
pgimeno
Top Contributor
Posts: 675
Joined: Thu Jun 11, 2020 9:44 am
Has thanked: 253 times
Been thanked: 208 times

Re: Gigatron

Unread post by pgimeno »

I changed the clock because famicom_pulse is inactive during reset, meaning the keyboard is not polled, and when pressing Ctrl + AltL + AltR to reset, unless you held them for a while, the key release event was missed, resulting in all three keys getting stuck and the keyboard not functioning until you pressed and released each of them again.

clk_app was the slowest clock I found that was always generated without exceptions. I could have divided it further but I thought it was good enough.

Given that there isn't any app using any function keys in the first place, I didn't care much about F12. I'll put it in the low-priority list together with key auto-repeat.

Thanks for looking into the ROM loading.
Post Reply