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.
lb3361
Posts: 360
Joined: 17 Feb 2021, 23:07

Re: my Gigatron RAM and IO expansion does not work

Post by lb3361 »

gfernval wrote: 05 May 2022, 13:02 If you succeed in formatting a 2GB SDcard that works with Gigatron IO, send me an empty dd image of such 2GB SDcard. This image compressed with .zip will be under 2Mb in size, can be attached
Well, the problem was not in the image, but most likely the result a bug in the booting code for SDSC and MMC cards (<= 2GB) as opposed to SDHC (>= 4GB). The fix is at https://github.com/lb3361/gigatron-os/t ... r/cardboot. For convenience I have rebuilt a 'dev.rom' file available at https://github.com/lb3361/gigatron-os/t ... 1/binaries.

Could you reprogram your ROM with this new image and check whether the 1GB or 2GB FAT32 formatted SD Card boots properly. This works in my emulation code but the real hardware can contain surprises. Please let me know how it goes. I would like to make a pull request to update DEVROM in the main gigatron-rom repository.

See also the TSTmem.gt1 program a couple posts above.
gfernval
Posts: 40
Joined: 24 Jan 2022, 00:39

Re: my Gigatron RAM and IO expansion does not work

Post by gfernval »

It seems it works well, I have tested my SDcards, all SanDisk branded cards do not work (botton of the photo), but all the top SDcards of the photo work well. Why do not work SanDisk branded SDcards? Maybe such cards are slow?
I have succesfully compiled from source code the files to make system.gt1, could you send me the source code to make the new dev.rom?
sdcards.jpg
sdcards.jpg (2.62 MiB) Viewed 956 times
lb3361
Posts: 360
Joined: 17 Feb 2021, 23:07

Re: my Gigatron RAM and IO expansion does not work

Post by lb3361 »

This dev.rom comes from my experimental branch https://github.com/lb3361/gigatron-rom/tree/exp which sometimes moves quickly. But the important change is replacing Apps/CardBoot/CardBoot.gcl by the version found in https://github.com/lb3361/gigatron-os/t ... r/cardboot.

Still a lot of SD cards that do not boot! Maybe you can try to boot from one of the working ones, then, without leaving the browser, remove the card and replace it by a SanDisk one. The browser should detect the card change and mount the new card. This is the C code, not the boot code. If this works, then I can check where these codes differ...
gfernval
Posts: 40
Joined: 24 Jan 2022, 00:39

Re: my Gigatron RAM and IO expansion does not work

Post by gfernval »

I have compiled succesfully dev.rom after changing the makefile from

dev.rom: Core/* Apps/*/* Makefile interface.json
python3 Core/dev.asm.py\
.
.
Boot=Apps/CardBoot/CardBoot.gt1\
.
.

to

dev.rom: Core/* Apps/*/* Makefile interface.json
python3 Core/dev.asm.py\
.
.
Boot=Apps/CardBoot/CardBoot.gcl\
.
.

to force the compilation of cardboot.gcl because an old version of cardboot.gt1 exists in such directory

Will try more later the exchanging of the cards, thanks.
lb3361
Posts: 360
Joined: 17 Feb 2021, 23:07

Re: my Gigatron RAM and IO expansion does not work

Post by lb3361 »

The Apps/CardBoot directory should contain a makefile that can compile CardBoot.gt1 from CardBoot.gcl. Including the gt1 into the ROM is better than including the gcl because compiling them in the same run pollutes the name space. Clashes can occur.

Besides trying to swap the cards after booting, I could use some info about the error messages while booting. They seem very terse but they tell me a lot about where the code fails. I ordered a large SD card (256GB) to see how it fare when formatted with FAT32. I do not have smaller ones. They don't make them anymore..
gfernval
Posts: 40
Joined: 24 Jan 2022, 00:39

Re: my Gigatron RAM and IO expansion does not work

Post by gfernval »

screen1.jpg
screen1.jpg (4.17 MiB) Viewed 905 times
I have done the tests, boot with a working SDcard, exchange the SDcard and press ENTER to mount card in slot 0 (Gigatron does not automatically mount the SDcard), then shows the error SD0: Mount failed. If I put a Sandisk SDcard in the Gigatron and power on the Gigatron, the screen shows the first photo (with the SD0 led permanently on), and after 6-7 seconds shows the secound photo with the error SD0: Mount failed (now the SD0 led is off, this can be seen in the photos). I have done the tests with 128Mb, 2Gb and 8Gb Sandisk SDcards, all the SDcards formatted with FAT32 with 512 bytes/sector, all failed, but using others brand of SDcards the tests all went fine.
Beware because I also tested the 8Gb Sandisk SDcard with the system.gt1/dev.rom that does not have the patch for SDcards < 4Gb and also failed, it seems to me that Sandisk SDcards have something weird with the Gigatron interface (maybe timings with the SPI protocol?) Try to use a Sandisk brand SDcard and see if it works to you or not.

Your program for memory test works very well, thanks. One question: do not understand "Including the gt1 into the ROM is better than including the gcl because compiling them in the same run pollutes the name space. Clashes can occur." This what means: the compilation of the dev.rom can fail or if compiled successfully and burned to a 27C1024 EPROM such ROM can fail in the Gigatron?
screen2.jpg
screen2.jpg (4.85 MiB) Viewed 905 times
lb3361
Posts: 360
Joined: 17 Feb 2021, 23:07

Re: my Gigatron RAM and IO expansion does not work

Post by lb3361 »

When you compile a gcl file in the context of the main makefile, the compilation takes place in the main python process and the symbols defined by the gcl file can clash with those defined in the main rom file. If this happens, you might get incorrect branches, etc.

I just got a SanDisk card (a large one) and it behaves very strangely indeed. This is annoying...
lb3361
Posts: 360
Joined: 17 Feb 2021, 23:07

Re: my Gigatron RAM and IO expansion does not work

Post by lb3361 »

New version of 'system.gt1' that works with my 256GB SanDisk card. As usual, source at https://github.com/lb3361/gigatron-os/tree/master/sys1

Just adding some calls to "wait_ready()" (sending FFs until receving FFs) after sending certain commands...
Attachments
system.gt1
(24 KiB) Downloaded 63 times
gfernval
Posts: 40
Joined: 24 Jan 2022, 00:39

Re: my Gigatron RAM and IO expansion does not work

Post by gfernval »

Very good, all my Sandisk SDcards work well now! You were right in saying "Including the gt1 into the ROM is better than including the gcl", because if include the gcl instead the gt1 a blank screen appears when trying to boot from a SDcard. Also modified my makefile to generate sdcard.rom bios file by including the gt1 compiled file instead the gcl file.
lb3361
Posts: 360
Joined: 17 Feb 2021, 23:07

Re: my Gigatron RAM and IO expansion does not work

Post by lb3361 »

Good news.

I am curious. What are the black and red wires that plug into your Gigatron?
Post Reply