dgis / emu48android

Emu48 for Android
GNU General Public License v2.0
54 stars 15 forks source link

49/50g got slower #17

Open SammysHP opened 3 years ago

SammysHP commented 3 years ago

With one of the last releases (currently 2.2) the 49/50g emulation got much slower. For example if I press numbers quickly, they will be inserted in constant intervals, but much slower (maybe 3-4 Hz) than the 48G emulation. Also display updates are lagging and you can see how it gets refreshed in some blocks.

Real calculator speed is disabled.

dgis commented 3 years ago

Hi,

I did not notice that issu. Do you have a scenario to reproduce? Is it intermittent or always? With older versions < 2.2, did the issue happened? Is it only with the hp50/49 or is it also with other calculator models? Is it with a flash Rom file loaded? Is it with the clock displayed? Is it with the haptic feedback enabled?

And if it is not confidential, could you please send me a hp50 state file with which you have an issue?

Thanks in advance. Regis

Le lun. 7 juin 2021 à 15:43, SammysHP @.***> a écrit :

With one of the last releases (currently 2.2) the 49/50g emulation got much slower. For example if I press numbers quickly, the will be inserted in constant intervals, but much slower (maybe 3-4 Hz) than the 48G emulation. Also display updates are lagging and you can see how it gets refreshed in some blocks.

Real calculator speed is disabled.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/dgis/emu48android/issues/17, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEXL7QOMXYR43MHM27SNC3TRTEGHANCNFSM46HWKUHA .

SammysHP commented 3 years ago

Do you have a scenario to reproduce?

Create a new state from the attached calculator and just type numbers.

Is it intermittent or always?

Always.

With older versions < 2.2, did the issue happened?

Cannot say for sure, but didn't notice it previously. Not sure which version worked fine.

Is it only with the hp50/49 or is it also with other calculator models?

Only 49/50.

Is it with a flash Rom file loaded?

From the menu I've selected New, then selected the directory with all the files from the attachment, then selected the only listed 50g model and then saved the state file as suggested by the dialog.

Is it with the clock displayed?

Yes, with and without.

Is it with the haptic feedback enabled?

Yes, with and without.

And if it is not confidential, could you please send me a hp50 state file with which you have an issue?

I've attached the files that I used for the test.

50g_calypso2k.zip

SammysHP commented 3 years ago

Just tested it with the built-in 50g (Eric's real 50g) and it works much better.

dgis commented 3 years ago

I understand now. The KML script Calypso 2K and more specifically 4K are a bit slow, depending on the device. Each time a key is touched or a screen modification is done, the full 2K or 4K image is copied into a Bitmap which is displayed on the screen. I should find a way to update only the updated part (the LCD or the pressed key region). It could help to have a CPU less used to make this copy.

SammysHP commented 3 years ago

I looked at the issue again. Interestingly it doesn't happen with other large(r) bitmaps like "Smart Charlemagne"

$ file calypso2k.png 
calypso2k.png: PNG image data, 1332 x 2106, 8-bit colormap, non-interlaced

$ file charlie_coal.png
charlie_coal.png: PNG image data, 2940 x 2560, 8-bit/color RGB, non-interlaced

Smart Charlemagne is even larger, but works perfectly without any delay. A difference is that Calypso uses an indexed PNG while Smart Charlemagne normal RGB. I've converted the Calypso PNG:

$ file calypso2k_rgb.png 
calypso2k_rgb.png: PNG image data, 1332 x 2106, 8-bit/color RGB, non-interlaced

Sadly no difference, still very slow and lagging.

Maybe it's not related to the KML or image at all but in differences between HP48 and HP49 emulation? On the other hand there are no issues with Eric's Real 50g. And the 4k version of Calypso is absolutely not usable on my old device (Redmi Note 4).

jpmorrison commented 2 years ago

I'm seeing this issue as well as repeating arrow keys in menus/stack with 4K.

I switched to 2K and it's a lot better