From f7874a4135404c95f5916e91a2513315a4ec5015 Mon Sep 17 00:00:00 2001 From: Azq2 Date: Fri, 23 Oct 2026 02:57:44 +0300 Subject: [PATCH 01/14] Create release.yml --- .github/workflows/release.yml | 40 +++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..9548ceb8 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,40 @@ +name: Release packages + +on: + release: + types: + - published + workflow_dispatch: + inputs: + tag: + description: Release tag to build and upload .epk packages for + required: true + +jobs: + epk: + runs-on: ubuntu-latest + permissions: + contents: write + concurrency: + group: ${{ github.workflow }}-${{ github.event.release.tag_name || inputs.tag }} + env: + TAG: ${{ github.event.release.tag_name || inputs.tag }} + steps: + - uses: actions/checkout@v4 + with: + ref: refs/tags/${{ env.TAG }} + + - name: Install toolchain + uses: carlosperate/arm-none-eabi-gcc-action@v1 + with: + release: 14.2.Rel1 + + - name: Build + run: | + cmake -B build + cmake --build build -j"$(nproc)" + + - name: Upload packages + env: + GH_TOKEN: ${{ github.token }} + run: gh release upload "$TAG" build/*.epk --clobber From 99d528c516caf4ae94e7400037abed0159f10f6b Mon Sep 17 00:00:00 2001 From: Kirill Zhumarin Date: Fri, 23 Oct 2026 03:41:30 +0300 Subject: [PATCH 02/14] Fix EPK packaging with CMake 3.31 CMake 3.31 cannot parse --mtime=@, use an equivalent date string. --- cmake/EpkPackage.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/EpkPackage.cmake b/cmake/EpkPackage.cmake index e8c02a1f..6e5fc70c 100644 --- a/cmake/EpkPackage.cmake +++ b/cmake/EpkPackage.cmake @@ -357,7 +357,7 @@ function(epk_package) COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${_EPK_PKGINFO}" "${_EPK_STAGE_DIR}/.PKGINFO" ${_EPK_COMMANDS} COMMAND "${CMAKE_COMMAND}" -E chdir "${_EPK_STAGE_DIR}" - "${CMAKE_COMMAND}" -E tar cf "${_EPK_OUTPUT}" --format=zip --mtime=@1172750400 . + "${CMAKE_COMMAND}" -E tar cf "${_EPK_OUTPUT}" --format=zip "--mtime=2007-03-01 12:00:00 UTC" . DEPENDS "${CMAKE_CURRENT_FUNCTION_LIST_FILE}" "${_EPK_PKGINFO}" From af16ade49f7334b628211b38199686aa8cbdb4a9 Mon Sep 17 00:00:00 2001 From: Philip Minakov Date: Sun, 25 Oct 2026 15:07:22 +0400 Subject: [PATCH 03/14] Rename swi functions --- swilib/include/swilib/player.h | 8 ++++---- swilib/patterns.toml | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/swilib/include/swilib/player.h b/swilib/include/swilib/player.h index c708f31d..2882cba8 100644 --- a/swilib/include/swilib/player.h +++ b/swilib/include/swilib/player.h @@ -54,16 +54,16 @@ __swi_end(0x223, IsMediaPlayerInBackground, ()); * @return pointer to the WSHDR * */ __swi_begin(0x082) -const WSHDR *GetLastAudioTrackFilename() -__swi_end(0x082, GetLastAudioTrackFilename, ()); +const WSHDR *MediaProc_GetLastAudioTrackFilename() +__swi_end(0x082, MediaProc_GetLastAudioTrackFilename, ()); /** * Get the directory of the last audio track in media player. * @return pointer to the WSHDR * */ __swi_begin(0x3B2) -const WSHDR *GetLastAudioTrackDir() -__swi_end(0x3B2, GetLastAudioTrackDir, ()); +const WSHDR *MediaProc_GetLastAudioTrackDir() +__swi_end(0x3B2, MediaProc_GetLastAudioTrackDir, ()); /** * Close MediaPlayer. diff --git a/swilib/patterns.toml b/swilib/patterns.toml index 2deec50d..d3b15c1f 100644 --- a/swilib/patterns.toml +++ b/swilib/patterns.toml @@ -746,7 +746,7 @@ decl = "int HexCharToInt(char c)" NSG = "0A1040E2200140E0200280E0200480E0200880E0A001A0E1002180E0821051E0010080520A1081421EFF2FE1" [082] -decl = "const WSHDR *GetLastAudioTrackFilename()" +decl = "const WSHDR *MediaProc_GetLastAudioTrackFilename()" NSG = """ ?? B5 ?? B0 ?? A9 ?? 46 ?? 22 ?? ?? ?? ?? ?? 4D ?? 1C ?? 69 ?? 30 ?? 69 ?? 28 ?? D1 ?? 22 ?? 21 ?? 1C LDR[46 49 4C 45 4E 41 4D 45 00] + 1 @@ -4807,7 +4807,7 @@ decl = "void SettingsAE_RegisterListener(SettingsAE_ListenerProc proc, int set_i decl = "void SettingsAE_DeregisterListener(SettingsAE_ListenerProc proc, int set_id, const char *entry, const char *keyword)" [3B2] -decl = "const WSHDR *GetLastAudioTrackDir()" +decl = "const WSHDR *MediaProc_GetLastAudioTrackDir()" [3B3] decl = "IMGHDR *GetIMGHDRFromCanvasCache(char canvas_id)" From cec67267668579a077a7923ae930d4f87dab1fc7 Mon Sep 17 00:00:00 2001 From: Philip Minakov Date: Sun, 25 Oct 2026 15:20:54 +0400 Subject: [PATCH 04/14] Add patterns --- swilib/patterns.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/swilib/patterns.toml b/swilib/patterns.toml index d3b15c1f..cb177712 100644 --- a/swilib/patterns.toml +++ b/swilib/patterns.toml @@ -4808,6 +4808,8 @@ decl = "void SettingsAE_DeregisterListener(SettingsAE_ListenerProc proc, int set [3B2] decl = "const WSHDR *MediaProc_GetLastAudioTrackDir()" +NSG = "B0 B5 C6 B0 05 A9 68 46 81 22 ?? [111100..] ?? [11.0....] ?? 4D 04 1C 28 69 80 30 C0 69" +ELKA = "30 40 2D E9 47 DF 4D E2 18 10 8D E2 04 00 8D E2 81 20 A0 E3 ?? ?? ?? [1111101.] ?? 5? 1F E5 00 40 A0 E1 10 00 95 E5 9C 00 90 E5" [3B3] decl = "IMGHDR *GetIMGHDRFromCanvasCache(char canvas_id)" From b12545817c918189198fdfd741e66db9a22a5d26 Mon Sep 17 00:00:00 2001 From: Philip Minakov Date: Sun, 25 Oct 2026 21:54:28 +0400 Subject: [PATCH 05/14] Add swi functions --- swilib/include/swilib/player.h | 34 +++++++++++++++++++++++++++++++++- swilib/patterns.toml | 20 ++++++++++++++++++++ 2 files changed, 53 insertions(+), 1 deletion(-) diff --git a/swilib/include/swilib/player.h b/swilib/include/swilib/player.h index 2882cba8..0fe08f7f 100644 --- a/swilib/include/swilib/player.h +++ b/swilib/include/swilib/player.h @@ -58,13 +58,45 @@ const WSHDR *MediaProc_GetLastAudioTrackFilename() __swi_end(0x082, MediaProc_GetLastAudioTrackFilename, ()); /** - * Get the directory of the last audio track in media player. + * Get the directory of the last audio track in the media player. * @return pointer to the WSHDR * */ __swi_begin(0x3B2) const WSHDR *MediaProc_GetLastAudioTrackDir() __swi_end(0x3B2, MediaProc_GetLastAudioTrackDir, ()); +/** + * Get the last activated music filter ID in the media player. + * @return unique filter ID + * */ +__swi_begin(0x3AD) +int MediaProc_GetLastActivatedMusicFilter() +__swi_end(0x3AD, MediaProc_GetLastActivatedMusicFilter, ()); + +/** + * Get the LUID of the last activated music genre in the media player. + * @return unique genre LUID + * */ +__swi_begin(0x3AE) +int MediaProc_GetLastActivatedMusicGenreLUID() +__swi_end(0x3AE, MediaProc_GetLastActivatedMusicGenreLUID, ()); + +/** + * Get the LUID of the last activated music artist in the media player. + * @return unique artist LUID + * */ +__swi_begin(0x3AF) +int MediaProc_GetLastActivatedMusicArtistLUID() +__swi_end(0x3AF, MediaProc_GetLastActivatedMusicArtistLUID, ()); + +/** + * Get the LUID of the last activated music album in the media player. + * @return unique album LUID + * */ +__swi_begin(0x3B6) +int MediaProc_GetLastActivatedMusicAlbumLUID() +__swi_end(0x3B6, MediaProc_GetLastActivatedMusicAlbumLUID, ()); + /** * Close MediaPlayer. * */ diff --git a/swilib/patterns.toml b/swilib/patterns.toml index cb177712..2b837f3e 100644 --- a/swilib/patterns.toml +++ b/swilib/patterns.toml @@ -4800,6 +4800,21 @@ NSG = "F0,B5,0F,B4,0F,1C,14,1C,81,B0,00,2C,??,??,00,20,05,B0,F0,BC +1" [3AC] decl = "int EVP_add_cipher(EVP_CIPHER *c)" +[3AD] +decl = "int MediaProc_GetLastActivatedMusicFilter()" +NSG = "98 B5 ?? 4C 20 69 40 6C" +ELKA = "1C 40 2D E9 ?? 4? 1F E5 10 00 94 E5 44 00 90 E5" + +[3AE] +decl = "int MediaProc_GetLastActivatedMusicGenreLUID()" +NSG = "98 B5 ?? 4C 20 69 40 6D" +ELKA = "1C 40 2D E9 ?? 4? 1F E5 10 00 94 E5 54 00 90 E5" + +[3AF] +decl = "int MediaProc_GetLastActivatedMusicArtistLUID()" +NSG = "98 B5 ?? 4C 20 69 C0 6D" +ELKA = "1C 40 2D E9 ?? 4? 9F E5 10 00 94 E5 5C 00 90 E5" + [3B0] decl = "void SettingsAE_RegisterListener(SettingsAE_ListenerProc proc, int set_id, const char *entry, const char *keyword)" @@ -4820,6 +4835,11 @@ decl = "void GetDate_ws(WSHDR *ws, const TDate *date, unsigned int unk)" [3B5] decl = "void GetTime_ws(WSHDR *ws, const TTime *time, unsigned int unk)" +[3B6] +decl = "int MediaProc_GetLastActivatedMusicAlbumLUID()" +NSG = "98 B5 ?? 4C 20 69 40 6E" +ELKA = "1C 40 2D E9 ?? 4? 1F E5 10 00 94 E5 64 00 90 E5" + [3B7] decl = "int sys_mkdir_ws(const WSHDR *dirname, uint32_t *err)" From 72134fb29b4e66862c0a2bcc4002e68a7cb9ead3 Mon Sep 17 00:00:00 2001 From: Kirill Zhumarin Date: Sun, 25 Oct 2026 12:45:08 +0000 Subject: [PATCH 06/14] Corrent swilib functions definitions --- swilib/config.toml | 2 - swilib/include/swilib/addressbook.h | 16 +++--- swilib/include/swilib/compiler/doxygen.h | 4 ++ swilib/include/swilib/compiler/gcc.h | 11 ++++ swilib/include/swilib/compiler/gcc_linux.h | 3 ++ swilib/include/swilib/compiler/gcc_patch.h | 3 ++ swilib/include/swilib/compiler/iar.h | 3 ++ swilib/include/swilib/date.h | 21 ++++---- swilib/include/swilib/eeprom.h | 59 ++++++++++++---------- swilib/include/swilib/explorer.h | 29 +++++++---- swilib/include/swilib/file.h | 27 +++++++--- swilib/include/swilib/gprs.h | 16 +++--- swilib/include/swilib/idle.h | 3 +- swilib/include/swilib/info.h | 16 +++--- swilib/include/swilib/legacy.h | 27 +++++----- swilib/include/swilib/libc.h | 18 ++----- swilib/include/swilib/misc.h | 7 +-- swilib/include/swilib/nucleus.h | 20 +++++--- swilib/include/swilib/patch.h | 14 +++-- swilib/include/swilib/settings.h | 5 +- swilib/include/swilib/sound.h | 9 ++-- swilib/include/swilib/system.h | 12 ++--- swilib/include/swilib/telephony.h | 7 ++- swilib/include/swilib/utils.h | 22 ++++---- swilib/include/swilib/wstring.h | 4 +- 25 files changed, 207 insertions(+), 151 deletions(-) diff --git a/swilib/config.toml b/swilib/config.toml index a31cc5c7..bc58b80b 100644 --- a/swilib/config.toml +++ b/swilib/config.toml @@ -111,8 +111,6 @@ pairs = [ [0x12E, 0x03F], # GetPaletteAdrByColorIndex [0x13B, 0x064], # GeneralFuncF1 [0x364, 0x1F3], # NU_Retrieve_Clock - [0x365, 0x366], # NU_Release_Information - [0x254, 0x22E], # StartNativeExplorer [0x14B, 0x077], # DrwObj_SetColor [0x1B4, 0x09F], # DrawRectangle [0x1AB, 0x1D6, 0x1AD], # png_set_palette_to_rgb diff --git a/swilib/include/swilib/addressbook.h b/swilib/include/swilib/addressbook.h index 502798b0..e6fbe115 100644 --- a/swilib/include/swilib/addressbook.h +++ b/swilib/include/swilib/addressbook.h @@ -111,8 +111,8 @@ struct NativeAbData { }; /** - * Open native adressbook. - * @param type type of AdressBook UI + * Open native address book. + * @param type type of address-book UI * @param unk1 unknown * @param unk2 unknown * @param data pointer to the #NativeAbData or NULL @@ -181,13 +181,13 @@ __swi_end(0x2B5, GetNativeAbDataType, (data, index)); /** * Get number from the #NativeAbData * @param data pointer to the native addressbook data - * @param type usually result of the `GetNativeAbDataType(data, 0)` - * @param unk0 set to 0 - * @return 1: success, 0: error + * @param type item type + * @param index zero-based item index + * @return newly allocated string, or NULL if the item was not found; free with #FreeWS * */ __swi_begin(0x2B6) -WSHDR *GetNumFromNativeAbData(NativeAbData *data, int type, int unk0) -__swi_end(0x2B6, GetNumFromNativeAbData, (data, type, unk0)); +WSHDR *GetNumFromNativeAbData(NativeAbData *data, int type, int index) +__swi_end(0x2B6, GetNumFromNativeAbData, (data, type, index)); /** * Set number to the #NativeAbData @@ -238,7 +238,7 @@ int FreeUnpackABentry(AB_UNPRES *entry, void *mfree_fn) __swi_end(0x16E, FreeUnpackABentry, (entry, mfree_fn)); /** - * Convert AB_UNPRESS.item_type to the NativeAbData item type. + * Convert AB_UNPRES.item_type to the NativeAbData item type. * @param item_type input type * @return converted type * */ diff --git a/swilib/include/swilib/compiler/doxygen.h b/swilib/include/swilib/compiler/doxygen.h index 689676be..16362781 100644 --- a/swilib/include/swilib/compiler/doxygen.h +++ b/swilib/include/swilib/compiler/doxygen.h @@ -19,6 +19,8 @@ #define __swi_noreturn_begin(number) __swi_begin #define __swi_noreturn_end(number, func, call) __swi_end(number, func) + #define __swi_returns_twice_begin(number) __swi_begin + #define __swi_returns_twice_end(number, func, call) __swi_end(number, func) #define __swi_variadic_begin(number) __swi_begin #define __swi_variadic_end(number, func, ...) __swi_end(number, func) @@ -32,6 +34,8 @@ #define __swi_noreturn_begin(number) #define __swi_noreturn_end(number, func, call) + #define __swi_returns_twice_begin(number) + #define __swi_returns_twice_end(number, func, call) #define __swi_variadic_begin(number) #define __swi_variadic_end(number, func, ...) diff --git a/swilib/include/swilib/compiler/gcc.h b/swilib/include/swilib/compiler/gcc.h index 2adf232b..512628e0 100644 --- a/swilib/include/swilib/compiler/gcc.h +++ b/swilib/include/swilib/compiler/gcc.h @@ -41,9 +41,14 @@ extern const int __sys_switab_addres[]; #define __swi_noreturn_end(number, func, call) \ __asm__(__swi_import_name(number)) __attribute__((weak, noreturn)) + #define __swi_returns_twice_begin(number) + #define __swi_returns_twice_end(number, func, call) \ + __asm__(__swi_import_name(number)) __attribute__((weak, returns_twice)) + #define __swi_variadic_begin(number) #define __swi_variadic_end(number, func, ...) \ __asm__(__swi_import_name(number)) __attribute__((weak)) + #else #define __swi_begin(number) static inline __attribute__((flatten)) #define __swi_end(number, func, call) { \ @@ -59,6 +64,11 @@ extern const int __sys_switab_addres[]; ((__typeof__(&func)) __sys_switab_addres[number])call; \ } + #define __swi_returns_twice_begin(number) static inline __attribute__((always_inline, returns_twice)) + #define __swi_returns_twice_end(number, func, call) { \ + return ((__typeof__(&func)) __sys_switab_addres[number])call; \ + } + #define __swi_variadic_begin(number) \ _Pragma("GCC diagnostic push") \ _Pragma("GCC diagnostic ignored \"-Wformat-nonliteral\"") \ @@ -67,6 +77,7 @@ extern const int __sys_switab_addres[]; return ((__typeof__(&func)) __sys_switab_addres[number])(__VA_ARGS__, __builtin_va_arg_pack()); \ } \ _Pragma("GCC diagnostic pop") + #endif #define __swi_format(type, ...) \ diff --git a/swilib/include/swilib/compiler/gcc_linux.h b/swilib/include/swilib/compiler/gcc_linux.h index ea4151ed..7b7583c3 100644 --- a/swilib/include/swilib/compiler/gcc_linux.h +++ b/swilib/include/swilib/compiler/gcc_linux.h @@ -26,6 +26,9 @@ #define __swi_noreturn_begin(number) #define __swi_noreturn_end(number, func, call) +#define __swi_returns_twice_begin(number) +#define __swi_returns_twice_end(number, func, call) + #define __swi_variadic_begin(number) #define __swi_variadic_end(number, func, ...) diff --git a/swilib/include/swilib/compiler/gcc_patch.h b/swilib/include/swilib/compiler/gcc_patch.h index 21b96a15..b5f6c773 100644 --- a/swilib/include/swilib/compiler/gcc_patch.h +++ b/swilib/include/swilib/compiler/gcc_patch.h @@ -28,6 +28,9 @@ unsigned int __attribute__((warning("Function not found in swilib."))) ___bad_sw #define __swi_noreturn_begin(number) #define __swi_noreturn_end(number, func, call) +#define __swi_returns_twice_begin(number) +#define __swi_returns_twice_end(number, func, call) + #define __swi_variadic_begin(number) #define __swi_variadic_end(number, func, ...) diff --git a/swilib/include/swilib/compiler/iar.h b/swilib/include/swilib/compiler/iar.h index 628f8b22..0e779d7b 100644 --- a/swilib/include/swilib/compiler/iar.h +++ b/swilib/include/swilib/compiler/iar.h @@ -20,6 +20,9 @@ #define __swi_noreturn_begin(number) __swi_pragma(swi_number=number) __swi __arm #define __swi_noreturn_end(number, func, call) +#define __swi_returns_twice_begin(number) __swi_begin(number) +#define __swi_returns_twice_end(number, func, call) __swi_end(number, func, call) + #define __swi_variadic_begin(number) __swi_begin(number) #define __swi_variadic_end(number, func, ...) diff --git a/swilib/include/swilib/date.h b/swilib/include/swilib/date.h index 8cfbcc94..7ab0ad73 100644 --- a/swilib/include/swilib/date.h +++ b/swilib/include/swilib/date.h @@ -87,8 +87,8 @@ TDateTimeSettings *RamDateTimeSettings(void) __swi_end(0x822F, RamDateTimeSettings, ()); /** - * Check if "Auto Time" setting enabled. - * @return 1 or 0 + * Get the address of the "Auto Time" enabled flag. + * @return pointer to a byte containing 0 or 1 * */ __swi_begin(0x80D2) char *RamIsAutoTimeEnabled(void) @@ -115,9 +115,9 @@ int GetTimeZoneShift(const TDate *date, const TTime *time, int timezone_id) __swi_end(0x230, GetTimeZoneShift, (date, time, timezone_id)); /** - * Get week number by date. + * Get day of week for a date. * @param date date of the day - * @return week number in the year + * @return day of week * */ __swi_begin(0x0B5) char GetWeek(const TDate *date) @@ -129,7 +129,7 @@ __swi_end(0x0B5, GetWeek, (date)); * @return total number of days * */ __swi_begin(0x3E8) -int64_t GetDays(const TDate *date) +int GetDays(const TDate *date) __swi_end(0x3E8, GetDays, (date)); /** @@ -194,7 +194,7 @@ __swi_end(0x2CB, GetTimeFromSeconds, (time, seconds)); /** * Convert milliseconds to TTime. * @param[out] time output for calculated time - * @param milliseconds number of seconds + * @param milliseconds number of milliseconds * */ __swi_begin(0x3E4) void GetTimeFromMilliseconds(TTime *time, uint32_t milliseconds) @@ -277,7 +277,7 @@ void DateAddDays(TDate *date, int days) __swi_end(0x3E5, DateAddDays, (date, days)); /** - * Add or subtract days from a date. + * Add or subtract months from a date. * @param date date of the day * @param months number of months to add (positive) or subtract (negative) * */ @@ -286,7 +286,7 @@ void DateAddMonths(TDate *date, int months) __swi_end(0x3E6, DateAddMonths, (date, months)); /** - * Add or subtract days from a date. + * Add or subtract years from a date. * @param date date of the day * @param years number of years to add (positive) or subtract (negative) * */ @@ -297,9 +297,10 @@ __swi_end(0x3E7, DateAddYears, (date, years)); /** * Get array of time zones. * @return pointer to the array + * @platforms NSG, ELKA * */ __swi_begin(0x83DF) -TZ *RamTimeZones() +TZ *RamTimeZones(void) __swi_end(0x83DF, RamTimeZones, ()); /** @@ -307,7 +308,7 @@ __swi_end(0x83DF, RamTimeZones, ()); * @return time zone id * */ __swi_begin(0x3E0) -int GetCurrentTimeZone() +int GetCurrentTimeZone(void) __swi_end(0x3E0, GetCurrentTimeZone, ()); /** diff --git a/swilib/include/swilib/eeprom.h b/swilib/include/swilib/eeprom.h index 85bdd435..b467b8a2 100644 --- a/swilib/include/swilib/eeprom.h +++ b/swilib/include/swilib/eeprom.h @@ -20,12 +20,18 @@ __swilib_begin * @{ * */ +/** + * EELITE write-operation completion callback. + * @param status operation status; zero indicates success + * */ +typedef void (*EELiteCallback)(int status); + /** * Get the last ID of the EELITE blocks. * @return ID * */ __swi_begin(0x028) -uint32_t GetEELiteMaxID() +uint32_t GetEELiteMaxID(void) __swi_end(0x028, GetEELiteMaxID, ()); /** @@ -41,7 +47,6 @@ __swi_end(0x02B, GetEELiteBlockSizeVersion, (block, size, version)); /** * Get a pointer to the EELITE block data. - * Each EELITE block is directly stored in the flash and can be accessed via memory address. * @param block EELITE block number * @return pointer to the block data * */ @@ -53,13 +58,13 @@ __swi_end(0x02A, GetEELiteBlockAddress, (block)); * Begin writing to the EELITE block. * @param block EELITE block number * @param size size of writing - * @param version block version - * @param null set to NULL + * @param version block version; only the low byte is stored + * @param callback optional completion callback * @return 0 or error * */ __swi_begin(0x02D) -int StartWriteEELiteBlock(uint32_t block, uint32_t size, uint32_t version, int *null) -__swi_end(0x02D, StartWriteEELiteBlock, (block, size, version, null)); +int StartWriteEELiteBlock(uint32_t block, uint32_t size, uint32_t version, EELiteCallback callback) +__swi_end(0x02D, StartWriteEELiteBlock, (block, size, version, callback)); /** * Write data to the EELITE block. @@ -67,32 +72,32 @@ __swi_end(0x02D, StartWriteEELiteBlock, (block, size, version, null)); * @param buf new block data * @param offset offset in the block * @param size size to the write - * @param null set to NULL + * @param callback optional completion callback * @return 0 or error * */ __swi_begin(0x030) -int WriteEELiteBlock(uint32_t block, void *buf, uint32_t offset, uint32_t size, int *null) -__swi_end(0x030, WriteEELiteBlock, (block, buf, offset, size, null)); +int WriteEELiteBlock(uint32_t block, const void *buf, uint32_t offset, uint32_t size, EELiteCallback callback) +__swi_end(0x030, WriteEELiteBlock, (block, buf, offset, size, callback)); /** * Finish writing to the EELITE block. * @param block EELITE block number - * @param null set to NULL + * @param callback optional completion callback * @return 0 or error * */ __swi_begin(0x02E) -int FinishWriteEELiteBlock(uint32_t block, int *null) -__swi_end(0x02E, FinishWriteEELiteBlock, (block, null)); +int FinishWriteEELiteBlock(uint32_t block, EELiteCallback callback) +__swi_end(0x02E, FinishWriteEELiteBlock, (block, callback)); /** * Delete block in the EELITE. * @param block EELITE block number - * @param null set to NULL + * @param callback optional completion callback * @return 0 or error * */ __swi_begin(0x02F) -int DeleteEELiteBlock(uint32_t block, int *null) -__swi_end(0x02F, DeleteEELiteBlock, (block, null)); +int DeleteEELiteBlock(uint32_t block, EELiteCallback callback) +__swi_end(0x02F, DeleteEELiteBlock, (block, callback)); /** @} */ @@ -102,16 +107,16 @@ __swi_end(0x02F, DeleteEELiteBlock, (block, null)); * */ /** - * Get the last ID of the EEFUL blocks. + * Get the last ID of the EEFULL blocks. * @return ID * */ __swi_begin(0x029) -uint32_t GetEEFullMaxID() +uint32_t GetEEFullMaxID(void) __swi_end(0x029, GetEEFullMaxID, ()); /** - * Get info about the EEFUL block. - * @param block EEFUL block number + * Get info about the EEFULL block. + * @param block EEFULL block number * @param[out] size block size * @param[out] version block version * @return 0 or error @@ -121,8 +126,8 @@ int EEFullGetBlockInfo(uint32_t block, int *size, char *version) __swi_end(0x02C, EEFullGetBlockInfo, (block, size, version)); /** - * Read block from the EEFUL. - * @param block EEFUL block number + * Read block from the EEFULL. + * @param block EEFULL block number * @param[out] buf output buffer for block data * @param offset offset in the block data * @param size size to the read @@ -134,8 +139,8 @@ void EEFullReadBlock(int block, void *buf, int offset, int size, int cepid, int __swi_end(0x086, EEFullReadBlock, (block, buf, offset, size, cepid, msg)); /** - * Update block in the EEFUL. - * @param block EEFUL block number + * Update block in the EEFULL. + * @param block EEFULL block number * @param buf new block data * @param offset offset in the block * @param size size to the write @@ -147,8 +152,8 @@ void EEFullWriteBlock(int block, const void *buf, int offset, int size, int cepi __swi_end(0x087, EEFullWriteBlock, (block, buf, offset, size, cepid, msg)); /** - * Delete block in the EEFUL. - * @param block EEFUL block number + * Delete block in the EEFULL. + * @param block EEFULL block number * @param cepid CEPID, set to 0xFFFF * @param msg GBS message ID, set to 0 * @return 0 or error @@ -158,8 +163,8 @@ int EEFullDeleteBlock(uint32_t block, int cepid, int msg) __swi_end(0x239, EEFullDeleteBlock, (block, cepid, msg)); /** - * Create new block in the EEFUL. - * @param block EEFUL block number + * Create new block in the EEFULL. + * @param block EEFULL block number * @param size block size * @param version block version * @param cepid CEPID, set to 0xFFFF diff --git a/swilib/include/swilib/explorer.h b/swilib/include/swilib/explorer.h index 10f4db2c..9992f633 100644 --- a/swilib/include/swilib/explorer.h +++ b/swilib/include/swilib/explorer.h @@ -107,8 +107,7 @@ struct REGEXPLEXT { }; /** - * Structure of the registered extension in RAM (on SGOLD). - * Returend by #get_regextpnt_by_uid + * Native Explorer extension entry returned by #get_regextpnt_by_uid on SG and X75. * */ struct REGEXPLEXT_ARM_NEW { int zero; @@ -149,7 +148,7 @@ __swi_end(0x095, UnRegExplorerExt, (ext)); * @builtin ELKA, NSG, X75, SG * */ __swi_begin(0x81B8) -TREGEXPLEXT *EXT_TOP(void) +void *EXT_TOP(void) __swi_end(0x81B8, EXT_TOP, ()); /** @@ -195,6 +194,7 @@ __swi_end(0x2DB, MediaSendCSM_Open, (file, path)); * @param flag 0 or 2 * @param open_mode unknown param, set 0 * @return CSM ID + * @platforms NSG, ELKA * */ __swi_begin(0x3CC) int PersMenuCSM_Open(const WSHDR *file_name, const WSHDR *dir, int flag, int open_mode) @@ -256,6 +256,7 @@ __swi_end(0x094, ExecuteFile, (filepath, mime, param)); * @param transfer_id transfer ID (0 ... 31) * @param[out] errp variable for error * @return 0 or error + * @note Paths are WSHDR strings on NSG and ELKA, and C strings on SG and X75. * * ``` * int transfer_id = 0; // warning: needed function for safe transfer_id allocation @@ -264,36 +265,42 @@ __swi_end(0x094, ExecuteFile, (filepath, mime, param)); * ``` * */ __swi_begin(0x1F0) +#ifdef NEWSGOLD int ExplorerCopyFile(const WSHDR *from, const WSHDR *to, int overwrite, char transfer_id, uint32_t *errp) +#else +int ExplorerCopyFile(const char *from, const char *to, int overwrite, char transfer_id, uint32_t *errp) +#endif __swi_end(0x1F0, ExplorerCopyFile, (from, to, overwrite, transfer_id, errp)); /** * Set transfer state. * @param transfer_id transfer ID (0 ... 31) * @param state see #ExplorerTransferStates - * @return 0 or error + * @platforms NSG, ELKA, X75, SG * */ __swi_begin(0x1F1) -int ExplorerSetTransferState(char transfer_id, int state) +void ExplorerSetTransferState(char transfer_id, int state) __swi_end(0x1F1, ExplorerSetTransferState, (transfer_id, state)); /** * Get MIME type. * @param uid file uid, see #GetExtUid_ws, #GetExtUidByFileName_ws - * @param[out] mime_type pointer to WSHDR string - * @param unk_0 unknown param, set to 0 - * @return 1: success, 0: error + * @param[out] mime_type output string, or NULL to only test whether the requested mapping exists + * @param occurrence zero-based index among entries matching @p uid; 0 selects the first match + * @return 1 if the requested mapping exists, 0 otherwise; when @p mime_type is non-NULL, the mapping is also copied + * @platforms NSG, ELKA * */ __swi_begin(0x3C8) -int GetMimeType(int uid, WSHDR *mime_type, int unk_0) -__swi_end(0x3C8, GetMimeType, (uid, mime_type, unk_0)); +int GetMimeType(int uid, WSHDR *mime_type, int occurrence) +__swi_end(0x3C8, GetMimeType, (uid, mime_type, occurrence)); /** * Build a full path by a file name and a directory name. * @param[out] path pointer to WSHDR string * @param file_name pointer to WSHDR string, that contains a file name * @param dir pointer to WSHDR string, that contains a directory name - * @return 1: success, 0: error + * @return 1 on success, 0 for NULL arguments; NSG and ELKA also return 0 for insufficient capacity in @p path + * @warning On SG and X75, @p path must have enough capacity for the complete result; firmware does not check it. * */ __swi_begin(0x3D5) int BuildPath(WSHDR *path, const WSHDR *file_name, const WSHDR *dir) diff --git a/swilib/include/swilib/file.h b/swilib/include/swilib/file.h index e96cee40..8dd4e9e4 100644 --- a/swilib/include/swilib/file.h +++ b/swilib/include/swilib/file.h @@ -37,7 +37,7 @@ enum FileAttributes { enum FileSeekOrigin { S_SET = 0, /*!< cur_offset = offset */ S_CUR = 1, /*!< cur_offset = cur_offset + offset */ - S_END = 2, /*!< cur_offset = file_size - 1 */ + S_END = 2, /*!< cur_offset = file_size + offset */ }; /** @@ -241,14 +241,14 @@ __swi_end(0x00E, sys_fflush, (fd, err)); /** * Move to the desired position within the file. * @param fd file descriptor - * @param offset desired position + * @param offset signed offset * @param origin see #FileSeekOrigin * @param[out] err error code * @param[out] err2 error code - * @return 0 or error + * @return resulting file position, or -1 on error * */ __swi_begin(0x00F) -long sys_lseek(int fd, uint32_t offset, uint32_t origin, uint32_t *err, uint32_t *err2) +long sys_lseek(int fd, int32_t offset, uint32_t origin, uint32_t *err, uint32_t *err2) __swi_end(0x00F, sys_lseek, (fd, offset, origin, err, err2)); /** @@ -282,7 +282,7 @@ __swi_end(0x08F, sys_rmdir, (dirname, err)); * @copydoc sys_rmdir * */ __swi_begin(0x3B8) -int sys_rmdir_ws(const WSHDR *path, unsigned int *err) +int sys_rmdir_ws(const WSHDR *path, uint32_t *err) __swi_end(0x3B8, sys_rmdir_ws, (path, err)); /** @@ -317,7 +317,7 @@ __swi_end(0x16B, sys_unlink, (path, err)); * @copydoc sys_unlink * */ __swi_begin(0x3BA) -int sys_unlink_ws(const WSHDR *path, unsigned int *err) +int sys_unlink_ws(const WSHDR *path, uint32_t *err) __swi_end(0x3BA, sys_unlink_ws, (path, err)); /** @@ -550,9 +550,20 @@ __swi_begin(0x06C) int FindNextFile(DIR_ENTRY *dir_entry, uint32_t *err) __swi_end(0x06C, FindNextFile, (dir_entry, err)); +/** + * Convert a directory-search result to the SG/X75 file-list record. + * @param dir_entry directory-search result + * @param[out] file_info output buffer of at least 0x110 bytes + * @return 1 on success, 0 if the entry cannot be converted + * @platforms X75, SG + * */ +__swi_begin(0x083) +int GetPathOfFoundFile(DIR_ENTRY *dir_entry, void *file_info) +__swi_end(0x083, GetPathOfFoundFile, (dir_entry, file_info)); + /** * Close search session - * @param dir_entry first found file + * @param dir_entry pointer to the search session * @param[out] err error code * @return 0 or error * */ @@ -573,7 +584,7 @@ __swi_end(0x08A, GetFreeFlexSpace, (drive, err)); /** * Get total space on a specified disk. * @param drive number of the drive: 0-4 - * @param[out] err error code + * @param err unused * @return bytes count * */ __swi_begin(0x08B) diff --git a/swilib/include/swilib/gprs.h b/swilib/include/swilib/gprs.h index 2345f520..5f846954 100644 --- a/swilib/include/swilib/gprs.h +++ b/swilib/include/swilib/gprs.h @@ -108,7 +108,7 @@ struct LMAN_DATA { * @return 1 or 0 * */ __swi_begin(0x0A7) -char IsGPRSEnabled() +char IsGPRSEnabled(void) __swi_end(0x0A7, IsGPRSEnabled, ()); /** @@ -116,15 +116,16 @@ __swi_end(0x0A7, IsGPRSEnabled, ()); * @return 1 or 0 * */ __swi_begin(0x284) -char IsGPRSAvailable() +char IsGPRSAvailable(void) __swi_end(0x284, IsGPRSAvailable, ()); /** - * Check if EDGE available in the current network. + * Check if EDGE is available in the current network. * @return 1 or 0 + * @platforms NSG, ELKA * */ __swi_begin(0x285) -char IsEDGEAvailable() +char IsEDGEAvailable(void) __swi_end(0x285, IsEDGEAvailable, ()); /** @@ -132,7 +133,7 @@ __swi_end(0x285, IsEDGEAvailable, ()); * @return 1 or 0 * */ __swi_begin(0x0A8) -char IsGPRSConnected() +char IsGPRSConnected(void) __swi_end(0x0A8, IsGPRSConnected, ()); /** @@ -243,9 +244,10 @@ __swi_end(0x187, RequestLMANConnect, (data)); /** * Get name of the current internet profile. * @return C-string + * @platforms NSG, ELKA * */ __swi_begin(0x828E) -const char *RamActiveGPRSProfileName() +const char *RamActiveGPRSProfileName(void) __swi_end(0x828E, RamActiveGPRSProfileName, ()); /** @} */ @@ -266,7 +268,7 @@ __swi_end(0x06F, RefreshGPRSTraffic, ()); * Reset the GPRS traffic counter. * */ __swi_begin(0x0A6) -void ResetGPRSTraffic() +void ResetGPRSTraffic(void) __swi_end(0x0A6, ResetGPRSTraffic, ()); /** diff --git a/swilib/include/swilib/idle.h b/swilib/include/swilib/idle.h index 12acd74c..b25f8f1e 100644 --- a/swilib/include/swilib/idle.h +++ b/swilib/include/swilib/idle.h @@ -66,9 +66,10 @@ __swi_end(0x020, DrawScreenSaver, ()); /** * Close screensaver screen. + * @platforms NSG, ELKA * */ __swi_begin(0x09C) -void CloseScreensaver() +void CloseScreensaver(void) __swi_end(0x09C, CloseScreensaver, ()); /** diff --git a/swilib/include/swilib/info.h b/swilib/include/swilib/info.h index 523a83ab..cf2286e9 100644 --- a/swilib/include/swilib/info.h +++ b/swilib/include/swilib/info.h @@ -55,7 +55,7 @@ __swi_end(0x05F, GetFreeRamAvail, ()); * @return size * */ __swi_begin(0x828B) -int *RamTotalHeapSize() +int *RamTotalHeapSize(void) __swi_end(0x828B, RamTotalHeapSize, ()); /** @@ -63,7 +63,7 @@ __swi_end(0x828B, RamTotalHeapSize, ()); * @return size * */ __swi_begin(0x828C) -int *RamTemporaryHeapSize() +int *RamTemporaryHeapSize(void) __swi_end(0x828C, RamTemporaryHeapSize, ()); /** @@ -93,7 +93,7 @@ __swi_end(0x1D5, Get_Phone_Info, (index)); * @return iso code, example: ru, en * */ __swi_begin(0x0AA) -char *GetCurrentLocale() +char *GetCurrentLocale(void) __swi_end(0x0AA, GetCurrentLocale, ()); /** @@ -201,17 +201,19 @@ __swi_end(0x24C, GetPeripheryState, (device, check)); /** * Get bluetooth visibility. * @return visibility + * @platforms NSG, ELKA * */ __swi_begin(0x287) -int BT_GetLocVisibility() +int BT_GetLocVisibility(void) __swi_end(0x287, BT_GetLocVisibility, ()); /** * Own bluetooth name. * @return C-string + * @platforms NSG, ELKA * */ __swi_begin(0x828D) -const char *RamBluetoothDeviceName() +const char *RamBluetoothDeviceName(void) __swi_end(0x828D, RamBluetoothDeviceName, ()); /** @@ -244,7 +246,7 @@ __swi_end(0x829F, RamIsBTHeadsetConnected, ()); * @return unknown * */ __swi_begin(0x009D) -void *GetMissedEventsPtr() +void *GetMissedEventsPtr(void) __swi_end(0x009D, GetMissedEventsPtr, ()); /** @} */ @@ -340,7 +342,7 @@ __swi_end(0x80CB, RamRingtoneStatus, ()); * @return unknown * */ __swi_begin(0x828A) -void *RamIsFileCache() +void *RamIsFileCache(void) __swi_end(0x828A, RamIsFileCache, ()); /** @} */ diff --git a/swilib/include/swilib/legacy.h b/swilib/include/swilib/legacy.h index 5f2b659c..1e085103 100644 --- a/swilib/include/swilib/legacy.h +++ b/swilib/include/swilib/legacy.h @@ -187,9 +187,10 @@ __swi_end(0x80DD, RamCurrentTrack, ()); /** * Pointer to the audio params (unknown). * @return unknown + * @platforms X75, SG * */ __swi_begin(0x809B) -void *RamAudioParamsAddr() +void *RamAudioParamsAddr(void) __swi_end(0x809B, RamAudioParamsAddr, ()); /** @@ -211,10 +212,11 @@ __swi_end(0x80E2, RamKeyBuffer, ()); /** * Check if user typing phone number. - * @return 1 of 0 + * @return pointer to a byte that is 1 while a phone number is being entered and 0 otherwise + * @platforms NSG, ELKA * */ __swi_begin(0x828F) -char *RamIsNumberTyping() +char *RamIsNumberTyping(void) __swi_end(0x828F, RamIsNumberTyping, ()); /** @@ -233,14 +235,6 @@ __swi_begin(0x8251) void *RamSizeOfPart() __swi_end(0x8251, RamSizeOfPart, ()); -/** - * Unknown - * @return unknown - * */ -__swi_begin(0x083) -void *GetPathOfFoundFile() -__swi_end(0x083, GetPathOfFoundFile, ()); - /** * Get size of the recevied or sent file. * @return size @@ -282,19 +276,22 @@ void editOrNewTXTModule(const char *file) __swi_end(0x03D, editOrNewTXTModule, (file)); /** - * Unknown. + * Toggle vibration for the current profile. + * @platforms X75, SG * */ __swi_begin(0x055) -void SwitchVibraOnOff() +void SwitchVibraOnOff(void) __swi_end(0x055, SwitchVibraOnOff, ()); /** * Unknown. + * @param profile_id profile ID * @return unknown + * @platforms X75, SG * */ __swi_begin(0x07B) -int GetProfileFilter() -__swi_end(0x07B, GetProfileFilter, ()); +int GetProfileFilter(int profile_id) +__swi_end(0x07B, GetProfileFilter, (profile_id)); /** * @name Nucleus diff --git a/swilib/include/swilib/libc.h b/swilib/include/swilib/libc.h index 729f6539..2054e6ed 100644 --- a/swilib/include/swilib/libc.h +++ b/swilib/include/swilib/libc.h @@ -225,9 +225,9 @@ __swi_end(0x132, memmove, (destination, source, num)); * @return When longjmp is called with the information set to env, the macro returns again; * this time it returns the value passed to longjmp as second argument if this is different from zero, or 1 if it is zero. * */ -__swi_begin(0x162) +__swi_returns_twice_begin(0x162) int setjmp(jmp_buf env) -__swi_end(0x162, setjmp, (env)); +__swi_returns_twice_end(0x162, setjmp, (env)); /** * Long jump. @@ -405,18 +405,6 @@ __swi_begin(0x01B) size_t strlen(const char *str) __swi_end(0x01B, strlen, (str)); -/** - * Locate characters in string. - * @param str1 C string to be scanned. - * @param str2 C string containing the characters to match. - * @return A pointer to the first occurrence in str1 of any of the characters that are part of str2, - * or a null pointer if none of the characters of str2 is found in str1 before the terminating null-character. - * @return If none of the characters of str2 is present in str1, a null pointer is returned. -*/ -__swi_begin(0x113) -char *strpbrk(const char *str1, const char *str2) -__swi_end(0x113, strpbrk, (str1, str2)); - /** * Get span until character in string. * @param str1 C string to be scanned. @@ -651,7 +639,7 @@ __swi_end(0x2F1, dlclose, (handle)); * @builtin ELKA, NSG, X75, SG * */ __swi_begin(0x2F7) -const char *dlerror() +const char *dlerror(void) __swi_end(0x2F7, dlerror, ()); /** @} */ diff --git a/swilib/include/swilib/misc.h b/swilib/include/swilib/misc.h index 958be338..68e7132c 100644 --- a/swilib/include/swilib/misc.h +++ b/swilib/include/swilib/misc.h @@ -239,14 +239,14 @@ __swi_end(0x80D5, RamIsLocked, ()); * Lock keyboard. * */ __swi_begin(0x0A9) -void KbdLock() +void KbdLock(void) __swi_end(0x0A9, KbdLock, ()); /** * Unlock keyboard. * */ __swi_begin(0x0B9) -void KbdUnlock() +void KbdUnlock(void) __swi_end(0x0B9, KbdUnlock, ()); /** @@ -429,9 +429,10 @@ __swi_end(0x382, ClearClipboard, (unk)); /** * Run AlarmClock ringing. + * @platforms X75, SG * */ __swi_begin(0x035) -void AlarmClockRing() +void AlarmClockRing(void) __swi_end(0x035, AlarmClockRing, ()); /** diff --git a/swilib/include/swilib/nucleus.h b/swilib/include/swilib/nucleus.h index 8657ca2f..87ad3947 100644 --- a/swilib/include/swilib/nucleus.h +++ b/swilib/include/swilib/nucleus.h @@ -354,7 +354,7 @@ typedef struct NU_DRIVER_STRUCT { * */ __swi_begin(0x300) int NU_Create_Task(NU_TASK *task, CHAR *name, - void (*task_entry)(int, void *), unsigned long argc, + void (*task_entry)(unsigned long, void *), unsigned long argc, void *argv, void *stack_address, unsigned long stack_size, OPTION priority, unsigned long time_slice, OPTION preempt, OPTION auto_start) @@ -984,6 +984,7 @@ char *NU_Release_Information(void) __swi_end(0x365, NU_Release_Information, ()); +/** @note Aliases NU_Release_Information in ELKA and NSG firmware. */ __swi_begin(0x366) char *NU_License_Information(void) __swi_end(0x366, NU_License_Information, ()); @@ -1057,25 +1058,30 @@ __swi_end(0x371, NU_Driver_Pointers, (pointer_list, maximum_pointers)); * @name Supervisor and User mode functions * @{ * */ +/** @warning This function is not present in ELKA, NSG, X75, or SG firmware. */ __swi_begin(0x372) -unsigned long NU_IS_SUPERVISOR_MODE() +unsigned long NU_IS_SUPERVISOR_MODE(void) __swi_end(0x372, NU_IS_SUPERVISOR_MODE, ()); +/** @warning This function is not present in ELKA or NSG firmware. */ __swi_begin(0x373) -void NU_SUPERVISOR_MODE(unsigned long nu_svc_usr_var) -__swi_end(0x373, NU_SUPERVISOR_MODE, (nu_svc_usr_var)); +void NU_SUPERVISOR_MODE_P(void *nu_svc_usr_var) +__swi_end(0x373, NU_SUPERVISOR_MODE_P, (nu_svc_usr_var)); __swi_begin(0x374) -void NU_USER_MODE(unsigned long nu_svc_usr_var) -__swi_end(0x374, NU_USER_MODE, (nu_svc_usr_var)); +void NU_USER_MODE_P(void *nu_svc_usr_var) +__swi_end(0x374, NU_USER_MODE_P, (nu_svc_usr_var)); -// FIXME: NU_SUPERV_USER_VARIABLES is macro... +/** @return Address of the Nucleus `TCD_Current_Thread` global. */ __swi_begin(0x8375) void *NU_SUPERV_USER_VARIABLES(void) __swi_end(0x8375, NU_SUPERV_USER_VARIABLES, ()); +#define NU_SUPERVISOR_MODE() NU_SUPERVISOR_MODE_P(*(void **)NU_SUPERV_USER_VARIABLES()) +#define NU_USER_MODE() NU_USER_MODE_P(*(void **)NU_SUPERV_USER_VARIABLES()) + /** @} */ __swilib_end diff --git a/swilib/include/swilib/patch.h b/swilib/include/swilib/patch.h index 50cd87f0..b3b83e88 100644 --- a/swilib/include/swilib/patch.h +++ b/swilib/include/swilib/patch.h @@ -176,11 +176,17 @@ __swi_end(0x0B0, DrawPicWithCanvas, (x, y, picture)); * @param x, y image coordinates * @param picture image number * @param pen replace black color or NULL + * @param brush replace background color or NULL (SG and X75 only) * @warning Function from the patch "API", see: https://patches.kibab.com/patches/search.php5?action=search&kw=API * */ __swi_begin(0x0B1) +#ifdef NEWSGOLD void DrawColorPicWithCanvas(int x, int y, int picture, const char *pen) __swi_end(0x0B1, DrawColorPicWithCanvas, (x, y, picture, pen)); +#else +void DrawColorPicWithCanvas(int x, int y, int picture, const char *pen, const char *brush) +__swi_end(0x0B1, DrawColorPicWithCanvas, (x, y, picture, pen, brush)); +#endif /** * Draw a multi-line string. @@ -274,13 +280,13 @@ __swi_end(0x088, GetAccessoryType, ()); /** * Get missed events count. - * @param Event see #MissedEvent + * @param event see #MissedEvent * @return count * @warning Function from the patch "API", see: https://patches.kibab.com/patches/search.php5?action=search&kw=API * */ __swi_begin(0x009E) -int GetMissedEventCount(uint32_t Event) -__swi_end(0x009E, GetMissedEventCount, (Event)); +int GetMissedEventCount(uint32_t event) +__swi_end(0x009E, GetMissedEventCount, (event)); /** * Convert Chinese one-byte C-string to WHSDR. @@ -505,7 +511,7 @@ __swi_end(0x1EE, ProgressCalculate, (current, total)); * @warning Function from the patch "GraphPatchManager", see: https://patches.kibab.com/patches/search.php5?action=search&kw=GraphPatchManager * */ __swi_begin(0x0B2) -void *GetBuildCanvas() +void *GetBuildCanvas(void) __swi_end(0x0B2, GetBuildCanvas, ()); /** @} */ diff --git a/swilib/include/swilib/settings.h b/swilib/include/swilib/settings.h index 4f0bb95b..587c6ea1 100644 --- a/swilib/include/swilib/settings.h +++ b/swilib/include/swilib/settings.h @@ -358,16 +358,17 @@ __swi_end(0x3DE, WriteValueToPDFile, (file_id, key, value, size)); * @return ID * */ __swi_begin(0x0B6) -char GetProfile() +char GetProfile(void) __swi_end(0x0B6, GetProfile, ()); /** * Get ID of the active profile. * @return pointer to the ID * @deprecated use #GetProfile + * @platforms X75, SG * */ __swi_begin(0x80E3) -char *RamProfileNum() +char *RamProfileNum(void) __swi_end(0x80E3, RamProfileNum, ()); /** diff --git a/swilib/include/swilib/sound.h b/swilib/include/swilib/sound.h index ffa16e17..d29d388f 100644 --- a/swilib/include/swilib/sound.h +++ b/swilib/include/swilib/sound.h @@ -433,9 +433,10 @@ __swi_end(0x04A, PlayFile, (flags, folder, file, cepid, msgid, sfo)); /** * Get current audio path. * @return id + * @platforms NSG, ELKA * */ __swi_begin(0x288) -int Audio_GetCurrAudioPath() +int Audio_GetCurrAudioPath(void) __swi_end(0x288, Audio_GetCurrAudioPath, ()); /** @@ -468,10 +469,10 @@ void PlaySoundLoop(int unk1, int unk2, int duration) __swi_end(0x034, PlaySoundLoop, (unk1, unk2, duration)); /** - * Change volume (unknown function). + * Change the current audio volume. * @param volume volume level - * @return unknown - * @warning Untested function that is not found in any ELF's. + * @return undocumented + * @platforms X75, SG * */ __swi_begin(0x09A) int ChangeVolume(uint8_t volume) diff --git a/swilib/include/swilib/system.h b/swilib/include/swilib/system.h index 0dea0f18..64d6ac0e 100644 --- a/swilib/include/swilib/system.h +++ b/swilib/include/swilib/system.h @@ -434,42 +434,42 @@ __swi_end(0x247, GSM_L1_Disable, ()); * Syscall, which is used by the phone OS, swi 0. * */ __swi_begin(0x000) -void loopback0() +void loopback0(void) __swi_end(0x000, loopback0, ()); /** * Syscall, which is used by the phone OS, swi 1. * */ __swi_begin(0x001) -void loopback1() +void loopback1(void) __swi_end(0x001, loopback1, ()); /** * Syscall, which is used by the phone OS, swi 2. * */ __swi_begin(0x002) -void loopback2() +void loopback2(void) __swi_end(0x002, loopback2, ()); /** * Syscall, which is used by the phone OS, swi 3. * */ __swi_begin(0x003) -void loopback3() +void loopback3(void) __swi_end(0x003, loopback3, ()); /** * Syscall, which is used by the phone OS, swi 4. * */ __swi_begin(0x004) -void loopback4() +void loopback4(void) __swi_end(0x004, loopback4, ()); /** * Syscall, which is used by the phone OS, swi 171. * */ __swi_begin(0x0AB) -void loopback171() +void loopback171(void) __swi_end(0x0AB, loopback171, ()); /** @} */ diff --git a/swilib/include/swilib/telephony.h b/swilib/include/swilib/telephony.h index 35f0f01f..5ca5ed37 100644 --- a/swilib/include/swilib/telephony.h +++ b/swilib/include/swilib/telephony.h @@ -201,15 +201,17 @@ __swi_end(0x170, MakeVoiceCall, (number, unk1, unk2)); /** * Get SMS status. * @return 1 - send, 2 - recv, 3 - both + * @platforms NSG, ELKA * */ __swi_begin(0x286) -int GetSMSState() +int GetSMSState(void) __swi_end(0x286, GetSMSState, ()); /** * Check for new SMS. * @return 1: when there has new SMS * @return 0: no new SMS + * @platforms X75, SG * */ __swi_begin(0x046) int HasNewSMS(void) @@ -562,9 +564,10 @@ __swi_end(0x22A, FreeGSMTXTpkt, (pkt)); /** * Open new received SMS in SMS UI. + * @platforms X75, SG * */ __swi_begin(0x048) -void ReadNewSMS() +void ReadNewSMS(void) __swi_end(0x048, ReadNewSMS, ()); /** diff --git a/swilib/include/swilib/utils.h b/swilib/include/swilib/utils.h index f60e85e1..20e740d2 100644 --- a/swilib/include/swilib/utils.h +++ b/swilib/include/swilib/utils.h @@ -59,12 +59,14 @@ __swi_end(0x054, StrToInt, (s, endp)); /** * Convert HEX-string to int. - * @param s string with HEX - * @return int + * The input may contain up to eight hexadecimal digits. Lowercase digits are converted to uppercase in place. + * @param s mutable string with HEX + * @param fallback value returned for an invalid digit or a string longer than eight characters + * @return parsed value, or `fallback` on error * */ __swi_begin(0x0AF) -uint32_t HexToInt(const char *s) -__swi_end(0x0AF, HexToInt, (s)); +uint32_t HexToInt(char *s, uint32_t fallback) +__swi_end(0x0AF, HexToInt, (s, fallback)); /** * Convert HEX char to int. @@ -218,8 +220,8 @@ __swi_end(0x245, Base64Decode, (inbuf, insize, outbuf, outsize, _null, unk5)); * @return divident / divisor * */ __swi_begin(0x0B8) -int sdiv(int divisor, int divident) -__swi_end(0x0B8, sdiv, (divisor, divident)); +int sdiv(int divisor, int dividend) +__swi_end(0x0B8, sdiv, (divisor, dividend)); /** * Unsigned int div. @@ -228,8 +230,8 @@ __swi_end(0x0B8, sdiv, (divisor, divident)); * @return divident / divisor * */ __swi_begin(0x0BC) -uint32_t udiv(uint32_t divisor, uint32_t divident) -__swi_end(0x0BC, udiv, (divisor, divident)); +uint32_t udiv(uint32_t divisor, uint32_t dividend) +__swi_end(0x0BC, udiv, (divisor, dividend)); /** * Signed int div by 10. @@ -237,8 +239,8 @@ __swi_end(0x0BC, udiv, (divisor, divident)); * @return divident / 10 * */ __swi_begin(0x0BD) -int DivBy10(int divident) -__swi_end(0x0BD, DivBy10, (divident)); +int DivBy10(int dividend) +__swi_end(0x0BD, DivBy10, (dividend)); /** @} */ diff --git a/swilib/include/swilib/wstring.h b/swilib/include/swilib/wstring.h index 519e895a..c5a7d816 100644 --- a/swilib/include/swilib/wstring.h +++ b/swilib/include/swilib/wstring.h @@ -217,10 +217,10 @@ __swi_end(0x1DC, wstrchr, (str, start, character)); * @param str WSHDR string * @param rstart position from which to start searching (from the end) * @param character character to be located - * @return position of the found character or 0xFFFF + * @return position of the found character or -1 * */ __swi_begin(0x1DD) -uint16_t wstrrchr(WSHDR *str, uint32_t rstart, uint32_t character) +short wstrrchr(WSHDR *str, uint32_t rstart, uint32_t character) __swi_end(0x1DD, wstrrchr, (str, rstart, character)); /** From e5f18b11b5932d393fce06134c61a32f7bc6b711 Mon Sep 17 00:00:00 2001 From: Kirill Zhumarin Date: Mon, 26 Oct 2026 01:55:01 +0000 Subject: [PATCH 07/14] Corrent swilib functions definitions --- swilib/include/swilib/addressbook.h | 6 +++--- swilib/include/swilib/date.h | 10 +++++----- swilib/include/swilib/info.h | 4 ++-- swilib/include/swilib/legacy.h | 2 +- swilib/include/swilib/nucleus.h | 8 ++++++++ swilib/include/swilib/ui.h | 2 +- swilib/include/swilib/wstring.h | 18 +++++++++--------- 7 files changed, 29 insertions(+), 21 deletions(-) diff --git a/swilib/include/swilib/addressbook.h b/swilib/include/swilib/addressbook.h index e6fbe115..81a8fd97 100644 --- a/swilib/include/swilib/addressbook.h +++ b/swilib/include/swilib/addressbook.h @@ -192,13 +192,13 @@ __swi_end(0x2B6, GetNumFromNativeAbData, (data, type, index)); /** * Set number to the #NativeAbData * @param data pointer to the native addressbook data - * @param unk set to 0x1D + * @param type item type * @param num phone number * @return 1: success, 0: error * */ __swi_begin(0x2B8) -int SetNumToNativeAbData(NativeAbData *data, int unk, const WSHDR *num) -__swi_end(0x2B8, SetNumToNativeAbData, (data, unk, num)); +int SetNumToNativeAbData(NativeAbData *data, int type, const WSHDR *num) +__swi_end(0x2B8, SetNumToNativeAbData, (data, type, num)); /** * Decode #PKT_NUM for the phone number. diff --git a/swilib/include/swilib/date.h b/swilib/include/swilib/date.h index 7ab0ad73..79cf7194 100644 --- a/swilib/include/swilib/date.h +++ b/swilib/include/swilib/date.h @@ -159,7 +159,7 @@ __swi_end(0x2D0, GetDaysFromMonth, (date)); * @return 1 if success, 0 if error * */ __swi_begin(0x2C6) -int GetSecondsFromDateTime(int *seconds, const TDate *date, const TTime *time, const TDate *epoch) +int GetSecondsFromDateTime(uint32_t *seconds, const TDate *date, const TTime *time, const TDate *epoch) __swi_end(0x2C6, GetSecondsFromDateTime, (seconds, date, time, epoch)); /** @@ -170,7 +170,7 @@ __swi_end(0x2C6, GetSecondsFromDateTime, (seconds, date, time, epoch)); * @return 1 if success, 0 if error * */ __swi_begin(0x2C7) -int GetSecondsFromDateTimeSince1997(int *seconds, const TDate *date, const TTime *time) +int GetSecondsFromDateTimeSince1997(uint32_t *seconds, const TDate *date, const TTime *time) __swi_end(0x2C7, GetSecondsFromDateTimeSince1997, (seconds, date, time)); /** @@ -188,7 +188,7 @@ __swi_end(0x2C8, GetSecondsFromTime, (time)); * @param seconds number of seconds * */ __swi_begin(0x2CB) -void GetTimeFromSeconds(TTime *time, int seconds) +void GetTimeFromSeconds(TTime *time, uint32_t seconds) __swi_end(0x2CB, GetTimeFromSeconds, (time, seconds)); /** @@ -209,7 +209,7 @@ __swi_end(0x3E4, GetTimeFromMilliseconds, (time, milliseconds)); * @return 1 if success, 0 if error * */ __swi_begin(0x2C9) -int GetDateTimeFromSeconds(const int *seconds, TDate *date, TTime *time, const TDate *epoch) +int GetDateTimeFromSeconds(const uint32_t *seconds, TDate *date, TTime *time, const TDate *epoch) __swi_end(0x2C9, GetDateTimeFromSeconds, (seconds, date, time, epoch)); /** @@ -220,7 +220,7 @@ __swi_end(0x2C9, GetDateTimeFromSeconds, (seconds, date, time, epoch)); * @return 1 if success, 0 if error * */ __swi_begin(0x2CA) -int GetDateTimeFromSecondsSince1997(const int *seconds, TDate *date, TTime *time) +int GetDateTimeFromSecondsSince1997(const uint32_t *seconds, TDate *date, TTime *time) __swi_end(0x2CA, GetDateTimeFromSecondsSince1997, (seconds, date, time)); /** diff --git a/swilib/include/swilib/info.h b/swilib/include/swilib/info.h index cf2286e9..06871974 100644 --- a/swilib/include/swilib/info.h +++ b/swilib/include/swilib/info.h @@ -338,8 +338,8 @@ char *RamRingtoneStatus() __swi_end(0x80CB, RamRingtoneStatus, ()); /** - * Pointer to the information about current file operations. - * @return unknown + * Get the state of the file-operation indicator. + * @return pointer to firmware-owned indicator state * */ __swi_begin(0x828A) void *RamIsFileCache(void) diff --git a/swilib/include/swilib/legacy.h b/swilib/include/swilib/legacy.h index 1e085103..40c20471 100644 --- a/swilib/include/swilib/legacy.h +++ b/swilib/include/swilib/legacy.h @@ -207,7 +207,7 @@ __swi_end(0x80CE, RamDateTime, ()); * @deprecated use #RamPressedKey * */ __swi_begin(0x80E2) -char *RamKeyBuffer() +char *RamKeyBuffer(void) __swi_end(0x80E2, RamKeyBuffer, ()); /** diff --git a/swilib/include/swilib/nucleus.h b/swilib/include/swilib/nucleus.h index 87ad3947..42358865 100644 --- a/swilib/include/swilib/nucleus.h +++ b/swilib/include/swilib/nucleus.h @@ -989,6 +989,13 @@ __swi_begin(0x366) char *NU_License_Information(void) __swi_end(0x366, NU_License_Information, ()); +/** @} */ + +/** + * @name History functions + * @warning These functions are not present in ELKA, NSG, X75, or SG firmware. + * @{ + * */ __swi_begin(0x367) void NU_Disable_History_Saving(void) @@ -1015,6 +1022,7 @@ __swi_end(0x36A, NU_Retrieve_History_Entry, (id, param1, param2, param3, time, t /** * @name Input/Output Driver functions + * @warning These functions are not present in ELKA, NSG, X75, or SG firmware. * @{ * */ __swi_begin(0x36B) diff --git a/swilib/include/swilib/ui.h b/swilib/include/swilib/ui.h index d8088890..e240fd44 100644 --- a/swilib/include/swilib/ui.h +++ b/swilib/include/swilib/ui.h @@ -947,7 +947,7 @@ __swi_end(0x163, AllocEQueue, (malloc_func, mfree_func)); * @param malloc_fn result of #malloc_adr * */ __swi_begin(0x3EB) -void *EDIT_SetEQueue(void *gui, const EDITQ *eq, int do_mfree, const void *malloc_fn) +void EDIT_SetEQueue(void *gui, const EDITQ *eq, int do_mfree, const void *malloc_fn) __swi_end(0x3EB, EDIT_SetEQueue, (gui, eq, do_mfree, malloc_fn)); /** diff --git a/swilib/include/swilib/wstring.h b/swilib/include/swilib/wstring.h index c5a7d816..50ac782a 100644 --- a/swilib/include/swilib/wstring.h +++ b/swilib/include/swilib/wstring.h @@ -204,7 +204,7 @@ __swi_end(0x122, wstrncat, (destination, source, num)); /** * Locate first occurrence of character in WSHDR. * @param str WSHDR string - * @param start position from which to start searching + * @param start one-based position from which to start searching * @param character character to be located * @return position of the found character or -1 * */ @@ -215,7 +215,7 @@ __swi_end(0x1DC, wstrchr, (str, start, character)); /** * Locate last occurrence of character in WSHDR. * @param str WSHDR string - * @param rstart position from which to start searching (from the end) + * @param rstart one-based position from which to search backwards * @param character character to be located * @return position of the found character or -1 * */ @@ -232,7 +232,7 @@ __swi_end(0x1DD, wstrrchr, (str, rstart, character)); * @return >0 - the first character that does not match has a greater value in ptr1 than in ptr2 * */ __swi_begin(0x2E2) -int wstrcmp(WSHDR *str1, WSHDR *str2) +int wstrcmp(const WSHDR *str1, const WSHDR *str2) __swi_end(0x2E2, wstrcmp, (str1, str2)); /** @@ -355,26 +355,26 @@ __swi_variadic_end(0x216, wstrcatprintf, s, format); * @param source input WSHDR to be converted to C-string * @param destination pointer to the destination C-string, which should be large enough to contain the source WSHDR * @param new_length pointer to which to write the length of the destination string - * @param size maximum number of characters to be converted - * @return destination string length + * @param size size of the destination buffer, including space for the terminating null + * @return 1 on success, 0 if the destination buffer is too small * */ __swi_begin(0x1E2) int ws_2utf8(const WSHDR *source, char *destination, int *new_length, uint32_t size) __swi_end(0x1E2, ws_2utf8, (source, destination, new_length, size)); /** - * Convert UTF-8 C-string to WHSDR. + * Convert UTF-8 C-string to WSHDR. * @param destination pointer to the destination WSHDR, which should be large enough to contain the source string * @param source input C-string to be converted to WSHDR - * @param size maximum number of characters to be converted - * @return destination string length + * @param size maximum number of source bytes to read + * @return 1 on success, 0 on invalid or incomplete UTF-8 or insufficient destination capacity * */ __swi_begin(0x1E3) int utf8_2ws(WSHDR *destination, const char *source, uint32_t size) __swi_end(0x1E3, utf8_2ws, (destination, source, size)); /** - * Convert CP1252 (Latin) C-string to WHSDR. + * Convert CP1252 (Latin) C-string to WSHDR. * @param destination pointer to the destination WSHDR, which should be large enough to contain the source string * @param source input C-string to be converted to WSHDR * @param size maximum number of characters to be converted From a57d33762328dc29f5efa13e0dbf0541091cace4 Mon Sep 17 00:00:00 2001 From: Kirill Zhumarin Date: Mon, 26 Oct 2026 02:02:41 +0000 Subject: [PATCH 08/14] Update patterns --- swilib/patterns.toml | 1119 ++++++++++++++++++++++++++++++------------ 1 file changed, 811 insertions(+), 308 deletions(-) diff --git a/swilib/patterns.toml b/swilib/patterns.toml index 2deec50d..a7549257 100644 --- a/swilib/patterns.toml +++ b/swilib/patterns.toml @@ -15,30 +15,30 @@ # ELKA = false # no function on ELKA # SG = "SG pattern" # pattern for SG and X75 # X75 = "X75 pattern" # X75 pattern override - +# [platforms] ALL = ["NSG", "ELKA", "SG", "X75"] NSG = ["NSG", "ELKA"] SG = ["SG", "X75"] [000] -decl = "void loopback0()" +decl = "void loopback0(void)" ALL = "1E,FF,2F,E1" [001] -decl = "void loopback1()" +decl = "void loopback1(void)" ALL = "1E,FF,2F,E1" [002] -decl = "void loopback2()" +decl = "void loopback2(void)" ALL = "1E,FF,2F,E1" [003] -decl = "void loopback3()" +decl = "void loopback3(void)" ALL = "1E,FF,2F,E1" [004] -decl = "void loopback4()" +decl = "void loopback4(void)" ALL = "1E,FF,2F,E1" [005] @@ -70,9 +70,14 @@ NSG = """ ??,??,??,E9,??,??,??,E1,??,??,??,E1,??,??,??,E1,??,??,??,E1,??,??,??,??,??,??,??,E3,??,??,??,E5,??,??,??,E8, ??,??,??,E5,??,??,??,E3,??,??,??,E1,??,??,??,E3,??,??,??,E1,??,??,??,E1,??,??,??,E8 """ +SG = """ +FE,40,2D,E9,02,70,A0,E1,01,60,A0,E1,03,50,A0,E1,00,40,A0,E1,??,??,??,EB,00,30,E0,E3,??,3?,8?,E5,??,5?,8?,E5, +2C,C0,90,E5,00,00,A0,E3,07,30,A0,E1,06,20,A0,E1,04,10,A0,E1,3C,FF,2F,E1,FE,80,BD,E8 +""" [00B] decl = "int sys_read(int fd, void *buffer, int length, uint32_t *err)" +# SG/X75 use the ElfLoader fread32 builtin, which delegates to the native firmware reader in 0x4000-byte chunks. NSG = """ ??,??,??,E9,??,??,??,E1,??,??,??,E1,??,??,??,E1,??,??,??,E1,??,??,??,??,??,??,??,E3,??,??,??,E5,??,??,??,E5, 34,??,??,E5,??,??,??,E3,??,??,??,E1,??,??,??,E1,??,??,??,E1,??,??,??,E1,??,??,??,E8 @@ -80,6 +85,7 @@ NSG = """ [00C] decl = "int sys_write(int fd, const void *buffer, int length, uint32_t *err)" +# SG/X75 use the ElfLoader fwrite32 builtin, which delegates to the native firmware writer in 0x4000-byte chunks. NSG = """ ??,??,??,E9,??,??,??,E1,??,??,??,E1,??,??,??,E1,??,??,??,E1,??,??,??,??,??,??,??,E3,??,??,??,E5,??,??,??,E5, 68,??,??,E5,??,??,??,E3,??,??,??,E1,??,??,??,E1,??,??,??,E1,??,??,??,E1,??,??,??,E8 @@ -87,18 +93,18 @@ NSG = """ [00D] decl = "int sys_close(int fd, uint32_t *err)" -NSG = """ -??,??,??,E9,??,??,??,E1,??,??,??,E1,??,??,??,??,??,??,??,E5,??,??,??,E2,??,??,??,E1,??,??,??,E1,??,??,??,E8, -??,??,??,E3,??,??,??,E3,??,??,??,E1 +ALL = """ +38,40,2D,E9,01,50,A0,E1,00,40,A0,E1,??,??,??,EB,00,C0,90,E5,04,D0,8D,E2,05,20,A0,E1,04,10,A0,E1,30,40,B?,E8, +00,00,A0,E3,00,30,E0,E3,1C,FF,2F,E1 """ [00E] decl = "int sys_fflush(int fd, uint32_t *err)" -NSG = "38,40,2D,E9,01,50,A0,E1,00,40,A0,E1,??,??,??,??,08,C0,90,E5" +ALL = "38,40,2D,E9,01,50,A0,E1,00,40,A0,E1,??,??,??,EB,08,C0,90,E5" [00F] -decl = "long sys_lseek(int fd, uint32_t offset, uint32_t origin, uint32_t *err, uint32_t *err2)" -NSG = """ +decl = "long sys_lseek(int fd, int32_t offset, uint32_t origin, uint32_t *err, uint32_t *err2)" +ALL = """ ??,??,??,E9,??,??,??,E5,??,??,??,E1,??,??,??,E1,??,??,??,E1,??,??,??,E1,??,??,??,??,??,??,??,E3,??,??,??,E5, ??,??,??,E5,??,??,??,E5,??,??,??,E5,??,??,??,E3,??,??,??,E1,??,??,??,E1,??,??,??,E1,??,??,??,E1,??,??,??,E2, ??,??,??,E8 @@ -110,6 +116,10 @@ NSG = """ 38,40,2D,E9,01,50,A0,E1,00,40,A0,E1,??,??,??,??,00,30,E0,E3,??,??,??,??,28,C0,90,E5,00,00,A0,E3,05,30,A0,E1, 00,20,A0,E3 """ +SG = """ +38,40,2D,E9,01,50,A0,E1,00,40,A0,E1,??,??,??,EB,28,C0,90,E5,04,D0,8D,E2,05,20,A0,E1,04,10,A0,E1,30,40,B?,E8, +00,00,A0,E3,00,30,E0,E3,1C,FF,2F,E1 +""" [011] decl = "char *OpenReadCloseFile(const char *path, void *ram)" @@ -121,6 +131,10 @@ NSG = """ 7C,40,2D,E9,02,60,A0,E1,01,50,A0,E1,00,40,A0,E1,??,??,??,EB,00,30,E0,E3,04,30,8D,E5,00,60,8D,E5,14,C0,90,E5, 00,00,A0,E3,05,30,A0,E1,00,20,A0,E3,04,10,A0,E1,3C,FF,2F,E1,7C,80,BD,E8 """ +SG = """ +7C 40 2D E9 01 60 A0 E1 02 50 A0 E1 00 40 A0 E1 ?? ?? ?? EB 00 30 E0 E3 ?? 3? 8? E5 14 C0 90 E5 +00 00 A0 E3 05 30 A0 E1 06 20 A0 E1 04 10 A0 E1 3C FF 2F E1 7C 80 BD E8 +""" [013] decl = "int SetFileAttrib(const char *path, uint8_t attr, uint32_t *err)" @@ -128,6 +142,10 @@ NSG = """ 7C,40,2D,E9,02,60,A0,E1,01,50,A0,E1,00,40,A0,E1,??,??,??,EB,00,30,E0,E3,04,30,8D,E5,00,60,8D,E5,44,C0,90,E5, 00,00,A0,E3,05,30,A0,E1,00,20,A0,E3,04,10,A0,E1,3C,FF,2F,E1,7C,80,BD,E8 """ +SG = """ +7C 40 2D E9 01 60 A0 E1 02 50 A0 E1 00 40 A0 E1 ?? ?? ?? EB 00 30 E0 E3 ?? 3? 8? E5 40 C0 90 E5 +00 00 A0 E3 05 30 A0 E1 06 20 A0 E1 04 10 A0 E1 3C FF 2F E1 7C 80 BD E8 +""" [014] decl = "void *malloc(size_t size)" @@ -144,6 +162,11 @@ NSG = [ """, ] ELKA = "??,B5,??,1C,02,20,{??,B5,??,1C,03,20,??,90},??,BD+1" +SG = """ +00,10,A0,E1,02,00,A0,E3, +{FC,4D,2D,E9,00,50,B0,E1,??,4?,9F,05,??,6?,A0,03,??,B?,9F,E5,??,A?,9F,E5,??,8?,9F,E5,01,70,A0,E1}, +70,40,2D,E9 +""" [015] decl = "void free(void *ptr)" @@ -159,25 +182,30 @@ NSG = [ """, ] ELKA = "??2800D0F5E6704780B508F0??E980BD80B5+1" +SG = """ +00,00,50,E3, +{F8,40,2D,E9,??,5?,A0,E3,??,0?,50,E3,??,??,??,0A,??,4?,40,E2,??,??,??,EB}, +1E,FF,2F,E1 +""" [016] decl = "int sprintf(char *s, const char *format, ...)" -NSG = """ +ALL = """ ??,B4,??,B5,??,B0,??,90,??,48,??,A9,??,91,??,44,??,90,??,48,??,44,??,90,??,AD,??,1C,??,AB,??,AA,??,99,??,??, ??,??,??,1C,??,1C,??,20,??,??,??,??,??,1C,??,B0,??,BC,??,BC,??,B0,??,47 """ [017] decl = "char *strcat(char *destination, const char *source)" -NSG = "??,78,??,1C,??,2B,??,D0,??,32,??,78,??,2B,??,D1,??,78,??,31,??,70,??,32,??,2B,??,D1,??,47 + 1" +ALL = "??,78,??,1C,??,2B,??,D0,??,32,??,78,??,2B,??,D1,??,78,??,31,??,70,??,32,??,2B,??,D1,??,47 + 1" [018] decl = "char *strchr(const char *str, int character)" -NSG = "??,06,??,0E,??,38,??,30,??,78,??,42,??,D0,??,29,??,D1,??,42,??,D0,??,20,??,47 + 1" +ALL = "??,06,??,0E,??,38,??,30,??,78,??,42,??,D0,??,29,??,D1,??,42,??,D0,??,20,??,47 + 1" [019] decl = "int strcmp(const char *str1, const char *str2)" -NSG = """ +ALL = """ ??,??,??,E3,??,??,??,03,??,??,??,1A,??,??,??,E9,??,??,??,??,??,??,??,E4,??,??,??,E4,??,??,??,E0,??,??,??,E1, ??,??,??,E0,??,??,??,01,??,??,??,0A,??,??,??,E8,??,??,??,E1,??,??,??,E0,??,??,??,03,??,??,??,1A,??,??,??,E1, ??,??,??,E0,??,??,??,03,??,??,??,1A,??,??,??,E1,??,??,??,E0,??,??,??,03,??,??,??,00,??,??,??,11,??,??,??,E1, @@ -187,7 +215,7 @@ NSG = """ [01A] decl = "char *strcpy(char *destination, const char *source)" -NSG = """ +ALL = """ ??,1C,??,1C,??,43,??,07,??,B4,??,D1,??,??,??,01,??,E0,??,C2,??,C9,??,1B,??,43,??,40,??,D0,??,06,??,0E,??,70, ??,32,??,29,??,D0,??,0A,??,E7,??,78,??,31,??,70,??,32,??,2B,??,D0,??,78,??,31,??,70,??,32,??,2B,??,D1,??,BC, ??,47 + 1 @@ -195,18 +223,18 @@ NSG = """ [01B] decl = "size_t strlen(const char *str)" -NSG = """ +ALL = """ ??,B4,??,1C,??,07,??,D0,??,78,??,30,??,29,??,D1,??,1B,??,BC,??,47,??,07,??,D1,??,??,??,01,??,C8,??,1A,??,43, ??,40,??,D0,??,1B,??,06,??,D1,??,38,??,E7,??,04,??,0E,??,D1,??,38,??,E7,??,02,??,0E,??,D1,??,38,??,E7 """ [01C] decl = "void wsAppendChar(WSHDR *destination, int character)" -NSG = "??,B5,??,1C,??,D0,??,1C,??,??,??,??,??,68,??,88,??,42,??,D9,??,33,??,04,??,0C,??,80,??,68,??,00,??,52,??,BD" +ALL = "??,B5,??,1C,??,D0,??,1C,??,??,??,??,??,68,??,88,??,42,??,D9,??,33,??,04,??,0C,??,80,??,68,??,00,??,52,??,BD" [01D] decl = "int wsInsertChar(WSHDR *destination, int character, int position)" -NSG = """ +ALL = """ ??,B5,??,1C,??,1C,??,28,??,D0,??,68,??,00,??,18,??,2A,??,D0,??,1C,??,??,??,??,??,1A,??,88,??,3A,??,04,??,1A, ??,04,??,0C,??,0C,??,42,??,D9,??,1C,??,1C,??,1C """ @@ -256,12 +284,14 @@ NSG = "??,B5,??,1C,??,88,??,1C,??,07,??,0F,??,08" ELKA = "??B50D880C1C81B0291C0620????????0E1C" [028] -decl = "uint32_t GetEELiteMaxID()" +decl = "uint32_t GetEELiteMaxID(void)" NSG = "3E40??E9????A0E1????A0E1??????E2??????E2??????EB??????E3??????1A??????E3??????0A + F0" +SG = "??0?1FE5??0?9?E51EFF2FE108402DE90130A0E10010A0E1??0?1FE5" [029] -decl = "uint32_t GetEEFullMaxID()" +decl = "uint32_t GetEEFullMaxID(void)" NSG = "????1FE5??????E1??????E2??????E2????1F15??????15??????15??????10??????12??FF2FE1" +SG = "??0?1FE5B?0?D?E1FF0C40E2FF0050E2??0?1F1500009015??0?8012" [02A] decl = "void *GetEELiteBlockAddress(short block)" @@ -270,30 +300,36 @@ FE,40,2D,E9,??,??,??,E5,00,40,A0,E1,00,10,D6,E5,??,??,??,E5,B2,00,D0,E1,00,00,51 ??,??,??,0A,02,00,51,E3,??,??,??,1A,10,10,96,E5,04,11,91,E7,00,00,51,E3,??,??,??,1A,04,20,8D,E2,04,10,A0,E1, ??,??,??,EB,00,00,50,E3,??,??,??,1A """ +SG = "0010A0E1??0?1FE508402DE90D20A0E1B?0?D?E1????????000050E30000A01300009D050880BDE8" [02B] decl = "int GetEELiteBlockSizeVersion(uint32_t block, int *size, char *version)" NSG = "3E40??E9????A0E1????A0E1??????E2??????E2??????EB??????E3??????1A??????E3??????0A" +SG = "08402DE90130A0E10010A0E1??0?1FE5B?0?D?E1??????????1?9FE50840B?E8" [02C] decl = "int EEFullGetBlockInfo(uint32_t block, int *size, char *version)" -NSG = "??402DE90140A0E1??108DE20250A0E1????????000050E30900A013????????0130A0E3" +ALL = "??402DE90140A0E1??108DE20250A0E1????????000050E30900A013????????0130A0E3" [02D] -decl = "int StartWriteEELiteBlock(uint32_t block, uint32_t size, uint32_t version, int *null)" +decl = "int StartWriteEELiteBlock(uint32_t block, uint32_t size, uint32_t version, EELiteCallback callback)" NSG = "FF4D??E9????1FE5????A0E1??????E5????1FE5??????E2????9FE5????A0E1??????E1??????E3" +SG = "0E402DE902C0A0E1??2?9FE50C008?E80120A0E10010A0E1??0?1FE50C30A0E1B?0?D?E1????????0CD08DE204E09DE4??1?9FE5????????" [02E] -decl = "int FinishWriteEELiteBlock(uint32_t block, int *null)" +decl = "int FinishWriteEELiteBlock(uint32_t block, EELiteCallback callback)" NSG = "????1FE53840??E9??????E5????E0E3????1FE5??????E3??????0A??????E3??????0A??????E3" +SG = "08402DE90130A0E10010A0E1??0?1FE5????9FE5B?0?D?E1??????????1?9FE50840B?E8????????08402DE90030A0E1" [02F] -decl = "int DeleteEELiteBlock(uint32_t block, int *null)" +decl = "int DeleteEELiteBlock(uint32_t block, EELiteCallback callback)" NSG = "7040??E9????1FE5????A0E1??????E5????1FE5????9FE5??????E1??????E3??????0A??????E3" +SG = "08402DE90130A0E10010A0E1??0?1FE5????9FE5B?0?D?E1??????????1?9FE50840B?E8????????0E402DE902C0A0E1" [030] -decl = "int WriteEELiteBlock(uint32_t block, void *buf, uint32_t offset, uint32_t size, int *null)" +decl = "int WriteEELiteBlock(uint32_t block, const void *buf, uint32_t offset, uint32_t size, EELiteCallback callback)" NSG = "3E40??E9????A0E1????A0E1????1FE5????A0E1??????E5??????E5????1FE5????9FE5??????E1" +SG = "0E402DE901C0A0E10310A0E102E0A0E1??2?9FE5??3?9?E50E008?E80010A0E1??0?1FE50E30A0E10C20A0E1B?0?D?E1????????0CD08DE204E09DE4??1?9FE5????????" [031] decl = "char *strrchr_2(const char *str, int character)" @@ -315,8 +351,11 @@ decl = "void PlaySoundLoop(int unk1, int unk2, int duration)" NSG = "F0402DE9??D04DE20170A0E10250A0E10040A0E1" [035] -decl = "void AlarmClockRing()" -NSG = "98B51?4900241?484C600880??F???E?" +decl = "void AlarmClockRing(void)" +SG = [ + "F8B5??F0??????49??4E01318842??4D16D1", + "98B51?4900241?484C600880??F???E?", +] [036] decl = "void SLI_SetState(uint8_t state)" @@ -344,7 +383,7 @@ ELKA = "??402DE90050A0E10140A0E1??????E5??????E5??????E2????????0420A0E1" [03B] decl = "void *memchr(const void *str, int c, size_t num)" -NSG = "0B061B0E002A??D? + 1" +ALL = "0B061B0E002A??D? + 1" [03C] decl = "int setfilesize(int fd, uint32_t length, uint32_t *err)" @@ -355,7 +394,7 @@ NSG = """ [03D] decl = "void editOrNewTXTModule(const char *file)" -NSG = "08B50023002804D10022002102200092" +SG = "08B50023002804D10022002102200092" [03E] decl = "int Registry_GetResourcePathFromLevel(int hmi_key_id, int start_prio, int *prio, WSHDR *path)" @@ -369,6 +408,7 @@ NSG = "??,??,??,28,??,D2,??,00,??,E0,??,??,??,31,??,28,??,D0,??,38,??,28,??,D2,? [040] decl = "int GetVibraStatus(void)" NSG = "10,BD,??,??,00,20,[??,B5,??,??,01,D1,00,20,??,BD] + 3" +SG = "80B5??F7??????F7????FF2801D0012080BD002080BD" [041] decl = "char GetProvider(WSHDR *name, int unk)" @@ -394,15 +434,21 @@ NSG = "" [046] decl = "int HasNewSMS(void)" -NSG = "" +NSG = false +SG = [ + "F8B50025????????061C????????0028??D1????????0028??D1????????0028??D1??4F??4CF87C+1", + "F8B50025????????061C????????002803D1????????002809D0????????????????????????011C+1", + "??B50025????????00284CD1????????002848D1????????002844D1??4E??4CF07C000708D5+1", +] [047] decl = "int HasFlashSMS(void)" NSG = "??,48,??,68,??,28,??,D0,??,78,??,28,??,D0,??,20,??,47,??,20,??,47,+1" [048] -decl = "void ReadNewSMS()" -NSG = "" +decl = "void ReadNewSMS(void)" +NSG = false +SG = "00B5??B06846????????00226946??48??????????B000BD+1" [049] decl = "void ReadFlashSMS()" @@ -477,8 +523,8 @@ decl = "int StrToInt(const char *s, char **endp)" NSG = "10B5002302780130141C093C042C????202A????302A" [055] -decl = "void SwitchVibraOnOff()" -NSG = "??,B5,??,1C,%GetVibraStatus%,??,28,??,D1,??,20,??,E0,??,20,??,??,??,FA,??,1C,??,??,??,F8,??,BD" +decl = "void SwitchVibraOnOff(void)" +SG = "80B5??F7??????F7????FF2801D0012080BD002080BD + 16" [056] decl = "void PlayVibra(int freq, int duration, int force)" @@ -511,14 +557,7 @@ ELKA = [ [059] decl = "void *memcpy_2(void *destination, const void *source, size_t num)" -NSG = """ -??,??,??,E3,??,??,??,9A,??,??,??,E2,??,??,??,0A,??,??,??,E4,??,??,??,E3,??,??,??,E0,??,??,??,94,??,??,??,E4, -??,??,??,34,??,??,??,E2,??,??,??,94,??,??,??,34,??,??,??,E2,??,??,??,0A,??,??,??,E2,??,??,??,3A,??,??,??,E7, -??,??,??,E3,??,??,??,0A,??,??,??,8A,??,??,??,E1,??,??,??,E5,??,??,??,E2,??,??,??,E1,??,??,??,E4,??,??,??,2A, -??,??,??,E2,??,??,??,EA,??,??,??,E1,??,??,??,E5,??,??,??,E2,??,??,??,E1,??,??,??,E4,??,??,??,2A,??,??,??,E2, -??,??,??,EA,??,??,??,E1,??,??,??,E5,??,??,??,E2,??,??,??,E1,??,??,??,E4,??,??,??,2A,??,??,??,E2,??,??,??,EA, -78470000,??????E0 -""" +ALL = "01,40,2D,E9,{??,0?,52,E3,??,??,??,9A,??,C?,10,E2,??,??,??,0A,01,30,D1,E4},01,40,BD,E8,1E,FF,2F,E1" [05A] decl = "void KeypressOn(int keycode)" @@ -622,6 +661,10 @@ NSG = """ ??,??,??,E9,??,??,??,E1,??,??,??,E1,??,??,??,E1,??,??,??,E1,??,??,??,??,??,??,??,E3,??,??,??,E5,??,??,??,E5, ??,??,??,E5,??,??,??,E3,??,??,??,E3,??,??,??,E1,??,??,??,E1,??,??,??,E1,??,??,??,E8 """ +SG = """ +7C 40 2D E9 00 60 A0 E1 01 00 A0 E1 02 50 A0 E1 01 40 A0 E1 ?? ?? ?? EB 00 30 E0 E3 ?? 3? 8? E5 +1C C0 90 E5 00 00 A0 E3 05 30 A0 E1 04 20 A0 E1 06 10 A0 E1 3C FF 2F E1 7C 80 BD E8 +""" [06C] decl = "int FindNextFile(DIR_ENTRY *dir_entry, uint32_t *err)" @@ -629,6 +672,10 @@ NSG = """ ??,??,??,E9,??,??,??,E1,??,??,??,E1,??,??,??,0A,??,??,??,E1,??,??,??,??,??,??,??,EA,??,??,??,??,20,??,??,E5, ??,??,??,E2,??,??,??,E1,??,??,??,E1,??,??,??,E8,??,??,??,E3,??,??,??,??,??,??,??,E1 """ +SG = """ +38 40 2D E9 01 50 A0 E1 00 40 B0 E1 ?? ?? ?? 0A F8 01 D4 E1 ?? ?? ?? EB ?? ?? ?? EA ?? ?? ?? EB 20 C0 90 E5 +04 D0 8D E2 05 20 A0 E1 04 10 A0 E1 30 40 B? E8 00 00 A0 E3 00 30 E0 E3 1C FF 2F E1 +""" [06D] decl = "int FindClose(DIR_ENTRY *dir_entry, uint32_t *err)" @@ -636,6 +683,10 @@ NSG = """ ??,??,??,E9,??,??,??,E1,??,??,??,E1,??,??,??,0A,??,??,??,E1,??,??,??,??,??,??,??,EA,??,??,??,??,10,??,??,E5, ??,??,??,E2,??,??,??,E1,??,??,??,E1,??,??,??,E8,??,??,??,E3,??,??,??,??,??,??,??,E1 """ +SG = """ +38 40 2D E9 01 50 A0 E1 00 40 B0 E1 ?? ?? ?? 0A F8 01 D4 E1 ?? ?? ?? EB ?? ?? ?? EA ?? ?? ?? EB 10 C0 90 E5 +04 D0 8D E2 05 20 A0 E1 04 10 A0 E1 30 40 B? E8 00 00 A0 E3 00 30 E0 E3 1C FF 2F E1 +""" [06E] decl = "int IsCalling(void)" @@ -709,8 +760,11 @@ X75 = """ """ [07B] -decl = "int GetProfileFilter()" -NSG = "" +decl = "int GetProfileFilter(int profile_id)" +SG = [ + "10B54BF7A6E9DDF184EF041C4BF7A2E9201C10BD10B5041C + 15", + "03225203914301807F48????????FFF7??FD002801D0??????????F7????80BD10B5041C + 20", +] [07C] decl = "uint32_t SetVibration(uint32_t power)" @@ -728,6 +782,10 @@ NSG = "10B5041C????????3221201C????????D420 + 1" decl = "int rand(void)" NSG = "7C081FE5????????010050E334008F021EFF2F01" ELKA = "80B57E48????????80BD012807D0022807D0042807D0082807D1" +SG = """ +??,48,30,B4,41,68,03,68,8A,00,??,49,9D,00,08,31,8C,58,4D,59,01,3B,64,19,8C,50,03,60,08,39,49,68,36,22, +01,39,00,2B,02,DA,41,60,02,60,03,E0,41,60,00,29,00,DA,42,60,60,00,40,08,30,BC,70,47 + 1 +""" [07F] decl = "int IsPlayerOn()" @@ -754,8 +812,9 @@ LDR[46 49 4C 45 4E 41 4D 45 00] + 1 ELKA = "30402DE947DF4DE218108DE204008DE28120A0E3????????????1FE50040A0E1100095E5940090E5" [083] -decl = "void *GetPathOfFoundFile()" -NSG = "" +decl = "int GetPathOfFoundFile(DIR_ENTRY *dir_entry, void *file_info)" +NSG = false +SG = "F0 4D 2D E9 00 40 A0 E1 A9 00 D0 E5 01 60 A0 E1 80 50 81 E2 00 00 50 E3 ?? ?? ?? 1A 07 00 D4 E5 20 00 50 E3 08 70 A0 13 ?? ?? ?? 1A ?? 1? 8F E2" [084] decl = "int sys_stat(const char *path, FSTATS *stat, uint32_t *err)" @@ -763,10 +822,14 @@ NSG = """ 7C,40,2D,E9,02,60,A0,E1,01,50,A0,E1,00,40,A0,E1,??,??,??,EB,00,30,E0,E3,04,30,8D,E5,00,60,8D,E5,50,C0,90,E5, 00,00,A0,E3,05,30,A0,E1,00,20,A0,E3,04,10,A0,E1,3C,FF,2F,E1,7C,80,BD,E8 """ +SG = """ +7C 40 2D E9 01 60 A0 E1 02 50 A0 E1 00 40 A0 E1 ?? ?? ?? EB 00 30 E0 E3 ?? 3? 8? E5 4C C0 90 E5 +00 00 A0 E3 05 30 A0 E1 06 20 A0 E1 04 10 A0 E1 3C FF 2F E1 7C 80 BD E8 +""" [085] decl = "int strcasecmp(const char *str1, const char *str2)" -NSG = """ +ALL = """ ??,B5,??,22,??,26,??,E0,??,32,??,5C,??,5C,??,1C,??,1C,??,40,??,40,??,42,??,D1,??,2B,??,D0,??,2C,??,D1,??,E0, ??,5C,??,2B,??,D1,??,5C,??,2B,??,D1,??,20,??,BD,??,5C,??,5C,??,40,??,40,??,42,??,D9,??,20,??,BD,??,20,??,43, ??,BD,00,00 @@ -775,10 +838,12 @@ NSG = """ [086] decl = "void EEFullReadBlock(int block, void *buf, int offset, int size, int cepid, int msg)" NSG = "??,??,??,E9,??,??,??,E1,??,??,??,E5,??,??,??,E1,??,??,??,E3,??,??,??,05,??,??,??,E2,??,??,??,E1" +SG = "FE452DE90180A0E108108DE2??4?9?E5??6?9?E503A0A0E10270A0E10050A0E1????????000050E30900A013??????????0?1FE5??A?8?E5" [087] decl = "void EEFullWriteBlock(int block, const void *buf, int offset, int size, int cepid, int msg)" NSG = "??,??,??,E9,??,??,??,E2,??,??,??,E1,??,??,??,E5,??,??,??,E1,??,??,??,E3,??,??,??,05,??,??,??,E2" +SG = "F04D2DE918D04DE201B0A0E114108DE2??4?9?E5??8?9?E50070A0E10360A0E10250A0E1????????000050E30900A013??????????A?1FE5" [088] decl = "char GetAccessoryType(void)" @@ -797,7 +862,7 @@ NSG = """ [08A] decl = "int GetFreeFlexSpace(int drive, uint32_t *err)" -NSG = """ +ALL = """ 38,40,2D,E9,00,08,A0,E1,40,08,A0,E1,00,40,A0,E1,01,50,A0,E1,??,??,??,EB,18,C0,90,E5,04,D0,8D,E2,05,20,A0,E1, 04,10,A0,E1,30,40,BD,E8 """ @@ -805,6 +870,7 @@ NSG = """ [08B] decl = "int GetTotalFlexSpace(int drive, uint32_t *err)" NSG = "10,40,2D,E9,00,40,A0,E1,??,??,??,EB,74,10,90,E5,04,00,A0,E1,10,40,BD,E8,11,FF,2F,E1" +SG = "10 40 2D E9 00 40 A0 E1 ?? ?? ?? EB 64 10 90 E5 04 00 A0 E1 10 40 B? E8 11 FF 2F E1" [08C] decl = "void RegExplorerExt(const REGEXPLEXT *ext)" @@ -817,6 +883,11 @@ ELKA = """ ??,??,??,E3,??,??,??,A8,??,??,??,E0,??,??,??,E5,??,??,??,E2,??,??,??,E5,??,??,??,E0,??,??,??,E1,??,??,??,E8, ??,??,??,E3,??,??,??,EA """ +SG = """ +30 40 2D E9 00 40 A0 E1 00 00 90 E5 ?? D? 4D E2 ?? ?? ?? [1111101.] ?? ?? ?? [1111101.] 00 50 B0 E1 +?? ?? ?? 0A 05 00 A0 E1 00 10 94 E5 ?? ?? ?? [1111101.] 09 00 D4 E5 D8 10 D4 E1 14 20 94 E5 18 30 94 E5 +0F 00 8? E8 0C 30 94 E5 BA 20 D4 E1 04 10 94 E5 05 00 A0 E1 +""" [08D] decl = "void getCurrentProfileName(WSHDR *name)" @@ -831,6 +902,10 @@ NSG = """ 7F,40,2D,E9,02,60,A0,E1,01,50,A0,E1,00,40,A0,E1,??,??,??,EB,00,10,A0,E3,42,00,8D,E8,00,30,E0,E3,08,30,8D,E5, 38,C0,90,E5,00,00,A0,E3,05,30,A0,E1,04,10,A0,E1,00,20,A0,E3,3C,FF,2F,E1,10,D0,8D,E2,70,80,BD,E8 """ +SG = """ +7C 40 2D E9 01 60 A0 E1 02 50 A0 E1 00 40 A0 E1 ?? ?? ?? EB 00 30 E0 E3 ?? 3? 8? E5 34 C0 90 E5 +00 00 A0 E3 05 30 A0 E1 06 20 A0 E1 04 10 A0 E1 3C FF 2F E1 7C 80 BD E8 +""" [08F] decl = "int sys_rmdir(const char *dirname, uint32_t *err)" @@ -838,6 +913,10 @@ NSG = """ 38,40,2D,E9,01,50,A0,E1,00,40,A0,E1,??,??,??,EB,00,30,E0,E3,00,30,8D,E5,3C,C0,90,E5,00,00,A0,E3,05,30,A0,E1, 00,20,A0,E3,04,10,A0,E1,3C,FF,2F,E1,38,80,BD,E8 """ +SG = """ +38 40 2D E9 01 50 A0 E1 00 40 A0 E1 ?? ?? ?? EB 38 C0 90 E5 04 D0 8D E2 05 20 A0 E1 04 10 A0 E1 +30 40 B? E8 00 00 A0 E3 00 30 E0 E3 1C FF 2F E1 +""" [090] decl = "int sys_truncate(int fd, int length, uint32_t *err)" @@ -852,10 +931,19 @@ NSG = """ 38,40,2D,E9,01,50,A0,E1,00,40,A0,E1,??,??,??,EB,00,30,E0,E3,00,30,8D,E5,24,C0,90,E5,00,00,A0,E3,05,30,A0,E1, 00,20,A0,E3,04,10,A0,E1,3C,FF,2F,E1,38,80,BD,E8 """ +SG = """ +38 40 2D E9 01 50 A0 E1 00 40 A0 E1 ?? ?? ?? EB 24 C0 90 E5 04 D0 8D E2 05 20 A0 E1 04 10 A0 E1 +30 40 B? E8 00 00 A0 E3 00 30 E0 E3 1C FF 2F E1 +""" [092] decl = "void *calloc(size_t count, size_t size)" NSG = "91,00,00,E0,F4,FF,FF,EA" +ELKA = [ + "91,00,00,E0,F4,FF,FF,EA", + "(B0,B5,05,1C,??,??,??,??,04,1C,03,D0,29,1C,20,1C,??,??,??,??,20,1C,B0,BD,48,43,F1,E7) + 0x19", +] +SG = "91,00,00,E0,F4,FF,FF,EA" [093] decl = "void RebootPhone()" @@ -872,6 +960,11 @@ ELKA = """ ??,??,??,EA,??,??,??,E1,??,??,??,EB,??,??,??,E3,??,??,??,01,??,??,??,0B,??,??,??,EB,??,??,??,E3,??,??,??,15, ??,??,??,15,??,??,??,11,??,??,??,11,??,??,??,18,??,??,??,1A,??,??,??,E3,??,??,??,E8 """ +SG = """ +70 40 2D E9 02 60 A0 E1 00 50 A0 E1 01 40 B0 E1 ?? ?? ?? 1A 05 00 A0 E1 ?? ?? ?? EB ?? ?? ?? EA +04 00 A0 E1 ?? ?? ?? EB ?? 0? 50 E3 04 00 A0 01 ?? ?? ?? 0B ?? ?? ?? EB ?? 0? 50 E3 ?? ?? ?? 0A +00 10 90 E5 ?? 0? 51 E3 ?? ?? ?? 1A 18 30 90 E5 +""" [095] decl = "int UnRegExplorerExt(const REGEXPLEXT *ext)" @@ -886,6 +979,7 @@ ELKA = """ ??,??,??,E2,??,??,??,E5,??,??,??,EA,??,??,??,E0,??,??,??,E0,??,??,??,E2,??,??,??,E3,??,??,??,EB,??,??,??,E2, ??,??,??,E5,??,??,??,E1,??,??,??,BA,??,??,??,E2,??,??,??,E5,??,??,??,E1,??,??,??,BA,??,??,??,E8 """ +SG = false # Absent from SG/X75 firmware; ELFLoader provides the builtin implementation. [096] decl = "short GetWavLenByContent(uint8_t *bytes, int offset, short *duration)" @@ -905,115 +999,126 @@ NSG = "FF,4D,2D,E9,08,D0,4D,E2,00,50,A0,E1,84,06,9F,E5" [09A] decl = "int ChangeVolume(uint8_t volume)" -NSG = "" +NSG = false +SG = "38 40 2D E9 00 50 A0 E1 ?? 4? 9F E5 01 00 A0 E3 ?? 00 84 E5 ?? ?? ?? EB ?? 1? 9F E5 05 00 A0 E1 ?? ?? ?? EB 00 00 A0 E3" +X75 = [ + # C72 public wrapper; the shared fallback below finds only its internal volume body. + "38 40 2D E9 00 50 A0 E1 30 00 8F E2 00 40 A0 E3 92 5B FF EB 05 00 55 E3 01 00 00 1A 97 FD FF EB 04 00 00 EA 6C FD FF EB 05 00 A0 E1 0D 8A FE EB 01 00 50 E3 01 40 A0 03 04 00 A0 E1 38 80 BD E8", + "38 40 2D E9 00 50 A0 E1 ?? 4? 9F E5 01 00 A0 E3 ?? 00 84 E5 ?? ?? ?? EB ?? 1? 9F E5 05 00 A0 E1 ?? ?? ?? EB 00 00 A0 E3", +] [09B] -decl = "void *RamAudioParamsAddr()" -NSG = "" +decl = "void *RamAudioParamsAddr(void)" +NSG = false +SG = "*(?? ?? ?? A8 ?? ?? ?? A8 ?? ?? ?? A8 ?? ?? ?? A8 ?? ?? ?? A8 FF FF 00 00 F0 40 2D E9 24 50 1F E5)" [09C] -decl = "void CloseScreensaver()" +decl = "void CloseScreensaver(void)" NSG = "??48,??B5,??68,????????,??28,??D1,??6B,??28,??D1,????????,??63,??BD + 1" [09D] -decl = "void *GetMissedEventsPtr()" -NSG = "??4880697047FEB5 + 1" +decl = "void *GetMissedEventsPtr(void)" +ALL = "??4880697047FEB5 + 1" [09E] -decl = "int GetMissedEventCount(uint32_t Event)" -NSG = "" +decl = "int GetMissedEventCount(uint32_t event)" [09F] decl = "void DrawRectangle_2(int x1, int y1, int x2, int y2, int flags, const char *pen, const char *brush)" -NSG = "" +ALL = "??,B5,??,??,??,??,??,??,15,1C,1C,1C,38,43" [0A0] decl = "int wsprintf_2(WSHDR *s, const char *format, ...)" -NSG = """ +ALL = """ ??,B4,??,B5,??,B0,??,B0,??,1C,??,22,??,32,??,46,??,A9,??,??,??,??,??,1C,??,98,??,??,??,??,??,1C,??,1C,??,99, ??,??,??,??,??,A8,??,90,??,1C,??,21,??,1C,??,AB,??,??,??,??,??,B0,??,B0,??,BC,??,BC,??,B0,??,47 """ [0A1] decl = "WSHDR *wstrcpy_2(WSHDR *destination, WSHDR *source)" -NSG = "??,B5,??,29,??,D0,??,28,??,D0,??,68,??,88,??,8A,??,42,??,D3,??,3A,??,??,??,??,??,BD,??,??,??,??,??,BD" +ALL = "??,B5,??,29,??,D0,??,28,??,D0,??,68,??,88,??,8A,??,42,??,D3,??,3A,??,??,??,??,??,BD,??,??,??,??,??,BD" [0A2] decl = "uint16_t wsCharAt(const WSHDR *str, short pos)" -NSG = "00B5021C0AD0101C????????0029" +ALL = "00B5021C0AD0101C????????0029" [0A3] decl = "void ws_2str(const WSHDR *source, char *destination, uint32_t size)" NSG = """ -??,??,??,E9,??,??,??,E2,??,??,??,E1,??,??,??,E1,??,??,??,E2,??,??,??,E2,??,??,??,E3,??,??,??,E3,??,??,??,??, -??,??,??,E1,??,??,??,E3,??,??,??,E5,??,??,??,E1,??,??,??,E3,??,??,??,??,??,??,??,E1,??,??,??,EA +F7,4D,2D,E9,47,DF,4D,E2,00,B0,A0,E1,01,80,A0,E1,18,10,8D,E2,04,00,8D,E2,01,70,A0,E3,82,20,A0,E3,??,??,??,[1111101.], +00,60,A0,E1,00,00,A0,E3,00,00,C8,E5,0B,00,A0,E1,01,40,A0,E3,??,??,??,[1111101.],00,A0,A0,E1,??,??,??,EA,04,10,A0,E1, +0B,00,A0,E1,??,??,??,[1111101.],00,50,A0,E1,00,10,A0,E1,06,00,A0,E1,??,??,??,[1111101.] +""" +SG = """ +F7,4D,2D,E9,00,A0,A0,E1,??,0?,9F,E5,14,D0,4D,E2,01,70,A0,E1,01,60,A0,E3,??,??,??,EB,00,B0,B0,E1,??,??,??,0A, +00,00,A0,E3,00,00,C7,E5,0D,00,A0,E1,81,20,A0,E3,0B,10,A0,E1,??,??,??,[1111101.],00,10,A0,E3,0D,00,A0,E1, +??,??,??,[1111101.],01,40,A0,E3,0A,00,A0,E1,??,??,??,[1111101.],00,80,A0,E1,??,??,??,EA,04,10,A0,E1 """ [0A4] decl = "WSHDR *AllocWS_2(int size)" NSG = "02,04,80,B5,12,0C,??,48,??,49,??,??,??,??,80,BD, ??,1C,??,04 + 1" +SG = "02,04,12,0C,??,[01001...],??,[01001...],??,[11100...],F8,B5,16,1C,0D,1C + 1" [0A5] decl = "void FreeWS_2(WSHDR *str)" -NSG = "??,B5,??,1C,??,D0,??,68,??,29,??,D0,??,68,??,28,??,D1,??,68,??,47,??,68,??,1C,??,47,??,20,??,BD,??,20,??,BD" +NSG = "10,B5,04,1C,??,D0,A1,68,00,29,??,D0,E0,68,01,28,??,D1,20,68,88,47,A1,68,20,1C,88,47,01,20,10,BD,00,20,10,BD,37,B5" +SG = "10,B5,04,1C,??,D0,A1,68,00,29,??,D0,E0,68,01,28,??,D1,20,68,88,47,A1,68,20,1C,88,47,01,20,10,BD,00,20,10,BD,??,E7,70,B5" [0A6] -decl = "void ResetGPRSTraffic()" +decl = "void ResetGPRSTraffic(void)" NSG = "08,40,2D,E9,??,??,??,EB,??,??,??,FA,00,00,A0,E3,08,40,BD,E8,??,??,??,EA" ELKA = "??,B5,??,??,??,??,??,20,??,??,??,??,??,BD,??,49,??,68,??,60,??,47,+1" +SG = "1CB5??????????????????481C210430041C????????00220092019204221C23211C2A48????????1CBD" [0A7] -decl = "char IsGPRSEnabled()" +decl = "char IsGPRSEnabled(void)" NSG = "??,48,??,68,70,47,F7,B5,??,49,06,1C,40,01,00,24,??,31 + 1" +SG = "80B5????????80BD80B50121" [0A8] -decl = "char IsGPRSConnected()" -NSG = "80,B5,??,??,??,??,00,28,01,D0,01,20,80,BD,00,20,80,BD,80,B5,06,28,06,D2" +decl = "char IsGPRSConnected(void)" +NSG = "80B5????????002801D0012080BD002080BD80B5062806D2" +SG = "80B5????????002801D0012080BD002080BD80B5042806D2" [0A9] -decl = "void KbdLock()" +decl = "void KbdLock(void)" NSG = "??,49,80,B5,01,20,??,39,??,60,01,21,03,20,??,??,??,??,80,BD + 1" +SG = "044980B50120886001210320????????80BD + 1" [0AA] -decl = "char *GetCurrentLocale()" -NSG = "80,B5,??,??,??,??,??,??,2F,28,02,D9,2F,20,00,E0,08,31,0A,78,2F,2A,01,D0,82,42,F9,D1,48,68,80,BD" -ELKA = "??,42,??,D1,??,79,??,BD,??,31,??,79,??,2A,??,D1,??,20,??,BD,+0x15" +decl = "char *GetCurrentLocale(void)" +ALL = "??,42,??,D1,??,79,??,BD,??,31,??,79,??,2A,??,D1,??,20,??,BD,+0x15" [0AB] -decl = "void loopback171()" +decl = "void loopback171(void)" NSG = "1E,FF,2F,E1" [0AC] decl = "void DrawText(const WSHDR *text, int x, int y, int font, int w, int h, int align, const char *pen, const char *brush, int inversion)" -NSG = "" [0AD] decl = "void StrAnsi2Uni(const char *in, uint16_t *out)" -NSG = "" [0AE] decl = "void StrUni2Ansi(const uint16_t *in, char *out)" -NSG = "" [0AF] -decl = "uint32_t HexToInt(const char *s)" -NSG = "??B5041C0E1C0025????????0828??D82021??E0" +decl = "uint32_t HexToInt(char *s, uint32_t fallback)" +ALL = "??B5041C0E1C0025????????0828??D82021??E0" [0B0] decl = "void DrawPicWithCanvas(int x, int y, int picture)" -NSG = "" [0B1] decl = "void DrawColorPicWithCanvas(int x, int y, int picture, const char *pen)" -NSG = "" +decl_SG = "void DrawColorPicWithCanvas(int x, int y, int picture, const char *pen, const char *brush)" [0B2] -decl = "void *GetBuildCanvas()" -NSG = "" +decl = "void *GetBuildCanvas(void)" [0B3] decl = "long Seconds2iTime(int timeval)" -NSG = "" [0B4] decl = "void GetDateTime(TDate *date, TTime *time)" @@ -1021,18 +1126,23 @@ NSG = """ ??,B5,??,1C,??,1C,??,28,??,D1,??,AC,??,2D,??,D1,??,46,??,1C,??,??,??,??,??,1C,??,??,??,??,??,??,??,??,??,1C, ??,1C,??,1C,??,??,??,??,??,22,??,43,??,23,??,1C,??,1C,??,??,??,??,??,BD """ +SG = """ +30,B5,05,1C,0C,1C,00,28,85,B0,??,D1,02,AD,00,2C,??,D1,6C,46,20,1C,??,??,??,??,28,1C,??,??,??,??,21,1C,28,1C, +04,AA,??,??,??,??,??,??,??,??,02,1C,21,1C,28,1C,??,??,??,??,3C,23,58,43,??,99,22,1C,40,18,??,90,29,1C +""" [0B5] decl = "char GetWeek(const TDate *date)" -NSG = "??,B5,??,??,??,??,??,1D,??,20,??,??,??,??,??,06,??,0E,??,BD" +ALL = "??,B5,??,??,??,??,??,1D,??,20,??,??,??,??,??,06,??,0E,??,BD" [0B6] -decl = "char GetProfile()" +decl = "char GetProfile(void)" NSG = """ ??,B5,??,22,??,21,??,46,??,??,??,??,??,??,??,28,??,D0,??,??,??,??,??,99,??,42,??,DD,??,1C,??,BD,??,21,??,??, ??,??,??,??,??,??,??,3C,??,1C,??,20,??,??,??,??,??,25,??,28,??,D0,??,DF,??,1C,??,1C,??,22,??,20,??,??,??,??, ??,E0,??,DF,??,1C,??,1C,??,22,??,20,??,??,??,??,??,??,??,38,??,68,??,E7 """ +SG = "10,B5,??,??,??,??,??,48,??,78,??,??,??,??,20,1C,10,BD,F8,B5,04,1C,0D,1C" [0B7] decl = "char SetProfile(char profile_id)" @@ -1041,14 +1151,19 @@ NSG = """ ??,22,??,21,??,1C,??,??,??,??,??,??,??,1C,??,??,??,??,??,1C,??,1C,??,??,??,??,??,22,??,21,??,1C,??,??,??,??, ??,??,??,BD """ +SG = [ + "10,B5,04,1C,??,??,??,??,08,2C,??,D2,20,1C,??,??,??,??,20,1C,??,??,??,??,20,1C,??,??,??,??,05,28,??,D1,??,??,??,??,??,??,??,??,10,BD", + "10,B5,04,1C,??,??,??,??,09,2C,??,D2,20,1C,??,??,??,??,20,1C,??,??,??,??,20,1C,??,??,??,??,06,28,??,D1,??,??,??,??,??,??,??,??,10,BD", +] [0B8] -decl = "int sdiv(int divisor, int divident)" -NSG = "80,24,10,E2,00,00,60,42,41,30,32,E0,00,10,61,22,A1,C1,70,E0" +decl = "int sdiv(int divisor, int dividend)" +ALL = "80,24,10,E2,00,00,60,42,41,30,32,E0,00,10,61,22,A1,C1,70,E0" [0B9] -decl = "void KbdUnlock()" +decl = "void KbdUnlock(void)" NSG = "??,49,80,B5,00,20,??,60,01,21,03,20,??,??,??,??,80,BD + 1" +SG = "??,49,80,B5,00,20,10,39,88,60,01,21,03,20,??,??,??,??,80,BD + 1" [0BA] decl = "void *realloc(void *ptr, size_t size)" @@ -1061,14 +1176,19 @@ ELKA = """ ??,B5,??,1C,??,1C,??,1C,??,??,??,FF,??,1C,??,2C,??,D0,??,2D,??,D0,??,20,??,43,??,59,??,42,??,D3,??,1C,??,1C, ??,1C,??,1C,??,??,??,E9,??,1C,??,??,??,FE,??,1C+1 """ +SG = """ +70,40,2D,E9,00,40,A0,E1,02,00,A0,E3,01,60,A0,E1,??,??,??,EB,00,50,A0,E1,00,00,54,E3,00,00,55,13,??,??,??,0A, +14,10,14,E5,14,00,44,E2,00,00,41,E0,14,00,40,E2,00,00,56,E1,06,00,A0,31,00,20,A0,E1,05,00,A0,E1,04,10,A0,E1, +??,??,??,EB,04,00,A0,E1,??,??,??,EB,05,00,A0,E1,70,80,BD,E8 +""" [0BB] decl = "void *memset(void *ptr, int val, size_t num)" -NSG = "FF,30,01,E2,02,10,A0,E1,03,24,83,E1,02,28,82,E1,??,??,??,EA,78,47" +ALL = "01,40,2D,E9,FF,30,01,E2,02,10,A0,E1,03,24,83,E1,02,28,82,E1,??,??,??,EB,01,40,BD,E8,1E,FF,2F,E1" [0BC] -decl = "uint32_t udiv(uint32_t divisor, uint32_t divident)" -NSG = """ +decl = "uint32_t udiv(uint32_t divisor, uint32_t dividend)" +ALL = """ 00,20,A0,E3,A1,C1,70,E0,20,00,00,3A,21,C4,70,E0,0F,00,00,3A,00,04,A0,E1,FF,24,82,E3,21,C2,70,E0,17,00,00,3A, 21,C4,70,E0,09,00,00,3A,00,04,A0,E1,FF,28,82,E3,21,C4,70,E0,00,04,A0,21,FF,2C,82,23,21,C2,70,E0,0E,00,00,3A, 00,C0,70,E2,??,??,??,2A,20,04,A0,21,A1,C3,70,E0,80,13,41,20,02,20,A2,E0,21,C3,70,E0,00,13,41,20,02,20,A2,E0, @@ -1078,8 +1198,8 @@ E5,FF,FF,2A,02,00,A0,E1,1E,FF,2F,E1 """ [0BD] -decl = "int DivBy10(int divident)" -NSG = """ +decl = "int DivBy10(int dividend)" +ALL = """ 00,30,B0,E1,00,00,60,42,0A,10,40,E2,20,01,40,E0,20,02,80,E0,20,04,80,E0,20,08,80,E0,A0,01,A0,E1,00,21,80,E0, 82,10,51,E0,01,00,80,52,0A,10,81,42,03,30,B0,E1,00,00,60,42,00,10,61,42,1E,FF,2F,E1 """ @@ -1174,6 +1294,7 @@ NSG = "*(??560000E8030000000000000000000001000000140500000600000000000000-10)" [0D2] decl = "char *RamIsAutoTimeEnabled(void)" NSG = "*(50BF0000????????01000080 + 4)+4" +SG = "&(??4800797047??4980B5087100F0????80BD)+4" [0D3] decl = "char *RamIsStandby()" @@ -1244,12 +1365,12 @@ NSG = "&(F8B501270D1C041C081C????????????808831888842+0E) + 4" ELKA = "*(00 30 8D E5 53 20 A0 E3 B0 1F 82 E2 02 30 A0 E3 + 48)+8" [0E2] -decl = "char *RamKeyBuffer()" -NSG = "&(????????140052E30000D3E70630D1E5)" +decl = "char *RamKeyBuffer(void)" +SG = "&(????????140052E30000D3E70630D1E5)" [0E3] -decl = "char *RamProfileNum()" -NSG = "" +decl = "char *RamProfileNum(void)" +SG = "&(??480470201CFFF72DFE)" [0E4] decl = "void *FreeRAM()" @@ -1500,7 +1621,7 @@ NSG = "??,B5,??,??,??,68,??,28,??,D0,??,78,??,28,??,D1,??,20,??,??,??,??,??,68,? [110] decl = "uint16_t *wstrcopy(uint16_t *destination, const uint16_t *source)" -NSG = "??,B5,??,1C,??,88,??,00,??,19,??,32,??,1C,??,??,??,??,??,1C,??,BD" +ALL = "??,B5,??,1C,??,88,??,00,??,19,??,32,??,1C,??,??,??,??,??,1C,??,BD" [111] decl = "char GetTypeUSSD()" @@ -1516,22 +1637,22 @@ NSG = """ """ [113] -decl = "char *strpbrk(const char *str1, const char *str2)" -NSG = """ +decl = "size_t strcspn(const char *str1, const char *str2)" +ALL = """ ??,B4,??,1C,??,1C,??,78,??,2D,??,D1,??,1A,??,BC,??,47,??,78,??,1C,??,2A,??,D0,??,42,??,D1,??,1A,??,E7,??,78, ??,33,??,2A,??,D1,??,34,??,E7 """ [114] decl = "char *strncat(char *destination, const char *source, size_t num)" -NSG = """ +ALL = """ ??,B4,??,78,??,1C,??,2C,??,D0,??,33,??,78,??,2C,??,D1,??,2A,??,D0,??,78,??,31,??,70,??,33,??,2C,??,D0,??,3A, ??,D1,??,21,??,70,??,BC,??,47 """ [115] decl = "int strncmp(const char *str1, const char *str2, size_t num)" -NSG = """ +ALL = """ ??,1C,??,43,??,07,??,B4,??,D1,??,??,??,01,??,E0,??,30,??,31,??,3A,??,2A,??,D3,??,68,??,68,??,42,??,D1,??,1B, ??,43,??,40,??,D0,??,2A,??,D1,??,20,??,BC,??,47,??,78,??,78,??,31,??,30,??,2B,??,D3,??,42,??,D1,??,3A,??,D1, ??,1B,??,E7 + 1 @@ -1539,7 +1660,7 @@ NSG = """ [116] decl = "char *strncpy(char *destination, const char *source, size_t num)" -NSG = """ +ALL = """ ??,B4,??,1C,??,1C,??,43,??,07,??,D1,??,??,??,01,??,E0,??,31,??,3A,??,C3,??,2A,??,D3,??,68,??,1B,??,43,??,40, ??,D0,??,2A,??,D0,??,78,??,31,??,70,??,33,??,2C,??,D0,??,3A,??,D1,??,BC,??,47,??,2A,??,D9,??,1E,??,22,??,70, ??,33,??,39,??,D1,??,E7 @@ -1547,18 +1668,18 @@ NSG = """ [117] decl = "char *strrchr(const char *str, int character)" -NSG = "??,22,??,06,??,0E,??,78,??,30,??,42,??,D1,??,1E,??,29,??,D1,??,1C,??,47 + 1" +ALL = "??,22,??,06,??,0E,??,78,??,30,??,42,??,D1,??,1E,??,29,??,D1,??,1C,??,47 + 1" [118] decl = "char *strstr(const char *str1, const char *str2)" -NSG = """ +ALL = """ ??,B4,??,1C,??,1C,??,78,??,78,??,34,??,33,??,2A,??,D3,??,42,??,D0,??,2D,??,D0,??,2A,??,D1,??,1C,??,BC,??,47, ??,30,??,E7 """ [119] decl = "long int strtol(const char *str, char **endptr, int base)" -NSG = """ +ALL = """ ??,B5,??,B4,??,1C,??,1C,??,27,??,9C,??,??,??,??,??,78,??,34,??,29,??,D0,??,68,??,5C,??,07,??,D4,??,29,??,D0, ??,29,??,D1,??,??,??,02,??,43,??,E0,??,3C,??,1C,??,1C,??,1C,??,??,??,??,??,1C,??,2D,??,D0,??,68,??,42,??,D1, ??,98,??,60,??,05,??,25,??,??,??,??,??,1C,??,2C,??,DA,??,42,??,28,??,DD,??,60,??,07,??,B0,??,BC,??,BC,??,47, @@ -1567,7 +1688,7 @@ NSG = """ [11A] decl = "unsigned long strtoul(const char *str, char **endptr, int base)" -NSG = """ +ALL = """ ??,B5,??,B4,??,B0,??,1C,??,27,??,9C,??,??,??,??,??,1C,??,68,??,90,??,??,??,??,??,78,??,34,??,29,??,D0,??,68, ??,5C,??,07,??,D4,??,29,??,D0,??,29,??,D1,??,??,??,02,??,43,??,E0,??,3C,??,21,??,60,??,1C,??,1C,??,9A,??,??, ??,??,??,1C,??,2D,??,D0,??,68,??,42,??,D1,??,98,??,60,??,68,??,28,??,D1,??,1C,??,B0,??,BC,??,BC,??,47,??,9A, @@ -1576,7 +1697,7 @@ NSG = """ [11B] decl = "int snprintf(char *s, size_t n, const char *format, ...)" -NSG = """ +ALL = """ ??,B4,??,B5,??,B0,??,1C,??,A9,??,91,??,90,??,D0,??,19,??,38,??,90,??,??,??,44,??,90,??,??,??,44,??,90,??,AE, ??,1C,??,46,??,AA,??,99,??,??,??,??,??,1C,??,2C,??,D0,??,1C,??,20,??,??,??,??,??,1C,??,B0,??,BC,??,BC,??,B0, ??,47 @@ -1584,7 +1705,7 @@ NSG = """ [11C] decl = "int memcmp(const void *ptr1, const void *ptr2, size_t num)" -NSG = """ +ALL = """ ??,B4,??,2A,??,D3,??,1C,??,43,??,07,??,D1,??,C8,??,C9,??,42,??,D1,??,3A,??,2A,??,D2,??,42,??,D0,??,38,??,39, ??,2A,??,D1,??,20,??,BC,??,47,??,07,??,D5,??,32,??,E0,??,78,??,78,??,31,??,30,??,42,??,D1,??,78,??,78,??,31, ??,30,??,42,??,D1,??,3A,??,D1,??,1B,??,E7,00,00,78470000 @@ -1592,54 +1713,51 @@ NSG = """ [11D] decl = "void zeromem(void *ptr, int num)" -NSG = """ -??,??,??,E3,??,??,??,E3,??,??,??,3A,??,??,??,E2,??,??,??,0A,??,??,??,E2,??,??,??,E3,??,??,??,E4,??,??,??,A4, -??,??,??,C4,??,??,??,E0,??,??,??,EA,??,??,??,E1,??,??,??,24,??,??,??,24,??,??,??,44,??,??,??,E1,??,??,??,??, -??,??,??,E3,??,??,??,E9,??,??,??,E1,??,??,??,E1,??,??,??,E1,??,??,??,E2,??,??,??,28,??,??,??,28,??,??,??,22, -??,??,??,2A,??,??,??,E1,??,??,??,28,??,??,??,48,??,??,??,E8,??,??,??,E1,??,??,??,24,??,??,??,01,??,??,??,44, -??,??,??,44,??,??,??,E3,??,??,??,14,??,??,??,E1 +ALL = """ +??,2?,A0,E3,??,0?,51,E3,??,??,??,3A,??,C?,10,E2,??,??,??,0A,??,C?,6C,E2,??,0?,5C,E3,01,20,C0,E4, +01,20,C0,A4,01,20,C0,C4,0C,10,41,E0,??,??,??,EA,81,CF,B0,E1,01,20,C0,24,01,20,C0,24,01,20,C0,44,1E,FF,2F,E1 """ +ELKA = [ + "(F0,BC,08,BC,18,47,00,00,78,47,00,00,00,20,A0,E3,04,00,51,E3) + 0x0C", + """ + ??,2?,A0,E3,??,0?,51,E3,??,??,??,3A,??,C?,10,E2,??,??,??,0A,??,C?,6C,E2,??,0?,5C,E3,01,20,C0,E4, + 01,20,C0,A4,01,20,C0,C4,0C,10,41,E0,??,??,??,EA,81,CF,B0,E1,01,20,C0,24,01,20,C0,24,01,20,C0,44,1E,FF,2F,E1 + """, +] [11E] decl = "void *memcpy(void *destination, const void *source, size_t num)" -NSG = """ -??,??,??,E3,??,??,??,9A,??,??,??,E2,??,??,??,0A,??,??,??,E4,??,??,??,E3,??,??,??,E0,??,??,??,94,??,??,??,E4, -??,??,??,34,??,??,??,E2,??,??,??,94,??,??,??,34,??,??,??,E2,??,??,??,0A,??,??,??,E2,??,??,??,3A,??,??,??,E7, -??,??,??,E3,??,??,??,0A,??,??,??,8A,??,??,??,E1,??,??,??,E5,??,??,??,E2,??,??,??,E1,??,??,??,E4,??,??,??,2A, -??,??,??,E2,??,??,??,EA,??,??,??,E1,??,??,??,E5,??,??,??,E2,??,??,??,E1,??,??,??,E4,??,??,??,2A,??,??,??,E2, -??,??,??,EA,??,??,??,E1,??,??,??,E5,??,??,??,E2,??,??,??,E1,??,??,??,E4,??,??,??,2A,??,??,??,E2,??,??,??,EA, -78470000,??????E0 -""" +ALL = "01,40,2D,E9,{??,0?,52,E3,??,??,??,9A,??,C?,10,E2,??,??,??,0A,01,30,D1,E4},01,40,BD,E8,1E,FF,2F,E1" [11F] decl = "WSHDR *wstrcpy(WSHDR *destination, WSHDR *source)" -NSG = "??,B5,??,29,??,D0,??,28,??,D0,??,68,??,88,??,8A,??,42,??,D3,??,3A,??,??,??,??,??,BD,??,??,??,??,??,BD" +ALL = "??,B5,??,29,??,D0,??,28,??,D0,??,68,??,88,??,8A,??,42,??,D3,??,3A,??,??,??,??,??,BD,??,??,??,??,??,BD" [120] decl = "WSHDR *wstrncpy(WSHDR *destination, WSHDR *source, int num)" -NSG = "??,B5,??,1C,??,D0,??,29,??,D0,??,1C,??,??,??,??,??,42,??,D2,??,1C,??,??,??,??,??,1C,??,1C,??,??,??,??,??,BD" +ALL = "??,B5,??,1C,??,D0,??,29,??,D0,??,1C,??,??,??,??,??,42,??,D2,??,1C,??,??,??,??,??,1C,??,1C,??,??,??,??,??,BD" [121] decl = "WSHDR *wstrcat(WSHDR *destination, WSHDR *source)" -NSG = """ +ALL = """ ??,B5,??,1C,??,D0,??,29,??,D0,??,68,??,88,??,68,??,88,??,1C,??,??,??,??,??,18,??,42,??,D2,??,8A,??,38,??,1A, ??,1C,??,??,??,??,??,BD,??,1C,??,??,??,??,??,BD """ [122] decl = "WSHDR *wstrncat(WSHDR *destination, WSHDR *source, int num)" -NSG = """ +ALL = """ ??,B5,??,1C,??,D0,??,29,??,D0,??,68,??,88,??,1C,??,??,??,??,??,19,??,42,??,D2,??,8A,??,38,??,1B,??,1C,??,??, ??,??,??,BD """ [123] decl = "uint16_t wstrlen(const WSHDR *str)" -NSG = "??,28,??,D1,??,47,??,68,??,88,??,47 + 1" +ALL = "??,28,??,D1,??,47,??,68,??,88,??,47 + 1" [124] decl = "int wsprintf(WSHDR *s, const char *format, ...)" -NSG = """ +ALL = """ ??,B4,??,B5,??,B0,??,B0,??,1C,??,22,??,32,??,46,??,A9,??,??,??,??,??,1C,??,98,??,??,??,??,??,1C,??,1C,??,99, ??,??,??,??,??,A8,??,90,??,1C,??,21,??,1C,??,AB,??,??,??,??,??,B0,??,B0,??,BC,??,BC,??,B0,??,47 """ @@ -1647,25 +1765,27 @@ NSG = """ [125] decl = "WSHDR *AllocWS(int size)" NSG = "02,04,80,B5,12,0C,??,48,??,49,??,??,??,??,80,BD, ??,1C,??,04 + 1" +SG = "02,04,12,0C,??,[01001...],??,[01001...],??,[11100...],F8,B5,16,1C,0D,1C + 1" [126] decl = "void CutWSTR(WSHDR *str, int length)" -NSG = "??,B5,??,28,??,D0,??,68,??,88,??,42,??,D2,??,??,??,??,??,BD" +ALL = "??,B5,??,28,??,D0,??,68,??,88,??,42,??,D2,??,??,??,??,??,BD" [127] decl = "WSHDR *CreateLocalWS(WSHDR *header, uint16_t *body, int size)" -NSG = "??,B5,??,1C,??,1C,??,1C,??,29,??,D0,??,00,??,1C,??,??,??,??,??,1C,??,1C,??,1C,??,??,??,??,??,BD" +ALL = "??,B5,??,1C,??,1C,??,1C,??,29,??,D0,??,00,??,1C,??,??,??,??,??,1C,??,1C,??,1C,??,??,??,??,??,BD" [128] decl = "WSHDR *CreateWS(malloc_func_t malloc_func, mfree_func_t mfree_func, int size)" -NSG = """ +ALL = """ ??,B5,??,1C,??,20,??,1C,??,1C,??,2D,??,D0,??,2E,??,D0,??,20,??,47,??,1C,??,D1,??,20,??,BD,??,00,??,30,??,47, ??,60,??,28,??,D1,??,1C,??,47,??,E7,??,21,??,80,??,1C,??,1C,??,68,??,??,??,??,??,21,??,60,??,60,??,60,??,E7 """ [129] decl = "void FreeWS(WSHDR *str)" -NSG = "??,B5,??,1C,??,D0,??,68,??,29,??,D0,??,68,??,28,??,D1,??,68,??,47,??,68,??,1C,??,47,??,20,??,BD,??,20,??,BD" +NSG = "10,B5,04,1C,??,D0,A1,68,00,29,??,D0,E0,68,01,28,??,D1,20,68,88,47,A1,68,20,1C,88,47,01,20,10,BD,00,20,10,BD,37,B5" +SG = "10,B5,04,1C,??,D0,A1,68,00,29,??,D0,E0,68,01,28,??,D1,20,68,88,47,A1,68,20,1C,88,47,01,20,10,BD,00,20,10,BD,??,E7,70,B5" [12A] decl = "void DrawObject(DRWOBJ *drwobj)" @@ -1713,7 +1833,7 @@ NSG = "??,B5,??,9C,??,2C,??,D0,??,70,??,70,??,70,??,70,??,BD" [132] decl = "void *memmove(void *destination, const void *source, size_t num)" -NSG = "01,30,40,E0,02,00,53,E1,??,??,??,2A,03,00,10,E3,03,00,11,03,??,??,??,0A" +ALL = "01,40,2D,E9,{01,30,40,E0,02,00,53,E1,??,??,??,2A,03,00,10,E3,03,00,11,03},01,40,BD,E8,1E,FF,2F,E1" [133] decl = "void StoreXYWHtoRECT(RECT *rect, int x, int y, int w, int h)" @@ -2022,7 +2142,7 @@ NSG = "94,10,80,e5,1e,ff,2f,e1" [162] decl = "int setjmp(jmp_buf env)" -NSG = "??,??,??,E8,??,??,??,E8,??,??,??,E8,??,??,??,E9,??,??,??,EB,??,??,??,E8,??,??,??,E8,??,??,??,E3,??,??,??,E1" +ALL = "??,??,??,E8,??,??,??,E8,??,??,??,E8,??,??,??,E9,??,??,??,EB,??,??,??,E8,??,??,??,E8,??,??,??,E3,??,??,??,E1" [163] decl = "EDITQ *AllocEQueue(const void *malloc_func, const void *mfree_func)" @@ -2086,6 +2206,10 @@ NSG = """ ??,??,??,E9,??,??,??,E1,??,??,??,E1,??,??,??,??,??,??,??,E3,??,??,??,E5,58,??,??,E5,??,??,??,E3,??,??,??,E1, ??,??,??,E3,??,??,??,E1,??,??,??,E1,??,??,??,E8 """ +SG = """ +38 40 2D E9 01 50 A0 E1 00 40 A0 E1 ?? ?? ?? EB 54 C0 90 E5 04 D0 8D E2 05 20 A0 E1 04 10 A0 E1 +30 40 B? E8 00 00 A0 E3 00 30 E0 E3 1C FF 2F E1 +""" [16C] decl = "int str_2ws(WSHDR *destination, const char *source, uint32_t size)" @@ -2098,6 +2222,11 @@ NSG = """ ??,??,??,E3,??,??,??,0A,??,??,??,E1,??,??,??,??,??,??,??,E1,??,??,??,E1,??,??,??,??,??,??,??,E1,??,??,??,??, ??,??,??,E1,??,??,??,E1,??,??,??,E3,??,??,??,1A,??,??,??,E1,??,??,??,E2,??,??,??,E8 """ +SG = """ +F0,4D,2D,E9,00,50,A0,E1,??,0?,9F,E5,??,D?,4D,E2,02,A0,A0,E1,??,7?,A0,E3,01,60,A0,E1,??,??,??,EB,??,0?,8?,E5, +??,0?,50,E3,??,??,??,0A,??,1?,A0,E3,05,00,A0,E1,??,??,??,[1111101.],??,2?,A0,E3,??,1?,9?,E5,??,0?,8D,E2,??,??, +??,[1111101.],??,0?,4A,E2,??,0?,8?,E5,??,4?,A0,E3,??,8?,A0,E3,??,0?,9?,E5,00,00,54,E1 +""" [16D] decl = "int UnpackABentry(AB_UNPRES *entry, const void *data, int size, int flags)" @@ -2111,6 +2240,10 @@ NSG = """ ??,??,??,E8 """ ELKA = "??B5A3B0041C002020AB1880087808AE0128" +SG = """ +FF,B5,85,B0,00,AB,00,26,??,81,04,1C,08,78,01,27,FF,03,01,28,??,D0,02,21,??,E0,48,1C,49,78,45,1C,00,29, +03,91,??,D1,00,20,09,B0,F0,BD,+1 +""" [16E] decl = "int FreeUnpackABentry(AB_UNPRES *entry, void *mfree_fn)" @@ -2124,6 +2257,7 @@ NSG = """ ??,??,??,E1,??,??,??,E3,??,??,??,E5,??,??,??,E1,??,??,??,E3,??,??,??,E8 """ ELKA = "??B5041CC0680025002881B028D066881FE0" +SG = "??,B5,04,1C,C0,68,00,25,00,28,81,B0,28,D0,66,88,1F,E0" [16F] decl = "int GetTypeOfAB_UNPRES_ITEM(int item_type)" @@ -2140,6 +2274,10 @@ NSG = """ ??,??,??,EA,??,??,??,EA,??,??,??,EA """ ELKA = "??1CFF2301330920994204D202A35B185B5A+1" +SG = [ + "01,1C,09,20,3E,29,??,D0,??,DC,3E,29,??,D2,02,A3,5B,5C,5B,00,9F,44,+1", + "01,1C,09,20,34,29,??,D0,??,DC,34,29,??,D2,02,A3,5B,5C,5B,00,9F,44,+1", +] [170] decl = "int MakeVoiceCall(const char *number, int unk1, int unk2)" @@ -2329,7 +2467,7 @@ NSG = "??,??,??,E9,??,??,??,E1,??,??,??,E5,??,??,??,FB,??,??,??,E3,??,??,??,A5,? [18E] decl = "void GPRS_OnOff(int enable, int unk)" -NSG = "??,B5,??,4A,??,25,??,24,??,28,??,4E,??,60,??,D1,??,29,??,D0,??,1C,??,22,??,21,??,20" +ALL = "??,B5,??,4A,??,25,??,24,??,28,??,4E,??,60,??,D1,??,29,??,D0,??,1C,??,22,??,21,??,20" [18F] decl = "int GetCurMenuItem(void *gui)" @@ -2466,19 +2604,22 @@ NSG = "10,B5,04,1C,??,D0,??,??,00,28,??,D0,??,??,00,2A,??,D1" [1A2] decl = "int ActivateDialUpProfile(uint32_t cepid, int profile_id)" -NSG = "??,B5,??,B0,00,24,01,20,??,46,??,??,??,??,??,??,??,??,00,28,??,D0,01,21" +SG = "??,B5,??,B0,00,24,01,20,??,46,??,??,??,??,??,??,??,??,00,28,??,D0,01,21" [1A3] decl = "int GetCurrentGPRSProfile(void)" -NSG = "??,40,2D,E9,??,??,??,E5,??,??,??,E1,19,00,50,E3,??,??,??,3A,01,00,A0,E3" +SG = [ + "1C402DE9????????B000D4E1190050E3", + "10402DE9????????B000D4E1190050E30800003A0100A0E3", +] [1A4] decl = "int GetDisconnectTime(void)" -NSG = "??,??,??,E5,??,??,??,E1,FA,0F,50,E3,??,??,??,8A,0A,00,50,E3,??,??,??,2A" +SG = "??,??,??,E5,??,??,??,E1,FA,0F,50,E3,??,??,??,8A,0A,00,50,E3,??,??,??,2A" [1A5] decl = "void RegisterCepIdForCurProfile(uint32_t cepid, int profile_id, uint32_t is_gprs)" -NSG = "03,1C,??,??,03,60,02,71,C1,80,70,47 + 1" +SG = "03,1C,??,??,03,60,02,71,C1,80,70,47 + 1" [1A6] decl = "int IsTimerProc(GBSTMR *timer)" @@ -2539,7 +2680,7 @@ NSG = "??,B5,04,1C,01,20,??,??,??,??,FF,20" [1B4] decl = "void DrawRectangle(int x1, int y1, int x2, int y2, int flags, const char *pen, const char *brush)" -NSG = "??,B5,??,??,??,??,??,??,15,1C,1C,1C,38,43" +ALL = "??,B5,??,??,??,??,??,??,15,1C,1C,1C,38,43" [1B5] decl = "int isnewSGold(void)" @@ -2555,8 +2696,8 @@ decl = "uint32_t str2ip(const char *ip)" NSG = "F8,B5,00,21,00,91,C9,43,00,28,??,??,08,1C,F8,BD,00,27" [1B8] -decl = "TREGEXPLEXT *EXT_TOP(void)" -NSG = "" +decl = "void *EXT_TOP(void)" +ALL = false # Implemented by ELFLoader as EXT2_AREA; there is no firmware target. [1B9] decl = "PNGTOP_DESC *PNG_TOP(void)" @@ -2663,6 +2804,11 @@ NSG = """ ??,BD """ ELKA = "10402DE90040A0E1????????98319FE50010A0E3" +SG = """ +10 40 2D E9 00 40 A0 E1 ?? ?? ?? EB ?? 3? 9F E5 ?? 1? A0 E3 ?? 2? 9F E5 ?? 3? 9? E5 ?? ?? ?? EA +81 C2 82 E0 ?? C? 9? E5 04 00 5C E1 ?? 1? 81 12 ?? ?? ?? 1A 81 02 82 E0 10 80 BD E8 +03 00 51 E1 ?? ?? ?? BA ?? 1? A0 E3 ?? 2? 9F E5 ?? ?? ?? EA +""" [1D0] decl = "int GetExtUid_ws(const WSHDR *ext)" @@ -2671,6 +2817,11 @@ NSG = """ ??,D0,??,??,??,??,??,90,??,25 """ ELKA = "F0412DE920D04DE20050B0E10040A0E32C00000A" +SG = """ +F0 45 2D E9 ?? D? 4D E2 00 60 B0 E1 ?? 4? A0 E3 ?? ?? ?? 0A 06 00 A0 E1 ?? ?? ?? [1111101.] +?? 0? 50 E3 ?? ?? ?? 0A ?? 2? A0 E3 06 10 A0 E1 ?? 0? 8D E2 ?? ?? ?? [1111101.] ?? 0? 50 E3 +?? ?? ?? 1A ?? ?? ?? EB 00 A0 A0 E1 ?? 5? A0 E3 ?? 8? 9F E5 ?? ?? ?? EA +""" [1D1] decl = "void EDIT_RemoveEditControl(void *gui, int n)" @@ -2728,11 +2879,11 @@ NSG = "&(??4A,??79,1832,??1C,??28) + 18" [1DC] decl = "short wstrchr(WSHDR *str, uint32_t start, uint32_t character)" -NSG = "??,1C,??,1C,??,B5,??,68,??,88,??,E0,??,00,??,5B,??,42,??,D0,??,30,??,04,??,0C,??,42,??,D2,??,48,??,BD + 1" +ALL = "??,1C,??,1C,??,B5,??,68,??,88,??,E0,??,00,??,5B,??,42,??,D0,??,30,??,04,??,0C,??,42,??,D2,??,48,??,BD + 1" [1DD] -decl = "uint16_t wstrrchr(WSHDR *str, uint32_t rstart, uint32_t character)" -NSG = "??,B5,??,E0,??,68,??,00,??,5B,??,42,??,D1,??,1C,??,BD,??,39,??,04,??,0C,??,29,??,D1,??,48,??,BD" +decl = "short wstrrchr(WSHDR *str, uint32_t rstart, uint32_t character)" +ALL = "??,B5,??,E0,??,68,??,00,??,5B,??,42,??,D1,??,1C,??,BD,??,39,??,04,??,0C,??,29,??,D1,??,48,??,BD" [1DE] decl = "int EDIT_SetTextToEditControl(void *gui, int n, const WSHDR *value)" @@ -2756,14 +2907,14 @@ NSG = "??,B5,??,28,??,D0,??,28,??,D0,??,09,??,3A,??,3A,??,D1,??,20,??,BD,??,46,? [1E2] decl = "int ws_2utf8(const WSHDR *source, char *destination, int *new_length, uint32_t size)" -NSG = """ +ALL = """ ??,B5,??,22,??,46,??,68,??,25,??,88,??,24,??,46,??,E0,??,2A,??,D2,??,1C,??,42,??,D2,??,1C,??,55,??,1C,??,E0, ??,??,??,02,??,42,??,D2,??,1C,??,42,??,D2,??,09,??,27,??,43,??,55,??,1C,??,E0 """ [1E3] decl = "int utf8_2ws(WSHDR *destination, const char *source, uint32_t size)" -NSG = """ +ALL = """ ??,B5,??,22,??,46,??,B0,??,9A,??,24,??,23,??,04,??,0C,??,46,??,E0,??,8A,??,3A,??,42,??,DD,??,1C,??,04,??,0C, ??,1C,??,1C,??,5D,??,06,??,D4,??,34,??,04,??,0C,??,68,??,00,??,53,??,E0 """ @@ -2829,13 +2980,16 @@ NSG = "00,23,[??,B5,??,1C,??,??,??,1C,??,18,??,29,??,B0,??,??,??,D8,??,??,??,??, [1F0] decl = "int ExplorerCopyFile(const WSHDR *from, const WSHDR *to, int overwrite, char transfer_id, uint32_t *errp)" -NSG = "" +decl_SG = "int ExplorerCopyFile(const char *from, const char *to, int overwrite, char transfer_id, uint32_t *errp)" +NSG = "FF B5 87 B0 07 1C 00 20 02 90 00 24 1C 20 ?? 9E ?? ?? ?? ?? 06 90 00 28 ?? D0 + 1" ELKA = "FF4D2DE910D04DE20080A0E10000A0E3" +SG = "FF4D2DE910D04DE20080A0E10000A0E3" [1F1] -decl = "int ExplorerSetTransferState(char transfer_id, int state)" -NSG = "" +decl = "void ExplorerSetTransferState(char transfer_id, int state)" +NSG = "70 B5 0E 4C 0E 1C 05 1C 20 1C ?? ?? ?? ?? E8 00 21 1D 40 18 86 71 20 1C ?? ?? ?? ?? 70 BD + 1" ELKA = "70402DE958409FE50050A0E10400A0E1" +SG = "70402DE958409FE50050A0E10400A0E1" [1F2] decl = "int Devmenu_Config_IsCheckboxOff(int checkbox_id)" @@ -2854,7 +3008,7 @@ NSG = "*(??????A86F481402??????A86F741010) + 1" [1F5] decl = "int sscanf(const char *s, const char *format, ...)" -NSG = "0FB400B589B00090" +ALL = "0FB400B589B00090" [1F6] decl = "IMGHDR *GetPitAdrBy0xE200Symbol(int symbol)" @@ -2930,7 +3084,7 @@ NSG = "??B5041C0420069D2070" [206] decl = "void srand(uint32_t seed)" -NSG = "30B4??4A172111603621" +ALL = "30B4??4A172111603621" [207] decl = "void DrawScrollString(WSHDR *text, int x1, int y1, int x2, int y2, int xdisp, int font, int text_flags, const char *pen, const char *brush)" @@ -2987,23 +3141,75 @@ NSG = "&(04D000220021??48 + 6)" [212] decl = "int CardExplGetCurItem(void *csm)" -NSG = "" +NSG = """ +70 B5 06 1C 00 25 ?? F? ?? F? 04 1C ?? D0 30 1C ?? F? ?? F? 00 28 ?? D0 01 28 ?? D0 02 28 ?? D1 +20 1C ?? F? ?? E? 70 BD 20 1C ?? F? ?? E? 05 1C 28 1C 70 BD +""" +ELKA = """ +70 40 2D E9 00 60 A0 E1 00 50 A0 E3 ?? ?? ?? EB 00 40 B0 E1 ?? ?? ?? 0A 06 00 A0 E1 ?? ?? ?? EB +00 00 50 E3 01 00 50 13 ?? ?? ?? 0A 02 00 50 E3 04 00 A0 01 70 40 B? 08 ?? ?? ?? 0A ?? ?? ?? EA +04 00 A0 E1 ?? ?? ?? F? 00 50 A0 E1 05 00 A0 E1 70 80 BD E8 +""" +SG = """ +38 40 2D E9 00 50 A0 E1 ?? ?? ?? EB 00 00 50 E3 ?? ?? ?? 0A 76 10 D5 E5 00 00 51 E3 01 00 51 13 +38 40 B? 08 ?? ?? ?? 0A +""" [213] decl = "void CardExplGetFName(void *csm, int index, WSHDR *filename)" -NSG = "" +NSG = [ + # C81 reaches the filename helper through an ARM import thunk. + """ + 70 B5 04 1C 16 1C ?? ?? ?? ?? 05 1C 20 1C ?? ?? ?? ?? FF 23 25 33 58 43 E1 6C 32 1C 40 18 + FF 30 01 30 80 8A 29 1C + _blf(00 C0 9F E5 1C FF 2F E1 25 41 2A A0) + 00 28 ?? D0 20 1C ?? ?? ?? ?? 70 BD + """, + # S68, S75, and SL75 call the filename-copying helper directly. + """ + 70 B5 04 1C 16 1C ?? ?? ?? ?? 05 1C 20 1C ?? ?? ?? ?? FF 23 25 33 58 43 E1 6C 32 1C 40 18 + FF 30 01 30 80 8A 29 1C + _blf( + F0 B5 FF B0 0E 1C 05 1C 94 B0 17 1C 80 22 4B A9 46 A8 ?? ?? ?? ?? 04 1C 01 A8 80 22 06 A9 + ?? ?? ?? ?? ?? 90 31 1C 28 1C ?? 94 8B AA ?? ?? ?? ?? 04 1C 03 D1 38 1C 8B 99 ?? ?? ?? ?? + 7F B0 14 B0 20 1C F0 BD + ) + 00 28 ?? D0 20 1C ?? ?? ?? ?? 70 BD + """, +] +ELKA = """ +70 40 2D E9 02 60 A0 E1 01 50 A0 E1 00 40 A0 E1 ?? ?? ?? EB 00 00 45 E0 00 58 A0 E1 25 58 A0 E1 +04 00 A0 E1 ?? ?? ?? EB 49 10 A0 E3 91 00 00 E0 4C 10 94 E5 06 20 A0 E1 00 01 81 E0 40 0F 80 E2 +B4 01 D0 E1 05 10 A0 E1 +_blf( + F0 40 2D E9 93 DF 4D E2 02 70 A0 E1 01 60 A0 E1 00 50 A0 E1 46 0F 8D E2 4B 1F 8D E2 80 20 A0 E3 + ?? ?? ?? ?? 00 40 A0 E1 04 00 8D E2 80 20 A0 E3 18 10 8D E2 ?? ?? ?? ?? ?? ?? ?? ?? 05 00 A0 E1 + ?? ?? ?? ?? 8B 2F 8D E2 06 10 A0 E1 ?? ?? ?? EB 00 40 B0 E1 07 00 A0 01 2C 12 9D 05 +) +00 00 50 E3 04 00 A0 11 70 40 B? 18 ?? ?? ?? 1A 70 80 BD E8 +""" +SG = """ +10 40 2D E9 00 40 A0 E1 B4 05 D0 E1 00 00 41 E0 00 18 A0 E1 21 18 A0 E1 B8 04 D4 E1 +_blf( + F0 40 2D E9 93 DF 4D E2 02 70 A0 E1 01 60 A0 E1 00 50 A0 E1 46 0F 8D E2 4B 1F 8D E2 80 20 A0 E3 + ?? ?? ?? ?? 00 40 A0 E1 04 00 8D E2 80 20 A0 E3 18 10 8D E2 ?? ?? ?? ?? ?? ?? ?? ?? 05 00 A0 E1 + ?? ?? ?? ?? 8B 2F 8D E2 06 10 A0 E1 ?? ?? ?? EB 00 40 B0 E1 07 00 A0 01 2C 12 9D 05 +) +00 00 50 E3 04 00 A0 11 10 40 B? 18 ?? ?? ?? 1A 10 80 BD E8 +""" [214] decl = "void wstrcpybypos(WSHDR *destination, WSHDR *source, int from, int num)" -NSG = "??,B5,??,1C,??,1C,??,??,??,??,??,42,??,D2,??,1C,??,??,??,??,??,1C,??,1C,??,1C,??,??,??,??,??,BD" +ALL = "??,B5,??,1C,??,1C,??,??,??,??,??,42,??,D2,??,1C,??,??,??,??,??,1C,??,1C,??,1C,??,??,??,??,??,BD" [215] decl = "void wsRemoveChars(WSHDR *destination, int position, int length)" NSG = "??,B5,??,28,??,D0,??,68,??,88,??,42,??,D3,??,2A,??,D0,??,29,??,D0,??,??,??,??,??,BD" +SG = "80,B5,00,28,07,D0,03,68,1B,88,8B,42,03,D3,00,2A,01,D0,??,??,??,??,80,BD,+1" [216] decl = "void wstrcatprintf(WSHDR *s, const char *format, ...)" -NSG = """ +ALL = """ ??,B4,??,B5,??,B0,??,B0,??,1C,??,22,??,32,??,46,??,A9,??,??,??,??,??,1C,??,98,??,??,??,??,??,1C,??,1C,??,99, ??,??,??,??,??,A8,??,90,??,1C,??,??,??,??,??,1C,??,1C,??,1C,??,AB,??,??,??,FC,??,B0,??,B0,??,BC,??,BC,??,B0, ??,47 @@ -3112,7 +3318,7 @@ NSG = """ [229] decl = "void longjmp(jmp_buf env, int val)" -NSG = """ +ALL = """ ??,??,??,E2,??,??,??,E1,??,??,??,E5,??,??,??,EB,??,??,??,E9,??,??,??,EB,??,??,??,E1,??,??,??,03,??,??,??,E9, ??,??,??,E9,??,??,??,E1 """ @@ -3142,17 +3348,25 @@ ELKA = "??B5BDB0061C22A8" decl = "int OpenExplorer(NativeExplorerData *data)" NSG = """ 10 B5 FF B0 FF B0 04 1C FA B0 ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? 7F B0 7F B0 7A B0 10 BD -10 B5 FF B0 FF B0 04 1C FA B0 + 0x24 +10 B5 FF B0 FF B0 04 1C FA B0 +""" +ELKA = """ +10 40 2D E9 5E DE 4D E2 00 40 A0 E1 0D 00 A0 E1 5E 1E A0 E3 ?? ?? ?? ?? 04 10 A0 E1 0D 00 A0 E1 +?? ?? ?? ?? 5E DE 8D E2 10 80 BD E8 10 40 2D E9 5E DE 4D E2 +""" +SG = """ +10 40 2D E9 48 DF 4D E2 00 40 A0 E1 04 00 8D E2 47 1F A0 E3 ?? ?? ?? EB ?? ?? ?? EB 01 00 70 E2 +00 00 A0 33 ?? 0? 8? E5 04 00 8D E2 04 10 A0 E1 ?? ?? ?? EB 48 DF 8D E2 """ -ELKA = "10402DE95EDE4DE20040A0E10D00A0E15E1EA0E3????????0410A0E10D00A0E1????????5EDE8DE21080BDE808402DE90030A0E1" [22F] decl = "TDateTimeSettings *RamDateTimeSettings(void)" NSG = "*(50BF0000????????01000080 + 4)" +SG = "&(??4800797047??4980B5087100F0????80BD)" [230] decl = "int GetTimeZoneShift(const TDate *date, const TTime *time, int timezone_id)" -NSG = "38B5151C0124002A" +ALL = "38B5151C0124002A" [231] decl = "void *RamActiveAppointment()" @@ -3191,6 +3405,7 @@ NSG = "??,B5,??,??,??,??,??,??,??,??,01,1C,01,20,??,??,??,??,00,28,01,D0,??,??,? [239] decl = "int EEFullDeleteBlock(uint32_t block, int cepid, int msg)" NSG = "??,??,??,E9,??,??,??,E3,??,??,??,05,??,??,??,E1,??,??,??,E1,??,??,??,E1,??,??,??,E2" +SG = "7C402DE90150A0E104108DE20260A0E10040A0E1????????000050E30900A013????????FFCC45E2FFC05CE20040E003????????0618A0E1" [23A] decl = "int EEFullCreateBlock(uint32_t block, int size, int version, int cepid, int msg)" @@ -3198,6 +3413,7 @@ NSG = """ ??,??,??,E9,??,??,??,E3,??,??,??,05,??,??,??,E2,??,??,??,E1,??,??,??,E1,??,??,??,E1,??,??,??,E1 ,??,??,??, E1,??,??,??,E2 """ +SG = "FF452DE914D04DE201A0A0E110108DE2??6?9?E50050A0E10340A0E1????????000050E30900A013??????????7?9FE5??8?1FE5??1?9?E5" [23B] decl = "void DisableIconBar(int disable)" @@ -3206,7 +3422,10 @@ ELKA = "??,48,??,B5,??,68,??,29,??,D0,??,68,??,8B,??,07,??,D4,??,68,??,68,??,47, [23C] decl = "int SetCurrentGPRSProfile(int profile_id)" -NSG = "" +SG = [ + "0E402DE9????????????????0030A0E3B000C1E10C008DE80430A0E30020A0E3", + "0E402DE9????????0030A0E3B000C1E100308DE504308DE50430A0E3????????0020A0E3", +] [23D] decl = "void MD5_Init(MD5_CTX *c)" @@ -3320,6 +3539,10 @@ NSG = [ decl = "int StartNativeExplorer(NativeExplorerData *data)" NSG = "10 BD 10 B5 FF B0 FF B0 + 3" ELKA = "10 80 BD E8 10 40 2D E9 5E DE 4D E2 + 4" +SG = """ +10 40 2D E9 48 DF 4D E2 00 40 A0 E1 04 00 8D E2 47 1F A0 E3 ?? ?? ?? EB 01 00 A0 E3 ?? 0? 8? E5 +04 00 8D E2 04 10 A0 E1 ?? ?? ?? EB 48 DF 8D E2 +""" [255] decl = "void GUI_SetUserPointer(void *gui, void *user_pointer)" @@ -3558,56 +3781,82 @@ ELKA = """ """ [284] -decl = "char IsGPRSAvailable()" -NSG = "9A 48 08 38 80 78 70 47 + 1" +decl = "char IsGPRSAvailable(void)" +ALL = "??,48,08,38,80,78,70,47,??,48,08,38,80,79,70,47,+1" ELKA = "40 78 70 47 ?? 48 80 78 70 47 + 5" [285] -decl = "char IsEDGEAvailable()" -NSG = "9A 48 08 38 80 78 70 47 + 9" +decl = "char IsEDGEAvailable(void)" +ALL = false +NSG = "?? 48 08 38 00 78 70 47 ?? 48 08 38 40 78 70 47 ?? 48 08 38 80 78 70 47 ?? 48 08 38 80 79 70 47 + 19" ELKA = "9C 48 81 78 01 29 + 1" [286] -decl = "int GetSMSState()" +decl = "int GetSMSState(void)" NSG = "?? 48 00 68 00 28 00 D0 D4 E7 + 1" +SG = false # SG/X75 have no compatible no-argument SMS-state wrapper. [287] -decl = "int BT_GetLocVisibility()" +decl = "int BT_GetLocVisibility(void)" NSG = "F8 B5 89 4C ?? ?? ?? ?? 00 21 ?? ?? ?? ?? FF 27 01 37 A0 42 + 1" ELKA = "FE B5 ?? ?? ?? ?? 00 21 ?? ?? ?? ?? 73 49 FF 27 01 37 01 26 88 42 + 1" +SG = false # The historical S65 address is GetPeripheryState(int, int); no compatible wrapper exists. [288] -decl = "int Audio_GetCurrAudioPath()" -NSG = "38 B5 ?? ?? ?? FD 04 1C + 1" +decl = "int Audio_GetCurrAudioPath(void)" +NSG = """ +38 B5 ?? ?? ?? F? 04 1C ?? 48 00 78 06 28 ?? D1 FF 21 ?? 4D 01 31 23 1C 28 1C +LDR[41 75 64 69 6F 3A 47 65 74 43 75 72 72 41 75 64 69 6F 50 61 74 68 28 29 3A 25 58 68 00] + 1 +""" ELKA = "BC B5 ?? ?? ?? ?? 04 1C 79 48 00 78 06 28 13 D1 + 1" +SG = false # The historical CF75 address is a GBS message handler; no compatible getter exists. [289] decl = "int isDecryption(void)" -NSG = "?? 48 80 B5 01 78 01 29 ?? ?? ?? ?? 01 28 + 1" +ALL = "?? 48 80 B5 01 78 01 29 ?? ?? ?? ?? 01 28 + 1" [28A] -decl = "void *RamIsFileCache()" +decl = "void *RamIsFileCache(void)" NSG = "&(??,04,??,14,??,AB,??,8A,??,42,??,DB,??,8A,??,49,??,80,+0xE)" +SG = [ + """ +&(?? 48 00 88 70 47 B0 B5 ?? 48 ?? 4D 00 68 ?? 4C 00 28 ?? D0 20 88 C0 07 ?? D4 ?? 25 ?? ?? 28 04 00 0C B0 BD +?? ?? ?? ?? 01 04 09 0C 28 1C 08 29 ?? 4A 28 D0 0A DC 08 29 F3 D2 02 A3 5B 5C 5B 00 9F 44 00 00 +21 21 21 21 21 21 21 21 ?? 4B 65 29 1C D0 0B DC 09 29 16 D0 0A 29 14 D0 0B 29 12 D0 64 29 DE D1 +21 88 C9 07 DB D5 18 E0 ?? 4D 01 35 66 29 11 D0 67 29 14 D0 69 29 D2 D1 21 88 C9 07 CF D5 +50 88 B0 BD 48 00 10 5A B0 BD 20 88 C0 07 05 D5 ?? 48 01 38 B0 BD 20 88 C0 07 01 D5 18 1C B0 BD +28 1C B0 BD 70 B5 08 22) +""", + "&(?? 48 00 88 70 47 B0 B5 ?? 48 ?? 4D 00 68 ?? 4C 00 28)", +] [28B] -decl = "int *RamTotalHeapSize()" +decl = "int *RamTotalHeapSize(void)" NSG = "&(04,39,??,??,08,A9,??,??) + C" +SG = "&(?? ?? 9F E5 06 00 00 EA ?? ?? 9F E5 04 00 00 EA ?? ?? 1F E5 02 00 00 EA 01 00 A0 E3 1E FF 2F E1)" [28C] -decl = "int *RamTemporaryHeapSize()" +decl = "int *RamTemporaryHeapSize(void)" NSG = "&(04,39,??,??,08,A9,??,??) + 7C" +SG = """ +&(?? ?? 1F E5 1C 30 8D E2 00 00 84 E5 28 00 8D E2 20 20 8D E2 24 10 8D E2 0F 00 8D E9 +2C 30 8D E2 00 30 8D E5 30 30 8D E2 18 20 8D E2 34 10 8D E2 ?? ?? 9F E5 ?? ?? ?? EB) + 8 +""" [28D] -decl = "const char *RamBluetoothDeviceName()" +decl = "const char *RamBluetoothDeviceName(void)" NSG = "&(??,48,??,49,??,88,??,42,??,D0,??,??,??,??,00,20)+8" +SG = false # Some firmwares have an internal BT-name buffer, but the public object is not platform-wide. [28E] -decl = "const char *RamActiveGPRSProfileName()" +decl = "const char *RamActiveGPRSProfileName(void)" NSG = "&(??,49,??,1C,??,??,??,??,??,1C,??,D1,??,22)" +SG = false # SG/X75 load profile records into caller-owned temporary buffers. [28F] -decl = "char *RamIsNumberTyping()" -NSG = "" +decl = "char *RamIsNumberTyping(void)" +NSG = "&(?? 48 2C 30 00 79 70 47) + 30" +SG = false # SG/X75 contain no compatible state getter or historical RAM entry. [290] decl = "char *RamCallState()" @@ -3779,6 +4028,10 @@ ELKA = """ ??,22,??,20,??,??,??,??,??,E0,??,DF,??,1C,??,1C,??,22,??,20,??,??,??,??,??,48,??,60,??,60,??,60,??,60,??,1C, ??,BD,+1 """ +SG = """ +10 B5 10 20 ?? F? ?? ?? 04 1C ?? D1 02 DF 01 20 ?? 49 ?? 4A ?? F? ?? ?? 00 20 20 60 ?? 49 60 60 A? 60 E0 60 +20 1C 10 BD + 1 +""" [2B4] decl = "int FreeNativeAbData(NativeAbData *data)" @@ -3787,32 +4040,40 @@ NSG = """ ??,??,??,E3,??,??,??,E8 """ ELKA = "??,B5,??,1C,??,??,??,??,??,28,??,D0,??,1C,??,??,??,??,??,1C,??,??,??,??,??,20,??,BD,??,20,??,BD,+1" +SG = "??,B5,??,1C,??,??,??,??,??,28,??,D0,??,1C,??,??,??,??,??,1C,??,??,??,??,??,20,??,BD,??,20,??,BD,+1" [2B5] decl = "int GetNativeAbDataType(NativeAbData *data, int index)" NSG = "??,??,??,E9,??,??,??,E3,??,??,??,EB,??,??,??,E3,??,??,??,15,??,??,??,12,??,??,??,E1,??,??,??,E8" ELKA = "??,B5,??,24,??,??,??,??,??,28,??,D0,??,68,??,40,??,1C,??,BD,+1" +SG = "??,B5,??,24,??,??,??,??,??,28,??,D0,??,68,??,40,??,1C,??,BD,+1" [2B6] -decl = "WSHDR *GetNumFromNativeAbData(NativeAbData *data, int type, int unk0)" +decl = "WSHDR *GetNumFromNativeAbData(NativeAbData *data, int type, int index)" NSG = """ ??,??,??,E9,??,??,??,E3,??,??,??,E5,??,??,??,E2,??,??,??,E5,??,??,??,E3,??,??,??,E3,??,??,??,EB,??,??,??,E1, ??,??,??,E5,??,??,??,1A """ ELKA = "??,B5,??,AB,??,26,??,72,??,1C,??,AA,??,92,??,1C,??,24+1" +SG = """ +FE B5 00 AB ?? 1C 09 25 ?? 72 11 1C 02 AA ?? 92 0A 1C 2B 1C 00 24 31 1C ?? F7 ?? FE 05 1C 6E 2E ?? D9 +00 20 FE BD + 1 +""" [2B7] decl = "int GetNativeAbDataStatus(NativeAbData *data, int index)" NSG = "??,??,??,E9,??,??,??,E3,??,??,??,EB,??,??,??,E3,??,??,??,15,??,??,??,11,??,??,??,11,??,??,??,E1,??,??,??,E8" ELKA = "??,B5,??,24,??,??,??,??,??,28,??,D0,??,68,??,04,??,0E,??,1C,??,BD,+1" +SG = "??,B5,??,24,??,??,??,??,??,28,??,D0,??,68,??,04,??,0E,??,1C,??,BD,+1" [2B8] -decl = "int SetNumToNativeAbData(NativeAbData *data, int unk, const WSHDR *num)" +decl = "int SetNumToNativeAbData(NativeAbData *data, int type, const WSHDR *num)" NSG = """ ??,??,??,E9,??,??,??,E1,??,??,??,E3,??,??,??,E1,??,??,??,E1,??,??,??,EB,??,??,??,E1,??,??,??,E3,??,??,??,E3, ??,??,??,8A,??,??,??,E3,??,??,??,1A,??,??,??,E3,??,??,??,EA,??,??,??,E3,??,??,??,E3,??,??,??,E8,??,??,??,E8 """ ELKA = "??,B5,??,1C,??,1C,??,20,??,??,??,??,??,1C,??,25,??,2E,??,D8,??,2C,??,D1,??,25,??,E0,+1" +SG = "??,B5,??,1C,??,1C,??,20,??,??,??,??,??,1C,??,25,??,2E,??,D8,??,2C,??,D1,??,25,??,E0,+1" [2B9] decl = "int OpenNativeAddressbook(int type, int unk1, int unk2, NativeAbData *data)" @@ -3825,6 +4086,17 @@ ELKA = """ ??,B5,??,1C,??,21,??,1C,??,22,??,92,??,91,??,91,??,1C,??,1C,??,1C,??,1C,_blf(??,B5,??,B0,??,1C,??,1C,??,28, ??,9C,??,D2,??,A3,??,5C,??,00,??,44),??,BD,+1 """ +SG = [ + # S65/SL65 expose the four-argument implementation directly. +""" +F0,B5,17,1C,0E,1C,1D,1C,04,1C,0C,28,A3,B0,??,D2,01,A3,1B,5C,5B,00,9F,44,+1 +""", + # Later SG/X75 firmwares expose a wrapper around the six-argument implementation. +""" +BC,B5,15,1C,00,22,00,92,01,92,2A,1C, +_blf(FF,B5,??,B0,1D,1C,04,1C,0C,28,??,9E,??,9F,??,D2,01,A3,1B,5C,5B,00,9F,44),BC,BD,+1 +""", +] [2BA] decl = "void SetHeaderIcon(void *header, const int *icons, const void *malloc_fn, const void *mfree_fn)" @@ -3885,52 +4157,52 @@ NSG = "&(??,48,??,47,??,20,??,30,??,04,??,0C,??,28,??,D3,??,47)" ELKA = "&(??,48,??,47,??,B5,??,B0,??,1C,??,D1,??,20)" [2C6] -decl = "int GetSecondsFromDateTime(int *seconds, const TDate *date, const TTime *time, const TDate *epoch)" -NSG = "F8,B5,1F,1C,16,1C,0D,1C,04,1C,00,28,??,D0,00,2D,??,D0" +decl = "int GetSecondsFromDateTime(uint32_t *seconds, const TDate *date, const TTime *time, const TDate *epoch)" +ALL = "F8,B5,1F,1C,16,1C,0D,1C,04,1C,00,28,??,D0,00,2D,??,D0" [2C7] -decl = "int GetSecondsFromDateTimeSince1997(int *seconds, const TDate *date, const TTime *time)" -NSG = "7C,B5,0D,1C,04,1C,16,1C,01,23,01,22,68,46,??,49,??,??,??,??,32,1C,29,1C,20,1C,6B,46,??,??,??,??,7C,BD,7C,B5,0D,1C,04,1C,16,1C,01,23,01,22,68,46" +decl = "int GetSecondsFromDateTimeSince1997(uint32_t *seconds, const TDate *date, const TTime *time)" +ALL = "7C,B5,0D,1C,04,1C,16,1C,01,23,01,22,68,46,??,49,??,??,??,??,32,1C,29,1C,20,1C,6B,46,??,??,??,??,7C,BD,7C,B5,0D,1C,04,1C,16,1C,01,23,01,22,68,46" [2C8] decl = "int GetSecondsFromTime(const TTime *time)" -NSG = "01,78,3C,23,42,78,59,43,80,78,89,18" +ALL = "01,78,3C,23,42,78,59,43,80,78,89,18 + 1" [2C9] -decl = "int GetDateTimeFromSeconds(const int *seconds, TDate *date, TTime *time, const TDate *epoch)" -NSG = "F8,B5,1E,1C,15,1C,0C,1C,00,28,??,D0,00,2C,??,D0" +decl = "int GetDateTimeFromSeconds(const uint32_t *seconds, TDate *date, TTime *time, const TDate *epoch)" +ALL = "F8,B5,1E,1C,15,1C,0C,1C,00,28,??,D0,00,2C,??,D0" [2CA] -decl = "int GetDateTimeFromSecondsSince1997(const int *seconds, TDate *date, TTime *time)" -NSG = "7C,B5,0D,1C,04,1C,16,1C,01,23,01,22,68,46,??,49,??,??,??,??,32,1C,29,1C,20,1C,6B,46,??,??,??,??,7C,BD,7C,B5,0D,1C,04,1C,16,1C,01,23,01,22,68,46 + 0x22" +decl = "int GetDateTimeFromSecondsSince1997(const uint32_t *seconds, TDate *date, TTime *time)" +ALL = "7C,B5,0D,1C,04,1C,16,1C,01,23,01,22,68,46,??,49,??,??,??,??,32,1C,29,1C,20,1C,6B,46,??,??,??,??,7C,BD,7C,B5,0D,1C,04,1C,16,1C,01,23,01,22,68,46 + 0x22" [2CB] -decl = "void GetTimeFromSeconds(TTime *time, int seconds)" -NSG = "10,B5,04,1C,00,20,60,60,3C,20" +decl = "void GetTimeFromSeconds(TTime *time, uint32_t seconds)" +ALL = "10,B5,04,1C,00,20,60,60,3C,20" [2CC] decl = "void InitDate(TDate *date, unsigned long year, uint8_t month, uint8_t day)" -NSG = "01,60,02,71,43,71,70,47,F8,B5,07,1C,0E,1C,14,1C,1D,1C + 1" +ALL = "01,60,02,71,43,71,70,47,F8,B5,07,1C,0E,1C,14,1C,1D,1C + 1" [2CD] decl = "void InitTime(TTime *time, uint8_t hour, uint8_t min, uint8_t sec, unsigned long millisec)" -NSG = "10,B5,02,9C,01,70,42,70,83,70,44,60,10,BD,F8,B5,0D,1C,16,1C,84,46,1F,1C" +ALL = "10,B5,02,9C,01,70,42,70,83,70,44,60,10,BD,F8,B5,0D,1C,16,1C,84,46,1F,1C" [2CE] decl = "int CmpDates(const TDate *date1, const TDate *date2)" -NSG = "02,68,0B,68,9A,42,??,D1,02,79,0B,79,9A,42,??,D1" +ALL = "02,68,0B,68,9A,42,??,D1,02,79,0B,79,9A,42,??,D1 + 1" [2CF] decl = "int CmpTimes(const TTime *time1, const TTime *time2)" -NSG = "02,78,0B,78,9A,42,??,D1,42,78,4B,78,9A,42,??,D1" +ALL = "02,78,0B,78,9A,42,??,D1,42,78,4B,78,9A,42,??,D1 + 1" [2D0] decl = "int GetDaysFromMonth(const TDate *date)" -NSG = "10,B5,04,1C,00,79,02,28,??,D1,20,1C" +ALL = "10,B5,04,1C,00,79,02,28,??,D1,20,1C" [2D1] decl = "int IsLeapYear(const TDate *date)" -NSG = "10,B5,04,68,A0,07,??,D1,21,1C,19,20" +ALL = "10,B5,04,68,A0,07,??,D1,21,1C,19,20" [2D2] decl = "void StartNativeBrowserCore()" @@ -3941,6 +4213,7 @@ SG = "70 B5 ?? F0 ?? ?? 40 68 00 28 72 D1 03 20 ?? F0 ?? ?? + 1" decl = "int GetFilledNAbDataCount(NativeAbData *data)" NSG = "??,??,??,E1,??,??,??,E3,??,??,??,03,??,??,??,01,??,??,??,E5,??,??,??,EA,??,??,??,E2,??,??,??,E3" ELKA = "??,1C,??,20,??,29,??,D1,??,47,??,68,??,E0,??,30,??,04,??,0C,??,E7,+1" +SG = "??,1C,??,20,??,29,??,D1,??,47,??,68,??,E0,??,30,??,04,??,0C,??,E7,+1" [2D4] decl = "PKT_NUM *GetDataFromNAbData(NativeAbData *data, int index)" @@ -3949,10 +4222,11 @@ NSG = """ ??,E3,??,??,??,15,??,??,??,E1,??,??,??,E8 """ ELKA = "??,B5,??,24,??,??,??,??,??,28,??,D0,??,68,??,1C,??,BD,+1" +SG = "??,B5,??,24,??,??,??,??,??,28,??,D0,??,68,??,1C,??,BD,+1" [2D5] decl = "void UnpackNumPkt(const PKT_NUM *pkt, char *buf, int maxlen)" -NSG = "??,21,??,18,??,54,??,E7,??,23,??,E7,+9" +ALL = "??,21,??,18,??,54,??,E7,??,23,??,E7,+9" [2D6] decl = "void *TViewGetGUI(const void *malloc_fn, const void *mfree_fn)" @@ -3982,7 +4256,14 @@ ELKA = "" [2DB] decl = "void MediaSendCSM_Open(const WSHDR *file, const WSHDR *path)" NSG = "??,2A,??,D0,??,2A,??,D1,??,E7,??,E7,??,20,??,47,??,B5,??,1C,??,1C,??,20,??,B0,+0x10" -ELKA = "30402DE90040A0E18000A0E3" +ELKA = """ +30 40 2D E9 00 40 A0 E1 80 00 A0 E3 44 D0 4D E2 01 50 A0 E1 ?? ?? ?? ?? 34 00 8D E5 +80 00 A0 E3 ?? ?? ?? ?? 38 00 8D E5 00 00 A0 E3 40 00 CD E5 +""" +SG = """ +30 40 2D E9 00 40 A0 E1 80 00 A0 E3 3C D0 4D E2 01 50 A0 E1 ?? ?? ?? [1111101.] ?? 0? 8? E5 +80 00 A0 E3 ?? ?? ?? [1111101.] 04 10 A0 E1 ?? 0? 8? E5 ?? ?? ?? [1111101.] 05 10 A0 E1 ?? 0? 9? E5 +""" [2DC] decl = "void SaveMaxIllumination(int level)" @@ -4014,12 +4295,16 @@ ELKA = """ ??,??,??,E9,??,??,??,E3,??,??,??,E1,??,??,??,0A,??,??,??,E1,??,??,??,FB,??,??,??,E3,??,??,??,0A,??,??,??,E1, ??,??,??,FB,??,??,??,E1,??,??,??,E1,??,??,??,E3 """ +SG = """ +F0 41 2D E9 ?? 7? A0 E3 00 40 B0 E1 ?? ?? ?? 0A 04 00 A0 E1 ?? ?? ?? [1111101.] ?? 0? 50 E3 ?? ?? ?? 0A +04 00 A0 E1 ?? ?? ?? [1111101.] 00 10 A0 E1 04 00 A0 E1 ?? 2? A0 E3 ?? ?? ?? [1111101.] +?? C? 40 E2 ?? C? 5C E2 00 60 A0 E1 ?? ?? ?? 0A 04 00 A0 E1 ?? ?? ?? [1111101.] +""" [2E2] -decl = "int wstrcmp(WSHDR *str1, WSHDR *str2)" -NSG = """ -80,B5,09,68,00,68,_blf(??,B5,??,1C,??,88,??,1C,??,88,??,42,??,D9,??,1C,??,04,??,0B,??,19,??,1C,??,1C,??,1C), -80,BD,+1 +decl = "int wstrcmp(const WSHDR *str1, const WSHDR *str2)" +ALL = """ +(80,B5,09,68,12,04,12,0C,00,68,??,??,??,??,80,BD,80,B5,09,68,00,68,??,??,??,??,80,BD) + 0x11 """ [2E3] @@ -4095,7 +4380,7 @@ decl = "int clearenv(void)" decl = "char **getBaseEnviron()" [2F7] -decl = "const char *dlerror()" +decl = "const char *dlerror(void)" [2F8] decl = "int dlclean_cache()" @@ -4122,394 +4407,441 @@ decl = "int BCFG_LoadConfig(const char *config_file, void *config, uint32_t size decl = "int BCFG_SaveConfig(const char *config_file, const void *config, uint32_t size)" [300] -decl = "int NU_Create_Task(NU_TASK *task, CHAR *name, void (*task_entry)(int, void *), unsigned long argc, void *argv, void *stack_address, unsigned long stack_size, OPTION priority, unsigned long time_slice, OPTION preempt, OPTION auto_start)" -NSG = """ +decl = "int NU_Create_Task(NU_TASK *task, CHAR *name, void (*task_entry)(unsigned long, void *), unsigned long argc, void *argv, void *stack_address, unsigned long stack_size, OPTION priority, unsigned long time_slice, OPTION preempt, OPTION auto_start)" +ALL = """ ??,??,??,E9,??,??,??,E2,??,??,??,E1,??,??,??,E1,??,??,??,E2,??,??,??,E1,??,??,??,E1,??,??,??,E8,??,??,??,E2, ??,??,??,E3,??,??,??,E8,??,??,??,15,??,??,??,15,??,??,??,11 """ [301] decl = "int NU_Delete_Task(NU_TASK *task)" -NSG = """ +ALL = """ ??,??,??,E1,??,??,??,0A,??,??,??,E5,??,??,??,E5,??,??,??,E1,??,??,??,0A,??,??,??,E3,??,??,??,E1,??,??,??,E5, ??,??,??,E3,??,??,??,13,??,??,??,01,??,??,??,0A,??,??,??,13,??,??,??,E1 """ [302] decl = "int NU_Reset_Task(NU_TASK *task, unsigned long argc, void *argv)" -NSG = "000050E30300000A0C3090E594C29FE5" +ALL = "000050E30300000A0C3090E5??C29FE5" [303] decl = "int NU_Terminate_Task(NU_TASK *task)" -NSG = "000050E30300000A0C1090E574229FE5" +ALL = "000050E30300000A0C3090E5??C29FE5 + 20" [304] decl = "int NU_Resume_Task(NU_TASK *task)" -NSG = "10402DE90040B0E10300000A0C0090E5" +ALL = "10402DE90040B0E10300000A0C0090E5" [305] decl = "int NU_Suspend_Task(NU_TASK *task)" -NSG = "0030B0E10300000A0C1090E530219FE5" +ALL = "10402DE90040B0E10300000A0C0090E5 + 48" [306] decl = "void NU_Relinquish(void)" -NSG = "08019FE5000090E5000050E31EFF2F01" +ALL = "????9FE5000090E5000050E31EFF2F010C0090E5????9FE5010050E1" [307] decl = "void NU_Sleep(unsigned long ticks)" -NSG = "000050E3E0109F150010911500005113" +ALL = "????9FE5000090E5000050E31EFF2F010C0090E5????9FE5010050E1 + 24" [308] decl = "OPTION NU_Change_Priority(NU_TASK *task, OPTION new_priority)" -NSG = "0C2090E5CC309FE5030052E10100A011" +ALL = "0C2090E5CC309FE5030052E10100A011" [309] decl = "OPTION NU_Change_Preemption(OPTION preempt)" -NSG = "BC109FE5B4209FE5001091E50C1091E5" +ALL = "BC109FE5B4209FE5001091E50C1091E5" [30A] decl = "unsigned long NU_Change_Time_Slice(NU_TASK *task, unsigned long time_slice)" -NSG = "0C2090E598309FE5030052E10100A011" +ALL = "0C2090E598309FE5030052E10100A011" [30B] decl = "unsigned long NU_Check_Stack(void)" NSG = "34021FE5000090E5000050E30030A0E3" +SG = "????1FE5000090E5000050E30030A0E3" [30C] decl = "NU_TASK *NU_Current_Task_Pointer(void)" NSG = "D8031FE5000090E5000050E30300000A" +SG = "88021FE5000090E5000050E30300000A0C1090E598221FE5020051E1" [30D] decl = "unsigned long NU_Established_Tasks(void)" NSG = "68039FE5000090E50880BDE808402DE9-8" +SG = "??029FE5000090E50880BDE808402DE9 - 8" [30E] decl = "int NU_Task_Information(NU_TASK *task, CHAR *name, DATA_ELEMENT *status, unsigned long *scheduled_count, OPTION *priority, OPTION *preempt, unsigned long *time_slice, void **stack_base, unsigned long *stack_size, unsigned long *minimum_stack)" NSG = "FF4D2DE918D04DE248B08DE2A8009FE5" +SG = "FF4D2DE918D04DE248A08DE2??009FE5" [30F] decl = "unsigned long NU_Task_Pointers(NU_TASK **pointer_list, unsigned long maximum_pointers)" NSG = "F8402DE90060A0E148039FE50170A0E1" +SG = "F8402DE90050A0E17C029FE50170A0E1006090E50600A0E1" [310] decl = "int NU_Create_Mailbox(NU_MAILBOX *mailbox, CHAR *name, OPTION suspend_type)" -NSG = "000050E30C30901504C19F150C005311" +ALL = "000050E30C30901504C19F150C005311" [311] decl = "int NU_Delete_Mailbox(NU_MAILBOX *mailbox)" -NSG = "000050E30300000A0C1090E5D4209FE5" +ALL = "000050E30300000A0C1090E5D4209FE5" [312] decl = "int NU_Reset_Mailbox(NU_MAILBOX *mailbox)" -NSG = "< 0xFFFFFFFF>" +NSG = "584F424D000050E30300000A0C1090E5??209FE5020051E1 + 4" +SG = false # The public MBSE wrapper is not linked. [313] decl = "int NU_Send_To_Mailbox(NU_MAILBOX *mailbox, void *message, unsigned long suspend)" -NSG = "70402DE90260A0E10150A0E10040B0E10300000A0C0090E5A8109FE5010050E1" +ALL = "70402DE90260A0E10150A0E10040B0E10300000A0C0090E5A8109FE5010050E1" [314] decl = "int NU_Broadcast_To_Mailbox(NU_MAILBOX *mailbox, void *message, unsigned long suspend)" -NSG = "< 0xFFFFFFFF>" +NSG = "584F424D000050E30300000A0C1090E5??209FE5020051E1 + 24" +SG = false # The public MBSE wrapper is not linked. [315] decl = "int NU_Receive_From_Mailbox(NU_MAILBOX *mailbox, void *message, unsigned long suspend)" -NSG = "70402DE90260A0E10150A0E10040B0E10300000A0C0090E5A8109FE5010050E1+64" +ALL = "70402DE90260A0E10150A0E10040B0E10300000A0C0090E5A8109FE5010050E1+64" +# Mailbox fact services are not linked on supported platforms. [316] decl = "unsigned long NU_Established_Mailboxes(void)" -NSG = "< 0xFFFFFFFF>" +ALL = false [317] decl = "int NU_Mailbox_Information(NU_MAILBOX *mailbox, CHAR *name, OPTION *suspend_type, OPTION *message_present, unsigned long *tasks_waiting, NU_TASK **first_task)" -NSG = "< 0xFFFFFFFF>" +ALL = false [318] decl = "unsigned long NU_Mailbox_Pointers(NU_MAILBOX **pointer_list, unsigned long maximum_pointers)" -NSG = "< 0xFFFFFFFF>" +ALL = false [319] decl = "int NU_Create_Queue(NU_QUEUE *queue, CHAR *name, void *start_address, unsigned long queue_size, OPTION message_type, unsigned long message_size, OPTION suspend_type)" -NSG = "FE402DE903C0A0E120308DE202E0A0E1" +ALL = "FE402DE903C0A0E120308DE202E0A0E1" [31A] decl = "int NU_Delete_Queue(NU_QUEUE *queue)" -NSG = "000050E30300000A0C1090E55C219FE5" +ALL = "000050E30300000A0C1090E55C219FE5" [31B] decl = "int NU_Reset_Queue(NU_QUEUE *queue)" -NSG = "< 0xFFFFFFFF>" +ALL = false # The public QUSE wrapper is not linked. [31C] decl = "int NU_Send_To_Front_Of_Queue(NU_QUEUE *queue, void *message, unsigned long size, unsigned long suspend)" -NSG = "< 0xFFFFFFFF>" +ALL = false # The public QUSE wrapper is not linked. [31D] decl = "int NU_Send_To_Queue(NU_QUEUE *queue, void *message, unsigned long size, unsigned long suspend)" -NSG = "F8402DE90370A0E10160A0E10050B0E10240A0E10300000A0C0095E52C119FE5" +ALL = "F8402DE90370A0E10160A0E10050B0E10240A0E10300000A0C0095E52C119FE5" [31E] decl = "int NU_Broadcast_To_Queue(NU_QUEUE *queue, void *message, unsigned long size, unsigned long suspend)" -NSG = "< 0xFFFFFFFF>" +ALL = false # The public QUSE wrapper is not linked. [31F] decl = "int NU_Receive_From_Queue(NU_QUEUE *queue, void *message, unsigned long size, unsigned long *actual_size, unsigned long suspend)" -NSG = "FC412DE920509DE50380A0E10170A0E10060B0E10240A0E10300000A0C0096E5" +ALL = "FC412DE920509DE50380A0E10170A0E10060B0E10240A0E10300000A0C0096E5" [320] decl = "unsigned long NU_Established_Queues(void)" NSG = "E8019FE5000090E50880BDE8F8402DE9-8" +SG = "80019FE5000090E50880BDE8F8402DE9 - 8" [321] decl = "int NU_Queue_Information(NU_QUEUE *queue, CHAR *name, void **start_address, unsigned long *queue_size, unsigned long *available, unsigned long *messages, OPTION *message_type, unsigned long *message_size, OPTION *suspend_type, unsigned long *tasks_waiting, NU_TASK **first_task)" NSG = "FF4D2DE90040A0E134019FE538709DE5" +SG = "FF4D2DE90040A0E100019FE538609DE5" [322] decl = "unsigned long NU_Queue_Pointers(NU_QUEUE **pointer_list, unsigned long maximum_pointers)" NSG = "F8402DE90060A0E1D8019FE50170A0E1" +SG = "F8402DE90050A0E170019FE50170A0E1" +# The Nucleus pipe component is not linked on supported platforms. [323] decl = "int NU_Create_Pipe(NU_PIPE *pipe, CHAR *name, void *start_address, unsigned long pipe_size, OPTION message_type, unsigned long message_size, OPTION suspend_type)" -NSG = "< 0xFFFFFFFF>" +ALL = false [324] decl = "int NU_Delete_Pipe(NU_PIPE *pipe)" -NSG = "< 0xFFFFFFFF>" +ALL = false [325] decl = "int NU_Reset_Pipe(NU_PIPE *pipe)" -NSG = "< 0xFFFFFFFF>" +ALL = false [326] decl = "int NU_Send_To_Front_Of_Pipe(NU_PIPE *pipe, void *message, unsigned long size, unsigned long suspend)" -NSG = "< 0xFFFFFFFF>" +ALL = false [327] decl = "int NU_Send_To_Pipe(NU_PIPE *pipe, void *message, unsigned long size, unsigned long suspend)" -NSG = "< 0xFFFFFFFF>" +ALL = false [328] decl = "int NU_Broadcast_To_Pipe(NU_PIPE *pipe, void *message, unsigned long size, unsigned long suspend)" -NSG = "< 0xFFFFFFFF>" +ALL = false [329] decl = "int NU_Receive_From_Pipe(NU_PIPE *pipe, void *message, unsigned long size, unsigned long *actual_size, unsigned long suspend)" -NSG = "< 0xFFFFFFFF>" +ALL = false [32A] decl = "unsigned long NU_Established_Pipes(void)" -NSG = "< 0xFFFFFFFF>" +ALL = false [32B] decl = "int NU_Pipe_Information(NU_PIPE *pipe, CHAR *name, void **start_address, unsigned long *pipe_size, unsigned long *available, unsigned long *messages, OPTION *message_type, unsigned long *message_size, OPTION *suspend_type, unsigned long *tasks_waiting, NU_TASK **first_task)" -NSG = "< 0xFFFFFFFF>" +ALL = false [32C] decl = "unsigned long NU_Pipe_Pointers(NU_PIPE **pointer_list, unsigned long maximum_pointers)" -NSG = "< 0xFFFFFFFF>" +ALL = false [32D] decl = "int NU_Create_Semaphore(NU_SEMAPHORE *semaphore, CHAR *name, unsigned long initial_count, OPTION suspend_type)" -NSG = "08402DE9000050E30CC09015B4E09F15" +ALL = "08402DE9000050E30CC09015B4E09F15" [32E] decl = "int NU_Delete_Semaphore(NU_SEMAPHORE *semaphore)" -NSG = "000050E30300000A0C1090E57C209FE5" +ALL = "000050E30300000A0C1090E57C209FE5" [32F] decl = "int NU_Reset_Semaphore(NU_SEMAPHORE *semaphore, unsigned long initial_count)" -NSG = "< 0xFFFFFFFF>" +NSG = false +ELKA = "000050E30300000A0C2090E50C309FE5030052E10200000A1400E0E31EFF2FE1414D4553" +SG = false [330] decl = "int NU_Obtain_Semaphore(NU_SEMAPHORE *semaphore, unsigned long suspend)" -NSG = "38402DE90150A0E10040B0E10300000A0C0090E554109FE5010050E10100000A" +ALL = "38402DE90150A0E10040B0E10300000A0C0090E554109FE5010050E10100000A" [331] decl = "int NU_Release_Semaphore(NU_SEMAPHORE *semaphore)" -NSG = "000050E30300000A0C1090E50C209FE5" +ALL = "000050E30300000A0C1090E50C209FE5" [332] decl = "unsigned long NU_Established_Semaphores(void)" -NSG = "< 0xFFFFFFFF>" +NSG = false +ELKA = """ +00 80 A0 E3 00 00 A0 E3 00 10 84 E0 10 10 D1 E5 01 00 80 E2 08 00 50 E3 01 10 C6 E4 F9 FF FF BA +1C 00 D4 E5 00 00 50 E3 0B 00 A0 03 06 00 A0 13 00 00 CA E5 18 00 94 E5 - 0x138 +""" +SG = false [333] decl = "int NU_Semaphore_Information(NU_SEMAPHORE *semaphore, CHAR *name, unsigned long *current_count, OPTION *suspend_type, unsigned long *tasks_waiting, NU_TASK **first_task)" -NSG = "< 0xFFFFFFFF>" +NSG = false +ELKA = """ +00 80 A0 E3 00 00 A0 E3 00 10 84 E0 10 10 D1 E5 01 00 80 E2 08 00 50 E3 01 10 C6 E4 F9 FF FF BA +1C 00 D4 E5 00 00 50 E3 0B 00 A0 03 06 00 A0 13 00 00 CA E5 18 00 94 E5 - 0x80 +""" +SG = false [334] decl = "unsigned long NU_Semaphore_Pointers(NU_SEMAPHORE **pointer_list, unsigned long maximum_pointers)" -NSG = "< 0xFFFFFFFF>" +NSG = false +ELKA = """ +00 80 A0 E3 00 00 A0 E3 00 10 84 E0 10 10 D1 E5 01 00 80 E2 08 00 50 E3 01 10 C6 E4 F9 FF FF BA +1C 00 D4 E5 00 00 50 E3 0B 00 A0 03 06 00 A0 13 00 00 CA E5 18 00 94 E5 - 0x124 +""" +SG = false [335] decl = "int NU_Create_Event_Group(NU_EVENT_GROUP *group, CHAR *name)" -NSG = "000050E30C209015EC309F1503005211" +ALL = "000050E30C209015EC309F1503005211" [336] decl = "int NU_Delete_Event_Group(NU_EVENT_GROUP *group)" -NSG = "000050E30300000A0C1090E5CC209FE5" +ALL = "000050E30300000A0C1090E5CC209FE5" [337] decl = "int NU_Set_Events(NU_EVENT_GROUP *group, unsigned long events, OPTION operation)" -NSG = "000050E30300000A0C3090E5ACC09FE5" +ALL = "000050E30300000A0C3090E5ACC09FE5" [338] decl = "int NU_Retrieve_Events(NU_EVENT_GROUP *group, unsigned long requested_flags, OPTION operation, unsigned long *retrieved_flags, unsigned long suspend)" -NSG = "FC412DE920509DE50180A0E10370A0E1" +ALL = "FC412DE920509DE50180A0E10370A0E1" +# Event-group fact services are not linked on supported platforms. [339] decl = "unsigned long NU_Established_Event_Groups(void)" -NSG = "< 0xFFFFFFFF>" +ALL = false [33A] decl = "int NU_Event_Group_Information(NU_EVENT_GROUP *group, CHAR *name, unsigned long *event_flags, unsigned long *tasks_waiting, NU_TASK **first_task)" -NSG = "< 0xFFFFFFFF>" +ALL = false [33B] decl = "unsigned long NU_Event_Group_Pointers(NU_EVENT_GROUP **pointer_list, unsigned long maximum_pointers)" -NSG = "< 0xFFFFFFFF>" +ALL = false [33C] decl = "unsigned long NU_Control_Signals(unsigned long signal_enable_mask)" -NSG = "0C2090E598309FE5030052E10100A011+18" +ALL = "0C2090E598309FE5030052E10100A011+18" [33D] decl = "unsigned long NU_Receive_Signals(void)" -NSG = "0C2090E598309FE5030052E10100A011+38" +ALL = "0C2090E598309FE5030052E10100A011+38" [33E] decl = "STATUS NU_Register_Signal_Handler(void (*signal_handler)(unsigned long))" -NSG = "0C2090E598309FE5030052E10100A011+58" +ALL = "0C2090E598309FE5030052E10100A011+58" [33F] decl = "STATUS NU_Send_Signals(NU_TASK *task, unsigned long signals)" -NSG = "0C2090E598309FE5030052E10100A011+84" +ALL = "0C2090E598309FE5030052E10100A011+84" [340] decl = "int NU_Create_Partition_Pool(NU_PARTITION_POOL *pool, CHAR *name, void *start_address, unsigned long pool_size, unsigned long partition_size, OPTION suspend_type)" -NSG = "7C402DE902C0A0E118209DE503E0A0E1" +ALL = "7C402DE902C0A0E118209DE503E0A0E1" [341] decl = "int NU_Delete_Partition_Pool(NU_PARTITION_POOL *pool)" -NSG = "000050E30300000A0C1090E5A4209FE5020051E1800A000A0F00E0E31EFF2FE1" +ALL = "000050E30300000A0C1090E5A4209FE5020051E1????????0F00E0E31EFF2FE1" [342] decl = "int NU_Allocate_Partition(NU_PARTITION_POOL *pool, void **return_pointer, unsigned long suspend)" -NSG = "70402DE90260A0E10150A0E10040B0E10300000A0C0090E578109FE5010050E1" +ALL = "70402DE90260A0E10150A0E10040B0E10300000A0C0090E578109FE5010050E1" [343] decl = "int NU_Deallocate_Partition(void *partition)" -NSG = "081050E2000050130420911500005213" +ALL = "081050E2000050130420911500005213" [344] decl = "unsigned long NU_Established_Partition_Pools(void)" NSG = "D0019FE5000090E50880BDE8F8402DE9-8" +SG = "68019FE5000090E50880BDE8F8402DE9 - 8" [345] decl = "int NU_Partition_Pool_Information(NU_PARTITION_POOL *pool, CHAR *name, void **start_address, unsigned long *pool_size, unsigned long *partition_size, unsigned long *available, unsigned long *allocated, OPTION *suspend_type, unsigned long *tasks_waiting, NU_TASK **first_task)" NSG = "FF4D2DE90040A0E11C019FE53C709DE5" +SG = "FF4D2DE90040A0E1E8009FE53C609DE5" [346] decl = "unsigned long NU_Partition_Pool_Pointers(NU_PARTITION_POOL **pointer_list, unsigned long maximum_pointers)" NSG = "F8402DE90060A0E1C0019FE50170A0E1" +SG = "F8402DE90050A0E158019FE50170A0E1" [347] decl = "int NU_Create_Memory_Pool(NU_MEMORY_POOL *pool, CHAR *name, void *start_address, unsigned long pool_size, unsigned long min_allocation, OPTION suspend_type)" -NSG = "FE402DE903E0A0E102C0A0E120209DE5" +ALL = "FE402DE903E0A0E102C0A0E120209DE5" [348] decl = "int NU_Delete_Memory_Pool(NU_MEMORY_POOL *pool)" -NSG = "000050E30300000A141090E5CC209FE5" +ALL = "000050E30300000A141090E5CC209FE5" [349] decl = "int NU_Allocate_Memory(NU_MEMORY_POOL *pool, void **return_pointer, unsigned long size, unsigned long suspend)" -NSG = "F8402DE90370A0E10160A0E10050B0E10240A0E10300000A140095E59C109FE5" +ALL = "F8402DE90370A0E10160A0E10050B0E10240A0E10300000A140095E59C109FE5" [34A] decl = "int NU_Deallocate_Memory(void *memory)" -NSG = "101050E2000050130C20911500005213" +ALL = "101050E2000050130C20911500005213" [34B] decl = "unsigned long NU_Established_Memory_Pools(void)" NSG = "C4019FE5000090E50880BDE8F8402DE9-8" +SG = "5C019FE5000090E50880BDE8F8402DE9 - 8" [34C] decl = "int NU_Memory_Pool_Information(NU_MEMORY_POOL *pool, CHAR *name, void **start_address, unsigned long *pool_size, unsigned long *min_allocation, unsigned long *available, OPTION *suspend_type, unsigned long *tasks_waiting, NU_TASK **first_task)" NSG = "FF4D2DE90040A0E110019FE538709DE5" +SG = "FF4D2DE90040A0E1DC009FE538609DE5" [34D] decl = "unsigned long NU_Memory_Pool_Pointers(NU_MEMORY_POOL **pointer_list, unsigned long maximum_pointers)" NSG = "F8402DE90060A0E1B4019FE50170A0E1" +SG = "F8402DE90050A0E14C019FE50170A0E1" [34E] decl = "int NU_Control_Interrupts(INT new_level)" -NSG = "00200FE1C02082E302F02FE144101FE5" +ALL = "00200FE1C02082E302F02FE1??101FE5" [34F] decl = "int NU_Local_Control_Interrupts(INT new_level)" NSG = "00300FE1C020C3E3002082E102F02FE1" +SG = "00200FE10230A0E1C020C2E3002082E102F02FE1" [350] decl = "void NU_Restore_Interrupts(void)" NSG = "00200FE1C01082E301F02FE1C020C2E3" +SG = "00100FE10120A0E1C01081E301F02FE1C020C2E3" [351] decl = "void *NU_Setup_Vector(INT vector, void *new_vector)" -NSG = "< 0xFFFFFFFF>" +ALL = "&BL(F8402DE90270A0E10160A0E10040A0E1????????160054E31A00E0C32F0000CA0050A0E3 + B0)" [352] decl = "int NU_Register_LISR(INT vector, void (*new_lisr)(INT), void (**old_lisr)(INT))" -NSG = "F8402DE90270A0E10160A0E10040A0E1????????160054E31A00E0C32F0000CA0050A0E3" +ALL = "F8402DE90270A0E10160A0E10040A0E1????????160054E31A00E0C32F0000CA0050A0E3" [353] decl = "int NU_Activate_HISR(NU_HISR *hisr)" NSG = "38402DE90050A0E180009FE5004090E5" +SG = "38402DE90040A0E1????9FE5005090E50500A0E1????????0400B0E10300000A" +X75 = "70402DE90050A0E1????9FE5004090E50500B0E10300000A0C0090E5" [354] decl = "int NU_Create_HISR(NU_HISR *hisr, CHAR *name, void (*hisr_entry)(void), OPTION priority, void *stack_address, unsigned long stack_size)" -NSG = "3E402DE903E0A0E102C0A0E1000050E3" +ALL = "3E402DE903E0A0E102C0A0E1000050E3" [355] decl = "int NU_Delete_HISR(NU_HISR *hisr)" NSG = "000050E30300000A0C1090E5B8229FE5" +SG = "000050E30300000A0C1090E550229FE5020051E1" [356] decl = "NU_HISR *NU_Current_HISR_Pointer(void)" NSG = "00041FE5000090E5000050E30300000A" +SG = "B0021FE5000090E5000050E30300000A0C1090E5A0221FE5020051E1" [357] decl = "unsigned long NU_Established_HISRs(void)" NSG = "58039FE5000090E50880BDE8F8402DE9-8" +SG = "8C029FE5000090E50880BDE8F8402DE9 - 8" [358] decl = "int NU_HISR_Information(NU_HISR *hisr, CHAR *name, unsigned long *scheduled_count, DATA_ELEMENT *priority, void **stack_base, unsigned long *stack_size, unsigned long *minimum_stack)" NSG = "FF4D2DE930B08DE20040A0E1E0009FE5" +SG = "FF4D2DE930B08DE20040A0E1AC009FE5" [359] decl = "unsigned long NU_HISR_Pointers(NU_HISR **pointer_list, unsigned long maximum_pointers)" NSG = "F8402DE90060A0E1A4029FE50170A0E1" +SG = "F8402DE90050A0E10C029FE50170A0E1" [35A] decl = "void NU_Protect(NU_PROTECT *protect_struct)" NSG = "1C141FE5001091E5000051E31400000A" +SG = "48141FE5003091E5000053E31D00000A00100FE1C01081E3" [35B] decl = "void NU_Unprotect(void)" NSG = "84141FE5001091E5000051E31200000A" +SG = "D4141FE5003091E5000053E31200000A380093E5000050E3" [35C] decl = "int NU_Create_Timer(NU_TIMER *timer, CHAR *name, void (*expiration_routine)(unsigned long), unsigned long id, unsigned long initial_time, unsigned long reschedule_time, OPTION enable)" -NSG = "7F402DE90340A0E120308DE201E0A0E1" +ALL = "7F402DE90340A0E120308DE201E0A0E1" [35D] decl = "int NU_Delete_Timer(NU_TIMER *timer)" -NSG = "000050E30300000A0C1090E5A4209FE5020051E17A0C000A1900E0E31EFF2FE1" +ALL = "000050E30300000A0C1090E5A4209FE5020051E1????????1900E0E31EFF2FE1" [35E] decl = "int NU_Reset_Timer(NU_TIMER *timer, void (*expiration_routine)(unsigned long), unsigned long initial_time, unsigned long reschedule_timer, OPTION enable)" -NSG = "1C402DE903C0A0E110309DE5000050E3" +ALL = "1C402DE903C0A0E110309DE5000050E3" [35F] decl = "int NU_Control_Timer(NU_TIMER *timer, OPTION enable)" -NSG = "000050E30300000A0C2090E520309FE5" +ALL = "000050E30300000A0C2090E520309FE5" [360] decl = "unsigned long NU_Established_Timers(void)" @@ -4517,6 +4849,7 @@ NSG = """ 000050E30400A0030500A0130000C8E5240094E50C109DE5000081E51C0094E530109DE5000081E5280094E500008AE52C0094E50000 8BE5000000EA1970E0E3-15C """ +SG = "14029FE5000090E50880BDE8F8402DE9 - 8" [361] decl = "int NU_Timer_Information(NU_TIMER *timer, CHAR *name, OPTION *enable, unsigned long *expirations, unsigned long *id, unsigned long *initial_time, unsigned long *reschedule_time)" @@ -4524,6 +4857,7 @@ NSG = """ 000050E30400A0030500A0130000C8E5240094E50C109DE5000081E51C0094E530109DE5000081E5280094E500008AE52C0094E50000 8BE5000000EA1970E0E3-A4 """ +SG = "FF4D2DE90040A0E194019FE534A09DE5" [362] decl = "unsigned long NU_Timer_Pointers(NU_TIMER **pointer_list, unsigned long maximum_pointers)" @@ -4531,82 +4865,94 @@ NSG = """ 000050E30400A0030500A0130000C8E5240094E50C109DE5000081E51C0094E530109DE5000081E5280094E500008AE52C0094E50000 8BE5000000EA1970E0E3-148 """ +SG = "F8402DE90050A0E104029FE50170A0E1" [363] decl = "void NU_Set_Clock(unsigned long new_value)" NSG = "18101FE5000081E51EFF2FE124001FE5" +SG = "2C101FE5000081E51EFF2FE138001FE5" [364] decl = "unsigned long NU_Retrieve_Clock(void)" NSG = "24001FE5000090E51EFF2FE12C001FE5" +SG = "38001FE5000090E51EFF2FE140001FE5" [365] decl = "char *NU_Release_Information(void)" -NSG = "10109FE5000081E50C109FE5000081E51EFF2FE1????????????????????????00009FE5+20" +ALL = "LDR{436F70797269676874204D474320}1EFF2FE1" [366] decl = "char *NU_License_Information(void)" -NSG = "10109FE5000081E50C109FE5000081E51EFF2FE1????????????????????????00009FE5+20" +NSG = "LDR{436F70797269676874204D474320}1EFF2FE1" +SG = "LDR{416363656C65726174656420546563686E6F6C6F677920496E7465726E616C20557365204F6E6C79}1EFF2FE1" +# History service functions are not linked on supported platforms. [367] decl = "void NU_Disable_History_Saving(void)" -NSG = "< 0xFFFFFFFF>" +ALL = false [368] decl = "void NU_Enable_History_Saving(void)" -NSG = "< 0xFFFFFFFF>" +ALL = false [369] decl = "void NU_Make_History_Entry(unsigned long param1, unsigned long param2, unsigned long param3)" -NSG = "< 0xFFFFFFFF>" +ALL = false [36A] decl = "int NU_Retrieve_History_Entry(DATA_ELEMENT *id, unsigned long *param1, unsigned long *param2, unsigned long *param3, unsigned long *time, NU_TASK **task, NU_HISR **hisr)" -NSG = "< 0xFFFFFFFF>" +ALL = false +# The Nucleus I/O driver component is not linked on supported platforms. [36B] decl = "int NU_Create_Driver(NU_DRIVER *driver, CHAR *name, void (*driver_entry)(NU_DRIVER *, NU_DRIVER_REQUEST *))" -NSG = "< 0xFFFFFFFF>" +ALL = false [36C] decl = "int NU_Delete_Driver(NU_DRIVER *driver)" -NSG = "< 0xFFFFFFFF>" +ALL = false [36D] decl = "int NU_Request_Driver(NU_DRIVER *driver, NU_DRIVER_REQUEST *request)" -NSG = "< 0xFFFFFFFF>" +ALL = false [36E] decl = "int NU_Resume_Driver(NU_TASK *task)" -NSG = "< 0xFFFFFFFF>" +ALL = false [36F] decl = "int NU_Suspend_Driver(void (*terminate_routine)(void *), void *information, unsigned long timeout)" -NSG = "< 0xFFFFFFFF>" +ALL = false [370] decl = "unsigned long NU_Established_Drivers(void)" -NSG = "< 0xFFFFFFFF>" +ALL = false [371] decl = "unsigned long NU_Driver_Pointers(NU_DRIVER **pointer_list, unsigned long maximum_pointers)" -NSG = "< 0xFFFFFFFF>" +ALL = false +# This public name is a constant macro in Nucleus, not a callable function. [372] -decl = "unsigned long NU_IS_SUPERVISOR_MODE()" -NSG = "< 0xFFFFFFFF>" +decl = "unsigned long NU_IS_SUPERVISOR_MODE(void)" +ALL = false +# NSG and ELKA inline the supervisor-mode transition; SG and X75 keep the assembly helper. [373] -decl = "void NU_SUPERVISOR_MODE(unsigned long nu_svc_usr_var)" -NSG = "< 0xFFFFFFFF>" +decl = "void NU_SUPERVISOR_MODE_P(void *nu_svc_usr_var)" +NSG = false +SG = "3F442DE900300FE1C03003E2010000EF000050E3" [374] -decl = "void NU_USER_MODE(unsigned long nu_svc_usr_var)" +decl = "void NU_USER_MODE_P(void *nu_svc_usr_var)" NSG = "000050E31EFF2F010C2090E530309FE5" +SG = "3F402DE900200FE10210A0E1C01001E2C02082E302F02FE10030A0E1000053E3" +# Pointer SWI: address of the TCD_Current_Thread global. [375] decl = "void *NU_SUPERV_USER_VARIABLES(void)" -NSG = "*(010080E2020051E15C008415AC008405????????0400A0E11040BDE8+20)" +NSG = "&(D8031FE5000090E5000050E30300000A)" +SG = "&(B0021FE5000090E5000050E30300000A)" [380] decl = "WSHDR *GetClipBoard(void)" @@ -4791,11 +5137,17 @@ NSG = "F8,B5,04,1C,10,1C,1A,1C,0A,29,??,??,14,23,59,43 +1" [3AA] decl = "void qsort(void *first, size_t nitems, size_t size, int (*comparator)(const void *, const void *))" -NSG = "F0,B5,0F,B4,07,1C,0E,1C,14,1C,81,B0,??,??,0A,2E +1" +ALL = """ +F0,B5,0F,B4,[..000111],[0001110.],[..001110],[0001110.],[..010100],[0001110.],81,B0,??,D0,??,2E,??,D9, +[..100010],[0001110.],[..110001],[0001110.],[..111000],[0001110.],??,9B + 1 +""" [3AB] decl = "void *bsearch(const void *key, const void *first, size_t nitems, size_t size, int (*comparator)(const void *, const void *))" -NSG = "F0,B5,0F,B4,0F,1C,14,1C,81,B0,00,2C,??,??,00,20,05,B0,F0,BC +1" +ALL = """ +F0,B5,0F,B4,[..001111],[0001110.],[..010100],[0001110.],81,B0,??,2C,??,D1,??,20,05,B0,F0,BC,08,BC,18,47, +??,2C,??,D1 + 1 +""" [3AC] decl = "int EVP_add_cipher(EVP_CIPHER *c)" @@ -4814,36 +5166,110 @@ decl = "IMGHDR *GetIMGHDRFromCanvasCache(char canvas_id)" [3B4] decl = "void GetDate_ws(WSHDR *ws, const TDate *date, unsigned int unk)" +ALL = "3E B5 04 1C 0D 1C ?? ?? ?? ?? 02 28 ?? D1 10 20 02 43 11 1C ?? ?? 11 1C ?? ?? ?? ?? 0B 1C 02 1C" [3B5] decl = "void GetTime_ws(WSHDR *ws, const TTime *time, unsigned int unk)" +ALL = "F0 B5 0F 1C 04 1C 9F B0 16 1C 02 22 1A A9 15 A8 ?? ?? ?? ?? ?? 90 0E A8 02 22 13 A9 ?? ?? ?? ?? ?? 90 07 A8" [3B7] decl = "int sys_mkdir_ws(const WSHDR *dirname, uint32_t *err)" +NSG = """ +38 40 2D E9 01 50 A0 E1 00 40 A0 E1 ?? ?? ?? EB 00 30 E0 E3 ?? 3? 8? E5 28 C0 90 E5 00 00 A0 E3 +05 30 A0 E1 04 20 A0 E1 00 10 A0 E3 3C FF 2F E1 38 80 BD E8 +""" +SG = """ +70 40 2D E9 00 50 A0 E1 01 40 A0 E1 ?? ?? ?? EB 00 60 A0 E1 04 00 A0 E1 ?? ?? ?? EB 04 30 A0 E1 +05 10 A0 E1 28 C0 96 E5 70 40 B? E8 00 20 A0 E3 01 00 A0 E3 1C FF 2F E1 +""" [3B8] -decl = "int sys_rmdir_ws(const WSHDR *path, unsigned int *err)" +decl = "int sys_rmdir_ws(const WSHDR *path, uint32_t *err)" +NSG = """ +38 40 2D E9 01 50 A0 E1 00 40 A0 E1 ?? ?? ?? EB 00 30 E0 E3 ?? 3? 8? E5 3C C0 90 E5 00 00 A0 E3 +05 30 A0 E1 04 20 A0 E1 00 10 A0 E3 3C FF 2F E1 38 80 BD E8 +""" +SG = """ +70 40 2D E9 00 50 A0 E1 01 40 A0 E1 ?? ?? ?? EB 00 60 A0 E1 04 00 A0 E1 ?? ?? ?? EB 04 30 A0 E1 +05 10 A0 E1 38 C0 96 E5 70 40 B? E8 00 20 A0 E3 01 00 A0 E3 1C FF 2F E1 +""" [3B9] decl = "int sys_rename_ws(const WSHDR *old_name, const WSHDR *new_name, uint32_t *err)" +NSG = """ +7F 40 2D E9 02 60 A0 E1 01 50 A0 E1 00 40 A0 E1 ?? ?? ?? EB 00 30 E0 E3 ?? 3? 8? E5 60 00 8? E8 +38 C0 90 E5 00 00 A0 E3 00 30 A0 E3 04 20 A0 E1 00 10 A0 E3 3C FF 2F E1 10 D0 8D E2 70 80 BD E8 +""" +SG = """ +F8 40 2D E9 01 70 A0 E1 00 50 A0 E1 02 40 A0 E1 ?? ?? ?? EB 00 60 A0 E1 04 00 A0 E1 ?? ?? ?? EB +?? 4? 8? E5 34 C0 96 E5 00 30 A0 E3 07 20 A0 E1 05 10 A0 E1 01 00 A0 E3 +""" [3BA] -decl = "int sys_unlink_ws(const WSHDR *path, unsigned int *err)" +decl = "int sys_unlink_ws(const WSHDR *path, uint32_t *err)" +NSG = """ +38 40 2D E9 01 50 A0 E1 00 40 A0 E1 ?? ?? ?? EB 00 30 E0 E3 ?? 3? 8? E5 58 C0 90 E5 00 00 A0 E3 +05 30 A0 E1 04 20 A0 E1 00 10 A0 E3 3C FF 2F E1 38 80 BD E8 +""" +SG = """ +70 40 2D E9 00 50 A0 E1 01 40 A0 E1 ?? ?? ?? EB 00 60 A0 E1 04 00 A0 E1 ?? ?? ?? EB 04 30 A0 E1 +05 10 A0 E1 54 C0 96 E5 70 40 B? E8 00 20 A0 E3 01 00 A0 E3 1C FF 2F E1 +""" [3BB] decl = "int sys_stat_ws(const WSHDR *path, FSTATS *stat, uint32_t *err)" +NSG = """ +7C 40 2D E9 02 60 A0 E1 01 50 A0 E1 00 40 A0 E1 ?? ?? ?? EB 00 30 E0 E3 ?? 3? 8? E5 ?? 6? 8? E5 +50 C0 90 E5 00 00 A0 E3 05 30 A0 E1 04 20 A0 E1 00 10 A0 E3 3C FF 2F E1 7C 80 BD E8 +""" +SG = """ +F8 40 2D E9 01 70 A0 E1 00 50 A0 E1 02 40 A0 E1 ?? ?? ?? EB 00 60 A0 E1 04 00 A0 E1 ?? ?? ?? EB +?? 4? 8? E5 4C C0 96 E5 00 30 A0 E3 07 20 A0 E1 05 10 A0 E1 01 00 A0 E3 3C FF 2F E1 F8 80 BD E8 +""" [3BC] decl = "int isdir_ws(const WSHDR *path, uint32_t *err)" +NSG = """ +38 40 2D E9 01 50 A0 E1 00 40 A0 E1 ?? ?? ?? EB 00 30 E0 E3 ?? 3? 8? E5 24 C0 90 E5 00 00 A0 E3 +05 30 A0 E1 04 20 A0 E1 00 10 A0 E3 3C FF 2F E1 38 80 BD E8 +""" +SG = """ +70 40 2D E9 00 50 A0 E1 01 40 A0 E1 ?? ?? ?? EB 00 60 A0 E1 04 00 A0 E1 ?? ?? ?? EB 04 30 A0 E1 +05 10 A0 E1 24 C0 96 E5 70 40 B? E8 00 20 A0 E3 01 00 A0 E3 1C FF 2F E1 +""" [3BD] decl = "int GetFileAttrib_ws(const WSHDR *path, uint8_t *attr, uint32_t *err)" +NSG = """ +7C 40 2D E9 02 60 A0 E1 01 50 A0 E1 00 40 A0 E1 ?? ?? ?? EB 00 30 E0 E3 ?? 3? 8? E5 ?? 6? 8? E5 +14 C0 90 E5 00 00 A0 E3 05 30 A0 E1 04 20 A0 E1 00 10 A0 E3 3C FF 2F E1 7C 80 BD E8 +""" +SG = """ +F8 40 2D E9 01 70 A0 E1 00 50 A0 E1 02 40 A0 E1 ?? ?? ?? EB 00 60 A0 E1 04 00 A0 E1 ?? ?? ?? EB +?? 4? 8? E5 14 C0 96 E5 00 30 A0 E3 07 20 A0 E1 05 10 A0 E1 01 00 A0 E3 3C FF 2F E1 F8 80 BD E8 +""" [3BE] decl = "int SetFileAttrib_ws(const WSHDR *path, uint8_t attr, uint32_t *err)" +NSG = """ +7C 40 2D E9 02 60 A0 E1 01 50 A0 E1 00 40 A0 E1 ?? ?? ?? EB 00 30 E0 E3 ?? 3? 8? E5 ?? 6? 8? E5 +44 C0 90 E5 00 00 A0 E3 05 30 A0 E1 04 20 A0 E1 00 10 A0 E3 3C FF 2F E1 7C 80 BD E8 +""" +SG = """ +F8 40 2D E9 01 70 A0 E1 00 50 A0 E1 02 40 A0 E1 ?? ?? ?? EB 00 60 A0 E1 04 00 A0 E1 ?? ?? ?? EB +?? 4? 8? E5 40 C0 96 E5 00 30 A0 E3 07 20 A0 E1 05 10 A0 E1 01 00 A0 E3 3C FF 2F E1 F8 80 BD E8 +""" [3BF] decl = "int FindFirstFile_ws(DIR_ENTRY *dir_entry, const WSHDR *mask, uint32_t *err)" +NSG = """ +7C 40 2D E9 00 50 A0 E1 01 00 A0 E1 02 60 A0 E1 01 40 A0 E1 ?? ?? ?? EB 00 30 E0 E3 ?? 3? 8? E5 +?? 6? 8? E5 1C C0 90 E5 00 00 A0 E3 04 30 A0 E1 00 20 A0 E3 05 10 A0 E1 3C FF 2F E1 7C 80 BD E8 +""" +SG = """ +F8 40 2D E9 00 70 A0 E1 01 00 A0 E1 01 50 A0 E1 02 40 A0 E1 ?? ?? ?? EB 00 60 A0 E1 04 00 A0 E1 +?? ?? ?? EB ?? 4? 8? E5 1C C0 96 E5 00 30 A0 E3 05 20 A0 E1 07 10 A0 E1 01 00 A0 E3 3C FF 2F E1 +""" [3C0] decl = "int ShowWaitBox(int flags, int message)" @@ -4870,7 +5296,16 @@ decl = "void SetHeaderScrollText(void *header, const WSHDR *title, const void *m decl = "void SetHeaderExtraText(void *header, const WSHDR *ws, const void *malloc_fn, const void *mfree_fn)" [3C8] -decl = "int GetMimeType(int uid, WSHDR *mime_type, int unk_0)" +decl = "int GetMimeType(int uid, WSHDR *mime_type, int occurrence)" +NSG = """ +F8 B5 0F 1C 06 1C 15 1C 00 28 ?? D0 00 24 ?? ?? ?? ?? ?? ?? ?? ?? E1 00 ?? ?? B1 42 ?? D1 +00 2D ?? D1 00 2F ?? D0 +""" +ELKA = """ +F8 40 2D E9 01 70 A0 E1 00 60 B0 E1 02 50 A0 E1 ?? ?? ?? 0A 00 40 A0 E3 ?? ?? ?? EB ?? ?? 9F E5 +?? ?? ?? EA [.000....] 2? 9? E7 06 00 52 E1 ?? ?? ?? 1A 00 00 55 E3 ?? ?? ?? 1A +""" +SG = false # The MIME registry is present, but firmware has no UID-to-MIME wrapper. [3C9] decl = "int wstrncmp(const WSHDR *ws1, const WSHDR *ws2, size_t n)" @@ -4883,6 +5318,15 @@ decl = "int wstrnicmp(const WSHDR *ws1, const WSHDR *ws2, size_t n)" [3CC] decl = "int PersMenuCSM_Open(const WSHDR *file_name, const WSHDR *dir, int flag, int open_mode)" +NSG = """ +FF B5 A5 B0 00 93 1F 1C 13 1C 16 1C 0D 1C 00 24 0A 1C ?? 99 ?? 48 ?? ?? ?? ?? 90 21 01 A8 +?? ?? ?? ?? ?? 4A ?? 49 16 A8 +""" +ELKA = """ +F0 41 2D E9 98 D0 4D E2 00 80 A0 E1 02 60 A0 E1 01 50 A0 E1 F8 1F A0 E3 ?? 2? 8F E2 ?? 0? 8F E2 +?? 3? 8? E5 03 70 A0 E1 00 40 A0 E3 ?? ?? ?? EB 06 30 A0 E1 05 20 A0 E1 +""" +SG = false # The SG/X75 personalization core requires a fifth argument and is not ABI-compatible. [3CD] decl = "void wstrtoupper(WSHDR *ws)" @@ -4910,6 +5354,21 @@ decl = "void DrawCroppedIMGHDR(int x, int y, int offset_x, int offset_y, int w, [3D5] decl = "int BuildPath(WSHDR *path, const WSHDR *file_name, const WSHDR *dir)" +NSG = """ +FE B5 0E 1C 05 1C 14 1C 00 28 ?? D0 00 2E ?? D0 00 2C ?? D0 20 1C ?? ?? ?? ?? 01 1C 20 1C +?? ?? ?? ?? 5C 28 ?? D0 20 1C ?? ?? ?? ?? 00 28 +""" +ELKA = """ +F0 41 2D E9 01 60 A0 E1 00 50 B0 E1 00 00 56 13 02 40 A0 E1 00 00 54 13 ?? ?? ?? 0A 04 00 A0 E1 +?? ?? ?? [1111101.] 00 10 A0 E1 04 00 A0 E1 ?? ?? ?? [1111101.] 5C 00 50 E3 ?? ?? ?? 0A 04 00 A0 E1 +?? ?? ?? [1111101.] 00 00 50 E3 ?? ?? ?? 0A +""" +SG = """ +70 40 2D E9 01 50 A0 E1 00 40 B0 E1 00 00 55 13 02 60 A0 E1 00 00 56 13 00 00 A0 03 70 80 BD 08 +06 10 A0 E1 04 00 A0 E1 ?? ?? ?? [1111101.] 04 00 A0 E1 ?? ?? ?? [1111101.] 00 10 A0 E1 04 00 A0 E1 +?? ?? ?? [1111101.] 5C 00 50 E3 ?? ?? ?? 0A 06 00 A0 E1 ?? ?? ?? [1111101.] 00 00 50 E3 ?? ?? ?? 0A +05 00 A0 E1 ?? ?? ?? [1111101.] 00 00 50 E3 5C 10 A0 13 04 00 A0 11 ?? ?? ?? 1B +""" [3D6] decl = "RECT *GetHeaderRECT(void)" @@ -4941,51 +5400,95 @@ decl = "uint32_t WriteValueToPDFile(uint32_t file_id, const char *key, const cha NSG = "F8 B5 06 1C 15 1C 1C 1C 0F 1C" [3DF] -decl = "TZ *RamTimeZones()" +decl = "TZ *RamTimeZones(void)" NSG = "*(63 75 72 72 65 6E 74 5F 63 69 74 79 00 + 0x10)" +SG = false # SG/X75 have no compatible compact TZ array [3E0] -decl = "int GetCurrentTimeZone()" -NSG = "?? 48 C1 78 57 29 ?? D3 21 21 + 0x1" +decl = "int GetCurrentTimeZone(void)" +ALL = "?? 48 C1 78 57 29 ?? D3 21 21 + 0x1" [3E1] decl = "int GetTimeZoneByGMT(const char *gmt)" NSG = "05 1C 00 24 44 36 87 20 80 00 60 43 - 0x4" +SG = "70 B5 ?? 4E 05 1C 00 24 44 36 FF 20 2D 30 60 43 ?? 58 28 1C ?? ?? ?? ?? 00 28 ?? D1 20 1C 70 BD 01 34 57 2C ?? DB" [3E2] decl = "int IsSummerTime(int time_zone)" -NSG = "30 B5 05 1C 01 24 00 28 85 B0" +ALL = "30 B5 05 1C 01 24 00 28 85 B0" [3E3] decl = "void SetTimeZone(int time_zone)" NSG = "04 1C 00 28 ?? DB 57 2C ?? DC - 0x2" +SG = "B0 B5 04 1C ?? ?? ?? ?? 20 1C ?? ?? ?? ?? ?? 48 ?? ?? 20 1C ?? ?? ?? ?? FF 21 2D 31 61 43 ?? 4D ?? ?? 10 3D 89 18 00 28 ?? D0" [3E4] decl = "void GetTimeFromMilliseconds(TTime *time, uint32_t milliseconds)" +ALL = "10 B5 04 1C 7D 20 C0 00 ?? ?? ?? ?? 61 60 01 1C 3C 20 ?? ?? ?? ?? A1 70 01 1C 3C 20 ?? ?? ?? ?? 61 70" [3E5] decl = "void DateAddDays(TDate *date, int days)" +ALL = "B0 B5 05 1C 0C 1C 1C 29 ?? D8 21 1C 28 1C ?? ?? ?? ?? B0 BD 20 1C 1C 30 1B 28 ?? D8 61 42" [3E6] decl = "void DateAddMonths(TDate *date, int months)" +ALL = "B0 B5 04 1C 00 79 45 18 01 3D ?? D4 29 1C 0C 20 ?? ?? ?? ?? 01 31 21 71 ?? ?? 69 42 0C 20 ?? ?? ?? ?? 0C 20 41 1A" [3E7] decl = "void DateAddYears(TDate *date, int years)" +ALL = "10 B5 04 1C 00 68 40 18 20 60 20 1C ?? ?? ?? ?? 61 79 88 42 ?? DA 60 71 10 BD" [3E8] -decl = "int64_t GetDays(const TDate *date)" +decl = "int GetDays(const TDate *date)" +ALL = "FE B5 04 79 07 68 05 1C 40 79 00 2C ?? ?? ?? DD 0C 2C ?? DD 00 20 C0 43 FE BD 04 21 78 1E 06 1C" [3E9] decl = "void *EDIT_GetGUI(const void *malloc_fn, const void *mfree_fn)" +NSG = """ +&BL(FF B5 81 B0 ?? 9D 0F 1C ?? 99 28 1C ?? 9E { B0 B5 04 1C 0D 1C A0 20 A0 47 2A 1C 21 1C ?? ?? ?? ?? B0 BD } + E) +""" +ELKA = """ +&BL(FF B5 81 B0 ?? 9D 0F 1C ?? 99 28 1C ?? 9E { B0 B5 04 1C 0D 1C A8 20 A0 47 2A 1C 21 1C ?? ?? ?? ?? B0 BD } + E) +""" +SG = """ +B0 B5 04 1C 0D 1C 68 20 A0 47 2A 1C 21 1C { 10 B5 00 24 C4 65 13 1C 0A 1C 84 65 04 65 ?? ?? ?? ?? ?? ?? 10 BD } B0 BD + 1 +""" [3EA] decl = "void EDIT_SetDefinition(void *gui, const INPUTDIA_DESC *input_desc)" +NSG = """ +&BL(FF B5 81 B0 ?? 9D 0F 1C ?? 99 28 1C ?? 9E ?? ?? ?? ?? 04 1C ?? 99 { 70 B5 05 1C 0E 1C ?? ?? ?? ?? 2C 1C 80 34 38 22 31 1C 20 69 ?? ?? ?? ?? ?? 48 21 69 ?? 60 } + 16) +""" +ELKA = """ +&BL(FF B5 81 B0 ?? 9D 0F 1C ?? 99 28 1C ?? 9E ?? ?? ?? ?? 04 1C ?? 99 { 70 B5 05 1C 0E 1C ?? ?? ?? ?? 2C 1C 80 34 38 22 31 1C A0 69 ?? ?? ?? ?? ?? 48 A1 69 ?? 60 } + 16) +""" +SG = """ +B0 B5 04 1C 0D 1C ?? ?? ?? ?? 38 22 29 1C A0 6D ?? ?? ?? ?? ?? 48 A1 6D ?? 60 + 1 +""" [3EB] -decl = "void *EDIT_SetEQueue(void *gui, const EDITQ *eq, int do_mfree, const void *malloc_fn)" +decl = "void EDIT_SetEQueue(void *gui, const EDITQ *eq, int do_mfree, const void *malloc_fn)" +NSG = """ +&BL(FF B5 81 B0 ?? 9D 0F 1C ?? 99 28 1C ?? 9E ?? ?? ?? ?? 04 1C ?? 99 ?? ?? ?? ?? 2B 1C 20 1C ?? 99 ?? 9A { 80 B5 80 30 80 68 ?? ?? ?? ?? 80 BD } + 22) +""" +ELKA = """ +&BL(FF B5 81 B0 ?? 9D 0F 1C ?? 99 28 1C ?? 9E ?? ?? ?? ?? 04 1C ?? 99 ?? ?? ?? ?? 2B 1C 20 1C ?? 99 ?? 9A { 80 B5 80 30 00 69 ?? ?? ?? ?? 80 BD } + 22) +""" +SG = """ +80 B5 ?? ?? ?? ?? 80 BD 80 B5 00 6D ?? ?? ?? ?? 80 BD + 9 +""" [3EC] decl = "void EDIT_SetUserPointer(void *gui, void *user_pointer)" +NSG = """ +&BL(FF B5 81 B0 ?? 9D 0F 1C ?? 99 28 1C ?? 9E ?? ?? ?? ?? 04 1C ?? 99 ?? ?? ?? ?? 2B 1C 20 1C ?? 99 ?? 9A ?? ?? ?? ?? 31 1C 20 1C ?? ?? ?? ?? 00 2F ?? D0 2B 1C 02 22 39 1C 20 1C ?? ?? ?? ?? 20 1C ?? 99 { 80 30 41 60 70 47 } + 42) +""" +ELKA = """ +&BL(FF B5 81 B0 ?? 9D 0F 1C ?? 99 28 1C ?? 9E ?? ?? ?? ?? 04 1C ?? 99 ?? ?? ?? ?? 2B 1C 20 1C ?? 99 ?? 9A ?? ?? ?? ?? 31 1C 20 1C ?? ?? ?? ?? 00 2F ?? D0 2B 1C 02 22 39 1C 20 1C ?? ?? ?? ?? 20 1C ?? 99 { 80 30 C1 60 70 47 } + 42) +""" +SG = """ +C1 64 70 47 C0 6C 70 47 + 1 +""" [3ED] decl = "void SetWidgetRect(void *widget, int x, int y, int x2, int y2)" From cc1b5554a962c262e1d37d102b17f53c52cc0675 Mon Sep 17 00:00:00 2001 From: Kirill Zhumarin Date: Mon, 26 Oct 2026 21:57:00 +0000 Subject: [PATCH 09/14] Fixes --- swilib/include/swilib/info.h | 2 +- swilib/patterns.toml | 14 +++++--------- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/swilib/include/swilib/info.h b/swilib/include/swilib/info.h index 06871974..773a1b2b 100644 --- a/swilib/include/swilib/info.h +++ b/swilib/include/swilib/info.h @@ -210,7 +210,7 @@ __swi_end(0x287, BT_GetLocVisibility, ()); /** * Own bluetooth name. * @return C-string - * @platforms NSG, ELKA + * @note Only on models with Bluetooth. * */ __swi_begin(0x828D) const char *RamBluetoothDeviceName(void) diff --git a/swilib/patterns.toml b/swilib/patterns.toml index 73fd8334..fd62165d 100644 --- a/swilib/patterns.toml +++ b/swilib/patterns.toml @@ -3846,7 +3846,7 @@ SG = """ [28D] decl = "const char *RamBluetoothDeviceName(void)" NSG = "&(??,48,??,49,??,88,??,42,??,D0,??,??,??,??,00,20)+8" -SG = false # Some firmwares have an internal BT-name buffer, but the public object is not platform-wide. +SG = "&(10 B5 ?? 4C A0 34 00 28 04 D0 14 22 01 1C 20 1C ?? ?? ?? ?? 14 21 20 1C ?? ?? ?? ?? 10 BD + 2) + A0" # Bluetooth models only [28E] decl = "const char *RamActiveGPRSProfileName(void)" @@ -4614,8 +4614,7 @@ ALL = "000050E30300000A0C1090E57C209FE5" [32F] decl = "int NU_Reset_Semaphore(NU_SEMAPHORE *semaphore, unsigned long initial_count)" -NSG = false -ELKA = "000050E30300000A0C2090E50C309FE5030052E10200000A1400E0E31EFF2FE1414D4553" +NSG = "000050E30300000A0C2090E50C309FE5030052E10200000A1400E0E31EFF2FE1414D4553" SG = false [330] @@ -4628,8 +4627,7 @@ ALL = "000050E30300000A0C1090E50C209FE5" [332] decl = "unsigned long NU_Established_Semaphores(void)" -NSG = false -ELKA = """ +NSG = """ 00 80 A0 E3 00 00 A0 E3 00 10 84 E0 10 10 D1 E5 01 00 80 E2 08 00 50 E3 01 10 C6 E4 F9 FF FF BA 1C 00 D4 E5 00 00 50 E3 0B 00 A0 03 06 00 A0 13 00 00 CA E5 18 00 94 E5 - 0x138 """ @@ -4637,8 +4635,7 @@ SG = false [333] decl = "int NU_Semaphore_Information(NU_SEMAPHORE *semaphore, CHAR *name, unsigned long *current_count, OPTION *suspend_type, unsigned long *tasks_waiting, NU_TASK **first_task)" -NSG = false -ELKA = """ +NSG = """ 00 80 A0 E3 00 00 A0 E3 00 10 84 E0 10 10 D1 E5 01 00 80 E2 08 00 50 E3 01 10 C6 E4 F9 FF FF BA 1C 00 D4 E5 00 00 50 E3 0B 00 A0 03 06 00 A0 13 00 00 CA E5 18 00 94 E5 - 0x80 """ @@ -4646,8 +4643,7 @@ SG = false [334] decl = "unsigned long NU_Semaphore_Pointers(NU_SEMAPHORE **pointer_list, unsigned long maximum_pointers)" -NSG = false -ELKA = """ +NSG = """ 00 80 A0 E3 00 00 A0 E3 00 10 84 E0 10 10 D1 E5 01 00 80 E2 08 00 50 E3 01 10 C6 E4 F9 FF FF BA 1C 00 D4 E5 00 00 50 E3 0B 00 A0 03 06 00 A0 13 00 00 CA E5 18 00 94 E5 - 0x124 """ From 72f07cc733b57a2f14704c912a5ce3072bce62df Mon Sep 17 00:00:00 2001 From: Kirill Zhumarin Date: Tue, 27 Oct 2026 00:51:11 +0000 Subject: [PATCH 10/14] Small fixes --- swilib/include/swilib/misc.h | 2 +- swilib/include/swilib/settings.h | 2 +- swilib/include/swilib/ui.h | 6 ++++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/swilib/include/swilib/misc.h b/swilib/include/swilib/misc.h index 68e7132c..c2d4f7cf 100644 --- a/swilib/include/swilib/misc.h +++ b/swilib/include/swilib/misc.h @@ -157,7 +157,7 @@ __swi_end(0x093, RebootPhone, ()); /** * Set state for SLI indicator. * @param state state value 0...4 - * @platforms ELKA + * @platforms NSG, ELKA * */ __swi_begin(0x036) void SLI_SetState(uint8_t state) diff --git a/swilib/include/swilib/settings.h b/swilib/include/swilib/settings.h index 587c6ea1..74531817 100644 --- a/swilib/include/swilib/settings.h +++ b/swilib/include/swilib/settings.h @@ -58,7 +58,7 @@ struct REG_CLIENT { void *unk1; /**< unknown, set to NULL */ void *unk2; /**< unknown, set to NULL */ short *hmi_keys; /**< array of HMI key IDs */ - size_t hmi_keys_count; /**< number of keys in the hmi_keys array */ + uint8_t hmi_keys_count; /**< number of keys in the hmi_keys array (max 255) */ }; /** diff --git a/swilib/include/swilib/ui.h b/swilib/include/swilib/ui.h index e240fd44..8d634a42 100644 --- a/swilib/include/swilib/ui.h +++ b/swilib/include/swilib/ui.h @@ -659,6 +659,7 @@ __swi_end(0x8237, RamIconBar, ()); /** * Check state of iconbar (EL71/E71). It can be disabled by #DisableIconBar function. * @return 1 or 0 + * @platforms ELKA * */ __swi_begin(0x3D2) int IsIconBarDisabled() @@ -1774,8 +1775,9 @@ __swi_end(0x3F8, Scrollbar_SetValue, (scrollbar, value)); * */ /** - * Pointer to the currently opened menu. - * @return pointer + * Key sequence buffer of the "menu anywhere" shortcut (`char[4]`). + * @return pointer to the buffer + * @note Not available on NSG. * */ __swi_begin(0x80D8) void *RamMenuAnywhere() From 55fd8a9929ff98a8f668a0da027ffa1c431b0330 Mon Sep 17 00:00:00 2001 From: Kirill Zhumarin Date: Tue, 27 Oct 2026 00:58:14 +0000 Subject: [PATCH 11/14] More patterns --- swilib/patterns.toml | 127 ++++++++++++++++++++++++++++++++++--------- 1 file changed, 100 insertions(+), 27 deletions(-) diff --git a/swilib/patterns.toml b/swilib/patterns.toml index fd62165d..c2ea3f16 100644 --- a/swilib/patterns.toml +++ b/swilib/patterns.toml @@ -359,8 +359,10 @@ SG = [ [036] decl = "void SLI_SetState(uint8_t state)" -NSG = "" -ELKA = "??,??,??,E5,??,??,??,E9,??,??,??,E5,??,??,??,E3,??,??,??,03,??,??,??,0A,??,??,??,E5,??,??,??,E5,??,??,??,E3" +NSG = [ + "?? ?? 9F E5 08 40 2D E9 50 11 D1 E5 08 00 51 E3 00 00 E0 03 ?? ?? ?? 0A ?? ?? 9F E5 04 20 91 E5 00 00 52 E3 ?? ?? ?? 0A 04 00 50 E3 00 00 C1 15", + "?? ?? 9F E5 50 11 D1 E5 08 00 51 E3 00 00 E0 03 1E FF 2F 01 04 00 50 E3 05 00 E0 23 1E FF 2F 21", # S68v47 +] [037] decl = "void Ringtones_SetState(uint8_t state)" @@ -736,7 +738,7 @@ NSG = "" [078] decl = "int GetTimeFormat()" NSG = "??,48,??,78,02,28,00,D3,00,20,70,47 + 1" -ELKA = "" +ELKA = "??,48,10,30,80,78,02,28,00,D3,00,20,70,47 + 1" [079] decl = "void DrawObject2Layer(LCDLAYER *layer, DRWOBJ *drwobj)" @@ -1299,7 +1301,6 @@ SG = "&(??4800797047??4980B5087100F0????80BD)+4" [0D3] decl = "char *RamIsStandby()" NSG = "" -ELKA = "" [0D4] decl = "char *RamMissedMessage()" @@ -1320,8 +1321,8 @@ NSG = "*(806870470C235843??494018406870470000+12)" [0D8] decl = "void *RamMenuAnywhere()" -NSG = "" -ELKA = "*(080C0000257300000503000023232300+10)" +NSG = false +ELKA = "&(10 B5 ?? 4C 04 22 20 1C ?? A1 ?? F? ?? E? ?? 48 89 38 44 60 + 2)" [0D9] decl = "void *RamShutdownMode()" @@ -1341,6 +1342,7 @@ NSG = "&(30B5??4C051C0021201C????????2068286030BD + 2)" [0DD] decl = "void *RamCurrentTrack()" +NSG = false # heap object [0DE] decl = "char *RamIsSimPresent()" @@ -1433,9 +1435,13 @@ NSG = [ [0F2] decl = "int Registry_RegClient(const REG_CLIENT *client)" +NSG = "F8 B5 03 7C 42 88 01 88 04 1C ?? 48 ?? ?? ?? ?? 20 7C 00 28 ?? D0 ?? 4E 20 88 00 25 00 27 04 36 14 21 79 43+1" +ELKA = "F8 40 2D E9 00 40 A0 E1 ?? ?? ?? E5 ?? ?? ?? E2 75 1F A0 E3 ?? ?? ?? EB 10 30 D4 E5 B2 20 D4 E1 B0 10 D4 E1" [0F3] decl = "void Registry_UnregClient(int client_id)" +NSG = "10 B5 04 1C ?? A0 ?? ?? ?? ?? 1E 2C 05 D2 20 1C ?? ?? ?? ?? 20 1C ?? ?? ?? ?? ?? A0 ?? ?? ?? ?? 10 BD+1" +ELKA = "10 40 2D E9 00 40 A0 E1 ?? ?? ?? E5 ?? ?? ?? E2 88 1F A0 E3 ?? ?? ?? EB ?? ?? 8F E2 ?? ?? ?? EB 1E 00 54 E3 03 00 00 2A" [0F4] decl = "int PIT_Pic_Lani()" @@ -2973,6 +2979,8 @@ NSG = "0023??E7??49B0B54018??28??D8 +5" [1EE] decl = "int ProgressCalculate(int current, int total)" +NSG = "0A 1C 00 21 00 2A 80 B5 ?? D0 01 30 90 42 ?? D8 64 21 41 43 10 1C ?? ?? ?? ?? 01 1C ?? D1 01 21 08 1C 80 BD + 1" +ELKA = "08 40 2D E9 00 30 A0 E1 00 00 A0 E3 01 20 B0 E1 ?? 00 00 0A 01 10 83 E2 02 00 51 E1 ?? 00 00 8A 64 00 A0 E3 90 01 01 E0 02 00 A0 E1 ?? ?? ?? EB 00 00 50 E3 01 00 A0 03 08 80 BD E8" [1EF] decl = "void SetDynIcon(int picture, IMGHDR *img, char *bitmap)" @@ -3047,12 +3055,14 @@ NSG = "??B5041C00202070A070" [1FE] decl = "char *RamIsCameraLighterOn()" -NSG = """ +NSG = [ + """ &(??,??,??,E9,??,??,??,E1,??,??,??,E5,??,??,??,E2,??,??,??,E5,??,??,??,E5,??,??,??,E3,??,??,??,E3,??,??,??, 03,??,??,??,E1,??,??,??,E3,??,??,??,E1,??,??,??,0A,??,??,??,E3,??,??,??,2A,??,??,??,E3,??,??,??,E1,??,??,??, E5,??,??,??,E7,??,??,??,E3,??,??,??,1A,??,??,??,E3,??,??,??,E2,??,??,??,E8 + 44) + 263 -""" -ELKA = "&(??,??,9F,E5,??,??,D1,E5,??,??,51,E3,??,??,E0,03,??,??,2F,01,??,??,50,E3,??,??,00,2A,??,??,9F,E5) + 0x114" +""", + "&(??,??,9F,E5,??,??,D1,E5,??,??,51,E3,??,??,E0,03,??,??,2F,01,??,??,50,E3,??,??,00,2A,??,??,9F,E5) + 0x114", # ELKA, S68 +] [1FF] decl = "void MEDIA_PLAYLAST()" @@ -3395,7 +3405,7 @@ NSG = "" [237] decl = "char *RamIconBar()" -NSG = "" +NSG = false ELKA = "&(??,48,??,B5,??,68,??,29,??,D0,??,68,??,8B,??,07,??,D4,??,68,??,68,??,47,??,BD)+4" [238] @@ -3417,8 +3427,8 @@ SG = "FF452DE914D04DE201A0A0E110108DE2??6?9?E50050A0E10340A0E1????????000050E309 [23B] decl = "void DisableIconBar(int disable)" -NSG = "" ELKA = "??,48,??,B5,??,68,??,29,??,D0,??,68,??,8B,??,07,??,D4,??,68,??,68,??,47,??,BD +1B" +NSG = false [23C] decl = "int SetCurrentGPRSProfile(int profile_id)" @@ -3522,11 +3532,11 @@ NSG = """ [251] decl = "void *RamSizeOfPart()" -NSG = "" +NSG = false # heap object [252] decl = "int *RamSizeOfReceivedOrSentFile()" -NSG = "" +NSG = false # heap object [253] decl = "char *RamLastCallNum()" @@ -3550,11 +3560,11 @@ NSG = "??,63,??,47,??,6B,??,47,??,B5,??,21,??,??,??,F?,??,28,??,D0,??,??,??,F?,? [256] decl = "const char *RamNameOfReceivedOrSentFile()" -NSG = "" +NSG = false # heap object [257] decl = "int *RamIsSendingOrReceivingFileByBT()" -NSG = "" +NSG = false # heap object [258] decl = "int CalcBitmapSize(short w, short h, char type)" @@ -3679,8 +3689,8 @@ NSG = """ [26B] decl = "int Obs_Mam_SetPurpose(HObj obs, char purpose)" -NSG = "" ELKA = "00 20 A0 E1 ?? 11 C2 E5 00 00 A0 E3 1E FF 2F E1" +NSG = false [26C] decl = "int Obs_Sound_SetVolumeEx(HObj obs, char volume, char delta)" @@ -3714,47 +3724,64 @@ ELKA = [ [26F] decl = "int Obs_Sound_SetAMRFormat(HObj obs, int format)" +NSG = "F8 40 2D E9 01 70 A0 E1 05 10 A0 E3 00 60 A0 E1 00 40 A0 E3 ?? ?? ?? EB 00 50 A0 E1 06 00 A0 E1 06 10 A0 E3 ?? ?? ?? EB 00 00 55 E3 ?? ?? ?? 1A 00 00 50 E3 05 40 A0 03 ?? ?? ?? 0A 00 50 A0 E1 05 00 A0 E1 ?? ?? ?? EB 00 00 50 E3 01 00 50 13 02 00 50 13 06 00 50 13 10 40 A0 13 ?? ?? ?? 1A 07 0C A0 E1 40 0C A0 E1 06 00 50 E3 E4 08 C5 35 01 00 A0 33 E8 08 85 35 04 00 A0 E1 F8 80 BD E8" +ELKA = "FF 41 2D E9 01 80 A0 E1 05 10 A0 E3 00 60 A0 E1 00 50 A0 E3 ?? ?? ?? EB 00 40 A0 E1 06 00 A0 E1 06 10 A0 E3 ?? ?? ?? EB 00 00 54 E3 ?? ?? ?? 1A 00 00 50 E3 05 50 A0 03 ?? ?? ?? 0A 00 40 A0 E1 04 00 A0 E1 ?? ?? ?? EB ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? [1111101.] 07 00 B0 E1 01 00 50 13 02 00 50 13 06 00 50 13 10 50 A0 13 ?? ?? ?? 1A 08 0C A0 E1 40 0C A0 E1 06 00 50 E3 24 09 C4 35 01 00 A0 33 28 09 84 35 05 00 A0 E1 10 D0 8D E2 F0 81 BD E8" [270] decl = "int Obs_Sound_SetAMRDTX(HObj obs, int dtx)" +NSG = "F8 40 2D E9 01 70 A0 E1 05 10 A0 E3 00 60 A0 E1 00 40 A0 E3 ?? ?? ?? EB 00 50 A0 E1 06 00 A0 E1 06 10 A0 E3 ?? ?? ?? EB 00 00 55 E3 ?? ?? ?? 1A 00 00 50 E3 05 40 A0 03 ?? ?? ?? 0A 00 50 A0 E1 05 00 A0 E1 ?? ?? ?? EB 00 00 50 E3 01 00 50 13 02 00 50 13 06 00 50 13 01 00 A0 03 F4 78 A5 05 04 00 85 05 10 40 A0 13 04 00 A0 E1 F8 80 BD E8" +ELKA = "FF 41 2D E9 01 80 A0 E1 05 10 A0 E3 00 60 A0 E1 00 50 A0 E3 ?? ?? ?? EB 00 40 A0 E1 06 00 A0 E1 06 10 A0 E3 ?? ?? ?? EB 00 00 54 E3 ?? ?? ?? 1A 00 00 50 E3 05 50 A0 03 ?? ?? ?? 0A 00 40 A0 E1 04 00 A0 E1 ?? ?? ?? EB ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? [1111101.] 07 00 B0 E1 01 00 50 13 02 00 50 13 06 00 50 13 01 00 A0 03 34 89 A4 05 04 00 84 05 10 50 A0 13 05 00 A0 E1 10 D0 8D E2 F0 81 BD E8" [271] decl = "int Obs_Sound_SetNofChannels(HObj obs, int num_channels)" +NSG = "F8 40 2D E9 01 70 A0 E1 05 10 A0 E3 00 60 A0 E1 00 40 A0 E3 ?? ?? ?? EB 00 50 A0 E1 06 00 A0 E1 06 10 A0 E3 ?? ?? ?? EB 00 00 55 E3 ?? ?? ?? 1A 00 00 50 E3 05 40 A0 03 ?? ?? ?? 0A 00 50 A0 E1 05 00 A0 E1 ?? ?? ?? EB 00 00 50 E3 01 00 50 13 02 00 50 13 06 00 50 13 ?? ?7 9F 05 10 40 A0 13 B5 70 80 01 01 00 A0 03 D8 08 85 05 04 00 A0 E1 F8 80 BD E8" +ELKA = "FF 41 2D E9 01 80 A0 E1 05 10 A0 E3 00 60 A0 E1 00 50 A0 E3 ?? ?? ?? EB 00 40 A0 E1 06 00 A0 E1 06 10 A0 E3 ?? ?? ?? EB 00 00 54 E3 ?? ?? ?? 1A 00 00 50 E3 05 50 A0 03 ?? ?? ?? 0A 00 40 A0 E1 04 00 A0 E1 ?? ?? ?? EB ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? [1111101.] 07 00 B0 E1 01 00 50 13 02 00 50 13 06 00 50 13 ?? ?0 9F 05 10 50 A0 13 B4 80 80 01 01 00 A0 03 18 09 84 05 05 00 A0 E1 10 D0 8D E2 F0 81 BD E8" [272] decl = "int Obs_Sound_SetAMRMode(HObj obs, int data_rate)" +NSG = "F8 40 2D E9 01 70 A0 E1 05 10 A0 E3 00 60 A0 E1 00 40 A0 E3 ?? ?? ?? EB 00 50 A0 E1 06 00 A0 E1 06 10 A0 E3 ?? ?? ?? EB 00 00 55 E3 ?? ?? ?? 1A 00 00 50 E3 05 40 A0 03 ?? ?? ?? 0A 00 50 A0 E1 05 00 A0 E1 ?? ?? ?? EB 00 00 50 E3 01 00 50 13 02 00 50 13 06 00 50 13 DC 78 C5 05 01 00 A0 03 E0 08 85 05 10 40 A0 13 04 00 A0 E1 F8 80 BD E8" +ELKA = "FF 41 2D E9 01 80 A0 E1 05 10 A0 E3 00 60 A0 E1 00 50 A0 E3 ?? ?? ?? EB 00 40 A0 E1 06 00 A0 E1 06 10 A0 E3 ?? ?? ?? EB 00 00 54 E3 ?? ?? ?? 1A 00 00 50 E3 05 50 A0 03 ?? ?? ?? 0A 00 40 A0 E1 04 00 A0 E1 ?? ?? ?? EB ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? [1111101.] 07 00 B0 E1 01 00 50 13 02 00 50 13 06 00 50 13 1C 89 C4 05 01 00 A0 03 20 09 84 05 10 50 A0 13 05 00 A0 E1 10 D0 8D E2 F0 81 BD E8" [273] decl = "int Obs_Sound_SetFIsRecording(HObj obs, int is_recording)" +NSG = "F8 40 2D E9 01 70 A0 E1 06 10 A0 E3 00 60 A0 E1 00 40 A0 E3 ?? ?? ?? EB 00 50 A0 E1 06 00 A0 E1 05 10 A0 E3 ?? ?? ?? EB 00 00 55 E3 05 40 A0 11 00 00 50 E3 00 40 A0 11 ?? ?? ?? 1A 00 00 54 E3 05 00 A0 03 ?? ?? ?? 0A 07 10 A0 E1 04 00 A0 E1 ?? ?? ?? EB F8 80 BD E8" +ELKA = "FE 40 2D E9 01 38 A0 E1 23 38 A0 E1 09 00 8D E9 01 70 A0 E1 ?? 10 8F E2 00 10 8D E5 00 50 A0 E1 ?? 0? ?F E5 ?? ?? ?? ?? 01 30 A0 E3 00 40 A0 E3 45 20 A0 E3 ?? ?? ?? [1111101.] 06 10 A0 E3 05 00 A0 E1 ?? ?? ?? EB 00 60 A0 E1 05 00 A0 E1 05 10 A0 E3 ?? ?? ?? EB 00 00 56 E3 06 40 A0 11 00 00 50 E3 00 40 A0 11 ?? ?? ?? 1A 00 00 54 E3 05 00 A0 03 ?? ?? ?? 0A 07 10 A0 E1 04 00 A0 E1 ?? ?? ?? EB FE 80 BD E8" [274] decl = "int Obs_Sound_SetMaxFileSize(HObj obs, int max_file_size)" +NSG = "10 40 2D E9 01 40 A0 E1 06 10 A0 E3 ?? ?? ?? EB 00 00 50 E3 04 10 A0 11 10 40 BD 18 05 00 A0 03 {?? 1? 80 E5 00 00 A0 E3 1E FF 2F E1} 10 80 BD E8" +ELKA = "3E 40 2D E9 01 38 A0 E1 23 38 A0 E1 09 00 8D E9 01 40 A0 E1 ?? 10 8F E2 00 10 8D E5 00 50 A0 E1 ?? 0? ?F E5 ?? ?? ?? ?? 01 30 A0 E3 45 20 A0 E3 ?? ?? ?? [1111101.] 06 10 A0 E3 05 00 A0 E1 ?? ?? ?? EB 00 00 50 E3 04 10 A0 11 0C D0 8D 12 30 40 BD 18 05 00 A0 03 {?? 1? 80 E5 00 00 A0 E3 1E FF 2F E1} 3E 80 BD E8" [275] decl = "int Obs_Sound_SetRecordingMode(HObj obs, int recording_mode)" +NSG = "38 40 2D E9 01 50 A0 E1 06 10 A0 E3 ?? ?? ?? EB 00 40 B0 E1 05 00 A0 03 ?? ?? ?? 0A 04 00 A0 E1 ?? ?? ?? EB 00 00 50 E3 01 00 50 13 02 00 50 13 05 10 A0 01 04 00 A0 01 38 40 BD 08 ?? ?? ?? 0A 10 00 A0 13 38 80 BD E8" +ELKA = "F0 40 2D E9 01 60 A0 E1 06 10 A0 E3 14 D0 4D E2 00 70 A0 E1 ?? ?? ?? EB 00 50 B0 E1 05 00 A0 03 ?? ?? ?? 0A 05 00 A0 E1 ?? ?? ?? EB ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? [1111101.] 00 00 54 E3 01 00 54 13 02 00 54 13 06 10 A0 01 05 00 A0 01 14 D0 8D 02 F0 40 BD 08 ?? ?? ?? 0A 10 00 A0 13 14 D0 8D E2 F0 80 BD E8" [276] decl = "int Obs_SetOutput_File(HObj obs, const WSHDR *filename)" decl_SG = "int Obs_SetOutput_File(HObj obs, const char *filename)" +NSG = "70 40 2D E9 46 DF 4D E2 01 50 A0 E1 00 40 A0 E1 ?? ?? ?? EB 00 00 50 E3 05 00 A0 03 ?? 00 00 0A 00 10 A0 E3 04 00 A0 E1 ?? ?? ?? EB 03 00 90 E8 ?? ?? ?? EB 00 00 50 E3 11 00 A0 13 ?? 00 00 1A 00 00 95 E5 ?? ?? ?? EB 00 00 50 E3 05 10 A0 11 04 00 A0 11 46 DF 8D 12 70 40 BD 18" [277] decl = "int Obs_SetOutput_Uid(HObj obs, int uid)" +NSG = "08 00 90 E5 38 10 80 E5 00 00 A0 E3 1E FF 2F E1 70 40 2D E9 01 60 A0 E1 00 50 A0 E1 00 40 A0 E3 ?? ?? ?? EB 00 00 50 E3 08 00 95 15 05 40 A0 03" [278] decl = "int Obs_Sound_SetBitrate(HObj obs, int bitrate)" +NSG = "70 40 2D E9 01 60 A0 E1 06 10 A0 E3 00 50 A0 E1 ?? ?? ?? EB 00 40 A0 E1 05 00 A0 E1 05 10 A0 E3 ?? ?? ?? EB 00 00 54 E3 04 00 A0 11 ?? ?? ?? 1A 00 00 50 E3 05 00 A0 03 70 80 BD 08 06 10 A0 E1 70 40 BD E8 ?? ?? ?? EA" +ELKA = "7F 40 2D E9 01 38 A0 E1 23 38 A0 E1 09 00 8D E9 01 60 A0 E1 ?? 10 8F E2 00 10 8D E5 00 40 A0 E1 ?? 0? ?F E5 ?? ?? ?? ?? 01 30 A0 E3 45 20 A0 E3 ?? ?? ?? [1111101.] 06 10 A0 E3 04 00 A0 E1 ?? ?? ?? EB 00 50 A0 E1 04 00 A0 E1 05 10 A0 E3 ?? ?? ?? EB 00 00 55 E3 05 00 A0 11 ?? ?? ?? 1A 00 00 50 E3 05 00 A0 03 ?? ?? ?? 0A 06 10 A0 E1 ?? ?? ?? EB 10 D0 8D E2 70 80 BD E8" [27A] decl = "int Obs_SetInput_Memory(HObj obs, int unk, char *buf, int len)" NSG = "F0412DE90380A0E10270A0E10060A0E10150A0E10040A0E3??????EB000050E3" -ELKA = false [27B] decl = "int Obs_SetUserPointer(HObj obs, void *user_pointer)" NSG = "70402DE90160A0E10050A0E10040A0E3??????EB000050E30540A003??????0A0610A0E10500A0E1" -ELKA = false [27C] decl = "int Obs_GetUserPointer(HObj obs, void **p_user_pointer)" +NSG = "70402DE90160A0E10050A0E10040A0E3??????EB000050E30540A003??????0A0610A0E10500A0E1??????EB0400A0E17080BDE8 70402DE90160A0E10050A0E10040A0E3??????EB000050E30540A003??????0A0500A0E1??????EB000086E50400A0E17080BDE8 + 0x34" [281] decl = "int8_t *RamIsRunJava()" @@ -3881,6 +3908,7 @@ NSG = "&(??,??,9F,E5,??,??,A0,E3,??,??,85,05,??,??) + D" [295] decl = "void Get_WS_extent(WSHDR *ws, int text_flags, int flags, int font_id, int *w, int *h)" ELKA = "FE,B5,16,1C,09,9A,0D,1C,08,99,04,1C,00,20,02,92,01,91,29,1C,32,1C,00,90,20,1C,??,??,??,??,FE,BD,80,B5,??,??,??,??,00,28,01,D0,??,??,??,??,80,BD,80,B5 + 1" +NSG = "FF B5 8D B0 16 9D 17 9C 2E 68 27 68 00 2D ?? D0 00 2C ?? D0 0D 9B 00 2B ?? D0 0D 98 ?? ?? ?? ?? 00 28 ?? D1 00 20 28 60 20 60 + 1" [296] decl = "void getProfileNameByN(WSHDR *name, int profile_id, int unk)" @@ -3898,8 +3926,8 @@ ELKA = "&(6C,50,9F,E5,64)+5C" [299] decl = "char *RamExtendedCameraState()" -NSG = "&(??,49,??,00,??,18,??,36)+4" -ELKA = "&(D8,70,1F,E5)+4" +NSG = "&(??,48,00,B5,01,79,00,29,??,D0,02,1C,FF,32)+4" +ELKA = "&(??,??,1F,E5,04,E0,2D,E5,04,00,D2,E5,00,00,50,E3,??,??,??,0A,43,01,D2,E5)+4" [29A] decl = "int AACC_AudioTransferReq(int oh, uint32_t type_and_conn)" @@ -3935,9 +3963,11 @@ NSG = """ [2A1] decl = "int RscMgr_CsSetColor(int id, const uint8_t *color)" +NSG = "B0 B5 04 1C 0D 1C ?? ?? ?? ?? 00 28 ?? D0 00 2D ?? D0 3C 2C ?? D3 00 20 B0 BD ?? 49 A0 00 40 18 28 30 04 22 29 1C+1" [2A2] decl = "void RscMgr_CsUpdate()" +NSG = "80 B5 ?? ?? ?? ?? 00 28 ?? D0 ?? 49 ?? 48 F0 22 28 31 02 30+1" [2A3] decl = "void UpdateMenuCursorItem(void *gui, int item_n)" @@ -5002,6 +5032,7 @@ NSG = "&(70402DE9??669FE50050A0E10140A0E1+4)" [38C] decl = "int sys_format(uint16_t drive, uint32_t *err)" +NSG = "38402DE90008A0E14008A0E10040A0E10150A0E1??????EB0030E0E300308DE50CC090E50000A0E30530A0E10020A0E30410A0E13CFF2FE13880BDE8" [38D] decl = "int sys_fstat(int fd, FSTATS *stat, uint32_t *err)" @@ -5010,22 +5041,22 @@ NSG = "7C,40,2D,E9,01,60,A0,E1,02,50,A0,E1,00,40,A0,E1,??,??,??,??,00,30,E0,E3,0 [38E] decl = "void CreateICL(PGROUP *pgroup)" NSG = "00,00,EF,06,30,A0,E1,02,20,A0,E3,05,10,A0,E1,05,00,A0,E3,??,??,??,EB,0C,00,D4,E5,00,00,50,E3,-21" -ELKA = "" +ELKA = "70 B5 04 1C 00 28 ?? 4E ?? 4D 0A D1 20 21 ?? A0 ?? F? ?? E? 02 DF 33 1C 29 1C 02 22 05 20 ?? F? ?? E? 20 7B 00 28 + 1" [38F] decl = "void *GBS_CreateProcessGroupResource(int mask, int unk_zero, PGROUP *pgroup, int size)" NSG = "F0,4D,2D,E9,01,70,A0,E1,00,60,A0,E1,??,??,??,E5,03,10,A0,E1,02,50,A0,E1" -ELKA = "" +ELKA = "FF B5 07 1C 15 1C 19 1C ?? 48 81 B0 ?? F? ?? F? 04 1C 10 D1 ?? 4E 2A 78 ?? A1 30 1C + 1" [390] decl = "void *GBS_GetCurrentTask()" NSG = "E5,00,00,90,E5,00,00,50,E3,38,00,40,12,1E,FF,2F,E1,-3" -ELKA = "" +ELKA = "?? 48 00 68 00 28 01 D0 38 38 70 47 00 20 70 47 + 1" [391] decl = "void *MemMBPAlloc(void *pool, int size)" NSG = "F0,4D,2D,E9,00,A0,A0,E3,01,80,A0,E1,??,??,??,E5,??,??,??,E5,00,40,B0,E1" -ELKA = "" +ELKA = "F3 B5 00 26 81 B0 00 96 04 1C 00 28 ?? 4E ?? 4D 0A D1 20 21 ?? A0 ?? F? ?? E? 02 DF 33 1C 29 1C 02 22 80 20 + 1" [392] decl = "void MemMBPFree(void *pool, void *ptr)" @@ -5033,12 +5064,11 @@ NSG = """ 00,00,EF,08,30,A0,E1,02,20,A0,E3,07,10,A0,E1,80,00,A0,E3,??,??,??,EB,00,00,54,E3,F0,81,BD,08,0C,50,44,E2,0C, 40,14,E5,06,00,54,E1,-25 """ -ELKA = "" +ELKA = "F8 B5 06 1C 0C 1C 00 28 ?? 4F 0A D1 20 21 ?? A0 ?? F? ?? E? 02 DF 3B 1C 02 22 80 20 ?? 49 + 1" [393] decl = "void *RamMopiResourcePool()" NSG = "*(43,72,74,47,50,72,6F,63,4E,6F,4D,65,6D,00,00,00,03,20,00,00,-4)" -ELKA = "" [394] decl = "RAND_METHOD *RAND_get_rand_method(void)" @@ -5165,17 +5195,20 @@ ELKA = "1C 40 2D E9 ?? 4? 9F E5 10 00 94 E5 5C 00 90 E5" [3B0] decl = "void SettingsAE_RegisterListener(SettingsAE_ListenerProc proc, int set_id, const char *entry, const char *keyword)" +NSG = "30 B5 85 B0 01 90 1D 1C 00 AB 00 20 19 72 14 1C 00 2A 03 90 04 90 ?? D0 20 1C ?? ?? ?? ?? 01 30 ?? ?? ?? ?? 03 90 21 1C ?? ?? ?? ?? 00 2D" [3B1] decl = "void SettingsAE_DeregisterListener(SettingsAE_ListenerProc proc, int set_id, const char *entry, const char *keyword)" +NSG = "10 B5 86 B0 02 90 1C 1C 00 AB 19 73 04 92 ?? 4A 00 21 ?? 48 01 92 10 22 00 91 02 A9 04 30 05 94 ?? 4B" [3B2] decl = "const WSHDR *MediaProc_GetLastAudioTrackDir()" -NSG = "B0 B5 C6 B0 05 A9 68 46 81 22 ?? [111100..] ?? [11.0....] ?? 4D 04 1C 28 69 80 30 C0 69" +NSG = "B0 B5 C6 B0 05 A9 68 46 81 22 ?? ?? ?? ?? ?? 4D 04 1C 28 69 80 30 C0 69" ELKA = "30 40 2D E9 47 DF 4D E2 18 10 8D E2 04 00 8D E2 81 20 A0 E3 ?? ?? ?? [1111101.] ?? 5? 1F E5 00 40 A0 E1 10 00 95 E5 9C 00 90 E5" [3B3] decl = "IMGHDR *GetIMGHDRFromCanvasCache(char canvas_id)" +NSG = "24 23 ?? 49 58 43 04 31 40 18 40 68 70 47+1" [3B4] decl = "void GetDate_ws(WSHDR *ws, const TDate *date, unsigned int unk)" @@ -5291,27 +5324,35 @@ F8 40 2D E9 00 70 A0 E1 01 00 A0 E1 01 50 A0 E1 02 40 A0 E1 ?? ?? ?? EB 00 60 A0 [3C0] decl = "int ShowWaitBox(int flags, int message)" +NSG = "B0B5041C0D1CC007??D50020????????431C??D10120????????431C??D1??4A??32??E0??4A??32291C201C????????B0BD??4A??32??E7??49??E7+1" [3C1] decl = "int ShowPleaseWaitBox(int flags)" +NSG = "B0B5041C0D1CC007??D50020????????431C??D10120????????431C??D1??4A??32??E0??4A??32291C201C????????B0BD??4A??32??E7??49??E7 + 39" [3C2] decl = "int ShowPBarBox(int flags, int message, PBAR_DESC *pbar_desc, int initial_value, WSHDR *initial_ws)" +NSG = "FFB50E1C81B0??9F??49151C??48????????041C??D0002D??D1??4D291C201C????????201C0499????????+1" [3C3] decl = "int SetPBarValue(int gui_id, int value)" +NSG = "10B50C1C0021????????0028??D0211C????????10BD+1" [3C4] decl = "int SetPBarText(int gui_id, WSHDR *ws)" +NSG = "??B50C1C0021????????0028??D0??4A??4B0092221C0321????????+1" [3C5] decl = "void *GetPBarProc3()" +NSG = "F0B5051C0020??B0??90??90??90??90002600270C68??E0201C????????0238+1" [3C6] decl = "void SetHeaderScrollText(void *header, const WSHDR *title, const void *malloc_fn, const void *mfree_fn)" +NSG = "F8B50D1C1143171C1E1C041C081C1843??D1201C????????0028??D16064F8BD281C????????0028??D03922920201+1" [3C7] decl = "void SetHeaderExtraText(void *header, const WSHDR *ws, const void *malloc_fn, const void *mfree_fn)" +NSG = "F8B50F1C161C1D1C041C0028??D0002E??D0002D??D0E0690028??D0????????00900028??D0291CE069????????6846????????2B1C321C391C201C????????012020640021201C????????F8BDF8B50F1C161C1D1C041C0028??D0002E??D0002D??D0E069+1" [3C8] decl = "int GetMimeType(int uid, WSHDR *mime_type, int occurrence)" @@ -5327,12 +5368,15 @@ SG = false # The MIME registry is present, but firmware has no UID-to-MIME wrapp [3C9] decl = "int wstrncmp(const WSHDR *ws1, const WSHDR *ws2, size_t n)" +NSG = "38 B5 03 68 1C 88 00 8A A0 42 00 D2 04 1C 20 04 00 0C 14 1C 82 42 00 D3 04 1C 08 68 24 04 05 88 09 8A 24 0C A9 42 00 D2 0D 1C 29 04 09 0C 8A 42 00 D3 0A 1C 11 04 00 22 D2 43 00 92 82 1C 98 1C 09 0C 0B 1C 21 1C ?? ?? ?? ?? 38 BD+1" [3CA] decl = "int wstricmp(const WSHDR *ws1, const WSHDR *ws2)" +NSG = "98 B5 03 68 0C 1C 19 88 00 8A 88 42 00 D2 01 1C 20 68 09 04 02 88 24 8A 09 0C 94 42 00 D2 22 1C 14 04 1F 22 D2 43 00 92 82 1C 98 1C 24 0C 23 1C ?? ?? ?? ?? 98 BD+1" [3CB] decl = "int wstrnicmp(const WSHDR *ws1, const WSHDR *ws2, size_t n)" +NSG = "38 B5 03 68 1C 88 00 8A A0 42 00 D2 04 1C 20 04 00 0C 14 1C 82 42 00 D3 04 1C 08 68 24 04 05 88 09 8A 24 0C A9 42 00 D2 0D 1C 29 04 09 0C 8A 42 00 D3 0A 1C 11 04 1F 22 D2 43 00 92 82 1C 98 1C 09 0C 0B 1C 21 1C ?? ?? ?? ?? 38 BD+1" [3CC] decl = "int PersMenuCSM_Open(const WSHDR *file_name, const WSHDR *dir, int flag, int open_mode)" @@ -5348,27 +5392,38 @@ SG = false # The SG/X75 personalization core requires a fifth argument and is no [3CD] decl = "void wstrtoupper(WSHDR *ws)" +NSG = "FC B5 05 1C 01 20 00 90 01 24 ?? E0 61 00 42 5A ?? 4E ?? 49 01 AB 30 1C ?? ?? ?? ?? 00 28 ?? D0 00 AB 98 88 80 00 80 19 40 88 98 80 98 88 41 0B+1" [3CE] decl = "void wstrtolower(WSHDR *ws)" +NSG = "FC B5 05 1C 01 20 00 90 01 24 ?? E0 61 00 42 5A ?? 4E ?? 49 01 AB 30 1C ?? ?? ?? ?? 00 28 ?? D0 00 AB 98 88 80 00 81 19 C8 88 49 88+1" [3CF] decl = "void wstrcapitalize(WSHDR *ws)" +NSG = "FC B5 05 1C 01 20 00 90 01 24 ?? E0 61 00 42 5A ?? 4E ?? 49 01 AB 30 1C ?? ?? ?? ?? 00 28 ?? D0 01 2C ?? D1 00 AB 98 88 80 00 80 19 40 88+1" [3D0] decl = "void RestartLockTimers()" +NSG = "F8 B5 ?? ?? ?? ?? ?? A6 ?? 4F 00 28 24 D0 ?? ?? ?? ?? 3C 23 58 43 C5 17 04 1C ?? A0 0C C8 29 1C 20 1C ?? ?? ?? ?? 0A D3 20 1C 39 1C ?? ?? ?? ?? 0C CE 08 3E" [3D1] decl = "void MediaProc_LaunchLastPlayback()" +NSG = "?? 49 80 B5 02 20 08 70 ?? F0 ?? F? 80 BD 98 B5 ?? 4C 69 46 01 22 60 68 + 1" +ELKA = "08402DE9 ??308FE2 00308DE5 0230A0E3 5320A0E3 ????9FE5 ????1FE5 ??????[1111101.] ????1FE5 0200A0E3 0000C1E5 0840BDE8 ??????EA 204D6564696150726F635F476F746F53746174654C61756E63684C617374506C61796261636B20" [3D2] decl = "int IsIconBarDisabled()" +NSG = false +ELKA = "?? 48 00 68 00 8B C0 07 01 D5 01 20 70 47 00 20 70 47 + 1" [3D3] decl = "void IllumFilterSet(int flags, int unk)" +NSG = "B0 B5 0C 1C C9 07 ?? 4D 04 D5 29 78 03 29 01 D0 ?? ?? ?? ?? 68 88 20 43 68 80 B0 BD" +ELKA = "F8 B5 06 1C ?? A2 00 92 23 22 0C 1C 00 23 E9 21 ?? A0 ?? ?? ?? ?? E0 07 ?? 4D 05 D5 28 78 03 28 02 D0 30 1C ?? ?? ?? ?? 68 88 20 43 68 80 F8 BD" [3D4] decl = "void DrawCroppedIMGHDR(int x, int y, int offset_x, int offset_y, int w, int h, int flags, const IMGHDR *img)" +NSG = "FF B5 87 B0 11 AF E0 CF 65 20 ?? ?? ?? ?? 04 1C 64 20 ?? ?? ?? ?? 03 1C 10 98 09 99 0A 9A+1" [3D5] decl = "int BuildPath(WSHDR *path, const WSHDR *file_name, const WSHDR *dir)" @@ -5390,24 +5445,31 @@ SG = """ [3D6] decl = "RECT *GetHeaderRECT(void)" +NSG = "1C 08 00 00 ?? ?? ?? A0 ?? ?? ?? A0 ?? ?? ?? A0 63 0D 00 00 ?? ?? ?? A0 ?? ?? ?? A0 ?? ?? ?? A0 73 00 00 00 ?? ?? ?? A0 00 00 ?? 00 ?? 00 ?? 00 00 00 00 00 FF FF FF 7F FF FF FF 7F + 28" [3D7] decl = "RECT *GetOptionsHeaderRECT(void)" +NSG = "?? ?? ?? A0 ?? ?? ?? A0 93 82 00 00 ?? ?? ?? A0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ?? 00 ?? 00 ?? 00 00 00 00 00 96 01 00 00 FF FF FF 7F 3D 00 00 00 FE FF FF FF 19 00 00 00 3B 00 00 00 2F 00 2F 00 + 1C" [3D8] decl = "RECT *GetMainAreaRECT(void)" +NSG = "1F 5B 64 64 6C 73 6D 6E 75 F7 00 00 01 00 00 00 ?? ?? ?? A0 ?? ?? ?? A0 00 00 00 00 00 00 00 00 ?? ?? ?? A0 00 00 ?? 00 ?? 00 ?? ?? 05 00 00 00 64 00 00 00 65 00 00 00 + 24" [3D9] decl = "int GetPITSize()" +NSG = "?? 00 9F E5 1E FF 2F E1 10 40 2D E9 ?? ?? 50 E2 ?? ?? 5C 22 00 40 A0 E1 0D 00 00 2A 04 00 A0 E1" [3DA] decl = "uint16_t wstriwstr(const WSHDR *ws, const WSHDR *search, uint32_t start_pos)" +NSG = "F7 B5 92 B0 15 1C 02 22 0C A9 07 A8 ?? ?? ?? ?? 06 90 68 46 02 22 05 A9 ?? ?? ?? ?? 07 1C 12 98 ?? 4E 00 28 0F 96+1" [3DB] decl = "void wstrreplace(WSHDR *dest, const WSHDR *src, uint32_t pos)" +NSG = "F8 B5 06 1C 0D 1C 14 1C ?? D0 28 1C ?? ?? ?? ?? 00 90 01 23 22 1C 29 1C 30 1C+1" [3DC] decl = "int GetUnicodeSymbolByDynIcon(int dyn_icon)" +NSG = "?? 49 B0 B5 40 18 ?? 28 ?? 4D ?? 4C ?? D8 80 28 ?? D2 71 21 49 02 40 18 00 04 00 0C B0 BD+1" [3DD] decl = "uint32_t ReadValueFromPDFile(uint32_t file_id, const char *key, char *value, uint32_t *size)" @@ -5518,36 +5580,47 @@ NSG = "38 B5 00 93 15 1C 42 68 00 23 14 6A" [3EF] decl = "int16_t GetLgpIcon(int lgp_id)" +NSG = "?? 49 B0 B5 41 18 53 29 ?? D2 ?? 49 80 00 09 68 08 18 ?? 49 40 18 40 6B B0 BD+1" [3F0] decl = "void Countdown_Start()" +NSG = "7C 40 2D E9 ?? 6? 9F E5 ?? 5? 8F E2 ?? ?? ?? EB ?? ?? ?? EB 00 10 A0 E1 FA 0F A0 E3 ?? ?? ?? EB ?? 2? 8F E2 0C 00 92 E8 00 10 A0 E3" [3F1] decl = "void Countdown_Stop()" +NSG = "70 40 2D E9 ?? ?? ?? EB ?? 6? ?F E5 00 50 A0 E3 08 50 86 E5 00 00 96 E5 00 00 50 E3 70 80 BD 08 ?? 4? ?F E5 04 00 A0 E1 ?? ?? ?? ?? 04 00 A0 E1 ?? ?? ?? ?? 00 50 86 E5 70 80 BD E8" [3F2] decl = "int Countdown_IsEnabled()" +NSG = "10 40 2D E9 ?? 4? 9F E5 00 00 A0 E3 04 00 84 E5 0C 00 94 E5 00 00 50 E3 02 00 00 1A ?? ?? ?? EB 01 00 A0 E3 0C 00 84 E5 08 00 94 E5 00 00 50 E3" [3F3] decl = "int Countdown_GetRemainingTime()" +NSG = "08 40 2D E9 ?? ?? ?? ?? 40 10 1F E5 04 20 91 E5 08 10 91 E5 01 00 52 E1 04 00 00 8A 00 00 52 E1 09 00 00 8A 00 00 51 E1 07 00 00 3A" [3F4] decl = "void Countdown_PlaySound(long tone_type)" +NSG = "F8 40 2D E9 00 70 A0 E1 ?? ?? ?? ?? 00 50 A0 E1 ?? ?? ?? ?? 00 40 A0 E1 ?? ?? ?? ?? 01 00 54 E3 ?? 00 00 0A ?? 6? 9F E5 00 30 A0 E3 04 20 96 E5 00 30 8D E5 00 00 52 E3 05 00 80 01 04 00 90 01 ?? 1? 9F E5 ?? 00 00 0A 05 30 A0 E3 00 20 A0 E3 0D 00 A0 E3 ?? ?? ?? EB 01 00 A0 E3 04 00 86 E5" [3F5] decl = "int *RamIsCountdownRingUIActive()" +NSG = "&(00 10 A0 E1 ?? 0? 9F E5 04 E0 2D E5 00 20 90 E5 44 D0 4D E2 00 00 52 E3 00 00 A0 13 ?? 00 00 1A 01 20 A0 E3 00 20 80 E5 + 4)" [3F6] decl = "WIDGET *CreateScrollbarWidget(const void *malloc_fn)" +NSG = "80 B5 00 21 41 62 81 62 ?? 49 ?? F? ?? F? 80 BD 80 B5 01 1C 2C 20 88 47 FF F7 F2 FF 80 BD + 0x11" [3F7] decl = "void Scrollbar_Configure(WIDGET *scrollbar, int limit, int unk1, int unk2)" +NSG = "BC B5 04 1C 00 7B 0D 1C 02 28 ?? D1 69 46 20 1C ?? F? ?? F? 00 AB 06 20 18 5E 02 21 59 5E 41 1A 01 31 00 2D + 1" [3F8] decl = "void Scrollbar_SetValue(WIDGET *scrollbar, int value)" +NSG = "02 6A 8A 42 00 D9 81 61 70 47 80 69 70 47 82 69 0B 1C 01 6A + 1" [3F9] decl = "int IsAnyOfAccessoriesConnected(const enum Accessory *accessory_ids, uint8_t count)" +NSG = "F0 41 2D E9 ?? 7? ?? E5 00 50 A0 E1 00 00 D7 E5 01 60 A0 E1 00 40 A0 E3 00 00 50 E3 ?? 00 00 0A ?? 8? ?? E5 08 00 A0 E1 ?? ?? ?? [111.101.] 08 C0 97 E5 00 00 5C E3 ?? 00 00 0A 00 10 A0 E3 ?? 00 00 EA 01 20 D5 E7 0C 00 A0 E1 04 30 D0 E5" [3FA] decl = "void SetMaxIllumIntensity(int unk3, uint32_t level)" From 82e5890907d90538b8180c63ca910fd2ba447a8c Mon Sep 17 00:00:00 2001 From: Kirill Zhumarin Date: Tue, 27 Oct 2026 09:21:50 +0000 Subject: [PATCH 12/14] Update patterns --- swilib/patterns.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/swilib/patterns.toml b/swilib/patterns.toml index c2ea3f16..c2c226db 100644 --- a/swilib/patterns.toml +++ b/swilib/patterns.toml @@ -5629,11 +5629,11 @@ ELKA = "89 00 89 18 49 78 ?? [01110...] ?? [01111...] A1 42 ?? D9 ?? [01110...] [3FB] decl = "int sys_mount(uint16_t drive, uint32_t *err)" -NSG = "04 30 A0 E1 06 10 A0 E1 5C C0 95 E5 - 0x24" +NSG = "38 40 2D E9 00 08 A0 E1 40 08 A0 E1 00 40 A0 E1 01 50 A0 E1 ?? ?? ?? EB 5C C0 90 E5 04 D0 8D E2 05 20 A0 E1 04 10 A0 E1 30 40 BD E8 00 00 A0 E3" [3FC] decl = "int sys_unmount(uint16_t drive, uint32_t *err)" -NSG = "04 30 A0 E1 06 10 A0 E1 60 C0 95 E5 - 0x24" +NSG = "38 40 2D E9 00 08 A0 E1 40 08 A0 E1 00 40 A0 E1 01 50 A0 E1 ?? ?? ?? EB 60 C0 90 E5 04 D0 8D E2 05 20 A0 E1 04 10 A0 E1 30 40 BD E8 00 00 A0 E3" [3FD] decl = "int setfiletime(int fd, uint16_t date, uint16_t time, uint32_t *err)" From 4a6aa54874c262f30f2933212c4b1c56c4530fd4 Mon Sep 17 00:00:00 2001 From: Kirill Zhumarin Date: Tue, 27 Oct 2026 09:59:18 +0000 Subject: [PATCH 13/14] Fix swilib functions declarations --- swilib/include/swilib/sound.h | 1 + swilib/include/swilib/telephony.h | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/swilib/include/swilib/sound.h b/swilib/include/swilib/sound.h index d29d388f..6ab6fef5 100644 --- a/swilib/include/swilib/sound.h +++ b/swilib/include/swilib/sound.h @@ -463,6 +463,7 @@ __swi_end(0x29A, AACC_AudioTransferReq, (oh, type_and_conn)); * @param unk2 unknown, set to 1 * @param duration duration in ms * @warning Untested function that is not found in any ELF's. + * @platforms X75, SG * */ __swi_begin(0x034) void PlaySoundLoop(int unk1, int unk2, int duration) diff --git a/swilib/include/swilib/telephony.h b/swilib/include/swilib/telephony.h index 5ca5ed37..0213aa6e 100644 --- a/swilib/include/swilib/telephony.h +++ b/swilib/include/swilib/telephony.h @@ -351,11 +351,12 @@ void EndCallBusy(int param1, int param2) __swi_end(0x066, EndCallBusy, (param1, param2)); /** - * Pointer to the number from the last call. - * @return unknown + * Number of the last call in call slot 1, as UTF-16 characters. + * @return pointer to the first character; the length is at index -1 + * @note Kept until the next call that gets slot 1. * */ __swi_begin(0x8253) -char *RamLastCallNum() +uint16_t *RamLastCallNum() __swi_end(0x8253, RamLastCallNum, ()); /** From 931da451eaecf333a4c7e2b676cfff6fac602571 Mon Sep 17 00:00:00 2001 From: Kirill Zhumarin Date: Tue, 27 Oct 2026 09:59:59 +0000 Subject: [PATCH 14/14] Update patterns --- swilib/patterns.toml | 257 ++++++++++++++++++++++++------------------- 1 file changed, 146 insertions(+), 111 deletions(-) diff --git a/swilib/patterns.toml b/swilib/patterns.toml index c2c226db..cd48df25 100644 --- a/swilib/patterns.toml +++ b/swilib/patterns.toml @@ -348,7 +348,7 @@ NSG = "08402DE90030A0E300308DE5????????0880BDE8" [034] decl = "void PlaySoundLoop(int unk1, int unk2, int duration)" -NSG = "F0402DE9??D04DE20170A0E10250A0E10040A0E1" +NSG = false [035] decl = "void AlarmClockRing(void)" @@ -538,7 +538,7 @@ NSG = """ 10 40 2D E9 00 40 A0 E1 ?? ?? ?? EB 01 00 50 E3 ?? ?? ?? 1A 04 00 A0 E1 ?? ?? ?? EB 01 00 50 E3 10 80 BD 08 00 00 A0 E3 10 80 BD E8 """ -ELKA = "??4A4168914204D10068002801D0012070470020+1" +ELKA = "10 B5 04 1C ?? F0 ?? ?? 01 28 05 D1 20 1C ?? F0 ?? ?? 01 28 00 D1 10 BD 00 20 10 BD + 1" [058] decl = "void ClearMemory(void *ptr, int num)" @@ -603,7 +603,8 @@ NSG = "*(4E6174697665204D656E75000000000000000000000000000000000000000000 + 20)" [062] decl = "void SetVibraStatus(int status)" -NSG = "10,B5,??,1C,??,48,{??,B5,??,1C,??,04,??,48,??,0C,??,38,??,68,??,28}" +NSG = "10 B5 04 1C ?? 48 ?? F? ?? F? 00 21 20 1C ?? A2 ?? F0 ?? ?? 10 BD" +ELKA = "10 B5 04 1C ?? 48 ?? F? ?? F? 00 A2 D0 3A 00 21 20 1C ?? F0 ?? ?? 10 BD" [063] decl = "void MMI_CanvasBuffer_FlushV(char canvas_id)" @@ -893,10 +894,10 @@ SG = """ [08D] decl = "void getCurrentProfileName(WSHDR *name)" -NSG = """ -??,B5,??,1C, {??,B5,??,22,??,21,??,46,??,??,??,??,??,??,??,28,??,D0,??,??,??,??,??,99,??,42,??,DD,??,1C,??, -BD} ,??,1C,??,22,??,1C,??,??,??,??,??,BD -""" +NSG = [ + "??,B5,??,1C,{??,B5,??,22,??,21,??,46,??,??,??,??,??,??,??,28,??,D0,??,??,??,??,??,99,??,42,??,DD,??,1C,??,BD},??,1C,??,22,??,1C,??,??,??,??,??,BD", + "??,B5,??,1C,??,??,??,??,??,1C,??,22,??,1C,??,??,??,??,??,BD,??,B5,??,4E,??,25,??,43,??,1C,??,1C,??,36 + 1", +] [08E] decl = "int sys_rename(const char *old_name, const char *new_name, uint32_t *err)" @@ -1304,8 +1305,11 @@ NSG = "" [0D4] decl = "char *RamMissedMessage()" -NSG = "*(EC130000CB0400003C0A0000FFFF0000-8) + 28" -ELKA = "*(EC130000CB0400003C0A0000FFFF0000-8) + 2C" +NSG = "&(??4A02C0D16A101C806A0029??D00321032800D2011C06204843) + 28" +ELKA = [ + "&(??4A02C0116B101CC06A0029??D00321032800D2011C06204843) + 2C", + "&(??4A02C0D16A101C806A0029??D00321032800D2011C06204843) + 28", +] [0D5] decl = "int *RamIsLocked(void)" @@ -1358,7 +1362,7 @@ NSG = "&(??,B5,??,28,??,D1,??,21,??,??,??,??,??,??,??,??,??,??,??,??,??,49,??,?? ELKA = [ "*(????DFA8?7??DAA826640000 + 4) - 7", "*(????DFA8?3??DAA826640000 + 4) - 3", - "&(??,B5,??,28,??,D1,??,21,??,??,??,??,??,??,??,??,??,??,??,??,??,49,??,??,??,??,??,49 + 1A) + AC", + "&(9E B5 01 28 23 D1 ?? F? ?? E? ?? 4C ?? 48 00 21 20 18 C1 60 01 61 41 61 81 61 C1 61 F0 21 + A) + B4", ] [0E1] @@ -1450,7 +1454,10 @@ NSG = "" [0F5] decl = "void *Ram_LCD_Overlay_Layer()" NSG = "&(E08170BD70B5051C0C1C??????48 + 0C)" -ELKA = "*(431A01332A1CA06A????????201C+30)" +ELKA = [ + "&(9E,B5,01,28,??,D1,??,F?,??,F?,??,4C,00,21,20,1C,C0,30 + 0A) + 4", + "&(9E,B5,01,28,??,D1,??,F?,??,??,??,4C + 0A)", +] [0F6] decl = "LCDLAYER_LIST *RamLcdMainLayersList()" @@ -1592,14 +1599,14 @@ NSG = "??,1C,??,1C,??,1C,??,??,??,B5,??,68,??,??,??,??,??,BD + 1" [108] decl = "CSM_RAM *FindCSMbyID(int id)" -NSG = """ -??,1C,??,??,??,B5,??,68,_blf(??,28,??,D1,??,47,??,68,??,E0,??,68,??,2A,??,D0,??,68,??,42,??,D1,??,E0,??,6A, -??,E0,??,68,??,2A,??,D0,??,68,??,42,??,D1,??,1C,??,47),??,BD + 1 -""" +NSG = [ + "??,1C,??,??,??,B5,??,68,_blf(??,28,??,D1,??,47,??,68,??,E0,??,68,??,2A,??,D0,??,68,??,42,??,D1,??,E0,??,6A,??,E0,??,68,??,2A,??,D0,??,68,??,42,??,D1,??,1C,??,47),??,BD + 1", + "13,1C,0A,1C,01,1C,??,48,80,B5,80,68,??,??,??,??,80,BD,01,1C,??,48,80,B5,80,68,??,??,??,??,80,BD + 13", +] [109] decl = "void DoIDLE(void)" -NSG = "??,1C,??,??,??,B5,??,68,??,68,??,??,??,??,??,??,??,BD + 1" +NSG = "??,1C,??,??,??,B5,??,68,??,68,??,??,??,??,??,??,??,BD,00,20,F4,E7 + 13" [10A] decl = "void *GetConfig(uint32_t id)" @@ -1795,28 +1802,28 @@ SG = "10,B5,04,1C,??,D0,A1,68,00,29,??,D0,E0,68,01,28,??,D1,20,68,88,47,A1,68,20 [12A] decl = "void DrawObject(DRWOBJ *drwobj)" -NSG = """ -??,B5,??,1C,_blf(??,B5,??,46,??,??,??,??,??,??,??,28,??,D0,??,AB,??,78,??,01,??,58,??,BD,??,??,??,??,??,6B, -??,42,??,D1,??,??,??,??,??,E7,??,20,??,E7),??,28,??,D0,??,1C,??,??,??,??,??,BD -""" +NSG = "??,B5,04,1C,??,??,??,??,??,28,??,D0,21,1C,_blf(??,B5,0D,1C,04,1C,00,28,??,D0,00,2D,??,D0),??,BD" [12B] decl = "void AddKeybMsgHook(KeybMsgHookProc callback)" -NSG = """ -??,B5,_blf(??,B5,??,??,??,1C,??,68,??,25,??,28,??,D1,??,??,??,60,??,60,??,60,??,20,??,??,??,??,??,28,??,D0, -??,60,??,73,??,1C,??,1C,??,??,??,??,??,BD),??,BD -""" +NSG = [ + "??,B5,_blf(??,B5,??,??,??,1C,??,68,??,25,??,28,??,D1,??,??,??,60,??,60,??,60,??,20,??,??,??,??,??,28,??,D0,??,60,??,73,??,1C,??,1C,??,??,??,??,??,BD),??,BD", + "80,B5,??,??,??,??,80,BD,80,B5,??,??,??,??,80,BD,80,B5,??,??,??,??,80,BD,80,B5,03,28,03,D0,04,28 + 0", +] [12C] decl = "int AddKeybMsgHook_end(KeybMsgHookProc callback)" -NSG = """ -??,B5,_blf(??,B5,??,??,??,1C,??,68,??,28,??,D1,??,60,??,60,??,48,??,60,??,20,??,??,??,??,??,68,??,29,??,D0, -??,7B,??,29,??,D0,??,28,??,D1,??,20,??,BD,??,21,??,60,??,73,??,1C,??,1C,??,??,??,??,??,20,??,BD),??,BD -""" +NSG = [ + "??,B5,_blf(??,B5,??,??,??,1C,??,68,??,28,??,D1,??,60,??,60,??,48,??,60,??,20,??,??,??,??,??,68,??,29,??,D0,??,7B,??,29,??,D0,??,28,??,D1,??,20,??,BD,??,21,??,60,??,73,??,1C,??,1C,??,??,??,??,??,20,??,BD),??,BD", + "80,B5,??,??,??,??,80,BD,80,B5,??,??,??,??,80,BD,80,B5,??,??,??,??,80,BD,80,B5,03,28,03,D0,04,28 + 9", +] [12D] decl = "void RemoveKeybMsgHook(KeybMsgHookProc callback)" -NSG = "??,B5,_blf(??,??,??,B5,??,68,??,E0,??,68,??,42,??,D1,??,1C,??,??,??,??,??,BD,??,68,??,29,??,D1,??,BD),??,BD" +NSG = [ + "??,B5,_blf(??,??,??,B5,??,68,??,E0,??,68,??,42,??,D1,??,1C,??,??,??,??,??,BD,??,68,??,29,??,D1,??,BD),??,BD", + "80,B5,??,??,??,??,80,BD,80,B5,??,??,??,??,80,BD,80,B5,??,??,??,??,80,BD,80,B5,03,28,03,D0,04,28 + 11", +] [12E] decl = "char *GetPaletteAdrByColorIndex(int index)" @@ -2014,10 +2021,10 @@ NSG = """ [14B] decl = "void DrwObj_SetColor(DRWOBJ *drwobj, const char *pen, const char *brush)" -NSG = """ -??,B5,??,1C,??,1C,??,1C,??,1C,_blf(??,29,??,D0,??,28,??,D1,??,20,??,E7,??,78,??,70,??,78,??,70,??,78,??,70, -??,78,??,70,??,47),??,1D,??,1C,??,??,??,??,??,78,??,21,??,43,??,70,??,BD -""" +NSG = [ + "??,B5,??,1C,??,1C,??,1C,??,1C,_blf(??,29,??,D0,??,28,??,D1,??,20,??,E7,??,78,??,70,??,78,??,70,??,78,??,70,??,78,??,70,??,47),??,1D,??,1C,??,??,??,??,??,78,??,21,??,43,??,70,??,BD", + "??,B5,??,1C,??,1C,??,1C,??,1C,??,??,??,??,??,1D,??,1C,??,??,??,??,??,78,??,21,??,43,??,70,??,BD,10,B5,04,1C,08,1C,E1,1C", +] [14C] decl = "void DrawString(WSHDR *text, int x1, int y1, int x2, int y2, int font, int text_flags, const char *pen, const char *brush)" @@ -2096,7 +2103,7 @@ ELKA = """ [155] decl = "png_structp png_create_read_struct(png_const_charp user_png_ver, png_voidp error_ptr, png_error_ptr error_fn, png_error_ptr warn_fn)" -NSG = "??,B5,0D,1C,00,21,16,1C,00,22,??,??,??,??,??,??,29,1C" +NSG = "??,B5,0D,1C,00,21,16,1C,00,22,??,??,??,??,??,??,29,1C,??,??,??,??,??,??,_blf(??,B5,81,B0,0A,9E,05,1C,32,1C,01,20)" [156] decl = "png_infop png_create_info_struct(png_structp png_ptr)" @@ -2132,7 +2139,7 @@ NSG = "??,B5,04,1C,0F,1C,00,21,??,??,??,??,??,??,26,1C,FF,36,5D,36" [15E] decl = "png_voidp png_get_io_ptr(png_structp png_ptr)" -NSG = "80,30,40,69,70,47 + 1" +NSG = "80,30,40,69,70,47,??,48,70,47 + 1" [15F] decl = "png_uint_32 png_get_rowbytes(png_structp png_ptr, png_infop info_ptr)" @@ -2194,17 +2201,17 @@ BD},??,BD [169] decl = "int ExtractEditControl(void *gui, int n, EDITCONTROL *ec)" -NSG = """ -??,B5,??,30,??,??, {??,B5,??,30,??,68, {??,B5,??,6A, {??,B5,??,??,??,1C,??,2C,??,D0,??,1C,??,??,??,??,??,28, -??,D0,??,1C,??,1C,??,1C,??,??,??,??,??,20,??,BD} ,??,BD} ,??,BD} ,??,BD -""" +NSG = [ + "??,B5,??,30,??,??,{??,B5,??,30,??,68,{??,B5,??,6A,{??,B5,??,??,??,1C,??,2C,??,D0,??,1C,??,??,??,??,??,28,??,D0,??,1C,??,1C,??,1C,??,??,??,??,??,20,??,BD},??,BD},??,BD},??,BD", + "80,B5,80,30,??,??,??,??,??,??,80,BD,80,B5,80,30,??,??,??,??,??,??,80,BD,98,B5,14,1C,04,9A,80,30,00,92,??,??,22,1C,??,??,??,??,98,BD,80,B5,80,30,??,??,??,??,??,??,80,BD,80,B5,80,30,??,??,??,??,??,??,80,BD,70,B5,04,1C,80,30,??,??,0E,1C,80,30,15,1C,11,1C + 1", +] [16A] decl = "int StoreEditControl(void *gui, int n, const EDITCONTROL *ec)" -NSG = """ -??,B5,??,30,??,??, {??,B5,??,30,??,68, {??,B5,??,1C,??,1C,??,1C,??,??,??,FD,??,42,??,D1,??,1C,??,1C,??,??, -??,FE,??,BD} ,??,BD} ,??,BD -""" +NSG = [ + "??,B5,??,30,??,??,{??,B5,??,30,??,68,{??,B5,??,1C,??,1C,??,1C,??,??,??,FD,??,42,??,D1,??,1C,??,1C,??,??,??,FE,??,BD},??,BD},??,BD", + "80,B5,80,30,??,??,??,??,??,??,80,BD,80,B5,80,30,??,??,??,??,??,??,80,BD,98,B5,14,1C,04,9A,80,30,00,92,??,??,22,1C,??,??,??,??,98,BD,80,B5,80,30,??,??,??,??,??,??,80,BD,80,B5,80,30,??,??,??,??,??,??,80,BD,70,B5,04,1C,80,30,??,??,0E,1C,80,30,15,1C,11,1C + D", +] [16B] decl = "int sys_unlink(const char *path, uint32_t *err)" @@ -2572,10 +2579,10 @@ NSG = """ [19B] decl = "void EDIT_SetFocus(void *gui, int n)" -NSG = """ -??,B5,??,30,??,??, {??,B5,??,30,??,68, {??,B5,??,1C,??,1C,??,6A,??,??,??,??,??,1C,??,??,??,??,??,21,??,43, -??,1C,??,1C} ,??,BD} ,??,BD -""" +NSG = [ + "??,B5,??,30,??,??,{??,B5,??,30,??,68,{??,B5,??,1C,??,1C,??,6A,??,??,??,??,??,1C,??,??,??,??,??,21,??,43,??,1C,??,1C},??,BD},??,BD", + "80,B5,80,30,??,??,??,??,??,??,80,BD,80,B5,80,30,??,??,??,??,??,??,80,BD,80,B5,80,30,??,??,??,??,??,??,80,BD,B0,B5,04,1C,12,D0,08,1C,12,38,08,28 + D", +] [19C] decl = "void SEQKILLER(void *data, void (*next_in_seq)(void *), void *data_to_kill)" @@ -2630,7 +2637,7 @@ SG = "03,1C,??,??,03,60,02,71,C1,80,70,47 + 1" [1A6] decl = "int IsTimerProc(GBSTMR *timer)" NSG = "10,40,2D,E9,00,40,A0,E1,??,??,??,??,01,00,50,E3,??,??,??,1A,04,00,A0,E1,??,??,??,??,01,00,50,E3" -ELKA = "??4A4168914204D10068002801D001207047+1" +ELKA = "10 B5 04 1C ?? F0 ?? ?? 01 28 05 D1 20 1C ?? F0 ?? ?? 01 28 00 D1 10 BD 00 20 10 BD + 1" [1A7] decl = "char *Get_CC_NC()" @@ -2763,17 +2770,17 @@ ELKA = "??????E5??????E1??????E2??????E2??????13??????11??????E5??????E5" [1C6] decl = "void EDIT_ExtractFocusedControl(void *gui, EDITCONTROL *ec)" -NSG = """ -??,B5,??,30,??,??, {??,B5,??,30,??,68, {??,B5,??,6A, {??,B5,??,1C,??,??,??,??,??,1C,??,22,??,1C,??,??,??,??, -??,BD} ??,BD} ,??,BD} ,??,BD -""" +NSG = [ + "??,B5,??,30,??,??,{??,B5,??,30,??,68,{??,B5,??,6A,{??,B5,??,1C,??,??,??,??,??,1C,??,22,??,1C,??,??,??,??,??,BD} ??,BD},??,BD},??,BD", + "98,B5,14,1C,04,9A,80,30,00,92,??,6?,22,1C,??,F?,??,??,98,BD,80,B5,80,30,??,6?,??,F?,??,??,80,BD,80,B5,80,30,??,6?,??,F?,??,??,80,BD,70,B5,04,1C,80,30,??,6?,0E,1C,80,30,15,1C,11,1C - 18C", +] [1C7] decl = "int EDIT_StoreControlToFocused(void *gui, const EDITCONTROL *ec)" -NSG = """ -??,B5,??,30,??,??, {??,B5,??,30,??,68, {??,B5,??,1C,??,6A,??,B0,??,90,??,1C,??,??,??,??,??,1C,??,1C,??,??, -??,??,??,90,??,1C} ,??,BD} ,??,BD -""" +NSG = [ + "??,B5,??,30,??,??,{??,B5,??,30,??,68,{??,B5,??,1C,??,6A,??,B0,??,90,??,1C,??,??,??,??,??,1C,??,1C,??,??,??,??,??,90,??,1C},??,BD},??,BD", + "98,B5,14,1C,04,9A,80,30,00,92,??,6?,22,1C,??,F?,??,??,98,BD,80,B5,80,30,??,6?,??,F?,??,??,80,BD,80,B5,80,30,??,6?,??,F?,??,??,80,BD,70,B5,04,1C,80,30,??,6?,0E,1C,80,30,15,1C,11,1C - 180", +] [1C8] decl = "EDITC_OPTIONS *PrepareEditCOptions(EDITC_OPTIONS *options)" @@ -2831,23 +2838,31 @@ F0 45 2D E9 ?? D? 4D E2 00 60 B0 E1 ?? 4? A0 E3 ?? ?? ?? 0A 06 00 A0 E1 ?? ?? ?? [1D1] decl = "void EDIT_RemoveEditControl(void *gui, int n)" -NSG = "??,B5,??,30,??,??, {??,B5,??,30,??,68, {??,B5,??,1C,??,1C,??,??,??,??,??,1C,??,1C} ,??,BD} ,??,BD" +NSG = [ + "??,B5,??,30,??,??, {??,B5,??,30,??,68, {??,B5,??,1C,??,1C,??,??,??,??,??,1C,??,1C} ,??,BD} ,??,BD", + "98,B5,14,1C,04,9A,80,30,00,92,??,6?,22,1C,??,F?,??,??,98,BD,80,B5,80,30,??,6?,??,F?,??,??,80,BD,80,B5,80,30,??,6?,??,F?,??,??,80,BD,70,B5,04,1C,80,30,??,6?,0E,1C,80,30,15,1C,11,1C + 14", +] [1D2] decl = "void EDIT_InsertEditControl(void *gui, int n, const EDITCONTROL *ec)" -NSG = "??,B5,??,30,??,??, {??,B5,??,30,??,68, {??,B5,??,1C,??,1C,??,B0,??,??,??,??,??,1C,??,1C} ,??,BD} ,??,BD" +NSG = [ + "??,B5,??,30,??,??, {??,B5,??,30,??,68, {??,B5,??,1C,??,1C,??,B0,??,??,??,??,??,1C,??,1C} ,??,BD} ,??,BD", + "98,B5,14,1C,04,9A,80,30,00,92,??,6?,22,1C,??,F?,??,??,98,BD,80,B5,80,30,??,6?,??,F?,??,??,80,BD,80,B5,80,30,??,6?,??,F?,??,??,80,BD,70,B5,04,1C,80,30,??,6?,0E,1C,80,30,15,1C,11,1C + 20", +] [1D3] decl = "int EDIT_GetCursorPos(void *gui)" -NSG = "??,B5,??,30,??,??, {??,B5,??,30,??,68, {??,B5,??,6A, {??,??,70,47} ,??,BD} ,??,BD} ,??,BD" +NSG = [ + "??,B5,??,30,??,??, {??,B5,??,30,??,68, {??,B5,??,6A, {??,??,70,47} ,??,BD} ,??,BD} ,??,BD", + "98,B5,14,1C,04,9A,80,30,00,92,??,6?,22,1C,??,F?,??,??,98,BD,80,B5,80,30,??,6?,??,F?,??,??,80,BD,80,B5,80,30,??,6?,??,F?,??,??,80,BD,70,B5,04,1C,80,30,??,6?,0E,1C,80,30,15,1C,11,1C - 144", +] [1D4] decl = "void EDIT_SetCursorPos(void *gui, int position)" -NSG = """ -??,B5,??,30,??,??, {??,B5,??,30,??,68, {??,B5,??,1C,??,1C,??,??,??,??,??,1C,??,??,??,??,??,1C,??,1C,??,D0, -??,21,??,43,??,1C,??,??,??,??,??,1C,??,1C,??,??,??,??,??,1C,??,1C,??,D0,??,1C,??,1C,??,??,??,??,??,21} ,??, -BD} ,??,BD -""" +NSG = [ + "??,B5,??,30,??,??,{??,B5,??,30,??,68,{??,B5,??,1C,??,1C,??,??,??,??,??,1C,??,??,??,??,??,1C,??,1C,??,D0,??,21,??,43,??,1C,??,??,??,??,??,1C,??,1C,??,??,??,??,??,1C,??,1C,??,D0,??,1C,??,1C,??,??,??,??,??,21},??,BD},??,BD", + "98,B5,14,1C,04,9A,80,30,00,92,??,6?,22,1C,??,F?,??,??,98,BD,80,B5,80,30,??,6?,??,F?,??,??,80,BD,80,B5,80,30,??,6?,??,F?,??,??,80,BD,70,B5,04,1C,80,30,??,6?,0E,1C,80,30,15,1C,11,1C - 138", +] [1D5] decl = "char *Get_Phone_Info(int index)" @@ -2863,14 +2878,17 @@ NSG = "80,30,01,6B,20,22,11,43,01,63,70,47 + 1" [1D8] decl = "int EDIT_IsMarkModeActive(void *gui)" -NSG = "??,B5,??,30,??,??, {??,B5,??,30,??,68, {??,B5,??,??,??,F9,??,28,??,D1,??,20,??,BD,??,20,??,BD} ,??,BD} ,??,BD" +NSG = [ + "??,B5,??,30,??,??, {??,B5,??,30,??,68, {??,B5,??,??,??,F9,??,28,??,D1,??,20,??,BD,??,20,??,BD} ,??,BD} ,??,BD", + "80,B5,80,30,00,69,??,F?,??,[111.1...],80,BD,80,30,C1,60,70,47,80,30,C0,68,70,47 - 15B", +] [1D9] decl = "int EDIT_GetMarkedText(void *gui, WSHDR *selected_text)" -NSG = """ -??,B5,??,30,??,??, {??,B5,??,30,??,68, {??,B5,??,1C,??,1C,??,A9,??,46,??,??,??,??,??,28,??,D0,??,AB,??,88, -??,88,??,6A,??,1C,??,??,??,??,??,BD} ??,BD} ??,BD -""" +NSG = [ + "??,B5,??,30,??,??,{??,B5,??,30,??,68,{??,B5,??,1C,??,1C,??,A9,??,46,??,??,??,??,??,28,??,D0,??,AB,??,88,??,88,??,6A,??,1C,??,??,??,??,??,BD} ??,BD} ??,BD", + "80,B5,80,30,00,69,??,F?,??,[111.1...],80,BD,80,30,C1,60,70,47,80,30,C0,68,70,47 - 143", +] [1DA] decl = "int SendSMS(WSHDR *text, const char *number, int cepid, int msg, int flag)" @@ -2893,11 +2911,10 @@ ALL = "??,B5,??,E0,??,68,??,00,??,5B,??,42,??,D1,??,1C,??,BD,??,39,??,04,??,0C,? [1DE] decl = "int EDIT_SetTextToEditControl(void *gui, int n, const WSHDR *value)" -NSG = """ -??,B5,??,30,??,??, {??,B5,??,30,??,68, {??,B5,??,1C,??,1C,??,1C,??,??,??,??,??,42,??,D1,??,1C,??,1C, {??,B5, -??,B0,??,6A,??,1C,??,??,??,??,??,1C,??,??,??,??,??,1C,??,1C,??,D0,??,21,??,43,??,1C} ,??,??,32,1C,29,1C} , -??,BD} ,??,BD -""" +NSG = [ + "??,B5,??,30,??,??,{??,B5,??,30,??,68,{??,B5,??,1C,??,1C,??,1C,??,??,??,??,??,42,??,D1,??,1C,??,1C,{??,B5,??,B0,??,6A,??,1C,??,??,??,??,??,1C,??,??,??,??,??,1C,??,1C,??,D0,??,21,??,43,??,1C},??,??,32,1C,29,1C},??,BD},??,BD", + "80,B5,80,30,00,69,??,F?,??,[111.1...],80,BD,80,30,C1,60,70,47,80,30,C0,68,70,47 - 9B", +] [1DF] decl = "void *EDIT_GetUserPointer(void *gui)" @@ -2931,10 +2948,10 @@ NSG = "??,B5,??,06,??,09,??,1C,??,3A,??,0E,??,3A,??,4E,??,4D,??,4C,??,4B,??,D1,? [1E5] decl = "int EDIT_OpenOptionMenuWithUserItems(void *gui, void (*itemhandler)(USR_MENU_ITEM *item), void *user_pointer, int to_add)" -NSG = """ -??,B5,??,30,??,??, {??,B5,??,1C,??,AA,??,92,??,1C, {??,B5,??,B0,??,9C,??,1C,??,34,??,9D,??,68,??,??,??,??, -??,1C,??,68,??,??,??,??,??,90,??,??,??,2D,??,90} , ??,98,??,BD} ,??,BD -""" +NSG = [ + "??,B5,??,30,??,??,{??,B5,??,1C,??,AA,??,92,??,1C,{??,B5,??,B0,??,9C,??,1C,??,34,??,9D,??,68,??,??,??,??,??,1C,??,68,??,??,??,??,??,90,??,??,??,2D,??,90},??,98,??,BD},??,BD", + "80,B5,80,30,00,69,??,F?,??,[111.1...],80,BD,80,30,C1,60,70,47,80,30,C0,68,70,47 + C5", +] [1E6] decl = "void Menu_SetItemCountDyn(void *gui, int items_count)" @@ -3106,10 +3123,10 @@ NSG = "F3,B5,??,B0,??,1C,00,20,??,??,??,??,??,90,??,AB,18,??" [209] decl = "void *FindGUIbyId(int id, CSM_RAM **csm)" -NSG = """ -??,1C,??,1C,??,48,??,B5,??,68,_blf(??,B5,??,1C,??,1C,??,1C,??,1C,??,68,??,??,??,??,??,28,??,D1,??,1C,??,1C, -??,1C,??,6A,??,??,??,??,??,BD,30,B5),??,BD + 1 -""" +NSG = [ + "??,1C,??,1C,??,48,??,B5,??,68,_blf(??,B5,??,1C,??,1C,??,1C,??,1C,??,68,??,??,??,??,??,28,??,D1,??,1C,??,1C,??,1C,??,6A,??,??,??,??,??,BD,30,B5),??,BD + 1", + "??,48,80,B5,80,68,??,??,??,??,80,BD,??,48,80,B5,80,68,??,??,??,??,80,BD,0A,1C,01,1C,??,48,80,B5,80,68,??,??,??,??,80,BD,0A,1C,01,1C,??,48,80,B5,80,68 + 19", +] [20A] decl = "void EDIT_SetDate(void *gui, int n, const TDate *date)" @@ -3120,18 +3137,24 @@ NSG = """ [20B] decl = "void EDIT_SetTime(void *gui, int n, const TTime *time)" -NSG = """ -??,B5,??,30,??,??,{??,B5,??,1C,??,1C,??,1C,??,??,??,??,??,28,??,D0,??,1C,{??,B5,??,1C,??,1C,??,78,??,20,0B, -29},??,34,??,68,??,1C,??,??,??,??,??,BD},??,BD -""" +NSG = [ + "??,B5,??,30,??,??,{??,B5,??,1C,??,1C,??,1C,??,??,??,??,??,28,??,D0,??,1C,{??,B5,??,1C,??,1C,??,78,??,20,0B,29},??,34,??,68,??,1C,??,??,??,??,??,BD},??,BD", + "80 B5 80 30 ?? 6? ?? F? ?? ?? 80 BD 80 B5 80 30 ?? 6? ?? F? ?? ?? 80 BD 80 B5 80 30 ?? 6? ?? F? ?? ?? 80 BD 80 B5 80 30 ?? 6? ?? F? ?? ?? 80 BD 80 B5 80 30 ?? 6? ?? F? ?? ?? 80 BD 80 B5 80 30 ?? 6? ?? F? ?? ?? 80 BD 80 B5 80 30 ?? 6? ?? F? ?? ?? 80 BD 80 B5 80 30 ?? 6? ?? F? ?? ?? 80 BD 80 B5 80 30 ?? 6? ?? F? ?? ?? 80 BD 80 B5 80 30 ?? 6? ?? F? ?? ?? 80 BD 98 B5 14 1C 04 9A 80 30 00 92 ?? 6? 22 1C", +] [20C] decl = "void EDIT_GetDate(void *gui, int n, TDate *date)" -NSG = "??,B5,??,30,??,??,{??,B5,14,1C,??,??,??,??,??,28,??,D0,??,1C,{??,B5,??,1C,??,78,??,1C,??,25,0A,28},??,BD},??,BD" +NSG = [ + "??,B5,??,30,??,??,{??,B5,14,1C,??,??,??,??,??,28,??,D0,??,1C,{??,B5,??,1C,??,78,??,1C,??,25,0A,28},??,BD},??,BD", + "80 B5 80 30 ?? 6? ?? F? ?? ?? 80 BD 80 B5 80 30 ?? 6? ?? F? ?? ?? 80 BD 80 B5 80 30 ?? 6? ?? F? ?? ?? 80 BD 80 B5 80 30 ?? 6? ?? F? ?? ?? 80 BD 80 B5 80 30 ?? 6? ?? F? ?? ?? 80 BD 80 B5 80 30 ?? 6? ?? F? ?? ?? 80 BD 80 B5 80 30 ?? 6? ?? F? ?? ?? 80 BD 80 B5 80 30 ?? 6? ?? F? ?? ?? 80 BD 98 B5 14 1C 04 9A 80 30 00 92 ?? 6? 22 1C", +] [20D] decl = "void EDIT_GetTime(void *gui, int n, TTime *time)" -NSG = "??,B5,??,30,??,??,{??,B5,14,1C,??,??,??,??,??,28,??,D0,??,1C,{??,B5,??,1C,??,78,??,1C,??,25,0B,28},??,BD},??,BD" +NSG = [ + "??,B5,??,30,??,??,{??,B5,14,1C,??,??,??,??,??,28,??,D0,??,1C,{??,B5,??,1C,??,78,??,1C,??,25,0B,28},??,BD},??,BD", + "80 B5 80 30 ?? 6? ?? F? ?? ?? 80 BD 80 B5 80 30 ?? 6? ?? F? ?? ?? 80 BD 80 B5 80 30 ?? 6? ?? F? ?? ?? 80 BD 80 B5 80 30 ?? 6? ?? F? ?? ?? 80 BD 80 B5 80 30 ?? 6? ?? F? ?? ?? 80 BD 80 B5 80 30 ?? 6? ?? F? ?? ?? 80 BD 98 B5 14 1C 04 9A 80 30 00 92 ?? 6? 22 1C", +] [20E] decl = "int ConstructEditTime(EDITCONTROL *ec, const TTime *time)" @@ -3243,19 +3266,31 @@ NSG = """ [219] decl = "void *AllocMLMenuItem(void *gui)" NSG = "??,B5,??,1C,_blf(F8,B5,05,1C,FF,30,81,30,01,68,48,20,88,47),??,1C" -ELKA = "??,B5,??,68,??,1C,_blf(F8,B5,05,1C,FF,30,81,30,??,68,48,20,88,47),??,1C" +ELKA = [ + "??,B5,??,68,??,1C,_blf(F8,B5,05,1C,FF,30,81,30,??,68,48,20,88,47),??,1C", + "70 B5 86 68 05 1C ?? ?? ?? ?? 04 1C C0 6B FF 21 01 31 01 43 E1 63 00 2E 06 D0 20 36 30 7B 02 28 02 D1 C0 02 08 43 E0 63 01 21 C9 07 28 1C ?? ?? ?? ?? 01 26 B6 02 00 28 02 D0 E0 6B 30 43 E0 63 01 21 89 07 28 1C ?? ?? ?? ?? 00 28 05 D0 E0 6B 01 21 C9 02 30 43 08 43 E0 63 20 1C 70 BD 70 B5 86 68 05 1C _blf(00 C0 9F E5 1C FF 2F E1 ?? ?? ?? A0) 04 1C C0 6B FF 21 01 31 01 43 + 5E", +] [21A] decl = "int EDIT_SetTextInvert(void *gui, int position, int len)" -NSG = "??B5,??30,????, {??B5,??30,??68, {??B5,??6A,??23,????????,??BD} ,??BD} ,??BD" +NSG = [ + "??B5,??30,????, {??B5,??30,??68, {??B5,??6A,??23,????????,??BD} ,??BD} ,??BD", + "80 30 ?? 6? 70 47 80 30 ?? 6? 70 47 80 B5 80 30 ?? 6? ?? F? ?? ?? 80 BD 80 B5 80 30 ?? 6? ?? F? ?? ?? 80 BD 80 B5 80 30 ?? 6? ?? F? ?? ?? 80 BD 80 B5 80 30 ?? 6? ?? F? ?? ?? 80 BD + 25", +] [21B] decl = "void EDIT_RemoveTextInvert(void *gui)" -NSG = "??B5,??30,????, {??B5,??30,??68, {??B5,??6A, {??21,??30,????,??47} ,??BD} ,??BD} ,??BD" +NSG = [ + "??B5,??30,????, {??B5,??30,??68, {??B5,??6A, {??21,??30,????,??47} ,??BD} ,??BD} ,??BD", + "80 30 ?? 6? 70 47 80 30 ?? 6? 70 47 80 B5 80 30 ?? 6? ?? F? ?? ?? 80 BD 80 B5 80 30 ?? 6? ?? F? ?? ?? 80 BD 80 B5 80 30 ?? 6? ?? F? ?? ?? 80 BD 80 B5 80 30 ?? 6? ?? F? ?? ?? 80 BD + 31", +] [21C] decl = "int EDIT_IsBusy(void *gui)" -NSG = "??,B5,??,30,??,??,{??,B5,??,30,??,68,{00,68,40,05,C0,0F,70,47},??,BD},??,BD" +NSG = [ + "??,B5,??,30,??,??,{??,B5,??,30,??,68,{00,68,40,05,C0,0F,70,47},??,BD},??,BD", + "80 30 ?? 6? 70 47 80 30 ?? 6? 70 47 80 B5 80 30 ?? 6? ?? F? ?? ?? 80 BD 80 B5 80 30 ?? 6? ?? F? ?? ?? 80 BD 80 B5 80 30 ?? 6? ?? F? ?? ?? 80 BD 80 B5 80 30 ?? 6? ?? F? ?? ?? 80 BD 80 B5 80 30 ?? 6? ?? F? ?? ?? 80 BD 80 B5 80 30 ?? 6? ?? F? ?? ?? 80 BD 80 B5 80 30 ?? 6? ?? F? ?? ?? 80 BD 80 B5 80 30 ?? 6? ?? F? ?? ?? 80 BD + 6D", +] [21D] decl = "int GSMTXT_Decode(WSHDR *result, void *pkt, int len, int encoding_type, malloc_func_t malloc_fn, mfree_func_t mfree_fn)" @@ -3539,11 +3574,8 @@ decl = "int *RamSizeOfReceivedOrSentFile()" NSG = false # heap object [253] -decl = "char *RamLastCallNum()" -NSG = [ - "&(D8 04 1F E5 0D 10 A0 E1 0C 00 90 E5 ?? [11......] 01 EB 00 00 50 E3 04 00 94 05) + 22", - "&(04 49 48 68 63) + 42A", -] +decl = "uint16_t *RamLastCallNum()" +NSG = "&(04 49 48 68 63) + 42A" [254] decl = "int StartNativeExplorer(NativeExplorerData *data)" @@ -3651,11 +3683,10 @@ NSG = """ [266] decl = "int Obs_Resume(HObj obs)" -NSG = """ -??,??,??,E3,??,??,??,03,??,??,??,0A,??,??,??,E3,??,??,??,03,??,??,??,0A,??,??,??,E5,??,??,??,E3,??,??,??,3A, -??,??,??,E3,??,??,??,8A,??,??,??,E3,??,??,??,1A,??,??,??,E3,??,??,??,EA,??,??,??,E1,??,??,??,??,??,??,??,E3, -??,??,??,13,??,??,??,13,??,??,??,13,??,??,??,1A,??,??,??,E1, -0x6C -""" +NSG = [ + "??,??,??,E3,??,??,??,03,??,??,??,0A,??,??,??,E3,??,??,??,03,??,??,??,0A,??,??,??,E5,??,??,??,E3,??,??,??,3A,??,??,??,E3,??,??,??,8A,??,??,??,E3,??,??,??,1A,??,??,??,E3,??,??,??,EA,??,??,??,E1,??,??,??,??,??,??,??,E3,??,??,??,13,??,??,??,13,??,??,??,13,??,??,??,1A,??,??,??,E1, -0x6C", + "00,00,50,E3,08,00,50,13,07,00,50,13,09,00,50,13,07,00,00,0A,09,10,A0,E3,04,00,A0,E1,??,??,??,EB,20,10,A0,E3,04,00,A0,E1,??,??,??,EB - B0", +] ELKA = "24 10 A0 E3 04 00 A0 E1 ?? ?? ?? ?? E0 FF FF EA 10 40 2D E9 00 40 A0 E1 +0x10" [267] @@ -3793,7 +3824,7 @@ E1,??,??,??,E5,??,??,??,E5,??,??,??,E3,??,??,??,05,??,??,??,05,??,??,??,13,??,?? [282] decl = "char *RamIsRunCamera()" -NSG = "&(??,B5,??,??,??,1C,??,20,??,24,??,1C,??,63,??,64,??,63 + 2)+314" +NSG = "&(10,B5,??,4C,02,1C,20,88,??,49,??,D0,00,28,??,D1,08,1C,??,??,??,??,20,88,01,30,20,80,10,BD + 2)" ELKA = "&(??,40,1F,E5,00,20,B0,E1,B0,00,D4,E1)" [283] @@ -3891,7 +3922,7 @@ NSG = "&(5F,49,??,??,40,18,??,??,92,02,??,??) + D8" [291] decl = "int RefreshAlarmClock()" -NSG = "??,??,??,E9,??,??,??,EB,??,??,??,E3,??,??,??,EB,??,??,??,E3" +NSG = "08,40,2D,E9,??,??,??,EB,02,00,A0,E3,??,??,??,EB,04,00,A0,E3,??,??,??,EB,00,20,A0,E3,01,10,A0,E3,01,00,A0,E3,08,40,BD,E8,??,??,??,EA" [292] decl = "char *RamIsAlarmClockAutorepeatOn()" @@ -3931,8 +3962,8 @@ ELKA = "&(??,??,1F,E5,04,E0,2D,E5,04,00,D2,E5,00,00,50,E3,??,??,??,0A,43,01,D2,E [29A] decl = "int AACC_AudioTransferReq(int oh, uint32_t type_and_conn)" -NSG = "B3,B5,??,1C,??,48,??,B0,??,78,??,28,??,D1,??,AB,??,89,??,21,??,56,??,4D,??,92,??,91,??,21,??,31,??,1C,??,1C +1" -ELKA = "BC,B5,04,1C,0D,48 + 1" +NSG = "B3,B5,??,1C,??,48,??,B0,??,78,??,28,??,D1,??,AB,??,89,??,21,??,56,??,4D,??,92,??,91,??,21,??,31,??,1C,??,1C,??,A2,??,??,??,??,??,04,??,48,??,0C,??,80,??,22,??,92,??,22,??,23,??,1C,??,??,??,??,??,??,??,??,??,7D,??,1C,??,??,??,??,??,1C,??,??,??,??,??,28,??,D0,00,23,DB,43,00,22 + 1" +ELKA = "B3,B5,04,1C,??,48,84,B0,00,78,06,28,19,D1,00,AB,DA,8A,14,21,59,56,??,4D,01,92,00,91,FF,21,01,31,23,1C,28,1C,??,A2,??,??,??,??,01,04,??,48,09,0C,01,80,00,22,00,92,06,22,88,23,28,1C,??,??,??,??,0F,E0,00,AB,DA,8A,14,21,59,56,03,92,??,A2,00,92,02,91,FF,21,00,22,01,23,??,31,01,94,??,48,??,??,??,??,??,??,??,??,05,7D,20,1C,??,??,??,??,29,1C,??,??,??,??,00,28,08,D0,00,23,DB,43,00,22,20,1C + 1" [29B] decl = "int Audio_GetObjectHandle()" @@ -3987,6 +4018,10 @@ A0,47,2A,1C,21,1C,??,??,??,??,B0,BD,80,B5,??,??,??,??,80,BD,B0,B5,05,1C,0C,1C,?? [2A6] decl = "void SetHeader(void *gui, const HEADER_DESC *header, const void *malloc_fn)" NSG = "??,B5,??,1C,??,22,_blf(??,B5,??,1C,??,1C,??,1C,??,??,??,??,??,28,??,D1,??,2A),??,BD+1" +ELKA = [ + "??,48,00,68,70,47,00,00,??,??,??,A8,80,B5,13,1C,01,22,??,??,??,??,80,BD + D", + "??,B5,??,1C,??,22,_blf(??,B5,??,1C,??,1C,??,1C,??,??,??,??,??,28,??,D1,??,2A),??,BD+1", +] [2A7] decl = "void SetMenuToGUI(void *gui, const void *menu)" @@ -4146,10 +4181,10 @@ NSG = "??,B5,??,26,??,28,??,B0,??,D0,??,1C,??,37,??,??,??,2C,??,D0,??,A8,??,22,? [2BE] decl = "int SetCursorTab(void *gui, int tab_n)" -NSG = """ -??,1C,??,20,??,2A,??,B5,??,D0,??,32,??,??,??,2A,??,D0,??,1C,??,30,??,30,_blf(??,B5,??,1C,??,1C,??,1C,??,D0, -??,1C,??,1C),??,BD,+1 -""" +NSG = [ + "??,1C,??,20,??,2A,??,B5,??,D0,??,32,??,??,??,2A,??,D0,??,1C,??,30,??,30,_blf(??,B5,??,1C,??,1C,??,1C,??,D0,??,1C,??,1C),??,BD + 1", + "??,1C,??,20,??,2A,??,B5,??,D0,??,32,??,??,??,2A,??,D0,??,1C,??,30,??,30,??,??,??,??,??,BD,??,1C,??,20,??,2A,??,B5,??,D0,??,32,??,??,??,2A,??,D0,??,1C,??,30,??,30,??,??,??,??,??,BD + 1F", +] [2BF] decl = "int UpdateTab1stItem(void *gui, int unk_0)" @@ -4281,7 +4316,7 @@ ELKA = "80,30,41,62,70,47,80,30,40,6A,70,47,+1" [2DA] decl = "void *TViewGetUserPointer(void *gui)" NSG = "80,30,C1,61,70,47,80,30,C0,69,70,47,+7" -ELKA = "" +ELKA = "80,30,41,62,70,47,80,30,40,6A,70,47 + 7" [2DB] decl = "void MediaSendCSM_Open(const WSHDR *file, const WSHDR *path)"