mirror of
https://github.com/Polprzewodnikowy/SummerCart64.git
synced 2024-11-25 15:16:53 +01:00
just straight cleanup
This commit is contained in:
parent
be4705da79
commit
3a75e1240f
7
build.sh
7
build.sh
@ -40,7 +40,12 @@ build_n64 () {
|
||||
if [ "$FORCE_CLEAN" = true ]; then
|
||||
make clean
|
||||
fi
|
||||
make all -j USER_FLAGS="$USER_FLAGS -DGIT_BRANCH='$GIT_BRANCH' -DGIT_TAG='$GIT_TAG' -DGIT_SHA='$GIT_SHA' -DGIT_MESSAGE='$GIT_MESSAGE'"
|
||||
N64_FLAGS="$USER_FLAGS"
|
||||
if [ ! -z "${GIT_BRANCH+x}" ]; then N64_FLAGS+=" -DGIT_BRANCH='\"$GIT_BRANCH\"'"; fi
|
||||
if [ ! -z "${GIT_TAG+x}" ]; then N64_FLAGS+=" -DGIT_TAG='\"$GIT_TAG\"'"; fi
|
||||
if [ ! -z "${GIT_SHA+x}" ]; then N64_FLAGS+=" -DGIT_SHA='\"$GIT_SHA\"'"; fi
|
||||
if [ ! -z "${GIT_MESSAGE+x}" ]; then N64_FLAGS+=" -DGIT_MESSAGE='\"$GIT_MESSAGE\"'"; fi
|
||||
make all -j USER_FLAGS="$N64_FLAGS"
|
||||
popd > /dev/null
|
||||
|
||||
BUILT_N64=true
|
||||
|
@ -145,9 +145,23 @@ static void exception_init_screen (void) {
|
||||
io_write(&VI->CR, cfg->CR);
|
||||
}
|
||||
|
||||
static void exception_draw_character (int x, int y, char c) {
|
||||
static void exception_draw_character (char c) {
|
||||
static int x = BORDER_WIDTH + (START_X_OFFSET * FONT_WIDTH);
|
||||
static int y = BORDER_HEIGHT;
|
||||
|
||||
if (c == '\n') {
|
||||
x = BORDER_WIDTH;
|
||||
y += LINE_HEIGHT;
|
||||
return;
|
||||
}
|
||||
|
||||
if ((x + FONT_WIDTH) > (SCREEN_WIDTH - BORDER_WIDTH)) {
|
||||
x = BORDER_WIDTH;
|
||||
y += LINE_HEIGHT;
|
||||
}
|
||||
|
||||
if ((c < ' ') || (c > '~')) {
|
||||
c = 127;
|
||||
c = '\x7F';
|
||||
}
|
||||
|
||||
for (int i = 0; i < (FONT_WIDTH * FONT_HEIGHT); i++) {
|
||||
@ -163,25 +177,13 @@ static void exception_draw_character (int x, int y, char c) {
|
||||
io_write(&exception_framebuffer[screen_offset], FOREGROUND_COLOR);
|
||||
}
|
||||
}
|
||||
|
||||
x += FONT_WIDTH;
|
||||
}
|
||||
|
||||
static void exception_print_string (const char *s) {
|
||||
static int x = BORDER_WIDTH + (START_X_OFFSET * FONT_WIDTH);
|
||||
static int y = BORDER_HEIGHT;
|
||||
|
||||
while (*s != '\0') {
|
||||
if (*s == '\n') {
|
||||
x = BORDER_WIDTH;
|
||||
y += LINE_HEIGHT;
|
||||
s++;
|
||||
} else {
|
||||
if (x + FONT_WIDTH > (SCREEN_WIDTH - BORDER_WIDTH)) {
|
||||
x = BORDER_WIDTH;
|
||||
y += LINE_HEIGHT;
|
||||
}
|
||||
exception_draw_character(x, y, *s++);
|
||||
x += FONT_WIDTH;
|
||||
}
|
||||
exception_draw_character(*s++);
|
||||
}
|
||||
}
|
||||
|
||||
@ -233,7 +235,8 @@ void exception_fatal_handler (uint32_t exception_code, uint32_t interrupt_mask,
|
||||
exception_init_screen();
|
||||
|
||||
exception_print("----- SummerCart64 n64boot -----\n");
|
||||
exception_print("branch: %s | tag: %s\n", version->git_branch, version->git_tag);
|
||||
exception_print("branch: %s\n", version->git_branch);
|
||||
exception_print("tag: %s\n", version->git_tag);
|
||||
exception_print("sha: %s\n", version->git_sha);
|
||||
exception_print("msg: %s\n\n", version->git_message);
|
||||
exception_print("%s at pc: 0x%08lX\n", exception_get_description(exception_code), e->epc.u32);
|
||||
|
@ -1,15 +1,27 @@
|
||||
#include "version.h"
|
||||
|
||||
|
||||
#define STR(x...) #x
|
||||
#define XSTR(s) STR(s)
|
||||
|
||||
|
||||
version_t version = {
|
||||
.git_branch = XSTR(GIT_BRANCH),
|
||||
.git_tag = XSTR(GIT_TAG),
|
||||
.git_sha = XSTR(GIT_SHA),
|
||||
.git_message = XSTR(GIT_MESSAGE),
|
||||
#ifdef GIT_BRANCH
|
||||
.git_branch = GIT_BRANCH,
|
||||
#else
|
||||
#warning "No GIT_BRANCH provided"
|
||||
#endif
|
||||
#ifdef GIT_TAG
|
||||
.git_tag = GIT_TAG,
|
||||
#else
|
||||
#warning "No GIT_TAG provided"
|
||||
#endif
|
||||
#ifdef GIT_SHA
|
||||
.git_sha = GIT_SHA,
|
||||
#else
|
||||
#warning "No GIT_SHA provided"
|
||||
#endif
|
||||
#ifdef GIT_MESSAGE
|
||||
.git_message = GIT_MESSAGE,
|
||||
#else
|
||||
#warning "No GIT_MESSAGE provided"
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user