MPEG sample finally complete

This program basically sets up the MPEG card and tries to play a movie. You'll need to have a copy of Lunar SSSC to use it. Use the pad buttons to test some of the MPEG card's effects.

Cyber Warrior X
 

Attachments

  • cwxsampmpg.zip
    83.3 KB · Views: 203
  • cwxsampmpg.zip
    83.3 KB · Views: 185
  • cwxsampmpg.zip
    83.3 KB · Views: 196
  • cwxsampmpg.zip
    83.3 KB · Views: 198
  • cwxsampmpg.zip
    83.3 KB · Views: 193
Thanks a lot for your work,

according to the readme.txt, it took some time to get it running ;) .

I always thought how cool it would be to use the MPEG card I got in demos....now I can. Thanks!
 
Thanks a lot for your work,

according to the readme.txt, it took some time to get it running ;) .

Yeah, up until my assembly and reverse-engineering skills got to the point where they are today, I had absolutely no idea where to start or how to make the mpeg card do anything. The official docs aren't available anywhere and no one has written any meaningful documents on it. So then I ended up reverse-engineering what Lunar SSSC MPEG did. After everything started working, that's when I toyed around with all those extra video effects you can do.

I always thought how cool it would be to use the MPEG card I got in demos....now I can. Thanks!

I look forward to it :)

Cyber Warrior X
 
I've just tried it out, made a MPG file with TMPEG, named it AN000.MPG, burned a Saturn disc with your example and the mpg file and ran it on my Saturn with MPEG cart.

But it doesn't work, MPG_Init() fails with error: MGP_ERR_NG (the demo shows it's code 0xFFFFFFEF)....

About that error from MANMPG.TXT:

Code:
+---+----------------------------------+-------------------------+

|  |   Procedure          |   Error code     |

+---+----------------------------------+-------------------------+

| 5 |Sets the MPEG interrupt mask   | Return MPG_ERR_NG if  |

|  |and allows picture start search  | error results      |

|  |and sequence end search      |             |

|  |interrupt             |             |

+---+----------------------------------+-------------------------+

| 6 |Sets the display window offset  | Return MPG_ERR_NG if  |

|  |to (150,45) using CDC_MpSetWinDofs| error results      |

|  |if a constant is specified for the|             |

|  |display scan method        |             |

+---+----------------------------------+-------------------------+

I tried reinserting the cart and burned a Video CD and this one plays back perfectly. Any clue why it does not work?

Originally posted by CyberWarriorX@Sat, 2005-01-08 @ 11:23 PM

Yeah, up until my assembly and reverse-engineering skills got to the point where they are today, I had absolutely no idea where to start or how to make the mpeg card do anything. The official docs aren't available anywhere and no one has written any meaningful documents on it. So then I ended up reverse-engineering what Lunar SSSC MPEG did. After everything started working, that's when I toyed around with all those extra video effects you can do.

I look forward to it :)

Cyber Warrior X

[post=127319]Quoted post[/post]​


In the SBL library, there is a manual for the MPG library part: MANMPG.TXT
 
The demo is obviously made to run on NTSC systems, only. On PAL systems, MPG_Init() needs a different flag. Moreover, the SGL has different interlace settings for the same resolution in NTSC and PAL mode.

I changed from MPG_DSCN_ITL to MPG_DSCN_PLNITL and MPG_Init() works without errors, at least.

Code:
(1) Display scan method

*MPG_DSCN_NITL : NTSC non-interlace mode

*MPG_DSCN_ITL : NTSC non-interlace mode

*MPG_DSCN_PLNITL : PAL non-interlace mode

*MPG_DSCN_PLITL : PAL interlace mode

However, the audio and video status is "Preparing playback", but playback never starts. Suggestions, anyone?
 
I'm willing to bet the file is in MODE1 data? Normally you're supposed to separate the video and audio streams and then interleave them in MODE2 - Basically the same as what's done on a video cd. That's probably why it's having trouble playing it.

Cyber Warrior X
 
Originally posted by CyberWarriorX@Sun, 2006-04-30 @ 03:40 PM

I'm willing to bet the file is in MODE1 data? Normally you're supposed to separate the video and audio streams and then interleave them in MODE2 - Basically the same as what's done on a video cd. That's probably why it's having trouble playing it.

Cyber Warrior X

[post=145964]Quoted post[/post]​


That's right, thanks for the hint.

So it doesn't work in mode1? Seperate....interleave...mode2...

I don't know how to create such a disc with mkisofs, but it's a perspective at least.
 
Originally posted by Rockin'-B@Sat, 2006-04-29 @ 10:13 PM

That's right, thanks for the hint.

So it doesn't work in mode1? Seperate....interleave...mode2...

I don't know how to create such a disc with mkisofs, but it's a perspective at least.

[post=145966]Quoted post[/post]​


Well, I guess you could always write something that manually separates the video and audio sectors, then uses the Put Sector Data cd block command, etc. But really, it ends up taking more computing time, not to mention you're also going to have down-sample the video(since you normally store mpeg video's using form 2 of MODE2 sectors, which has more user data, less error correction). The best programs I've seen for setting up discs like that are the ones the developers used: buildcd and vcdbuild. Though, there might be some good freeware tools out there.
 
Back
Top