HP Forums
HP48 Character Bitmaps - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: General Forum (/forum-4.html)
+--- Thread: HP48 Character Bitmaps (/thread-11757.html)



HP48 Character Bitmaps - TomC - 11-07-2018 04:23 AM

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.


RE: HP48 Character Bitmaps - cyrille de brébisson - 11-07-2018 06:11 AM

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


RE: HP48 Character Bitmaps - Chris Dreher - 11-07-2018 06:19 AM

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-text-to-unicode/


RE: HP48 Character Bitmaps - TomC - 11-07-2018 08:56 PM

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


RE: HP48 Character Bitmaps - EugeneNine - 11-07-2018 10:50 PM

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


RE: HP48 Character Bitmaps - acoto - 11-08-2018 01:12 AM

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


RE: HP48 Character Bitmaps - cyrille de brébisson - 11-08-2018 06:19 AM

Hello,

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

Cyrille


RE: HP48 Character Bitmaps - DavidM - 11-08-2018 03:06 PM

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:
  **************
  **    **    **
  **    **    **
  **    **    **
    ****  ****  
                
    **          
  **  **  **    
  **  **  **    
  **  **  **    
  ********      
                
  **********    
          **    
          **    
          **    
  ********      
                
  **********    
          **    
          **    
          **    
  ********      
                
    ******      
  **  **  **    
  **  **  **    
  **  **  **    
      ****      
                
  **********    
        **      
          **    
          **    
          **    
                
  **    **      
  **  **  **    
  **  **  **    
  **  **  **    
    **    **    
                
                
                
                
                
                
                
    **          
  **  **  **    
  **  **  **    
  **  **  **    
  ********      
                
  **********    
        **      
          **    
          **    
          **    
                
    ******      
  **  **  **    
  **  **  **    
  **  **  **    
      ****      
                
                
                
                
                
                
                
        **      
  ************  
        **    **
            **  
                
                
    ********    
  **            
  **            
  **            
  **********    
                
  **********    
          **    
          **    
          **    
  ********      
                
                
                
  **  **********



RE: HP48 Character Bitmaps - TomC - 11-08-2018 06:41 PM

DavidM:

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

TomC


RE: HP48 Character Bitmaps - DavidM - 11-08-2018 06:51 PM

(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
\>>



RE: HP48 Character Bitmaps - TomC - 11-09-2018 06:55 AM

DavidM:

It works great - exactly what I was looking for!

Thanks again,
TomC