diff -rwc Src/Starter.c Gcc/Starter.c *** Src/Starter.c Fri Oct 8 10:40:52 1999 --- Gcc/Starter.c Mon Apr 24 11:22:57 2000 *************** *** 77,82 **** --- 77,83 ---- #include "notify.h" #include "hdw.h" + typedef void * Ptr; /*********************************************************************** * *************** *** 583,589 **** case sysAppLaunchCmdNotify: notify_param = (SysNotifyParamType *)cmdPBP; ! switch(*((UInt32 *)(notify_param->notifyParamP))) { case CFEventCardInserted: status = 1; --- 584,590 ---- case sysAppLaunchCmdNotify: notify_param = (SysNotifyParamType *)cmdPBP; ! switch(*((UInt32 *)(notify_param->notifyDetailsP))) { case CFEventCardInserted: status = 1; diff -rwc Src/ffslib.h Gcc/ffslib.h *** Src/ffslib.h Wed Sep 15 12:09:42 1999 --- Gcc/ffslib.h Mon Apr 24 11:18:56 2000 *************** *** 249,254 **** --- 249,299 ---- * WARNING!!! The order of these traps MUST match the order of the dispatch * table in FfsLibDispatch.c!!! ****************************************************************************/ + /* nao: gcc cant treat enum in asm */ + #ifdef __GNUC__ + + #define FfsLibTrapGetLibAPIVersion (sysLibTrapCustom+0) + #define FfsLibTrapGetdiskfree (sysLibTrapCustom+1) + #define FfsLibTrapFindfirst (sysLibTrapCustom+2) + #define FfsLibTrapFindnext (sysLibTrapCustom+3) + #define FfsLibTrapFinddone (sysLibTrapCustom+4) + #define FfsLibTrapFileOpen (sysLibTrapCustom+5) + #define FfsLibTrapFileClose (sysLibTrapCustom+6) + #define FfsLibTrapRead (sysLibTrapCustom+7) + #define FfsLibTrapWrite (sysLibTrapCustom+8) + #define FfsLibTrapRemove (sysLibTrapCustom+9) + #define FfsLibTrapChdir (sysLibTrapCustom+10) + #define FfsLibTrapGetcwd (sysLibTrapCustom+11) + #define FfsLibTrapMkdir (sysLibTrapCustom+12) + #define FfsLibTrapRmdir (sysLibTrapCustom+13) + #define FfsLibTrapFormat (sysLibTrapCustom+14) + #define FfsLibTrapRename (sysLibTrapCustom+15) + #define FfsLibTrapGetfileattr (sysLibTrapCustom+16) + #define FfsLibTrapFlush (sysLibTrapCustom+17) + #define FfsLibTrapFlushDisk (sysLibTrapCustom+18) + #define FfsLibTrapSetfileattr (sysLibTrapCustom+19) + #define FfsLibTrapStat (sysLibTrapCustom+20) + #define FfsLibTrapFstat (sysLibTrapCustom+21) + #define FfsLibTrapIsDir (sysLibTrapCustom+22) + #define FfsLibTrapLseek (sysLibTrapCustom+23) + #define FfsLibTrapGetErrno (sysLibTrapCustom+24) + #define FfsLibTrapTell (sysLibTrapCustom+25) + #define FfsLibTrapGetdrive (sysLibTrapCustom+26) + #define FfsLibTrapSetdrive (sysLibTrapCustom+27) + #define FfsLibTrapUnlink (sysLibTrapCustom+28) + #define FfsLibTrapEof (sysLibTrapCustom+29) + #define FfsLibTrapCreat (sysLibTrapCustom+30) + #define FfsLibTrapInstErrHandle (sysLibTrapCustom+31) + #define FfsLibTrapUnInstErrHandle (sysLibTrapCustom+32) + #define FfsLibTrapSetDebuggingOn (sysLibTrapCustom+33) + #define FfsLibTrapSetDebuggingOff (sysLibTrapCustom+34) + #define FfsLibTrapCardIsInserted (sysLibTrapCustom+35) + #define FfsLibTrapExerciseFAT (sysLibTrapCustom+36) + #define FfsLibTrapCardIsATA (sysLibTrapCustom+37) + #define FfsLibTrapLast (sysLibTrapCustom+38) + typedef int FfsLibTrapNumberEnum; + + #else typedef enum { FfsLibTrapGetLibAPIVersion = sysLibTrapCustom, FfsLibTrapGetdiskfree, *************** *** 290,296 **** FfsLibTrapCardIsATA, FfsLibTrapLast } FfsLibTrapNumberEnum; ! /******************************************************************** * CF FAT Filesystem API Prototypes --- 335,341 ---- FfsLibTrapCardIsATA, FfsLibTrapLast } FfsLibTrapNumberEnum; ! #endif /******************************************************************** * CF FAT Filesystem API Prototypes diff -rwc Src/hdw.c Gcc/hdw.c *** Src/hdw.c Fri Oct 8 09:16:40 1999 --- Gcc/hdw.c Mon Apr 24 13:08:10 2000 *************** *** 16,27 **** --- 16,38 ---- * Params : none * Returns : Previous SR value *---------------------------------------------------------------------------*/ + + #ifdef __GNUC__ + UInt16 HdwDisableInts(void) + { + UInt16 ret; + asm ("movew %%sr,%0; orw #0x0700,%%sr" : "=d"(ret) : ); + return ret; + } + #else asm UInt16 HdwDisableInts(void) { move.w sr, d0 ori.w #0x0700, sr rts } + #endif + /*--------------------------------------------------------------------------- * Function : HdwRestoreInts *************** *** 30,38 **** * Params : saved_ints -- SR value to restore * Returns : nothing *---------------------------------------------------------------------------*/ asm void HdwRestoreInts(UInt16 saved_ints) { move.w 4(a7), sr rts } ! --- 41,55 ---- * Params : saved_ints -- SR value to restore * Returns : nothing *---------------------------------------------------------------------------*/ + #ifdef __GNUC__ + void HdwRestoreInts(UInt16 saved_ints) + { + asm ("movew %0,%%sr" : : "d"(saved_ints)); + } + #else asm void HdwRestoreInts(UInt16 saved_ints) { move.w 4(a7),sr rts } ! #endif