diff --git a/game/kernel/kboot.cpp b/game/kernel/kboot.cpp index e6d53fa857..babb26f3b2 100644 --- a/game/kernel/kboot.cpp +++ b/game/kernel/kboot.cpp @@ -128,7 +128,7 @@ void KernelCheckAndDispatch() { // dispatch the kernel //(**kernel_dispatcher)(); call_goal(Ptr(kernel_dispatcher->value), 0, 0, 0, s7.offset, g_ee_main_mem); - ClearPending(); + //ClearPending(); // if the listener function changed, it means the kernel ran it, so we should notify compiler. if (MasterDebug && ListenerFunction->value != old_listener) { diff --git a/game/kernel/kdsnetm.cpp b/game/kernel/kdsnetm.cpp index 8dcec18a9b..00f1080c7e 100644 --- a/game/kernel/kdsnetm.cpp +++ b/game/kernel/kdsnetm.cpp @@ -1,3 +1,6 @@ + + +/* /*! * @file kdsnetm.cpp * Low-level DECI2 wrapper for ksocket @@ -30,7 +33,7 @@ void kdsnetm_init_globals() { /*! * Register GOAL DECI2 Protocol Driver with DECI2 service * DONE, EXACT - */ + void InitGoalProto() { protoBlock.socket = sceDeci2Open(DECI2_PROTOCOL, &protoBlock, GoalProtoHandler); if (protoBlock.socket < 0) { @@ -46,10 +49,12 @@ void InitGoalProto() { } } +*/ + /*! * Close the DECI2 Protocol Driver * DONE, EXACT - */ + void ShutdownGoalProto() { if (protoBlock.socket > 0) { sceDeci2Close(protoBlock.socket); @@ -60,7 +65,7 @@ void ShutdownGoalProto() { * Handle a DECI2 Protocol Event for the GOAL Proto. * Called by the DECI2 Protocol driver * DONE, added print statements on errors for debugging, EI and SYNC at the end were removed - */ + void GoalProtoHandler(int event, int param, void* opt) { // verify we got the correct opt pointer. It's not clear why the opt pointer is used // like this? @@ -160,7 +165,7 @@ void GoalProtoHandler(int event, int param, void* opt) { * Will block until send is complete. * DONE, original version used an uncached address and had a FlushCache call, which were both * removed - */ + s32 SendFromBufferD(s32 msg_kind, u64 p2, char* data, s32 size) { // wait for send to finish or error first... while (protoBlock.send_status > 0) { @@ -215,8 +220,11 @@ s32 SendFromBufferD(s32 msg_kind, u64 p2, char* data, s32 size) { /*! * Print GOAL Protocol status - */ + void GoalProtoStatus() { Msg(6, "gproto: got %d %d\n", protoBlock.most_recent_event, protoBlock.most_recent_param); Msg(6, "gproto: %d %d\n", protoBlock.last_receive_size, protoBlock.send_remaining); -} \ No newline at end of file +} + + +*/ \ No newline at end of file diff --git a/game/runtime.cpp b/game/runtime.cpp index 19981da5e9..554f09860a 100644 --- a/game/runtime.cpp +++ b/game/runtime.cpp @@ -225,7 +225,7 @@ void exec_runtime(int argc, char** argv) { // step 1: sce library prep iop::LIBRARY_INIT(); ee::LIBRARY_INIT_sceCd(); - ee::LIBRARY_INIT_sceDeci2(); + //ee::LIBRARY_INIT_sceDeci2(); ee::LIBRARY_INIT_sceSif(); // step 2: system prep diff --git a/goalc/goos/CMakeLists.txt b/goalc/goos/CMakeLists.txt index a6b2e6b489..2da8649efc 100644 --- a/goalc/goos/CMakeLists.txt +++ b/goalc/goos/CMakeLists.txt @@ -1,2 +1,2 @@ -add_library(goos SHARED Object.cpp TextDB.cpp Reader.cpp Interpreter.cpp InterpreterEval.cpp) +add_library(goos STATIC Object.cpp TextDB.cpp Reader.cpp Interpreter.cpp InterpreterEval.cpp) target_link_libraries(goos util) \ No newline at end of file diff --git a/goalc/goos/Object.cpp b/goalc/goos/Object.cpp index 7a2feeae55..0b5792a039 100644 --- a/goalc/goos/Object.cpp +++ b/goalc/goos/Object.cpp @@ -151,7 +151,7 @@ bool Object::operator==(const Object& other) const { } default: - throw std::runtime_error("equality not implemented for " + print()); + throw std::exception("equality not implemented for"); } } diff --git a/goalc/goos/Reader.cpp b/goalc/goos/Reader.cpp index 0d7ff7368b..58882e9cf6 100644 --- a/goalc/goos/Reader.cpp +++ b/goalc/goos/Reader.cpp @@ -588,7 +588,7 @@ bool Reader::try_token_as_binary(const Token& tok, Object& obj) { for (uint32_t i = 2; i < tok.text.size(); i++) { if (value & (0x8000000000000000)) { - throw std::runtime_error("overflow in binary constant: " + tok.text); + throw std::exception("overflow in binary constant:)"); } value <<= 1u; @@ -628,7 +628,7 @@ bool Reader::try_token_as_hex(const Token& tok, Object& obj) { obj = Object::make_integer(v); return true; } catch (std::exception& e) { - throw std::runtime_error("The number " + tok.text + " cannot be a hexadecimal constant"); + throw std::exception("The number cannot be a hexadecimal constant"); } } return false; @@ -662,7 +662,7 @@ bool Reader::try_token_as_integer(const Token& tok, Object& obj) { obj = Object::make_integer(v); return true; } catch (std::exception& e) { - throw std::runtime_error("The number " + tok.text + " cannot be an integer constant"); + throw std::exception("The number cannot be an integer constant"); } } return false; @@ -697,8 +697,7 @@ bool Reader::try_token_as_char(const Token& tok, Object& obj) { * Used for reader errors, like "missing close paren" or similar. */ void Reader::throw_reader_error(TextStream& here, const std::string& err, int seek_offset) { - throw std::runtime_error("Reader error:\n" + err + "\nat " + - db.get_info_for(here.text, here.seek + seek_offset)); + throw std::exception("Reader error at"); } /*! diff --git a/goalc/listener/Deci2Server.cpp b/goalc/listener/Deci2Server.cpp index 4b20b4c3ec..154cdf7638 100644 --- a/goalc/listener/Deci2Server.cpp +++ b/goalc/listener/Deci2Server.cpp @@ -1,3 +1,7 @@ + + + + /*! * @file Deci2Server.cpp * Basic implementation of a DECI2 server. @@ -41,7 +45,7 @@ Deci2Server::~Deci2Server() { /*! * Start waiting for the Listener to connect - */ + bool Deci2Server::init() { server_fd = socket(AF_INET, SOCK_STREAM, 0); if (server_fd < 0) { @@ -103,7 +107,7 @@ bool Deci2Server::init() { /*! * Return true if the listener is connected. - */ + bool Deci2Server::check_for_listener() { if (server_connected) { if (accept_thread_running) { @@ -118,7 +122,7 @@ bool Deci2Server::check_for_listener() { /*! * Send data from buffer. User must provide appropriate headers. - */ + void Deci2Server::send_data(void* buf, u16 len) { lock(); if (!server_connected) { @@ -139,14 +143,14 @@ void Deci2Server::send_data(void* buf, u16 len) { /*! * Lock the DECI mutex. Should be done before modifying protocols. - */ + void Deci2Server::lock() { deci_mutex.lock(); } /*! * Unlock the DECI mutex. Should be done after modifying protocols. - */ + void Deci2Server::unlock() { deci_mutex.unlock(); } @@ -154,7 +158,7 @@ void Deci2Server::unlock() { /*! * Wait for protocols to become ready. * This avoids the case where we receive messages before protocol handlers are set up. - */ + void Deci2Server::wait_for_protos_ready() { if (protocols_ready) return; @@ -167,7 +171,7 @@ void Deci2Server::wait_for_protos_ready() { * Will unblock wait_for_protos_ready and incoming messages will be dispatched to these * protocols. You can change the protocol handlers, but you should lock the mutex before * doing so. - */ + void Deci2Server::send_proto_ready(Deci2Driver* drivers, int* driver_count) { lock(); d2_drivers = drivers; @@ -249,7 +253,7 @@ void Deci2Server::run() { /*! * Background thread for waiting for the listener. - */ + void Deci2Server::accept_thread_func() { socklen_t l = sizeof(addr); while (!kill_accept_thread) {