Post Reply 
PSE Command on plus42 (Android)
05-09-2024, 01:15 PM (This post was last modified: 05-09-2024 05:18 PM by Peet.)
Post: #1
PSE Command on plus42 (Android)
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?


Attached File(s)
.zip  BJ.zip (Size: 316 bytes / Downloads: 8)

My calculators - former: CBM PR100, HP41CV, HP11C, HP28S - current: HP48G, HP35S, Prime, DM41X, DM42, HP12C
Find all posts by this user
Quote this message in a reply
05-09-2024, 09:56 PM
Post: #2
RE: PSE Command on plus42 (Android)
I'm traveling at the moment... I'll look into this next week.
Visit this user's website Find all posts by this user
Quote this message in a reply
05-11-2024, 10:32 AM
Post: #3
RE: PSE Command on plus42 (Android)
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...
Find all posts by this user
Quote this message in a reply
05-11-2024, 11:52 AM
Post: #4
RE: PSE Command on plus42 (Android)
(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.

My calculators - former: CBM PR100, HP41CV, HP11C, HP28S - current: HP48G, HP35S, Prime, DM41X, DM42, HP12C
Find all posts by this user
Quote this message in a reply
05-11-2024, 12:11 PM
Post: #5
RE: PSE Command on plus42 (Android)
Does it also happen on free42?
Find all posts by this user
Quote this message in a reply
05-11-2024, 01:11 PM
Post: #6
RE: PSE Command on plus42 (Android)
(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.

My calculators - former: CBM PR100, HP41CV, HP11C, HP28S - current: HP48G, HP35S, Prime, DM41X, DM42, HP12C
Find all posts by this user
Quote this message in a reply
05-12-2024, 01:22 PM
Post: #7
RE: PSE Command on plus42 (Android)
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...
Find all posts by this user
Quote this message in a reply
05-12-2024, 01:41 PM
Post: #8
RE: PSE Command on plus42 (Android)
(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)

My calculators - former: CBM PR100, HP41CV, HP11C, HP28S - current: HP48G, HP35S, Prime, DM41X, DM42, HP12C
Find all posts by this user
Quote this message in a reply
05-12-2024, 02:04 PM
Post: #9
RE: PSE Command on plus42 (Android)
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?
Find all posts by this user
Quote this message in a reply
05-12-2024, 02:13 PM
Post: #10
RE: PSE Command on plus42 (Android)
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.
Find all posts by this user
Quote this message in a reply
05-12-2024, 02:18 PM
Post: #11
RE: PSE Command on plus42 (Android)
The bug is also present on Ios, same behaviour. So it is likely to be a platform independant bug...
Find all posts by this user
Quote this message in a reply
05-12-2024, 03:24 PM
Post: #12
RE: PSE Command on plus42 (Android)
(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.

My calculators - former: CBM PR100, HP41CV, HP11C, HP28S - current: HP48G, HP35S, Prime, DM41X, DM42, HP12C
Find all posts by this user
Quote this message in a reply
05-15-2024, 09:21 AM
Post: #13
RE: PSE Command on plus42 (Android)
(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.
Visit this user's website Find all posts by this user
Quote this message in a reply
05-15-2024, 09:27 AM
Post: #14
RE: PSE Command on plus42 (Android)
(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 !
Find all posts by this user
Quote this message in a reply
05-15-2024, 12:06 PM
Post: #15
RE: PSE Command on plus42 (Android)
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.
Visit this user's website Find all posts by this user
Quote this message in a reply
05-16-2024, 04:04 PM
Post: #16
RE: PSE Command on plus42 (Android)
Thanks, the new Version works well.

My calculators - former: CBM PR100, HP41CV, HP11C, HP28S - current: HP48G, HP35S, Prime, DM41X, DM42, HP12C
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)