rem: *ptr.m_Long = (ULONG) pd->m_Custom + ( *ptr.m_Long & 0xfff );
add: *ptr.m_Long = (ULONG) pd->m_CustomDirect + ( *ptr.m_Long & 0xfff );
context: PatchROMShadowBuffer( struct PUHData* pd ){  union  {    void*            m_Void;    UWORD*           m_Word;    ULONG*           m_Long;    struct Resident* m_Resident;  } ptr;  void*  end;  ULONG  patches;  STRPTR module_name;  void*  module_rom_start;  void*  module_rom_end;  void*  module_end;  ptr.m_Void = pd->m_ROMShadowBuffer;  end        = (void*) ( (ULONG) pd->m_ROMShadowBuffer + pd->m_ROMSize );  patches          = 0;  module_name      = NULL;  module_rom_start = NULL;  module_rom_end   = NULL;  module_end       = NULL;  while( ptr.m_Void < end )  {    // Print summary    if( module_end != NULL && ptr.m_Void >= module_end )    {      if( patches != 0 )      {        printf( "Patched %ld instructions in '%s' ($%08lx-$%08lx).\n",                patches, module_name,                 (ULONG) module_rom_start, (ULONG) module_rom_end );      }      patches    = 0;      module_end = NULL;    }    // Check for new module    if( *ptr.m_Word == RTC_MATCHWORD )    {      if( ptr.m_Resident->rt_MatchTag ==           pd->m_ROM + ( ptr.m_Void - pd->m_ROMShadowBuffer ) )      {        module_name      = ptr.m_Resident->rt_Name;        module_rom_start = ptr.m_Void - pd->m_ROMShadowBuffer + pd->m_ROM;        module_rom_end   = ptr.m_Resident->rt_EndSkip;        module_end       = pd->m_ROMShadowBuffer + ( module_rom_end - pd->m_ROM );        if( strcmp( module_name, "audio.device" ) == 0 )        {          printf( "Skipping %s ($%08lx-$%08lx).\n",                   module_name,                   (ULONG) module_rom_start, (ULONG) module_rom_end );          module_end = NULL;          ptr.m_Void = pd->m_ROMShadowBuffer + ( ptr.m_Resident->rt_EndSkip - pd->m_ROM );          continue;        }      }    }    if( ( *ptr.m_Long & ~0x1ff ) == 0xdff000 )    {      *ptr.m_Long = (ULONG) pd->m_Custom + ( *ptr.m_Long & 0xfff );      ++patches;    }    // Skip to next word    ++ptr.m_Word;  }}