Dreamcast 4XM video testing

General Dreamcast discussion applies here. Before posting here please check the other forums in the Dreamcast section to see if your topic would fit better in those categories.
Forum rules
Please check the other forums in the Dreamcast section before posting here to see if your topic would fit better in those categories. Example: A new game/homebrew release would go in the New Releases/Homebrew/Emulation section: http://dreamcast-talk.com/forum/viewforum.php?f=5 or if you're having an issue with getting your Dreamcast to work or a game to boot it would go in the Support section: http://dreamcast-talk.com/forum/viewforum.php?f=42
User avatar
Bob Dobbs
Sub Genius
Posts: 4413
Dreamcast Games you play Online: PSO, AFO, PBA, 4x4 Evo, IGP, Planet Ring and Max Pool
Location: USA
Contact:

Re: Dreamcast 4XM video testing

Post by Bob Dobbs »

megavolt85 wrote:
MoeFoh wrote: serial port is 400k bits per sec. or 50k bytes per sec.
???
SD - 4-7 Mbit (depends on the quality of the adapter and SD card )
HDD - 80+ Mbit (this is where the real speed :) )
Thanx for that info.
Regards,
Bob Dobbs

User avatar
Ian Micheal
Developer
Posts: 6277
Location: USA
Contact:

Re: Dreamcast 4XM video testing

Post by Ian Micheal »

On bench mark on serial port i get 656 kb/sec

I can stream 300 kb flac audio from the serial port no way it's 150 kb a sec

User avatar
Ian Micheal
Developer
Posts: 6277
Location: USA
Contact:

Re: Dreamcast 4XM video testing

Post by Ian Micheal »

MoeFoh wrote:Now we know why SFD files are placed near the end of the disc on the GD-ROM.

btw,

serial port is 1.56 Mbps bits per sec. or 195k bytes per sec.

at 4x, the optical drive is 400k bytes per sec. - 2.05 times faster than the serial port at it's slowest speed.

Edit: Updated to correct serial port speed of 1.56 Mbps. Thanks megavolt85. :D

https://jj1odm.sizious.com/

Just not the case serial port speed with dreamshell i can stream 400kb no worries and get to 4x cdrom speed
bandicam 2021-10-14 19-43-23-188.jpg
Also faster seek multi files at once random seek many files not just 8


User avatar
Ian Micheal
Developer
Posts: 6277
Location: USA
Contact:

Re: Dreamcast 4XM video testing

Post by Ian Micheal »

SMiTH wrote:ian, the truemotion duck logo sample video from sdk.... what codec is this? its not sofdec sfd??

No it's not sfd it's truemotion codec

User avatar
Ian Micheal
Developer
Posts: 6277
Location: USA
Contact:

Re: Dreamcast 4XM video testing

Post by Ian Micheal »

megavolt85 wrote:
MoeFoh wrote: serial port is 400k bits per sec. or 50k bytes per sec.
???
SD - 4-7 Mbit (depends on the quality of the adapter and SD card )
HDD - 80+ Mbit (this is where the real speed :) )
indeed




SMiTH
Super Sonic
Posts: 1512

Re: Dreamcast 4XM video testing

Post by SMiTH »

i will try to start 4xm_comp tomorrow of a full movie.
let me know if this is a good setting for test.
dvd rip > 9000 bitrate, 25fps, 640x368, 128kbps 44.1khz mp3 stereo > .avi > .4xm (800000 data rate)

also is the binary for truemotion on any of the sdk's?

User avatar
Ian Micheal
Developer
Posts: 6277
Location: USA
Contact:

Re: Dreamcast 4XM video testing

Post by Ian Micheal »

Yes i will get it to you.. I'm in the middle of HD migration to a new HD so everything is on hold for me right now..

User avatar
Ian Micheal
Developer
Posts: 6277
Location: USA
Contact:

Re: Dreamcast 4XM video testing

Post by Ian Micheal »

SMiTH wrote:i will try to start 4xm_comp tomorrow of a full movie.
let me know if this is a good setting for test.
dvd rip > 9000 bitrate, 25fps, 640x368, 128kbps 44.1khz mp3 stereo > .avi > .4xm (800000 data rate)

also is the binary for truemotion on any of the sdk's?
Playvid.bin can play duck or sfd

// njPrint(NJM_LOCATION(5, 6), "A : Play MPEG Sofdec");
// njPrint(NJM_LOCATION(5, 8), "B : Play TrueMotion");
// njPrint(NJM_LOCATION(5, 10), "X : Play MPEG/Audio");
// njPrint(NJM_LOCATION(5, 12), "Y : Play WAVE");
// njPrint(NJM_LOCATION(5, 14), "START : Stop");


src code

Code: Select all

/*
 *
 *		Middleware Player Sample
 *
 */

/***************************************************************************
 *      ƒCƒ“ƒNƒ‹[ƒhƒtƒ@ƒCƒ‹
 *      Include file
 ***************************************************************************/
#include <shinobi.h>
#include <sg_sd.h>
#include <sg_mw.h>
#include <ginsu.h>


/***************************************************************************
 *      ’萔ƒ}ƒNƒ
 *      MACRO CONSTANT
 ***************************************************************************/

/*	•\ަƒ‚[ƒh		*/
/*	Display mode	*/
#define SYS_MODE		NJD_RESOLUTION_640x480_NTSCI
#define SYS_FRAME		NJD_FRAMEBUFFER_MODE_ARGB8888
#define SYS_COUNT		1

/*	’¸“_ƒoƒbƒtƒ@ƒTƒCƒY(1‚‚ðƒ}ƒCƒiƒX‚É‚·‚邯2VƒŒ[ƒeƒ“ƒVƒ‚[ƒh)			*/
/*	Vertex buffer size(2V latency mode is when a valiable is minus.)	*/
#define SFD_VB_OP		-500000
#define SFD_VB_OM		0
#define SFD_VB_TP		20000
#define SFD_VB_TM		0
#define SFD_VB_PT		0

#define TM_VB_OP		100000
#define TM_VB_OM		0
#define TM_VB_TP		100000
#define TM_VB_TM		0
#define TM_VB_PT		0

/*
 * ‰¹ºÄ¶‚ÌŽw’è
 *   ON   :‰¹º‚ ‚è“®‰æƒtƒ@ƒCƒ‹‚È‚ç‚Ή¹ºÄ¶‚ðs‚¤BƒfƒtƒHƒ‹ƒgB
 *   OFF  :‰¹ºÄ¶‚ð—}Ž~‚·‚éB‰¹º‚ ‚è“®‰æƒtƒ@ƒCƒ‹‚Å‚à‰f‘œ‚¾‚¯‚ðÄ¶B
 * Setting play audio
 *   ON   :Play audio when the animation file is interleaved audio(default)
 *   OFF  :Not play audio
 */
#define AUDIO_SW		ON

/*	NINJA			*/
#define	TEX_NUM			100
#define	TEXNAME_NUM		2
#define	TEX_BUFSIZE		0x20800

/*	ƒGƒ‰[ƒƒbƒZ[ƒW’·		*/
/*	Length of error message	*/
#define ERRMSG_LEN		256

/*	ƒI[ƒfƒBƒIÄ¶—pƒoƒbƒtƒ@ƒTƒCƒY		*/
/*	Buffer size for play Audio Decoder	*/
#define	AUDIO_BUF_SIZE	MWD_PLY_CALC_AWORK(MWD_PLY_MIN_AWORK)
#define	MPA_BUF_SIZE	AUDIO_BUF_SIZE
#define WAV_BUF_SIZE	AUDIO_BUF_SIZE


/***************************************************************************
 *      ˆ—ƒ}ƒNƒ
 *      Process MACRO
 ***************************************************************************/

/*	ƒtƒ‰ƒOON/OFF‚Ì”½“]		*/
/*	Turn over flag(ON/OFF)	*/
#define NOT_FLAG(flag)		(((flag) == OFF) ? ON : OFF)


/***************************************************************************
 *      •ϐ”’è‹`
 *		Variable Declaration
 ***************************************************************************/

/*	ƒGƒ‰[”­¶‰ñ”		*/
/*	The number of error	*/
Sint32 errcnt = 0;

/*	ƒGƒ‰[ƒƒbƒZ[ƒW	*/
/*	Error message		*/
char errmsg[ERRMSG_LEN] = "(OK)";

/*	•¶Žš—ñ•\ަƒtƒ‰ƒO				*/
/*	Flag for a show of character	*/
Sint32 disp_flag = ON;

/*	ƒ|[ƒYó‘Ô		*/
/*	Pause status	*/
Sint32 pause = OFF;

/*	NINJA				*/
NJS_TEXMEMLIST	tex[TEX_NUM];
NJS_TEXINFO		info[TEXNAME_NUM];
NJS_TEXNAME		texname[TEXNAME_NUM];
NJS_TEXLIST		texlist = {texname, TEXNAME_NUM};
Sint8			texbuf[TEX_BUFSIZE];
Uint16			framebuf[1024*512*2];

/*	WAVEÄ¶—pƒoƒbƒtƒ@			*/
/*	Buffer for play WAVE file	*/
/* char play_wav_buf[WAV_BUF_SIZE]; */


/***************************************************************************
 *      ŠÖ”’è‹`
 *      Function Declaration
 ***************************************************************************/

/***
 *		ƒTƒEƒ“ƒhŠÂ‹«‚̏‰Šú‰»
 *		Initialize sound section
 ***/

/*	ƒTƒEƒ“ƒhƒhƒ‰ƒCƒo‚Ì“]‘—E‰Šú‰»					*/
/*	Initialize sound library and load sound driver	*/
void SoundInit(void *sndptr, void *mltptr)
{
	SDMEMBLK	memblk = NULL;

	/*	Initialize Sound library	 */
	sdLibInit(NULL, 0, 0);		/*	This api's argument is dummy now.  */

	/* 	Download and Initialize Sound driver.	 */
	/*	Create Memory block handle  */
	sdMemBlkCreate(&memblk);
	/*  Setting Memory block handle  */
	sdMemBlkSetPrm(memblk, sndptr, 0, SDD_MEMBLK_SYNC_FUNC, NULL);
	/*	Initialize Sound driver  */
	sdDrvInit(memblk);

	/*	Download and Initialize Multi unit	*/
	/*	Setting Memory block handle	*/
	sdMemBlkSetPrm(memblk, mltptr, 0, SDD_MEMBLK_SYNC_FUNC, NULL);
	sdDownloadMultiUnit(memblk);

	sdMemBlkDestroy(memblk);

	/*	Truemotion Only CPU mode	*/
#if	0
	/*	“]‘—ƒ‚[ƒh‚̐ݒè		*/
	/*	Setting transfer mode	*/
	sdMemBlkSetTransferMode(SDE_MEMBLK_TRANSFER_MODE_DMA);
#endif

	return;
}

/***
 *			ƒ†[ƒeƒBƒŠƒeƒBŠÖ”
 *			Utility function
 ***/

/*	ƒf[ƒ^‚̓ǂݍž‚Ý	*/
/*	Load data to memory	*/
void *LoadFile(char *fname, long *len)
{
	GDFS			gdfs;
	long			fsize, nsct;
	void			*dat;

	gdfs = gdFsOpen(fname, NULL);
	if (gdfs == NULL) {
		for (;;) ;
	}
	gdFsGetFileSize(gdfs, &fsize);
	nsct = (fsize + 2047) / 2048;
	dat = syMalloc(nsct * 2048);
	if (dat == NULL) {
		for (;;) ;
	}
	gdFsRead(gdfs, nsct, dat);
	gdFsClose(gdfs);
	if (len != NULL) {
		*len = fsize;
	}

	return dat;
}

/*	msec -> time(hour,min,sec,frame)	*/
void Msec2Time(long mstime, long *hh, long *mm, long *ss, long *ff)
{
	*hh = mstime / (60*60*1000);
	*mm = (mstime - *hh*60*60*1000) / (60*1000);
	*ss = (mstime - *hh*60*60*1000 - *mm*60*1000) / 1000;
	*ff = mstime % 1000;

	return;
}

/***
 *			ƒ~ƒhƒ‹ƒEƒFƒA‚̍ж
 *			Playing middleware
 ***/

/*	ƒ~ƒhƒ‹ƒEƒFƒA‚̃Gƒ‰[”­¶Žž‚É‹N“®‚·‚éŠÖ”			*/
/*	Callback function when an error occur in middleware	*/
void UsrMwErrFunc(void *obj, char *ecode)
{
	errcnt++;
	strncpy(errmsg, ecode, ERRMSG_LEN);

	return;
}

/*	î•ñ‚Ì•\ަ			*/
/*	Display infomation	*/
void DispInfo(MWPLY ply, char *fname)
{
//	long			time, tunit, hh, mm, ss, ff, time_ms;
//	float			timef;
//
//	mwPlyGetTime(ply, &time, &tunit);
//	timef = ((float)time / (float)tunit) * 1000.0;
//	time_ms = (long)timef;
//	Msec2Time(time_ms, &hh, &mm, &ss, &ff);
//	ff = ff*30/1000;
//	njPrint(NJM_LOCATION(0, 3), "File: %s  Time:%02d:%02d:%02d.%02d", 
//							fname, hh, mm, ss, ff);
//	njPrint(NJM_LOCATION(0, 4), "Error%2d:%s", errcnt, errmsg);
//
	return;
}

/*	ƒ~ƒhƒ‹ƒEƒFƒA‚̍ж	*/
/*	Playing middleware	*/
void play_main(MWPLY ply, char *fname)
{
	MWE_PLY_STAT			stat;
	const PDS_PERIPHERAL	*per;

	mwPlyEntryErrFunc((void *)UsrMwErrFunc, &ply);
	mwPlyPause(ply, pause);				/*	‘O‰ñÄ¶‚̃|[ƒYó‘Ô‚ðˆÛŽ		*/
										/*	Keep the last time pause status	*/
	mwPlyStartFname(ply, fname);		/*	Ä¶ŠJŽn						*/
										/*	Start to play middleware		*/
	while (1) {
		njWaitVSync();
		mwPlyStartFrame();
		per = pdGetPeripheral(PDD_PORT_A0);
		if (per->press & PDD_DGT_TA) {
			disp_flag = NOT_FLAG(disp_flag);
		}
		if (per->press & PDD_DGT_TX) {
			pause = ON;
			mwPlyPause(ply, ON);		/*	ˆêŽž’âŽ~				*/
										/*	Pause					*/
		}
		if (per->press & PDD_DGT_TY) {
			pause = OFF;
			mwPlyPause(ply, OFF);		/*	ˆêŽž’âŽ~‰ðœ			*/
										/*	Release pause status	*/
		}
		if (per->press & PDD_DGT_ST) {
			break;
		}
		stat = mwPlyGetStat(ply);
		if ((stat == MWE_PLY_STAT_PLAYEND) || (stat == MWE_PLY_STAT_ERROR)) {
			break;
		}
		if (disp_flag == ON) {
			DispInfo(ply, fname);
		}
		mwPlyExecServer();
	}
	mwPlyStop(ply);						/*	Ä¶’âŽ~ 					*/
										/*	Stop to play middleware		*/
	njWaitVSync();						/*	ƒpƒbƒh‚̏ó‘Ԏ擾‚Ì‚½‚ß		*/
										/*	for getting status of PAD	*/
	mwPlyDestroy(ply);					/*	ƒnƒ“ƒhƒ‹Á‹Ž				*/
										/*	Destroy handle				*/

	return;
}

/***
 *			MPEG Sofdec ‚̍ж
 *			Play MPEG Sofdec
 ***/

/*	SFDƒtƒ@ƒCƒ‹‚̍ж	*/
/*	Playing SFD file	*/
void play_sfd(char *fname)
{
	MWPLY					ply;
	MWS_PLY_CPRM_SFD		cprm;

	/*	ƒnƒ“ƒhƒ‹‚̐¶¬	*/
	/*	Create handle	*/
	memset(&cprm, 0, sizeof(cprm));	/*	—\–ñƒƒ“ƒo‚̃[ƒÝ’è‚Ì‚½‚߂ɕK—v	*/
									/*	To initialize reserved member		*/
	cprm.ftype			= MWD_PLY_FTYPE_SFD;
	cprm.dtype			= MWD_PLY_DTYPE_AUTO;
	cprm.max_bps = 450*1024*8;
	cprm.max_width = 320;
	cprm.max_height = 480;
	cprm.nfrm_pool_wk = 3;
	cprm.wksize = mwPlyCalcWorkSofdec(
								cprm.ftype,
								cprm.max_bps,
								cprm.max_width,
								cprm.max_height,
								cprm.nfrm_pool_wk);
	cprm.work = syMalloc(cprm.wksize);
	ply = mwPlyCreateSofdec(&cprm);
	if (ply == NULL) {
		for (;;) ;
	}
	mwPlySetAudioSw(ply, AUDIO_SW);
	play_main(ply, fname);
	syFree(cprm.work);

	return;
}

/***
 *			TrueMotion ‚̍ж
 *			Play TrueMotion
 ***/

/*	AVIƒtƒ@ƒCƒ‹‚̍ж	*/
/*	Playing AVI file	*/
void play_tm(char *fname)
{
	MWPLY				ply;
	MWS_PLY_CPRM_TM		cprm;

	/*	NINJA‰Šú‰»			*/
	/*	Initialize NINJA	*/
	njInitVertexBuffer(TM_VB_OP, TM_VB_OM, TM_VB_TP, TM_VB_TM, TM_VB_PT);
	njInitPrint(NULL, 0, NJD_TEXFMT_ARGB_8888);
	njPrintSize(12);
	njInitTexture(tex, TEX_NUM);
	njInitTextureBuffer(texbuf, TEX_BUFSIZE);
	njSetTextureInfo(&info[0], framebuf,
					(NJD_TEXFMT_YUV_422 | NJD_TEXFMT_STRIDE), 1024, 512);
	njSetTextureInfo(&info[1], framebuf + 1024 * 512,
					(NJD_TEXFMT_YUV_422 | NJD_TEXFMT_STRIDE), 1024, 512);
	njSetTextureName(&texname[0], &info[0], 0,
					(NJD_TEXATTR_TYPE_MEMORY | NJD_TEXATTR_GLOBALINDEX));
	njSetTextureName(&texname[1], &info[1], 1,
					(NJD_TEXATTR_TYPE_MEMORY | NJD_TEXATTR_GLOBALINDEX));
	njLoadTexture(&texlist);
	njSetTexture(&texlist);

	/*	ƒnƒ“ƒhƒ‹‚̐¶¬	*/
	/*	Create handle	*/
	ply = mwPlyCreateTM(&cprm);
	if (ply == NULL) {
		for (;;) ;
	}
	play_main(ply, fname);

	/*	NINJA‰ð•ú		*/
	/*	Finish NINJA	*/
	njReleaseTextureAll();
	njExitTexture();

	/*	NINJA‰Šú‰»			*/
	/*	Initialize NINJA	*/
	njInitVertexBuffer(SFD_VB_OP, SFD_VB_OM, SFD_VB_TP, SFD_VB_TM, SFD_VB_PT);
	njInitPrint(NULL, 0, NJD_TEXFMT_ARGB_8888);
	njPrintSize(12);

	return;
}

/***
 *			MPEG/Audio ‚̍ж
 *			Play MPEG/Audio
 ***/

/*	MP2ƒtƒ@ƒCƒ‹‚̍ж	*/
/*	Playing MP2 file	*/
void play_mpa(char *fname)
{
	MWPLY			ply;
	MWS_PLY_CPRM	cprm;

	/*	ƒnƒ“ƒhƒ‹‚̐¶¬	*/
	/*	Create handle	*/
	cprm.buf     = syMalloc(MPA_BUF_SIZE);
	cprm.size    = MPA_BUF_SIZE;
	cprm.libwork = syMalloc(MWD_MPA_CALC_WORK(1));
	ply = mwPlyCreateMpa(&cprm);
	if (ply == NULL) {
		for (;;) ;
	}
	play_main(ply, fname);
	syFree(cprm.libwork);
	syFree(cprm.buf);

	return;
}

/***
 *			WAVE‚̍ж
 *			Play WAVE
 ***/

/*	WAVEƒtƒ@ƒCƒ‹‚̍ж	*/
/*	Playing WAVE file	*/
void play_wav(char *fname)
{
	MWPLY			ply;
	MWS_PLY_CPRM	cprm;

	/*	ƒnƒ“ƒhƒ‹‚̐¶¬	*/
	/*	Create handle	*/
	cprm.buf     = syMalloc(WAV_BUF_SIZE);
	cprm.size    = WAV_BUF_SIZE;
	cprm.libwork = NULL;
	ply = mwPlyCreateWav(&cprm);
	if (ply == NULL) {
		for (;;) ;
	}
	play_main(ply, fname);
	syFree(cprm.buf);

	return;
}

/***
 *			ƒƒCƒ“•”
 *			MAIN
 ***/

/*	ƒAƒvƒŠƒP[ƒVƒ‡ƒ“I—¹ˆ—	*/
/*	Finalize application		*/
void UsrExit(void)
{
	/*	ƒ‰ƒCƒuƒ‰ƒŠI—¹ˆ—					*/
	/*	Finalize Middleware					*/
	mwPlyFinishSofdec();
	mwPlyFinishTM();
	mwPlyFinishMpa();
	mwPlyFinishWav();

	sbExitSystem();			/*	”Eƒ‰ƒCƒuƒ‰ƒŠ‚̏I—¹ˆ—				*/
							/*	Finalize SHINOBI					*/
//	syBtExit();				/*	ƒVƒ“ƒvƒ‹ƒvƒŒƒCƒ„‚ÖƒWƒƒƒ“ƒv			*/
							/*	Jump to Simple player				*/
}

/*	GDƒtƒ@ƒCƒ‹ƒVƒXƒeƒ€‚̃Gƒ‰[”­¶Žž‚É‹N“®‚·‚éŠÖ”			*/
/*	Callback function when an error occur in GD file system	*/
void UsrGdErrFunc(void *obj, Sint32 errcode)
{
	if (errcode == GDD_ERR_TRAYOPEND || errcode == GDD_ERR_UNITATTENT) {
		UsrExit();					/*	ƒAƒvƒŠƒP[ƒVƒ‡ƒ“I—¹ˆ—	*/
									/*	Finalize application		*/
	}

	return;
}

/*	ƒ†[ƒU‚ªV-SYNCŠ„‚荞‚݂ɓo˜^‚·‚éŠÖ”	*/
/*	Callback function when V-sync interrupt	*/
void UsrVsyncFunc(void)
{
	Sint32 dstat;

    /*	ƒTƒEƒ“ƒhƒ‰ƒCƒuƒ‰ƒŠ‚̃T[ƒoŠÖ”		*/
	/*	Server function of sound library	*/
	sdSysServer();

	/*	ƒhƒAƒI[ƒvƒ“ƒ`ƒFƒbƒN	*/
	/*	Check door open			*/
	dstat = gdFsGetDrvStat();
	if (dstat == GDD_DRVSTAT_OPEN || dstat == GDD_DRVSTAT_BUSY) {
		gdFsReqDrvStat();
	}

	return;
}

void main(void)
{
	MWS_PLY_INIT_SFD		iprm;
	void 					*snddrv;
	void					*mltfile;
	const NJS_PERIPHERAL	*per;

#ifdef __GNUC__
	shinobi_workaround();
#endif
    gsInit();
    
	/*	ƒ~ƒhƒ‹ƒEƒFƒA‚Ì‚½‚߂̃VƒXƒeƒ€‰Šú‰» (sbInitSystem‚Ì‘O‚É’u‚­)	*/
	/*	Initialize system for middleware(call before sbInitSystem)	*/
	mwPlyPreInitSofdec();

	/*	”Eƒ‰ƒCƒuƒ‰ƒŠ‚̏‰Šú‰»	*/
	/*	Initialize SHINOBI		*/
    njSetBorderColor(0x00000000);
    
    switch (syCblCheck())
	{
        /* Initialize the display device and set the frame buffer based on the video mode. */
        case SYE_CBL_NTSC:  /* U.S./North America NTSC (60Hz) and Brazil PAL-M (60Hz). */
            sbInitSystem (NJD_RESOLUTION_640x480_NTSCNI, NJD_FRAMEBUFFER_MODE_RGB565, 1);
            break;
        case SYE_CBL_PAL:   /* Europe PAL (50Hz) and Argentina PAL-N (50Hz). */
            sbInitSystem (NJD_RESOLUTION_640x544_PALNI, NJD_FRAMEBUFFER_MODE_RGB565, 1);
            break;
        case SYE_CBL_VGA:   /* Standard VGA. */
            sbInitSystem (NJD_RESOLUTION_VGA, NJD_FRAMEBUFFER_MODE_RGB565, 1);
            break;
        default:
            syBtExit();     /* Unknown video type, return to Dreamcast BootROM. */
	}


#if 0
// this line is needed if DDS is not used, ie GDFS version < 1.06
    gdFsChangeDir(gsGetBasePath());
#endif    
    
	njInitVertexBuffer(SFD_VB_OP, SFD_VB_OM, SFD_VB_TP, SFD_VB_TM, SFD_VB_PT);
	njInitPrint(NULL, 0, NJD_TEXFMT_ARGB_8888);
	njPrintSize(12);
	/*	GDƒtƒ@ƒCƒ‹ƒVƒXƒeƒ€ƒGƒ‰[ƒR[ƒ‹ƒoƒbƒNŠÖ”‚Ì“o˜^	*/
	/*	Entry callback function of GD file system error	*/
	gdFsEntryErrFuncAll((void *)UsrGdErrFunc, NULL);

	/*	ƒTƒEƒ“ƒhƒ‰ƒCƒuƒ‰ƒŠ‚̏€”õ	*/
	/*	Prepare sound library		*/
	snddrv  = LoadFile("manatee.drv", NULL);
	mltfile = LoadFile("stream.mlt", NULL);
	SoundInit(snddrv, mltfile);

	njSetVSyncFunction(UsrVsyncFunc);

	/*	ƒ~ƒhƒ‹ƒEƒFƒAƒ‰ƒCƒuƒ‰ƒŠ‰Šú‰»	*/
	/*	Initialize middleware			*/
	memset(&iprm, 0, sizeof(iprm));	/*	—\–ñƒƒ“ƒo‚̃[ƒÝ’è‚Ì‚½‚߂ɕK—v	*/
									/*	To initialize reserved member		*/

	iprm.mode		= SYS_MODE;
	iprm.frame		= SYS_FRAME;
	iprm.count		= SYS_COUNT;
	iprm.latency	= MWD_PLY_LATENCY(SFD_VB_OP, SFD_VB_OM,
											SFD_VB_TP, SFD_VB_TM, SFD_VB_PT);
	mwPlyInitSofdec(&iprm);
	mwPlyInitTM();
	mwPlyInitMpa(MWD_PLY_SVR_VSYNC);
	mwPlyInitWav(MWD_PLY_SVR_VSYNC);

    if (gsGetArgC()==3)
    {
        if (!strcmp("MPEG",gsGetArgV(2)))
        {
        	play_sfd(gsGetArgV(1));
        }
    
        if (!strcmp("DUCK",gsGetArgV(2)))
        {
        	play_tm(gsGetArgV(1));
        }
    }
    
//	for (;;) {
//		per = njGetPeripheral(NJD_PORT_A0);
//		njPrint(NJM_LOCATION(15, 3), 
//					"Middleware Player Sample No.1");
//		njPrint(NJM_LOCATION(5,  6), "A     : Play MPEG Sofdec");
//		njPrint(NJM_LOCATION(5,  8), "B     : Play TrueMotion");
//		njPrint(NJM_LOCATION(5, 10), "X     : Play MPEG/Audio");
//		njPrint(NJM_LOCATION(5, 12), "Y     : Play WAVE");
//		njPrint(NJM_LOCATION(5, 14), "START : Stop");
//		if (per->press & NJD_DGT_TA) {
//			play_sfd("SAMPLE.SFD");
//		}
//		if (per->press & NJD_DGT_TB) {
//			play_tm("SAMPLE.AVI");
//		}
//		if (per->press & NJD_DGT_TX) {
//			play_mpa("SAMPLE.MP2");
//		}
//		if (per->press & NJD_DGT_TY) {
//			play_wav("SAMPLE.WAV");
//		}
//		njWaitVSync();
//	}

	UsrExit();						/*	ƒAƒvƒŠƒP[ƒVƒ‡ƒ“I—¹ˆ—	*/
									/*	Finalize application		*/
    gsExit();
}


/* end of file */

SMiTH
Super Sonic
Posts: 1512

Re: Dreamcast 4XM video testing

Post by SMiTH »

Code: Select all

Playvid.bin can play duck or sfd

A : Play MPEG Sofdec
B : Play TrueMotion
X : Play MPEG/Audio
Y : Play WAVE
START : Stop
never knew playvid was like a hybrid player for sfd, audio, truemotion..
i always thought it was sfd only.
thank you.

playvid is usually in every ginsu, dreamon, generator, etc.
i will check out truemotion eventually.

so i need to set up the 4xm_comp today, but work is sending me damn emails on my day off...but i will get to it.

SMiTH
Super Sonic
Posts: 1512

Re: Dreamcast 4XM video testing

Post by SMiTH »

tested the katana r11 4xmplay.bin you attached a few posts back..tried standalone .cdi with ip.bin,4xmplay.bin..boots back to dc menu. (edit to 11702 lba, binhack 4xmplay.bin-ip.bin, searched for hex to change 'found A6 00 00 00 changed to 96 00 00 00')

if i do this same test with the 4xmplay.bin from dreamON it boots 4xmplay.bin. But since 4xmplay.bin has no .cfg file or .ini file to reference it will not load a 4xm video. (it has strings for ginxfer/ginreset/1st_read)

the katana 4xmplay.bin might need a different pvr to load..the 4xmplay.bin from dreamON requires 4xlogo.pvr to load.

  • Similar Topics
    Replies
    Views
    Last post