Quantcast

Results 1 to 8 of 8

Thread: Using 32X to subtitle Mega CD FMVs?

  1. #1
    Raging in the Streets goldenband's Avatar
    Join Date
    Dec 2009
    Posts
    4,617
    Rep Power
    101

    Default Using 32X to subtitle Mega CD FMVs?

    This is kind of a loopy thought, but: would it be possible to use the 32X graphics layer to add subtitles to FMVs in Japanese-language Mega CD games?

    Could one (for example) write a piece of code that could either be loaded onto an EverDrive, or into the 32X RAM before the game itself is loaded (either from a separate CD or from a modified disk image of the original Mega CD game), and would monitor disk I/O and -- when certain files or sectors are loaded -- overlay subtitles onto the image coming from the Genesis?

    All this is assuming that (1) adding subtitles to an FMV (rather than replacing the audio) is a good idea, (2) there's no good way to reauthor the source videos without, at the very least, adding compression artifacts, and (3) conflicts between 32X and Sega CD address space (or bus conflicts, etc.) wouldn't make this impossible.

  2. #2
    Master of Shinobi LinkueiBR's Avatar
    Join Date
    Oct 2013
    Posts
    1,061
    Rep Power
    48

    Default

    Great idea! Very possible
    VISUAL SHOCK!
    SPEED SHOCK!
    SOUND SHOCK!
    NOW IS TIME TO THE 68000 HEART ON FIRE!


    Prince of Persia 2 - The Shadow and the Flame Remastered Edition v1.5

  3. #3
    Raging in the Streets Sik's Avatar
    Join Date
    Jan 2011
    Posts
    4,166
    Rep Power
    77

    Default

    I'm not sure you even need the 32X for this, especially with FMV which normally uses only one layer. Japanese games didn't usually use FMV though (they preferred to go with sprites and such), so I guess that brings back the usefulness of the 32X.

    The biggest problem will be the Mega Drive 68000 - you still need it to let the 32X know what to subtitle. Since games will be running code on it (this is needed even if just to access the video hardware and the controllers), this means hacking each game individually, I'm afraid. And if there's enough free video memory you may as well avoid the 32X, though that'd have to be checked on a case by case basis.


    Though just to get this out of the way, making subtitles separate from the video is definitely the way to go no matter the approach.

  4. #4
    Raging in the Streets goldenband's Avatar
    Join Date
    Dec 2009
    Posts
    4,617
    Rep Power
    101

    Default

    Thanks for the reply, Sik. Do you think it'd be possible to give the 32X everything it needs from the 68K with just one or two instructions -- say, a memory value that gets passed when a disc read starts, and then a second value when it concludes? Or will more constant intervention from the 68K be needed during the FMVs -- either to maintain synchronization or to allow the 32X's display routines to function at all?

    I'm imagining a program that could be preloaded before the game starts (to help avoid any conflicts), would fit in the 32X RAM, and could use the same display and script-handling routines for every game (or at least every game that uses a certain video compression format or aspect ratio). With script compression, I wonder if the same program could be used for multiple games and still fit in 256K. It's basically "HELLO WORLD" with synchronization, I guess -- i.e. writing text onscreen at specific times, and little else -- but the devil's in the details.

    All this was inspired when I was reminded that, apparently, it can be (relatively) trivial to add subs to PC-FX games without having to recompress the original video. (More on that here.) But as you note, a lot of Japanese games don't use Cinepak etc. but have sprite-based animation instead, so I found myself wondering what else could work without having to completely hack the game from the ground up.

  5. #5
    Raging in the Streets Sik's Avatar
    Join Date
    Jan 2011
    Posts
    4,166
    Rep Power
    77

    Default

    Yeah, just load a program into 32X RAM when it boots then just let the 68000 tell the 32X when to show the subtitles. Though you may have to load new subtitles every so often (you can probably fit in all subtitles for the current scene but not for the entire game, though I may be just playing it safe).

    Reusing the same 32X routine for every game should be safe (except for CD32X games, but those are all in English anyway). It's the 68000 side that needs to be custom.

    EDIT: just to make it clear, the 32X code would also be quite small. Most of the RAM will go in the font graphics (which can still be a pretty small amount) and the subtitles themselves. Memory is the least of your worries in this case.

  6. #6
    ding-doaw Raging in the Streets tomaitheous's Avatar
    Join Date
    Sep 2007
    Location
    Sonoran Desert
    Age
    45
    Posts
    3,981
    Rep Power
    78

    Default

    It's good idea, but the devil is always in the details. I think it's a much easier to do this on the 32x, than trying to incorporate subtitles on the Genesis VDP. Plus, what about games that have spoken dialog, is not FMV or cinemas, and doesn't have accompanied text? The 32x layer would be great for that as well (not being FMV, it could mean all layers/video memory is in use on Genesis VDP).

    I think the problems you're going to run into, is where the game logic lies. If it's on the sub-cpu side, then you need to find a way (without interfering with the game), to get it to the main cpu, and then the 32x cpu (data to subtitle).

    Kind of funny that you bring this up; years back I was working with the mednafen author to make a subtitling system for CD games. It was basically a 68k cpu + a simple bitmap display (byte pixels). At the start of the game, a hook would copy the ENTIRE script of the whole game up into this external device (which was memory mapped port/s). Access to CD audio play routines, for example, could use the LBA offset or the track# (whatever the argument was) and pass it to the external device. It would use this as a look up which script to overlay. Etc. The device existed in emulator form, but it was interfaced in such a way that one could easily make it in real life (we were thinking composite pass through and RGB pass through; composite overlay is easy if you do it via a block window and B&W or Y only output - overriding the original output of Y and C for x number of scanlines). The build was never made public.

  7. #7
    Raging in the Streets goldenband's Avatar
    Join Date
    Dec 2009
    Posts
    4,617
    Rep Power
    101

    Default

    Thanks, Sik and tomaitheous, for your replies. tomaitheous, that sounds like a nifty subtitling system!

    It seems to me the ideal scenario might be a sprite-based FMV (or "FMV") in which the accompanying sound comes 100% from a RedBook audio track. (That way you don't have to deal with filesystem issues, etc.)

    If the 32X can somehow detect the beginning and end of playback, and which track is being played, then would it need to talk to the Genesis or Mega CD for anything else? It can use internal timings to know when to display the subs, after all, so it would only need the playback start and track number (for unskippable cutscenes, you wouldn't even need the end time).

    Is the 32X able to glean that information -- current track #, playback start, playback end -- directly from the Mega CD without needing the attention of the Genesis or Mega CD CPU, or otherwise interfering with their operation? I'm looking at a 1998-era Sega CD programming FAQ and see there are registers at 0xA12038/0xFF8038 that have some of that information -- but is there a register that actually holds the current CD track, or is that strictly a write operation?

    And: my understanding is that some Mega CD registers are mapped to the same general address space as some 32X registers. Are any of those registers in conflict with each other, or is a conflict unlikely?

    Forgive me if any of these questions are naive -- my programming experience is, though greater than zero, still quite limited.

  8. #8
    Road Rasher
    Join Date
    Apr 2013
    Location
    SF Bay Area, California
    Posts
    312
    Rep Power
    24

    Default

    Quote Originally Posted by goldenband View Post
    Is the 32X able to glean that information -- current track #, playback start, playback end -- directly from the Mega CD without needing the attention of the Genesis or Mega CD CPU, or otherwise interfering with their operation? I'm looking at a 1998-era Sega CD programming FAQ and see there are registers at 0xA12038/0xFF8038 that have some of that information -- but is there a register that actually holds the current CD track, or is that strictly a write operation?
    The SH-2s in the 32X cannot directly interface with any of the original Genesis hardware or with the Sega CD. It needs to communicate with the 68K in the Genesis either through the comm registers or through its framebuffer.

    Quote Originally Posted by goldenband View Post
    And: my understanding is that some Mega CD registers are mapped to the same general address space as some 32X registers. Are any of those registers in conflict with each other, or is a conflict unlikely?
    There is no conflict between the addresses used by the Mega CD and the 32X.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •