From b01ab80795a982203511c7da3bda28eadc7932f7 Mon Sep 17 00:00:00 2001 From: Bobby Dilley Date: Thu, 1 Sep 2022 20:16:47 +0100 Subject: [PATCH 1/4] Add Harley network hook --- src/lindbergh/hook.c | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/src/lindbergh/hook.c b/src/lindbergh/hook.c index 3264109..0e22c45 100644 --- a/src/lindbergh/hook.c +++ b/src/lindbergh/hook.c @@ -9,6 +9,10 @@ #include #include #include +#include +#include +#include +#include #include "hook.h" @@ -361,8 +365,28 @@ float powf(float base, float exponent) } /* -int futex(int *uaddr, int op, int val, const struct timespec *timeout, int *uaddr2, int val3) +int sem_wait(sem_t *sem) { + int (*original_sem_wait)(sem_t * sem) = dlsym(RTLD_NEXT, "sem_wait"); return 0; } */ + +/** + * Hook function used by Harley Davidson to change IPs to localhost + * Currently does nothing. + */ +int connect(int sockfd, const struct sockaddr *addr, socklen_t addrlen) +{ + int (*_connect)(int sockfd, const struct sockaddr *addr, socklen_t addrlen) = dlsym(RTLD_NEXT, "connect"); + + + struct sockaddr_in *in_pointer = (struct sockaddr_in *)addr; + + // Change the IP to connect to to 127.0.0.1 + //in_pointer->sin_addr.s_addr = inet_addr("127.0.0.1"); + char *some_addr = inet_ntoa(in_pointer->sin_addr); + printf("Connecting to %s\n", some_addr); + + return _connect(sockfd, addr, addrlen); +} From 23c6733a22c471ce980008b423a5809ddab50815 Mon Sep 17 00:00:00 2001 From: Bobby Dilley Date: Thu, 1 Sep 2022 20:17:22 +0100 Subject: [PATCH 2/4] Remove printout --- src/lindbergh/graphics.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/lindbergh/graphics.c b/src/lindbergh/graphics.c index 16d8fa7..8905d63 100644 --- a/src/lindbergh/graphics.c +++ b/src/lindbergh/graphics.c @@ -183,8 +183,6 @@ int XNextEvent(Display *display, XEvent *event_return) case ButtonPress: case ButtonRelease: { - printf("%d %d %d\n", event_return->xbutton.button, event_return->xbutton.x, event_return->xbutton.y); - switch (event_return->xbutton.button) { case 1: // Trigger From 8c63eee2156e766f66f572340ad3386aa61d1c18 Mon Sep 17 00:00:00 2001 From: Bobby Dilley Date: Fri, 2 Sep 2022 14:48:36 +0100 Subject: [PATCH 3/4] Create supported.md --- docs/supported.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 docs/supported.md diff --git a/docs/supported.md b/docs/supported.md new file mode 100644 index 0000000..613623a --- /dev/null +++ b/docs/supported.md @@ -0,0 +1,30 @@ +# Supported Titles + +## Games that work + +These games have been loaded at some point using this software, but this doesn't mean they currently work or there are instructions on how to get them running. + +Working is defined by getting into attract mode and running the game, but not necciserily controlling it. + +- The House Of The Dead 4 +- The House Of The Dead 4 Special +- The House Of The Dead Ex +- Harley Davidson +- Rambo +- 2 Step 2 Spicy +- Ghost Squad +- Outrun 2 SP SDX +- Race TV + +## Games that do not work or haven't been tested + +- Let's Go Jungle +- Let's Go Jungle Special +- After Burner Climax +- Virtua Fighter +- Virtua Tennis 3 +- Primevil +- Initial D 4 +- Initial D 5 +- Hummer +- R-Tuned From 0d7b86b5bc0730d8cd82cb702b414f3bdc668280 Mon Sep 17 00:00:00 2001 From: Bobby Dilley Date: Fri, 2 Sep 2022 14:49:39 +0100 Subject: [PATCH 4/4] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 145b686..9d817d8 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,8 @@ This project contains header files from SEGA. Please DO NOT distrobute this code This project aims to hook and emulate the various different parts of the SEGA Lindbergh allowing the games to run on modern versions of Linux. +You can view the supported titles [here.](docs/supported.md) + ## What this project does This project provides an emulation layer so for various software & hardware components of hte SEGA Lindbergh system allowing you to run the games on a modern version of linux. The project also aims to provide documentation of the various APIs used in the Lindbergh system which may be useful for further emulation projects, or homebrew.