irixxxx / picodrive

Fast MegaDrive/MegaCD/32X emulator
Other
51 stars 24 forks source link

[ARM 32 bit] [MD/GEN] Mortal Kombat Arcade Edition Rom Hack Crash after Title Screen #58

Open xXS4ALLx opened 2 years ago

xXS4ALLx commented 2 years ago

Mortal Kombat Arcade Edition Rom hack for the MegaDrive/Genesis was recently released: http://www.romhacking.net/hacks/6446/ Using PicoDrive, the game crashes after the title screen, however using SDL Retro OPK with the "Genesis Plus GX" core, this rom hack works fine. Rom hack also works on real hardware using a cheap EverDrive clone flash cart.

Would it be possible to fix?

Below is the gmenu2x log file:

Turning audio amplifier ON Applied keymap rom command: "keymap rom '/mnt/Roms/Sega/MD/Mortal Kombat - Arcade Edition (Rom Hack).bin'" Quick_save_file: /mnt/Roms/Sega/MD/Mortal Kombat - Arcade Edition (Rom Hack).quicksave warning: video overlay is not hardware accelerated, not going to use it. cfg_file_rom: /mnt/Roms/Sega/MD/Mortal Kombat - Arcade Edition (Rom Hack).fkcfg cfg_file_default: /mnt/Roms/Sega/MD/default_config.fkcfg Loading configuration from '/mnt/Roms/Sega/MD/default_config.fkcfg' Reading option: 'aspect_ratio', value: 'STRETCHED' Reading option: 'aspect_ratio_factor_percent', value: '50' Loading configuration from '/mnt/Roms/Sega/MD/Mortal Kombat - Arcade Edition (Rom Hack).fkcfg' Reading option: 'aspect_ratio', value: 'STRETCHED' Reading option: 'aspect_ratio_factor_percent', value: '50' plat_sdl: using 320x240 as fullscreen resolution Creating plat_sdl_screen surface: w=320, h=240 Creating plat_sdl_screen surface: g_menuscreen_w=320, g_menuscreen_h=240 plat_sdl: overlay: fmt 59565955, planes: 1, pitch: 640, hw: 0 Creating plat_sdl_screen surface: w=320, h=240 config_readsect: unhandled val for "Show FPS": "1]" config_readsect: can't parse: ] input: missing driver for 'sdl:keys]' input: can't handle dev: sdl:keys] config_readsect: can't parse: ] config_readsect: loaded from /mnt/FunKey/.picodrive/config2.cfgwarning: failed to do hugetlb mmap (0x2000000, 4194308): 22

using sdl audio output driver platform/libpicofe/readpng.c: failed to open: /usr/games/skin/font.png platform/libpicofe/readpng.c: failed to open: /usr/games/skin/selector.png emu_ReloadRom(/mnt/Roms/Sega/MD/Mortal Kombat - Arcade Edition (Rom Hack).bin) config_readsect: unhandled val for "Show FPS": "1]" config_readsect: can't parse: ] input: missing driver for 'sdl:keys]' input: can't handle dev: sdl:keys] config_readsect: can't parse: ] config_readsect: loaded from /mnt/FunKey/.picodrive/config2.cfg config_readsect: unhandled val for "Show FPS": "1]" config_readsect: can't parse: ] input: missing driver for 'sdl:keys]' input: can't handle dev: sdl:keys] config_readsect: can't parse: ] config_readsect: loaded from /mnt/FunKey/.picodrive/config2.cfg 00000:000: couldn't open carthw.cfg! 00000:000: sram: 200000 - 203fff; eeprom: 0

System Announce: Genesis, NTSC / 60FPS PicoIn.AHW = 0, Pico.m.hardware=160 input: new device #0 "sdl:keys" input: async-only devices detected.. .# drv probed binds name 0 0 y

DrUm78 commented 2 years ago

Crashes after the title screen on the latest PD code for me too. I get "Bus error" in GMenu2X logs though.

DrUm78 commented 2 years ago

Culprit is Cyclone, works fine with Fame instead.

irixxxx commented 2 years ago

It's a design problem in Picodrive. Cyclone can only read instructions from memory segments, each of 64KB size. That works everywhere in the rom, but for the segment the SRAM is in. That memory segment can't be read directly, but only through a function. However, this hack is accessing code in that segment, which is why it fails. Fame is not affected because it has it's own memory mapping which ignores SRAM. Changing this would be too much work. I guess fame is the way to go for the moment.

irixxxx commented 2 years ago

To make this clear once again: this is only happening on devices with a 32 bit ARM cpu. All other platforms use the fame cpu emulator, which isn't affected.