Gigatron 128k emulator online.

Using, learning, programming and modding the Gigatron and anything related.
Forum rules
Be nice. No drama.
lb3361
Posts: 367
Joined: 17 Feb 2021, 23:07

Gigatron 128k emulator online.

Post by lb3361 »

The purpose of http://www.gigatron128k.com is shamelessly show that the Gigatron 128k is a sweet machine.

Emulation

The site runs a variant of Phil Thomas' excellent JavaScript Gigatron emulator with added code to simulate a 128k RAM&IO expansion board and a SD card connected to the first SPI port. The rom contains the 128k hack that allows it to run big programs such as MSCP (see https://forum.gigatron.io/viewtopic.php?p=3617#p3617).

The menu entry "SpiCard" can be used to browse the SD card and select a program. The preloaded SD card contains a copy of the Apps repository (with MSCP) and recent copy of the GT1 repository. You can also mount your own FAT formatted disk image as you see fit. Everything runs inside your browser. Nothing goes back to the web site. Loading from the SPI card is about 8 times faster than using the Loader protocol.

To return to the main menu at any time, press the button "Start" for about three seconds.

gig128k.png
gig128k.png (821.38 KiB) Viewed 995 times

How to make a Gigatron 128k?

You first need a normal Gigatron. The easiest way is then to build the "dual drive" version of Hans61's expansion board. This recreation of Marcel's original design only uses simple components and is therefore easy to build (far easier than the boards I designed in the past!).
  • PCB: Gerber file at https://github.com/hans61/Gigatron-TTL/ ... -dualdrive
  • RAM: 1 x AS6C1008. (128KB x 8 ram, DIP32, in production) with a socket.
  • Chips: 1 x 74HCT00, 1 x 74HCT32, 1 x 74HCT125, 1 x 74HCT273. Alternatively 74LSxxx instead of 74HCTxxx.
  • Discrete components: 5 x 100nF capacitors, 2 x 3.3k resistor, 2 x 10k resistors, 2 small leds.
  • Connectors: 2 x 14 pin vert header (e.g. Preci-Dip 350-80-114-00)
  • SPI connectors: 2 x 6 pin horizontal socket (e.g. Sullins PPPC061LGBN)
  • One wire to connect A15 on the Gigatron to the board.
  • One or two SPI SD card 5.5v breakouts
Hans61's expansion board below:
giga-dd.jpg
giga-dd.jpg (173.73 KiB) Viewed 995 times

Sources

The code for the emulator is at https://github.com/lb3361/gigatron-rom/ ... tils/runjs. The SPI and SD emulation code is a port of the C++ code I wrote for gtemuAT67 a couple years ago, a pretty tricky state machine. The code for the ROM is at https://github.com/lb3361/gigatron-rom/tree/master, all under usual open-source licenses.
petersieg
Posts: 110
Joined: 28 Jun 2023, 09:06

Re: Gigatron 128k emulator online.

Post by petersieg »

Thanks a lot for this updated online emulator!
Great work done.

All the best for 2024!

Best, Peter
petersieg
Posts: 110
Joined: 28 Jun 2023, 09:06

Re: Gigatron 128k emulator online.

Post by petersieg »

To whom it my concern.

This online emulator also works under Mac OSX 10.7 Lion with Firefox 68.12.0p3
See picture.

Thx, Peter
Attachments
10.7-Gigatron.png
10.7-Gigatron.png (2.31 MiB) Viewed 926 times
petersieg
Posts: 110
Joined: 28 Jun 2023, 09:06

Re: Gigatron 128k emulator online.

Post by petersieg »

Hmm. I thought, that when I call the complete url inside a local copy of runjs of file main.js:
const romUrl = 'http://www.gigatron128k.com/gigatron.rom';

That it would work - but it doesn't? If I call the url in any browser, gigatron.rom is downloaded, so the file is there.

On my old 10.13 iMac with homebrew, to install node.js is almost impossible because of that many dependencies and the amount of errors I get within this old environment, by trying to solve all dependencies. :-(

I know, that there are also possibilities, to have a file/rom loaded locally..?

Thx, Peter
petersieg
Posts: 110
Joined: 28 Jun 2023, 09:06

Re: Gigatron 128k emulator online.

Post by petersieg »

ok. found the following solution.
Download runjs directory.
Download gigatron.rom and place it also in src directory under runjs.
CD into src directory.
Issue the following python3 command to start a simple http server:
ichs-iMac:src ich$ python3 -m http.server --cgi 8080
Serving HTTP on :: port 8080 (http://[::]:8080/) ...

Start firefox with url:localhost:8080
This starts index.html

Now it runs locally.. verified to work here.

Thx, Peter
Last edited by petersieg on 08 Jan 2024, 17:19, edited 1 time in total.
lb3361
Posts: 367
Joined: 17 Feb 2021, 23:07

Re: Gigatron 128k emulator online.

Post by lb3361 »

You might have to ask for ‘gigatron.rom.gz’ and ‘sd.vhd.gz’ because the web server is configured to use precompressed files if available. Or just go to the source (see initial post) https://github.com/lb3361/gigatron-rom/ ... tils/runjs

As for note, doing brew install ‘node’ and ‘http-server’ should be sufficient.
petersieg
Posts: 110
Joined: 28 Jun 2023, 09:06

Re: Gigatron 128k emulator online.

Post by petersieg »

As I said, 10.13 is too old - lot of errors trying to solve dependencies.
But it works now as stated above. And python3 is already required by glcc and compilegcl.py ;-)

Peter
lb3361
Posts: 367
Joined: 17 Feb 2021, 23:07

Re: Gigatron 128k emulator online.

Post by lb3361 »

I tried the python solution. In fact you have convinced me that I should change the repository to use python when you write "make runjs".
However the online version benefits a lot from compression the binary files (gigatron.rom and sd.vhd), so it will have to be different.
lb3361
Posts: 367
Joined: 17 Feb 2021, 23:07

Re: Gigatron 128k emulator online.

Post by lb3361 »

I changed to python's http server.
In fact I wrote a subclass in file 'http-server.py' that disables the caches and serves pre-compressed files when available.
See https://github.com/lb3361/gigatron-rom/ ... tils/runjs

From the gigatron rom directory, you can type :

Code: Select all

make runjs DEV=dev128k7.rom
petersieg
Posts: 110
Joined: 28 Jun 2023, 09:06

Re: Gigatron 128k emulator online.

Post by petersieg »

:)

One can also just download runjs, place a gigatron.rom inside html directory.
Start ./http-server.py
Start browser with url: localhost:8000

(Your solution does not work under python 3.6 (import http gives error) and old Mac OS Lion - so I stick with my solution for my local copy)

Thx, Peter
Post Reply