I'm going to quit working on this bug until I get my new player. Then I will have two platforms to test the firmware problems on and I can be more certain about specific players.
________
I would like to say that testing and debugging some of the code in SVN is quite a pain in the butt because it looks like changes in the rest of the system have affected the operation of other plugins. Let me show you what I mean:
Doom was reliable in the last stable release but now in SVN rockbox it seems to work sometimes but not other times and this is dependent on what WADs you try to use and whether or not you complete a level. When I was testing SVN rockdoom in slightly earlier versions, it would crash either on startup with errors or after a few seconds of running with "data abort." Now the behavior has changed in newer versions, so for a very short time
I thought the bug(s) was/were fixed. Now it will either crash on startup like before dependent on the WAD loaded, or it will run until the end of a level and then display corruption at the level summary screen and crash with a "data abort" when attempting to change levels. I may have solved the conditional startup problem and the summary screen corruption problem but there are now errors for certain main WADs when trying to transition between levels.
To summarize:
In apps/plugins/doom/doom.make, reverting modification r25889 like this:
--from--
DOOMCFLAGS = $(PLUGINFLAGS) -Wno-strict-prototypes -O2 -fno-strict-aliasing
--to--
DOOMCFLAGS = $(PLUGINFLAGS) -Wno-strict-prototypes -O2
seems to fix level loading errors for some main wads. (Ultimate Doom suddenly loads again).
changing these lines in rockmacros.h:
--from--
#define open(a, ...) my_open((a), __VA_ARGS__)
--to--
#define open(a,b) rb->open((a),(b))
AND
--from--
int my_open(const char *file, int flags, ...);
--to--
int my_open(const char *file, int flags);
AND
--from--
#define open(a, ...) my_open((a), __VA_ARGS__)
--to--
#define open(a,b) my_open((a),(b))
AND THEN...
reverting rockdoom.c (same as changing these lines):
--from--
int my_open(const char *file, int flags, ...)
--to--
int my_open(const char *file, int flags)
AND
--from--
if (flags & O_CREAT)
{
va_list ap;
va_start(ap, flags);
filearray[fpoint]=rb->open(file, flags, va_arg(ap, unsigned int));
va_end(ap);
}
else
filearray[fpoint]=rb->open(file, flags);
--to--
filearray[fpoint]=rb->open(file, flags);
will eliminate the corruption lines on summary screen (end of level) and get rid of the inevitable "data abort" error that occurs directly after.
However, although those bugs are fixed, some main WADs are still unusable because during the summary screen when it tries to load a different level you still get R_FlatNumForName and R_TextureNumForName errors that effectively crash the device. It is interesting that these problems can be WAD dependent (I'm not even talking about third party WADs). TNT and Doom 2 may work while Ultimate Doom and "Doom Registered" will crash at the end of the level. Even Doom 2 will crash if I don't apply the above code fixes, although it will be by "data abort." Can somebody tell me what's going on here? I've got photos of some of the bugs and crashes this time in case they are interesting to someone. Let me know if I should post them here or not.
And another thing, there are two rockbox skins that don't work in newer rockbox versions. What needs to be changed to make them functional again?