maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   HP48GX emulation (https://talk.maemo.org/showthread.php?t=27888)

Electric Lungfish 2010-02-28 20:43

Re: HP48GX emulation
 
Would people prefer a special 'close' button, or a menu that offers a 'close' option as well as a choice of sideways/side-by-side orientation?

For the moment, if you'd like both versions to be installed simultaneously, follow these steps:

1. Install anunakin's x48 package.
2. Download the source tarball from my post yesterday.
3. Do the following as root:
Code:

tar xvfz x48-sideways-0.6.3.tar.gz
cd x48-sideways-0.6.3/debian/x48-sideways/usr/
mv bin/x48 /usr/bin/x48-sideways
mv share/applications/hildon/x48.desktop /usr/share/applications/hildon/x48-sideways.desktop
mv share/icons/hicolor/64x64/hildon/x48_icon.png /usr/share/icons/hicolor/64x64/hildon

4. As root, edit /usr/share/applications/hildon/x48-sideways.desktop and change "/usr/bin/x48" to "/usr/bin/x48-sideways". Change the "Name" field in this file to something meaningful, like "x48 (sideways)".
5. Also as root, execute the following commands:
Code:

update-desktop-database /usr/share/applications
gtk-update-icon-cache -f /usr/share/icons/hicolor
maemo-select-menu-location x48-sideways.desktop

The other files in the package are essentially the same as the normal-orientation versions, so there's no need to copy them.

Electric Lungfish 2010-02-28 20:54

Re: HP48GX emulation
 
BTW, instead of using one RESCALE_FACTOR for both x and y directions I can create different ones for x and y in order to fill the screen. Making the buttons bigger is easy, but getting all of the shadow effects right might not be; it might be better to try multi-color pixmaps (if that's possible). I'll look into it, but perhaps not right away.

andyph666 2010-03-01 10:14

Re: HP48GX emulation
 
Where do you put the rom file??? Thanks.

st5150 2010-03-01 11:03

Re: HP48GX emulation
 
/home/user/.hp48/rom



ElectricLungfish, are the shadow effects really required? The audible clicks from the key taps should be enough user feedback?

andyph666 2010-03-01 11:12

Re: HP48GX emulation
 
st5150: Thank you sir. I put the rom in there. It's not working its just crashing to desktop. Am I supposed to edit a config file to tell it the filename? Or what is the filename supposed to be? Mine is: HP48GXRomfile.bin

lemmyslender 2010-03-01 13:59

Re: HP48GX emulation
 
Quote:

Originally Posted by andyph666 (Post 550848)
st5150: Thank you sir. I put the rom in there. It's not working its just crashing to desktop. Am I supposed to edit a config file to tell it the filename? Or what is the filename supposed to be? Mine is: HP48GXRomfile.bin

Mine is just called "rom" try renaming it.

Electric Lungfish 2010-03-01 17:10

Re: HP48GX emulation
 
Quote:

Originally Posted by st5150 (Post 550839)
/home/user/.hp48/rom



ElectricLungfish, are the shadow effects really required? The audible clicks from the key taps should be enough user feedback?

I guess I'd just like it to look as good as that TI emulator... :)

Electric Lungfish 2010-03-01 17:18

Re: HP48GX emulation
 
Quote:

Originally Posted by lemmyslender (Post 551021)
Mine is just called "rom" try renaming it.

You need a couple other files in /home/user/.hp48 as well; these are created by x48 during initialization.

Move the ROM file to your home directory. Assuming it is named HP48GXRomfile.bin (I obtained mine from hpcalc.org and it's named gxrom-r), execute the following command in the terminal (no need to be root):

Code:

x48 -rom HP48GXRomfile.bin -initialize
It will copy the ROM file to /home/user/.hp48/rom and create the other needed files there. You should see the prompt "Try to recover memory?", to which you should answer "NO".

More info is available in the README file contained in the source package (the .tar.gz file).

st5150 2010-03-02 01:56

Re: HP48GX emulation
 
1 Attachment(s)
Quote:

Originally Posted by Electric Lungfish (Post 551257)
I guess I'd just like it to look as good as that TI emulator... :)

That's great to hear! :D :D :D Let me know if I can help in any way.

I compiled v0.63 on an i386 box and experienced the same random shut off phenomenon while pressing keys as you described. I also tried to simplify a basic expression like x*x using fsimp from the attached fcalc library. It works fine on the i386 build, but hangs on maemo. I vaguely remember something about having to disable shared memory for the display to work properly on i386.

Anunakin 2010-03-03 13:18

Re: HP48GX emulation
 
Quote:

Originally Posted by Electric Lungfish (Post 547045)
Anunakin, did you make any other changes to 0.6.3? If so, I can merge them with these changes.

x48 0.6.3 has two skins, one for horizontal and other for vertical use, on horizontal you must use +netbook option...

I made some changes on x48 0.6.3 sources:

On emulate.c, same way like pinnchus made:
Code:

--- ../temp/x48-0.6.3/src/emulate.c        2010-02-01 13:35:19.000000000 -0300
+++ src/emulate.c        2010-02-24 16:33:07.000000000 -0300
@@ -2452,23 +2452,23 @@
    step_instruction();
 
 #ifdef SOLARIS
-    gettimeofday(&tv);
+    //gettimeofday(&tv);
 #else
-    gettimeofday(&tv, &tz);
+    //gettimeofday(&tv, &tz);
 #endif
-    while ((tv.tv_sec == tv2.tv_sec) && ((tv.tv_usec - tv2.tv_usec) < 2)) {
+    /*while ((tv.tv_sec == tv2.tv_sec) && ((tv.tv_usec - tv2.tv_usec) < 2)) {
        gettimeofday(&tv, &tz);
-    }
+    }*/
 
-    tv2.tv_usec = tv.tv_usec;
-    tv2.tv_sec = tv.tv_sec;
+    //tv2.tv_usec = tv.tv_usec;
+    //tv2.tv_sec = tv.tv_sec;
 
 /* We need to throttle the speed here. */
 
-    if (schedule_event < 0) {
+//    if (schedule_event < 0) {
 //puts("bug");
 //        schedule_event = 0;
-    }
+//    }
    if (schedule_event-- <= 0)
      {
        schedule();

X48.ad.h like on pdaXrom x48 0.4.3
Code:

--- ../temp/x48-0.6.3/src/X48.ad.h        2010-01-29 21:53:20.000000000 -0300
+++ src/X48.ad.h        2010-02-24 16:49:08.000000000 -0300
@@ -4,10 +4,10 @@
 "*gray:                        False",
 "*monoIcon:                False",
 "*useXShm:                True",
-"*smallLabelFont:        -*-fixed-bold-r-normal-*-14-*-*-*-*-*-iso8859-1",
-"*mediumLabelFont:        -*-fixed-bold-r-normal-*-15-*-*-*-*-*-iso8859-1",
-"*largeLabelFont:        -*-fixed-medium-r-normal-*-20-*-*-*-*-*-iso8859-1",
-"*connectionFont:        -*-helvetica-medium-r-normal-*-12-*-*-*-*-*-iso8859-1",
+"*smallLabelFont:        fixed",
+"*mediumLabelFont:        fixed",
+"*largeLabelFont:        fixed",
+"*connectionFont:        fixed",
 "*verbose:                False",
 "*quiet:                        False",
 "*printVersion:                False",
@@ -20,5 +20,5 @@
 "*resetOnStartup:        False",
 "*romFileName:                rom.dump",
 "*homeDirectory:                .hp48",
-"*useDebugger:                True",
+"*useDebugger:                False",
 "*disassemblerMnemonics:        class",

debian/rules: I added a better CFLAG
Code:

--- ../temp/x48-0.6.3/debian/rules        2010-01-30 13:02:47.000000000 -0300
+++ debian/rules        2010-02-24 15:55:06.000000000 -0300
@@ -1,22 +1,23 @@
 #!/usr/bin/make -f
 # -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
 
+# Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
-CFLAGS = -Wall -g
 
-ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
-        CFLAGS += -O0
-else
-        CFLAGS += -O2
-endif
+
+
+CFLAGS = -Wall -g -O3 -mcpu=arm1136j-s -mtune=arm1136j-s -fomit-frame-pointer -fsigned-char -mfpu=vfp -mfloat-abi=softfp
 
 configure: configure-stamp
 configure-stamp:
        dh_testdir
-
-        autoreconf
-        ./configure --prefix=/usr
+        # Add here commands to configure the package.
 
        touch configure-stamp
 
@@ -25,8 +26,8 @@
 
 build-stamp: configure-stamp
        dh_testdir
-
        $(MAKE)
+        #docbook-to-man debian/x48.sgml > x48.1
 
        touch build-stamp
 
@@ -36,7 +37,7 @@
        rm -f build-stamp configure-stamp
 
        # Add here commands to clean up after the build process.
-        [ ! -f Makefile ] || $(MAKE) distclean
+        -$(MAKE) clean
 
        dh_clean
 
@@ -46,9 +47,13 @@
        dh_clean -k
        dh_installdirs
 
+        cd src
        # Add here commands to install the package into debian/x48.
        $(MAKE) install DESTDIR=$(CURDIR)/debian/x48
-
+        # maemo stuff
+        mkdir -p $(CURDIR)/debian/x48/usr/share/applications/hildon
+        cp $(CURDIR)/x48.desktop $(CURDIR)/debian/x48/usr/share/applications/hildon
+        cp $(CURDIR)/x48v.desktop $(CURDIR)/debian/x48/usr/share/applications/hildon
 
 # Build architecture-independent files here.
 binary-indep: build install

For binary compile and run without crash, you need remove libreadline5-dev or libreadline4-dev before run configure script. :eek:

Quote:

Originally Posted by st5150 (Post 548279)
You probably want to wait for the deb from ElectricLungfish who has spent a lot of time turning the app on its side http://talk.maemo.org/showpost.php?p...5&postcount=20 Can't wait!

On N810, I used kenel patched for rotate:
http://3.bp.blogspot.com/_M6e9BjVoy5...3-08-39-01.png


All times are GMT. The time now is 01:13.

vBulletin® Version 3.8.8