*bumpity bump* Bug report:


Code:
[16:46:55] <+KermM> Hey Buckeye
[16:47:11] <+KermM> I can't seem to load ROMs in WabbitEmu via the right-click Options menu anymore
[16:47:14] <+KermM> only dragging worked
[16:47:25] <+KermM> and then I still needed to close and reopen it to make it switch skins to the 84 skin
KermMartian wrote:
*bump*


Code:
[22:23:25] <+KermM> Buckeye, if you see this, I was wondering about the perennial emulator problem where apps randomly get deleted, some kind of certificate issue, I presume
[22:24:46] <+BrandonW> I can tell you exactly how to fix this.
[22:25:05] <+BrandonW> You need a dummy certificate with a series of zeroes starting at 1F18h.
[22:25:24] <+BrandonW> Without them (meaning all 0xFF's), the OS thinks it's a trial application, and they'll get deleted after 15 executions.
[22:25:27] <nikky> bawwwwwwwwwwww
[22:25:43] <+BrandonW> C+1F18h*
[22:26:04] <+BrandonW> I was planning to write a little 83+ program that did this.
[22:26:33] <+BrandonW> I said the technical details once in #ti but that was a while back.
[22:26:42] <+BrandonW> I'd have to do a little digging, and the offset is different on the 84+/SE.
[22:26:45] <+BrandonW> And 83+SE.
[22:27:08] <+BrandonW> The last app page minus the base page of your application times two plus the offset is the word you need to make a zero.
[22:27:21] <+BrandonW> On the active certificate sector.
[22:27:52] <+KermM> BrandonW, excellent
[22:27:57] <+KermM> I'll pass that along to Buckeye

I got surprised with that.
Never thought it was a feature from TI that caused the bug in emulators.

Did buckeye resolved? Better cross post in Revsoft, maybe?
Actually, shortly after I made that post, BrandonW said on IRC that it was a bad idea to do that emulator-side, and it would be better to make a small ASM program to do that instead. It's apparently a longstanding item on his todo list. Smile Buckeye also addressed the bug I mentioned in my latest post, so he had known about that.
That leaves me to wonder why the pages don't have the correct value to begin with in the emulator?
elfprince13 wrote:
That leaves me to wonder why the pages don't have the correct value to begin with in the emulator?
A good question. BrandonW mentioned that it had something to do with how the certificate page is dumped from a real calc, although don't quote me on that in case I'm misremembering. Hopefully BrandonW will drop by and explain it; he hasn't popped up at all in the last week or two.
Well what the emulator does is 'forceload' the app, meaning that rather than sending it over the link port and letting the OS routines do the work, it takes the data itself and writes it directly to the flash page. The reason for this is that sending a large app takes forever over the normal link port (if you want to try it, reset all memory on the emulator then load an app, it will use the OS routines). Forceloading also has the benefit of being very handy for testing. Say you have some code that is on another page of your app, or data that you want to change. Rather than having to quit back to the OS, you can simply load the data with the app still running and see the changes almost immediately

tl;dr if you use the real os routines, the app is marked as not a trial, but we dont use them because the link port is slow
It always looks to me like you're setting the calculator into unlimited-speed execution mode when I'm transferring in an app; how bad would it be to just send via I/O with the calculator unlimited with regards to speed? What if you toggled that based on how fast the emulator was able to go without the limiter?
Or you could have an option whether to force-load it, send it, or do the faster one. Smile
calcdude84se wrote:
Or you could have an option whether to force-load it, send it, or do the faster one. Smile
Indeed, that sounds good to me. Smile
KermMartian wrote:
calcdude84se wrote:
Or you could have an option whether to force-load it, send it, or do the faster one. Smile
Indeed, that sounds good to me. Smile


automagic behavior would be bad in this case, since it would appear inconsistent to the user.
Overall, the benefits far outweigh the negative effects. The plan was always to add an option to disable forceloading, it was just never implemented. And once I figure out what the correct offset in the certificate is, it will be implemented, trust me
BuckeyeDude wrote:
Overall, the benefits far outweigh the negative effects. The plan was always to add an option to disable forceloading, it was just never implemented. And once I figure out what the correct offset in the certificate is, it will be implemented, trust me
Excellent, very happy to hear it. I've had several cases where I was building a precarious testbed to figure out the source of the bug, only to have Doors CS invalidated when switching into Editor mode and crashing the calculator. Sad @Elfprince: What if there was a checkbox to switch between forceloading and automagical detection? Or even a set of radio buttons to choose always forceload, always load normally, or automagic?

Code:
int offset = 0x1E50;
    if (cpu->pio.model == TI_83P)
        offset = 0x1F18;
    //erase the part of the certifcate that marks it as a trial app
    dest[cpu->mem_c->flash_pages-2][offset + 2 * (upages.start - page)] = 0x80;
    dest[cpu->mem_c->flash_pages-2][offset+1 + 2 * (upages.start - page)] = 0x00;


Solved and uploaded
BuckeyeDude wrote:

Code:
int offset = 0x1E50;
    if (cpu->pio.model == TI_83P)
        offset = 0x1F18;
    //erase the part of the certifcate that marks it as a trial app
    dest[cpu->mem_c->flash_pages-2][offset + 2 * (upages.start - page)] = 0x80;
    dest[cpu->mem_c->flash_pages-2][offset+1 + 2 * (upages.start - page)] = 0x00;


Solved and uploaded
Huzzah! Is this both versions, or just the Visual Studio one?
currently only the gcc version (which is the default)
BuckeyeDude wrote:
currently only the gcc version (which is the default)
Oh goodie, I like that one better anyway. I'll grab it right now.
*bump* I have a bit of a bone to pick with you. The latest build neither updates the register display when single-stepping in the debugger view, nor goes particularly fast (and seems to have slowed down a lot).

Edit: Thanks, your fix did the trick. I'm also looking forward to this tab idea of yours. Sidebar, any chance of maintaining the position in the memory view between closing and reopening the debugger window?
KermMartian wrote:
Or even a set of radio buttons to choose always forceload, always load normally, or automagic?


That would probably be a good solution.
elfprince13 wrote:
KermMartian wrote:
Or even a set of radio buttons to choose always forceload, always load normally, or automagic?


That would probably be a good solution.
Agreed, but it looks like he already solved it out with no need to do this. Come to think of it, I think I've still had Doors CS disappear every fifteen executions or so...
For now I'm going to leave it so that the only way you can load normally is by resetting all memory and then loading the app. I think I may have found why dcs still disappears, 10 bucks says you're on boot 1.02 rom? Also betting on OS 2.53 MP
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
» Goto page Previous  1, 2, 3, ... 13, 14, 15  Next
» View previous topic :: View next topic  
Page 2 of 15
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement