Page 2 of 2

Re: Gigatron 128k emulator online.

Posted: 11 Jan 2024, 00:51
by lb3361
petersieg wrote: 09 Jan 2024, 12:46 (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)
It seems indeed that support for the directory argument (-d_ was added to http.server in version 3.7. Sigh.

Re: Gigatron 128k emulator online.

Posted: 26 Jan 2025, 16:42
by lb3361
Some improvements to http://www.gigatron128k.com
  • The single file box is not only useful to load GT1 files. It can load ROM files and VHD images for emulated SPI SDcards.
  • There are controls to mount and unmount the loaded VHD image on the emulated SPI port.
The ability to load any ROM increases a lot the uses of the emulator. ROMs that support RAM and IO extension boards will show 128k of RAM. Otherwise they will show 64k only. Loading a new ROM automatically unmounts the SD card to prevent it from booting right away. If you want to boot on the SD card, remount it will the little button, and press start for 3 seconds.

Loading GT1 now starts much faster on ROMs that support SYS_ReadRomDir (>=v5a) to find the Loader program. On older ROMs, the emulator still relies on simulated button presses to start the Loader from the main menu. This only works if the loader is the last entry in the left column.

Default setup:
screenshot.png
screenshot.png (95.61 KiB) Viewed 5614 times
After loading some roms with the file dialog:

romv1.png
romv1.png (80.01 KiB) Viewed 5612 times
romvx0.png
romvx0.png (72.01 KiB) Viewed 5612 times

Re: Gigatron 128k emulator online.

Posted: 02 Feb 2025, 23:48
by lb3361
I realized that my new way of loading gt1 files is silly. It relies on tracking calls to SYS_Exec to intercept the reset sequence just before executing the main menu. Instead I implant a little piece of code that involves the loader. This is silly because I can just implant the GT1 file we want to load and totally circumvent the loader in a much more portable manner.

So I changed it again. The new version loads GT1 files instantly and much more robustly. In the code, https://github.com/lb3361/gigatron-rom/ ... runjs/html, the file loader.js is a link to either loader_d.js, the direct loader that directly writes the gt1 file into the ram, and loader_l.js, the old code that runs the main menu and invokes the loader by simulating button presses. I keep the old one working because it helps debugging loader stuff. But the default one is the direct loader, much simpler and much smaller...

All together than makes for a quite versatile online emulator. It can run any rom, It can mount FAT32 formatted disk images as virtual SPI SD Cards, and it can instantly load arbitrary gt1 files. It runs on www.gigatron128k.com but can easily run on anywhere (the code is at https://github.com/lb3361/gigatron-rom/ ... runjs/html).

You may have to clear the browser cache to get the latest version.

Examples of gt1 files running under dev128k7.rom which is the default in http://www.gigatron128k.com:
mscp.gt1
(37.62 KiB) Downloaded 3 times
TSTrotator.gt1
(222 Bytes) Downloaded 3 times
Then you can load another ROM such as ROMv6.rom from https://github.com/kervinck/gigatron-rom using the same dialog. Note that there is a trick to prevent it from booting from the SPI card when just loaded. If you want to boot ROMv6.rom from the SPI card, you have to make sure the vhd is mounted and long-press the start button to reset the gigatron (using the currently loaded ROM.)