/*---------------------------------------------------------------------------* Project: Dolphin DVD fatal error demo File: dvdfatal.c Copyright 2002 Nintendo. All rights reserved. These coded instructions, statements, and computer programs contain proprietary information of Nintendo of America Inc. and/or Nintendo Company Ltd., and are protected by Federal copyright law. They may not be disclosed to third parties or copied or duplicated in any form, in whole or in part, without the prior written consent of Nintendo. $Log: dvdfatal.c,v $ Revision 1.2 2006/02/20 04:13:09 mitu changed include path from dolphin/ to revolution/. Revision 1.1 2006/01/17 02:43:50 hiratsu Initial check in. 1 8/20/02 21:52 Shiki Initial check-in. $NoKeywords: $ *---------------------------------------------------------------------------*/ #include // The name of the file we are going to read. const char* Filename = "texts/test1.txt"; void main(void) { DVDFileInfo fileInfo; u32 fileSize; VIInit(); DVDInit(); OSReport("Activate the disc fatal error to see the default disc fatal screen.\n"); DVDSetAutoFatalMessaging(TRUE); for (;;) { // We MUST open the file before accessing the file if (FALSE == DVDOpen(Filename, &fileInfo)) { OSHalt("Cannot open file"); } // Get the size of the file fileSize = DVDGetLength(&fileInfo); // read the entire file here if (0 > DVDRead(&fileInfo, OSGetArenaLo(), (s32)OSRoundUp32B(fileSize), 0)) { OSHalt("Error occurred when reading file"); } // Close the file DVDClose(&fileInfo); VIWaitForRetrace(); } // NOT REACHED HERE }