Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - gigi1237

Pages: [1] 2
HP Calculators / Re: HP Prime Emulator
« on: November 17, 2018, 02:39:42 pm »
Well I was a bit bored for the past week so I took another stab at the emulator and finally got it mostly working(tm) :w00t::w00t:

And by mostly working I mean it can run the official firmware (version 20130808) relatively well, you can interact with is and most functionality is working, although there is no touch support
whatsoever yet. There is also no GUI keyboard so we have to use the keyboard's physical keys to control it and the key bindings are quite weird. RTC is also not fully working either.

There are also some small screen refresh issues but nothing too serious. Here's a little demo video

HP Calculators / Re: HP Prime Emulator
« on: May 18, 2018, 10:11:49 am »
I checked and input is definitley not interrupt based. Looking at the BESTAARM code it appears that it runs in a separate thread. I think this is the problem, thread scheduling is likley based on on of the internal timers (likley timer2 as it is the only unmasked one), the RTC tick timer does not appear to be relevant to this. The thing is that the current exynos implementation is broken and the timers are not firing. I tried to fix it but it appears they're still not working. I'll commit it to github in a few hours, could you take a look at it boricj?

Edit: I'm a dumbass I never actually tired to fix the timers, just the RTC tick. So yeah... Ignore that

HP Calculators / Re: HP Prime Emulator
« on: May 03, 2018, 04:52:12 pm »
Sweet, great solution! I theorize lack of input is probably due to a missing external interrupt triggered by keypresses.

HP Calculators / Re: HP Prime Emulator
« on: May 03, 2018, 01:55:11 pm »
Tried pressing C-F-O on my calc while powering up from usb, no dice. Needs to press the reset button. Would you be able to implement it in qemu? So we can then get into the diag utility.

The recovery doesn't work because it sets up the graphics buffer in a different way, one that isn't really supported by the datasheet. I'll try to implement that mode too soon.

HP Calculators / Re: HP Prime Emulator
« on: May 03, 2018, 12:22:24 pm »
Apologies, I forgot to commit the last changes to github so you were still running and old version of qemu. Nonetheless, I tried making images that way and I get the same result as yours. I think the problem is that they are missing something that is not included in the update files. The dumped image I have confirms it. Try to boot with it:, you should get to where I got in the screenshot.

I also was not planning of low level emulating the nt11002, but I think the firmware could provide us with good information about the i2c protocol it uses.

Do you happen to know on what pin is the reset switch on the prime?

HP Calculators / Re: HP Prime Emulator
« on: May 02, 2018, 05:43:58 pm »
So I managed to get ahold of the NT11002 datasheet. Sadly it contains nothing particularly useful. Most of the functionality is determined by the firmware as it's basically a 8051-compatible processor. So I guess we should try to get a dump of the firmware on the prime. There might be something in the update images, if the driver is anything like the linux one, which basically tries to perform a firmware update everytime it intializes the NT11002.

For the images I tried to build them by appending the files in the order you mentioned, one after the other and then using truncate to get the image to 256Megs. Which matches the image I have. But the image refused to boot. So either I appended in the wrong order, different versions don't work or there is other data beyond that supplied in the firmware updates.

I was also unable to get into the diagnostic tool. SInce it requires the reset button to be pressed and the emulator does not implement that yet. This, along with implementing touch and getting video to be more stable should be the two main priorities for the emulator right now.

I managed to dump the Touch controller's firmware from the diagnostic utility executable. The challenge will be analyzing it now. If anyone is interested PM me and ill send you a copy.

HP Calculators / Re: HP Prime Emulator
« on: April 30, 2018, 08:41:42 pm »
Hey guys, just a quick update. I recently tinkered with the emulator a bit more and finally got the original prime OS to boot  :w00t: :w00t:

I'm using a flash dump done through jtag to boot from posted on one of the formus, don't remeber which. I tried to manually make flash images from the update files but none of them seem to work so far. Still this is good progress. Although everything is just mostly a massive hack at this point. The next challenge will be getting the touch input working. This won't be easy at all since the nt11002 touch controller chip appears to be undocumented except for a few source files for linux drivers.  :mad: :banghead:

HP Calculators / Re: HP Prime Emulator
« on: October 27, 2017, 10:34:05 am »
My best best is something being wonky in the DRAM configuration registers. Right now I'm initializing the values to the defaults found in the s3c2416 manual, these might be incorrect for the prime or even plain wrong in general (its happened already).

If you could poke around and dump the values of the registers relating to memory you'd do me a huge favor. At the moment I've got no way to use the GDB stub on my Prime.  :-\

HP Calculators / Re: HP Prime Emulator
« on: October 25, 2017, 09:54:53 am »
I've been bashing my head on the emulator. I've narrowed down the biggest issue at the moment being memory allocation being incorrect. Does anyone know exacly how the RAM/SRAM is mapped on the Prime? Because if I allocate 32mb at 0x30000000 the prime tries reading and writing above that too, even though it correctly detects the amount on memory in the UART output logs.

HP Calculators / Re: HP Prime Emulator
« on: September 03, 2017, 02:35:44 pm »
You can't emulate this at the system level without the various system call API.....where are you going to get that? I doubt if HP is just going to give it to you....
just curious...

My original project was doing exactly this. The way I obtained the SysAPIs was by reverse engineering the calc's firmware. So no need for HP to hand them over.

The new project is a hardware level emulator.

HP Calculators / Re: HP Prime Emulator
« on: August 19, 2017, 10:48:31 am »
Yep I'm perfectly aware of that. I initially thought it was because the interrupt controller was not working properly but that can't be the case because the boot process breaks before unmasking any interrupts. I for the life of me can't figure what unimplemented system is causing the failure to boot.

Debugging with gdb does not provide anything too useful as the fault occurs far from where the code hangs.

HP Calculators / Re: HP Prime Emulator
« on: August 19, 2017, 10:01:48 am »
Great changes, nice idea of using the exynos uart. It appears to be similar (identical?).

But I'm still stuck as to why the original prime_rom won't boot. I'm really at a loss.  :banghead:

HP Calculators / Re: HP Prime Emulator
« on: August 18, 2017, 02:03:29 pm »
Thank you very much. I'll try to get it running in qemu now

Just a little update. Got ripem to run! No functionality yet as GPIO is not implemented yet but it's giving me correct graphical ouput.  ;D ;D ;D

Edit (Eeems): Merged double post

HP Calculators / Re: HP Prime Emulator
« on: August 17, 2017, 06:00:08 pm »
Thanks for giving the link to the UART log, it was helpful. The output qemu is giving me is slightly different: Mainly becaus it spams me with "B"s right after printing start. I haven't figured out why yet though. Probably some mistake in the UART implementation.

I also uploaded my qemu branch to github: I'd be very glad if you could check it out. Mainly the s3c2416.c file, as i generated the rest automatically from the datasheet (except s3c2416_lcd.c). I'd be very happy to have some feedback especially if you spot any mistakes. Keep in mind the code is literally hacked together at the moment. I've done many things I shouldn't have as I was just basically playing around to see if I could get anything working. Most things are not even close to functional and I wasn't even following any coding convention although I should have been. If you feel like it, you could contribute and send a pull request, but I know you're busy.

Right now I'm a bit stuck with it, don't really know what exactly to do next to get it working. I'm especially in a hard spot because I don't have acess to my IDA Pro databases of both the OS and the bootloader which would help a ton with debugging at this stage.

HP Calculators / Re: HP Prime Emulator
« on: August 12, 2017, 10:46:23 am »
I thought I had written another reply before but I'm either crazy or it somehow got deleted.

Anyway I've attempted to hack up something with qemu. Figured out how it works, kind of and got to the point of having most of the first stage bootloader run, reading the rest from NAND and finally starting the os I assume (don't remember the exact address it hands off execution to). It's also throwing the usual uart startup output at me. But it's crashing somewhere after that and I haven't been able to figure out why yet.

Do you happen to have a UART dump from the prime? The output it gives at startup, as I have no ability to grab it for myself right now. So I can compare it to the output I'm getting.

Also I haven't posted the source yet because it's so bad I'm embarrassed about it  :-\ If you're interested I can do it anyway though. 

Pages: [1] 2