Castle of Illusion MSU-MD hack WIP

Page 1 of 3 1, 2, 3  Next

Go down

Castle of Illusion MSU-MD hack WIP Empty Castle of Illusion MSU-MD hack WIP

Post by ArcadeTV on Sun 30 Aug 2020 - 7:30

Castle of Illusion MSU-MD hack WIP Genesis_castleofillusion_jp

Work in progress!

Github repository:
https://github.com/ArcadeTV/msu-md_castleOfIllusion

Download


HOWTO:

  1. Get the JP Rom with CRC CE8333C6 (typical name is Castle of Illusion - Fushigi no Oshiro Daibouken (Japan).md)
  2. Download the Soundpack from below
  3. Download the latest bps patch from my Github release Link: Github Releases and apply it with FLIPS on the JP rom
  4. Make sure that the patched rom (.md) and the .cue file have the same name and put them in the same folder as the WAV files from the SoundPack.
    Everdrive:
    5. move the folder (with the wav, md and cue file) to your SD card
    6. Start the game by loading the .md file on your MegaEverdrivePro.
    Kega Fusion
    5. set option CartBootEnabled=1 in fusion.ini (you need to load a rom in case you use Fusion the first time so this file is generated)
    6. The US Sega CD BIOS  must be present and set in config! Link: CD BIOS. Options -> set config... -> rider: Sega CD -> USA Bios: Select us_scd1_9210.bin
    7. load the .md rom (blackscreen here is ok)
    8. load the .cue with "load sega cd"

Report any issues, if you can use the issue tracker


SoundPack:
http://www.mediafire.com/file/wt1z4qotxlh0uib/CastleOfIllusion-MsuMD-SoundPack_v1_ArcadeTV.zip/file


Last edited by ArcadeTV on Sun 6 Sep 2020 - 15:40; edited 17 times in total
ArcadeTV
ArcadeTV

Castle of Illusion MSU-MD hack WIP Image110

Since : 2017-10-16

Back to top Go down

Castle of Illusion MSU-MD hack WIP Empty Re: Castle of Illusion MSU-MD hack WIP

Post by ArcadeTV on Mon 31 Aug 2020 - 2:40

I just reached my first milestone and I'd like to share some insights and looking for some help for creating this patch:
Adding CD sound with krikzz' MSU-MD driver in Castle of Illusion.

I made it so far that my hack runs on original hardware via MegaED pro and plays CD sound in the intro:


With the help of Dustin M. O'Dell (https://twitter.com/32mbit) I've setup my dev environment with vasm and yiutools/screcpatch (https://github.com/suppertails66/yuitools).

Without the help from Dustin plus the excellent disassembly from evilhamwizard, I would not have been able to start this little project.
https://forums.sonicretro.org/index.php?threads/castle-of-illusion-j-crap.34919/

Since the disassebly was done with the JAP version of the game (CRC:CE8333C6), the patch will have to be adjusted for the international version, this is planned but will obviously take a bit longer.

I will use the soundtrack from the PS4/X360 remake of the game. Luckily many tracks can be used as they are but due to different durantions of e.g. the intro-scene, some will have to be heavyily adjusted to fit:



This is my setup:

I padded the original jp rom from 4 to 8 Megabits, that file is used as INPUT.BIN.
With vasm I can use the "org" statement to place custom code and overwrites and create an s-record-file in step 1, which is used to patch the input rom in step 2.
I've created .bat files for both steps.

Since there are no emulators I know of which work with "Mode 1" except Fusion, testing is done by loading the rom first and then "Select Sega-CD image" to load the .cue file. If the option "CartBootEnabled=1" is present in fusion.ini this will work.

Finalizing the soundtrack is not as important to me as completing the code right now, so I made placeholders for all 26 tracks that just play a voice that says "Now playing track #number". The .cue file has to have the same name as the rom if you load it on Mega Everdrive pro. This is its content:



And last but not least my current code. (Looks better in Notepad++ of course)
I will use this thread to ask some asm-specific questions and hoping some smart people can answer some of those..



Current bugs:
Even though I check for CD hardware is present and the game runs fine if yes, it freezes when no CD hardware was detected.
Right now I need to stop the CD track played by the MSU-MD driver whenever appropriate, for example, it doesn't stop i the intro after hitting START to skip to the title screen.
The game saves the currentSoundID in RAM ($FFF40E) and one thing I will have to come up with is way to check the value and play the corresponding CD track.

If anybody is interested in joining the party, I've prepped this package for your convenience (Win10,64):
https://www.dropbox.com/s/idh23bc4rvtriik/coi-msumd-arcadetv_20200830.zip?dl=1


  1. Download the zip file
  2. Extract to a separate folder
  3. Open a commandline and navigate to your folder
  4. _make_srec.bat
  5. _apply_srec.bat
  6. Set CartBootEnabled=1 in fusion.ini
  7. Open OUTPUT.BIN in fusion (Load Genesis Rom)
  8. Open OUTPUT.cue in fusion (Load Sega-CD image)


Thanks for reading Very Happy

Retroplay wrote:

Since there are no emulators I know of which work with "Mode 1" except Fusion, testing is done by loading the rom first and then "Select Sega-CD image" to load the .cue file. If the option "CartBootEnabled=1" is present in fusion.ini this will work.
Kega Fusion is not recommended for MSU-MD.
See here:
https://www.zeldix.net/t2158-the-difference-between-the-md-and-the-msu-md#35124

Latest Genesis Plus GX core for Retroarch is though.
https://www.zeldix.net/t2167-genesis-plus-gx
Link also contains the (very) basic SDL and SDL2 win64 version with no joystick support.

All you have to do is name cue and rom the same then load the rom.
Audio is automatically picked up.

Arcadetv wrote:Doesn't work with krikzz' driver (yet):
https://github.com/ekeeke/Genesis-Plus-GX/issues/297#issuecomment-671100685
ArcadeTV
ArcadeTV

Castle of Illusion MSU-MD hack WIP Image110

Since : 2017-10-16

Back to top Go down

Castle of Illusion MSU-MD hack WIP Empty Re: Castle of Illusion MSU-MD hack WIP

Post by Retroplay on Mon 31 Aug 2020 - 10:31

It does work, use the cores I compiled from Eke-Eke's own git repo.

Latest Genesis Plus GX core for Retroarch is though.
https://www.zeldix.net/t2167-genesis-plus-gx
Link also contains the (very) basic SDL and SDL2 win64 version with no joystick support.

The GenPlusGX core on the official buildbot hasn't caught up with latest source code.

I've tested all the MSU-MD games there is so far, and they all work.

The only thing that still needs to be fixed is this:

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.
Other than that, it works fine.
Retroplay
Retroplay

Castle of Illusion MSU-MD hack WIP Image110

Since : 2019-08-21

Back to top Go down

Castle of Illusion MSU-MD hack WIP Empty Re: Castle of Illusion MSU-MD hack WIP

Post by ArcadeTV on Mon 31 Aug 2020 - 11:30

I used your 64bit build and placed it into my cores folder, also made sure the core was used in core information.
Neither krikzz' example rom nor my hack works.

Can you try this rom please?
https://github.com/krikzz/msu-md/blob/master/msu-md-sample/msu-md-sample.bin

You'll need a .cue and wav files, you can use those from my dropbox.
ArcadeTV
ArcadeTV

Castle of Illusion MSU-MD hack WIP Image110

Since : 2017-10-16

Back to top Go down

Castle of Illusion MSU-MD hack WIP Empty Re: Castle of Illusion MSU-MD hack WIP

Post by ArcadeTV on Mon 31 Aug 2020 - 11:32

Some progress:



Not perfect from a programmer's view - but things start to get interesting.

Changelog:
[+] Implementet a Check for 50/60Hz to play an adjusted intro track
[+] Added a SEEEGAAAA Sound
[+] Hooked up 26 tracks in total

Bugs:
[*]Tracks won't stop, this needs to get implemented
[*]Sound Test not playing anything, I wonder why
[*]Exiting Sound test starts playing the track with the last index from the sound selection box for a second, the correct track is played directly after that.
ArcadeTV
ArcadeTV

Castle of Illusion MSU-MD hack WIP Image110

Since : 2017-10-16

Back to top Go down

Castle of Illusion MSU-MD hack WIP Empty Re: Castle of Illusion MSU-MD hack WIP

Post by Retroplay on Mon 31 Aug 2020 - 12:15

ArcadeTV wrote:
Can you try this rom please?
https://github.com/krikzz/msu-md/blob/master/msu-md-sample/msu-md-sample.bin

You'll need a .cue and wav files, you can use those from my dropbox.

I assume it's this ?
https://streamable.com/mn6ivf
Retroplay
Retroplay

Castle of Illusion MSU-MD hack WIP Image110

Since : 2019-08-21

Back to top Go down

Castle of Illusion MSU-MD hack WIP Empty Re: Castle of Illusion MSU-MD hack WIP

Post by ArcadeTV on Mon 31 Aug 2020 - 12:18

Yes, no further than that. Track 1 plays automatically, as noted in the issue tracker :-(
ArcadeTV
ArcadeTV

Castle of Illusion MSU-MD hack WIP Image110

Since : 2017-10-16

Back to top Go down

Castle of Illusion MSU-MD hack WIP Empty Re: Castle of Illusion MSU-MD hack WIP

Post by ArcadeTV on Mon 31 Aug 2020 - 19:31

WIP Update #20200831

Build Package

Changelog:

[+] Added voice when skipping from prologue to title screen
[+] Added more tracks
[+] Track fading out when Mickey enters 1st door

Bugs:
[*] Tracks won't stop, this needs to get implemented
[*] Sound Test not playing anything until exiting due to repeatative function call in loop
[*] Overlapping sound in rolling apple scene


ArcadeTV
ArcadeTV

Castle of Illusion MSU-MD hack WIP Image110

Since : 2017-10-16

Back to top Go down

Castle of Illusion MSU-MD hack WIP Empty Re: Castle of Illusion MSU-MD hack WIP

Post by ArcadeTV on Tue 1 Sep 2020 - 6:23

Moved to GitHub
ArcadeTV
ArcadeTV

Castle of Illusion MSU-MD hack WIP Image110

Since : 2017-10-16

Back to top Go down

Castle of Illusion MSU-MD hack WIP Empty Re: Castle of Illusion MSU-MD hack WIP

Post by ArcadeTV on Wed 2 Sep 2020 - 7:37

Fixed a lot of stuff last night.

[+] SoundTest working
[+] Correct Game Over Sound
[+] Hooked MSU Audio to all "get Diamond" locations
[+] Heavy rework on remaining audio tracks to fit better, ready: Level 1, 2, 3, 4 and Bosses 1, 2, 3

Still some bugs

[*] Track 7 and 13 are muted in SoundTest
[*] Cutscenes between levels need to be treated separately. Right now I have msu audio only in the first and second one.

Enhancements (maybe, if I can work it out)

[~] Expand SoundTest to all available tracks


If anybody would like to test the current beta on their MegaEDpro and squash some bugs with me, get in touch.
Thanks.
ArcadeTV
ArcadeTV

Castle of Illusion MSU-MD hack WIP Image110

Since : 2017-10-16

Back to top Go down

Castle of Illusion MSU-MD hack WIP Empty Re: Castle of Illusion MSU-MD hack WIP

Post by Brutapode89 on Wed 2 Sep 2020 - 15:05

Continue and take your time. You're the best! Very Happy
Brutapode89
Brutapode89
Fluteboy
Fluteboy

Since : 2019-10-06

Back to top Go down

Castle of Illusion MSU-MD hack WIP Empty Re: Castle of Illusion MSU-MD hack WIP

Post by ArcadeTV on Wed 2 Sep 2020 - 15:49

I bought the 2013 game on steam today, because there were missing music tracks in the rip on khinsider.
Since all Bosses in the remake have several levels and separate music for each level I made not only individual tracks for wach boss, but also merged all musical levels into each boss music.
If someone here really loves the original game I'd like to have his/her feedback on this.
In other news:
[+] Hijacked the Pause routine to mute the tracks
[+] Almost all music tracks are ready, Mizrabel and maybe 2 Stages to go.
ArcadeTV
ArcadeTV

Castle of Illusion MSU-MD hack WIP Image110

Since : 2017-10-16

Back to top Go down

Castle of Illusion MSU-MD hack WIP Empty Re: Castle of Illusion MSU-MD hack WIP

Post by ArcadeTV on Thu 3 Sep 2020 - 9:49



Not much left to do.
Feedback is much appreciated.


Last edited by ArcadeTV on Fri 4 Sep 2020 - 16:22; edited 1 time in total
ArcadeTV
ArcadeTV

Castle of Illusion MSU-MD hack WIP Image110

Since : 2017-10-16

Back to top Go down

Castle of Illusion MSU-MD hack WIP Empty Re: Castle of Illusion MSU-MD hack WIP

Post by ArcadeTV on Fri 4 Sep 2020 - 7:26

The soundtrack is almost complete, the only tracks remaining is the ending sequences. The total duration just got beyond 80 minutes which is not so cool since nobody will be able to burn this to a CD and play it on his/her MD/CD combo, only on MegaEDpro.
I will try my best to cut down some tracks and make everything fit. I lost some space in the CD image because intro and outro tracks had to be present twice for 50Hz and 60Hz consoles.
Maybe I'll release 3 different packs for US/JP/EU in the end and add region locks, we'll see.

What will you guys play this on? Console+CD or MegaEDpro or MegaSD?
I have no clue if this runs on MegaSD though.
ArcadeTV
ArcadeTV

Castle of Illusion MSU-MD hack WIP Image110

Since : 2017-10-16

Back to top Go down

Castle of Illusion MSU-MD hack WIP Empty Re: Castle of Illusion MSU-MD hack WIP

Post by Leonardo_BVB@hotmail.com on Fri 4 Sep 2020 - 8:45

Mega SD for me!
Leonardo_BVB@hotmail.com
Leonardo_BVB@hotmail.com
Snap Dragon
Snap Dragon

Since : 2018-03-07

Back to top Go down

Castle of Illusion MSU-MD hack WIP Empty Re: Castle of Illusion MSU-MD hack WIP

Post by ArcadeTV on Fri 4 Sep 2020 - 8:55

Can you test the Beta that I linked?
ArcadeTV
ArcadeTV

Castle of Illusion MSU-MD hack WIP Image110

Since : 2017-10-16

Back to top Go down

Castle of Illusion MSU-MD hack WIP Empty Re: Castle of Illusion MSU-MD hack WIP

Post by Brutapode89 on Fri 4 Sep 2020 - 13:34

ArcadeTV wrote:Can you test the Beta that I linked?

Where?
Brutapode89
Brutapode89
Fluteboy
Fluteboy

Since : 2019-10-06

Back to top Go down

Castle of Illusion MSU-MD hack WIP Empty Re: Castle of Illusion MSU-MD hack WIP

Post by ArcadeTV on Fri 4 Sep 2020 - 13:54

right under my last yt video in the word "Here"
ArcadeTV
ArcadeTV

Castle of Illusion MSU-MD hack WIP Image110

Since : 2017-10-16

Back to top Go down

Castle of Illusion MSU-MD hack WIP Empty Re: Castle of Illusion MSU-MD hack WIP

Post by Leonardo_BVB@hotmail.com on Fri 4 Sep 2020 - 14:35

Which patcher do you need to use? It does not like Flips, even when I changue BIN to .ips
Leonardo_BVB@hotmail.com
Leonardo_BVB@hotmail.com
Snap Dragon
Snap Dragon

Since : 2018-03-07

Back to top Go down

Castle of Illusion MSU-MD hack WIP Empty Re: Castle of Illusion MSU-MD hack WIP

Post by ArcadeTV on Fri 4 Sep 2020 - 16:04

Just follow my wiki on github to build.


Last edited by ArcadeTV on Fri 4 Sep 2020 - 16:21; edited 1 time in total
ArcadeTV
ArcadeTV

Castle of Illusion MSU-MD hack WIP Image110

Since : 2017-10-16

Back to top Go down

Castle of Illusion MSU-MD hack WIP Empty Re: Castle of Illusion MSU-MD hack WIP

Post by Conn on Fri 4 Sep 2020 - 16:13

I don't deal with MD-MSU, so sorry when I link in first now. Out of curiousity I downloaded your package and it appears the output.bin is the already patched rom...
If this is the case, please remove all your links and provide the patch (and music files) only. There were horrible punishments on sites that provided roms (emuparadise, cherryroms as example) and these usually get closed (at least nintendo games, dunno how it is for sega (and old disney games)) but better we stay on the safe side Wink
Conn
Conn

Castle of Illusion MSU-MD hack WIP Image212

Since : 2013-06-30

Back to top Go down

Castle of Illusion MSU-MD hack WIP Empty Re: Castle of Illusion MSU-MD hack WIP

Post by ArcadeTV on Fri 4 Sep 2020 - 16:21

Of course, sorry for that.

Here's the SoundPack only:
http://www.mediafire.com/file/c8xqyrqyk4kpjmq/CastleOfIlusion_MsuMD_SoundPack_ArcadeTV_20200904.zip/file

I'll see if I can provide a patch in ips format as well...
ArcadeTV
ArcadeTV

Castle of Illusion MSU-MD hack WIP Image110

Since : 2017-10-16

Back to top Go down

Castle of Illusion MSU-MD hack WIP Empty Re: Castle of Illusion MSU-MD hack WIP

Post by Conn on Fri 4 Sep 2020 - 16:33

Don't mind, it frequently happens that people upload roms with their music packs and so on. I just hope I detect it everytime this happens and remiove it so that we don't get accused because of that one day... Very Happy

If your original rom (input.bin) requires the japanese version, I'd suggest bps format (flips), so people don't accidently patch the wrong rom.
Conn
Conn

Castle of Illusion MSU-MD hack WIP Image212

Since : 2013-06-30

Back to top Go down

Castle of Illusion MSU-MD hack WIP Empty Re: Castle of Illusion MSU-MD hack WIP

Post by ArcadeTV on Fri 4 Sep 2020 - 16:39

Here's the ips attached.


  1. Get the JP Rom with CRC CE8333C6
  2. Get the SoundPack -> here <-
  3. Patch the ROM with Lunar IPS or whatever tool works for you.
  4. Rename the ROM and .CUE files to the same name.
  5. Put all .WAV file, ROM and the .CUE file into the same folder on your SD.
  6. Start the game by loading the .CUE file on your MegaEverdrivePro.


Last edited by ArcadeTV on Fri 4 Sep 2020 - 16:51; edited 1 time in total
ArcadeTV
ArcadeTV

Castle of Illusion MSU-MD hack WIP Image110

Since : 2017-10-16

Back to top Go down

Castle of Illusion MSU-MD hack WIP Empty Re: Castle of Illusion MSU-MD hack WIP

Post by ArcadeTV on Fri 4 Sep 2020 - 16:41

Conn wrote:If your original rom (input.bin) requires the japanese version, I'd suggest bps format (flips), so people don't accidently patch the wrong rom.

Thanks, I'll do that in the next release. Never released a patch before, but willing to learn the best practices Razz (Conn)
ArcadeTV
ArcadeTV

Castle of Illusion MSU-MD hack WIP Image110

Since : 2017-10-16

Back to top Go down

Page 1 of 3 1, 2, 3  Next

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum