Updating the ROM?

Using, learning, programming and modding the Gigatron and anything related.
Forum rules
Be nice. No drama.
Post Reply
enio
Posts: 2
Joined: 17 May 2018, 19:02

Updating the ROM?

Post by enio »

I've seen a few git commit's to the ROM.
Is there a way to update the ROM to get any new features?
User avatar
marcelk
Posts: 488
Joined: 13 May 2018, 08:26

Re: Updating the ROM?

Post by marcelk »

The commits you see are all in the tooling part, keeping the ROM itself unchanged (for now). We're step by step making it more understandable and usable than just for us.

We're still at ROM v1 now for the kits. After Belgrade we plan a tiny update: make Snake suitable for colour blinded people (such as The 8-Bit Guy) by changing the colour scheme a bit. Perhaps we'll manage to squeeze in a new video mode and a SYS function for sprites, but some space must be found for that first, so no promises about that for ROM v2 already.

If you have a GCL program, you can already make your own ROM file with the existing tools in my repository. Just put it in the Makefile in the place of Main.gcl and the other applications. But do keep Reset.gcl in there and modify it to refer to your program.

For example, to make a ROM with HelloWorld.gcl in it, I would modify the Makefile as follows:

Code: Select all

romType=0x00 # <--- 0x00 for custom ROMs

theloop.2.rom: Core/* Apps/* Images/* Makefile
        env romType="$(romType)"\
            PYTHONPATH="Core:$(PYTHONPATH)"\
            python Core/theloop.py\
                Apps/HelloWorld.gcl\
                Core/Reset.gcl
Then change the last line of Core/Reset.gcl into this:

Code: Select all

{ Load and start main program }
\HelloWorld \sysArgs0= $200 \vLR= \SYS_Exec_88 \sysFn= 88!
Type 'make' (I do this on Mac, but it has been reported to work on Linux as well).

Code: Select all

marcelk@mbook-3:~/Projects/Gigatron-1/Design/theloop> make
env romType="0x00 "\
	    PYTHONPATH="Core:"\
	    python Core/theloop.py\
		Apps/HelloWorld.gcl\
		Core/Reset.gcl
zpFree 0030
runVcpu at 01fd cycles 148 info line41-521 typeF
runVcpu at 024f cycles 100 info line0
runVcpu at 029f cycles 130 info line1-39 typeC
runVcpu at 02a6 cycles 134 info line1-39 typeABD
runVcpu at 02d6 cycles 120 info line40
SYS limits low 100 high 148

Compile file Apps/HelloWorld.gcl label HelloWorld ROM e39c
 Segment at 0200 size 250 used 214 unused  36
 Variables count 12 bytes 24 end 0048
 Symbols BgColor Char ClearScreen Color Pos PrintChar PrintText StringHelloWorld
 Symbols Text fontData i p

Compile file Core/Reset.gcl label Reset ROM e47b
 Segment at 0200 size 250 used 215 unused  35
 Segment at 0300 size 250 used 191 unused  59
 Variables count 12 bytes 24 end 0048
 Symbols Char Pos PrintChar PrintStartupMessage SetupAudio SetupChannel SetupVideo Text
 Symbols fontData i p q

Create file theloop.asm
Create file theloop.sym
Create file theloop.0.rom
Create file theloop.1.rom
Create file theloop.2.rom
OK used 59136 free 6400 size 131072
marcelk@mbook-3:~/Projects/Gigatron-1/Design/theloop> 
Et voilà, a new ROM file is born (still called "theloop.2.rom") that can run in an emulator for testing. When ok it can be programmed into an EPROM with a programmer. So there is actually no need to dive into the native 8-bits assembly world for making custom ROMs.

P.S.: The free number of bytes is low because the built-in images are still in there (Parrot etc). They are included by theloop.py itself, and it easy to strip all of that out when needed.
enio
Posts: 2
Joined: 17 May 2018, 19:02

Re: Updating the ROM?

Post by enio »

ok thanks, I'll build the kit first then I might look in to updating it.
Post Reply