mirror of
https://github.com/open-goal/jak-project
synced 2026-08-21 23:00:45 -04:00
Windows fixes
Partially addresses issues with unresolved external symbols
This commit is contained in:
@@ -128,7 +128,7 @@ void KernelCheckAndDispatch() {
|
||||
// dispatch the kernel
|
||||
//(**kernel_dispatcher)();
|
||||
call_goal(Ptr<Function>(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) {
|
||||
|
||||
+14
-6
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
*/
|
||||
@@ -5,4 +5,8 @@ add_subdirectory(emitter)
|
||||
|
||||
add_executable(goalc main.cpp)
|
||||
|
||||
IF (WIN32)
|
||||
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
|
||||
ENDIF()
|
||||
|
||||
target_link_libraries(goalc util goos)
|
||||
@@ -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)
|
||||
@@ -1,8 +1,12 @@
|
||||
|
||||
|
||||
|
||||
|
||||
/*!
|
||||
* @file Deci2Server.cpp
|
||||
* Basic implementation of a DECI2 server.
|
||||
* Works with deci2.cpp (sceDeci2) to implement the networking on target
|
||||
*/
|
||||
|
||||
|
||||
#include <cstdio>
|
||||
#include <sys/socket.h>
|
||||
@@ -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) {
|
||||
@@ -262,3 +266,4 @@ void Deci2Server::accept_thread_func() {
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
Reference in New Issue
Block a user