Page 1 of 1

redefine the charset

Posted: Sun Feb 21, 2016 1:15 am
by Aturnwald
Hello to all,

just a small question, is it possible to redefine on a VIC the charset witch you can get via the SHIFT or COMMODORE key, I mean all chars excepted the alphabet ? And if yes, Can it be done also by 16 / 32 KB ?

cheers Toni

Re: redefine the charset

Posted: Sun Feb 21, 2016 5:35 pm
by eslapion
A game like "Sword of Fargoal" does exactlyt like that.

In order to do that, the character set has to be mapped in RAM somewhere between $1000-$1FFF and the BASIC program space moved up accordingly.

Even if if it's technically impossible for the new character set to me mapped in the memory expansion area, having 8k or more of RAM expansion actually makes the job easier because new characters occupy space and reduces your BASIC RAM space accordingly.

Also, the complete original character set occupies 4K in ROM. Since the screen codes occupy 506 bytes it will not be possible for you to have a full set of replacement characters, except perhaps if you have an internal 3k RAM expansion that can be accessed by the 656X VIC chip.

Re: redefine the charset

Posted: Sun Feb 21, 2016 10:39 pm
by Aturnwald
OK, I see, because I'd know that game, so I was thinking I can do nearly the same. But it should be possible, to define some characters and fix it up into the memory, and after a while I change that into other stuff, without lost of the main-program or without lost of for the game points, live ect.

Re: redefine the charset

Posted: Mon Feb 22, 2016 8:10 am
by 4matdemoscene
On unexpanded machines I usually do the reverse, with my redefined chars at the front of the charset and the rom font at the back:

POKE 36869,255 to set the gfx ram looking at 7168 onwards. (With the screen still at 7680 as usual, giving me 64 redefinable chars and both are right at the end of memory)
To get the rom font add 128 to any char number. Obviously this way you only get 128 of the rom characters but the standard alphabet, numbers and punctuation are only contained in the first 64.

Changing the 36869 high-nybble you can put the screen lower in memory to give you 128 definable chars if you need it. I don't use expansions so have no idea if memory wraps weirdly past that first 4kb block or it works the same way.

Re: redefine the charset

Posted: Mon Feb 22, 2016 11:30 am
by Aturnwald
OK, I understand, so if I use a 24KB I enter POKE56,21:CLR at the program start and that's all, the Basic is moved and save and I can define the keys and characters, also I can load during the game something into the memory and it should be all good.

By the way. When the master program is running is that possible to load some pictures with .SQL into the computer, or the game-pics can I do this on that way ? Or must I do it different, because I saw a game in GV a labyrinth one and you can play from level 1 to 88 or 99, you enter the number and the game would be loaded.

bye bye Toni

Re: redefine the charset

Posted: Sun Feb 28, 2016 4:09 pm
by Mike
Aturnwald wrote:OK, I understand, so if I use a 24KB I enter POKE56,21:CLR at the program start and that's all, the Basic is moved and save and I can define the keys and characters, also I can load during the game something into the memory and it should be all good.
At the power up screen (with a +8K RAM expansion, or more), enter:

Code: Select all

POKE56,21:CLR
Then enter:

Code: Select all

PRINTFRE(0)
Now, take a look at the remaining bytes free for BASIC and then reconsider your quoted statement above.

(Hint: link)

Re: redefine the charset

Posted: Sun Feb 28, 2016 11:09 pm
by Aturnwald
thnks a lot, now I know
cheers Toni