skmp / reicast-emulator

Reicast was a multiplatform Sega Dreamcast emulator
https://reicast.emudev.org
Other
1.1k stars 345 forks source link

Pi4: Crashing when using dynarec, works fine with interpreter #1727

Closed ITotalJustice closed 5 years ago

ITotalJustice commented 5 years ago

Please Note: This form is the minimum required information for submitting bugs.
Removing this form may lead to your issue being closed until it is completed.

| Platform | Branch | Hash | CIDL | | Pi4 / Raspbian (32bit) | Alpha |

Description of the Issue

When trying to boot any(?) game with Dynarec enabled, the games will crash after displaying the sega logo (the one that's displayed after the bios intro).

Interestingly, I can boot just fine when using interpreter. I am also able to change back to dynarec after loading past the point of it crashing, the game will then usually play fine, though sometimes I get alsa errors, though I think that's a separate issue).

If you need for logs, let me know.

crazy taxi

Unimplemented opcode: 000000A8 next_pc: 00002802 pr: 0C040986 msg: Unknown opcode
Fatal error : iNimp reached

 in cpu_iNimp -> /home/pi/test/reicast/linux/../../libswirl/hw/sh4/interpr/sh4_opcodes.cpp : 66 

Trace/breakpoint trap

shenmue

Unimplemented opcode: 00000163 next_pc: 0C0BD010 pr: 0C0F01AE msg: Unknown opcode
Fatal error : iNimp reached

 in cpu_iNimp -> /home/pi/test/reicast/linux/../../libswirl/hw/sh4/interpr/sh4_opcodes.cpp : 66 

Trace/breakpoint trap

sonic adventure (crashes after the fmv, before the title screen)

Unimplemented opcode: 00008C09 next_pc: 8C09900C pr: 8C053F0E msg: Unknown opcode
Fatal error : iNimp reached

 in cpu_iNimp -> /home/pi/test/reicast/linux/../../libswirl/hw/sh4/interpr/sh4_opcodes.cpp : 66 

Trace/breakpoint trap
skmp commented 5 years ago

Can you delete your emu.cfg and retry? It worked fine for me 2 weeks ago.

On Wed, 14 Aug 2019, 10:09 ITotalJustice, notifications@github.com wrote:

Please Note: This form is the minimum required information for submitting bugs. Removing this form may lead to your issue being closed until it is completed.

| Platform | Branch | Hash | CIDL | | Pi4 / Raspbian (32bit) | Alpha |

Description of the Issue

When trying to boot any(?) game with Dynarec enabled, the games will crash after displaying the sega logo (the one that's displayed after the bios intro).

Interestingly, I can boot just fine when using interpreter. I am also able to change back to dynarec after loading past the point of it crashing, the game will then usually play fine, though sometimes I get alsa errors, though I think that's a separate issue).

If you need for logs, let me know.

crazy taxi

Unimplemented opcode: 000000A8 next_pc: 00002802 pr: 0C040986 msg: Unknown opcode Fatal error : iNimp reached

in cpu_iNimp -> /home/pi/test/reicast/linux/../../libswirl/hw/sh4/interpr/sh4_opcodes.cpp : 66

Trace/breakpoint trap

shenmue

Unimplemented opcode: 00000163 next_pc: 0C0BD010 pr: 0C0F01AE msg: Unknown opcode Fatal error : iNimp reached

in cpu_iNimp -> /home/pi/test/reicast/linux/../../libswirl/hw/sh4/interpr/sh4_opcodes.cpp : 66

Trace/breakpoint trap

sonic adventure (crashes after the fmv, before the title screen)

Unimplemented opcode: 00008C09 next_pc: 8C09900C pr: 8C053F0E msg: Unknown opcode Fatal error : iNimp reached

in cpu_iNimp -> /home/pi/test/reicast/linux/../../libswirl/hw/sh4/interpr/sh4_opcodes.cpp : 66

Trace/breakpoint trap

  • Place an X in the box to confirm you have filled in this form

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/reicast/reicast-emulator/issues/1727?email_source=notifications&email_token=AADAAMRSJPXKTXQHU2XMISDQEOVT5A5CNFSM4ILRXTDKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HFEDK7A, or mute the thread https://github.com/notifications/unsubscribe-auth/AADAAMRSUWEKTXHEEJNXXBTQEOVT5ANCNFSM4ILRXTDA .

ITotalJustice commented 5 years ago

Tried that, same result sadly.

skmp commented 5 years ago

@ITotalJustice can you try git revert 4189cd432f6ae36d90d8cab62283eaa42713cf3d to disable FBCD and see if that works around the problem?

skmp commented 5 years ago

Just tried Crazy Taxi and Sonic Adventure, both work fine on my pi. However, I do get a crash on ikaruga during demo play.

OOKAMIFR commented 5 years ago

This version work with GDI ? How to have it please Thanks

ITotalJustice commented 5 years ago

Thanks skmp. After reverting back, everything seems to work fine.

I tried compiling the latest alpha also after, and the crash still occurs for me again. Looks like you found what was causing it ;)

skmp commented 5 years ago

Unfortunately, I've noticed several other glitches that are RPI4 specific. What's most unsettling, they don't happen on android for some reason.

ghost commented 5 years ago

dont have a pi4 i would suggest to try compiling with -fsigned-char see if that helps your issues

skmp commented 5 years ago

the bug seems to be that mcontext_t in the PI does not include the fpu registers. sigh

skmp commented 5 years ago

@ITotalJustice can you test the skmp/store-uctx-not-mctx branch? Should have a proper fix

ITotalJustice commented 5 years ago

This seems to be fixed, greate job! I tried sonic adventure, cray taxi, spiderman and skies of arcadia all for roughly 10 minutes each, and no crash!

I don't have ikaruga to test unfortunately (you mentioned it crashed for you).

OOKAMIFR commented 5 years ago

Finded how to fix it now !!! cause is about dependencies

for reicast sudo apt-get -y install build-essential libasound2 libasound2-dev libegl1-mesa-dev libgl1-mesa-dev libgles2-mesa-dev mesa-common-dev

please add libudev-dev libusb-1.0-0-dev

For video backend sudo apt-get install freeglut3 freeglut3-dev binutils-gold g++ cmake libglew-dev g++ mesa-common-dev build-essential libglew1.5-dev libglm-dev mesa-utils

Please note video backend option working on Pi4 is GLES and AUTOSELECTION the rest casue crash aand related in the code (I will save it next time)

also added tools for compiling (I think this is optional but it will be usefull in case where......) sudo apt install libarchive13 libc6 libcurl4 libexpat1 libgcc1 libgcc1 libgcc1 libjsoncpp1 librhash0 libstdc++6 libuv1 procps zlib1g gcc make cmake-data cmake-doc ninja-build libhwloc-dev ocl-icd-opencl-dev libglew-dev libedit-dev zlib1g-dev clang-3.8 libclang-3.8-dev cmake scons

sudo apt update
sudo apt upgrade
sudo apt-get autoremove

I used the last git without the command git revert

2 games tested on GDI format and now working without crash

If you can rebuild with these and tell us if it work now and hope it fix this issue :) .