DreamShell 4

This forum is for discussion pertaining to homebrew software for the Dreamcast, such as homebrew games, emulators/interpreters, and other homebrew software/applications. Porting requests and developmental ideas are not to be made here; you can make those here. If you need any help burning discs for homebrew software, this is the place to ask as well.
User avatar
SWAT
Insane DCEmu
Insane DCEmu
Posts: 191
Joined: Sat Jan 31, 2004 2:34 pm
Location: Russia/Novosibirsk
Contact:

Re: DreamShell 4

Post by SWAT » Tue Jun 16, 2009 10:21 pm

Yes, while only 8.3
In the SD Card library that you gave me, the library fatfs only supports the 8.3 format. I now have a new fatfs library, which supports long file names, I just have to implement it :)
Image
OVERRiDE_DC
DCEmu Fast Newbie
DCEmu Fast Newbie
Posts: 24
Joined: Thu Jun 18, 2009 10:55 pm

Re: DreamShell 4

Post by OVERRiDE_DC » Fri Jun 19, 2009 11:16 pm

Whats up Guys-
First off swat, thanks for your time with Dreamcast programming.

I saw in the Dreamshell 4 release what looks to me like a port of SMPEG. How can this be used? To play mpeg video?

If you can design this to play multi-media formats, I can see Dreamshell being very popular!

So, SWAT, pls reply about the current state of SMPEG in Dreamshell!

Thanks again
-OVERRiDE
User avatar
SWAT
Insane DCEmu
Insane DCEmu
Posts: 191
Joined: Sat Jan 31, 2004 2:34 pm
Location: Russia/Novosibirsk
Contact:

Re: DreamShell 4

Post by SWAT » Sat Jun 20, 2009 8:30 am

SMPEG module just ported, not tested.
But there is a module vfdc, who also supported the mpeg video. In DreamShell Beta 3, I will try to make a module from the latest version vfdc 0.2 and introduce support for opening mpeg files in the file manager.
Image
OVERRiDE_DC
DCEmu Fast Newbie
DCEmu Fast Newbie
Posts: 24
Joined: Thu Jun 18, 2009 10:55 pm

Re: DreamShell 4

Post by OVERRiDE_DC » Sat Jun 20, 2009 12:22 pm

So, there is no way to use SMPEG currently via keyboard command?

And, please, make a module for playing MPEG! It would be awesome.
Dont forget your supported audio codecs too, .ogg, .mp3, etc.

To be able to browse SD card and launch these media formats would be incredible!

"Dreamshell Media Player" would see a lot of DC users support!

EDIT:

Can I simply modify the function 'openFile' in \apps\filemanager\lua\main.lua to open MP3 and OGG and MPG?

Code: Select all

function openFile(fn, wname)

	local ext = string.lower(string.sub(fn, -3));
	local win = getWin(wname);
	local file = parsePath(win.path) .. "/" .. fn;
	
--	print("Open file with extension - " .. ext);

	if ext == "bin" then

		if DS.dsystem("exec -bin " .. file) ~= DS.CMD_OK then
			DS.ToggleConsole();
		end
Add something like:

Code: Select all

elseif ext == "mp3" then
		if DS.dsystem("exec \modules\audio\mp3.klf " .. file) ~= DS.CMD_OK then
			DS.ToggleConsole();
		end
Im sure my syntax is incorrect, what would be the correct way to open an mp3 in this function?
Also why you didnt allready include support for this in the openFile function??????
User avatar
alex81
DCEmu Cool Newbie
DCEmu Cool Newbie
Posts: 13
Joined: Tue Apr 14, 2009 1:28 pm
Location: Russia/Novosibirsk

Re: DreamShell 4

Post by alex81 » Sat Jun 20, 2009 1:59 pm

i think you need add this module to app.xml

Code: Select all

<module src="../../modules/audio/mp3.klf" />
and to \apps\filemanager\lua\main.lua add something like this:

Code: Select all

elseif ext == "mp3" then
      if DS.dsystem("mp3 -flags" .. file) ~= DS.CMD_OK then
         DS.ToggleConsole();
      end
User avatar
SWAT
Insane DCEmu
Insane DCEmu
Posts: 191
Joined: Sat Jan 31, 2004 2:34 pm
Location: Russia/Novosibirsk
Contact:

Re: DreamShell 4

Post by SWAT » Sun Jun 21, 2009 1:54 am

alex, the relative path type ../../ working in Beta 3, the public release that was not:)
And modules ogg, mp3, smpeg, vfdc are intended only for loading the library in memory and further the use of its functions in other modules.
Please wait for Beta 3, coming soon, there will be all that you ask.
Image
OVERRiDE_DC
DCEmu Fast Newbie
DCEmu Fast Newbie
Posts: 24
Joined: Thu Jun 18, 2009 10:55 pm

Re: DreamShell 4

Post by OVERRiDE_DC » Sun Jun 21, 2009 6:00 pm

Sounds good SWAT. I look forward to beta 3!

Also, when I run DS4 beta 2 on the loader 1.2 with nullDC, the filemanager app does not run when i click on it.
And, I am not able to use character '-' on my keyboard in the command console, making it hard to do anything without that..
Anyone else have a solution to my problems?
User avatar
SWAT
Insane DCEmu
Insane DCEmu
Posts: 191
Joined: Sat Jan 31, 2004 2:34 pm
Location: Russia/Novosibirsk
Contact:

Re: DreamShell 4

Post by SWAT » Mon Jun 22, 2009 3:06 am

Hmm this is strange, file manager work for me on "DreamShell on PC Loader v1.2".
The character '-' works on numpad.
Image
OVERRiDE_DC
DCEmu Fast Newbie
DCEmu Fast Newbie
Posts: 24
Joined: Thu Jun 18, 2009 10:55 pm

Re: DreamShell 4

Post by OVERRiDE_DC » Tue Jun 23, 2009 12:07 pm

SWAT wrote:Hmm this is strange, file manager work for me on "DreamShell on PC Loader v1.2".
EDIT:
I changed the controller plug-in on nullDC and now I can access file manager okay! ( Mouse still behaves strangely though... )
SWAT wrote:The character '-' works on numpad.
Right. That solved the problem!

And, Im currently making some tests with this current beta.
In startup.lua, initializing the screen:

Code: Select all

--	local width = 768
--	local height = 576
Have you gotten such a resolution to work on DC? Ive tested, and it just crashes nullDC when set higher than 640x480.
And, would there be a decrease in CPU usage to use a "Widescreen" mode, say at 640x360?

If it does decrease CPU usage to decrease screen resolution, maybe it coulde be implemented in your video player module to automatically adjust the output screen size depending on the video resolution.
For example, if the video resolution is (640x272) or (320x136) the output screen will be set to 640x272.

Just a thought, Also:

Code: Select all

	local bpp = 16
Set to 24 runs horribly slow.
Set to 32 runs okay to desktop, but seems to freeze when loading "File Manager"

So, why does 32bit mode run better than 24bit mode? :o
User avatar
SWAT
Insane DCEmu
Insane DCEmu
Posts: 191
Joined: Sat Jan 31, 2004 2:34 pm
Location: Russia/Novosibirsk
Contact:

Re: DreamShell 4

Post by SWAT » Tue Jun 23, 2009 9:56 pm

OVERRiDE_DC wrote: I changed the controller plug-in on nullDC and now I can access file manager okay! ( Mouse still behaves strangely though... )
Mouse normal work on DC, nullDC badly emulate mouse.
OVERRiDE_DC wrote: And, Im currently making some tests with this current beta.
In startup.lua, initializing the screen:

Code: Select all

--	local width = 768
--	local height = 576
Have you gotten such a resolution to work on DC? Ive tested, and it just crashes nullDC when set higher than 640x480.
And, would there be a decrease in CPU usage to use a "Widescreen" mode, say at 640x360?

If it does decrease CPU usage to decrease screen resolution, maybe it coulde be implemented in your video player module to automatically adjust the output screen size depending on the video resolution.
For example, if the video resolution is (640x272) or (320x136) the output screen will be set to 640x272.

Just a thought, Also:

Code: Select all

	local bpp = 16
Set to 24 runs horribly slow.
Set to 32 runs okay to desktop, but seems to freeze when loading "File Manager"

So, why does 32bit mode run better than 24bit mode? :o
You can use all resolutions supported by DC SDL: 800x600, 768x576, 768x480, 640x480, 320x240, 256x256
But this normal work only on DC.
BPP 24 equivalent BPP 32 in DC SDL, i don't know why you are working on different.
Image
OVERRiDE_DC
DCEmu Fast Newbie
DCEmu Fast Newbie
Posts: 24
Joined: Thu Jun 18, 2009 10:55 pm

Re: DreamShell 4

Post by OVERRiDE_DC » Wed Jun 24, 2009 5:04 pm

SWAT wrote:Mouse normal work on DC, nullDC badly emulate mouse.
I just found out that numpad 2,4,6,8 work best for mouse using nullDC

Another thing, for NTSC Dreamcast, is it best to change:

Code: Select all

	DS.SDL_DC_ShowAskHz(DS.SDL_FALSE);
	DS.SDL_DC_Default60Hz(DS.SDL_FALSE);
	DS.SDL_DC_VerticalWait(DS.SDL_FALSE);
	DS.SDL_DC_SetVideoDriver(DS.SDL_DC_DIRECT_VIDEO);
to:

Code: Select all

	DS.SDL_DC_ShowAskHz(DS.SDL_FALSE);
	DS.SDL_DC_Default60Hz(DS.SDL_TRUE);
	DS.SDL_DC_VerticalWait(DS.SDL_FALSE);
	DS.SDL_DC_SetVideoDriver(DS.SDL_DC_DMA_VIDEO);

And I tested vfdc vplay in DS3.8x, and video plays great on mpeg2 but audio is only garbage sounds.
And when I use command "vplay -vcd" with a vcd in the drive, it crashes DC.
Will this be fixed in vfdc2.0 in DS4 beta3? No VCD not a big deal, but Mpeg2 needs audio!
User avatar
SWAT
Insane DCEmu
Insane DCEmu
Posts: 191
Joined: Sat Jan 31, 2004 2:34 pm
Location: Russia/Novosibirsk
Contact:

Re: DreamShell 4

Post by SWAT » Thu Jun 25, 2009 5:27 am

OVERRiDE_DC wrote:

Another thing, for NTSC Dreamcast, is it best to change:

Code: Select all

	DS.SDL_DC_ShowAskHz(DS.SDL_FALSE);
	DS.SDL_DC_Default60Hz(DS.SDL_FALSE);
	DS.SDL_DC_VerticalWait(DS.SDL_FALSE);
	DS.SDL_DC_SetVideoDriver(DS.SDL_DC_DIRECT_VIDEO);
to:

Code: Select all

	DS.SDL_DC_ShowAskHz(DS.SDL_FALSE);
	DS.SDL_DC_Default60Hz(DS.SDL_TRUE);
	DS.SDL_DC_VerticalWait(DS.SDL_FALSE);
	DS.SDL_DC_SetVideoDriver(DS.SDL_DC_DMA_VIDEO);
Yes, so much better. I just forgot to change. In nullDC does not work DMA video mode.
OVERRiDE_DC wrote: And I tested vfdc vplay in DS3.8x, and video plays great on mpeg2 but audio is only garbage sounds.
And when I use command "vplay -vcd" with a vcd in the drive, it crashes DC.
Will this be fixed in vfdc2.0 in DS4 beta3? No VCD not a big deal, but Mpeg2 needs audio!
I include vcdc 0.2 in beta 3, but no promise that will work well
Image
OVERRiDE_DC
DCEmu Fast Newbie
DCEmu Fast Newbie
Posts: 24
Joined: Thu Jun 18, 2009 10:55 pm

Re: DreamShell 4

Post by OVERRiDE_DC » Thu Jun 25, 2009 3:30 pm

SWAT wrote:I include vcdc 0.2 in beta 3, but no promise that will work well
Okay, but I assume you mean vFdc 0.2, not vCdc 0.2, right?

Update, I found that vfdc in DS3.8x will play audio in mpeg2, it just has to be stereo! ( mono results in garbage sounds I explained earlier )

Any chance you could port a simple XviD codec?

And now waiting patiently for Beta 3...
User avatar
SWAT
Insane DCEmu
Insane DCEmu
Posts: 191
Joined: Sat Jan 31, 2004 2:34 pm
Location: Russia/Novosibirsk
Contact:

Re: DreamShell 4

Post by SWAT » Thu Jun 25, 2009 10:25 pm

No, i mean VC/DC 0.2 - http://www.dcemu.co.uk/vbulletin/showth ... p?t=205946
VC/DC use updated vfdc library.

In the future I will try to implement the ffmpeg plugin. But not in Beta 3. Who Can it do for me before?
Image
OneThirty8
Damn Dirty Ape
Damn Dirty Ape
Posts: 5031
Joined: Thu Nov 07, 2002 11:11 pm
Location: Saugerties, NY

Re: DreamShell 4

Post by OneThirty8 » Thu Jun 25, 2009 11:05 pm

SWAT wrote:No, i mean VC/DC 0.2 - http://www.dcemu.co.uk/vbulletin/showth ... p?t=205946
VC/DC use updated vfdc library.
Nice! I'm glad to hear that it'll be used in other projects! I don't think there have been significant changes to libmpeg2 since I downloaded the version I used for VC/DC, but if you want to use the latest svn version of libmpeg2 it should probably work without changes as long as you don't overwrite anything in the libvo folder that comes with vc/dc.
OVERRiDE_DC
DCEmu Fast Newbie
DCEmu Fast Newbie
Posts: 24
Joined: Thu Jun 18, 2009 10:55 pm

Re: DreamShell 4

Post by OVERRiDE_DC » Fri Jun 26, 2009 12:46 am

SWAT wrote:No, i mean VC/DC 0.2 - http://www.dcemu.co.uk/vbulletin/showth ... p?t=205946
VC/DC use updated vfdc library.

In the future I will try to implement the ffmpeg plugin. But not in Beta 3. Who Can it do for me before?
OK just had to clarify about VC/DC :grin: So, SMPEG is not going to be utilized, at all?

If it helps, here is FFMpeg port from DCPlaya2Beta2, compiled elf format:
http://www.mediafire.com/download.php?2dnorcywjkn

And souce code they provided, some has been updated since beta2 was released...
http://dcplaya.cvs.sourceforge.net/view ... np/ffmpeg/
User avatar
SWAT
Insane DCEmu
Insane DCEmu
Posts: 191
Joined: Sat Jan 31, 2004 2:34 pm
Location: Russia/Novosibirsk
Contact:

Re: DreamShell 4

Post by SWAT » Sat Jun 27, 2009 12:27 am

OVERRiDE_DC wrote:
SWAT wrote:No, i mean VC/DC 0.2 - http://www.dcemu.co.uk/vbulletin/showth ... p?t=205946
VC/DC use updated vfdc library.

In the future I will try to implement the ffmpeg plugin. But not in Beta 3. Who Can it do for me before?
OK just had to clarify about VC/DC :grin: So, SMPEG is not going to be utilized, at all?

If it helps, here is FFMpeg port from DCPlaya2Beta2, compiled elf format:
http://www.mediafire.com/download.php?2dnorcywjkn

And souce code they provided, some has been updated since beta2 was released...
http://dcplaya.cvs.sourceforge.net/view ... np/ffmpeg/

I think that smpeg too slow, yet nothing is going to do with it.
I need the source ffmpeg. The module of DC Playa did not come to DreamShell.
At DC Playa cvs no source library of ffmpeg, there is only a part of the module.
Image
User avatar
SWAT
Insane DCEmu
Insane DCEmu
Posts: 191
Joined: Sat Jan 31, 2004 2:34 pm
Location: Russia/Novosibirsk
Contact:

Re: DreamShell 4

Post by SWAT » Sat Jun 27, 2009 12:31 am

OneThirty8 wrote:
SWAT wrote:No, i mean VC/DC 0.2 - http://www.dcemu.co.uk/vbulletin/showth ... p?t=205946
VC/DC use updated vfdc library.
Nice! I'm glad to hear that it'll be used in other projects! I don't think there have been significant changes to libmpeg2 since I downloaded the version I used for VC/DC, but if you want to use the latest svn version of libmpeg2 it should probably work without changes as long as you don't overwrite anything in the libvo folder that comes with vc/dc.
Ok, thanks.
Image
OVERRiDE_DC
DCEmu Fast Newbie
DCEmu Fast Newbie
Posts: 24
Joined: Thu Jun 18, 2009 10:55 pm

Re: DreamShell 4

Post by OVERRiDE_DC » Sat Jun 27, 2009 1:14 pm

SWAT wrote:I think that smpeg too slow, yet nothing is going to do with it.
I need the source ffmpeg. The module of DC Playa did not come to DreamShell.
At DC Playa cvs no source library of ffmpeg, there is only a part of the module.
Too bad news about SMPEG! But it will be nice for vcdc.0.2 to have SD support.

Yeah, I thought DCPlaya source was bare. Maybe it supports most recent FFMpeg:
http://ffmpeg.org/releases/ffmpeg-check ... ot.tar.bz2
Of course thats the full checkout, not needed a lot of that code for dreamcast. DC does not need Encoder functions, only Decoder.
And, I think it would be best to only use a few of the included codecs at first, like XviD and MP3.

Also, here is Bero's FFMpeg port to DC:
http://geocities.com/dcdev2003/download.html
User avatar
SWAT
Insane DCEmu
Insane DCEmu
Posts: 191
Joined: Sat Jan 31, 2004 2:34 pm
Location: Russia/Novosibirsk
Contact:

Re: DreamShell 4

Post by SWAT » Sat Jun 27, 2009 11:21 pm

Thank you, but no time for this now.
Image
Post Reply