Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- The F-Zero X source was kind enough to include some mention of building for Gateway64.
- The file in question is kn_backup.c
- There is an explict undefine of the Gateway build flag:
- #undef GATEWAY_SW
- #define GATEWAY_SW 0
- If GATEWAY_SW is True an unsigned short regGateWay is created. This is used to throw the game into a pause state when you hit the paywall.
- It also murders the SRAM DMAs, making it impossible to save. Uncomment the line and eliminate the one below it.
- void sramDma( u32 flag, uint sramOffsetAddr, void *pData, uint dataSize )
- {
- //#if GATEWAY_SW
- #if 0
- int i;
- uchar *p;
- #endif /* GATEWAY_SW */
- //#if GATEWAY_SW
- #if 0
- /* GATEWAYはSRAMアクセスなし */
- if( flag == OS_READ ) {
- p = (uchar *)pData;
- for( i = 0 ; i < dataSize ; i ++ ) {
- *p = 0xff;
- p ++;
- }
- }
- It also has its own DMA function to read the paywall flag:
- #if GATEWAY_SW
- static void gatewayDma( u32 flag, void *pData, uint dataSize )
- {
- osWritebackDCache( pData, dataSize );
- osInvalDCache( osPhysicalToVirtual((uint)pData), (int)dataSize );
- sramIoMesg.hdr.pri = OS_MESG_PRI_NORMAL;
- sramIoMesg.hdr.retQueue = &MesgQ_DMA;
- sramIoMesg.dramAddr = pData;
- sramIoMesg.devAddr = 0xff70000;
- sramIoMesg.size = dataSize;
- osEPiStartDma( pSramHandle, &sramIoMesg, flag );
- (void)osRecvMesg( &MesgQ_DMA, NULL, OS_MESG_BLOCK );
- }
- void writeGateWay( ushort value )
- {
- regGateWay = value;
- gatewayDma( OS_WRITE, ®GateWay, sizeof( regGateWay ) );
- }
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement