DM42 skin for the Free42 simulator

Discussion around the Swiss Micros DM42 calculator.
StreakyCobra
Posts: 16
Joined: Thu Jun 14, 2018 8:09 am

Re: DM42 skin for the Free42 simulator

Post by StreakyCobra » Fri Feb 21, 2020 4:52 pm

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: 674
Joined: Tue May 02, 2017 3:48 pm
Contact:

Re: DM42 skin for the Free42 simulator

Post by Thomas Okken » Sat Feb 22, 2020 4:16 am

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: 52
Joined: Thu Dec 21, 2017 12:23 pm

Re: DM42 skin for the Free42 simulator

Post by whuyse » Sat Feb 22, 2020 8:41 am

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
42S #3249S01123
DM42 #00345

Thomas Okken
Posts: 674
Joined: Tue May 02, 2017 3:48 pm
Contact:

Re: DM42 skin for the Free42 simulator

Post by Thomas Okken » Sat Feb 22, 2020 9:37 am

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: 506
Joined: Sun Nov 04, 2018 6:03 pm
Location: Cape Town

Re: DM42 skin for the Free42 simulator

Post by Jaymos » Sat Feb 22, 2020 11:18 am

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
WP34C, HP42S, DM42 for complex math; 35S, 28C, 32Sii, WP34S, EL-506P, EL-W506, PB700; owned FX702P & 11C; used 67 & 85. iOS: 42s (Byron), Free42, WP31S/34S, HCalc.
43S operators right. DM42 sn. 03818.

whuyse
Posts: 52
Joined: Thu Dec 21, 2017 12:23 pm

Re: DM42 skin for the Free42 simulator

Post by whuyse » Sat Feb 22, 2020 1:08 pm

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

Cheers, Werner
42S #3249S01123
DM42 #00345

Thomas Okken
Posts: 674
Joined: Tue May 02, 2017 3:48 pm
Contact:

Re: DM42 skin for the Free42 simulator

Post by Thomas Okken » Sat Feb 22, 2020 2:09 pm

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

(OK, I'm just too lazy to mirror all those sizes. :oops:)

StreakyCobra
Posts: 16
Joined: Thu Jun 14, 2018 8:09 am

Re: DM42 skin for the Free42 simulator

Post by StreakyCobra » Sun Feb 23, 2020 11:27 am

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: 674
Joined: Tue May 02, 2017 3:48 pm
Contact:

Re: DM42 skin for the Free42 simulator

Post by Thomas Okken » Sun Feb 23, 2020 12:59 pm

StreakyCobra wrote:
Sun Feb 23, 2020 11:27 am
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: 16
Joined: Thu Jun 14, 2018 8:09 am

Re: DM42 skin for the Free42 simulator

Post by StreakyCobra » Thu Feb 27, 2020 10:31 pm

Thomas Okken wrote:
Sun Feb 23, 2020 12: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