diff --git a/bslug_include/bslug.h b/bslug_include/bslug.h index 087df92..0863092 100644 --- a/bslug_include/bslug.h +++ b/bslug_include/bslug.h @@ -97,6 +97,12 @@ typedef struct bslug_loader_entry_t { #define BSLUG_MODULE_VERSION(x) BSLUG_META(version, x) #define BSLUG_MODULE_LICENSE(x) BSLUG_META(license, x) +/* bslug_game_start - first address that is part of the game's executable. + * bslug_game_end - address after the end of the game's executable. + * Added in BSLUG_LIB_VERSION 0.1.1 */ +extern uint8_t bslug_game_start[]; +extern uint8_t bslug_game_end[]; + #ifdef __cplusplus extern "C" { #endif diff --git a/bslug_include/version.h b/bslug_include/version.h index 9c7d3bf..eda848c 100644 --- a/bslug_include/version.h +++ b/bslug_include/version.h @@ -13,6 +13,6 @@ #define BSLUG_VERSION_MINOR(ver) ((uint8_t)(((ver) >> 16) & 0xff)) #define BSLUG_VERSION_REVISION(ver) ((uint16_t)(((ver) >> 0) & 0xffff)) -#define BSLUG_LIB_VERSION BSLUG_VERSION(0, 1, 0) +#define BSLUG_LIB_VERSION BSLUG_VERSION(0, 1, 1) #endif /* BSLUG_VERSION_H_*/ \ No newline at end of file diff --git a/modules/https/main.c b/modules/https/main.c index 020aade..487ae5e 100644 --- a/modules/https/main.c +++ b/modules/https/main.c @@ -36,8 +36,8 @@ void _start(void); static void _start_https(void) { - char *cur = (char *)0x80000000; - const char *end = (char *)0x80A00000; + char *cur = (char *)bslug_game_start; + const char *end = (char *)bslug_game_end; do { diff --git a/src/main.h b/src/main.h index fa29a41..fd2774f 100644 --- a/src/main.h +++ b/src/main.h @@ -29,7 +29,7 @@ #include "library/event.h" -#define BSLUG_LOADER_VERSION BSLUG_VERSION(0, 1, 0) +#define BSLUG_LOADER_VERSION BSLUG_VERSION(0, 1, 1) extern event_t main_event_fat_loaded; diff --git a/src/search/search.c b/src/search/search.c index ae95d28..5848849 100644 --- a/src/search/search.c +++ b/src/search/search.c @@ -442,6 +442,10 @@ void *Search_SymbolLookup(const char *name) { if (search_symbol__start != NULL) return search_symbol__start; return apploader_game_entry_fn; + } else if (strcmp(name, "bslug_game_start") == 0) { + return apploader_app0_start; + } else if (strcmp(name, "bslug_game_end") == 0) { + return apploader_app0_end; } result = NULL;