Code Monkey home page Code Monkey logo

nfsiise's People

Contributors

git-anti-git avatar joshuapettus avatar m-y avatar sonik-br avatar thesharpowl avatar thomas-mc-work avatar yashrajbharti avatar zaps166 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nfsiise's Issues

No Audio Stream

I'd finally was able to start the game but i have no audio. Pavucontrol doesn't show a audio stream at all.

Any ideas?

Thanks for all that work!

New languages?

Hello.

Can new languages be implemented into the game?

If yes, then can you please offer some info on how is it done? I'd like to work on a romanian translation.

License

What license is the code under?

Suggestions

Hi there, wonderfull work with NFSIISE :D i really love it

i just want say a few suggestions, just if possible :

  • do can be compilated from 64 Bits, without 32 Bits support
./compile_nfs cpp
Building OpenGL 2
Compiling C++ translation. It can take a long time and consume a lot of memory!
Compiling release...
/usr/bin/ld: no se puede encontrar -lSDL2
collect2: error: ld returned 1 exit status

I already had compile for 32 Bits without problems.

  • make the voices be something appart Music or SFX. because in Spanish, the Voices are too soft.

  • Delete "modem" option, just don't have any sense if already is removed from ASM Code.

  • Add "Anisotropic Filter" and/or filters like "2xsai, Super2xsai, SuperEagle, LQ2X, HQ2X"

Thanks for Readme.

win32 ver bugs

win10 x64 17713
sound stuttering during videos in fullscreen
dark screen after intro if UseOnlyOneCPU=0
alt-enter alt-enter in menu = OS halt)

[SOLVED] 'MOVIE FILE NOT FOUND' after launching the game

[Bug]
After following your installation guide (compile, copy game data, convert to lowercase) the game keeps letting me know: 'MOVIE FILE NOT FOUND' after starting it.

Using Arch Linux x64

PS: Many thanks for your engine!

corrupted track record tables

I've noticed that some track record tables have corrupted data either showing random strings or nothing like the one attached of Proving Grounds:

screenshot - 06 03 2016 - 09 40 21

There are other tracks that are fine like North Country or Pacific Spirit.

Problems compiling with sdl2.0.4

I have sdl 2.0.4-2, but the compile script isn't too happy. Am I doing something wrong?

seppi@seppi7:~/repos/NFSIISE♠ ls
compile_nfs  'Need For Speed II SE'  Patches  README.md  src
seppi@seppi7:~/repos/NFSIISE♠ ./compile_nfs 
Building release for Linux... ld: skipping incompatible /usr/lib/libSDL2.so when searching for -lSDL2
ld: cannot find -lSDL2
seppi@seppi7:~/repos/NFSIISE♠ pacman -Ss sdl2 | grep 2.0.4
extra/sdl2 2.0.4-2 [installed]
multilib/lib32-sdl2 2.0.4-2

Implement platform independent solution for vaargs and va_list in printf/scanf

Currently, vaargs (... as parameter) and va_list seem to be platform dependent; I'm surprised the current approach works at all.

This primarily (only?) affects the following code:

NFSIISE/src/Wrapper.c

Lines 706 to 709 in fd87de0

REALIGN int32_t vsprintf_wrap(char *s, const char *fmt, va_list arg)
{
return vsprintf(s, fmt, arg);
}

NFSIISE/src/Wrapper.c

Lines 710 to 718 in fd87de0

REALIGN int32_t fscanf_wrap(FILE *f, const char *fmt, ...)
{
int ret;
va_list arg;
va_start(arg, fmt);
ret = vfscanf(f, fmt, arg);
va_end(arg);
return ret;
}

The solution would be to manually implement these functions, so the arguments are popped correctly.

I've prototyped a solution:

REALIGN int32_t vsprintf_wrap(char *s, const char *fmt, va_list arg)
{
  uint32_t* args = (uint32_t*)arg;
  
  if (!strcmp(fmt, "LOW %-8s")) {
    char* a1 = args[0];
    return sprintf(s, fmt, a1);
  } else if (!strcmp(fmt, "HIGH %-7s")) {
    char* a1 = args[0];
    return sprintf(s, fmt, a1);
  } else {
    printf("Unhandled '%s'\n", fmt);
  }
  assert(false);
  return 0;
}

So this is similar how other functions are implemented (expecting specific input). However, it would also be possible to search for % (or full formatting options like %-8s) and parse only each format argument.

app crash on startup

The latest trunk version crashes on my machine directly on startup. It only shows a little window with saying "Application closed with a signal: 11". The version from 2016-03-01 was still working.

I'm on Xubuntu 14.04.3 with the binary AMD driver on an AMD A8-5500 APU.

How compile under Debian Jessie Stable ?

Hi there. i am trying to compile under Debian Jessie Stable.

[NFSIISE]$ bash compile_nfs 
Building release for Linux (gcc)... Wrapper.c: En la función ‘initializeSDL2’:
Wrapper.c:288:2: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode
  for (int i = 0; i < n; ++i)
  ^
Wrapper.c:288:2: nota: use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your code

Ok i try with "-std=c99" (putting in the compile_nfs in the cflags line)


[NFSIISE]$ bash compile_nfs 
Building release for Linux (gcc)... Wrapper.c: En la función ‘WrapperInit’:
Wrapper.c:515:4: aviso: #warning "TODO: thread affinity" [-Wcpp]
   #warning "TODO: thread affinity"
    ^
ld: no se puede encontrar -lSDL2

Well i try with "std=gnu99"
$ bash compile_nfs
Building release for Linux (gcc)... ld: no se puede encontrar -lSDL2

Well i try again but with "std=c11"

[NFSIISE]$ bash compile_nfs 
Building release for Linux (gcc)... Wrapper.c: En la función ‘WrapperInit’:
Wrapper.c:515:4: aviso: #warning "TODO: thread affinity" [-Wcpp]
   #warning "TODO: thread affinity"
    ^
ld: no se puede encontrar -lSDL2
$ bash compile_nfs 
Building release for Linux (gcc)... ld: no se puede encontrar -lSDL2

and for some reason, this script can't read my sdl2

[NFSIISE]$ ls -l /usr/include/SDL2/ | awk '{print $9}'

begin_code.h
close_code.h
SDL2_framerate.h
SDL2_gfxPrimitives.h
SDL2_imageFilter.h
SDL2_rotozoom.h
SDL_assert.h
SDL_atomic.h
SDL_audio.h
SDL_bits.h
SDL_blendmode.h
SDL_clipboard.h
SDL_config.h
SDL_cpuinfo.h
SDL_endian.h
SDL_error.h
SDL_events.h
SDL_filesystem.h
SDL_gamecontroller.h
SDL_gesture.h
SDL.h
SDL_haptic.h
SDL_hints.h
SDL_image.h
SDL_joystick.h
SDL_keyboard.h
SDL_keycode.h
SDL_loadso.h
SDL_log.h
SDL_main.h
SDL_messagebox.h
SDL_mixer.h
SDL_mouse.h
SDL_mutex.h
SDL_name.h
SDL_net.h
SDL_opengles2.h
SDL_opengles.h
SDL_opengl.h
SDL_pixels.h
SDL_platform.h
SDL_power.h
SDL_quit.h
SDL_rect.h
SDL_render.h
SDL_revision.h
SDL_rwops.h
SDL_scancode.h
SDL_shape.h
SDL_stdinc.h
SDL_surface.h
SDL_system.h
SDL_syswm.h
SDL_test_assert.h
SDL_test_common.h
SDL_test_compare.h
SDL_test_crc32.h
SDL_test_font.h
SDL_test_fuzzer.h
SDL_test.h
SDL_test_harness.h
SDL_test_images.h
SDL_test_log.h
SDL_test_md5.h
SDL_test_random.h
SDL_thread.h
SDL_timer.h
SDL_touch.h
SDL_ttf.h
SDL_types.h
SDL_version.h
SDL_video.h

[NFSIISE]$ whereis sdl2-config
sdl2-config: /usr/bin/sdl2-config /usr/share/man/man1/sdl2-config.1.gz

[NFSIISE]$ sudo ldconfig -p | grep SDL2
	libSDL2_ttf-2.0.so.0 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libSDL2_ttf-2.0.so.0
	libSDL2_ttf-2.0.so (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libSDL2_ttf-2.0.so
	libSDL2_net-2.0.so.0 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libSDL2_net-2.0.so.0
	libSDL2_net-2.0.so (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libSDL2_net-2.0.so
	libSDL2_mixer-2.0.so.0 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libSDL2_mixer-2.0.so.0
	libSDL2_mixer-2.0.so (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libSDL2_mixer-2.0.so
	libSDL2_image-2.0.so.0 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libSDL2_image-2.0.so.0
	libSDL2_image-2.0.so (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libSDL2_image-2.0.so
	libSDL2_gfx-1.0.so.0 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libSDL2_gfx-1.0.so.0
	libSDL2-2.0.so.0 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0
	libSDL2-2.0.so (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so

How i must change in the script or source to fix it ???

NFS III wrapper?

Firstly, thank you for this wonderful project! This works flawlessly on my Linux machine!

The question is could you please try making another similar wrapper for Need for Speed III: Hot Pursuit? I think the game uses the same engine, so I think it's possible to re-use parts of this wrapper and it won't be really difficult.

Thanks in advance.

Linux: Unexpected crash on startup (no messagebox, error in console only)

OS: Arch Linux / Manjaro unstable repository
Crash in lib32-libxcb which is used by OpenGL drivers (not by NFSIISE/SDL2).

lib32-libxcb built with GCC 6 (Arch Linux package) needs 16-byte stack alignment for SSE instructions. NFSIISE has 4-byte data alignment (in assembly code), so it crashes e.g. on paddq instruction.

The patch will be uploaded soon. Currently please downgrade lib32-libxcb to: https://archive.archlinux.org/packages/l/lib32-libxcb/lib32-libxcb-1.11.1-1-x86_64.pkg.tar.xz

"MOVIE FILE NOT FOUND" error

Hi! I compiled the game succesfully, copied all the data files within the folder and renamed to lowercase. Now, when I start the game, it says "MOVIE FILE NOT FOUND", with only an abort option left. Did I do something wrong?

Android: "Application closed with a signal: 11" crash on startup

With the data installed to /sdcard/NFSIISE (after converting it all to lowercase using the provided script), I attempted to launch the app after compiling it. Unfortunately I immediately get a box saying "Probably crash! Application closed with a signal: 11". I attempted to launch a debugger to get you a backtrace but I was unable to get NDK/LLDB debugging working with Android Studio. JDB debugging doesn't show anything interesting.

For reference the device I'm using is a Kindle Fire HDX 7 inch, android version 4.4.4,
Compiled using SDK Tools 25.2.5, targeting Android API 10, Using Android NDK revision 15.1.4119039 and latest SDL2.

compile error OSX 10.6 w/gcc 4.2.1-apple

Hi I got.
Kernel32.c:536:19: error use of undeclared identifier 'TSCBRK'

I noticed there is a new NFSIISE-CPP repository, and that you said it was not as fast as the Assembly version. Is this mandatory?

Or maybe I need a newer compiler that supports TSCBRK?
Or I can revert that one change you did? How important is it for OSX?

Trouble building on Debian 8: no symbol

Not sure what this means at the moment.

output:

   debian/rules override_dh_auto_build
make[1]: Entering directory '/build/nfs2se-1.0.0+git+bsos'
# build
cd src/ && gcc -Wall -m32 -O2 -mno-sse2 -mno-sse -mno-mmx -DSTACK_REALIGN -c *.c && \
ld -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 -o "../Need For Speed II SE/nfs2se" \
*.o game-obj/NFS2SE.Linux.o -L/usr/lib -lc -lSDL2 -lGL -s -rpath=$ORIGIN -e start
game-obj/NFS2SE.Linux.o: In function `no symbol':
NFS2SE.asm:(.text+0x748a): undefined reference to `time_wrap'
NFS2SE.asm:(.text+0x749d): undefined reference to `time_wrap'
NFS2SE.asm:(.text+0x1c4b6): undefined reference to `SDL_GetTicks_wrap'
NFS2SE.asm:(.text+0x1c509): undefined reference to `SDL_GetTicks_wrap'
NFS2SE.asm:(.text+0x229d5): undefined reference to `fclose_wrap'
NFS2SE.asm:(.text+0x22aa1): undefined reference to `fscanf_wrap'
NFS2SE.asm:(.text+0x22ab2): undefined reference to `fscanf_wrap'
NFS2SE.asm:(.text+0x22ac3): undefined reference to `fscanf_wrap'
NFS2SE.asm:(.text+0x22ad4): undefined reference to `fscanf_wrap'
NFS2SE.asm:(.text+0x22ae5): undefined reference to `fscanf_wrap'
game-obj/NFS2SE.Linux.o:NFS2SE.asm:(.text+0x22afa): more undefined references to `fscanf_wrap' follow
game-obj/NFS2SE.Linux.o: In function `no symbol':
NFS2SE.asm:(.text+0x70867): undefined reference to `SDL_NumJoysticks_wrap'
NFS2SE.asm:(.text+0x708a9): undefined reference to `SDL_NumJoysticks_wrap'
NFS2SE.asm:(.text+0x7a895): undefined reference to `SDL_GetTicks_wrap'
NFS2SE.asm:(.text+0x7a8c8): undefined reference to `SDL_GetTicks_wrap'
NFS2SE.asm:(.text+0x7ac42): undefined reference to `SDL_GetTicks_wrap'
NFS2SE.asm:(.text+0x7ac5d): undefined reference to `SDL_GetTicks_wrap'
NFS2SE.asm:(.text+0x7ca31): undefined reference to `vsprintf_wrap'
NFS2SE.asm:(.text+0x7e4f1): undefined reference to `iSNDdirectsetfunctions_wrap'
NFS2SE.asm:(.text+0x7f556): undefined reference to `SDL_Delay_wrap'
NFS2SE.asm:(.text+0x7f5a5): undefined reference to `SDL_Delay_wrap'
NFS2SE.asm:(.text+0x82b86): undefined reference to `SDL_GetTicks_wrap'
NFS2SE.asm:(.text+0x82c23): undefined reference to `SDL_GetTicks_wrap'
NFS2SE.asm:(.text+0x82d15): undefined reference to `SDL_GetTicks_wrap'
NFS2SE.asm:(.text+0x82da7): undefined reference to `SDL_GetTicks_wrap'
NFS2SE.asm:(.text+0x84c26): undefined reference to `SDL_GetTicks_wrap'
game-obj/NFS2SE.Linux.o:NFS2SE.asm:(.text+0x84d50): more undefined references to `SDL_GetTicks_wrap' follow
game-obj/NFS2SE.Linux.o: In function `no symbol':
NFS2SE.asm:(.text+0x8bfcd): undefined reference to `calloc_wrap'
NFS2SE.asm:(.text+0x8eaf2): undefined reference to `SDL_GetTicks_wrap'
NFS2SE.asm:(.text+0x8ed8a): undefined reference to `vsprintf_wrap'
NFS2SE.asm:(.text+0x90d6c): undefined reference to `malloc_wrap'
NFS2SE.asm:(.text+0x9362a): undefined reference to `free_wrap'
debian/rules:13: recipe for target 'override_dh_auto_build' failed
make[1]: *** [override_dh_auto_build] Error 1

Refactor build system

The build system (compile_nfs) is pretty bad; it takes a long time to compile the project.
The build system should support incremental builds and provide more feedback.

(I'd suggest looking at CMake in case an exernal build system is considered)

lower case conversion script should handle file permissions

Hi,
trying to run the game after running the script fails. (again, the error msg box could be more verbose)
The script should also change the permission of the game files, so that you can run the game as standard user.

P.S.
I observe some bad flickering in the upper half of the screen while ingame. Maybe its due mesa radeonsi drivers? Problems go away using windowed mode instead of fullscreen.

Is there some chance to make a portable version for Software mode?

Searching so much I couldn't find a single way to play in Software for Windows 10 64 bits. Is there some chance could be made a version for software mode? It's so cool looking some stages like Mediterraneo in sunset instead of daylight (3Dfx mode).
Basically the problem with software mode is when tried to apply different options/patches in like Win7 systems, the game gets frozen screen when starting any track (like proving grounds) but music, sound effects and announcer still being heard, but the game doesn't show any progress on screen (even though apparently the code still being running, so you can get out with keyboard).

Incredible job with the 3dfx portable edition by the way, quite nice job !

Binary download from repo

I wanna try this, but i never compiled a software from source code before. It would be great to offer more detailed instruction about compiling or host the binaries to download

gamedata and fedata not found

I don't have the Original CD today and I don't think you can even buy it anywhere. How do I get the gamedata and fedata folders? The game wouldn't start without them.

Widescreen

Hello, I have 16:10 1440x900 widescreen monitor and I'm tired of black space in the edges of screen, are there any way to fix it?

View of inside of the car

I remember when playing this game, I could change the view to the inside of the car by pressing C. Isn't it available in the hardware accelerated game? I've only ever played the software rendered version.

Open-source assets?

Hello.

Are there any plans to eventually recreate the assets of the game completely, making the whole game open-source?

Are there any tools for creating new assets for the game? I'd like to give it a try at creating, say, new textures for tracks.

NFSIISE as a Libretro core

As the title says it is possible to create a libretro core from your work? This would benefit millions of users in both arm and x86 socs

Lots of build warnings

When I compile the game then I receive a lot of warnings. Finally everything works fine, I'm just wondering if this is ok?

Building OpenGL 2
Building release for Linux (gcc)... FetchTrackRecords.c: In function ‘fetchTrackRecords’:
FetchTrackRecords.c:82:9: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result]
    fgets(buffer, 80, f);
         ^
FetchTrackRecords.c:83:10: warning: ignoring return value of ‘fscanf’, declared with attribute warn_unused_result [-Wunused-result]
    fscanf(f, "%d\n", (int32_t *)buffer);
          ^
FetchTrackRecords.c:84:9: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result]
    fgets(buffer, 80, f);
         ^
FetchTrackRecords.c:90:10: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result]
     fgets(buffer, 80, f); //Skip unneeded line
          ^
FetchTrackRecords.c: In function ‘readEntry’:
FetchTrackRecords.c:60:7: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result]
  fgets(stfEntry->name, sizeof stfEntry->name, f);
       ^
FetchTrackRecords.c:64:8: warning: ignoring return value of ‘fscanf’, declared with attribute warn_unused_result [-Wunused-result]
  fscanf(f, "%hi\n%d\n%d\n", &stfEntry->car, &stfEntry->time, &stfEntry->mode);
        ^
In file included from Glide2x.c:30:0:
Glide2x/OpenGL2.c: In function ‘loadShaders’:
Glide2x/OpenGL2.c:262:2: warning: passing argument 3 of ‘glShaderSource’ discards ‘const’ qualifier from pointer target type [enabled by default]
  glShaderSource(g_vShader, 1, &vShaderSrc, &vShaderLen);
  ^
Glide2x/OpenGL2.c:262:2: note: expected ‘const GLchar **’ but argument is of type ‘const GLchar * const*’
Glide2x/OpenGL2.c:263:2: warning: passing argument 3 of ‘glShaderSource’ discards ‘const’ qualifier from pointer target type [enabled by default]
  glShaderSource(g_fShader, 1, &fShaderSrc, &fShaderLen);
  ^
Glide2x/OpenGL2.c:263:2: note: expected ‘const GLchar **’ but argument is of type ‘const GLchar * const*’
Kernel32.c: In function ‘MapViewOfFile_wrap’:
Kernel32.c:501:7: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Wunused-result]
   read(fMapping->fd, fileMap, size);
       ^
OK!

Deadzone on FFB Wheel

I have a Logitech Driving Force GT setted at 270° of rotation, and there's a deadzone wich i can't drive very well. Keep in mind that i have managed to run the original game with some patches and this issue is also present as-is. There's a way to fix that?

Game crashes on startup with "Application closed with a signal: 11"

The game shows the intro videos and loading screen and then just crashes.
I'm using Arch Linux (x86_64) with the nfs2se-git AUR package.
After installing it I have copied the directory fedata and gamedata from the CD to /opt/nfs2se/ as suggested. The file names were already lower-case, so this should not be an issue.

The console output is the following:

$ nfs2se 
Need For Speed II SE
  Wrapper v1.2.4
  Game    v1.1.2
  OpenGL  2
Application closed with a signal: 11

I tried also to use OpenGL 1 and disabling full screen mode. Both attempts did not help.

Output of glxinfo (truncated):

$ glxinfo -B
OpenGL renderer string: Radeon RX 560 Series (POLARIS11, DRM 3.27.0, 5.0.6-arch1-1-ARCH, LLVM 8.0.0)
OpenGL core profile version string: 4.5 (Core Profile) Mesa 19.0.1
OpenGL version string: 4.5 (Compatibility Profile) Mesa 19.0.1

If you need more information, please tell me.

Raspberry Pi 3 B+ "Application closed with a signal: 7" while racing

Whlie racing in Proving Grounds, 3 different times the game crashed at time index 0:20.8x. The fourth time it crashed at 0:21.12. So it happens around 21 seconds after the green light. I did a fifth test, entering the race without touching the keyboard. The game crashed while I was on my starting position, at time index 0:21.18. The sixth test, identical to the 5th one, crashed at the same time index as before.

One thing that all my tests have in common is the soundtrack, so I reduced the racing music to minimum and started a new race, again without touching the controls. It still crashed at 0:21.18, so it looks like the music was harmless. What else can it be?

Application Closed with signal 11

I installed nsf2se aur pkg in my manjaro, then copied the FeData and GameData folders to /opt/nfs2se/
then renamed them all lowercase i.e. fedata, gamedata
then run the command
$ nfs2se
and it showed that application closed with signal 11 error.
Any Fix?

Android installation issue

Hello.

I managed to install this game on my Nexus 5X but I ran into some trouble during the process.
Basically the problem is that since API 26, the 'android' command is no longer supported, and the installer script fails at 'android update ...'.

What I did as a workaround was to download the SDK Tools from API 25 (backing up the original ones, of course) and it worked.
It might be useful if you could update your installer script, or mention this workaround in the guide until then.
It might also be useful to mention that the apache-ant package is needed.

Overall, the game runs fine, except for the menus acting as if the down arrow key was pressed on a keyboard. Also the graphics are pretty bad but not terrible. With enough patience to fight through the menus and map the controls to a gamepad, the game becomes quite enjoyable - I'm certainly very happy to have it on my phone. EDIT: It stops doing that if you keep the phone with the camera facing the ground whenever you're in a menu.

Add CPU emulation

I think this should also support CPU emulation / patching, so it can avoid (illegally) sharing copyrighted material or derivatives thereof (Asm and Cpp submodules).

CPU emulation could be based on Unicorn-Engine (most platforms), or a virtualization provider like KVM, HAXM, WHPX, HVF (or an API to those, like https://github.com/StrikerX3/virt86).

This will also require some fix for #48 and #49.

Avoid use of 64-bit pointers

Until the entire game code is rewritten, the code will require 32-bit pointers as they might be casted to register values or 32-bit variables.

However, internally, the code will continue to use some native pointers, so the sizeof() structures would change on 64 bit (which is why 64 bit compilation is not supported, even with the Cpp module).

Example (lfbPtr is native pointer):

NFSIISE/src/Glide2x.h

Lines 294 to 300 in fd87de0

typedef struct {
int size;
void *lfbPtr;
uint32_t strideInBytes;
GrLfbWriteMode_t writeMode;
GrOriginLocation_t origin;
} GrLfbInfo_t;

A possible solution is:

// For Cpp
typedef uint32_t _GuestPointer;
#define GuestPointer(x) _GuestPointer
#define ConstGuestPointer(x) ConstGuestPointer(x)

// For 32-bit / ASM
#define GuestPointer(x) x*
#define ConstGuestPointer(x) const x*

(or a more C++-esque solution)

For allocations, one could use the following (for Linux - Windows code would be similar):

GuestPointer(void) malloc32(size_t size) {
	return mmap(NULL, size, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_32BIT|MAP_ANONYMOUS|MAP_SHARED, -1, 0);
}

void free32(GuestPointer(void) base) {
	munmap(base, 0); //FIXME: Specify proper size
}

GuestPointer(char) strdup32(ConstGuestPointer(char) s) {
	GuestPointer(char) p = malloc32(strlen(s) + 1);
	strcpy(p, s);
	return p;
}

Alternatively, there could be virtual memory to handle allocations in another address-space.

Run game without X server

Will it be posible to make the game run without a X server? At the moment it's aborting with an error message: SDL_Init failed: No available video device.

aspect ratio

First: very impressive solution! Thanks.

The game isn't able to scale correctly on screens with a different aspect ratio than 4:3 which was default back then (noticeable e.g. at the countdown traffic lights at the beginning of every race). It would be great to have an option to enforce the original aspect ratio when playing in full screen.

Game crashes after launch

Unfortunately the game keeps crashing after launching it. I get a frozen black window. No console output is shown.

System:
Linux tuxgaming 4.6.2-1-ARCH 2016 x86_64 GNU/Linux
GPU
nVidia with "nvidia" driver

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.