Post Reply 
Emu48 Skins for Android Smartphones I (9:16) - SMART CHARLEMAGNE (1/4)
12-20-2019, 09:08 PM (This post was last modified: 03-20-2020 03:12 PM by Giuseppe Donnini.)
Post: #1
Emu48 Skins for Android Smartphones I (9:16) - SMART CHARLEMAGNE (1/4)
 
SMART CHARLEMAGNE (9:16)


 
[Image: 3BCKeFT.png]



SMART CHARLEMAGNE (9:16) is a theme pack of twenty-three photo-realistic HP-48SX skins, specifically designed for Android-Emu48 running on smartphones with an aspect ratio of 9:16 (*), and optimized for a display resolution of 1440 x 2560 pixels (QHD/WQHD).

Particular attention has been paid to making the calculator experience on a smartphone as authentic as possible. This includes optimizing the design for full-screen view, maximizing those parts of the calculator that are actually functional, and taking into account the smartphone's own structural elements to enhance the realistic appearance of the emulator: Rather than merely depicting one, the smartphone should become an HP-48SX.

In addition, SMART CHARLEMAGNE provides several new skin types never before available on any HP-48 emulator—like the HP-48SX Alpha Keyboard Overlay (HP-82220A), the overlay included with the HP-41CV Emulator Card (HP-82210A), or the one accompanying the HP-16C Emulator Library by Jake Schwartz & Rick Grevelle.

(*) If your smartphone has a different aspect ratio, try out the "Auto-Zoom" and "Fill Screen" options under "Settings > Layout", until a version explicitly designed for your display is available.



I. FILE NAME CONVENTIONS.

Unlike Emu48 itself, Emu48 for Android uses case-sensitive file names. As Android is a Linux derivative, I decided to follow the Unix/Linux convention of using only lower-case letters, unless there is a specific reason not to do so.

Throughout this document, the following cover symbols are used in reference to file names:

    <#>          represents any of the lower-case letters a, b, c, d, e, or j,
                 corresponding to the 6 official ROM revisions of the HP-48SX,
                 respectively A, B, C, D, E, and J.

    <skin>       represents the name of a specific skin design (each skin
                 combines a specific keyboard design with a specific LCD
                 design).

    <faceplate>  represents the name of a specific keyboard design.

    <display>    represents the name of a specific LCD design.



II. KML SCRIPT STRUCTURE.

In order to reduce redundancy and overlap, I avoided using a single .kml file per skin. Instead, I assigned the different sub-tasks performed by a standard KML script to different file types, which are then included, as required, into the main control file. Therefore, in this project:
 
  1. *.kml files directly contain only the "Global" section of a standard KML script, which essentially defines the calculator model (in this case, invariably, the HP-48SX) and references the ROM and bitmap files to be used. All other sections are covered by the four file types described below and are simply "included" into the .kml file.
     
  2. *.bck files contain the "Background" section of a standard KML script, which defines the position and dimensions of the area depicting the calculator within the bitmap image in use.
     
  3. *.lcd files contain the "Lcd" section of a standard KML script, which defines the position and dimensions of the dot-matrix area within the bitmap image in use, as well as its color and contrast settings. Note that the dot-matrix area does not include the annunciators nor any display margins that might be present.
     
  4. *.ann files contain the six "Annunciator" sections of a standard KML script, which define the position and dimensions of the six annunciators within the bitmap image in use.
     
  5. *.key files contain the different "Button" sections of a standard KML script, which define the position and dimensions of the key buttons within the bitmap image in use, as well as their type and behavior.
     
  6. Scancodes for physical keyboards are not defined, as I consider them superfluous on a touchscreen-driven smartphone. [ If you really want to exert control through an external keyboard, just include a scancode file of your choice at the end of each .kml file. ]

This scheme can be visualized as follows:


                +-----------------------+
                |   .kml Control File   |
                | --------------------- |
                |                       |       +-----------+
                | Global                |   .-->| .rom File | (not included)
                |     ...               |   |   +-----------+
                |     Rom    ___.rom --->---'
                |     Bitmap ___.png --->---.
                |     ...               |   |   +-----------+
                | End                   |   '-->| .png File |<-----------.
                |                       |       +-----------+            |
                | Include ___.bck --.   |                                |
                | Include ___.lcd --.   |                                |
                | Include ___.ann --.   |                                |
                | Include ___.key --.   |                                |
                +-------------------|---+                                |
                                    |                                    |
                                    |                                    |
                                    |                                    |
          .--------------+----------'----+---------------.               |
          |              |               |               |               |
          v              v               v               v               |
    +------------+ +-----------+ +---------------+ +-----------+         |
    | .bck File  | | .lcd File | |   .ann File   | | .key File |         |
    |------------| |-----------| |---------------| |-----------|         ^
    | Background | | Lcd       | | Annunciator 1 | | Button 1  |         |
    |   ...      | |   ...     | |   ...         | |   ...     |         |
    | End        | | End       | | End           | | End       |         |
    +------------+ +-----------+ |               | |           |         |
          |              |       | Annunciator 2 | | Button 2  |         |
          |              |       |   ...         | |   ...     |         |
          |              |       | End           | | End       |         |
          |              |       |               | |           |         |
          v              v       | ...           | | ...       |         |
          |              |       +---------------+ +-----------+         |
          |              |               |               |               |
          |              |               v               v               |
          |              |               |               |               |
          '--------------+---------------+---------------+-------->------'



III. SUPPORT FOR MULTIPLE ROM REVISIONS.

In order to support the simultaneous use of multiple ROM revisions, each skin uses six different .kml files—one for each ROM revision—, while all other settings remain shared. Due to the structure of the KML scripts just described, this is achieved with almost no redundant code.

To make this feature work, .kml files expect the ROM image files (which cannot be included for copyright reasons) to be named in the following consistent way:

48sx_<#>.rom,

where <#> represents the lower-case ROM revision letter. Please make sure to rename your ROM image file(s) accordingly.

It is strongly recommended to delete, or not to sideload, those .kml files that correspond to ROM revisions you will never use; otherwise, they will show up in the list of selectable calculators, without actually being functional.



IV. SKINS.

Given the chosen structure and the added support for multiple ROM revisions, a set of 11 files is necessary to completely define a skin:
  • 6 unique .kml or main control files—one for each ROM revision;
     
  • 1 unique .png or bitmap image file; and
     
  • 4 include files which may be shared between skins, namely:
     
    • 1 .bck or background file,
       
    • 1 .lcd file,
       
    • 1 .ann or annunciator file, and
       
    • 1 .key file.


On the other hand, from a visual and conceptual point of view, a skin is essentially divided into two main parts: the faceplate and the display. To emphasize this logical structure, faceplates and displays are given emblematic names, e.g. CHARLIE refers to the standard HP-48SX faceplate, SILVERBIRD to the keyboard overlay for the HP-41CV emulator card, and so on; likewise, BLUE refers to the standard LCD display, COAL to a black version thereof, etc.

The name of a particular skin is then defined as the juxtaposition of the names of its two constituting elements, e.g. CHARLIE COAL, SILVERBIRD BLUE, etc.

These labels are consistently used in naming .kml, .png, and .lcd files, with underscores separating the elements where necessary. Thus:

  • All .kml file names are composed of the ROM revision information followed by the skin name:

    48sx_<#>_<skin>.kml = 48sx_<#>_<faceplate>_<display>.kml.

    For example, 48sx_e_silverbird_blue.kml would be the main control file for an HP-48SX running ROM revision E, equipped with the overlay for the HP-41CV emulator card, and featuring the standard blue LCD display.
     
  • All .png files are named after the skin name:

    <skin>.png = <faceplate>_<display>.png,

    e.g. silverbird_coal.png.
     
  • All .lcd files are named after the display name:

    <display>.lcd,

    e.g. blue.lcd.

Since all skins use the same position and dimension information for their backgrounds, the whole package only needs one .bck file—called 48sx.bck.

Likewise, only one .ann file—called 48sx.ann—is needed, as the position and dimension information for the annunciators is the same for all skins.

As for the key button files, two different versions are used—48sx.key and 16c.key—, since the keyboard overlay for the HP-16C emulator needs slightly different key button specifications.


( CONTINUE TO 2/4 )
 
Find all posts by this user
Quote this message in a reply
Post Reply 




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