HP Forums
PSE Command on plus42 (Android) - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: Not HP Calculators (/forum-7.html)
+--- Forum: Not quite HP Calculators - but related (/forum-8.html)
+--- Thread: PSE Command on plus42 (Android) (/thread-21715.html)



PSE Command on plus42 (Android) - Peet - 05-09-2024 01:15 PM

I have a problem with the plus42 (Android 14) v1.1.10 that the PSE instruction causes a program to stop (flag 21 is cleared). With the Windows Version the program runs fine (with the same state-file).

As an short example I addet a .raw with a small BlackJack Game (if you draw more than 21 the prg stops at the PSE in line 49).

Am I missing a setting or is there a bug with the Android App?


RE: PSE Command on plus42 (Android) - Thomas Okken - 05-09-2024 09:56 PM

I'm traveling at the moment... I'll look into this next week.


RE: PSE Command on plus42 (Android) - Vincent Weber - 05-11-2024 10:32 AM

I did import the program on Android, and it seems to work fine. PSE statements show the busy annunciator, then the program resumes.
I also made a stupid program looping around PSE statement and showing random numbers. No problem either.
Not sure what it could be on your side...


RE: PSE Command on plus42 (Android) - Peet - 05-11-2024 11:52 AM

(05-11-2024 10:32 AM)Vincent Weber Wrote:  I did import the program on Android, and it seems to work fine. PSE statements show the busy annunciator, then the program resumes.

I tried it on 2 different Android devices (Amazon Tablet with A.11 and Pixel 6 with A.14) if I hit cards until bust the program stops at the PSE on line 49.

(05-11-2024 10:32 AM)Vincent Weber Wrote:  I also made a stupid program looping around PSE statement and showing random numbers. No problem either.

I tried this too to provide a simlple example and could not reproduce the error with this. So I postet this little BJ but I have at least an other program that shows this behavior.


RE: PSE Command on plus42 (Android) - Vincent Weber - 05-11-2024 12:11 PM

Does it also happen on free42?


RE: PSE Command on plus42 (Android) - Peet - 05-11-2024 01:11 PM

(05-11-2024 12:11 PM)Vincent Weber Wrote:  Does it also happen on free42?

Yes, I tried it a few minutes ago with v3.1.8 (fresh installed) on an HTC U Ultra, same behavior.


RE: PSE Command on plus42 (Android) - Vincent Weber - 05-12-2024 01:22 PM

I pressed "hit" a large number of times, and never caused the program to stop. Could you tell me the exact key sequences that makes the program to stop? I don't know much about blackjack...


RE: PSE Command on plus42 (Android) - Peet - 05-12-2024 01:41 PM

(05-12-2024 01:22 PM)Vincent Weber Wrote:  I pressed "hit" a large number of times, and never caused the program to stop. Could you tell me the exact key sequences that makes the program to stop? I don't know much about blackjack...

If you hit a new card and your value is higher than 21 you bust and the bank gets a point.
How it should be: 10 15 18 23 -> tone 0, "score: 0,1" (new round starts)
How it is on Android: 10 15 18 -> tone 0, 23 (and you could hit another card becase the programs stops at the pse at line 49)


RE: PSE Command on plus42 (Android) - Vincent Weber - 05-12-2024 02:04 PM

I think I've narrowed the problem down.
So far I couldn't reproduce the problem, because I was in QUIET mode.
Since I wanted to hear when the beeps occur, I turned QUIET off, and then I noticed the behaviour you describe. Very strange, it is as if TONE followed by PSE would lead PSE to misbehave! Could you check what happens it the QUIET option is off on Windows?


RE: PSE Command on plus42 (Android) - Vincent Weber - 05-12-2024 02:13 PM

I have tried BJ on Emu42 and it works fine, even if QUIET is off.
So we can confirm a bug on Free42/Plus42, in relation with a TONE PSE sequence.
I couldn't test on Windows, so not sure it is specific to Android. I will test on Ios now and revert.


RE: PSE Command on plus42 (Android) - Vincent Weber - 05-12-2024 02:18 PM

The bug is also present on Ios, same behaviour. So it is likely to be a platform independant bug...


RE: PSE Command on plus42 (Android) - Peet - 05-12-2024 03:24 PM

(05-12-2024 02:13 PM)Vincent Weber Wrote:  I have tried BJ on Emu42 and it works fine, even if QUIET is off.
So we can confirm a bug on Free42/Plus42, in relation with a TONE PSE sequence.
I couldn't test on Windows, so not sure it is specific to Android. I will test on Ios now and revert.

On Windows and with the DM42 it works fine, even with sound.


RE: PSE Command on plus42 (Android) - Thomas Okken - 05-15-2024 09:21 AM

(05-12-2024 02:18 PM)Vincent Weber Wrote:  The bug is also present on Ios, same behaviour. So it is likely to be a platform independant bug...

It does look that way. There appears to be a race condition that causes the simulator core to forget to ask for the CPU when PSE is executed right after TONE. I think this has to do with asynchronous audio playback, which is what happens in the Android, iOS, and MacOS versions, but not in the Windows and Linux versions. I haven't yet figured out what exactly is wrong, but once I do, it looks like I'll have to update the Android, iOS, and MacOS versions of Plus42 and Free42.


RE: PSE Command on plus42 (Android) - Vincent Weber - 05-15-2024 09:27 AM

(05-15-2024 09:21 AM)Thomas Okken Wrote:  
(05-12-2024 02:18 PM)Vincent Weber Wrote:  The bug is also present on Ios, same behaviour. So it is likely to be a platform independant bug...

It does look that way. There appears to be a race condition that causes the simulator core to forget to ask for the CPU when PSE is executed right after TONE. I think this has to do with asynchronous audio playback, which is what happens in the Android, iOS, and MacOS versions, but not in the Windows and Linux versions. I haven't yet figured out what exactly is wrong, but once I do, it looks like I'll have to update the Android, iOS, and MacOS versions of Plus42 and Free42.
Great, thanks Thomas !


RE: PSE Command on plus42 (Android) - Thomas Okken - 05-15-2024 12:06 PM

I implemented a fix and released it as Plus42 1.1.10a and Free42 3.1.8a. The updated versions are on my web site now, and should appear in the Android and iOS app stores soon.


RE: PSE Command on plus42 (Android) - Peet - 05-16-2024 04:04 PM

Thanks, the new Version works well.