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: 314
https://www.artistsworkshop.eu/meble-kuchenne-na-wymiar-warszawa-gdzie-zamowic/
Joined: Sat Dec 01, 2007 8:51 am
Has thanked: 3 times
Been thanked: 1 time

Re: Dreamcast Media Center

Post by Neoblast »

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 thanked: 1 time
Been thanked: 0
Contact:

Re: Dreamcast Media Center

Post by SWAT »

What is different ARM7TDMI and ARM7DI? T and M extensions? What is?
Image
Ayla
DC Developer
DC Developer
Posts: 142
Joined: Thu Apr 03, 2008 7:01 am
Has thanked: 0
Been thanked: 4 times
Contact:

Re: Dreamcast Media Center

Post by Ayla »

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 thanked: 1 time
Been thanked: 0
Contact:

Re: Dreamcast Media Center

Post by SWAT »

Thanks!
How can I replace these instructions? Specifically SMLAL and STRH?
Image
Ayla
DC Developer
DC Developer
Posts: 142
Joined: Thu Apr 03, 2008 7:01 am
Has thanked: 0
Been thanked: 4 times
Contact:

Re: Dreamcast Media Center

Post by Ayla »

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: 576
Joined: Fri Jun 18, 2010 9:29 pm
Has thanked: 0
Been thanked: 5 times

Re: Dreamcast Media Center

Post by PH3NOM »

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
DC Developer
DC Developer
Posts: 142
Joined: Thu Apr 03, 2008 7:01 am
Has thanked: 0
Been thanked: 4 times
Contact:

Re: Dreamcast Media Center

Post by Ayla »

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 thanked: 1 time
Been thanked: 0
Contact:

Re: Dreamcast Media Center

Post by SWAT »

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
DC Developer
DC Developer
Posts: 142
Joined: Thu Apr 03, 2008 7:01 am
Has thanked: 0
Been thanked: 4 times
Contact:

Re: Dreamcast Media Center

Post by Ayla »

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 thanked: 0
Been thanked: 2 times

Re: Dreamcast Media Center

Post by Chilly Willy »

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: 576
Joined: Fri Jun 18, 2010 9:29 pm
Has thanked: 0
Been thanked: 5 times

Re: Dreamcast Media Center

Post by PH3NOM »

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 thanked: 0
Been thanked: 2 times

Re: Dreamcast Media Center

Post by Chilly Willy »

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: 576
Joined: Fri Jun 18, 2010 9:29 pm
Has thanked: 0
Been thanked: 5 times

Re: Dreamcast Media Center

Post by PH3NOM »

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: 576
Joined: Fri Jun 18, 2010 9:29 pm
Has thanked: 0
Been thanked: 5 times

Re: Dreamcast Media Center

Post by PH3NOM »

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: 200
Joined: Wed Apr 09, 2008 9:04 am
Has thanked: 13 times
Been thanked: 0
Contact:

Re: Dreamcast Media Center

Post by Basil »

Wow, thanks man. What about custom skins and fonts support ? ... and 50hz support.
User avatar
T_chan
DC Developer
DC Developer
Posts: 32
Joined: Mon Aug 22, 2011 12:45 pm
Has thanked: 12 times
Been thanked: 22 times

Re: Dreamcast Media Center

Post by T_chan »

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: 5652
Joined: Mon May 27, 2002 11:31 am
Location: Sailing the Skies of Arcadia
Has thanked: 9 times
Been thanked: 69 times
Contact:

Re: Dreamcast Media Center

Post by BlueCrab »

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 thanked: 0
Been thanked: 0

Re: Dreamcast Media Center

Post by Indiket »

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 thanked: 0
Been thanked: 0

Re: Dreamcast Media Center

Post by Darksidehearts »

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: 200
Joined: Wed Apr 09, 2008 9:04 am
Has thanked: 13 times
Been thanked: 0
Contact:

Re: Dreamcast Media Center

Post by Basil »

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