TASEmulators / BizHawk

BizHawk is a multi-system emulator written in C#. BizHawk provides nice features for casual gamers such as full screen, and joypad support in addition to full rerecording and debugging tools for all system cores.
http://tasvideos.org/BizHawk.html
Other
2.16k stars 381 forks source link

BSNESv115+ and original BSNES have different memory domain names, causing Lua scripts to fail #3405

Closed getCursorsExe closed 1 year ago

getCursorsExe commented 2 years ago

Example: https://github.com/brunovalads/yoshis-island/blob/master/BizHawk/Yoshi's-Island-BizHawk.lua

YoshiRulz commented 2 years ago

These are procedurally generated in new BSNES, so #wontfix? I guess we could revise the old BSNES but it's going to be removed soon...

CasualPokePlayer commented 1 year ago

"CARTRAM" is also used for Faust and Snes9x cores, BSNESv115+ is the odd one out having it CARTRIDGE_RAM instead. Renaming the enum would be enough to "fix" it for this case (other cases are probably as easy)

Morilli commented 1 year ago

fwiw there's also a CARTRIDGE_ROM domain which should be renamed as well if that's to happen... after looking at it though, I saw that the CARTRIDGE_RAM domain isn't necessarily "real" cartridge ram (see https://github.com/TASEmulators/BizHawk/blob/f29113287e88c6a644dbff30f92a9833307aad20/waterbox/bsnescore/bsnes/target-bsnescore/bsnescore.cpp#L326-L330), so I'm not entirely sure whether renaming is the correct course of action. After all, the core is similar but not the same as the old core, so having different memory domain names doesn't seem like something that must be fixed.

CasualPokePlayer commented 1 year ago

Looking at it it seems that the old core would just use the same variable for the various chips for something like SaveRAM (so cartridge.ram itself was a generalized memory region for SaveRAM) while the new core split the memory regions up into separate variables which would need this generalizing function to have the old behavior.

This same variable for different chips' SaveRAM is also the same behavior in Faust and (mostly) Snes9x.

Morilli commented 1 year ago

I'm not against renaming these domains if people think that's a good idea. I just copied the SNES_MEMORY enum names from the old core definition, that's why they are named the way they are.

YoshiRulz commented 1 year ago

Ideally the CARTRAM domain, along with any others which behave the same across cores, has the same name as Faust and Snes9x.