Coder Social home page Coder Social logo

drally's People

Contributors

bszili avatar jopadan avatar urxp 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

drally's Issues

Graphical corruption in 320x200 modes

This might be specific to ppc64le (or my system, or video card - WX7100 under Fedora 35), but the 320x200 modes have graphical corruption on the top and bottom borders. Uncommenting these lines helps, though it doesn't eliminate it completely. Not sure why they were commented originally.

diff --git a/drally_linux_c.c b/drally_linux_c.c
index 7d86759..c0d7a48 100644
--- a/drally_linux_c.c
+++ b/drally_linux_c.c
@@ -230,19 +230,19 @@ void __VGA3_SETMODE(void){
        GX.ActiveMode = VGA3;
 }
 
 void __VGA13_SETMODE(void){
 
        if(GX.ActiveMode != VGA13){
 
                GX.Surface = GX.VGA13.Surface;
-       //      SDL_SetRenderDrawColor(GX.Renderer, 0, 0, 0, 255);
-       //      SDL_RenderClear(GX.Renderer);
-       //      SDL_RenderPresent(GX.Renderer);
+               SDL_SetRenderDrawColor(GX.Renderer, 0, 0, 0, 255);
+               SDL_RenderClear(GX.Renderer);
+               SDL_RenderPresent(GX.Renderer);
                SDL_RenderSetLogicalSize(GX.Renderer, 320, 200);
                if(SDL_GetWindowFlags(GX.Window)&SDL_WINDOW_HIDDEN) SDL_ShowWindow(GX.Window);
                GX.ActiveMode = VGA13;
        }
 }
 
 void __VESA101_SETMODE(void){
 

Otherwise, the game plays great. There's a segfault if you let the demo run too long, but it's not something most people will hit, and I'll file that separately. Thanks for this, I loved this game back in the day, and it's more convenient to play it native than in DOSBox.

psvita port

Hi @urxp ,

I've just create a port for the PSVita of your project.

Do you want to integrate this port to your project?

Also, I've test your project and is better than mine in terms of functionality and stability. It could be great if I share somehow my knowledge about the original source code. I think I know all method function names, most of structures (also the 3d structures, race maps...). Do you have same link to colaboration instructions?

Thanks for all!

Crash if sitting too long at the menu

If you sit at the menu, and let it go through the brag screens without pressing a key, it will eventually crash (ppc64le, Fedora 35). Not sure this is reproducible on other platforms, but it happens consistently here.

Thread 1 "drally_linux" received signal SIGSEGV, Segmentation fault.
0x000000001000cf64 in __bpk_out (outb=<optimized out>) at bpk.c:96
96				s_dst[bytes_out_cnt++] = ROR_BYTE(outb, 3);
(gdb) bt
#0  0x000000001000cf64 in __bpk_out (outb=<optimized out>) at bpk.c:96
#1  __bpk_out (outb=<optimized out>) at bpk.c:90
#2  __bpk_unstack (cb=<optimized out>) at bpk.c:62
#3  __bpk_unstack (cb=<optimized out>) at bpk.c:60
#4  __bpk_decode4 (size=<optimized out>, offset=<optimized out>, 
    dst=<optimized out>, src=<optimized out>) at bpk.c:165
#5  0x000000001003bacc in ___3d9c0h_cdecl (A1=<optimized out>, 
    A2=0x10096950 "credit1.bpk", A3=<optimized out>) at ___3d9c0h.c:25
#6  0x0000000010076844 in menu___3da48h () at menu___3da48h.c:112
#7  0x0000000010022a44 in ___146c4h_cdecl (A1=<optimized out>)
    at ___146c4h.c:44
#8  0x00000000100723a0 in menu_main () at menu_main.c:233
#9  0x000000001000a16c in ___3e720h () at ___3e720h.c:64
#10 0x00000000100020d4 in main (argc=<optimized out>, argv=<optimized out>)
    at drally.c:40
Dump of assembler code from 0x1000cf54 to 0x1000cfa4:
   0x000000001000cf54 <__bpk_decode4+1892>:	rlwinm  r7,r10,29,3,31
   0x000000001000cf58 <__bpk_decode4+1896>:	rlwinm  r10,r10,5,0,26
   0x000000001000cf5c <__bpk_decode4+1900>:	li      r11,1
   0x000000001000cf60 <__bpk_decode4+1904>:	or      r10,r7,r10
=> 0x000000001000cf64 <__bpk_decode4+1908>:	stbx    r10,r16,r12
(gdb) i reg r16
r16            0x632d95ca6572594c  7146532880224770380

Looks like it got a totally nonsense address.

Clarify which releases are supported

There are a few Death Rally releases:

  • Shareware version
  • Retail version
  • Steam release

It will be useful to clarify in the README which one are compatible with the current state of the code.

"long int" error from sound2.c

Hello guys,
I got an issue when compiling the source.
This is the error it throws out from make:

sound2.c:117:21: error: format ‘%lld’ expects argument of type ‘long long int’, but argument 2 has type ‘long int’ [-Werror=format=]
  117 |         printf("%6lld\n", hi_p-(__POINTER__)sfx_p);
      |                 ~~~~^     ~~~~~~~~~~~~~~~~~~~~~~~
      |                     |         |
      |                     |         long int
      |                     long long int
      |                 %6ld
cc1: all warnings being treated as errors
make: *** [Makefile:36: sound2.o] Error 1

Hope you can help me out here. As far as I understood the instructions, I should have all dependencies (gcc, make, sdl2).

BR happycamper

Segmentation fault in __glDispatchCheckMultithreaded ()

$ gdb --args drally_linux
...
Death Rally *** Full Version 1.1
Copyright (c) 1995, 1996 Remedy Entertainment, Ltd.
___60030h not implemented
GET_IRQ_ISR not implemented
SET_IRQ_ISR not implemented
GET_VRETRACE_INTERVAL not implemented
VRETRACE_WAIT_FOR_START not implemented
TIMER_SET_TIMER not implemented
ENABLE_IRQ not implemented
GET_IRQ_ISR not implemented
SET_IRQ_ISR not implemented
[dRally] Checking size of ENGINE.BPA
[dRally] Checking size of IBFILES.BPA
[dRally] Checking size of MENU.BPA
[dRally] Checking size of MUSICS.BPA
[dRally] Checking size of TR0.BPA
[dRally] Checking size of TR1.BPA
[dRally] Checking size of TR2.BPA
[dRally] Checking size of TR3.BPA
[dRally] Checking size of TR4.BPA
[dRally] Checking size of TR5.BPA
[dRally] Checking size of TR6.BPA
[dRally] Checking size of TR7.BPA
[dRally] Checking size of TR8.BPA
[dRally] Checking size of TR9.BPA
[dRally] Checking size of ./CINEM/SANIM.HAF
[dRally] Checking size of ./CINEM/SANIM.HAF
[dRally] Checking size of ./CINEM/ENDANI.HAF
[dRally] Checking size of ./CINEM/ENDANI0.HAF
[dRally] Checking size of dr.cfg

Loading music & effects, please wait...
[dRally] Checking size of ./CINEM/sanim.haf
[New Thread 0xf5253b40 (LWP 227301)]
[dRally.SOUND] Opening audio device.
[New Thread 0xd49ffb40 (LWP 227302)]
[dRally.SOUND] Audio opened: 22050 hz, 2 channels, 512 samples
[dRally.SOUND] MSX: tr0-mus.cmf, SFX: sanim-e.cmf
MEMORY_LOCK FAILED!
MEMORY_LOCK FAILED!
MEMORY_LOCK FAILED!
MEMORY_LOCK FAILED!
MEMORY_LOCK FAILED!
MEMORY_LOCK FAILED!
MEMORY_LOCK FAILED!
VGA13_SETMODE not implemented

Thread 1 "drally_linux" received signal SIGSEGV, Segmentation fault.
0xf715a45b in __glDispatchCheckMultithreaded () from /usr/lib32/libGLdispatch.so.0
(gdb) bt
#0  0xf715a45b in __glDispatchCheckMultithreaded () from /usr/lib32/libGLdispatch.so.0
#1  0xf71314ff in glXGetProcAddressARB () from /usr/lib32/libGLX.so.0
#2  0xf7ef7c7d in ?? () from /usr/lib32/libSDL2-2.0.so.0
#3  0xf7ebcb80 in ?? () from /usr/lib32/libSDL2-2.0.so.0
#4  0xf7ebcf3f in ?? () from /usr/lib32/libSDL2-2.0.so.0
#5  0xf7e58d98 in ?? () from /usr/lib32/libSDL2-2.0.so.0
#6  0xf7e5345b in ?? () from /usr/lib32/libSDL2-2.0.so.0
#7  0x5657abc1 in ?? ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)

Crash

Game crashes after about 30 seconds in race:

gdb ./drally_linux
GNU gdb (GDB; openSUSE Tumbleweed) 10.1
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-suse-linux".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
http://bugs.opensuse.org/.
Find the GDB manual and other documentation resources online at:
http://www.gnu.org/software/gdb/documentation/.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./drally_linux...
(gdb) run
Starting program: dRally/drally_linux
Missing separate debuginfos, use: zypper install glibc-32bit-debuginfo-2.33-1.1.x86_64
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".

Death Rally *** Full Version 1.1
[New Thread 0xe484eac0 (LWP 28555)]
[dRally.SOUND] Opening audio device.
[New Thread 0xd46ffac0 (LWP 28556)]
[dRally.SOUND] Audio opened: 22050 hz, 2 channels, 512 samples

Loading music & effects, please wait...
[dRally.SOUND] MSX: MEN-MUS.CMF, SFX: MEN-SAM.CMF
[dRally.Memory] Memory lock failed!
============= S3M resize: 505857 >>>> 53840
============= XM resize: 323793 >>>> 639
[dRally.Memory] Memory lock failed!
[dRally.Memory] Memory lock failed!
[dRally.Memory] Memory lock failed!
[dRally.Memory] Memory lock failed!
[dRally.Memory] Memory lock failed!
[dRally.Clean] ___12200h
[dRally.Clean] ___12a54h
[dRally.Clean] ___24ec0h
[dRally.Clean] ___2fc50h
[dRally.SOUND] MSX: TR5-MUS.CMF, SFX: GEN-EFE.CMF
[dRally.Memory] Memory lock failed!
============= S3M resize: 325036 >>>> 32048
============= XM resize: 385187 >>>> 1800
[dRally.Memory] Memory lock failed!
[dRally.Memory] Memory lock failed!
[dRally.Memory] Memory lock failed!
[dRally.Memory] Memory lock failed!
[dRally.Memory] Memory lock failed!

Thread 1 "drally_linux" received signal SIGSEGV, Segmentation fault.
0x080ae53f in race___50ef4h () at race___50ef4h.c:104
104 if(B(edx) != 0) B(esi+D(esp)+eax+D(esp+0x28)+0x5c) = B(edx);
Missing separate debuginfos, use: zypper install libFLAC8-32bit-debuginfo-1.3.3-1.5.x86_64 libSDL2-2_0-0-32bit-debuginfo-2.0.14-1.1.x86_64 libX11-6-32bit-debuginfo-1.7.0-1.1.x86_64 libXau6-32bit-debuginfo-1.0.9-1.7.x86_64 libXcursor1-32bit-debuginfo-1.2.0-1.5.x86_64 libXext6-32bit-debuginfo-1.3.4-1.7.x86_64 libXi6-32bit-debuginfo-1.7.10-1.5.x86_64 libXinerama1-32bit-debuginfo-1.1.4-1.8.x86_64 libXrandr2-32bit-debuginfo-1.5.2-1.7.x86_64 libXrender1-32bit-debuginfo-0.9.10-1.12.x86_64 libXxf86vm1-32bit-debuginfo-1.1.4-1.17.x86_64 libasound2-32bit-debuginfo-1.2.4-3.1.x86_64 libgcrypt20-32bit-debuginfo-1.8.7-1.1.x86_64 libglvnd-32bit-debuginfo-1.3.2-2.1.x86_64 libgpg-error0-32bit-debuginfo-1.41-1.1.x86_64 liblz4-1-32bit-debuginfo-1.9.3-1.1.x86_64 libpulse0-32bit-debuginfo-14.2-1.1.x86_64 libsndfile1-32bit-debuginfo-1.0.28-10.5.x86_64 libspeex1-32bit-debuginfo-1.2-1.12.x86_64 libsystemd0-32bit-debuginfo-246.9-1.1.x86_64 libvorbis0-32bit-debuginfo-1.3.7-1.2.x86_64 libvorbisenc2-32bit-debuginfo-1.3.7-1.2.x86_64 libxcb1-32bit-debuginfo-1.14-1.3.x86_64 libzstd1-32bit-debuginfo-1.4.8-2.1.x86_64

(gdb) bt
#0 0x080ae53f in race___50ef4h () at race___50ef4h.c:104
#1 0x08087c7e in race_main (A1=0, A2=4) at race_main.c:1285
#2 0x0805896e in ___33010h_cdecl (A1=4) at ___33010h.c:1083
#3 0x080615df in ___3266ch () at ___3266ch.c:443
#4 0x080d7554 in shop_main () at shop_main.c:241
#5 0x080d38f5 in menu___194a8h () at menu___194a8h.c:89
#6 0x080d2802 in menu_main () at menu_main.c:239
#7 0x0804e778 in ___3e720h () at ___3e720h.c:58
#8 0x080495c7 in main (argc=1, argv=0xffffce74) at drally.c:41

how do you obtain the asembly code?

hi,
i'm doing a project similar to yours with death rally. Great job!!

i have one question about how you ojtain this assbly code, what tools help you to obtain this code from the exe?

thanks and continue with this amazing job

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.