PpHd Le 01/09/2005 à 21:13 Ok I'll try to look at this problem. Thanks for the report.
PpHd Le 03/09/2005 à 21:46 I wasn't able to reproduce your problem with tiemu, pedrom 0.81 and your sprite editor.
Could you developp a little more how to get it?
pepe Le 04/09/2005 à 05:25 mmm, I can't seem to fully recreate the problem on tiemu with the 0.81 rc5, but I was close. See, it seems that was causing the problems with the archive was my constant testing of gameboy roms, which requires a lot of archiving and rearchiving of pretty big files. I was able to cause a similar error by sending some gameboy files, archiving them, and then unarchiving and erasing them(which would be the kind of thing I would make to test a game and then finding out it doesn't work well enough) and then sending the same file again. This way, when I tried to open a file in the sprite editor it gave me an error and erased some random files from the archive, but after a reset everything was fine, unlike what happened in my calc. My guess is that, since I used to do this archiving mess a lot, and often just reseted after an error instead of using clean, at one point my archive was corrupted, and it wouldn't fix even after reflashing other versions of Pedrom, since doing this, as I found out, doesn't really do anything with the archive (It even leaves the files there). I assume that installing the AMS 2.05 fixed the issue only because it is abigger file and it replaced the corrupt part or something, which might be the reason that so far I haven't had any problems with AMS 2.05.
Still, I'm gonna do some of this archiving/dearchiving with the AMS 2.05 to see if I have a similar error, and if I don't, I'll give pedrom another go and see if it works now, and if it does, It'll mean that it was a mistake on my part, and you don't need to do anything. By the way, do you recommend me any version of Pedrom in particular to have? I can't use the RC5 too much, since it has that problem that doesn't let you hold the alpha key and type, so I guess that ld-tigcc version is fine.
PpHd Le 04/09/2005 à 13:31 Ok, I will look at the code.
> unarchiving and erasing them
rmarc removes the archives directly.
Question: Are you able to reboot the calculator and to get the prompt command after the archives are corrupted?
pepe Le 04/09/2005 à 18:31 When it happened on my calc, it would show the error and reset (only if I went on and tried to open the corrupt file with the sprite editor. In gb68k, opening corrupt save states would do nothing), the only peculiar thing is that sometimes it wouldn't let me install format(it would run the command but not do anything), so I would have to erase all files manually an reset it a few times for it to work, and that would make the mem command display the correct amount of archive, but when I installed everything again, sooner or later the error would show up again. In tiemu, a simple reset fixed everything. And yeah, I forgot about rmarc. Thanks, I'm gonna try that out.
PpHd Le 04/09/2005 à 19:07 So the "install format" command does not work?
pepe Le 04/09/2005 à 22:47 Ok, I seem to have narrowed down the problem. It seems that, at some point, if you copy too much gameboy roms(I suppose other big files will do the same), the OS will refuse to archive anymore files, even if there's still archive memory left (this happens both in AMS 2.05 and pedrom, but it happens with about 200k left in ams, and at about 400k in pedrom). The thing is, by using pograms like the sprite editor I mentioned, you can go around this "protection" and keep saving fairly big files in the archive(a 32x32 sprite with 25 frames, for instance). At some point, in AMS 2.05, it will stop saving the files to the archive and start saving them in RAM, and when there's no more RAM, it will throw a protected memory violation(in tiemu, it even brings out the debugger). Still, a reset fixes that in my calc. In pedrom, things are a little bit different, and if you keep saving big files (this takes some time, since the limit starts at 400k), it will have some of the errors I mentioned. For example, when there's about 80k left, if you keep saving files to the archive, it will show that you have something like 250k left of archive memory. At this point, it will throw an unknow error if you try to open a file with the sprite editor, and random files in the archive will be deleted after a reset.
About the install format, it seemed to fix things in tiemu, but, as I mentioned, for some reason it didn't work in my calc one time, and the fact that I just reflashed the os after that didn't seem to help.
It's still a very hard to reproduce bug, but in my humble opinion, it seems that Pedrom has some problems regarding that "limit" the archive has (by the way, it seems to happen only with big files, since I seem to recall that I have filled my archive in the past). I'm just gonna install Pedrom again, and be careful with saving too much stuff in the archive, and probably I won't have this problem again. Thanks for looking into it. If you need anything else, just post a question.
pepe Le 06/09/2005 à 00:11 Damn, I got the same error again not too long after installing pedrom 0.81 rc8, and I didn't even had too many programs on the archive. Only thing I did was play some megaman on gb68k (and I tested some programs, but this was the first time that I tested them, so I don't see how this can be related), and after a while the save states didn't load, a sign of the error happening, so I'm inclined to say that it might be related to that program more than the sprite editor. Still, I even beat the whole megaman game on tiemu and I don't get this error at all(the thing I mentioned before seems to be unrelated to it). Perhaps it is a problem with my calc? But it works fine on AMS 2.05... Meh, maybe I'm just unlucky. Well, before giving up, my calc has the error right now, and I've not fixed it yet. Would it help if I do an hexdump or something like that? if not, I guess its okay. Thanks anyway.
> Would it help if I do an hexdump or something like that? if not, I guess its okay. Thanks anyway.
Yes, I think it may help PpHd.
pepe Le 06/09/2005 à 22:22 and what value should I use for that? I run "hexdump 0x4000" and nothing shows up, but if I use 0x5000, something else shows. I actually don't know anything about that, so i would appreciate any help.
pepe Le 07/09/2005 à 18:28 I found out what caused the bug!
It turns out that it's caused by a low battery. Let me explain:
After my previous post, I put my batteries to charge and was ready to tryout bombermaze 0.9b (which, by the way, doesn't work with Pedrom anymore on RC8) and the bug was fixed. After a while, it came back, but I took some batteries off the remote and put them in the calc and the bug was gone. Putting the old batteries on again caused the error to reapear. The problem is, since no emulator that I know of emulates a low battery, this bug is gonna be hard to replicate, but at least we know now what causes it.
Why I've been having this bug so much? because I don't have any rechargeable batteries at hand, so I've been recharging regular batteries, which will lose most of their charge some time after the recharging. Also, I've found that the bug is not that fatal, because replacing the batteries makes everything work again(do not reset, because that might erase some files). As a matter of fact, removing the bad batteries and putting them back fixes it too, though you will corrupt the file again if you try to save it. The tricky thing is, the low battery indicator isn't actually showed when this happens, so it's a little difficult to know when this can happen. Still, I'm just gonna go buy some real rechargeable batteries and have some spares at hand, and that way I can continue to use Pedrom.
However, it counts as a Pedrom bug since this doesn't happen with AMS. But I think you might be on to the solution, since, as I mentioned before, this bug doesn't seem to affect side, and it can still save archived files even with the low batteries.
Well, I'm sorry to have wasted your time before and coming at you with a bug without knowing the cause beforehand. Thanks for your time.
PpHd Le 08/09/2005 à 13:52 It seems the bug is the Check Battery function which doesn't work at all: it should disable the Flash functions if it detects that the Battery level is too low.
pepe Le 10/09/2005 à 04:20 I've installed it and it works great (flavien racine's games work!), but I trew away the old batteries, so It'll take some time until my new batteries are drained. I'll tell you if it works when I get to it.
pepe Le 14/09/2005 à 22:11 Nope, it didn't fix it. Isn't it possible to emulate a low battery on tiemu?
PpHd Le 15/09/2005 à 09:16 Could you do a hexdump of an invalid archived file?
It may help me.
PpHd Le 15/09/2005 à 18:32 Find a file which seems to be corrupted.
Do a ls -l
You should see its address.
Then run "hexdump 0x123456" where 0x123456 should be replace by the offensing file.
It will be better if I can see a file before it is corrupted, and after(if it hasn't changed).
PpHd Le 16/09/2005 à 14:00 Ok thanks a lot for your report. I will do my best to fix this problem.
pepe Le 21/10/2005 à 07:33 Sorry for the late reply, I was on vacation. Anyway, here are the results of my tests.
-First, the low battery indicator now works. In previous versions of pedrom, it didn't actually work, and programs that show the amount of battery left like tict explorer, would never show the right amount. Now, such programs show the correct value, and the BATT indicator showed in just a short time after I replaced the new batteries for old ones. I would say it works just as the one on Ti-os.
-The refered archiving bug...Well, it doesn't corrupt files anymore. Now, when the battery is low, it will still save changes and you can work normally...until a reset or a battery change. If you do any of these, the changes will be lost. And, If you happen to create a new file when the batteries were low, it will be lost after the reset. I guess there's still something wrong, because when you save in GB68k with the low battery, it will claim that there's an archiving bug, but it still save the file anyway (at least until the reset)
But, because of the improvement of the battery indicator, now I can know when it's time to change the batteries, so it's not a guess work like before. And, since it doesn't corrupt files anymore, if I really need to make changes to some file or save a game when I don't have fresh batteries avaible, I can get home and send the file to the computer. This way, I will save the changes after changing the batteries(I've tested this and it works, by the way).
So, my opinion is that, while the bug isn't tecnically completely fixed, now the pluses greatly outweight the minuses, and with this, along with other recent improvements (I like how you've been fixing the menu boxes), and the NES and GB emulators making big strides, I can say that now pedrom is a legitimate option for anyone that has a TI-89/92+/V200, etc. For this, I congratulate you for your effort. On my part, I can say that you can move on to other things if you wish. You can still contact me if you want to test anything. Again, thanks.