361
Walnut / Re: gxp file format
« on: July 10, 2011, 03:12:44 am »1. Thinking about it now, to allow for newer programs to run on older shells the size of a packet should be the second word included that way Walnut can skip past unfamiliar packets. Otherwise Walnut was going to rely on knowing the size of the packet based off the SDK version but that can now be fixed.Good.
2. The SDK version number allows for Walnut to know which version of the packet layout is being used. Having an SDK version number higher than the shell number shouldn't prevent a program from running but may cause some errors in displaying data. The way each packet is arranged shouldn't change once Walnut is released so that is why I want to get all the issues out now by making this public.I don't see how it would be necessary to know the version if the packet layout if the packets aren't going to change...
Also for the "wnut" that is just an identifier that the shell uses so it knows that the file was designed for Walnut and uses the Walnut packet layout. It is just like how java .class files start with 0xcafebabe as an identifier.So if future shells want to have backwards compatibility with Walnut, would they need to include the wnut string? Wouldn't it be better to use something that doesn't refer to the name of this shell?
3. That can be moved easily to another packet but even if the developer doesn't want to include a description that field will only take 1 byte if blank. The description is like a subtext that can be displayed with the title.Moving it to another packet makes the layout a bit more flexible. If everything is going to be put in the same packet, the advantage with the packet layout is not being used.
4. The reason for the checksum being there was that if there was a binary error in the header or executable then there is a possibility that the calculator could crash or even brick. For example if the FRQCR field was corrupted Don't forget that the SDK will calculate that on it's own when a project is built similar to what mkg3a already does.But what if someone quickly wants to hack together a program without using the SDK? The file format is supposed to remove the limitations of the .g3a format, and the checksum is one of them.
5. A packet for main is also doable. The reason for having the offset was so that it could be quickly located and wouldn't have to be searched for.This makes sense. I'm fine with having it the way it is now.
6. Size of main just means the size of the executable. This is very important as it affects what Walnut will write to the MMU when the program begins.
7. The first 4 letters could also be more like their initials. This data will never be displayed to the user but is so that Walnut has the ability to organize programs by author if the user wishes to do so.Why can't authors be sorted based on their full name?
8. They don't have to include an icon. By setting the icon compression mode to 0 it means that there is no image and Walnut will not expect one.Just like with 3., I think that splitting things up into multiple packets makes things more flexible.