PCEngine-FX.com

PCE-FX Homebrew Development => Localizations, Games, Apps, Docs => Topic started by: Keranu on 02/09/2014, 07:40 PM

Title: Curiosity check: Cosmic Fantasy 2 hack?
Post by: Keranu on 02/09/2014, 07:40 PM
Was just wondering the other day how feasible and difficult it would be to hack Cosmic Fantasy 2 to have updated graphics and more balanced encounter rates, magic and hit damage, etc..? I would think the stat stuff would be simple enough to tweak, but how bout the graphic stuff? I was thinking since CF2's tileset variety is so limited, you could probably rip CF4's graphics and find place for them easily in CF2. Could CF2 even be upgraded to Super System Card format for additional RAM and faster load times?
Title: Re: Curiosity check: Cosmic Fantasy 2 hack?
Post by: Bernie on 02/09/2014, 07:43 PM
That would be neat if its possible.  :)
Title: Re: Curiosity check: Cosmic Fantasy 2 hack?
Post by: FraGMarE on 02/11/2014, 01:29 PM
Generally speaking, the only thing I find wrong with this game is the fact that the enemies never use any kind of poison, magic or alternative attacks.  It makes monster encounters dull and makes grinding all the more boring.  The sad part is, you can tell the development staff intended to implement this, but for whatever reason (I'm guessing time) didn't.
Title: Re: Curiosity check: Cosmic Fantasy 2 hack?
Post by: Arkhan Asylum on 02/11/2014, 03:44 PM
Aside from Nulltard's most recent suggestion, I don't think it's worth the time.   There are better hacks that could be done.

Like English version of CF1, with some minor gameplay tweaks.
Title: Re: Curiosity check: Cosmic Fantasy 2 hack?
Post by: GohanX on 02/11/2014, 03:50 PM
I like the idea of the hack, but would prefer the energy be spent on translating the other games.
Title: Re: Curiosity check: Cosmic Fantasy 2 hack?
Post by: TurboXray on 02/11/2014, 04:49 PM
If you guys want to upgrade it to SCD format, I can do that. I can even have it load your custom code at the initial load of the opening game (I did this for CF1); point to a certain LBA/sector. But you're on your own from there :P 

 You could do ACD as well. I don't think SCD will be enough to eliminate load times. ACD would be though.

 I'd like to see this as well (you wouldn't believe the amount of 'improvement' hacks I've seen for FF2/3/4/5 etc on RHDN. Some *one* has to like CF2 enough to do the same). But I have no desire to work on this project.

 While you're at it, change the over world music. It sounds like Sesame Street >_>

 On a side note, why did PCE games restart CD tracks after battles?!?! How hard is it to save the current H:M:S:X of the current track, and then start at that part afterwards?
Title: Re: Curiosity check: Cosmic Fantasy 2 hack?
Post by: Arkhan Asylum on 02/11/2014, 04:57 PM
Quote from: TurboXray on 02/11/2014, 04:49 PMOn a side note, why did PCE games restart CD tracks after battles?!?! How hard is it to save the current H:M:S:X of the current track, and then start at that part afterwards?
Lots of games do this, both cartridge and CD.  My guess is, it's more effort than it's worth since hearing a song start in the middle is just as abrupt and odd as having it restart, so why bother.
Title: Re: Curiosity check: Cosmic Fantasy 2 hack?
Post by: TurboXray on 02/11/2014, 05:04 PM
For short battles, it sucks for have track start over again. Well, depends on the track. If it's more ambient, then I guess it doesn't bother me (CF2 dungeon areas).
Title: Re: Curiosity check: Cosmic Fantasy 2 hack?
Post by: Arkhan Asylum on 02/11/2014, 05:07 PM
It's pretty abrupt either way to keep switching music.  Auditory whiplash! YEAH!

I'd be curious to see how it'd turn out if a game used one track for the entire game that just cleverly changed patterns/sequences based off what you're doing currently. 

Title: Re: Curiosity check: Cosmic Fantasy 2 hack?
Post by: megatron-uk on 02/11/2014, 05:18 PM
Quote from: guest on 02/11/2014, 05:07 PMIt's pretty abrupt either way to keep switching music.  Auditory whiplash! YEAH!

I'd be curious to see how it'd turn out if a game used one track for the entire game that just cleverly changed patterns/sequences based off what you're doing currently.
Lucas Arts made great use of such a technology for a great many of their games allowing for seamless flow of one style/track to another:

http://en.wikipedia.org/wiki/IMUSE (http://en.wikipedia.org/wiki/IMUSE)

One of the best examples I can think of is in X-Wing... you could be playing a mission, happily blasting enemy cargo freighters or transport shuttles, with a nice background star-wars- type feel to it. All of a sudden an Imperial Star Destroyer would arrive from hyperspace and start deploying fighters, the music would become more sinister and morph into the infamous Imperial March theme.

It was a very clever system and the sound blended together seamlessly so that it never felt as though one track was stopped and another was playing.

Of course this was computer generated (MIDI and FM synths) rather than redbook audio (in fact when the X-Wing and TIE Fighter games moved to CD one of the biggest complaints was the loss of this interactive music and replacement by static, unchanging cd audio).
Title: Re: Curiosity check: Cosmic Fantasy 2 hack?
Post by: OldRover on 02/11/2014, 05:41 PM
Quote from: TurboXray on 02/11/2014, 04:49 PMOn a side note, why did PCE games restart CD tracks after battles?!?! How hard is it to save the current H:M:S:X of the current track, and then start at that part afterwards?
Two problems with this.

First, playing it in the middle of the track is going to produce a very harsh start. This doesn't sound very nice. As you know, the hardware does not allow direct control over CD audio volume (we just get the fade-out functions), and the only way to make this sound decent is to fade it in... unless you have a setup like Ys, where PSG is faded away and the CD track is cut back in. That sounds alright because one track is fading out so the transition isn't so rough... it's still a bit rough, but not as bad as cutting into a track from dead silence.

Second, this becomes an issue for looped tracks. You could do an A-B type play, but then you'd have to constantly monitor for the end-of-track and restart the track from the beginning. It's more hassle than it's worth.

We had discussed this while developing MSR and decided that it wasn't worth the effort, for the above reasons.
Title: Re: Curiosity check: Cosmic Fantasy 2 hack?
Post by: TurboXray on 02/11/2014, 06:42 PM
play main CD tune, encounter battle -> fade out, save position, play new track.
End of battle, fade track -> play small ADPCM or psg jingle
while jingle is playing, ~don't~ cancel CDDA fade (should be mute), load main CD tune with normal parameters and play CD track (still in mute status), call CD_SEARCH to offset to the previous track, cancel fade out, fade out jingle.

 As long as the 'jingle' tune is long enough, the CD_search function should do it's job. No need to monitor and re-call CD_play function.



 That does suck about there being no fade in. One could do it manually, though it's tougher in HuC. You can read the linear PCM audio data from the unit as the CD is playing (there's a special port read for this) - even on mute IIRC. You could manually setup a 16khz playback routine via the VDC and convert the 16bit stereo data into 10bit stereo and fade up, cancel fade on the CD side once full volume and disable VDC special routine. That's hardcore though :D
Title: Re: Curiosity check: Cosmic Fantasy 2 hack?
Post by: OldRover on 02/11/2014, 07:06 PM
That sounds pretty complicated for something so simple. :lol: Might work though.

My other thought was to create a few different tracks, each one set for a different entry point, faded in... the program could just choose one of them and play it. Of course, the looping thing is still an issue and you'd still have to monitor for end-of-track, but then you could just seek to the normal track at that point in time. Only problem with this method is that it would eat up dozens of MB pretty quick on the CD.
Title: Re: Curiosity check: Cosmic Fantasy 2 hack?
Post by: BigusSchmuck on 02/11/2014, 09:44 PM
That would be a awesome hack. I'm surprised that no one has done it yet. Why oh why do we have a bijillion hacks for the Nes when the turbo/pce has a similar architecture?
Title: Re: Curiosity check: Cosmic Fantasy 2 hack?
Post by: Arkhan Asylum on 02/11/2014, 10:14 PM
Quote from: BigusSchmuck on 02/11/2014, 09:44 PMThat would be a awesome hack. I'm surprised that no one has done it yet. Why oh why do we have a bijillion hacks for the Nes when the turbo/pce has a similar architecture?
Because we spend our time making new games instead of fucking around with games that are already a thing, lol.

and it's more the fact that hacking up a CD game is more involved than a cartridge.

anyway, it's all time consuming, and I'd still rather see new things or translations than something like this.

Title: Re: Curiosity check: Cosmic Fantasy 2 hack?
Post by: spenoza on 02/11/2014, 10:47 PM
I think a project like this is a great way for a talented newcomer to hacking to get acclimated to the system. It's definitely not a good project for the established devs around here. In that sense, it's not a waste at all, but rather practice and training that others can benefit from.
Title: Re: Curiosity check: Cosmic Fantasy 2 hack?
Post by: Keranu on 02/12/2014, 12:22 AM
Some interesting info in this thread already, but can anyone talk more about the graphic hacking process and how much work that would require? Even if it was as simple as straight up swapping tiles that already fit in place or repixelling existing ones.

Just so everyone knows, this is not something I'm (or anyone else AFAIK) is planning, but merely a curiosity. I really don't like the ideas of remakes in general because it tends to take away aspects that made certain games classics to begin with. However I always thought CF2 would be a good candidate for a remake because it had a lot of great ideas but had some setbacks restricting it from being a real masterpiece.

If it's not a overly ambitious project, I'd love to see it come to fruition. Otherwise, best focusing efforts on new original ideas.

Quote from: BonknutsYou could do ACD as well. I don't think SCD will be enough to eliminate load times. ACD would be though.
From what I remember Nodtveidt telling me years ago, the reason why simple tasks like checking character status or looking at items took so long to load had something to do with the game running data/images off the CD itself or something instead of RAM.... yeah I'm probably way off on the tech stuff there, but regardless it was due to RAM limits that could've been resolved in SCD format. Wanna chime more in on this, Nod? lol

EDIT: OH and props to whoever mentioned adding more music to this hack. CF2 had some pretty decent music but definitely lacked a variety of tracks to play through! Probably due to all the voice acting.... maybe shortening some songs could squeeze enough room for a short song or two.
Title: Re: Curiosity check: Cosmic Fantasy 2 hack?
Post by: OldRover on 02/12/2014, 02:32 AM
Yeah, it loads the portrait images from the CD when they're needed. I guess there wasn't enough room in system RAM to hold them. It does that for all of them, including the description items in the shops. I would think that using the SCD could eliminate that problem, since they could all be loaded into system RAM ahead of time. Might even be able to preload enemy sprites like that as well. The game sure did pull off a lot for 64KB (I bet it used the ADPCM RAM for some things too though).

The interesting thing about the music is that it's all on a single track, and played via the A-B repeat technique. Cutscenes are put on subsequent tracks, and paired with their accompanying redbook audio. Quite a clever way to reduce reseek time.
Title: Re: Curiosity check: Cosmic Fantasy 2 hack?
Post by: OldRover on 02/12/2014, 10:46 AM
Quote from: TurboXray on 02/11/2014, 06:42 PMplay main CD tune, encounter battle -> fade out, save position, play new track.
End of battle, fade track -> play small ADPCM or psg jingle
while jingle is playing, ~don't~ cancel CDDA fade (should be mute), load main CD tune with normal parameters and play CD track (still in mute status), call CD_SEARCH to offset to the previous track, cancel fade out, fade out jingle.

 As long as the 'jingle' tune is long enough, the CD_search function should do it's job. No need to monitor and re-call CD_play function.
Experimenting with this concept right now in MS2. Basically... the current music position is saved, the new program is run with the new track... when the track is no longer needed, I set the 2.5 second PCM fade and play the ADPCM buffer on infinite loop and load the next program... the ADPCM playback continues through loading (since it's unaffected by CD access when playing the buffer as opposed to streaming), load the original track, use CD_SEARCH using the CD-ATIME search objective (with both arguments set to 0, since I want it to complete the search and then pause the track before proceeding), then unpause the track and set the CD fade to the 2.5 second ADPCM fade, which seems to cancel the PCM fade, which allows the CD audio to cut back in while it fades the ADPCM channel out. Since all the sound effects in MS2 are PSG-based using Squirrel 3.0, this method does not interfere with anything. However, in a case like CF2 where I am positive that it uses the ADPCM buffer for storage, some rewriting would probably be necessary so as to not interfere with things.
Title: Re: Curiosity check: Cosmic Fantasy 2 hack?
Post by: Keranu on 02/19/2014, 10:39 PM
Quote from: Keranu on 02/12/2014, 12:22 AMSome interesting info in this thread already, but can anyone talk more about the graphic hacking process and how much work that would require? Even if it was as simple as straight up swapping tiles that already fit in place or repixelling existing ones.
Bump?
Title: Re: Curiosity check: Cosmic Fantasy 2 hack?
Post by: TurboXray on 02/20/2014, 12:15 PM
Quote from: Keranu on 02/19/2014, 10:39 PM
Quote from: Keranu on 02/12/2014, 12:22 AMSome interesting info in this thread already, but can anyone talk more about the graphic hacking process and how much work that would require? Even if it was as simple as straight up swapping tiles that already fit in place or repixelling existing ones.
Bump?
Grab tmod2 (make sure it has the PCE plugins) and dosbox. Open the ISO in tmod2 and have a go at pixel editing the graphics. Editing the palettes is a little trickier, though there's a way to visually identify them (using tmod2).
Title: Re: Curiosity check: Cosmic Fantasy 2 hack?
Post by: Keranu on 02/20/2014, 09:12 PM
Thanks tom! Got tmod2 and dosbox set up and playing around with it. If only I could make out all the garble! Do any PCE emulators have built in tile/sprite viewers?

Would programming be required for things like adding more tiles and dealing with tile overlap issues?
Title: Re: Curiosity check: Cosmic Fantasy 2 hack?
Post by: megatron-uk on 02/21/2014, 03:46 AM
Quote from: Keranu on 02/20/2014, 09:12 PMThanks tom! Got tmod2 and dosbox set up and playing around with it. If only I could make out all the garble! Do any PCE emulators have built in tile/sprite viewers?
Yep. Mednafen.

Run the game, do Alt+D to enable debugger, then Alt+2 to show the sprites and tiles as loaded into vram.
Title: Re: Curiosity check: Cosmic Fantasy 2 hack?
Post by: Keranu on 02/23/2014, 12:47 AM
Quote from: TurboXray on 02/20/2014, 12:15 PMGrab tmod2 (make sure it has the PCE plugins) and dosbox. Open the ISO in tmod2 and have a go at pixel editing the graphics. Editing the palettes is a little trickier, though there's a way to visually identify them (using tmod2).
OK took a look at CF2's ISO last night in TMOD. Thankfully the graphics are uncompressed and I'm able to make everything out. How do you go about with the palettes? I can't seem to select from more than the first two colors of the default palette either. Have a feeling this part of the process is going to require some coding, especially if I import CF4 tilesets that use different palettes...