my Gigatron RAM and IO expansion does not work

Using, learning, programming and modding the Gigatron and anything related.
Forum rules
Be nice. No drama.
gfernval
Posts: 40
Joined: 24 Jan 2022, 00:39

my Gigatron RAM and IO expansion does not work

Post by gfernval »

Hello:

Sent the gerber (https://github.com/lb3361/gigatron-lb/b ... PCB-v7.zip) to https://jlcpcb.com/ for manufacture, got the board, built it, programmed GALs ATF22V10C with https://github.com/lb3361/gigatron-lb/b ... AL1_v7.jed and https://github.com/lb3361/gigatron-lb/b ... AL2_v7.jed and when plugged in the RAM socket of the Gigatron board (attaching also the small wire of IO expansio board to A15 signal of Gigatron board) -Gigatron board has v5a ROM- and turned on the Gigatron, the Gigatron only shows 32K of RAM, not 128K. How to access the SDcard? pressing CTRL-F1? I have attached a SDcard shield with a mini SDCARD, such
SDcard cointaining only https://github.com/lb3361/gigatron-os/b ... system.gt1 and invader.gt1 game, does not detect the SDcard and the SPIO led does not blink. It is necessary to do a patch in the standard Gigatron board in order to the Gigatron RAM and IO expansion (depicted in https://github.com/lb3361/gigatron-lb/t ... sion-retro) to work?

thanks
gfernval
Posts: 40
Joined: 24 Jan 2022, 00:39

Re: my Gigatron RAM and IO expansion does not work

Post by gfernval »

Attached photo of the two gigatron IO boards I have built:
gigatronio.jpg
gigatronio.jpg (4.33 MiB) Viewed 444 times
lb3361
Posts: 188
Joined: 17 Feb 2021, 23:07

Re: my Gigatron RAM and IO expansion does not work

Post by lb3361 »

If the Gigatron shows only 32KB, then the card or its RAM was not recognized for some reason. This is unusual. All my cards worked immediately. The interesting thing is that the Gigatron still seems to run. The fact that it can access the RAM proves that a good part of the board is working.

There is no need to patch the main MB other than capturing the A15 signal. The SD boot requires de dev rom.

Here are some ideas to debug. Please let me know how it goes...
  1. With the card installed, run the Apple1 emulator and type 1F8 [enter] to see the contents of address 1f8.
    • If the result is 00, then this means that the card is totally ignored. That would mean that something is very wrong with the GAL programming. Did you use 10ns GALs? Can you use the "verify" mode of the programmer to check that they're correct?
    • If the result is 7C, then it means that the card is recognized but not the RAM. In that case, the first thing to do is to check the A15 connection. The A15 signal should arrive on pin13 of GAL2 (the bottom one) and also on the 13 pins extension header (H3). Also on pin 7 of U32 on the motherboard.
  2. Another thing that is easy to test. After a cold boot, pins 21 and 20 of GAL2 should respectively be at logical 1 and 0.
To access the SD Card, you first need the card to be recognized! You also need the dev rom because it contains an updated booting code. When you reset the Gigatron with a SD card inserted, it should boot file SYSTEM.GT1 from the SD card. You can find suitable SYSTEM.GT1 and DEV.ROM at https://github.com/lb3361/gigatron-os/t ... 1/binaries. I just refreshed them to the latest version to make sure. After booting, SYSTEM.GT1 starts the browser that allows you to navigate the SD card and execute any GT1 file therein. Note that you need a FAT32 filesystem on the SD Card. Cards beween 4GB and 32GB come with one by default. See more doc at https://github.com/lb3361/gigatron-os/tree/master/sys1

Update: please use the dev.rom because the original v5a rom is rumoured to have a memory detection bug. This may be the reason.

Also, you built two cards and both fail in the same way?
Last edited by lb3361 on 03 May 2022, 00:42, edited 2 times in total.
lb3361
Posts: 188
Joined: 17 Feb 2021, 23:07

Re: my Gigatron RAM and IO expansion does not work

Post by lb3361 »

Another debugging tool is to turn the expansion board into a simple 64k expansion. For this you just need to remove the two GALs and replace them by jumpers according to the attached diagrams. This disables most of the board and merely wire the SRAM like a 64K expansion. Then the Gigatron should display "Gigatron 64K". If it displays "Gigatron 32K", then either the A15 line is broken, or the SRAM is broken...
Attachments
gal2_ss.png
gal2_ss.png (198.83 KiB) Viewed 400 times
gal1_ss.png
gal1_ss.png (208.13 KiB) Viewed 400 times
gfernval
Posts: 40
Joined: 24 Jan 2022, 00:39

Re: my Gigatron RAM and IO expansion does not work

Post by gfernval »

My findings: (my Gigatron board always shows 32K instead 128K, used the latest DEV.ROM)

My board has a 55ns 128K static RAM (checked good with a tester) and 2 ATF22V10C 7ns GALs (also checked with 15ns GALs), I have programmed the .jed files with both a TL866II and Labtool 48 programmer (without any kind of errors) with same results in the 2 boards I have.

- The contents of 1F8 is 7C, A15 signal is good in both the IO board (GAL2) and Gigatron Board (pin 7 of U32)
- After a cold boot pins 21 and 20 of the GAL 2 are at logical 0 and 0 respectively (instead 1 and 0)
- Removed GAL2 only, and in one powerup of the Gigatron board memory was 64K instead 32k (due noise in the socket with GAL2 removed?)

I used the latest gerber (v7b) file. Does this file has errors? swapped A8 and A9?

Does the GAL2 needs a pullup resistor in pins 20 and 21 of GAL2?
Are there race conditions in the GALs?
gfernval
Posts: 40
Joined: 24 Jan 2022, 00:39

Re: my Gigatron RAM and IO expansion does not work

Post by gfernval »

I have removed the GALs and put jumpers, shows 128K, when I put the GALs shows 32K. My problem lies in the GALs, does
the v7b board needs a different programming of GALs 1 and 2? Could you read the GALs 1 and 2 with TL866II programmer
and send the the .jed files?

thanks
boardjumpers.jpg
boardjumpers.jpg (4.78 MiB) Viewed 361 times
bmwtcu
Posts: 122
Joined: 01 Nov 2018, 12:02

Re: my Gigatron RAM and IO expansion does not work

Post by bmwtcu »

Any chance you might have a spare GAL to reprogram GAL2 to rule out a bad part? (Not sure if you used the same GAL2 part to test both boards.) Did you already verify soldering on pin 21 of GAL2 and pin 17 of U4? If you do a continuity test with no power applied, is pin 21 shorted to GND? Can your PROM programmer test the 244 part?
lb3361
Posts: 188
Joined: 17 Feb 2021, 23:07

Re: my Gigatron RAM and IO expansion does not work

Post by lb3361 »

gfernval wrote: 03 May 2022, 22:43 - The contents of 1F8 is 7C, A15 signal is good in both the IO board (GAL2) and Gigatron Board (pin 7 of U32)
This means that the rom detects that presence of the ctrl() instruction. Note that 7C means that bank 1 is selected.
Therefore B1 and B0 should be 1 and 0, but....
gfernval wrote: 03 May 2022, 22:43 - After a cold boot pins 21 and 20 of the GAL 2 are at logical 0 and 0 respectively (instead 1 and 0)
which indeed spells bad news about the GALs...

Update (May 3rd, late)

I investigated what could cause B[1..0] to remain 00 despite the ctrl instruction. To my dismay I found out that I introduced a bug two months ago into the GAL1 pld/jed file. Please try the corrected JED file from https://github.com/lb3361/gigatron-lb/t ... retro/cupl. Only GAL1 needs to be reprogrammed. I pretty confident this will solve the problem. Apologies.
Last edited by lb3361 on 04 May 2022, 12:29, edited 1 time in total.
gfernval
Posts: 40
Joined: 24 Jan 2022, 00:39

Re: my Gigatron RAM and IO expansion does not work

Post by gfernval »

Problem solved! Now after a cold boot pins 21 and 20 of the GAL 2 are at logical 1 and 0 respectively and Gigatron shows 128K
I had a tough time trying to get the SDcard work: only work SDcards of 4GB (or more? -don´t have 8GB SDcards-) I have 2GB SDcards and formatting in FAT32 such SDcards in 512 bytes/sector, 4K bytes/sector,.. (using guiformat.exe utility or using Windows Explorer) gives the following error:

*** CardBoot
Card Type 02
MBR 0B OK
Vol.ID 0000 FAILED
SYSTEM.GT1 not found!

If I use an SDcard of 4GB it works well, can navigate and lauch programs without problem.
What modifications should be done in the source code to work with 2GB SDcards? I have tested 128Mb and 2GB SDcards in the Pluggy Reloaded
board and work fine.

Unrelated questions:

- does exist a .gt1 program for checking the 128K of the Gigatron RAM?
- have built succesfully a pluggy reloaded, have tested it with ROM V5a (no ROM version sketch loaded in Arduino SparkFun Pro micro) and
SDCARD.ROM bios (ROM version sketch loaded in Arduino SperkFun micro), the visible difference is that the ROM version has an SDcard menu
instead having to press CTRL-F1 in pluggy reloaded no ROM version. Are there other differences?
- how to use the file https://github.com/kervinck/gigatron-ro ... endFile.py in a real Gigatron to transfer files between the
Gigatron and a PC? Using the pluggy reloaded board and connecting an USB cable to the Arduino Sparkfun Pro micro and the USB port of a PC?
(this creates a virtual serial port in the PC)

thanks
lb3361
Posts: 188
Joined: 17 Feb 2021, 23:07

Re: my Gigatron RAM and IO expansion does not work

Post by lb3361 »

Glad to read that the problem is solved.

SD cards from 4GB to 32GB come formatted with FAT32. Smaller cards are often formatted with FAT16, larger cards with ExFAT. You can reformat these cards with FAT32 but you have to be aware that Windows Explorer will not create FAT32 partitions with non-standard sizes). Sector size should always be 512 bytes. See "Operation" in https://github.com/lb3361/gigatron-os/tree/master/sys1 for hints.

System.gt1 would in fact work fine with FAT16 filesystems. However Marcel's very compact boot code only supports FAT32. The Pluggy Reloaded is less fussy because there the Arduino has good SD card support. The Pro Micro microprocessor does the work.

How to check the presence of the 128K RAM? The Reset program makes this easy because it sets location $1f8 to a non zero value when there is an expansion card. Expansion cards are usually 128k although they could theoretically come in 32k and 64k variants. There is also a 512k variant. To differentiate them, one needs to use SYS_ExpanderControl to change bank and see what works. In fact the Reset program does this as well in order to display the available memory size in the banner. See https://github.com/lb3361/gigatron-lb/t ... s/reset512 for a version of Reset that can be compiled standalone and detects all known cards.

I cannot tell you about sendFile.py. I simply do not remember. These days I always use a SD card...
Post Reply