dborth / snes9xgx

Snes9x GX - Port of Snes9x for Wii
http://wiibrew.org/wiki/Snes9x_GX
Other
438 stars 64 forks source link

Change patching directory? Using patches with Retrode #946

Closed jz533 closed 3 years ago

jz533 commented 4 years ago

Hello! Basically, I would like to use a Retrode in conjunction with the patching ability. Since the Retrode makes the actual cartridge a usb drive, I do not think it is possible to have a ROM in the same directory as the patch. Is there any way we could change the directory that SNES9x looks for patches in?

jz533 commented 3 years ago

If someone could tell me how to do this myself by editing the source, that would also be helpful. Do not know where to start as coding is very new to me.

I tried putting the patch in an ips folder, and in the saves folder, which seems to work with some other emulators out there for PC, but this did not work.

dborth commented 3 years ago

In memmap.cpp look at void CMemory::CheckForAnyPatch

it looks for a bps, ips, or ups file in the same directory as the rom. you'd need to change that code. if you plan to do this properly, to be added to this codebase permanently, you'd also want to make that path configurable

snes9xgx.h would need a FILE_PATCH added to the enum and carried throughout the code, you could probably look at FILE_CHEAT and do something similar.

...if you do the work above and create a PR, I'll add it to the source.

jz533 commented 3 years ago

Thank you for the response.

So I have looked at the code, but I have no idea where to start...I can't imagine this is a hard change, but honestly, the only semi-experience I have with coding is html, css, and js, if that even counts as true coding. What language is this in? Any sort of documentation I could read on said language? I want to be able to do the work on this, but again, this is all so new to me.

Also, do you mean to say that the path should be configurable in the settings of the app itself? I agree; that would be ideal.

Perhaps the original developer of the Retrode fork, @revvv could help?

revvv commented 3 years ago

Well, I personally use the Retrode to dump a cartridge only once and then copy it to an SD card, but you really want the authentic feeling, I guess. On the other hand adding patches is not really playing the original any more. (All IMHO.)

If you think it is worth the effort to learn C/C++ then go on. It's a nice programming exercise, but reserve some free time for it.

BTW I only added the USB support for the gamepads, the Retrode as USB drive works out of the box.

That you already know Javascript is good. All programming languages are as powerful as each other. But don't tell this HR or marketing. ;-) And because of the different syntax details and APIs, it's a matter of time.