Dreamcast Media Center

This forum is for discussion pertaining to homebrew and indie 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.
Post Reply
User avatar
Neoblast
DC Developer
DC Developer
Posts: 312
Joined: Sat Dec 01, 2007 8:51 am
Has liked: 0
Been liked: 0

Re: Dreamcast Media Center

Post by Neoblast » Sun Jul 31, 2011 4:02 pm

PH3NOM wrote:
Neoblast wrote:Great, but wouldn't it be better ( and obviously more diff and take more time ) to use the emulator core ( and not load the emu bin ) to load the rom directly from dcmc?

Two cons of this are the rom recognision, either using a different file extension for each rom type would work or maybe the header, but I get the feeling it would be a mess when loading bins.
As far as rom recognition, I don't see any problems.
True, the build of DCMC you tested determines how to process a file based on its extension.
It would be easy to change this to actually open the file first, read its header, then decide how to process it.
Simply, there has been no need to do so, until now...

Adding the EMU CORE into DCMC is a good idea.
But, as Quzar mentioned, this would inflate the binary size, that is something I dont want to do.
DCMC ( including romdisk ) is currently ~2.5Mb
If I had enough time, which I dont, I would implement a module system, similar to how Dreamshell functions.
Considering my time constraints, it is a realistic goal to simply go about this the way I originally mentioned.
Well you read my mind there, a module system would not increase bin size.
DCMC is shaping out to be one of the essentials, hope you manage to find enough time to complete it man.

And not only snes4all, there are still a few emus on the work ( emuforge ones, gens4all on its current build looks great and there's some steps that are being done that would increase the speed a lot ).

Once again, if you need some external help in testing let me know :)
Also the audio discussion of this thread should be split, my comprehension of all the audio system has increased a lot.
User avatar
SWAT
Insane DCEmu
Insane DCEmu
Posts: 191
Joined: Sat Jan 31, 2004 2:34 pm
Location: Russia/Novosibirsk
Has liked: 0
Been liked: 0
Contact:

Re: Dreamcast Media Center

Post by SWAT » Sun Jul 31, 2011 11:02 pm

What is different ARM7TDMI and ARM7DI? T and M extensions? What is?
Image
Ayla
Insane DCEmu
Insane DCEmu
Posts: 137
Joined: Thu Apr 03, 2008 7:01 am
Has liked: 0
Been liked: 0
Contact:

Re: Dreamcast Media Center

Post by Ayla » Mon Aug 01, 2011 6:26 am

The ARM7TDMI is newer, it has a multiplier (hence the "M") which makes the multiplication opcodes faster (6 cycles for a 32b * 32b => 64b opcode on the TDMI, versus ~100 cycles on the DI).

The "T" stands for Thumb, which is an additionnal 16-bit instruction set.
User avatar
SWAT
Insane DCEmu
Insane DCEmu
Posts: 191
Joined: Sat Jan 31, 2004 2:34 pm
Location: Russia/Novosibirsk
Has liked: 0
Been liked: 0
Contact:

Re: Dreamcast Media Center

Post by SWAT » Mon Aug 01, 2011 10:21 am

Thanks!
How can I replace these instructions? Specifically SMLAL and STRH?
Image
Ayla
Insane DCEmu
Insane DCEmu
Posts: 137
Joined: Thu Apr 03, 2008 7:01 am
Has liked: 0
Been liked: 0
Contact:

Re: Dreamcast Media Center

Post by Ayla » Wed Aug 03, 2011 8:19 am

Pseudocode for SMLAL:
L(x) low half-word of register x, R(x) high half-word of register x
Rn, Rm: 32-bit values to multiply
RdLo, RdHi: 2x32-bit registers containing the 64-bit value to add.

tmp1 = L(Rn) * H(Rm)
tmp2 = H(Rn) * L(Rm)

RdLo += L(Rn) * L(Rm) + L(tmp1) + L(tmp2)
RdHi += carry + H(Rn) * H(Rm) + H(tmp1) + H(tmp2)

I hope that works...
User avatar
PH3NOM
DC Developer
DC Developer
Posts: 574
Joined: Fri Jun 18, 2010 9:29 pm
Has liked: 0
Been liked: 0

Re: Dreamcast Media Center

Post by PH3NOM » Wed Aug 03, 2011 2:46 pm

SMULL / UMULL aren't supported by the DC's ARM :cry:

Code: Select all

static inline ogg_int32_t MULT32(ogg_int32_t x, ogg_int32_t y) {
  int lo,hi;
  asm volatile("smull\t%0, %1, %2, %3"
               : "=&r"(lo),"=&r"(hi)
               : "%r"(x),"r"(y)
	       : "cc");
  return(hi);
}
Assembler messages:
Error: selected processor does not support 'smull r3,r2,r1,r0'
Would the result be valid if SMULL were replaced by MUL, throwing away the most significant 32 bits?

Code: Select all

int MULT32(int x, int y) {
  int lo,hi;
  asm volatile("mul\t%0, %2, %3"
               : "=&r"(lo),"=&r"(hi)
               : "%r"(x),"r"(y)
	       : "cc");
  return(lo);
}
Ayla
Insane DCEmu
Insane DCEmu
Posts: 137
Joined: Thu Apr 03, 2008 7:01 am
Has liked: 0
Been liked: 0
Contact:

Re: Dreamcast Media Center

Post by Ayla » Wed Aug 03, 2011 3:25 pm

It is not possible to do it with MUL; it drops the most significant bits, while this MULT32 drops the least significant bits. The result would be just wrong.

Are you really trying to port an OGG decoder on the ARM?
Even with a real 25MHz ARM7 it would be quite difficult...
User avatar
SWAT
Insane DCEmu
Insane DCEmu
Posts: 191
Joined: Sat Jan 31, 2004 2:34 pm
Location: Russia/Novosibirsk
Has liked: 0
Been liked: 0
Contact:

Re: Dreamcast Media Center

Post by SWAT » Thu Aug 04, 2011 7:56 am

On ARM7TDMI 25MHz mp3 and aac decoders with asm optimizations works fine (128 kbps). But this asm optimizations doesn't supported on ARM7DI :(
Image
Ayla
Insane DCEmu
Insane DCEmu
Posts: 137
Joined: Thu Apr 03, 2008 7:01 am
Has liked: 0
Been liked: 0
Contact:

Re: Dreamcast Media Center

Post by Ayla » Thu Aug 04, 2011 9:06 am

You won't go very far with a 3MIPS ARM7DI.

I believe that the only way to get a MP3/OGG decoder on the AICA would be to offload the dequantization and Huffman decoding to the DSP. But that is an enormous task…
Chilly Willy
DC Developer
DC Developer
Posts: 414
Joined: Thu Aug 20, 2009 11:00 am
Has liked: 0
Been liked: 2 times

Re: Dreamcast Media Center

Post by Chilly Willy » Mon Aug 08, 2011 2:44 am

At least you have some ARM code to start with - it's just a matter of determining what's invalid on the DI and replacing it with something valid. I've been working on Tremor for the 32X, and there ain't NO SH2 assembly ANYWHERE for these things. With the current assembly and other optimizations I've made, I can play 22kHz mono or 11kHz stereo ogg-vorbis on the 32X. I think the main difference would be at least the SH2 has a cache where the DI doesn't. I'd bet even money you might get 11kHz mono out of the DC though. :lol:
User avatar
PH3NOM
DC Developer
DC Developer
Posts: 574
Joined: Fri Jun 18, 2010 9:29 pm
Has liked: 0
Been liked: 0

Re: Dreamcast Media Center

Post by PH3NOM » Thu Aug 11, 2011 8:11 pm

Chilly Willy wrote:Add FLAC to the audio codecs. That can be 6 ch as well, and is VERY popular right now for lossless backup of CDs. All my CDs are dumped as FLACs. AC3 6 ch from DVDs is commonly saved as FLAC, not AC3; that's because FLAC is more common on audio players than AC3. For example, if you're a filthy stinking pirate ( :lol: ), lots of SACD rips are all posted as FLAC.
LibFLAC added :lol:

I wrote a custom K:OS soundstream driver for this application.

Currently 16-bit Stereo is the limitation of the decoder application.

Here is the full source to libFLAC-DC and the decoder application:
http://www.megaupload.com/?d=FSQ9CWO0

I would really like input on how we can achieve multi-channel stream mixing on the AICA, using soundstream.
Chilly Willy
DC Developer
DC Developer
Posts: 414
Joined: Thu Aug 20, 2009 11:00 am
Has liked: 0
Been liked: 2 times

Re: Dreamcast Media Center

Post by Chilly Willy » Thu Aug 11, 2011 9:27 pm

Thanks for sharing that. Every bit helps the community. :grin:

My own double-buffer support for Doom uses two separate hardware channels - one set to play completely to the right, and the other completely to the left. You COULD use something similar, just with more channels. A single hardware channel set to the center could play center, while another set to center, but using data 180 degrees out of phase to the center (negated) would play to surround. That's simple 4 channel surround. Not sure if the streaming in KOS supports anything like that.
User avatar
PH3NOM
DC Developer
DC Developer
Posts: 574
Joined: Fri Jun 18, 2010 9:29 pm
Has liked: 0
Been liked: 0

Re: Dreamcast Media Center

Post by PH3NOM » Sun Aug 21, 2011 4:39 pm

Good news on this project!

I have implemented a new k:os soundstream AICA driver to replace the SDL Mixer driver that I was using.
DCMC is now completely free of using SDL.

The first beta release is ready! I will be posting more news soon... :grin:
User avatar
PH3NOM
DC Developer
DC Developer
Posts: 574
Joined: Fri Jun 18, 2010 9:29 pm
Has liked: 0
Been liked: 0

Re: Dreamcast Media Center

Post by PH3NOM » Sun Aug 21, 2011 6:28 pm

Front Page News Post:

Dreamcast Media Center Beta 1 Public Release is available now!

Head over to the project site for download!
https://sites.google.com/site/dreamcastmediacenter/
User avatar
Basil
Insane DCEmu
Insane DCEmu
Posts: 199
Joined: Wed Apr 09, 2008 9:04 am
Has liked: 3 times
Been liked: 0
Contact:

Re: Dreamcast Media Center

Post by Basil » Mon Aug 22, 2011 4:20 am

Wow, thanks man. What about custom skins and fonts support ? ... and 50hz support.
User avatar
T_chan
DCEmu Fast Newbie
DCEmu Fast Newbie
Posts: 17
Joined: Mon Aug 22, 2011 12:45 pm
Has liked: 4 times
Been liked: 3 times

Re: Dreamcast Media Center

Post by T_chan » Mon Aug 22, 2011 12:53 pm

Hello & thank you for the files !

I've launched it via dc-tool to do a quick video test... but unfortunately, the mpeg files I wanted to launch weren't visible in the directory.

I suppose it's because the files have the file extensions .mpg and .mpeg.

It would be nice to have a button that would filter all known extensions on & off, because you never know what extension somebody could give to a video file that could otherwise be played by your player....
User avatar
BlueCrab
The Crabby Overlord
The Crabby Overlord
Posts: 5380
Joined: Mon May 27, 2002 11:31 am
Location: Sailing the Skies of Arcadia
Has liked: 1 time
Been liked: 9 times
Contact:

Re: Dreamcast Media Center

Post by BlueCrab » Mon Aug 22, 2011 4:10 pm

PH3NOM wrote:Front Page News Post:

Dreamcast Media Center Beta 1 Public Release is available now!

Head over to the project site for download!
https://sites.google.com/site/dreamcastmediacenter/
You should have access to post news now by creating a topic in the Front Page News forum. If you'd like to post news, feel free to write something up and post it in there. :wink:

Congrats on the release! :)
User avatar
Indiket
DC Developer
DC Developer
Posts: 99
Joined: Sun Sep 05, 2010 5:44 am
Has liked: 0
Been liked: 0

Re: Dreamcast Media Center

Post by Indiket » Mon Aug 22, 2011 5:07 pm

I still haven't got time to try it, but in any case, congratulations for your work :)
Does DMC play MOD, S3M, and similar files? You could think in adding libmikmod or libmodplug for next release.
Darksidehearts
DCEmu Newbie
DCEmu Newbie
Posts: 5
Joined: Mon Jul 25, 2011 9:03 pm
Has liked: 0
Been liked: 0

Re: Dreamcast Media Center

Post by Darksidehearts » Tue Aug 23, 2011 2:40 am

I downloaded it yesterday but truth be told I haven't a clue how to compile it, haven't compiled a program before. Tomorrow's my day off so I'll do some research to figure it out and let you know my results.
User avatar
Basil
Insane DCEmu
Insane DCEmu
Posts: 199
Joined: Wed Apr 09, 2008 9:04 am
Has liked: 3 times
Been liked: 0
Contact:

Re: Dreamcast Media Center

Post by Basil » Tue Aug 23, 2011 9:54 am

I downloaded it yesterday but truth be told I haven't a clue how to compile it, haven't compiled a program before.
Man what the hell you need to compile it if there is compiled version inside and if you even dont know how to compile a programm??
Post Reply