Join us on Discord!
You can help CodeWalrus stay online by donating here.

Announcing Rip'Em, a third-party firmware for the HP Prime

Started by Jean-Baptiste Boric, January 01, 2016, 10:30:14 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Jean-Baptiste Boric

I dumped the raw old-school disassembly notes of the first few KiB at https://tiplanet.org/hpwiki/index.php?title=BXCBOOT0.BIN_reverse_engineering. I should be able to (ab)use the subroutines in there for reading the NAND.

I don't intend to reverse engineering all of BXCBOOT0.BIN (not especially all by myself), but if I could locate a subroutine that writes to the NAND it'd be nice to have.

Dream of Omnimaga

#31
Yeah, I think putting this on the wiki would be better, since it has most HP Prime info. Of course, make sure to not post anything that contains copyrighted material (such as a TI-Nspire Boot1 or TI-84 Plus CE ROM, but otherwise it's fine and can be very handy for third-party development (and maybe future third-party emulation?). In any case, good luck for HW-A compatibility.

Quote from: Lionel Debroux on March 08, 2016, 02:48:00 PM
Hackspire was separated from anything else, too.
On an unrelated note, what ever happened to Hackspire @Lionel Debroux  and @Adriweb ? I haven't been able to access it for a long while. Did Unsadns server shut down or something (IIRC it also had stuff about RSA key factoring)?
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

critor

Quote from: DJ Omnimaga on March 08, 2016, 07:54:01 PM
Quote from: Lionel Debroux on March 08, 2016, 02:48:00 PM
Hackspire was separated from anything else, too.
On an unrelated note, what ever happened to Hackspire @Lionel Debroux  and @Adriweb ? I haven't been able to access it for a long while. Did Unsadns server shut down or something (IIRC it also had stuff about RSA key factoring)?
Server failure, but the data is safe.

Lionel Debroux

There was a hardware issue on the server hosting Hackspire and other stuff managed by squalyl. There's a backup of Hackspire, it's just that it hasn't been re-hosted anywhere yet.
Member of the TI-Chess Team.
Co-maintainer of GCC4TI (GCC4TI online documentation), TIEmu and TILP.
Co-admin of TI-Planet.

Ivoah

Quote from: Lionel Debroux on March 08, 2016, 08:06:16 PM
There was a hardware issue on the server hosting Hackspire and other stuff managed by squalyl. There's a backup of Hackspire, it's just that it hasn't been re-hosted anywhere yet.
Is it a problem of lack of hosting? I'd be willing to host it provided the network traffic isn't too great.
  • Calculators owned: TI-86 (now broken), TI SR-56, TI-Nspire CX CAS, TI-84+ SE, TI-84+ SE, TI-85, TI-73 Explorer VS, ViewScreen, TI-84+ CSE, TI-83+ SE

Dream of Omnimaga

Oh ok thanks for the info guys. I was worried that it was all gone. It's a shame when so much useful calculator info gets lost (like what happened to the Casio community several times, and I believe it was the case with several HP programs as well).
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

Jean-Baptiste Boric

I 'm banging my head against the NAND. I guess being able to read the 2048 first bytes of the NAND counts as progress compared to no NAND support :banghead:

I'm starting to wonder if porting U-Boot+NetBSD would be a better idea than writing an entire SDK+Bootloader on bare metal...

Dream of Omnimaga

  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

Jean-Baptiste Boric

Quote from: DJ Omnimaga on March 15, 2016, 11:40:59 PM
What issues are you having right now?

Accessing the NAND isn't something straightforward to do. The protocol to access it has to be essentially bit-banged raw through the NAND controller and any write would require dealing with ECC.

But I'm thinking about the big picture here. The HP Prime has enough punch to make bare metal development a questionable choice. Since NetBSD and U-Boot have ports running on hardware close enough to the HP Prime, I might as well port them instead of writing my own knock-off drivers, C standard library, interrupt handlers and so on.

So the question is : is anybody interested by bare metal development on the HP Prime ? If no then I should stop wasting time making a decent SDK ; I should instead use what I already have right now to chainload U-Boot and NetBSD.

Dream of Omnimaga

If by bare-metal you mean modifying the hardware or connecting stuff to it in order to hack it, then I'm afraid that the audience might be smaller, even moreso with the fact that so few people have an HP Prime compared to TI models. Tools requiring no hardware modification nor extra cable purchases would be better I think, since that's how we do it on TI calcs. As for an SDK, the best would be a C SDK when C becomes feasible on that platform, like with the TI-84 Plus CE, but of course that would be when C actually becomes possible, not now.
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

Lionel Debroux

Quoteis anybody interested by bare metal development on the HP Prime ?
By now, I'd basically answer no, unfortunately. Much to the dismay of Tim Wessman, Cyrille de Brébisson and other HP folks, despite its raw power and the fact that it's an open platform, the Prime hardly received such work in the past two years and a half since it became available... My work, then your more advanced work, are the only attempts to doing so (the only known ones, at least).
When people are interested in a platform, a port of Linux normally follows in a matter of weeks or few months after the initial availability of ACE/RCE. The Nspire failed to garner such attention as well, though that is probably partially due to being based on an undocumented SoC, unlike the Prime. Nowadays, mainline Linux has Nspire support, though hardly anybody cares.
Member of the TI-Chess Team.
Co-maintainer of GCC4TI (GCC4TI online documentation), TIEmu and TILP.
Co-admin of TI-Planet.

Jean-Baptiste Boric

Quote from: DJ Omnimaga on March 16, 2016, 02:07:26 AM
If by bare-metal you mean modifying the hardware or connecting stuff to it in order to hack it, then I'm afraid that the audience might be smaller.

I guess I'm the only guy in the whole world (outside of HP) that has soldered a few wires to his HP Prime's motherboard in order to access the UART.

By bare metal I mean programming directly against the hardware, without an operating system (Rip'Em doesn't use the original firmware at all).

Quote from: Lionel Debroux on March 16, 2016, 06:45:12 AM
By now, I'd basically answer no, unfortunately. Much to the dismay of Tim Wessman, Cyrille de Brébisson and other HP folks, despite its raw power and the fact that it's an open platform, the Prime hardly received such work in the past two years and a half since it became available...

If the fate of third-party firmware and native development on the HP Prime rests on my shoulders, then we're all screwed  ;D

Dream of Omnimaga

#42
Blame TI's monopoly. >.< Even the TI community isn't that big, so imagine how much smaller the HP community is. That said, there is a large community of HP users out there, but either they prefer old 80's and 90's models or they don't care about calculator hacking. As for the Casio community it's almost entirely French. The best thing to do is not to worry about that, but that means not getting much help for development if you run into problems.


As for hacking the calculator directly by soldering wires and stuff, the issue is that most people on calculator websites are students who don't have enough money to purchase more than 1 calculator, so they won't risk bricking their device and being unable to afford a replacement. Also, some people are underage and might not live close to a shop that sells the extra hardware and cables required for such hacking, forcing them to buy it on the Internet, but some parents are afraid of purchasing stuff on the Internet.


EDIT: The other reason that makes people less interested in adding C support to the HP Prime is that the HP PPL language is so powerful that it can let you make any kind of game that would be feasible on the TI-Nspire with Ndless, except maybe emulators and a few other things.
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

Jean-Baptiste Boric

I got U-Boot booting. It is held together with a lot of duct tape, but it works.

I put it over at https://github.com/boricj/u-boot.


initcall: 31fa9a70


U-Boot 2016.03-00320-ga119357-dirty (Mar 24 2016 - 19:29:07 +0100)

initcall: 31f9a8dc
U-Boot code: 31F93000 -> 31FB9AF0  BSS: -> 31FEF5FC
initcall: 31f93370
CPUID: 32450003
FCLK:    0.531 MHz
HCLK:    0.531 MHz
PCLK:    0.265 MHz
initcall: 31f9a90c
DRAM:  initcall: 31f93f4c
initcall: 31f9ab30
Monitor len: 0005C5FC
Ram size: 00000000
Ram top: 32000000
initcall: 31f9a6fc
[...]
initcall: 31f9ab08
initcall: 31f9aa60

RAM Configuration:
Bank #0: 30000000 32 MiB

DRAM:  32 MiB
initcall: 31f9a744
New Stack Pointer is: 31b92ee0
initcall: 31f9a9d4
initcall: 31f9a964
Relocation Offset is: 00000000
Relocating to 31f93000, new gd at 31b92f08, sp at 31b92ee0
initcall: 31f9abfc
initcall: 31f9ac04
initcall: 31f9ad50 (relocated to 31f9ad50)
WARNING: Caches not enabled
initcall: 31f9ac1c (relocated to 31f9ac1c)
[...]
initcall: 31f9ac84 (relocated to 31f9ac84)
initcall: 31f9ac68 (relocated to 31f9ac68)
Net:   No ethernet found.
initcall: 31f9ac5c (relocated to 31f9ac5c)
### main_loop entered: bootdelay=5

### main_loop: bootcmd="<UNDEFINED>"
hp_prime # help   
?       - alias for 'help'
base    - print or set address offset
bdinfo  - print Board Info structure
boot    - boot default, i.e., run 'bootcmd'
bootd   - boot default, i.e., run 'bootcmd'
[...]
test    - minimal test like /bin/sh
tftpboot- boot image via network using TFTP protocol
true    - do nothing, successfully
version - print monitor, compiler and linker version
hp_prime #  version

U-Boot 2016.03-00320-ga119357-dirty (Mar 24 2016 - 19:29:07 +0100)
arm-none-eabi-gcc (4.8.4-1+11-1) 4.8.4 20141219 (release)
GNU ld (2.25-5+5+b1) 2.25
hp_prime #

Lionel Debroux

Great work, one more step towards full-fledged third-party OS on the Prime :)

Forwarded at https://ti-pla.net/p198824 .
Member of the TI-Chess Team.
Co-maintainer of GCC4TI (GCC4TI online documentation), TIEmu and TILP.
Co-admin of TI-Planet.

Powered by EzPortal