DM42 skin for the Free42 simulator

Discussion around the SwissMicros DM42 calculator
StreakyCobra
Posts: 20
Joined: Thu Jun 14, 2018 10:09 am

Re: DM42 skin for the Free42 simulator

Post by StreakyCobra »

Thanks Thomas (again) for your work and help :)

I just released a v1.3 that increases the sensitivity border around the keys. This was a problem for using it on the phone, these DM42 keys are quite small and easy to miss with fingers.

Let me know if this causes any problem, if so I can either adapt the border size or make a CLI flag to disable it.
Thomas Okken
Posts: 1100
Joined: Tue May 02, 2017 5:48 pm
Location: Netherlands
Contact:

Re: DM42 skin for the Free42 simulator

Post by Thomas Okken »

Thanks! I'll post the new versions of the 2x and 4x sizes in my skin collection this weekend.

Maximizing the sensitive rectangles is a good idea. It does not affect the skins visually, but it makes the keys easier to hit. I performed this operation on all the skins in my collection years ago, using a little program I wrote for the purpose. It is primitive and only handles the original 37-key layout, so it needs to be modified to handle landscape and other non-standard layouts, but it saved me a lot of trouble. It's in my Free42 Utilities repository at https://github.com/thomasokken/free42ut ... ens_rect.c
whuyse
Posts: 198
Joined: Thu Dec 21, 2017 1:23 pm

Re: DM42 skin for the Free42 simulator

Post by whuyse »

I can't seem to be able to install the skins straight from my iPhone. I can select an individual file (say, dm42_12.gif) but the Load button stays greyed out. Am I doing something wrong?
(In the meantime I installed them again using the http server - couldn't wait ;-)

Cheers, Werner
41CV†,42S,48GX,49G,DM42,DM41X,17BII,15CE, DM15L
Thomas Okken
Posts: 1100
Joined: Tue May 02, 2017 5:48 pm
Location: Netherlands
Contact:

Re: DM42 skin for the Free42 simulator

Post by Thomas Okken »

Loading from https://thomasokken.com/free42/skins/ does work. It looks like the browser in Free42 isn't handling the links on StreakyCobra's site properly.

You should be able to avoid using the built-in HTTP server by downloading the files on the phone using Safari, and then using Files to copy them to Free42/skins, but that's also a bit cumbersome and non-obvious.
User avatar
Jaymos
Posts: 1635
Joined: Sun Nov 04, 2018 7:03 pm
Location: Cape Town

Re: DM42 skin for the Free42 simulator

Post by Jaymos »

The link to https://thomasokken.com/free42/skins/ worked first time on my iPhone 11.

Works well. Thank you.
Jaco Mostert
Elec Eng, South Africa
https://47calc.com C47 (s/n 03818 & 06199), WP43 (0015). In box: HP42S, HP32Sii, WP34S&C, HP28C, HP35s, EL-506P, EL-W506, PB700; ex: FX702P, 11C, HP67 & HP85; iOS: 42s Byron, Free42+, WP31S/34S, HCalc.
whuyse
Posts: 198
Joined: Thu Dec 21, 2017 1:23 pm

Re: DM42 skin for the Free42 simulator

Post by whuyse »

Yes, your site works, but it does not have the dm42_12 high-res gif, Thomas ;-)

Cheers, Werner
41CV†,42S,48GX,49G,DM42,DM41X,17BII,15CE, DM15L
Thomas Okken
Posts: 1100
Joined: Tue May 02, 2017 5:48 pm
Location: Netherlands
Contact:

Re: DM42 skin for the Free42 simulator

Post by Thomas Okken »

690×1297 should be enough for anyone. :lol:

(OK, I'm just too lazy to mirror all those sizes. :oops:)
StreakyCobra
Posts: 20
Joined: Thu Jun 14, 2018 10:09 am

Re: DM42 skin for the Free42 simulator

Post by StreakyCobra »

Right now the sensitivity area is not literally "maximized", I only created a fixed-size border that was kind of half the inter-keys space. It probably sometimes overlaps by a few pixels, and sometimes there is a gap, but overall it should already improve usability :) I'll see in practice if it is worth implementing "maximization".

For the issue about downloading from Github, I'm not sure how it is implemented on the app side so I don't know what is causing problems. If I can do something to improve this please let met know Thomas, otherwise I may eventually see if I can quickly generate a "Github pages" with the skin links, somehow.

Size-wise I choose the multiplication factors quite arbitrary. Maybe it makes sense to restrict releases to 2, 4 (what Thomas is mirroring) and 12. The factor 12 was chosen to get a ~2000px wide picture, that should cover most phone/tablet use cases. (my note 10 with wqhd+ is 1440 large).
Thomas Okken
Posts: 1100
Joined: Tue May 02, 2017 5:48 pm
Location: Netherlands
Contact:

Re: DM42 skin for the Free42 simulator

Post by Thomas Okken »

StreakyCobra wrote:
Sun Feb 23, 2020 12:27 pm
For the issue about downloading from Github, I'm not sure how it is implemented on the app side so I don't know what is causing problems. If I can do something to improve this please let met know Thomas, otherwise I may eventually see if I can quickly generate a "Github pages" with the skin links, somehow.
The skin loader in Free42 for Android, iOS, and MacOS looks for URLs ending in .gif or .layout, and only enables the Load button when such a URL is loaded. When you click Load, it loads that URL (again), and the matching one with .gif replaced by .layout or vice versa.

The process is a bit fragile. One thing that trips it up is links that cause redirects, where the actual link that ends up being loaded after the redirect doesn't match the desired pattern. That's what causes it to be unable to load StreakyCobra's links. But there can be other issues as well: when I tried loading a skin from Fossies, it seemed to load successfully, but when I tried to use it, I ended up with a black screen and had to uninstall and reinstall Free42. I think that's because Fossies pretty-layouts text-like formats, so the layout file gets turned into something Free42 can't handle.

As long as you have skins at simple links, which can be loaded without HTTP redirects or text reformatting, they should work in the Free42 skin loader.
StreakyCobra
Posts: 20
Joined: Thu Jun 14, 2018 10:09 am

Re: DM42 skin for the Free42 simulator

Post by StreakyCobra »

Thomas Okken wrote:
Sun Feb 23, 2020 1:59 pm
The process is a bit fragile. One thing that trips it up is links that cause redirects, where the actual link that ends up being loaded after the redirect doesn't match the desired pattern. That's what causes it to be unable to load StreakyCobra's links. But there can be other issues as well: when I tried loading a skin from Fossies, it seemed to load successfully, but when I tried to use it, I ended up with a black screen and had to uninstall and reinstall Free42. I think that's because Fossies pretty-layouts text-like formats, so the layout file gets turned into something Free42 can't handle.
That's the problem then, Github release links redirect with a HTTP 302 to a long URL that does not end with ".gif". I may have a look once if Github Pages with the skin files committed to the repository have this issue as well.

On another topic I have the feeling that high-res skins have issue registering some key presses. With the size 2 I don't have any problem at all, with size 6 there are some miss from time to time, and with size 12 it's hard to use, a non-negligible number of keys are missed. I noticed that with size 12 a slight swipe left or right on a key show the "print-out", that's something that I can't reproduce on size 2.

If I have to guess I would either say it can be due to a fixed (size-independent) number of pixels defining the swipe distance, or to the loading/copy of active layer key (taking more time in high-res) interfering with the handling of key presses. But I haven't got time to look at your code, so those are just suppositions.
Post Reply