Skip to content
Permalink
Browse files

stb: moved std_image_write implementation to common module

  • Loading branch information
JaCzekanski committed Jan 5, 2020
1 parent 6be8cc5 commit 43d0631daeadf13deba01fc36cfd4c521a94e2fd
@@ -333,5 +333,6 @@ project "avocado_autotest"
}

links {
"core"
"core",
"fmt"
}
@@ -52,17 +52,17 @@ Function::Function(const std::string& prototype, std::function<bool(System* sys)
}
}

inline bool noLog(System* sys) {
bool noLog(System* sys) {
(void)(sys);
return false;
}

inline bool dbgOutputChar(System* sys) {
bool dbgOutputChar(System* sys) {
if (sys->debugOutput) putchar(sys->cpu->reg[4]);
return false; // Do not log function call
}

inline bool dbgOutputString(System* sys) {
bool dbgOutputString(System* sys) {
if (!sys->debugOutput) return false;
for (int i = 0; i < 80; i++) {
char c = sys->readMemory8(sys->cpu->reg[4] + i);
@@ -75,19 +75,19 @@ inline bool dbgOutputString(System* sys) {
return false; // Do not log function call
}

inline bool haltSystem(System* sys) {
bool haltSystem(System* sys) {
sys->state = System::State::halted;
return true;
}

inline bool forceTTYOn(System* sys) {
bool forceTTYOn(System* sys) {
(void)sys;
// Force TTY redirection (requires proper DUART implementation)
sys->cpu->setReg(4, 1);
return true;
}

inline bool unresolvedException(System* sys) {
bool unresolvedException(System* sys) {
const int howManyInstructionsToDisassemble = 6;
auto cause = sys->cpu->cop0.cause;
uint32_t epc = sys->cpu->cop0.epc;
File renamed without changes.

0 comments on commit 43d0631

Please sign in to comment.
You can’t perform that action at this time.