libretro / picodrive

Fast MegaDrive/MegaCD/32X emulator
Other
38 stars 60 forks source link

[WiiU] MegaCD Games Aren't Loading and Just Showing a Blackscreen #186

Closed Ploggy closed 2 years ago

Ploggy commented 2 years ago

Loading a MegaCD game will just show a Blackscreen, no error. All Bios the files are correct and present

EDIT: I have a LOG file :) [INFO] RetroArch 1.9.12 (Git 6b7f28761a) [INFO] === Build ======================================= [INFO] Capabilities: [INFO] Built: Oct 25 2021 [INFO] Version: 1.9.12 [INFO] Git: 6b7f28761a [INFO] ================================================= [INFO] [Input]: Found input driver: "wiiu". [INFO] [Overrides]: No core-specific overrides found at "sd:/retroarch/config/PicoDrive/PicoDrive.cfg". [INFO] [Overrides]: No content-dir-specific overrides found at "sd:/retroarch/config/PicoDrive/soniccd.cfg". [INFO] [Overrides]: No game-specific overrides found at "sd:/retroarch/config/PicoDrive/Sonic CD (USA).cfg".

[INFO] [Environ]: GET_LANGUAGE: "0".

[INFO] [Remaps]: Remap directory: "sd:/retroarch/config/remaps". [INFO] [Overrides]: Redirecting save file to "sd:/retroarch/cores/savefiles/Sonic CD (USA).srm". [INFO] [Overrides]: Redirecting save state to "sd:/retroarch/cores/savestates/Sonic CD (USA).state". [INFO] [Environ]: PERFORMANCE_LEVEL: 0.

[INFO] [Environ]: GET_VARIABLE picodrive_sound_rate: 44100 [INFO] [Environ]: GET_VARIABLE picodrive_input1: 3 button pad [INFO] [Environ]: GET_VARIABLE picodrive_input2: None [INFO] [Environ]: GET_VARIABLE picodrive_ramcart: disabled [INFO] [Environ]: GET_VARIABLE picodrive_smstype: Auto [INFO] [Environ]: GET_VARIABLE picodrive_region: Auto [INFO] [Environ]: GET_VARIABLE picodrive_aspect: PAR [INFO] [Environ]: GET_VARIABLE picodrive_sprlim: enabled [INFO] [Environ]: GET_VARIABLE picodrive_overscan: disabled [INFO] [Environ]: GET_VARIABLE picodrive_overclk68k: disabled [INFO] [Environ]: GET_VARIABLE picodrive_drc: disabled [INFO] [Environ]: GET_VARIABLE picodrive_audio_filter: disabled [INFO] [Environ]: GET_VARIABLE picodrive_lowpass_range: 60 [INFO] [Environ]: GET_VARIABLE picodrive_frameskip: disabled [INFO] [Environ]: GET_VARIABLE picodrive_frameskip_threshold: 33 [INFO] [Environ]: GET_VARIABLE picodrive_renderer: accurate [INFO] [Environ]: GET_VARIABLE picodrive_sound_rate: 44100 [INFO] [CONTENT LOAD]: Content loading skipped. Implementation will load it on its own. [INFO] [Environ]: SET_PIXEL_FORMAT: RGB565. [INFO] [Environ]: SYSTEM_DIRECTORY: "sd:/retroarch/cores/system". [libretro INFO] detected BIN Sega/Mega CD image with USA region [INFO] [Environ]: SYSTEM_DIRECTORY: "sd:/retroarch/cores/system". [libretro INFO] using bios: sd:/retroarch/cores/system/us_scd2_9306.bin [libretro WARN] warning: wanted to map @02000000, got 0x151afe58 [libretro INFO] 00000:000: Track 1: 00:02:00 255826 DATA sd:/retroarch/downloads/soniccd/Sonic CD (USA).bin [libretro INFO] 00000:000: Track 2: 13:14:11 464 AUDIO [libretro INFO] 00000:000: Track 3: 13:20:25 8339 AUDIO [libretro INFO] 00000:000: Track 4: 15:11:39 6153 AUDIO [libretro INFO] 00000:000: Track 5: 16:33:42 6460 AUDIO [libretro INFO] 00000:000: Track 6: 17:59:52 7580 AUDIO [libretro INFO] 00000:000: Track 7: 19:40:57 6080 AUDIO [libretro INFO] 00000:000: Track 8: 21:01:62 6226 AUDIO [libretro INFO] 00000:000: Track 9: 22:24:63 8712 AUDIO [libretro INFO] 00000:000: Track 10: 24:21:00 6077 AUDIO [libretro INFO] 00000:000: Track 11: 25:42:02 5929 AUDIO [libretro INFO] 00000:000: Track 12: 27:01:06 7804 AUDIO [libretro INFO] 00000:000: Track 13: 28:45:10 5958 AUDIO [libretro INFO] 00000:000: Track 14: 30:04:43 4962 AUDIO [libretro INFO] 00000:000: Track 15: 31:10:55 6978 AUDIO [libretro INFO] 00000:000: Track 16: 32:43:58 4735 AUDIO [libretro INFO] 00000:000: Track 17: 33:46:68 6081 AUDIO [libretro INFO] 00000:000: Track 18: 35:07:74 8710 AUDIO [libretro INFO] 00000:000: Track 19: 37:04:09 5560 AUDIO [libretro INFO] 00000:000: Track 20: 38:18:19 5106 AUDIO [libretro INFO] 00000:000: Track 21: 39:26:25 6457 AUDIO [libretro INFO] 00000:000: Track 22: 40:52:32 5032 AUDIO [libretro INFO] 00000:000: Track 23: 41:59:39 5556 AUDIO [libretro INFO] 00000:000: Track 24: 43:13:45 6079 AUDIO [libretro INFO] 00000:000: Track 25: 44:34:49 6376 AUDIO [libretro INFO] 00000:000: Track 26: 45:59:50 2326 AUDIO [libretro INFO] 00000:000: Track 27: 46:30:51 2326 AUDIO [libretro INFO] 00000:000: Track 28: 47:01:52 785 AUDIO [libretro INFO] 00000:000: Track 29: 47:12:12 1801 AUDIO [libretro INFO] 00000:000: Track 30: 47:36:13 1763 AUDIO [libretro INFO] 00000:000: Track 31: 47:59:51 976 AUDIO [libretro INFO] 00000:000: Track 32: 48:12:52 9235 AUDIO [libretro INFO] 00000:000: Track 33: 50:15:62 9384 AUDIO [libretro INFO] 00000:000: Track 34: 52:20:71 6977 AUDIO [libretro INFO] 00000:000: Track 35: 53:53:73 13428 AUDIO [libretro INFO] 00000:000: End CD - 56:53:01

[INFO] RetroPad, Port 1, Button "B (bottom)" => "B" [INFO] RetroPad, Port 1, Button "Y (left)" => "A" [INFO] RetroPad, Port 1, Button "Select" => "Mode" [INFO] RetroPad, Port 1, Button "Start" => "Start" [INFO] RetroPad, Port 1, Button "D-Pad Up" => "D-Pad Up" [INFO] RetroPad, Port 1, Button "D-Pad Down" => "D-Pad Down" [INFO] RetroPad, Port 1, Button "D-Pad Left" => "D-Pad Left" [INFO] RetroPad, Port 1, Button "D-Pad Right" => "D-Pad Right" [INFO] RetroPad, Port 1, Button "A (right)" => "C" [INFO] RetroPad, Port 1, Button "X (up)" => "Y" [INFO] RetroPad, Port 1, Button "L" => "X" [INFO] RetroPad, Port 1, Button "R" => "Z" [INFO] RetroPad, Port 2, Button "B (bottom)" => "B" [INFO] RetroPad, Port 2, Button "Y (left)" => "A" [INFO] RetroPad, Port 2, Button "Select" => "Mode" [INFO] RetroPad, Port 2, Button "Start" => "Start" [INFO] RetroPad, Port 2, Button "D-Pad Up" => "D-Pad Up" [INFO] RetroPad, Port 2, Button "D-Pad Down" => "D-Pad Down" [INFO] RetroPad, Port 2, Button "D-Pad Left" => "D-Pad Left" [INFO] RetroPad, Port 2, Button "D-Pad Right" => "D-Pad Right" [INFO] RetroPad, Port 2, Button "A (right)" => "C" [INFO] RetroPad, Port 2, Button "X (up)" => "Y" [INFO] RetroPad, Port 2, Button "L" => "X" [INFO] RetroPad, Port 2, Button "R" => "Z"

[INFO] ndx flags ptr offset start select disconn len addrspace [INFO] 001 M1A1bc 0x10680de8 00000000 00FF0000 FFFF0000 00000000 00010000 68KRAM [INFO] 002 M1A1bc 0x151cfe58 00000000 80020000 FFF80000 00000000 00080000 PRGRAM

[INFO] Version of libretro API: 1 [INFO] Compiled against API: 1 [INFO] [Audio]: Set audio input rate to: 44055.94 Hz. [INFO] [Video]: Video @ 960x720

[INFO] [hid]: starting polling thread. [INFO] handle: 2061340 [INFO] physical_device_inst: 0 [INFO] vid: 0x7e05 [INFO] pid: 0x3703 [INFO] interface_index: 0 [INFO] sub_class: 0 [INFO][INFO] protocol: 0 [INFO] max_packet_size_rx: starting 44055.94 Hz. nst API: 1 37 max_packet_size_tx: 5 max[INFO] [Input]: Found HID driver: "wiiu". [INFO] [Joypad]: Found joypad driver: "wiiu". [INFO] [Video]: Setting refresh rate to: 59.940 Hz. [INFO] [Audio]: Set audio input rate to: 44055.94 Hz. [INFO] [Font]: Using font rendering backend: stb-unicode. [INFO] [Video]: Found display server: null [INFO] [Display]: Found display driver: "gx2". [INFO] [Font]: Using font rendering backend: stb-unicode. [INFO] [Font]: Using font rendering backend: stb-unicode. [INFO] [Font]: Using font rendering backend: stb-unicode. [INFO] [Font]: Using font rendering backend: stb-unicode. [INFO] [Font]: Using font rendering backend: stb-unicode. [INFO] [Font]: Using font rendering backend: stb-unicode. [INFO] [Font]: Using font rendering backend: stb-unicode. [INFO] [Font]: Using font rendering backend: stb-unicode. [INFO] [Font]: Using font rendering backend: stb-unicode. [INFO] [Playlist]: Loading history file: [sd:/retroarch/content_history.lpl]. [INFO] [Playlist]: Loading history file: [sd:/retroarch/content_music_history.lpl]. [INFO] [Playlist]: Loading favorites file: [sd:/retroarch/content_favorites.lpl].

[INFO] [Environ]: SET_GEOMETRY: 320x224, aspect: 1.429. [INFO] [Core]: Content ran for a total of: 00 hours, 00 minutes, 08 seconds. [INFO] Saving runtime log file: sd:/retroarch/cores/playlists/logs/PicoDrive/Sonic CD (USA).lrtl [INFO] [CORE]: No content, starting dummy core. [INFO] [SRAM]: Saving RAM type #0 to "sd:/retroarch/cores/savefiles/Sonic CD (USA).srm". [INFO] [SRAM]: Saved successfully to "sd:/retroarch/cores/savefiles/Sonic CD (USA).srm". [INFO] [Core]: Content ran for a total of: 00 hours, 00 minutes, 00 seconds. [INFO] [Core]: Unloading game.. [INFO] [Core]: Unloading core.. [INFO] [Core]: Unloading core symbols.. [INFO] [Core Options]: Saved core options file to "sd:/retroarch/config/PicoDrive/PicoDrive.opt" [INFO] [Video]: Does not have enough samples for monitor refresh rate estimation. Requires to run for at least 4096 frames. [INFO] RetroArch 1.9.12 (Git 6b7f28761a) [INFO] === Build ======================================= [INFO] Capabilities: [INFO] Built: Oct 25 2021 [INFO] Version: 1.9.12 [INFO] Git: 6b7f28761a [INFO] ================================================= [INFO] [Input]: Found input driver: "wiiu". [INFO] [Environ]: SET_PIXEL_FORMAT: RGB565. [INFO] Version of libretro API: 1 [INFO] Compiled against API: 1 [INFO] [Audio]: Set audio input rate to: 48000.00 Hz. [INFO] [Video]: Video @ 960x720

[INFO] [hid]: starting polling thread. [INFO] [Input]: Found HID driver: "wiiu". [INFO] [Joypad]: Found joypad driver: "wiiu". [INFO] [hid]: polling thread is starting [INFO] [Video]: Setting refresh rate to: 59.940 Hz. [INFO] [Audio]: Set audio input rate to: 48000.00 Hz. [INFO] [Video]: Found display server: null [INFO] [Display]: Found display driver: "gx2". [INFO] [Font]: Using font rendering backend: stb-unicode. [INFO] [Font]: Using font rendering backend: stb-unicode. [INFO] [Font]: Using font rendering backend: stb-unicode. [INFO] [Font]: Using font rendering backend: stb-unicode. [INFO] [Font]: Using font rendering backend: stb-unicode. [INFO] [Font]: Using font rendering backend: stb-unicode. [INFO] [Font]: Using font rendering backend: stb-unicode. [INFO] [Font]: Using font rendering backend: stb-unicode. [INFO] [Font]: Using font rendering backend: stb-unicode. [INFO] [SRAM]: SRAM will not be saved. [INFO] [Playlist]: Loading history file: [sd:/retroarch/content_history.lpl]. [INFO] [Playlist]: Loading history file: [sd:/retroarch/content_music_history.lpl]. [INFO] [Playlist]: Loading favorites file: [sd:/retroarch/content_favorites.lpl]. [INFO] [Config]: Saving salamander config to: "sd:/retroarch/retroarch-salamander.cfg". [INFO] [Config]: Saved new config to "sd:/retroarch/retroarch.cfg". [INFO] [Core]: Content ran for a total of: 00 hours, 00 minutes, 00 seconds. [INFO] [Core]: Unloading core.. [INFO] [Core]: Unloading core symbols.. [INFO] [Video]: Does not have enough samples for monitor refresh rate estimation. Requires to run for at least 4096 frames. [INFO] [Video]: Does not have enough samples for monitor refresh rate estimation. Requires to run for at least 4096 frames.

irixxxx commented 2 years ago

This looks severely odd, I think:

[INFO] max_packet_size_rx: starting 44055.94 Hz. nst API: 1 37 max_packet_size_tx: 5 max[INFO] [Input]: Found HID driver: "wiiu".

memory overwrite somwhere?

irixxxx commented 2 years ago

With the help of @Ploggy and @vaguerant I detected that this is probably a bug in the fame 68k emulator, or the interfacing to it. It works fine when switching over to musashi.

irixxxx commented 2 years ago

This is a bug in the ELF loader/converter tool which doesn't resolve a relocation of type PicoMem.ram-0xe00000 correctly. I think this can potentially hurt others as well.

irixxxx commented 2 years ago

circumvented by fb82e16