twinaphex/genesis-next — comment on commit 62ee45296bd1e23ca9dede6461caa59d0d0f7357
File:  line 0
By ekeeke:

1) about your load_rom issues:

Off course you are not supposed to unzip the ROM before calling load_rom, what you are missing is that, as mentioned in my earlier post, load_archive is supposed to UPDATE the filename given in parameter in case it's a compressed file, i.e should be returning uncompressed file name to the caller. I know it's not recommended usage by C gurus but I honestly don't care... Btw, there isn't any .md or .gen detection, SYSTEM_MD is used by default when extension is not recognized so that's not the problem you think it is.

That's why I said it might cause issue if you are not aware of that and are using my load_archive code directly. Indeed, It seems you are using a global string (current_rom) that you are using later for building SRAM file path and it's here I think it's crashing crash because current_rom would be updated and hold uncompressed filename WITHOUT ANY PATH which makes your "extract_filename_only" macro crash (strrchr(fname, '/') return NULL in that case).

This is what I guess is happening though as I can't tell from your commits or current repository which code is crashing or which one is working for you... what is sure is that the load_archive function in emu_ps3.c is not the one I'm using (also, allocating a 4MB buffer before reading file when MAXROMSIZE is 10MB is not a good idea, you'd better directly load into cart.rom like I do).

A fast solution would be to call reload_rom(rom_path_temp) from the menu after having updated current_rom for your SRAM stuff and get ride of that useless "emulator_init_system function", just initialize stuff and allocate cart.rom on startup, this will save you lot of trouble and potential errors.

2) about : m68kops.h is only included by which itself only includes before, that makes a few includes but never shared.h or stdlib.h so I don't know what is your error exactly but it shouldn't be a problem to have it included here. Generally speaking, it's more appropriate to first understand what the issue is exactly instead of moving stuff around because "it works", it can be a hint for some more serious issue.

3) about Alien 3: no idea why it's not working but it sure is not something related to the core changes, this game does not require anything special. It's hard to say more without tracing when it crashes or log the boot sequence to figure it out.