Closed EvilJagaGenius closed 3 years ago
Yes, it requires emulation of Mega SD specific mapper to detect and handle CD-DA play commands sent by the (patched) MD+ games.
I actually have already implemented complete mapper (based on Mega SD dev manual available on Terraonion website) in my local repository and verified first MD+ patched games (tested SOR2 and Outrun I think) worked fine but was waiting for an updated dev manual to publish changes as it seems there are additional parameters/commands used in later patches that are still undocumented (for looping track playback it seems).
You're in luck, I informed Neodev (the MegaSD developer) about it, and he updated the dev manual for the new parameters/commands. You should be able to get your MD+ implementation complete now, hopefully. He also said the best game to test the "stop with fadeout" is with the Ys III patch when entering a building, the music should fade out nicely instead of a hard stop. He also said the Strider patch has loop point specification in the cue sheet, so another good test for it.
https://downloads.terraonion.com/public/MegaSD_DEV_Manual.pdf
Good luck. :)
P.S. in case any of you guys didn't already know, there's a MD+ hacks database here with all the latest MD+ patches: http://www.zeldix.net/f66-md-hacks-database
That's nice. Thanks to you both, I will give it a shot when I got some time. There seem to be a lot of new stuff, this should keep me busy...
That's nice. Thanks to you both, I will give it a shot when I got some time. There seem to be a lot of new stuff, this should keep me busy...
Did you make progress with Mega SD support?
Or at least release the preliminary version you did in january, i know that music tracks will not have loop support, but its OK.
I can do longer wavs for the moment XD
I have quite all commands implemented except the ones that let you open/read files and play WAV files from storage device (no software that use these commands exist yet so maybe this can indeed be left pending for the moment). Still need to test the few commands that are being used with current existing patched games and add a way to enable/disable MegaSD support in the various supported ports (libretro, wii/gamecube and sdl) because it is incompatible with existing MD hacks that have CD-DA support (on real MegaSD you need to patch the header of those existing hacks to make them work, which is a little bit unconvenient).
The implementation of MegaSD support on consoles (WII / NGC) would be great! It is a definitive improvement for the megadrive system. I will be attentive and appreciate these developments.
I have quite all commands implemented except the ones that let you open/read files and play WAV files from storage device (no software that use these commands exist yet so maybe this can indeed be left pending for the moment). Still need to test the few commands that are being used with current existing patched games and add a way to enable/disable MegaSD support in the various supported ports (libretro, wii/gamecube and sdl) because it is incompatible with existing MD hacks that have CD-DA support (on real MegaSD you need to patch the header of those existing hacks to make them work, which is a little bit unconvenient).
How many chances are that mega sd support be added before the end of this year?
Krikkz has ported Terraonions MD+ patches to MSU-MD (Mega EverDrive Pro). https://github.com/krikzz/msu-md/tree/master/ips Unfortunately audio doesn't play in any of the titles in GenPlusGX. I tried a few in Fusion (just to see if audio works) with mixed results, Moonwalker is fine but Golden Axe and Strider has issues.
I take it this format (MSU-MD) isn't 100% identical to the Rock 'n Roll Racing CD audio hack, which is working fine in GenPlusGX btw.
See https://github.com/ekeeke/Genesis-Plus-GX/issues/329.
They work fine providing you have all 3 region CD BIOS properly named and the cue file as the same basename as the ROM file you load.
I do have all bios images and correct cue sheets and filenames. Perhaps the libretro core isn't up-to-date ? The one I have is newest available for Windows x86_64, Genesis Plus GX (v1.7.4 7fa34f2).
If you don't have anything to do with libretro core, then I do apologize.
Ah, sorry, nevermind. I grabbed a snapshot of latest source from this repo and compiled a 64-bit dll and it's working now.
I guess the official Retroarch buildbot hasn't caught up yet.
Sorry for the false alarm and thanks again.
Yes, after looking a bit into it, the libretro repository is missing the following commit that improved CDD interrupt emulation accuracy: https://github.com/ekeeke/Genesis-Plus-GX/commit/e66b7bc83d2ef98feeb5f40b2ebebd55f727406e
It does not work without these changes because Krikzz's Mega CD Mode 1 driver (which is embedded in those 'MSU-MD' patches) does not use the BIOS commands but directly accesses CD registers to initialize CD hardware, play tracks, etc and does it a bit differently from official BIOS software. Unfortunately, the emulator has a few optimizations (i.e deliberate inacccuracies or simplified hardware behavior) based on the assumption that CD registers are always accessed like official BIOS are doing, which can break unofficial code (like MSU-MD driver) doing unexpected stuff.
NB: this is also the reason why, even with latest changes, the first track starts playing automatically in Genesis Plus GX when those patched games are starting. I will commit a fix for this when I got some time.
Has there been any progress regarding the MD+ standard?
Not much I am afraid. As usual, I need to find some time (and motivation) to work on it, which is kinda limited for me these days.
I just found your fork of the msu-md driver and played around with it. Thank you very much for your effort! I loaded my own msu-md hacks, as well as your updated sample in the latest genesisPlusGX core and though the looping offset was exact, the looping itself was not 100% seemless. Is this something you may continue to support? I'd love that and promise to make good use of it in return. Thank you again and take care.
Hi. The reason it's not 100% seemless in emulator is likely because seek time emulation is always enabled by default so you will get some delay with silence before audio playback starts again from loop offset. The same would occur with real CD hardware or Mega SD / Mega ED pro flashcarts with seek time emulation enabled (not sure if it can be disabled on the latter) and there is nothing I can do in MSU-MD driver code to fix it. Therefore I am not sure what kind of support you are thinking about: the addition of loop command suport in Krikzz's driver what just a quick exercise I did to show it was possible with Mode 1 and I have no plan to work more on it as I consider it to be done.
All I could possibly do is to add a configurable setting for seek time emulation in Genesis Plus GX (like it exists in Mega SD implementation) but it's kinda painful to do (this is also the main reason I still haven't commited my changes with Mega SD extra hardware support for MD+ games as it requires to be enabled manually in emulator settings to be able to distinguish MD+ games that need emulation of Mega SD extra hardware from normal games using Mode 1 that only need emulation of Mega CD hardware).
Thank you very much for the insight! As a beginner context like that helps understanding it a lot better. To be honest, I personally have no problem with using audio that fades out, this was a common thing back in the cd-games-era. On the other hand seamless loops would be a very neat addition and thanks to your commit to the msu-drv very easy to implement. I have no idea how painful it would be to implement seek time emulation in Genesis Plus GX. I tried to find out how MegaEDpro handles this but no luck finding any info on this. Anyways, if you ever decide to go for it, I'd happily adjust my patches and soundPacks for both - loops and fading. Thanks again and I wish I could return something for your efforts..
I did a MSU-MD romhack for Sonic 2 using the modified driver https://github.com/ArcadeTV/msu-md-sonic2
Krikzz made a comment that seek time emulation may be optionally turned of on MegaEDpro with a future fw update. As far as I know all romhacks with MD+ or MSU-MD use the string "MEGA SD" instead of "SEGA GENESIS" in the header at 0x100, so this could be a potentional trigger for ste-disabling.
Krikzz made a comment that seek time emulation may be optionally turned of on MegaEDpro with a future fw update.
If you are able to build you own version of the emulator, seek time emulation can easily be forced off by commenting the following block (you can also modify the minimal latency initialization above that block from 11 to 1 to reduce it even more but it will break some cd games relying on it): https://github.com/ekeeke/Genesis-Plus-GX/blob/master/core/cd_hw/cdd.c#L1975
As far as I know all romhacks with MD+ or MSU-MD use the string "MEGA SD" instead of "SEGA GENESIS" in the header at 0x100, so this could be a potentional trigger for ste-disabling
Actually, MD+ patches do not use that "MEGA SD" string, which is only required by Mega SD flashcart to recognize normal Mode 1 games (MSU-MD patched ones or any other existing games that have Mode 1 support) and distinguish them from MD+ patched games (which also means current MSU-MD patches need to be completed with that string to work on Mega SD).
It would have been much more logical to specify the opposite (as MD+ games are the ones requiring specific Mega SD flashcart hardware implementation, not normal Mode 1 games) and would have solved my own issue with being forced to have an user setting to manually enable/disable Mega SD custom registers emulation because it is impossible to safely detect a MD+ game has been loaded and distinguish it from a normal mode 1 game (which needs complete mega cd hardware emulation).
It would have been much more logical to specify the opposite (as MD+ games are the ones requiring specific Mega SD flashcart hardware implementation, not normal Mode 1 games) and would have solved my own issue with being forced to have an user setting to manually enable/disable Mega SD custom registers emulation because it is impossible to safely detect a MD+ game has been loaded and distinguish it from a normal mode 1 game (which needs complete mega cd hardware emulation).
With the next MegaSD firmware release the header edit to detect Mode 1 games will no longer be needed, and MD+ games still work as intended when their headers are edited to "MEGASD". So maybe from this point onward, for the sake of distinguishing between the formats in your emulator, that MD+ games can utilise the "MEGASD" header edit. There are only 7 MD+ games so far, so it wouldn't be a problem editing the existing patches to include the edit, and anything in development now or in the future will have that edit from the start, or if/when you have a build of the emulator to take advantage of it.
So maybe from this point onward, for the sake of distinguishing between the formats in your emulator, that MD+ games can utilise the "MEGASD" header edit.
This would be great indeed, and apart from being more homogeneous to existing "standards" (this ROM header field being generally used to indicate extra 'on-cart' hardware required by the game, like "SEGA 32X" for 32x hardware, "SEGA SSF" for Everdrives extended SSF mapper, "SEGA SSF2" for Mega SD extended SSF mapper or "SEGA EVERDRIVE" for Mega ED PRO custom mappers), this would also greatly simplify my implementation of Mega SD overlay hardware ("MD+") support.
How do I load MD+ and MSU-MD roms? Loading the .md file from MD+ Streets of Rage 2 or MSU-MD Castle of Illusion makes a "no-music" version of the game, while loading the .cue file results in a soundtrack player.
How do I load MD+ and MSU-MD roms?
Checklist:
After that load the .md and it should work.
MSU-MD mode 1 at least should work fine in the libretro core. Not sure beyond that. Though in case anyone else gets the same idea, chd is not yet supported, you have to leave it as bin+cue, wav+cue, or ogg+cue. Hopefully that can be fixed down the road when the raw functionality is less of a concern.
EDIT: Yeah, the core's been updated with necessary commits. Should work fine there for the full range.
All I could possibly do is to add a configurable setting for seek time emulation in Genesis Plus GX (like it exists in Mega SD implementation) but it's kinda painful to do...
krikzz updated the msu-drv so it can set seek time emulation off on MegaEDpro. I don't want to ask for features that are a pain to implement, but it would be awesome to have this option in Genesis Plus GX.
How do I load MD+ and MSU-MD roms?
Checklist:
- Do you have the neccessary cd bios files in place?
- The .cue and .md must have the same filename
- Use the latest version compiled for your OS. Updating the core through RetroArch will not get you the latest version afaik.
- Open the cue file in a text editor and verify the filename of the soundPack .bin file is correct
After that load the .md and it should work.
That add 1 more step to the process of updating all installed cores.
So maybe from this point onward, for the sake of distinguishing between the formats in your emulator, that MD+ games can utilise the "MEGASD" header edit.
This would be great indeed, and apart from being more homogeneous to existing "standards" (this ROM header field being generally used to indicate extra 'on-cart' hardware required by the game, like "SEGA 32X" for 32x hardware, "SEGA SSF" for Everdrives extended SSF mapper, "SEGA SSF2" for Mega SD extended SSF mapper or "SEGA EVERDRIVE" for Mega ED PRO custom mappers), this would also greatly simplify my implementation of Mega SD overlay hardware ("MD+") support.
Do you plan to add md+ support this year?
All I could possibly do is to add a configurable setting for seek time emulation in Genesis Plus GX (like it exists in Mega SD implementation) but it's kinda painful to do...
krikzz updated the msu-drv so it can set seek time emulation off on MegaEDpro. I don't want to ask for features that are a pain to implement, but it would be awesome to have this option in Genesis Plus GX.
please Arcade TV, make a Battletoads patch for msu-md and convert the gunstar heroes one.
please Arcade TV, make a Battletoads patch for msu-md and convert the gunstar heroes one.
I think this is not the right place to talk about this. Go here.
Anyway...
Any updates on MD+ implementation? The list of games that are supported is growing steadily (at least 25) with more on the way.
Yeeey yes please MD+ implementation please please too...
Brilliant, ekeeke, many thanks for adding support in latest build.
This has been (finally) added by https://github.com/ekeeke/Genesis-Plus-GX/commit/e87891fccabd451a17a6aec2feb3c073d64b5b7b https://github.com/ekeeke/Genesis-Plus-GX/commit/dfe3672878908b4a500c8f638bd098af575265cf https://github.com/ekeeke/Genesis-Plus-GX/commit/7ca2deffa6b640f86e10fde266f6c536762dbaf8
For the record, all CD overlay commands (incl. CUE loop commands) described in MegaSD dev manual (cf. attached file) are supported except the ones that deal with opening/reading files from SD card (starting from command 1Ch) but afaik no MD+ hacks use these commands so far.
As discussed previously, since there is no way to auto-detect a MD+ patched ROM, MegaSD add-on emulation needs to be enabled in core options (through the newly added "CD add-on" option). However, when "CD add-on" option is set to AUTO, if a CUE file with same basename as loaded ROM file is found in same directory AND that CUE file contains MegaSD specific keywords ("REM LOOP xxx", "REM NOLOOP",...), MegaSD CD overlay emulation will be automatically enabled (instead of full Sega/Mega CD hardware emulation).
Additional notes:
Reference: MegaSD_DEV_Manual.pdf
(I'm using Genesis Plus GX through BizHawk)
Are there any plans to support Genesis games with enhanced audio patches, specifically the MD+ games that Terraonion's MegaSD cartridge supports? I noticed that the Pier Solar audio CD was supported and was wondering if this would be in the realm of possibility as well.
I did give it a shot with Strider with the download in this thread, but didn't have any luck getting music to play.