TMD Diagnostic Routines (by Jon Prestidge) You might find these diagnostic routines useful if you create TMD data within your program, at run time, like me. (You could still use them if you pre-create your TMD data using a CAD package or whatever, provided the diagnostic routine is called after GsLinkObject4 since my diagnostic routines use absoulute addresses) When I'm creating a new TMD object, there always seems to be some field I forget to set that stops the TMD data working properly, like forgetting to set the 'mode2' field in the primitive. So that's why I wrote these diagnostic routines. These routines will spot a lot of errors and hopefully save you time pawing over the debugger. I've only fully checked the primitive types that I happen to use... but if you're using a type I've not yet catered for there is an obvious switch construct where it'll be easy to add the code for the new type (you could copy and adapt code from a similar primitive type check). Use a good dose of common sense when interpretting the messages produced... for example if it tells you that some normal lengths are unusually short only you can know whether that constitutes an error or not since you may well have made the normal lengths short on purpose for some effect or other. I'm supplying the routines in a source file that you can include in your project. Then it's just a matter of calling one of them at the appropriate time. You can call 'TMD_check_via_handler' provided it's called after GsLinkObject4 (since GsLinkObject4 sets the pointer to the rest of the TMD data), or if your trying to find the cause of some errors thrown-up by GsLinkObject4, you can call 'TMD_check_via_object' just before the call to GsLinkObject4. Also supplied in the ZIP file is a TMD include file "TMD.h"... you may not need this if the definitions are the same as you use already -- they probably are since I extracted them from a SCEE yaroze demo (I can't rememeber which one). In that case you could probably just change the "#include TMD.h" at the top of the source file as appropriate. If you have any suggestions on other checks that could be made to filter-out even more errors, please let me know and I'll try to include them. All comments on my routines welcome (except really nasty rude ones!) Jon