Régis Cosnier's pages
regis(dot)cosnier(at)free(dot)fr

Emu48 for Android
Fork me on GitHub

This project ports the Windows application Emu48 written in C to Android.
It uses the Android NDK. The former Emu48 source code (written by Sébastien Carlier and Christoph Giesselink) remains untouched because of a thin win32 emulation layer above Linux/NDK!
This win32 layer will allow to easily update from the original Emu48 source code.
It can open or save the exact same state files (state.e48/e49) than the original Windows application!

Some KML files with theirs faceplates are embedded in the application but it is still possible to open a KML file and its dependencies by selecting a folder.

The application does not request any permission (because it opens the files or the KML folders using the content:// scheme).

The application is distributed with the same license under GPL and you can find the source code here:
https://github.com/dgis/emu48android


QUICK START

1. From the left side, slide your finger to open the menu.
2. Touch the "New..." menu item.
3. Select a predefined faceplate (or select a custom KML script folder).
4. And the calculator should now be opened.


REQUIREMENTS

Android version 4.4 or later.


DOWNLOAD

The latest source code is available at github.com/dgis/emu48android

SCREENSHOTS



NOT WORKING

- Disassembler
- Debugger
- Serial Ports (Wire or Ir)


LICENSES

Android version by Régis COSNIER.
This program is based on Emu48 for Windows version, copyrighted by Christoph Gießelink & Sébastien Carlier, with the addition of a win32 layer to run on Android.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

Note: some included files are not covered by the GPL; these include ROM image files (copyrighted by HP), KML files and faceplate images (copyrighted by their authors).
The Eric's Real scripts ("real*.kml" and "real*.bmp") are embedded in this application with the kind permission of Eric Rechlin.




50 comments

2019/04/10 17:31:09 gastopaul
It would be nice if there was the "Hide the status bar" option on settings to increase the calculator. Many thanks for this free app.

2019/04/14 00:29:19 Wesley
Great application!!! It's better than Droid48 and we can simulate other models. I'm missing "Hide the status bar" too. But...it's perfect, like PC.

2019/04/24 16:53:38 Alejandro
Great!, thank you for the app. Can you tell me how to load objects (i.e. programs downloaded from hpcalc.org) once I have choose a Kml. Many thanks.

2019/04/29 15:15:13 Nick
I really like it! I use it daily. Many thanks. Can I make a small request? When starting it shows the KML compilation result. I have to click on ok (and click on new). Is it possible to start a default one calculator without clicking on the ok button?

2019/05/15 14:19:08 Johan
Really great. The only thing that would make it even better is a true full screen mode which hides both the status bar and soft keys.

2019/05/27 03:03:47 SurveyChad
Excellent, Really happy with this! I can key in a program and it takes it. I just need to figure out how to transfer my programs to my other Android device and my chromebook and of course to Windows. I will probably have to get a Windows tablet now as well. Thanks Regis!

2019/07/20 05:50:55 HP48guy
Thank you so much. I have used an HP48gx for many years to do so many things. To have a true emulation on android is a dream I have had for a while. I use my 48 as the control panel for my homebreq CNC machine using the RS232 interface. Is there any chance of making the I/O work! (Still dreamibg)

2019/08/29 04:55:10 HP48guy
I am using a KML file from my PC version of Emu48 and i found the keys were not responding to me (I had to touch a little high to make it work) By adding 10 to each y value in the offset for eacH key in the KML file it now works great for me. I used the following one liner in bash (Termux) to fix it. gawk \'/Annunciator/{go=1}go==0{print;next}/Offset/{printf(\"%8s%s %d %d\\n\",\" \",$1,$2,$3+10);next}{print}\' matt.kml | tee matt1.kml Thanks again for a great program, Matt

2019/09/11 15:09:02 Regis
@Nick There is an option to hide the KML compilation at the start in the settings. @gastopaul and @Johan It is now possible to hide the status and/or navigation bar. @HP48guy By default, in Android, there is no serial port, so, it sound difficult. For the KML bad offset, I did not have any issue with existing KML. You can email me your KML script and image.

2019/09/14 12:24:35 jp
Merci pour ce portage. On avait déjà le très bon droid48, mais qui se limitait à la hp48S/SX/G/GX. Mais là c\'est cool de pouvoir profite de la HP50G. Le rendu du KML 50G calypso 2K rend super bien. Personnellement, j\'aimerais bien que la touche \"retour\" d\'android puisse être mappée sur la touche \"on\" de la hp. (comme sur droid48).

2019/10/23 15:37:09 JeJaTy
J'ai la même question que Alejandro: comment transférer des objets entre Smartphone et PC et les éditer sur ce dernier?

2019/10/23 18:01:00 Regis
JeJaTy Je ne pense pas qu'on puisse éditer un objet de la pile hp48 sur pc. Il faudrait convertir le programme en string d'abord. Puis, dans le menu d'Emu48 faire "Copy Stack". Et faire, paste dans ce que vous voulez. Email... Éditer l'email sur pc. Renvoyer l'email, sur smartphone, Copy la string, puis dans Emu48 faire "Paste Stack". Convertir en objet si c'est un programme. Et voilà. Ça peut ou pas marcher... Sinon, pour copier des programmes, il vaut mieux utiliser "Load Object..." ou "Save Object..." qui utilisent le format binaire et natif.

2019/10/30 15:35:47 JeJaTy
Dommage, à l'époque de la calculette HP48 il existait divers Programmes de transfer entre celle-ci et le PC (p. ex. Transfile ou Kermit). Je pensais qu'il y en aurait un pour Android. Merci tout de même.

2019/10/30 17:16:27 Earl Z
New to smartphones but not the physical HP48S and HP48GX. Thank you.

2019/11/25 11:55:43 Bolivia
La mejor Aplicación qué encontré!!!!! Una Ayuda ¿como puedo Instalar Programas?

2019/11/29 23:02:45 Fran
I can't use kml from here : https://www.hpcalc.org/details/7327 Any suggestion?

2020/01/13 20:57:20 Franklyn (Franklyn2206@yahoo.de)
Hello, At first, thank you very much for EMU48 for Android. It's a wonderfull program and i like it very well. :-) But I have a problem: I created a Ram-Card of 4mb, but cannot use it in my HP50g. In settings i pointed to the "Shared-4mb.bin" and set the nodches "port 2 is pluged" and "port 2 is writeable" to "ON". But my Calc don't have it. :-( Why ?? What can i do to use my 4mb Ram-card ?? Thank you for any idea. Best greetings from Cologne / Germany x

2020/01/16 09:31:20 Regis
Hi Franklyn, The RAM card is only for the HP48. The flash of the HP49/50 is not well supported and you will have to follow the directions in the menu "About Emu48..." to use it. It is not perfect yet! I hope that it could be improve one day. Cheers, Regis

2020/03/01 15:58:19 Gérard robert
Merci pour le portage sur Android de ce calculateur mythique comme toutes les autres modèles eg HP28S. Je possède une HP48GX et une HP28S Cordialement. Robert

2020/04/18 04:38:44 Jerry Ch
Excellent program!! Thanks for the Android version, I have used it since Pocket PC versions and it's really great. Just one issue, when you install a library and switch on again, calculator executes a hard reset and delete all your memory and programs! Please your support to correct this issue. Thanks and best regards Jerry Ch

2020/08/09 19:30:26 Anuar
Are you planning to make the serial port work? I'm using a USB to rs232 adapter in android with no problem, it would be awesome to use it from the emu! Thanks

2020/11/15 17:09:29 @Regis
@Jerry Ch, I'd like to try your library, you can send it by email. @Anuar, I hope to support RS232 with the Android USB port using the free lib https://github.com/mik3y/usb-serial-for-android And maybe also via Bluetooth if that is possible.

2020/11/17 23:38:32 Fernando
I upgraded to version 2.0, and set "haptic" to zero. I close the calc HP50g, and when i open it again the "haptic" appears at 25. I set "haptic" to zero again, save it and close the HP50g. But when I open it the "haptic" appeared at 25 again. Hopefully you can fix it, while i'll go back to version 1.9.

2020/11/22 16:39:01 @Regis
Sorry for that. Actually, it seems that all the settings are gone. I'm tying to fix it... ...I hope that it is fixed in version 2.1

2020/11/30 01:44:33 HP48guy
I upgraded to 2.1 and it won\'t read my custom kml file if I exit Emu48 and the fire it up again. I downgraded to 2.0 (and 1.8 and 1.9) and can\'t get it to work. If I load my kml, it works fine if I done close the caculator. When I close and reopen using my kml it says \"existing script cannot be found, trying the compatible script jmac.kml\" and freezes with jmac\'s skin. Close and reopen - black screen. If I can open the side menu and select \"New\" I can clear memory but it is still frozen. The only way back seems to be force stop, clear cache and data, and start over. I am puzzled that downgrading doesn\'t seem to fix it. It worked fine before the latest upgrade. Seems like a storage access problem. I am using a Samsung T510 tablet with Android 9. It stops being able to find my kml in internal storage on the tablet.

2020/11/30 06:27:49 HP48guy
I noticed Emu48 has no storage permissions

2020/11/30 22:20:54 HP48guy
Is there a directory I can put the kml in and assure it will be found? The /data/data directories for Emu48 don't seem to have data files like the default kml files. Thanks

2020/12/03 05:25:52 HP48guy
I noticed Emu48 has no storage permissions

2020/12/05 21:06:35 Regis
@HP48guy, actually, when you select the KML folder, you give the permission to Emu48 to read in this folder. If you clear the app data/cache, you lose this permission and you need to select again the folder where is the KML file. It is possible that there are some bugs because with version 2, I change the way to save this folder path. I think that I reproduced your scenario. I will try to make it works properly...

2020/12/07 01:31:39 HP48guy
The app asked to select the folder for custom KML files every time I cleared the cache and data. However, it never seemed to remember the selection if I closed the app (without clearing the cache or data) and then reopened it. It also didn\'t ask to select the KML folder unless I cleared cache/data. Thanks so much for your time and help.

2020/12/09 12:44:39 Regis
@HP48guy, I hope that the version 2.2 will fix those issues. Actually, if the data are cleared, or after removing and then reinstalling the app, the custom KML is lost and a compatible KML script is searched in the embedded scripts. In this case, you have to search again the custom KML script. It should be persistent, now. Updating the app will keep the permissions and still allow to load the custom KML script.

2020/12/10 21:02:20 HP48guy
That fixed it. The KML choice is persistant. Took care of all my problems. Thanks

2020/12/24 05:57:06 Jerry Ch
@Regis Issue solved. I have used the tool Manage Flash ROM, I have created a Flash ROM file for my current KML and now I can install any libraries without problem! Thanks for all improvements in this great app, congrats! Best regards Jerry Ch

2021/05/27 01:07:25 HP48guy
Just wanted to say I have not had any problems with the app since your fix. Thank you so much. I use this app a lot and I have many programs loaded and my custom KML. I has worked flawlessly. Matt

2021/09/14 09:55:34 HP484ever
Hello Guys ! First of all THANKS A LOT for the work done for creating emu48 and for it's version for Android. It's wonderful to continue to use our old fantastic HP48 but at modern high speeds ! I'm french, I'm nearly 60 and I have been recently interested in navigation. The application that is the one I chose is the application of F.Metcalf (RIP)/Sparcom https://www.hpcalc.org/details/7082. This program is available on 2 format/editions on hpcalc : one .bin for HP48 (nav-2.5.1.bin) and one "standard" .lib library file for HP49-50 (nav-2.5.1..hp49.lib). 1 - I've succeed in installing the .bin version on my 48sx and that works perfectly and very accuratly, but the speed is catastrophic due to the low clock of the CPU. My aim since several months ahead is to get the Sparcom program running on my Android Phone on which, with Emu48, are installed emulated HP48SX, GX, 49 et 50G to get full speed operation. All simulated calculators versions run perfectly :-) I have read many forum (not so many because related topics are not so numerous and these calculators gold age was in the 90's) but, if I think I have understood a lot about ROM card dumps, today my target of last year is not reached :-( 2 - I've first tried with the .lib file in the HP49-50 emulated but, if the library is installed and works for several functions, the program send a memory error message for some functions that I suppose to need more memory than the others (ALM function by example). As the original lib version was for HP48, not sure that the transposed version for HP49 & 50 works for these functions (no proof find after quite long and numerous searches on the net). 3 - Then I've tried with the .bin file for HP48sx emulated. If my understanding is correct the "standard" binary format of ROM is a so-called "packed" format (I've made the assumption that it was the case for the nav-2.5.1.bin ? to be confirmed) and the binary format used for emu48 port is "un-packed" format. Fortunately, a tool named Rom2emu.exe exists and is aimed to this transcoding. But I try yesterday night to run this file from my PC (command line C:\>Rom2emu.exe filesource.bin fileresult.bin with files Rom2emu.exe and filesource.bin at c: root) but with no success : no file is created. This is where I am :-( I hope that somebody can answer to this message but whatever again many thanks for all the huge and amazing job already done and in advance for your eventual help on my difficulties despite my numerous and long efforts for several months ! Jean-Yves.

2021/09/14 09:59:30 HP484ever
If this help the source of my process : http://charles.hamel.free.fr/EMU48-SITE/Emu48/Skins/Hp48Image.txt

2021/09/15 10:29:23 HP484ever
Hi ! Eurêka ! Yesterday an assumption came to me : perhaps the Rom2emu.exe program did not work with the command line on my computer because it is with W10 ? So I tried with an old computer with W98 and guess what happens ? It worked ! And very easily I load it in the EMU48 emulated HP48sx on my Android phone and all works fine !! So I take this new opportunity to THANKS VERY MUCH again all the team, I mean SEBASTIEN Carlier, CHRISTOPH Gießelink and you REGIS for all the great work you've done to make it possible so easily for us the "standard" users ! I wish and hope that all the useful web sites (as this one) and the forum that deal with the HP calculators will continue for a long time their already long life ! Best Regards, Jean-Yves.

2021/09/28 18:27:05 Regis
@Jean-Yves Sorry for the late answer. I'm glad you managed to make it work. I forgot about the point that you need to feed the Emu48 port2 with an un-packed binary. I just tested, and with the following command: ROM2EMU.EXE nav-2.5.1.bin nav-2.5.1-for-emu.bin I succeeded to put "nav-2.5.1-for-emu.bin" in port2! Actually, for Windows 10, you can find a new working version of "ROM2EMU.EXE" here: https://www.hpcalc.org/details/4767 or here directly from Christoph web site: https://hp.giesselink.com/Emu48/CARDUPL.ZIP

2022/02/17 09:30:10 fernando.echeverria@hotmail.es
Dear Regis: First of all: I am sorry for the mistake in my previous note. I meant Emu48 for Android. The point is that I am trying to accomplish the task that follows. I am writing you respectfully for your merit to develop and publish Emu48 for Android. There are reasons: The first one, if possible, is to ask you a manual or guide-document to use Emu48 for Android. The second one is to consult you con the following topic: Is it possible using Doid48 to transfer a list or a string stored in Android into the emulator Emu48 for Android starting from a routine running in the emulator? Is it possible to write a routine for Emu48 for Android or to have a command in Emu48 for Android to bring a list or string from a file stored in the operative system, this is in Android? Allow me a comment: For Emu48 for Windows, it was developed a program named DDE48 that makes possible this transfer. It would be an excellent option to have a routine running in Droid48 or Emu48 for Android to make this task. Any help or suggestion from you will be appreciated. Thank you in advance, Sincerely: Fernando Echeverria Email: fernando.echeverria@hotmail.es

2022/02/20 17:47:18 Regis
@fernando.echeverria 1) The application is as close as possible to Emu48 for Windows. I recognize that sometimes it is a different from the original version. I do not have enough time to write a guide like you requested. 2) With Android, it is possible to communicate between application with the Intent. But from where, and toward what? I don't understand where you want to transfer the data. May be a better option will be to transform an object to a string inside the emulated calculator and then, copy/paste it to something else... Or the opposite.

2022/02/25 22:35:59 HP48guy
I finally got to experiment with the serial communication and it works flawlessly. I can now use my tablet to control my CNC machine. I had been worried that my old HP48GX calculator would break and I would not have a replacement. Thank you so much, I have wished for this for a long time. Matt

2022/04/05 18:20:36 fernando.echeverria@hotmail.es
Dear Regis: Sorry for the delay in answering. In reference to the point 2) in your previous answer allow me these comments: Certainly it is possible to copy and paste in both directions. However, this is a manual procedure. It should be repeated every time that is required. The idea is to have an “automatic or programmed procedure”. The initiative to use an Intent seems to be an appropriate alternative, though I should recognize that my background in Android is not that strong. In reference to your question about where to transfer the data allow me to explain my problem: Imagine that androidEmu48 is installed in a Tablet (Android - compatible). Imagine the tablet interfaced with a microcontroller The microcontroller transfers data (a list or a string) let’s say in (binary or ASCII) to the Tablet to a specific file, let’s say: Android/Data/datatest However androidEmu48 requires the information contained in file datatest as an income to be used in a routine developed for androidEmu48. Please, notice that file datatest is a file external to androidEmu48 though androidEmu48 and datatest are embedded in Android. The problem is: ¿How transfer datatest contends to level 1 in the stack of androidEmu48 automatically (i.e. through a command or routine either from androidEmu48 or an external command) to carry on the programmed sequence automatically? Certainly the opposite procedure is also useful. Also, it could be possible to obtain these result using a different approach. Please, any solution or suggestion from you will be appreciated. Kind regards: Fernando Echeverria

2022/04/05 18:48:59 fernando.echeverria@hotmail.es
Dear Regis: Post Data: Perhaps I should mention that I use HP50G emulator for my work. Fernando Echeverria

2022/04/16 18:57:27 HP48guy
It sounds like you could do much the same as I have done to run a CNC machine. I, however, use the HP48GX emulation. In the HP48GX, XMIT sends a string from the stack to the serial port. BUFLEN gets the number of characters in the serial port receive buffer, SRECV get those characters to the stack. Now that the serial comm works in, EMU48 Android, this is possible. Simply do all communication with the microcontroller as ASCII. Matt

2022/04/16 19:03:31 HP48guy
I notice the original HP50G does not have a normal RS232 port but, in the emulator that should not be a problem. Does the HP50G have XMIT, BUFLEN, and SRECV? Matt

2022/04/16 19:08:53 HP48guy
see: https://www.hpmuseum.org/forum/thread-4416.html

2022/04/17 19:09:39 Regis
@HP48guy I tested with a real HP48SX and HP49g and it works quite well: * You have to enable the "mode OTG" on your Android device (on my device, it is a tile to check above the notification area). * Then, plug in your USB/serial cable adapter. * Then, in the Emu48 for Android settings, scroll at the bottom, and click on "Wire", and select your USB/serial cable adapter. * Then, it is better to manually make an "OPENIO" inside the calc (you should see a message 'Connected' at the bottom). The serial transmission should work very well from the serial device toward Emu48 for Android, but I artificially slow down the characters transmission in the opposite direction from Emu48 for Android to a true HP4X calc. Else, some characters are lost by the true HP calculator (I don't know why yet)! I tested form Emu48 for Android to Emu48 for Windows too, and it works too. It also works between 2 emulated HP50g (I did not tested with a real HP50g). Yes, the IO menu is still accessible with: 109 MENU (104 MENU is good too) where you can see the former serial commands which work in HP40g too).

2022/04/17 19:58:40 HP48guy
Yes, I followed those instructions and was very successful running my CNC machine by using the serial communication I described above. Note, I used 2400 bps communication rate. Thanks again, Matt

2022/04/18 03:56:47 HP48guy
Just for clarification, the 2400 baud was necessary to use the true HP48 calculator. I never tried a higher baud rate with Emu40 for Android. It may work fine. Matt

2022/04/18 03:58:04 HP48guy
I never tried a higher baud rate with *Emu48* for Android. shoot


From
Text

Human factor: please enter "MOB" in this field

Page size about 56758 octets. Server generation in 0.032 seconds. Client load in seconds.