Character Sets

Using, learning, programming and modding the Gigatron and anything related.
Forum rules
Be nice. No drama.
Post Reply
wbushby
Posts: 48
Joined: 16 Jul 2021, 10:59

Character Sets

Post by wbushby »

I am just starting to try and program on the Gigatron. I am sure I saw a memory map somewhere a while back but now I cannot seem to locate it.
My current question is where is the character set pixel map stored and can it be changed ?
I want to change some of the characters appearance.
alastair
Posts: 24
Joined: 10 Oct 2019, 14:28

Re: Character Sets

Post by alastair »

I assume this would be the latest font - https://github.com/kervinck/gigatron-ro ... font_v4.py

I'm not too familiar with the build process, but you can checkout the repo and either modify this file or create a new version and pull that in to the build. There should be info in this forum on building a new ROM.
wbushby
Posts: 48
Joined: 16 Jul 2021, 10:59

Re: Character Sets

Post by wbushby »

I am looking to soft change it within a program for graphic tiles/characters for the game. Trying to determine if the character definition from the ROM is loaded to RAM where it could be changed.
I think there might be a pointer in page 0 to the character definition in which case I can create a replacement and change the pointer.
at67
Posts: 384
Joined: 14 May 2018, 08:29

Re: Character Sets

Post by at67 »

wbushby wrote: 15 Aug 2021, 20:08 I am looking to soft change it within a program for graphic tiles/characters for the game. Trying to determine if the character definition from the ROM is loaded to RAM where it could be changed.
I think there might be a pointer in page 0 to the character definition in which case I can create a replacement and change the pointer.
There is no characters stored or referenced in/from RAM, the ROM native sys calls read the chars one vertical stripe at a time from the character page in ROM. The only way to change the current font is to burn a new ROM, (without re-writing the ROM native sys calls that handle character printing).

With that being said, in my compiler, (gtBASIC), there is a load font command that can load fonts drawn in any paint program and saved to .tga in the correct colour and width/height/stride formats. https://github.com/kervinck/gigatron-ro ... Fonts.gbas

It's currently quite wasteful of RAM as it stores 1byte per pixel, I have written a bitblit expander in my currently yet to be released ROMvX0 that will mitigate the RAM wastage issue by a factor of 8.
wbushby
Posts: 48
Joined: 16 Jul 2021, 10:59

Re: Character Sets

Post by wbushby »

Thank you for the information. I understand now. At the moment I am trying to understand how to program the Gigatron. I recently obtained the Pluggy Reloaded adapter that makes the Gigatron much more usable. I compiled and am playing around with your gtemuAT67.exe but am struggling to get a basic program loaded and compiled. When I left click in the file browser nothing happens.
Also, I am not sure what Basic command set you compiler supports. Is there a document somewhere I can download ?
I am going to try and compile a 'programmer's reference guide' (ala C64) for other people trying to get to grips with programming the Gigatron.
At the moment I am trying to document a memory map so I will know what can or can't be done.

Any documentary help you could provide would be much appreciated. Thank you.
at67
Posts: 384
Joined: 14 May 2018, 08:29

Re: Character Sets

Post by at67 »

wbushby wrote: 16 Aug 2021, 09:07 Thank you for the information. I understand now. At the moment I am trying to understand how to program the Gigatron. I recently obtained the Pluggy Reloaded adapter that makes the Gigatron much more usable. I compiled and am playing around with your gtemuAT67.exe but am struggling to get a basic program loaded and compiled. When I left click in the file browser nothing happens.
There is a console that shows all of gtBASIC's errors/output, if you are running gtemuat67 in full screen on a single monitor, then the console is most likely underneath it. Your problem is probably a bad path to the runtime, the console will reveal all.
wbushby wrote: 16 Aug 2021, 09:07 Also, I am not sure what Basic command set you compiler supports. Is there a document somewhere I can download ?
I have started documenting the compiler, but it's a monumental task, so I can't say when it will be done. There are over 100 samples/tutorials/games in the gbas folder, most of them are trivial and simple to understand and some much more extensive, (e.g. PucMon and Invader). I would use those as a reference for now if I was you.
wbushby wrote: 16 Aug 2021, 09:07 I am going to try and compile a 'programmer's reference guide' (ala C64) for other people trying to get to grips with programming the Gigatron.
At the moment I am trying to document a memory map so I will know what can or can't be done.
There is good documentation right here: https://github.com/kervinck/gigatron-ro ... aster/Docs covering all aspects of the Gigatron, (including both ROM and RAM memory maps), I would try here first.
wbushby
Posts: 48
Joined: 16 Jul 2021, 10:59

Re: Character Sets

Post by wbushby »

Thank you for that information. I had missed those docs in my travels. To learn how the Gigatron worked I decided to port Star Raiders from Atari to the Gigatron. I felt this would get me working right into the thick of things immediately.
I was going to do it in assembler but changed my mind at the last moment and do it in compiled basic (plus assembler?).
In my reading of various docs and other source code I am coming across conflicting information such as:

$24-$2B sysArgs SYS Call 8 Arguments

$2A Background Colour
$2B Pen Colour

I have used £2A and $2B successfully in a Tiny Basic program so this must mean the sysArgs above does not use those 8 bytes ?

So far the porting(code translation) is going ok. Definitely will need 64k I think. Will it run fast enough ? I don't know but can probably speed it up when I get there.
at67
Posts: 384
Joined: 14 May 2018, 08:29

Re: Character Sets

Post by at67 »

wbushby wrote: 16 Aug 2021, 20:29 In my reading of various docs and other source code I am coming across conflicting information such as:

$24-$2B sysArgs SYS Call 8 Arguments

$2A Background Colour
$2B Pen Colour

I have used £2A and $2B successfully in a Tiny Basic program so this must mean the sysArgs above does not use those 8 bytes ?
sysArgs are parameters bytes used by sys functions, most of the sys functions do not use all 8 bytes and Marcel was careful to make sure that TinyBASIC never used a sys call that used the last two sysArg bytes, (i.e. $2A and $2B), so he was able to re-purpose $2A and $2B without conflict.
Post Reply