Huge Character Demo

For Scene Demos that display animations, graphics, and music. Also for tech demos of graphics capability of VERA or the audio capabilities of the PSG, FM, or PCM audio channels.
Post Reply
mobluse
Posts: 177
Joined: Tue Aug 04, 2020 2:16 pm
Location: Lund, Sweden
Contact:

Huge Character Demo

Post by mobluse »


Huge Character Demo prints all the characters in the ROM hugely: PETSCII and ISO8859-15 including ASCII. The faster version uses some new X16 BASIC v2 keywords: BIN$ and LOCATE, but the slower R38 version uses BASIC code or SYS PLOT to do the same. Both programs use the SYS FETCH Kernal function to read character data from ROM bank 6. It's the slower R38 version that runs using the Try it now button. The zip-file contains a version for R38+ and faster versions for R39+ and the open source code as text. This is FOSS with GPLv3 license. One could e.g. develop this into a program to print banners.




This is also on GitHub: https://github.com/mobluse/chargen-maker




I'm open to suggestions on how to improve the code and make it faster.



I added a specific version for R39 since the R41 version didn't work there. I also included the source file chars.bas for R39+.




It can be run from the command line if you first unzip chars-x16.zip:

x16emu -bas chars.bas -run


Attachments
Huge Character Demo
Huge Character Demo
2022-06-01-212652_640x480_scrot.png (2.48 KiB) Viewed 7952 times
Huge Character Demo
Huge Character Demo
2022-06-01-212052_640x480_scrot.png (3.98 KiB) Viewed 7952 times
chars-x16.zip
Huge Character Demo
(3.25 KiB) Downloaded 460 times
X16&C64 Quiz: Try It Now! Huge Char Demo: Try It Now! DECPS: Try It Now! Aritm: Try It Now!
mobluse
Posts: 177
Joined: Tue Aug 04, 2020 2:16 pm
Location: Lund, Sweden
Contact:

Re: Huge Character Demo

Post by mobluse »

Try It Now!!
I didn't yet want to make a new release, but included a manifest so that Try it now works. I don't have the rights update the original post. You can read more about Huge Character Demo at:
viewtopic.php?t=3036
(BTW this thread should be in the Archive, since this was posted before the new forum.)
#R38 #R39 #R41 #R42 #R43
Last edited by mobluse on Wed May 31, 2023 8:46 pm, edited 1 time in total.
X16&C64 Quiz: Try It Now! Huge Char Demo: Try It Now! DECPS: Try It Now! Aritm: Try It Now!
User avatar
ahenry3068
Posts: 1194
Joined: Tue Apr 04, 2023 9:57 pm

Re: Huge Character Demo

Post by ahenry3068 »

I remember doing a similiar project on PC compatibles... Its quite useful for title screens to be able to print large
fonts... I don't have quite the agile brain I had when I was in my 20's ....lol. I find your
loop code a little obfuscated :( ..

I broke this routine out in a Pascal Unit. (like a library in C or a DLL in windows). To
Print a Single ROM character starting at a specific Screen X, Y.

I know your mapping the bitmap font... I'm just not quite following the code to break it
out for a single character subroutine. ???
User avatar
ahenry3068
Posts: 1194
Joined: Tue Apr 04, 2023 9:57 pm

Re: Huge Character Demo

Post by ahenry3068 »

You shouldn't worry about speed so much. Breaking if out to print
a single character giving the asc code would be much
more useful.
mobluse
Posts: 177
Joined: Tue Aug 04, 2020 2:16 pm
Location: Lund, Sweden
Contact:

Re: Huge Character Demo

Post by mobluse »

I don't have time right now to make a version of this program that prints a single, freely chosen, character, but I could modify it so that it starts printing a chosen character "X":

Code: Select all

1020 FOR P=$C000+8*(ASC("X")-ASC("A")+1) TO T
X16&C64 Quiz: Try It Now! Huge Char Demo: Try It Now! DECPS: Try It Now! Aritm: Try It Now!
User avatar
ahenry3068
Posts: 1194
Joined: Tue Apr 04, 2023 9:57 pm

Re: Huge Character Demo

Post by ahenry3068 »

Thanks for the reply. Actually I think that one line of code isolated has helped.

When I wrote the function it took 2 parameters. The string to print and the ASCII code to use as the block character.
Then it just read the ROM font and used the code sent as the "PIXEL". Another parameter just used the
character being drawn as the block character

I ended up using this mostly for program SPLASH/TITLE screens when they started up.
User avatar
Daedalus
Posts: 232
Joined: Fri Nov 11, 2022 3:03 am

Re: Huge Character Demo

Post by Daedalus »

OMG! This gives me flashbacks to when I was programmed my TRS-80 to display stuff in it's (cough) "graphics mode" one giant monochrome pixel at a time.
User avatar
ahenry3068
Posts: 1194
Joined: Tue Apr 04, 2023 9:57 pm

Re: Huge Character Demo

Post by ahenry3068 »

I'm trying to recreate a more modular version of this. Single Letter or word at a time.

I have to confess I'm really not following the code very well.

I know that the character font is in the ROM in Bank 6. I'm missing the
docs that tell how the font is laid out in memory though. And I'm not quite getting it
from this code :( :(
User avatar
ahenry3068
Posts: 1194
Joined: Tue Apr 04, 2023 9:57 pm

Re: Huge Character Demo

Post by ahenry3068 »

Yeah I got a single letter to work.

easy peasy from here.

I did get one thing from the code here. I was not correctly calculating the offset.
Your previous answer and your code at least got me on the correct track... TY.

I would still like to find more docs on how the character font is laid out in memory. I'm
pretty sure at least the default font is laid out as an 8x8 monochrome bitmap otherwise
my code wouldn't be working...
Post Reply