Skip to content

Commit 7ae647a

Browse files
committed
Emu42 version 2.5
1 parent 2b7f580 commit 7ae647a

23 files changed

Lines changed: 691 additions & 207 deletions

ReadMe.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,13 @@ LINKS
4646

4747
CHANGES
4848

49+
Version 2.5 (2025-11-15)
50+
51+
- Updated source code with Emu42 version 1.32.
52+
- Fix new UI constraints with Android 15.
53+
- Increase Haptic feedback max duration.
54+
55+
4956
Version 2.4 (2024-10-29)
5057

5158
- Update from the original source code Emu42 version 1.31 from Christoph Gießelink.

app/build.gradle

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,20 @@ if (keystorePropertiesFile.exists()) {
2929

3030
android {
3131
namespace 'org.emulator.forty.two'
32-
compileSdk 34
32+
compileSdkVersion 'android-36.1'
3333
defaultConfig {
3434
applicationId "org.emulator.forty.two"
3535
minSdk 21
36-
targetSdk 34
37-
versionCode 22
38-
versionName "2.4"
36+
targetSdk 36
37+
versionCode 23
38+
versionName "2.5"
3939
setProperty("archivesBaseName", "Emu42-v$versionName")
4040
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
41+
externalNativeBuild {
42+
cmake {
43+
cppFlags '-std=c++11 -fpermissive -Wno-error=incompatible-pointer-types'
44+
}
45+
}
4146
}
4247

4348
if (canSign) {
@@ -74,20 +79,21 @@ android {
7479
path file('CMakeLists.txt')
7580
}
7681
}
77-
ndkVersion '25.1.8937393'
82+
ndkVersion '29.0.14033849 rc4'
83+
buildToolsVersion '36.1.0'
7884
}
7985

8086
dependencies {
8187
implementation fileTree(dir: 'libs', include: ['*.jar'])
82-
implementation 'androidx.appcompat:appcompat:1.7.0'
83-
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
84-
implementation 'com.google.android.material:material:1.12.0'
88+
implementation 'androidx.appcompat:appcompat:1.7.1'
89+
implementation 'androidx.constraintlayout:constraintlayout:2.2.1'
90+
implementation 'com.google.android.material:material:1.13.0'
8591
implementation 'androidx.preference:preference:1.2.1'
86-
implementation 'androidx.documentfile:documentfile:1.0.1'
87-
implementation 'androidx.test.espresso:espresso-contrib:3.6.1'
92+
implementation 'androidx.documentfile:documentfile:1.1.0'
93+
implementation 'androidx.test.espresso:espresso-contrib:3.7.0'
8894
testImplementation 'junit:junit:4.13.2'
89-
androidTestImplementation 'androidx.test:runner:1.6.1'
90-
androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'
91-
androidTestImplementation 'androidx.test:rules:1.6.1'
92-
androidTestImplementation 'androidx.test.ext:junit:1.2.1'
95+
androidTestImplementation 'androidx.test:runner:1.7.0'
96+
androidTestImplementation 'androidx.test.espresso:espresso-core:3.7.0'
97+
androidTestImplementation 'androidx.test:rules:1.7.0'
98+
androidTestImplementation 'androidx.test.ext:junit:1.3.0'
9399
}

app/src/main/assets/Emu42.htm

Lines changed: 26 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
<body>
3030
<div id="headline">
3131
<p>Emu42 - A freeware HP10B/14B/17B/17BII/19BII/20S/21S/22S/27S/28S/32S/32SII/42S Emulator<br>
32-
for Windows 9x, ME, NT, 2000, XP, Vista, 7, 8, and 10</p>
32+
for Windows 9x, ME, NT, 2000, XP, Vista, 7, 8, 10 and 11</p>
3333
</div>
3434
<div id="navi">
3535
<p><a class="nav1" href="#s1">1. General</a></p>
@@ -86,7 +86,7 @@
8686
<h1><a name=s1>1. General</a></h1>
8787
<p><a href="http://hp.giesselink.com/emu42.htm">Emu42</a> is based on
8888
the sources of <a href="http://hp.giesselink.com/emu48.htm">Emu48</a>
89-
and is an emulator for the Hewlett Packard Pioneer serie calculators
89+
and is an emulator for the Hewlett Packard Pioneer series calculators
9090
HP10B, HP14B, HP17B, HP17BII, HP20S, HP21S, HP22S, HP32S, HP32SII,
9191
HP27S and HP42S and for the Clamshell calculators HP19BII and HP28S
9292
hardware. These calculators are based on the 1LR2 Lewis, the 1LR3
@@ -419,10 +419,10 @@ <h2><a name=ss9.3>9.3 Copy Screen</a></h2>
419419
<h2><a name=ss9.4>9.4 Copy Stack</a></h2>
420420
<p>This menu item is enabled for all supported calculator models.
421421
</p>
422-
<p>The decimal point (radix mark) of &quot;Real Numbers&quot; in the
423-
clipboard is equal to the calculator setting. This is important when
424-
you try to paste the numbers into a program using the locale settings
425-
of the host operating system.</p>
422+
<p>The decimal point of &quot;Real Numbers&quot; in the clipboard is
423+
equal to the calculator setting. This is important when you try to
424+
paste the numbers into a program using the locale settings of the host
425+
operating system.</p>
426426
<p>Unsupported objects will be ignored. This prevents sending binary
427427
objects to the clipboard.</p>
428428
<ul>
@@ -437,17 +437,26 @@ <h2><a name=ss9.4>9.4 Copy Stack</a></h2>
437437
to the clipboard.</p></li>
438438
</ul>
439439
<h2><a name=ss9.5>9.5 Paste Stack</a></h2>
440-
<p>This is only valid for the HP28S, the HP32S, the HP32SII and the
441-
HP42S emulation.</p>
442-
<p>To import &quot;Real or Complex Numbers&quot; from the clipboard, the
443-
decimal point (radix mark) of the clipboard and calculator <u>must</u>
444-
match. A real or complex number is only detected in the case of valid
445-
real number characters in the clipboard. Especially heading and tailing
446-
white spaces aren't valid number characters also.</p>
447-
<p>Complex numbers must be in the form <i>(a,b)</i> when using the point
448-
radix mark or in the form <i>(a;b)</i> when using the comma radix mark.
449-
The Cartesian or algebraic form <i>a+bi</i> is not supported.</p>
440+
<p>This is only valid for the HP10B, HP20S, HP21S, HP22S, HP28S, HP32S,
441+
HP32SII and HP42S emulation.</p>
442+
<p>To import &quot;Real Numbers&quot; from the clipboard, the decimal
443+
point character of the clipboard and calculator <u>must not match</u> any
444+
more. There's an auto detection for decoding the thousands separator and
445+
decimal point character. The thousands separator is removed at decoding.
446+
A real number is detected in the case of valid real number characters in
447+
the clipboard.</p>
448+
<p>&quot;Complex Numbers&quot; must be in the form <i>(a,b)</i> when
449+
using the decimal point or in the form <i>(a;b)</i> when using the decimal
450+
comma. Using a thousands separator is not allowed in complex number
451+
strings because in decimal point mode, the comma is used as separator
452+
between real and imaginary part of the number. The Cartesian or algebraic
453+
form <i>a+bi</i> is not supported.</p>
450454
<ul>
455+
<li><b>HP10B, HP20S, HP21S and HP22S</b>
456+
<p>If the clipboard text field content is representing a real number,
457+
paste the text field content of the clipboard to the display-register of
458+
the emulated calculator. Therefore no operator must be pending,
459+
otherwise the paste request is refused.</p></li>
451460
<li><b>HP28S</b>
452461
<p>Paste the text field content of the clipboard to stack level 1 of the
453462
emulated calculator. If the clipboard content is representing a real
@@ -556,7 +565,7 @@ <h1><a name=s13>13. DDE Server</a></h1>
556565
</table>
557566
<h1><a name=s14>14. License</a></h1>
558567
<p>Emu42 - A HP10B/14B/17B/17BII/19BII/20S/21S/22S/27S/28S/32S/32SII/42S Emulator<br>
559-
Copyright (C) 2022 Christoph Gie&szlig;elink</p>
568+
Copyright (C) 2025 Christoph Gie&szlig;elink</p>
560569
<p>This program is free software; you can redistribute it and/or modify it
561570
under the terms of the GNU General Public License as published by the Free
562571
Software Foundation; either version 2 of the License, or (at your option)

app/src/main/assets/ReadMe.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,13 @@ LINKS
4646

4747
CHANGES
4848

49+
Version 2.5 (2025-11-15)
50+
51+
- Updated source code with Emu42 version 1.32.
52+
- Fix new UI constraints with Android 15.
53+
- Increase Haptic feedback max duration.
54+
55+
4956
Version 2.4 (2024-10-29)
5057

5158
- Update from the original source code Emu42 version 1.31 from Christoph Gießelink.

app/src/main/cpp/core/Emu42.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#include "kml.h"
1414
#include "debugger.h"
1515

16-
#define VERSION "1.31"
16+
#define VERSION "1.32"
1717

1818
#ifdef _DEBUG
1919
LPCTSTR szNoTitle = _T("Emu42 ")_T(VERSION)_T(" Debug");

app/src/main/cpp/core/debugger.c

Lines changed: 32 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2144,16 +2144,23 @@ static __inline BOOL OnFindOK(HWND hDlg,BOOL bASCII,DWORD *pdwAddrLast,INT nSear
21442144
i = GetWindowTextLength(hWnd) + 1; // text length incl. EOS
21452145
j = bASCII ? 2 : sizeof(*(LPTSTR)0); // buffer width
21462146

2147-
// allocate search buffer
2148-
if ((lpbySearch = (LPBYTE) malloc(i * j)) != NULL)
2147+
// allocate search buffer (min 5 bytes for symbolic entry address)
2148+
if ((lpbySearch = (LPBYTE) malloc(__max(5, i) * j)) != NULL)
21492149
{
2150+
BOOL bSymbolic;
2151+
21502152
// get search text and real length
21512153
i = GetWindowText(hWnd,(LPTSTR) lpbySearch,i);
21522154

21532155
// add string to combo box
21542156
if (SendMessage(hWnd,CB_FINDSTRINGEXACT,0,(LPARAM) lpbySearch) == CB_ERR)
21552157
SendMessage(hWnd,CB_ADDSTRING,0,(LPARAM) lpbySearch);
21562158

2159+
// is symbolic entry address
2160+
bSymbolic = !bASCII && disassembler_symb
2161+
&& i > 0 && *(LPCTSTR)lpbySearch == _T('=')
2162+
&& !RplGetAddr(((LPCTSTR)lpbySearch)+1,&dwAddr);
2163+
21572164
#if defined _UNICODE
21582165
{
21592166
// Unicode to byte translation
@@ -2180,25 +2187,33 @@ static __inline BOOL OnFindOK(HWND hDlg,BOOL bASCII,DWORD *pdwAddrLast,INT nSear
21802187
}
21812188
i *= 2; // no. of nibbles
21822189
}
2183-
else // hex number input
2190+
else // symbolic entry or hex number input
21842191
{
2185-
// convert HEX to number
2186-
for (i = 0, j = 0; lpbySearch[j] != 0; ++j)
2192+
if (bSymbolic)
21872193
{
2188-
if (lpbySearch[j] == ' ') // skip space
2189-
continue;
2190-
2191-
if (isxdigit(lpbySearch[j]))
2192-
{
2193-
lpbySearch[i] = toupper(lpbySearch[j]) - '0';
2194-
if (lpbySearch[i] > 9) lpbySearch[i] -= 'A' - '9' - 1;
2195-
}
2196-
else
2194+
i = 5; // 5 nibbles to compare
2195+
Nunpack(lpbySearch,dwAddr,i);
2196+
}
2197+
else
2198+
{
2199+
// convert HEX to number
2200+
for (i = 0, j = 0; lpbySearch[j] != 0; ++j)
21972201
{
2198-
i = 0; // wrong format, no match
2199-
break;
2202+
if (lpbySearch[j] == ' ') // skip space
2203+
continue;
2204+
2205+
if (isxdigit(lpbySearch[j]))
2206+
{
2207+
lpbySearch[i] = toupper(lpbySearch[j]) - '0';
2208+
if (lpbySearch[i] > 9) lpbySearch[i] -= 'A' - '9' - 1;
2209+
}
2210+
else
2211+
{
2212+
i = 0; // wrong format, no match
2213+
break;
2214+
}
2215+
++i; // inc, no. of nibbles
22002216
}
2201-
++i; // inc, no. of nibbles
22022217
}
22032218
}
22042219

0 commit comments

Comments
 (0)