Q for the DSNES team

Anything DreamSNES-related can be asked in this forum, such as general questions about the emulator, how to burn it, etc.
404NotFound
DCEmu Ex-Mod
DCEmu Ex-Mod
Posts: 4970
https://www.artistsworkshop.eu/meble-kuchenne-na-wymiar-warszawa-gdzie-zamowic/
Joined: Thu Nov 29, 2001 3:40 pm
Location: The Canadian-Mexican border.
Has thanked: 0
Been thanked: 0

Q for the DSNES team

Post by 404NotFound »

I was looking through the SNES9x code and from waht i can tell it uses Op Code inturpertation to emulate the CPU... as far as i can tell (from reading emlation docs) it's a lot faster, and takes much less overheard to do Binary Translation (commonly refered to as Dynamic Compilation)

The question is, i know you are all very smart coders and if this was possible would have probably already done it, so is this not usable with the SNES?
Grendel
DCEmu Newbie
DCEmu Newbie
Posts: 3
Joined: Tue Aug 20, 2002 11:31 am
Has thanked: 0
Been thanked: 0

Post by Grendel »

Stop racking your brain and go buy an X-box :D
If you think I'm lying, your probably correct.
-Grendel

"Next time theres a revolution, grt up earlier!"
-Ivan Pavlov
mrinsulto
Psychotic DCEmu
Psychotic DCEmu
Posts: 518
Joined: Sat Nov 24, 2001 10:26 am
Has thanked: 0
Been thanked: 0

Post by mrinsulto »

try not to push the xbox till a no solder is released.

404, it is very interesting about that. i am sure if it was possible, they would o done it.
dj372
DCEmu Newbie
DCEmu Newbie
Posts: 2
Joined: Tue Aug 20, 2002 3:54 pm
Has thanked: 0
Been thanked: 0

Xbox vx Dreamcast

Post by dj372 »

Hmmm....

Xbox: $200 with one controller

Dreamcast: $30 with two controllers, memory card and a couple games off ebay.

I'll stick to my dreamcast, I'm sure snes emulation will be at 100% speed soon enough.
reaper2k2
DC Developer
DC Developer
Posts: 2648
Joined: Sun Mar 24, 2002 7:48 pm
Has thanked: 0
Been thanked: 0
Contact:

yeah

Post by reaper2k2 »

Well i was looking at that one time to 404 but you can never asume any ones done it to dreamsnes yet i like to know as well very good ? 404
http://homebrew.dcemulation.com/dcgames/ *homebrew webbrowser games *

http://r2k2gate.topcities.com *dev site and my releases*
Image
Im' a Commodorian are you?
404NotFound
DCEmu Ex-Mod
DCEmu Ex-Mod
Posts: 4970
Joined: Thu Nov 29, 2001 3:40 pm
Location: The Canadian-Mexican border.
Has thanked: 0
Been thanked: 0

Re: yeah

Post by 404NotFound »

reaper2k2 wrote:Well i was looking at that one time to 404 but you can never asume any ones done it to dreamsnes yet i like to know as well very good ? 404
that's more confusing than engrish...
Captain Tokyo
Psychotic DCEmu
Psychotic DCEmu
Posts: 568
Joined: Sat Mar 09, 2002 3:38 am
Location: UK
Has thanked: 0
Been thanked: 0
Contact:

Re: yeah

Post by Captain Tokyo »

404NotFound wrote:
reaper2k2 wrote:Well i was looking at that one time to 404 but you can never asume any ones done it to dreamsnes yet i like to know as well very good ? 404
that's more confusing than engrish...
LMAO
http://www.engrish.com 0wnz

I like the knife one that says, WARNING keep out of children... O_O
404NotFound
DCEmu Ex-Mod
DCEmu Ex-Mod
Posts: 4970
Joined: Thu Nov 29, 2001 3:40 pm
Location: The Canadian-Mexican border.
Has thanked: 0
Been thanked: 0

Post by 404NotFound »

ok i did some more research to day (about 10 pages worth in a huge 180Pg emu doc i found) and it seems that binary translation works by translating blocks of code from source CPU to target CPU.

when PCSXDC goes public i may be able to study how it outputs to the dreamcast and i may attempt to write a binary translator for the SNES cpu and put it into the Sintendo code.

From what i read it would give a 10x increase in speed over a normal opcode interpreter, of course SNES9x also uses macros to inporve speed.


From what i read CPU Optimizations (like loop detection) seem to hint toward DreamSNES using binary translation, but if it doesn't it would be a very good step... but i don't see where they would look over such a thing so it may not be practical for a CPU so slow.
Lyris
Respected Artist
Respected Artist
Posts: 503
Joined: Fri Mar 15, 2002 7:29 am
Has thanked: 0
Been thanked: 0

Post by Lyris »

I have a Dreamcast and an [unmodded] Xbox. OK, and a Saturn.

No prizes for what has the far better games between the two most recent consoles.

(HINT... it's from Japan, it's logo was a swirl, and it deserved better)
Ex-Cyber
DCEmu User with No Life
DCEmu User with No Life
Posts: 3641
Joined: Sat Feb 16, 2002 1:55 pm
Has thanked: 0
Been thanked: 0

Post by Ex-Cyber »

The performance benefits of dynamic translation vary with two major variables:

1) The size/complexity of the emulated instruction set, as it relates to decoding individual instructions: bigger and more complex instruction sets require multiple interpretation stages (often going through two or more jump tables to decode a single instruction), while simpler ones can be implemented with fewer stages.

2) The clock speed of the emulated processor: the faster a processor is clocked, the more time is saved by only performing the interpretation once (during the translation stage).

Thus, I seriously doubt that the performance gain possible by using dynamic binary translation for SNES (which is clocked at 2.68 or 3.58MHz and uses a relatively small instruction set) would be anywhere near that seen by similar efforts for PSX (which is clocked at about 33MHz and uses a large instruction set). Still, I think it's a legitimate question; hopefully the DreamSNES guys would know more about the associated timing issues that DBT might bring up...
sqrt(-1)+1
DCEmu Freak
DCEmu Freak
Posts: 78
Joined: Wed Oct 17, 2001 7:44 pm
Has thanked: 0
Been thanked: 0

Post by sqrt(-1)+1 »

The speedup would be substansial, but unfortunately most games would stop running. You can not do a JIT or other code transformations on old computers/consoles since they use the actual instruction timing as an integral part of the programming technicue.
BlackAura
DC Developer
DC Developer
Posts: 9951
Joined: Sun Dec 30, 2001 9:02 am
Has thanked: 0
Been thanked: 1 time

Post by BlackAura »

Maybe not on the main CPU, but what about the sound CPU? That doesn't (as far as I know) use exact opcode timing to function properly.
nakamichi
DCEmu Super Poster
DCEmu Super Poster
Posts: 1205
Joined: Wed Oct 17, 2001 7:44 pm
Location: The Land of the Rising Umeboshi
Has thanked: 0
Been thanked: 0

Post by nakamichi »

The sound emulation is really a big sucker of processing power.It almost takes 25% of the CPU power.If something is done with the SPC700 emulation to run faster,it will greatly speed up DreamSNES.Imagine DreamSNES running with STEREO sound nearly the same speed as it runs with muted sound now.It will be a significant speed improvement.
2 things are need to be done:

1. Make the sound emulation(SPC700 and the S-DSP chip) use the DC sound hardware effectively.In MAME it significantly speeded up the emulation.

2. Use the dynamic translation for even more speed gain.

And,finally,make use of the Power VR chip handle everything that is possible for it to process,so part of the CPU strain goes to the DC's Power VR.It can handle the FX/FX2 chip,C4 chip,mode 7 graphics? and other special chip processing.

And better CPU optimizations to further reduce CPU strain.

I think it's very,very possible to have 100% speed without frameskipping on most SNES games not using special chips.
404NotFound
DCEmu Ex-Mod
DCEmu Ex-Mod
Posts: 4970
Joined: Thu Nov 29, 2001 3:40 pm
Location: The Canadian-Mexican border.
Has thanked: 0
Been thanked: 0

Post by 404NotFound »

i remember awhlie ago them saying that the ARM is just way to slow to run the sound emulation.
nakamichi
DCEmu Super Poster
DCEmu Super Poster
Posts: 1205
Joined: Wed Oct 17, 2001 7:44 pm
Location: The Land of the Rising Umeboshi
Has thanked: 0
Been thanked: 0

Post by nakamichi »

Hmmm...what about rewriting the SPC700 and S-DSP cores into ASM and the ARM handles just the S-DSP emulation?
Veggita2099
Janitor 2nd Class
Janitor 2nd Class
Posts: 9018
Joined: Wed Oct 17, 2001 7:44 pm
Location: Chesapeake, Ohio
Has thanked: 0
Been thanked: 0

Re: Xbox vx Dreamcast

Post by Veggita2099 »

dj372 wrote:Hmmm....

Xbox: $200 with one controller

Dreamcast: $30 with two controllers, memory card and a couple games off ebay.

I'll stick to my dreamcast, I'm sure snes emulation will be at 100% speed soon enough.
You forgot

Xbox - Requires a pain in the ass to install chip

Dreamcast - Requires nothing

I don't think a dreamcast is that cheap with all that stuff. On average a Dreamcast is about 50 bucks with what you have listed. But still MUCH cheaper then X-box though.
Wii number: 1227 6854 1080 3665
reaper2k2
DC Developer
DC Developer
Posts: 2648
Joined: Sun Mar 24, 2002 7:48 pm
Has thanked: 0
Been thanked: 0
Contact:

really that was funny was it it

Post by reaper2k2 »

i KNOW the anwser it will have next to no effect and the how i know and all that i dont need to say as one of the dreamsnes ppl will say it ...........very soon
http://homebrew.dcemulation.com/dcgames/ *homebrew webbrowser games *

http://r2k2gate.topcities.com *dev site and my releases*
Image
Im' a Commodorian are you?
BlackAura
DC Developer
DC Developer
Posts: 9951
Joined: Sun Dec 30, 2001 9:02 am
Has thanked: 0
Been thanked: 1 time

Post by BlackAura »

How fast is the ARM CPU anyway? I thought it was 30-40MHz, which should be enough to do at least some of the sound emulation. As nakamichi said, doing this would releive a major strain on the SH-4, leaving it free to emulate the main CPU and other SNES hardware. If the ARM is just sitting there playing PCM wave sound generated by the SH-4 then it's being wasted.

Of course, I don't know how DreamSNES works, so it might do all this anyway.
perh
DreamSNES Creator
DreamSNES Creator
Posts: 57
Joined: Sun Feb 24, 2002 8:04 pm
Has thanked: 0
Been thanked: 0

Post by perh »

Hi there reaper.

It's the actual DSP code that takes the CPU, not the sound-CPU emulation.
reaper2k2
DC Developer
DC Developer
Posts: 2648
Joined: Sun Mar 24, 2002 7:48 pm
Has thanked: 0
Been thanked: 0
Contact:

hey

Post by reaper2k2 »

HI perh thanks for clearing that up :)
http://homebrew.dcemulation.com/dcgames/ *homebrew webbrowser games *

http://r2k2gate.topcities.com *dev site and my releases*
Image
Im' a Commodorian are you?
Post Reply