Emulator Development Talk


1magus

Member
Joined
Jun 29, 2007
Messages
462
What does DSP and NEON mean?
Will sound emulation get any better on emulators built for Pandora? Cause PSP emulators suck!
 
DSP = Digital Signal Processing, I believe. From what I understand, it has to do with audio in this sense. I'd imagine a DSP routine is something which interprets the sound into real sound signals? Don't quote me though.

NEON is an advanced Single Instruction, Multiple Data (SIMD) extension on ARM architectures. What this means (roughly) is that with one "tick" of the processor, it can perform an operation on multiple pieces of data.

I'm not sure about the emulator question, but I can sympathise with you on the SNES sound corruption. If I play F-Zero on ZSNES, I'm just so disappointed I can't even play for long. It can't keep up with the sextuplets in the opening theme, nor can it handle the other music very well, and the worst part is the noise when you recharge sounds NOTHING like the original. <rant> People -need- to spend more time on sound emulation and stop passing it off as unimportant. If it doesn't sound like I stuck an SNES sound chip in my computer, it's not done. It makes me wonder if these people are fucking deaf, or those kind of people who turn OTHER MUSIC ON while they play video games. I had a friend (no longer a friend, no relation to this issue) that would complain INCESSANTLY when I would play old video games with the sound on. These kinds of people need to GTFO, in my opinion. </rant>

EDIT: Okay, so... what's the deal, grasshoppir? I don't see many other threads started by him, at the top anyway, wtf? And the XXX obviously meant "insert word here." I'm pretty sure everyone knows what it means out of context. And to the OP, why'd you edit out your post? Now I look like someone who needs mental help for talking to themselves :/

EDIT2: OFFICIAL STATEMENT: this board is now a Wiki

EDIT3: struck out blatant asshattery
 
I've actually been working on a newcomers' glossary (I wasn't going to mention it until there were Pandoras out there and perhaps a place for questions from those unfamiliar with things, but I guess now's as good a time as any :p ), so I'll see if I can field this one without too much complication.

NEON is the name given to an instruction set which can be used to accelerate various media (if you look it up on Wikipedia, you'll find an example given about MP3 files which may give you the gist of what it does).

DSP is short for Digital Signal Processor - this is a dedicated processor intended for tasks such as decoding video or audio without impacting the CPU.

I'm afraid I haven't heard anyone using the terms "hard port" and "soft port", though - are you sure that they weren't just using hard in its sense as a synonym for difficult?

EDIT: Gragh, ninja'd yet again. :ph34r:
 
Prometheus said:
I've actually been working on a newcomers' glossary (I wasn't going to mention it until there were Pandoras out there and perhaps a place for questions from those unfamiliar with things, but I guess now's as good a time as any :p ), so I'll see if I can field this one without too much complication.

NEON is the name given to an instruction set which can be used to accelerate various media (if you look it up on Wikipedia, you'll find an example given about MP3 files which may give you the gist of what it does).

DSP is short for Digital Signal Processor - this is a dedicated processor intended for tasks such as decoding video or audio without impacting the CPU.

I'm afraid I haven't heard anyone using the terms "hard port" and "soft port", though - are you sure that they weren't just using hard in its sense as a synonym for difficult?

EDIT: Gragh, ninja'd yet again. :ph34r:
I thought hard and soft port meant one that is written completely differently for the new hardware in question like the Pandora and one that simply takes code optimized for another piece of hardware like the GP2X and gets it to run on the Pandora.
 
Last edited by a moderator:
Emulation has grown somewhat in the last 10 - 15 years. Complexity of hardware and the amazing leaps in CPU speeds have meant that new techniques are needed, and new hardware is to be taken advantage of in order to emulate systems that most consider "retro" these days.

Originally, all you needed to do was to take the list of instructions that made a game, and interpret them - i.e, for each say, z80 instruction you'd look up in a table of routines which handled the work that instruction would do, and execute that code. The results would then be stored in a virtual memory store, and at the end of say, a 50th of a second's worth of z80 instructions you'd decode information held in the screen memory and pipe sound info out to your soundcard. Thus, you'd get a representation of the original software on your PC.

Problem is, that to emulate in this way you need a very variable amount of X86 (or whatever your host processor is) instructions to do the job. A simple instruction to store a value in memory might map to the host 1:1, but a more complex math instruction might take 30 or more host instructions to do. Add in other effects like flag registers, and you might be lucky to get away with a 1:7 mapping, and if you're not coding in assembly language (the native language of the host CPU) then you're possibly adding even more. The requirements start to shoot up from there - most systems had more than one processor or device that needed to be emulated, such as a sound chip or a floppy drive controller. Before you know it, a 3mhz system requires around 200 or more mhz to emulate accurately.

Newer systems are really much, much harder to emulate at any speed. Your GP2X could, in theory, emulate an N64 but using the above system it would be very, very slow and basically unusable. So you need new tactics, which is where people like hlide, exophase and ari64 come in. Instead of emulate the chosen system one instruction at a time, you take advantage of the behaviours it exhibits - sequentially executing instructions one after another to achieve a result. If you can analyse a block of code and determine what the outcome should be, you could re-code that block in native code which would, in theory, execute just as fast (if not faster) than the original did. The problem then is the analysis, and how fast you can do it - but once done, in 99% of cases you can just forget about it and re-use it every time the emulated system wants to do that particular job. Problems arise when the emulated system changes its own code (self modifying) but that can be worked around. Synchronisation can be a real headache, too, especially when you have many, many cpus to analyse the behaviour of.

But it's quite handy that most host systems also have many CPUs themselves. DSPs (Digital Signal Processors) can take the load off the host CPU for common tasks like sound processing or graphics processing. NEON is one of these, at a basic level - it, when used carefully, can perform operations while the host CPU goes off and does something else. All this adds up to getting your N64 emulator running at full speed on pretty modest hardware, where the old interpretive emulation would require a multi-ghz CPU to get Mario64 running. It's far more complex than the old method, but the results are worth it.

Finally, you can take the "analyse and compile" method (dynamic recompilation) to it's logical conclusion and recompile the entire game as native code. This is is generally considered impossible for all cases - that's not to say it's not been done - and due to the nature of the "halting problem" (google that one, it's a nifty little thought-experiment) it almost certainly is impossible, if not unbelievably hard to do for a complex system like a PSX or N64 or Dreamcast.

HTH.

D.
 
AquaAnalogue said:
<rant> People -need- to spend more time on sound emulation and stop passing it off as unimportant. If it doesn't sound like I stuck an SNES sound chip in my computer, it's not done. It makes me wonder if these people are fucking deaf, or those kind of people who turn OTHER MUSIC ON while they play video games. I had a friend (no longer a friend, no relation to this issue) that would complain INCESSANTLY when I would play old video games with the sound on. These kinds of people need to GTFO, in my opinion. </rant>

And you need to spend less time using an old SNES emulator that has been superseded in the accuracy department by lots of others. BSNES and SNES9x in particular have "bit perfect" audio generation.

Nonetheless, just because an emulator wasn't perfect in some regard doesn't mean that its authors considered it acceptable and deliberately chose to not improve it. Least of all is anyone considering sound emulation "unimportant." Getting these things right takes an overwhelming amount of skill and research and someone who lacks a detailed understanding of this should not comment, least of all criticize.
 
Last edited by a moderator:
I believe that if you hear someone talking about a "hard port", they most likely mean that it will be difficult to port it, as opposed to an easy port.

NEON and the DSP are both facilities that the processor that runs in the Pandora provides to do certain computations more efficiently, particularly things like image, sound and 3D processing. If you want the technical details, NEON is an SIMD instruction set, while DSP stands for digital signal processor, the specific type the Pandora has being an C64x+.

Compilers are currently bad at automatically taking advantage of NEON, and can't use the DSP by themselves at all, so programmers have to do some manual work to take advantage of it. It doesn't work for all kinds of problems, but when it does, it can provide a nice speed-up.
 
Exophase said:
And you need to spend less time using an old SNES emulator that has been superseded in the accuracy department by lots of others. BSNES and SNES9x in particular have "bit perfect" audio generation.

Nonetheless, just because an emulator wasn't perfect in some regard doesn't mean that its authors considered it acceptable and deliberately chose to not improve it. Least of all is anyone considering sound emulation "unimportant." Getting these things right takes an overwhelming amount of skill and research and someone who lacks a detailed understanding of this should not comment, least of all criticize.

Ah, well, I was told ZSNES was the best :/ I guess i'll have to figure out how to install bsnes on Ubuntu.

Sorry if I offended you. Wow, my wording was really really harsh, wasn't it? It's just that I asked the ZSNES people one time about F-Zero, and the response I got was, essentially, there are more important things to worry about than getting sound to work perfectly, go bother someone else.

It's not my intention in the least to offend anybody here. I appreciate the research and skill involved in making a good emulator or any program in general. Sorry.
 
Last edited by a moderator:
Exophase said:
AquaAnalogue said:
<rant> People -need- to spend more time on sound emulation and stop passing it off as unimportant. If it doesn't sound like I stuck an SNES sound chip in my computer, it's not done. It makes me wonder if these people are fucking deaf, or those kind of people who turn OTHER MUSIC ON while they play video games. I had a friend (no longer a friend, no relation to this issue) that would complain INCESSANTLY when I would play old video games with the sound on. These kinds of people need to GTFO, in my opinion. </rant>

And you need to spend less time using an old SNES emulator that has been superseded in the accuracy department by lots of others. BSNES and SNES9x in particular have "bit perfect" audio generation.

Nonetheless, just because an emulator wasn't perfect in some regard doesn't mean that its authors considered it acceptable and deliberately chose to not improve it. Least of all is anyone considering sound emulation "unimportant." Getting these things right takes an overwhelming amount of skill and research and someone who lacks a detailed understanding of this should not comment, least of all criticize.
So what would be the verdict on "bit perfect" emulation for Pandora?
 
Last edited by a moderator:
Exophase said:
BSNES and SNES9x in particular have "bit perfect" audio generation.
The sound still won't be genuine until you run it through a "cruddy old TV speakers" filter. :)
 
Last edited by a moderator:
Multiplex said:
The sound still won't be genuine until you run it through a "cruddy old TV speakers" filter. :)

Bit perfect just means the digital part of course, I don't think anyone is trying to model the analog circuitry and then who knows what the emulating machine would do afterwards.. it's probably better this way.

But to be totally fair, your bad old TV speakers is not part of the SNES, just your particular experience ;)

TylerAW said:
So what would be the verdict on "bit perfect" emulation for Pandora?

Poor. Pandora isn't fast enough to start using mainline SNES9x, much less bsnes. I wouldn't lose a lot of sleep over it until you find you have specific audio complaints.
 
Last edited by a moderator:
AquaAnalogue said:
Sorry if I offended you. Wow, my wording was really really harsh, wasn't it? It's just that I asked the ZSNES people one time about F-Zero, and the response I got was, essentially, there are more important things to worry about than getting sound to work perfectly, go bother someone else.

Yea. What a bunch of b*stards. If only they realized how much you had personally contributed to the emulation scene in general, then maybe they'd realize how important your opinion was...
 
Last edited by a moderator:
Multiplex said:
The sound still won't be genuine until you run it through a "cruddy old TV speakers" filter. :)

Haha, I would always sneak behind the entertainment centre and re-plug the cables so that the SNES was routed through my dad's expensive speaker system :p
 
Last edited by a moderator:
Exophase said:
Multiplex said:
The sound still won't be genuine until you run it through a "cruddy old TV speakers" filter. :)

Bit perfect just means the digital part of course, I don't think anyone is trying to model the analog circuitry and then who knows what the emulating machine would do afterwards.. it's probably better this way.

But to be totally fair, your bad old TV speakers is not part of the SNES, just your particular experience ;)

TylerAW said:
So what would be the verdict on "bit perfect" emulation for Pandora?

Poor. Pandora isn't fast enough to start using mainline SNES9x, much less bsnes. I wouldn't lose a lot of sleep over it until you find you have specific audio complaints.
Well I know the PSP emulator runs on different code but lets just say it crackles a lot, and headphones or no you can tell something is not right. Sooo if I contribute enough donation money will you fix all the problems to ensure PandaSNES does not crackle lol?
 
Last edited by a moderator:
Pleng said:
Yea. What a bunch of b*stards. If only they realized how much you had personally contributed to the emulation scene in general, then maybe they'd realize how important your opinion was...

*sigh* now this isn't cool. I already apologised. And any good software development team knows one of the greatest resources is feedback. If this weren't the case, then why do people beta test, ever? I'm sure none of Google's millions (see, I can italicise too) of beta testers have ever contributed to their various projects in any way. Feedback is contribution, wouldn't you agree?
 
Last edited by a moderator:
Multiplex said:
The sound still won't be genuine until you run it through a "cruddy old TV speakers" filter. :)
This is also why people that insist on running the graphics at their "native" resolution, without any of the smoothing filters bother me. Only when they claim to be going for the "original" experience, of course. Unless you're passing it through a "cruddy DAC TV scalar" filter, it won't look like it did on your TV. :p
 
Last edited by a moderator:
WizardStan said:
Unless you're passing it through a "cruddy DAC TV scalar" filter, it won't look like it did on your TV. :p

I actually use the filter that makes the screen dim and shaky like an old old TV.. haha. And if that isn't available... scanlines ftw!
 
Last edited by a moderator:
Back
Top