xboxscene.org forums

OG Xbox Forums => Software Forums => Development => Topic started by: flattspott on September 15, 2003, 08:04:00 AM

Title: Programming With The Xbox Sdk
Post by: flattspott on September 15, 2003, 08:04:00 AM
CODE
#include


This is from the XDK. Your including something thats not there.
Title: Programming With The Xbox Sdk
Post by: BenJeremy on September 15, 2003, 09:43:00 AM
QUOTE (flattspott @ Sep 15 2003, 12:04 PM)
CODE
#include


This is from the XDK. Your including something thats not there.

He has the "XDK" - just not an "XDK" - as in Xbox Debug Kit, from what I gather, so he's saying he can't step through the code.
Title: Programming With The Xbox Sdk
Post by: delphaeus on September 17, 2003, 05:32:00 PM
QUOTE (aghogho @ Sep 15 2003, 11:44 AM)
I have the xbox sdk but not the xdk. With the xdk, I would have had the luxury of efficient debugging. That is not the case right now.

My first guess would be an issue with backface culling, but I see you've already got it disabled.  My suggest would be to hack it and use debugging.  Use the Phoenix BIOS Loader to load a debug BIOS, which will let you remotely debug on a retail XBox (although you won't have the Debug XBox's upper 64MB of RAM -- compile all your XBEs with /LIMITMEM!).  My box is a v1.1, no modchip, everything done through the Mechassault savegame hack, and I can load both the TATX Debug BFM and a stock 5558 debug BIOS without any problems.

(Mind, installing the XDK Launcher is required to do this, and that will require modifying the C drive, so be sure to back up if you want to reverse it earlier to play XBL.)
Title: Programming With The Xbox Sdk
Post by: aghogho on September 18, 2003, 03:49:00 AM
Thanks a lot delphaeus! One more question, do I need a 1MB mod chip to be able to convert my retail xbox into a debug? A lot of the articles on this site seem to suggest that.
Also, I have finally tracked down the error and it is associated with the OpenMeshFile() routine. For some reason, CreateFile() is returning an INVALID_HANDLE. I used the CreateFile() function for input because the xbox does not support some of the c/c++ io routines. Anyway better way of doing io?
Title: Programming With The Xbox Sdk
Post by: Mordenkainen on September 18, 2003, 04:03:00 AM
CODE

hFile = CreateFile("D:\\MeshFile.n", GENERIC_READ, NULL,
(LPSECURITY_ATTRIBUTES)NULL, OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL, (HANDLE)NULL);


The Xbox SHOULD automatically map D:\ to the directory your XBE is in.

Morden.
Title: Programming With The Xbox Sdk
Post by: delphaeus on September 18, 2003, 06:45:00 AM
QUOTE (aghogho @ Sep 18 2003, 04:49 AM)
Thanks a lot delphaeus! One more question, do I need a 1MB mod chip to be able to convert my retail xbox into a debug? A lot of the articles on this site seem to suggest that.

You will need a modchip that can support 1MB BIOSes to load most debug ROMs.  Or, as I suggested, use the Phoenix BIOS Loader to overwrite the decompresed copy of ROM in memory and warm-boot the machine -- then, you can leave your current setup intact, and just launch Phoenix from EvoX or whatever other alternate dash you're using.   Phoenix doesn't require a modchip and won't mess with one if installed -- it's entirely a RAM-based operation.

Good eye, Mordenkainen -- I totally overlooked that one.  Also, although fopen() works, CreateFile is preferable because it allows you to do very fast DMA reads if you're willing to do a bit of setup.  I threw together a routine a few months ago that takes a Unicode filename and returns an STL vector of unsigned chars (with a custom allocator to ensure the needed alignment for DMA writes) -- it's proven very handy for hacking stuff together to try out.