Skip to content

Commit

Permalink
Added symbols marking game start and end to modules.
Browse files Browse the repository at this point in the history
Bumped to library & channel version 0.1.1.
Altered https module to take advantage of new symbols.
  • Loading branch information
Chadderz121 committed Mar 30, 2014
1 parent bbb4120 commit c43ed64
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 4 deletions.
6 changes: 6 additions & 0 deletions bslug_include/bslug.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion bslug_include/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -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_*/
4 changes: 2 additions & 2 deletions modules/https/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
2 changes: 1 addition & 1 deletion src/main.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
4 changes: 4 additions & 0 deletions src/search/search.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit c43ed64

Please sign in to comment.