More C64 tools: C64 Hires to Charmode

A few weeks back, around the end of May, I came up with an interesting idea for a logo to use for a Commodore 64 intro for Hokuto Force. I designed a 3-color logo spanning multiple C64 screens in a PC graphic editor and I was looking for a way to convert it to char-mode. Unfortunately I could not find anything quickly enough so I decided to draft a tool to do just that.

I am not going to expose my logo just yet so I will show below how the tool works using somebody else’s logo meant to be displayed in char-mode (rather than hires mode). Of course the tool is meant to save time when designing graphics produced by a non cross-design editor (or simply found on the Internet, e.g. a still image): the careful design of the logo to be shown in char-mode is a high-value task and is best done in a native editor or one that behaves similarly!

So let’s assume I found the image below on the Internet and I was interested in putting together a fontset out of it (because I do know that it is a char-mode logo), without repetitions:

HF logo by DMD

HF logo by DMD

What I do is to load the PNG (or GIF, or BMP, etc) file into my tool, C64 Hires 2 Charmode:

C64 Hires 2 Charmode

C64 Hires 2 Charmode

By clicking on the button “Convert & Save” what I get is that I am requested to save the below picture:

C64 Hires 2 Charmode - Resulting fontset

C64 Hires 2 Charmode – Resulting fontset

Along with the video map that indexes the chars in the above fontset in order to display the original logo. The tool also gives feedback on the number of chars required to do the decomposition:

C64 Hires 2 Charmode - Count of chars

C64 Hires 2 Charmode – Count of chars

What I finally do is to use one of my other tools to convert the picture to raw font-data. I decided not to do such conversion in C64 Hires 2 Charmode when I coded it, but I might include the functionality at some point.

This entry was posted in Pixel Design, Retrocomputing, Technical and tagged , , , . Bookmark the permalink.

11 Responses to More C64 tools: C64 Hires to Charmode

  1. Nice tool! Does it look for identical chars so they can be reused? If so this could benefit from shifting the whole bitmap some pixels up/down or left/right for more chars being identical. Of course this should be optional as not all images can be shifted (or looks wrongly placed if shifted).

    • luigidifraia says:

      As I wrote, the starting point for this tool is a char-mode image that was already designed to use font characters and re-use them as much as possible. In the example I provided you might be able to appreciate how the clear and dark “stains” on the cross follow an identical pattern on all ends of the cross: a clear sign that the logo was designed to be char-mode as opposite to multicolour hires.

      Suppose you have designed such char-mode logo a number of years ago and lost all the design files and the program that was using the logo. Suppose all that was left behind is a PNG image of the whole logo somebody took with an emulator. What do you do to break it down into unique chars and the map that tells you where to put each char? My suggestion is that you feed it into my tool.

      Suppose now that you haven’t got a C64 font editor nor a PC/MAC application for doing the same. Suppose you used Photoshop or GIMP for designing the logo and yet you have designed it so that it is char-aligned and a number of patterns are repeated so that you know that you can decompose the logo into one or more font sets. How do you go about converting the design into font sets and maps? Again, I suggest you feed the design into my tool.

      In general a multicolour hires image cannot be converted to char-mode and in general the shifting of it by a number of pixels that is not a multiple of 8 corrupts the design. Hence neither is in scope for my tool.

      • Great. For my latest game project (Imogen) I hand-drew a bitmap image as chars (multicolour) – so I know it takes a lot of work to do that – but it was a fun thing to do still. Saved a lot of space in memory too when displaying it (which was the main reason for the move). I have worked on a bitmap to multiple charset converter myself for a secret project. Some day I might reveal that if I ever am able to finish that project. 🙂

  2. Cerator says:

    Hmmm… The pic you are converting looks like multicolour and not hires…
    So what does the “hires” in the name of your tool stand for?
    (Looks like a very useful tool to me by the way! 😉

    • luigidifraia says:

      My personal opinion is that the widespread use of the word Multicolour as opposite to Hires is an unfortunate habit. Think of it: what many people refer to as a Multicolour picture is still a Hires (=HIgh-RESolution) picture as opposite to a Text page. That’s what I think the word Hires should be used for in this context: distinguish from Text.

      Not only that: On the C64 you set a bit in $d011 to enable Hires mode (a.k.a. Bitmap mode). You then optionally set a bit in $d016 if you want to enable Multicolour mode.
      In conclusion, there are two Hires modes defined by the state of the multicolour bit in $d016 when bit 5 in $d011 is set: Hires Standard and Hires Multicolour. If I simply write Hires I am referring to either mode.

      • Cerator says:

        According to this codebase.org link: http://codebase64.org/doku.php?id=base:built_in_screen_modes the modes are called hires text mode, multicolour text mode, hires bitmap mode and multicolour bitmap mode.
        Which is also consistent since both hires modes (text and bitmap) have the same resolution (320×200) and both multicolour modes (text and bitmap) have the same resolution (160×200).
        I don’t want to be a smartass… I just have to justify why I haven’t tried your tool yet! 😉

  3. luigidifraia says:

    BTW, this tool was used to create the Hokuto Force ambigram logo on the C64 as per my later post here: https://luigidifraia.wordpress.com/2014/12/26/my-work-on-ambigram/

    • Cerator says:

      I thought so! 🙂 I loved that intro since I love wordplays, puns, palindromes and ambigrams!
      It would have been even more impressive, if the logo (or the ntsc/pal sprite) had turned around to demonstrate the ambigram! 😉

      • luigidifraia says:

        That naming convention reported on codebase64 is widespread, but it does not add up for myself. The key issue for me is that the word Bitmap is used improperly in both cases: “a bitmap gives a way to store a binary image, that is, an image in which each pixel is either black or white (or any two colours).” (Wikipedia)
        The definition of Bitmap corresponds to what the mainstream would refer to as “Hires Bitmap picture with constant video RAM data”. No chance to reconcile these two for me 🙂

        The use of 160×200 as “Resolution” is also questionable for me: Pixels don’t get twice as wide in Multicolour mode, however that’s good enough to describe how things look like to an end-user. In Multicolour mode users can’t set certain pixels individually as certain adjacent bits are used to designate the resulting colour of a couple of pixels (on the Amiga we use overlapping bit-planes instead so we haven’t got to compromise). The Display Resolution, which on the other side is a well defined concept, stays always the same.

        Again, the above is my personal opinion on how things could be referred to (I would hate to sound like I am imposing that to anybody!) so that their meaning is consistent with what’s outside the C64 micro-space.

  4. Cerator says:

    It’s ok to try to use the same terminology for different platforms! 🙂
    But if it were a paid program, I’d call it a bad marketing strategy to use a misleading title because you’d lose at least 50% of potential customers who dismiss your program without investigating cause they think your program is more limited than it really is! 😉 (You’d better adapt to the target group!)
    Just my 2 cents.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s