Tuesday, November 13, 2007

Media Engine progress

Over the weekend I described my plans for getting audio list processing working on the PSP's Media Engine. I'm making some decent progress so far. I've got Daedalus loading a kernel mode PRX to handle the ME nitty gritty, and I've managed to execute some test code on the ME successfully.

I've spent some time reviewing the audio code, trying to figure out if any bits are particularly amenable to running asynchronously, and trying to figure out if there is anything that is going to cause any problems when running this code on the ME. Fortunately it looks like all of Azimer's audio code is very straightforward C so there should be no problems getting it running on the ME once the synchronisation issues are dealt with. I've also realised that alongside the audio list processing there is also some expensive 44kHz upsampling code which will run very nicely on the ME too.

I have the feeling that debugging code on the ME is going to be particularly painful, so I want to try and catch as many of the obvious synchronisation bugs as early as possible. This evening I've started writing a job manager to 'simulate' executing code on the ME. The manager simply creates a thread which sits and waits for jobs to come in, mimicing the behaviour of the mediaengineprx. Once I've got the audio list processing running correctly through the job manager, I can easily switch things over to get these jobs running on the ME in parallel to the main core. That's the plan, anyway :)

-StrmnNrmn

23 comments:

Morgan said...

That's good to see your making progress, I posted this update on DCEMU so expect more reads. I'm happy to see you updating frequently feels good to know your hard at work on Daedalus. Hope you read my ideas from earlier, not just the thumbnail one.

Adam said...

What exactly is the media engine? Is it like another processor in the psp?

max said...

Great to hear Strmnnrmn! Hey I have a suggestion for a simple but very useful feature for R14 which many people would definitely like:

A reset feature in the menu for the rom! This would really help for games that have freezing problems, we can just reset and change our settings. Also, this will help even more now with the save states, because sometimes I have a save state thats not as far as my regular n64 save so I'd like to reset the game, and make a new save on the more recent progress, just as an example. Still this would be a very simple feature for someone of your talents to implement and a nice addon for r14.

I hope you'll comment and let me know if you'll consider this for r14 :).

~Max Stein

Ice said...

"What exactly is the media engine? Is it like another processor in the psp?"

Umm, I /THINK/ that it is a sound chip, but it still uses the main cpu for processing.. i think. You can find psp specs and unless it has a second 333mhz chip in there just for the ME then i think it is using the main cpu for the ME.

lajaj said...

Strmnnrmn, You should really think about starting a team, they'll help you with all the programming, instead of you doing it all by yourself.

Ice said...

"Strmnnrmn, You should really think about starting a team, they'll help you with all the programming, instead of you doing it all by yourself."

it's already open source so people can always submit code to him and what not, so in a sense there already is a team, a very large team! ;)

Jody said...

audio list processing?? what is this about, now?

KemenAran said...

It's great to see this project making progress — and if you can, please give us some technical details when you'll be done with synchronization :)

Nico said...

9 posts so far on November!

It's so cool to know about your progress! Your hard work is really appreciated!

Raziel-chan said...
This comment has been removed by the author.
Raziel-chan said...

@Adam/@ice: Media Engine is basically a second R4k-based MIPS processor, similar and running at the same speed as the main CPU, only lacking it's single vfpu (vector floating point unit).

cya
Raziel-chan

Grant said...

Although i don't understand a lot of what your saying i do try to read it all, I guess thats all you could ask for :P Well apart from gold and jewels. I get the gist of it and it sounds like you have got it all under control.
For one person you sure do work hard and i appreciate all the work you put into making everyones lives just that bit more cooler.

Mattias said...

it sounds fantastic strmn!! hopefully the work with the ME will continue to work well.

thanx for updating this blog as often as you do. there are a lot of fans out there who apreciate it :D

I love your work said...

You are the best

Zelda run pretty good on r13 so I think if you can put the sound without problem on speed it will be very playable.On r13 i was in Guba Guba the fish for find the princess ruto but i have make a savestate and the games as crash and when I charged the save it crash too.Snif.

I have a question witch one from the 1.50 or 3.xx is the better?Or will it be the same ?

Sorry for my english

Ps:I now i'am late but...
My psp is a 3.52m33-4 Fat 1004
(jaimehackermapsp)

I love your work said...

Another question

Can we export save from a n64 emulator for PC to yours?
Savestate or Saves??

Danny said...

@Strmnmrnm

Hi just thought of a really nice feature for R14.

Please would you add the option to be able to play the audio synced or unsynced?

That is something that i think would be great , especially for games with lower fps (so background music etc plays smoothly still)

Thanks strmn!

Kdo4971 said...

You always wonder about how testing your code. That's pretty neat. Many beginner developper will simply "look if that's working" adn add quick breakpoints afterwards. You seem to have a much better planned strategy for that...

Jody said...

With "Tony Hawk's Proskater 2", the music/sounds will play smoothly at a really low fps. So is this new R14 planned feature going to have this for all games??

Glance said...

I remember when Yoyo first started using ME for SnesTYL. I will email him and get some ideas or docs from him if that would help. Strmnnrm keep up the good work and enjoy yourself as well. Thank you for your hard work. Most ppl are not even able to grasp the difficulty of what you have to do to code an emulator.

Donation on its way...

Joseph said...

hey man
Any chance in r14 (if you have time) could you maybe fix up the sprite alignment of the characters in mario kart 64 with texture update check enabled as currently you end up with a black area around the character while turning corners.
(if its not 2 much work of course)

Astanax said...

I think it will be really awesome to see what other HB projects spring up out of all of this major progress related to Media Engine code.

I really really have enjoyed daedalus, and it just keeps getting better!

great work!!

no said...

could u please make screenshots save ln the psp/photo folder so i can c them and delete them

Gerald Vonberger said...

So are you using this media engine for game programming or audio visual display? I agree with you though, debugging this particular platform must be painful. Good luck on your project! If you have issues, I'm sure there are several other media engines you could use. http://www.spiritdsp.com/products/voice-video-engine/