Author Topic: Let's hack the HP Prime!  (Read 128143 times)

0 Members and 1 Guest are viewing this topic.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Re: Let's hack the HP Prime!
« Reply #30 on: August 20, 2013, 12:49:39 pm »
Indeed. Just warning in case there are some potential new members who might get interested in hacking but don't know well enough about ethics and morals.

Offline timwessman

  • LV3 Member (Next: 100)
  • ***
  • Posts: 94
  • Rating: +32/-0
    • View Profile
Re: Let's hack the HP Prime!
« Reply #31 on: August 20, 2013, 12:50:07 pm »
(the calc simulator software is more annoying to work with - we/I'm not sure exactly when it decides to save stuff...)

On exit. Everything is only saved when either more memory is needed (and then it will write out loaded objects), or on power down.

Loading is also delayed until needed. Some of the mysterious bits you have trouble interpreting are flags indicating status, location in memory, or similar.
TW

Although I work for the HP calculator group, the comments and opinions I post here are my own.

Offline Adriweb

  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1708
  • Rating: +229/-17
    • View Profile
    • TI-Planet.org
Re: Let's hack the HP Prime!
« Reply #32 on: August 20, 2013, 12:53:48 pm »
Ah, thanks for the details :)  (For some potential data editor, would setting these bytes to '0' (or duplicate from a known number) be a bad idea ?)

(For the simulator, I also believed it was on exit, but at several occasions, Windows couldn't see the file as updated... so that's why. No problem with the connectivity kit, though, since saving was manually done)
« Last Edit: August 20, 2013, 01:03:39 pm by adriweb »
My calculator programs
TI-Planet.org co-admin.
TI-Nspire Lua programming : Tutorials  |  API Documentation

Offline SpiroH

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 729
  • Rating: +153/-23
    • View Profile
Re: Let's hack the HP Prime!
« Reply #33 on: August 20, 2013, 01:06:26 pm »
That's probably the goal of this topic, as stated by DJ in the first post ?
The hpwiki could contain such information as well.
Yeah, this time, i completely with you, weird he? ;) Sooner or later that info will be uncovered, anyway.

Offline Keoni29

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2466
  • Rating: +291/-16
    • View Profile
    • My electronics projects at 8times8
Re: Let's hack the HP Prime!
« Reply #34 on: August 20, 2013, 01:13:40 pm »
Guidebook, firmware and linking software did leak last week on the HP FTP server and were quickly removed:
http://tiplanet.org/forum/viewtopic.php?f=55&t=12867&lang=en
Come on, it can only have been done on purpose, IMHO!
BTW, has any you managed to get hold of the "HP-Connectivity Kit"? That would be really interesting. And also the booter code, of course!

Good news, nevertheless! ;)

Quite possible. Their time is more expensive than ours.
If you like my work: why not give me an internet?








Offline critor

  • Editor
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2079
  • Rating: +439/-13
    • View Profile
    • TI-Planet
Re: Let's hack the HP Prime!
« Reply #35 on: August 20, 2013, 01:16:12 pm »
SpiroH -> You might ask to people who did post in the HP-Museum topic:
http://www.hpmuseum.org/cgi-sys/cgiwrap/hpmuseum/forum.cgi?read=247985#247985
« Last Edit: August 20, 2013, 01:16:50 pm by critor »
TI-Planet co-admin.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Let's hack the HP Prime!
« Reply #36 on: August 20, 2013, 01:17:02 pm »
(the calc simulator software is more annoying to work with - we/I'm not sure exactly when it decides to save stuff...)

On exit. Everything is only saved when either more memory is needed (and then it will write out loaded objects), or on power down.

Loading is also delayed until needed. Some of the mysterious bits you have trouble interpreting are flags indicating status, location in memory, or similar.
Sometimes, I keep the save folder open on my computer in case I mess up. If I fear that the calc could crash, requiring a reformat (although so far things are fine) or if I worry about messing up my program, I just copy the hpprgm files into a different folder.

Question: What kind of data is stored into RAM? When a program is executed, for example, is it copied to a certain RAM area, forcing a size per program limit? Are programs always stored in RAM then backed up in Flash when the calc is turned OFF (to prevent them from being lost on a reset)? How large are each GROB memory areas?

If the GROBs are quite large, this could definitvely be an awesome RAM area to store content for use with ASM/C  programs.

Offline Keoni29

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2466
  • Rating: +291/-16
    • View Profile
    • My electronics projects at 8times8
Re: Let's hack the HP Prime!
« Reply #37 on: August 20, 2013, 01:18:38 pm »
I assume they are all beta testers?
If you like my work: why not give me an internet?








Offline critor

  • Editor
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2079
  • Rating: +439/-13
    • View Profile
    • TI-Planet
Re: Let's hack the HP Prime!
« Reply #38 on: August 20, 2013, 01:22:07 pm »
If they were all beta-testers, they wouldn't have needed to read the post about the FTP account. ;)
« Last Edit: August 20, 2013, 01:22:23 pm by critor »
TI-Planet co-admin.

Offline timwessman

  • LV3 Member (Next: 100)
  • ***
  • Posts: 94
  • Rating: +32/-0
    • View Profile
Re: Let's hack the HP Prime!
« Reply #39 on: August 20, 2013, 01:33:41 pm »
Quote
Question: What kind of data is stored into RAM? When a program is executed, for example, is it copied to a certain RAM area, forcing a size per program limit? Are programs always stored in RAM then backed up in Flash when the calc is turned OFF (to prevent them from being lost on a reset)? How large are each GROB memory areas?

It is actually quite interesting/different to see people who have never experienced "HP" calculators discovering the programming philosophy differences. There have never been arbitrary limits or things put in place to try and restrict what you can do in HP graphers. In fact, in quite a few ways the new programming in Prime is much more restrictive then anything found on HP graphers to date. Basically, none of these questions are things I've even thought about or seen posted in HP centered forums. I guess I'll have to adjust my thinking some.

RAM only contains things as/when they are loaded. Program execution can be done from anywhere provided there is enough memory to run. No limits I am aware of. In fact, I honestly have no idea how large of a program you'd have to create before any sort of issues would start happening. If you run out of memory (say, by creating an 11MB lists and trying to multiply it by itself), the calculator will reboot. There is no clean low memory cleanup yet unfortunately. Not really a real problem, but bothers me from a technical perspective.

The 10 predefined grob variables are just pointers. No limit on size. Also, any variables in a program can be any type. You are not restricted to the base 10. The only unique one is G0 which is basically just the main screen pointer.

There might be some size limits leftover from the 39gII that we forgot to remove (for example, on the 39gII lists were limited to 999 or 10000 chars per note or something), but they are not intentional.

Programs consist of 3 parts. You have a header area that contains information about exported variables/programs (so the system knows how to recognize them, and number of arguments for example), a compiled bytecode area, and the source. On poweroff, the source is saved to flash if it has been modified. The bytecode is discarded. Early in the development it was kept across power cycles, but there is basically no reason to do so since the parsing/compiling is so fast you could never notice a difference as an end user.
TW

Although I work for the HP calculator group, the comments and opinions I post here are my own.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Let's hack the HP Prime!
« Reply #40 on: August 20, 2013, 01:43:50 pm »
Ah I see. I guess it's nice that they are pointers (GROBs I mean). I was more worried about permanently bricking my calc or something by accidentlaly setting up a GROB that is slightly too large to fit and ends up overwriting very important RAM areas. That said, it's not like I would really need a 65536x1024 large GROB or something anyway. The largest I can think about is a very large Mario level made of 256x64 tiles that are 16x16 pixels each, which would take about 8 MB of RAM.

Offline Keoni29

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2466
  • Rating: +291/-16
    • View Profile
    • My electronics projects at 8times8
Re: Let's hack the HP Prime!
« Reply #41 on: August 20, 2013, 04:24:38 pm »
I was just looking at the pcb and I saw some interesting labels:
SDA, SCK : A serial bus for hooking up the little orange pcb up to the main board. The connector has 6 pins, so I think it's SPI, but it could be I2C too.
UART RX, UART TX : Serial port. Not sure what that is used for in the calculator.
BUZZ100 : Can you hook up a speaker/buzzer?

That little orange pcb had a chip on it that says Novate(and then I cannot read the rest.) I think it is the touchscreen controller.
I googled a few options including Novatel which specializes in embedded wireless modules. Could anyone confirm what the text on the chip says?
If you like my work: why not give me an internet?








Offline critor

  • Editor
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2079
  • Rating: +439/-13
    • View Profile
    • TI-Planet
Re: Let's hack the HP Prime!
« Reply #42 on: August 20, 2013, 04:36:26 pm »
Yes, we had already noticed about the BUZZ100 and the UART RX/TX.

For now we didn't investigate this.

Connecting a speaker/buzzer won't prove anything if the OS doesn't support it. If we had native code support yes - but we haven't for now.

UART RX/TX doesn't seem to be as critic as on the TI-Nspire, as the development USB tool does already let you read/write images from/to any address.
« Last Edit: August 20, 2013, 04:37:18 pm by critor »
TI-Planet co-admin.

Offline SpiroH

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 729
  • Rating: +153/-23
    • View Profile
Re: Let's hack the HP Prime!
« Reply #43 on: August 20, 2013, 04:36:42 pm »
@Keoni29: Do you already know HP Prime (DVT Prototype) Hardware Details ?

Offline Jim Bauwens

  • Lua! Nspire! Linux!
  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1881
  • Rating: +206/-7
  • Linux!
    • View Profile
    • nothing...
Re: Let's hack the HP Prime!
« Reply #44 on: August 20, 2013, 04:37:43 pm »
That post is written by Adriweb ;)