Post Reply 
HP48 Character Bitmaps
11-07-2018, 04:23 AM
Post: #1
HP48 Character Bitmaps
Is it possible to access the bitmaps of all of the characters of the HP48?

I would like the column based patterns.

This is to develop a 'old school' banner printer. Of course I can develop the patterns myself, but if they're easily available inside the 48, it will be a bit easier and give me access to the full character set.

Thank you,
TomC
ps: Also, if there's a generic character pattern list somewhere online, that may have do do as a backup.
Find all posts by this user
Quote this message in a reply
11-07-2018, 06:11 AM
Post: #2
RE: HP48 Character Bitmaps
Hello,

My memory of these times is waning... So I do not even remember if there is such a set of characters on the 48 (I assume you mean the original 48S/G)...
What you can do easely however, is to use the ->GROB function to generate a graphic that will contain the full font.
Each character is 6*8 pixels, so you need to loop for A from 32 to 255 (characters before 32 are not defined). and display the result in PICT or in a larger grob for storage.

Cyrille

Although I work for the HP calculator group, the views and opinions I post here are my own. I do not speak for HP.
Find all posts by this user
Quote this message in a reply
11-07-2018, 06:19 AM
Post: #3
RE: HP48 Character Bitmaps
Some image files of the 3 fonts are available at drehersoft.com. Not sure if these are useful for you, but maybe these will help.

https://www.drehersoft.com/mapping-hp48-...o-unicode/
Visit this user's website Find all posts by this user
Quote this message in a reply
11-07-2018, 08:56 PM
Post: #4
RE: HP48 Character Bitmaps
Cyrille:

Thank you; sounds a bit tedious, between the GROB format and the horizontal storage of the nibbles - that's why I was hoping to find another way. Worst case, I'll see what I can do.

If there are any other suggestions out there, I'd be glad to hear it.

Cheers,
TomC
Find all posts by this user
Quote this message in a reply
11-07-2018, 10:50 PM (This post was last modified: 11-07-2018 10:55 PM by EugeneNine.)
Post: #5
RE: HP48 Character Bitmaps
how are you trying to use it, maybe download the font available on the other site?
http://www.hpcalc.org/details/3859
http://www.hpcalc.org/details/3854
Find all posts by this user
Quote this message in a reply
11-08-2018, 01:12 AM
Post: #6
RE: HP48 Character Bitmaps
Hello Tom -

I am not clear if you just want the bitmaps, to use them in an external device, or you want to control it from the HP 48.

I found this program in old gallery:
https://www.hpcalc.org/details/1166

It may help to follow its code. it is in userRPL land.

Regards,

Adrian

Adrian Coto
Find all posts by this user
Quote this message in a reply
11-08-2018, 06:19 AM
Post: #7
RE: HP48 Character Bitmaps
Hello,

Looking at the graphic on the lin provided above, the 48 does NOT habe block patterns...
Sorry..

Cyrille

Although I work for the HP calculator group, the views and opinions I post here are my own. I do not speak for HP.
Find all posts by this user
Quote this message in a reply
11-08-2018, 03:06 PM
Post: #8
RE: HP48 Character Bitmaps
One possibility would be to convert characters into a GROB, then "explode" each column of that GROB into a character string representing the bit state of that column.

Yes, it's a bit tedious, but something like the following could work (assumes a 48gx platform):
Code:
@ character to rows
c2r
\<<
  @ convert char to GROB using 6x8 font
  2 \->GROB

  @ save char GROB
  \-> cgrob
  \<<
    @ for each column
    0 5 FOR col

      @ build a transposed row (initially empty)
      ""

      @ retrieve the current column
      cgrob
      col R\->B #7d OVER #0
      2 \->LIST
      3 ROLLD 2 \->LIST
      SUB

      @ store the current column in PICT
      PICT STO

      @ build the char column as a row of "  " or "**"
      7 0 FOR row
        #0 row R\->B
        2 \->LIST
        PIX? "**" "  " IFTE
        +

      -1 STEP
    NEXT
  \>>
\>>

The above will obliterate whatever is currently in PICT, so you'd probably want to save the current PICT contents and restore after execution.

"c2r" converts a single character to a series of strings which are left on the stack, presumably suitable for printing or whatever is appropriate in your case.

Here's an example of a program which uses c2r to leave a series of strings on the stack
Code:
chrs
\<<
  @ save the current PICT
  PICT RCL

  @ the string for conversion
  "Banners are fun!"
  \-> svpic banner
  \<<

    @ for each character
    1 banner SIZE FOR cnum

      @ obtain the character
      banner cnum DUP SUB

      @ convert it to 6 rows
      c2r

    NEXT

    @ restore the saved PICT
    svpic PICT STO
  \>>
\>>

..and finally, the output (shown as if each resulting string were printed in sequence):
Code:
  **************
  **    **    **
  **    **    **
  **    **    **
    ****  ****  
                
    **          
  **  **  **    
  **  **  **    
  **  **  **    
  ********      
                
  **********    
          **    
          **    
          **    
  ********      
                
  **********    
          **    
          **    
          **    
  ********      
                
    ******      
  **  **  **    
  **  **  **    
  **  **  **    
      ****      
                
  **********    
        **      
          **    
          **    
          **    
                
  **    **      
  **  **  **    
  **  **  **    
  **  **  **    
    **    **    
                
                
                
                
                
                
                
    **          
  **  **  **    
  **  **  **    
  **  **  **    
  ********      
                
  **********    
        **      
          **    
          **    
          **    
                
    ******      
  **  **  **    
  **  **  **    
  **  **  **    
      ****      
                
                
                
                
                
                
                
        **      
  ************  
        **    **
            **  
                
                
    ********    
  **            
  **            
  **            
  **********    
                
  **********    
          **    
          **    
          **    
  ********      
                
                
                
  **  **********
Find all posts by this user
Quote this message in a reply
11-08-2018, 06:41 PM
Post: #9
RE: HP48 Character Bitmaps
DavidM:

Looks most promising! Thank you very much - I'll report back - soon I hope!

TomC
Find all posts by this user
Quote this message in a reply
11-08-2018, 06:51 PM (This post was last modified: 11-08-2018 11:23 PM by DavidM.)
Post: #10
RE: HP48 Character Bitmaps
(11-08-2018 06:41 PM)TomC Wrote:  DavidM:

Looks most promising! Thank you very much - I'll report back - soon I hope!

TomC

I grabbed some snippets of code from other projects to throw that together -- it strikes me that you could streamline the process by storing the char grob into PICT and make this a nested loop (instead of repeatedly storing each column into PICT separately). That would probably make it a little faster and possibly shorter as well.

I'll probably play around with this some more as well when I get a moment. My implementation above has lots of room for improvement.

(edit) Here's a smaller/faster version of the c2r program:
Code:
\<<
  2 \->GROB
  PICT STO
  0 5 FOR col
    ""
    7 0 FOR row
      col R\->B row R\->B 2 \->LIST
      PIX? "**" "  " IFTE
      +
    -1 STEP
  NEXT
\>>
Find all posts by this user
Quote this message in a reply
11-09-2018, 06:55 AM
Post: #11
RE: HP48 Character Bitmaps
DavidM:

It works great - exactly what I was looking for!

Thanks again,
TomC
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)