Post Reply 
Trying to improve x49gp
08-28-2018, 02:51 AM (This post was last modified: 08-28-2018 02:58 AM by Claudio L..)
Post: #38
RE: Trying to improve x49gp
(08-27-2018 10:39 PM)3298 Wrote:  
(08-27-2018 09:07 PM)Claudio L. Wrote:  Me too, and when you use the stock firmware it's all black, but under newRPL it does come out green on mine, it's the latest from my github + your new patches.
At the risk of sounding annoying, does "new patches" actually include the one from May or just the bunch from the last few days? Because the one from May didn't end up in your GitHub repository yet, so you might just have skipped it unintentionally. If that's not it, I'm out of ideas for now.
I tought everything ended up in my gihtub fork, if not then that explains it. I'll fix it by reapplying old patches too.

(08-27-2018 10:39 PM)3298 Wrote:  
(08-27-2018 09:07 PM)Claudio L. Wrote:  If the serial number doesn't need touching, all you have to do is have the user select a firmware file, open it and load it at offset 0x4000 of the brand new flash, that's it. That's all the bootloader does.
PS: When I say offset 0x4000 is in bytes, from C (as opposed to an offset in nibbles from the emulated side).
Yeah, that's kind of obvious. A file chooser window is pretty straightforward (I can steal code from the SD file chooser windows in a pinch), and after that it's just a 'read' call with the firmware location (just behind the bootcode, which I already know is 16KiB long) in the mmap'ed flash file as buffer. The fancy command-line parameter parser I wrote makes adding new flags pretty much a drop-in affair, so the IDE automation isn't that much more complicated either. I can even make that flag trigger the interactive selection when no filename is passed on the command line.

Sounds perfect. I did some tests with 'dd' to create the flash file manually and it's very straightforward but there's something else I didn't catch before:
1) Dump the new firmware at 0x4000 as we discussed.
2) Change the 16-byte string at 0x4000 from "KINPOUPDATEIMAGE" to "Kinposhcopyright" (case-sensitive!). This is a marker the bootloader uses to tell if there's a valid firmware installed or not.

Also, there should be perhaps another option to wipe out with 0xff all the way to the end of flash. This is not needed for newRPL but stock firmware needs a clean flash after the binary, so it can initialize those banks.

PS: Can we add another command-line option '-r' to reset the CPU when x49gp starts? When you manually change the firmware you must trigger a reset, and if the change in firmware happens outside of x49gp, we need to tell x49gp that we need a reset. Otherwise it will try to resume execution with a completely different ROM, it's a sure crash (resolved by Reset from the menu, I know, but still, the idea is that when used as a debugger we should be able to start x49gp from a script to a well-known state).
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Trying to improve x49gp - 3298 - 10-28-2014, 10:08 PM
RE: Trying to improve x49gp - Han - 10-28-2014, 10:53 PM
RE: Trying to improve x49gp - Egan Ford - 10-29-2014, 02:54 AM
RE: Trying to improve x49gp - Egan Ford - 10-29-2014, 02:57 AM
RE: Trying to improve x49gp - Egan Ford - 10-29-2014, 03:10 AM
RE: Trying to improve x49gp - 3298 - 10-29-2014, 08:43 AM
RE: Trying to improve x49gp - Egan Ford - 10-31-2014, 12:36 AM
RE: Trying to improve x49gp - debrouxl - 10-29-2014, 09:18 AM
RE: Trying to improve x49gp - Claudio L. - 10-29-2014, 11:58 AM
RE: Trying to improve x49gp - Claudio L. - 10-29-2014, 12:04 PM
RE: Trying to improve x49gp - 3298 - 11-04-2014, 09:50 PM
RE: Trying to improve x49gp - Egan Ford - 11-08-2014, 09:50 PM
RE: Trying to improve x49gp - 3298 - 05-05-2018, 10:43 PM
RE: Trying to improve x49gp - 3298 - 05-05-2018, 10:45 PM
RE: Trying to improve x49gp - Claudio L. - 05-07-2018, 06:33 PM
RE: Trying to improve x49gp - 3298 - 05-07-2018, 08:55 PM
RE: Trying to improve x49gp - Claudio L. - 05-07-2018, 11:09 PM
RE: Trying to improve x49gp - dmmaster - 05-07-2018, 07:17 PM
RE: Trying to improve x49gp - 3298 - 05-07-2018, 08:12 PM
RE: Trying to improve x49gp - dmmaster - 05-07-2018, 08:36 PM
RE: Trying to improve x49gp - Claudio L. - 05-08-2018, 02:57 AM
RE: Trying to improve x49gp - 3298 - 05-08-2018, 11:19 AM
RE: Trying to improve x49gp - Claudio L. - 05-08-2018, 03:02 PM
RE: Trying to improve x49gp - 3298 - 05-08-2018, 06:17 PM
RE: Trying to improve x49gp - 3298 - 05-13-2018, 10:27 PM
RE: Trying to improve x49gp - Claudio L. - 05-14-2018, 01:24 AM
RE: Trying to improve x49gp - 3298 - 05-15-2018, 10:22 AM
RE: Trying to improve x49gp - 3298 - 08-23-2018, 05:44 PM
RE: Trying to improve x49gp - ijabbott - 08-23-2018, 07:15 PM
RE: Trying to improve x49gp - Claudio L. - 08-24-2018, 02:36 AM
RE: Trying to improve x49gp - 3298 - 08-26-2018, 02:22 PM
RE: Trying to improve x49gp - pier4r - 08-26-2018, 06:31 PM
RE: Trying to improve x49gp - Claudio L. - 08-27-2018, 01:39 PM
RE: Trying to improve x49gp - 3298 - 08-27-2018, 08:20 PM
RE: Trying to improve x49gp - Claudio L. - 08-27-2018, 09:07 PM
RE: Trying to improve x49gp - 3298 - 08-27-2018, 10:39 PM
RE: Trying to improve x49gp - Claudio L. - 08-28-2018 02:51 AM
RE: Trying to improve x49gp - 3298 - 08-28-2018, 08:04 AM
RE: Trying to improve x49gp - Claudio L. - 08-29-2018, 02:17 AM
RE: Trying to improve x49gp - 3298 - 08-29-2018, 11:12 AM
RE: Trying to improve x49gp - Claudio L. - 08-29-2018, 10:02 PM
RE: Trying to improve x49gp - 3298 - 08-29-2018, 10:21 PM
RE: Trying to improve x49gp - brickviking - 08-29-2018, 10:46 PM
RE: Trying to improve x49gp - 3298 - 08-29-2018, 11:53 PM
RE: Trying to improve x49gp - Claudio L. - 08-30-2018, 09:35 PM
RE: Trying to improve x49gp - Claudio L. - 08-29-2018, 10:09 PM
RE: Trying to improve x49gp - brickviking - 08-31-2018, 12:10 AM
RE: Trying to improve x49gp - Claudio L. - 08-31-2018, 12:47 AM
RE: Trying to improve x49gp - 3298 - 08-31-2018, 08:15 AM
RE: Trying to improve x49gp - Claudio L. - 08-31-2018, 06:11 PM
RE: Trying to improve x49gp - pier4r - 08-31-2018, 07:43 PM
RE: Trying to improve x49gp - brickviking - 08-31-2018, 10:52 PM
RE: Trying to improve x49gp - Sylvain Cote - 08-31-2018, 11:12 PM
RE: Trying to improve x49gp - Claudio L. - 08-31-2018, 11:45 PM
RE: Trying to improve x49gp - Claudio L. - 10-04-2018, 09:21 PM
RE: Trying to improve x49gp - brickviking - 10-05-2018, 08:55 AM
RE: Trying to improve x49gp - 3298 - 10-05-2018, 11:26 AM
RE: Trying to improve x49gp - 3298 - 10-09-2018, 03:13 PM
RE: Trying to improve x49gp - Claudio L. - 10-10-2018, 02:25 PM
RE: Trying to improve x49gp - 3298 - 10-10-2018, 09:50 PM
RE: Trying to improve x49gp - Claudio L. - 10-11-2018, 02:43 AM
RE: Trying to improve x49gp - Claudio L. - 10-05-2018, 06:33 PM
RE: Trying to improve x49gp - brickviking - 10-05-2018, 09:43 PM
RE: Trying to improve x49gp - brickviking - 10-10-2018, 09:21 PM
RE: Trying to improve x49gp - Helix751 - 11-12-2021, 12:08 PM
RE: Trying to improve x49gp - Claudio L. - 11-12-2021, 09:39 PM
RE: Trying to improve x49gp - Helix751 - 11-15-2021, 10:46 PM
RE: Trying to improve x49gp - 3298 - 11-13-2021, 12:12 AM
RE: Trying to improve x49gp - Helix751 - 11-15-2021, 10:54 PM
RE: Trying to improve x49gp - Claudio L. - 11-17-2021, 09:22 PM
RE: Trying to improve x49gp - 3298 - 11-17-2021, 11:47 PM
RE: Trying to improve x49gp - Claudio L. - 11-18-2021, 06:41 PM
RE: Trying to improve x49gp - Eric Rechlin - 11-18-2021, 07:16 PM
RE: Trying to improve x49gp - Claudio L. - 11-18-2021, 10:25 PM
RE: Trying to improve x49gp - Helix751 - 11-17-2021, 08:27 PM
RE: Trying to improve x49gp - 3298 - 11-17-2021, 09:17 PM
RE: Trying to improve x49gp - Helix751 - 12-05-2021, 08:36 PM
RE: Trying to improve x49gp - Claudio L. - 12-06-2021, 03:33 PM
RE: Trying to improve x49gp - Helix751 - 12-13-2021, 12:17 PM
RE: Trying to improve x49gp - gwh - 11-17-2021, 09:52 PM
RE: Trying to improve x49gp - 3298 - 11-17-2021, 11:02 PM
RE: Trying to improve x49gp - gwh - 11-18-2021, 05:40 AM
RE: Trying to improve x49gp - ijabbott - 11-18-2021, 08:23 PM
RE: Trying to improve x49gp - Claudio L. - 11-19-2021, 09:04 PM
RE: Trying to improve x49gp - 3298 - 11-19-2021, 11:50 PM
RE: Trying to improve x49gp - Claudio L. - 11-20-2021, 02:05 AM
RE: Trying to improve x49gp - gwh - 11-20-2021, 06:18 PM
RE: Trying to improve x49gp - Claudio L. - 11-21-2021, 09:47 PM
RE: Trying to improve x49gp - Claudio L. - 11-22-2021, 04:06 PM
RE: Trying to improve x49gp - Eric Rechlin - 11-19-2021, 10:26 PM
RE: Trying to improve x49gp - Claudio L. - 12-02-2021, 02:39 PM
RE: Trying to improve x49gp - gwh - 12-02-2021, 03:03 PM
RE: Trying to improve x49gp - gwh - 12-02-2021, 03:32 PM
RE: Trying to improve x49gp - Claudio L. - 12-06-2021, 03:36 PM



User(s) browsing this thread: 1 Guest(s)