QB64.org Forum
Active Forums => QB64 Discussion => Topic started by: johnno56 on January 21, 2019, 05:42:22 pm
-
A quick question:
Does QB64 have the ability to redefine ascii characters? I know the Microbee and the Amstrad could change characters. I think the purpose was that it is quicker to display a character than to plot an 8x8 graphic. (maybe not 'today', but back when the CPU's were 4mhz, speed was everything)
I need more coffee...
J
-
This thread has what you need: https://www.qb64.org/forum/index.php?topic=498.0
-
There are some fine examples amongst that lot, thank you.
But from those examples, strictly speaking, I would probably guess that no, qb64 does not seem to have the ability and I'm ok with that. These days, with machines being WAY faster than the machines of the 80's-90's, scanning; modifying and plotting a character is 'normal' and seems to take little to no time to display the results.
But, wouldn't it be cool, if the ascii character could be tweaked and printed as ac ascii character? Ah the memories.
J
ps: Again. Thank you for the examples...
-
My thoughts are no one wanted to bother putting this feature in QB64. Atari BASIC even had the ability to make your own 8x8 characters back in the 1980s. The ATARI statements probably poked the pixels into memory. I do recall you had to pick an ASCII character, and reassign it to your custom character. So print CHR$(1) could be made into a frame character by blacking out all the outside pixels of the 8x8 character matrix.
Pete
-
There are some fine examples amongst that lot, thank you.
But from those examples, strictly speaking, I would probably guess that no, qb64 does not seem to have the ability and I'm ok with that
Cobalt’s example at https://www.qb64.org/forum/index.php?topic=498.msg3460#msg3460 does exactly what you asked for.
Of course it’s not the same technique of yore.
But it’s definitely the same desired result.
The guy who made the request in that thread even got to make a full game with custom ascii characters after some time (not sure if it’s in the same thread).
-
Pete,
You could be right. After all, keying in all those character definitions back then, ended up being tedious especially if there were a lot of them. But back then, that's what had to be done, for the sake of speed. But I do miss the experience...
J
-
Fellippe, is right. That code I posted is how QB64 changes the 'original' BIOS font. That example uses data from a file but you could easily Rube Goldberg it to have to individually do each character one at a time if you wanted.
Even in Qb45 there wasn't a command to change the characters, you had to PEEK and POKE stuff so it was a routine upon itself. and if it was more of a main stream thing to do I would say we should introduce a couple of commands to make it simpler in QB64 but then how many people mess with the BIOS font anyway? 3 commands, _FONTFILE : loads an entire 256 Character set, _FONTCHAR : Changes an individual character, and _FONT :which we already have to restore the original set (_FONT 16(or 8))
-
Hi Cobalt,
You know about _LOADFONT, right?
http://qb64.org/wiki/LOADFONT
-
Hi Cobalt,
You know about _LOADFONT, right?
http://qb64.org/wiki/LOADFONT
that doesn't change the BIOS font though.
-
Hi Cobalt,
You know about _LOADFONT, right?
http://qb64.org/wiki/LOADFONT
that doesn't change the BIOS font though.
Ah, so you want the new commands just for the BIOS font?
-
redefined chars are cool. i use them in my own games (qb64)... much faster to display... just limitations on colours... but either way cool
-
Do you have a sample piece of code that I could pick apart? I would be interested to see how you use the characters...
J
-
https://www.qb64.org/forum/index.php?topic=638.0
download my faceblock program... its on the forum... nice puzzle all in screen mode 0 using only redefined characters. quiet simple to pull apart and make you own bios characters.. 256ascii set
the link above should be corect.. also the whole title is ascii also.. with music and scrolling text.. (screen 0)