rem: if( ! InstallPUH( PUHF_PATCH_ROM,
add: if( ! InstallPUH( PUHF_PATCH_ROM | PUHF_PATCH_APPS,
context: main( int   argc,      char* argv[] ){  int   rc = 0;  ULONG mode_id;  ULONG frequency;  char* mode_ptr;  char* freq_ptr;  if( argc != 3 )  {    printf( "Usage: %s [0x]<AHI mode ID> <Frequency>\n", argv[ 0 ] );    return 20;  }  mode_id   = strtol( argv[ 1 ], &mode_ptr, 0 );  frequency = strtol( argv[ 2 ], &freq_ptr, 0 );  if( *mode_ptr != 0 || *freq_ptr != 0 )  {    printf( "Both first and second argument must be a number.\n" );    return 20;  }  printf( "Using mode ID 0x%08lx, %ld Hz.\n", mode_id, frequency );  DOSBase = (struct DosLibrary*) OpenLibrary( "dos.library", 37 );  MMUBase = OpenLibrary( "mmu.library", 41 );  if( DOSBase == NULL )  {    printf( "Unable to open dos.library version 37.\n" );    rc = 20;  }  if( MMUBase == NULL )  {    printf( "Unable to open mmu.library version 41.\n" );    rc = 20;  }  if( ! OpenAHI() )  {    printf( "Unable to open ahi.device version 4.\n" );    rc = 20;  }  if( rc == 0 )  {    struct PUHData* pd;    pd = AllocPUH();        if( pd == NULL )    {      rc = 20;    }    else    {      if( ! InstallPUH( PUHF_PATCH_ROM,                         mode_id, frequency,                        pd ) )      {        rc = 20;      }      else      {#if 1        if( ! ActivatePUH( pd ) )        {          rc = 20;        }        else#endif        {#ifdef TEST_MODE          Test( (struct Custom*) location );#else          Test( (struct Custom*) 0xdff000 );#endif          printf( "Waiting for CTRL-C...\n" );          Wait( SIGBREAKF_CTRL_C );          printf( "Got it.\n" );                  DeactivatePUH( pd );        }                UninstallPUH( pd );      }            FreePUH( pd );    }  }  CloseAHI();  CloseLibrary( MMUBase );  CloseLibrary( (struct Library*) DOSBase );  return rc;}