Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Nice game, but the custom charset is allowed? it's not defined into the listing, as what I see

(1 edit)

Thank you! Yes, the custom charset is set into B$ in lines 2 and 3.  It's a pretty standard way of setting them using one character per byte instead of a list of numbers in a DATA statement, which consume much more code.

See below:

Wow, Sorry for the question, but coming from c64 , where you have to struggle a lot to change the charset, it didn't seem a possible thing! I confirm my compliments and wish you a good challenge.

Thank you!  I found someone doing a similar trick on c64 to put PETSCII chars in a string, and pointed the charset to the start of the program, though there may be a limit on which values can be encoded like this:

https://www.reddit.com/r/c64/comments/1214xwo/10print_with_custom_characters_and... 

Probably there's a little misunderstood, when I read "custom charset" I thought you were talking about replacing stock chars with new designed ones, and this is a slow and space consuming operation in basic on c64. You were talking, instead,about putting stock chars in a variable, and this is normal also for C64. 

So kudos for the Aladdin pixel art made with stock chars,it's resembling a lot the original one.

(1 edit)

No, it is replacing the stock with custom characters. It works the same for C64 and Atari:

1. Put your custom charset bytes (8 bytes per char) somewhere in RAM. The traditional slow way is a bunch of data statements and a loop to POKE to some location.

2. Tell computer the new charset location


For step 1 here, I save space and time by positioning the actual string at a spot in memory that I tell the computer the charset is located. I fill the string with special chars to represent each of the 8 bytes per custom char. Therefore no DATA, looping, POKEing required.

This works in Atari since a string can be thousands of bytes long, unlike C64 which must be 255 or less. I create a dummy string that takes up useless ram but positions the very next string right where I need it. This was a typical Atari BASIC trick from back in the day.

Wow, that's a huge design idea to make things easy, from Atari side! In the c64, apart from what you said, there is also the issue that charset is read only, you have to physically move it in some other ram place, byte per byte, then you can edit the chars you want and  you have to tell the Vic that charset is  there... It's something we do in ASM because it requires a lot of time in basic, besides the space taken by instructions, that make it not so sustainable for a pur80. Anyway, thanks for these informations, I don't know the Atari world, it's been nice to learn something new. Have a good challenge, see you in these pages :-)

Yes, Atari does have a nice feature in this way! I wish you a good challenge as well, see you :)