PDA

View Full Version : SNES4ALL Alpha-Two released !



chui
March 17th, 2006, 01:19
Second alpha release of SNES4ALL (SuperNintendo emulator for Dreamcast):

- SPEED UP !!!
- Operative Menu: Throttle/Frameskip/Transperency/Sound...
- Fixed controls, 4 joysticks emulated.

For 'Super Mario World' game, the speed is between frameskip 0-1 without sound and 1-2 with sound.


Download at SNES4ALL site (http://chui.dcemu.co.uk/snes4all.html).

obelisk
March 17th, 2006, 02:00
Let me be the first to say thank you to you and your wonderful team, your dedication and devotion to the dreamcast and to coding are astounding, and quite remakrable. You guys continue to surprise and entertain me all the time. if you guys like, re-did frodo for dc, and put your menu thing and gui in it... wooooey that would rock.

Cap'n 1time
March 17th, 2006, 04:31
wow... makes me wish i had a dc still. Id be interested to know just how big of a speed up were seeing here.

NixMix
March 17th, 2006, 08:43
Thank you so much! I'll try it this weekend.

:)

chui
March 17th, 2006, 10:09
wow... makes me wish i had a dc still. Id be interested to know just how big of a speed up were seeing here.

I do not know who is Id, but i suppose that he works in Snes9x porting (PSP?).

SNES4ALL is at the beginning and i do not know that optimizations will have at future, but i think that i need to do:

- Locate bottlenecks: It must be the first task for knowing the weight of each emulation part. The best method is to build a profiler.

- Throttle methods: Sometimes is not necessary all emulation parts for a lot of games or it is possible to ampler cpu timeslices. For example, UAE4ALL has the possibility of not paint/process overscan horizontal traces and duplicate CPU timeslices per group events.

- Always CPP as C: GNU/G++ compiler generates better code that GNU/GCC.

- Assembler: After locate bottlenecks is possible to convert bit parts of code to assembler. Be carefully, to do bad assembler code is easy and typical, good C code is better that bad assembler code.

- Use hardware: It is important to know the hardware accelerations of target machine, for example store queue for Dreamcast. This is not easy, many hardware accelerations would not speed up for bad use or bad concept, for example convert 2D tiles to 3D textures is more pretty, but it is necessary to use cache of tile/textures for speed up: to convert all tiles to textures per frame sometimes is more slow.


Also for fast coding, multi-platform is very important because a lot of task are possible to do for Windows or GNU/Linux. For example: try and test throttle methods.

chui
March 17th, 2006, 10:44
Let me be the first to say thank you to you and your wonderful team, your dedication and devotion to the dreamcast and to coding are astounding, and quite remakrable. You guys continue to surprise and entertain me all the time. if you guys like, re-did frodo for dc, and put your menu thing and gui in it... wooooey that would rock.


It is not probable that i open new projects at near future, frodo is a good project, but now i prefer SuperNintendo, MAME, ZX-Spectrum and Playstation .. i need 1 or 2 years for these.

But if after these new projects, there are not a decent emulators for Genesis/Megadrive and PcEngine/TurboGFX, i will try to do it.

Cap'n 1time
March 17th, 2006, 13:51
I do not know who is Id, but i suppose that he works in Snes9x porting (PSP?).


haha. Id = I'd / I would
as in Id like to have an excuse for my bad english... but it is my first language. :p

chui
March 17th, 2006, 14:38
haha. Id = I'd / I would
as in Id like to have an excuse for my bad english... but it is my first language. :p

:D Im stupiz :D

GromberX
March 17th, 2006, 17:54
http://www.imagexoom.com/uploads/snes4all.gif

Saludetes Chui!!

Logo del amigo Plinko

soccerboi
March 17th, 2006, 22:07
Can someone help me burning this? I went to Chui's page, and clicked the link with tutorials to make something selfboot, but I couldn't find anything that would make a 1st_read.bin selfboot. I'm a noob with homebrew :)

Thanks

RockinB
March 18th, 2006, 09:38
@Chui:
Have you managed to compile and use the sh asm cpu cores located in snes9x/sh/? I'm currently trying to, but there are two things:
- unknown reference to reportf
- S9xOpcodeE1 is missing in sh ams core, it seems to be introduced with ver. 1.43 and used per default
I would really like to use it on Saturn, but my sh asm knowledge is almost zero, have you got a clue?

benoitlol
March 18th, 2006, 10:59
Hi!
That's very impressive for an alpha version! Nice result with Super Mario Word!! Besides, some "small" games like Super Smash Tv run great ! (almost full speed with sound) That's very exciting !! :)
Smash Tennis looks very good ! (problem in menu but during the game it's like the real snes !! omg)

When U choose a game and you press A, the cursor will be on "select rom". Then, you need to go down and select "reset" (or "run") to launch the game.

little suggestion: would it be possible to put the cursor on "reset" or "run" after choosing a game with A button? (it would be easier to use when u want to change game)

Besides, I think it could be great that if U press "start" on a game in the select-rom menu, it will launch the rom whithout seeing the menu which allows to change parameters and reset game and if you press "A" on a rom, you see this menu (like snes4all is now) but the cursor will be already on "reset" instead of "select rom".
(I hope someone understood my explanations lol)

Nice work, like usual, keep up the great work :)

soccerboi
March 18th, 2006, 18:54
I got it working, and wow is it impressive! Can't wait for the next release.

Here's a selfboot CDI file I made:
http://www.sendspace.com/file/9ot3p1

chui
March 18th, 2006, 20:15
@Chui:
Have you managed to compile and use the sh asm cpu cores located in snes9x/sh/? I'm currently trying to, but there are two things:
- unknown reference to reportf
- S9xOpcodeE1 is missing in sh ams core, it seems to be introduced with ver. 1.43 and used per default
I would really like to use it on Saturn, but my sh asm knowledge is almost zero, have you got a clue?

Fox68k and me were reading the snes9x/sh/? code, and we think that it is a bad code, it is a simple translation of snes9x/i386/? to SH assembler; this method is a bad one.

Also, i can not run a game with snes9x/sh/? code, i have compiled it and have linked it with SNES4ALL, but supernintendo games not run. When i can run it, then i will post my profiling results.

gxb
March 19th, 2006, 08:48
Fox68k and me were reading the snes9x/sh/? code, and we think that it is a bad code, it is a simple translation of snes9x/i386/? to SH assembler; this method is a bad one.

Also, i can not run a game with snes9x/sh/? code, i have compiled it and have linked it with SNES4ALL, but supernintendo games not run. When i can run it, then i will post my profiling results.

The Dreamsnes team has completed the main CPU of snes core in SH4 assemble language before they gave up the DREAMSNES project.Maybe you could get the core AMS from them . And they also provided their ASM core to the Scherzo(coder of SUPER FAMICAST),and I think you could turn to him for help ,too.
Now the speed is still far from decent,but good job!

RockinB
March 19th, 2006, 09:01
@Chui:

Also, i can not run a game with snes9x/sh/? code, i have compiled it and have linked it with SNES4ALL, but supernintendo games not run. When i can run it, then i will post my profiling results.
So you could compile and link it, what is reportf? Is it a variable or a function? The reportf is required to link the sh asm, so what have you done?
Could you please tell something about how you're making the profiling?
Furthermore: some compile flags of snes9x mentioned in porting.txt are outdated and actually replaced by different ones, so this is somewhat misleading.


The Dreamsnes has completed the main CPU of snes core in SH4 assemble language before they gave up the DREAMSNES project.Maybe you could get the core AMS from them . And they also provided their ASM core to the Scherzo(coder of SUPER FAMICAST),and I think you could turn to him for help ,too.
Now the speed is still far from decent,but good job!
In fact, the sh2 asm stuff of snes9x is contributed by Marcus Comstedt and friends, who worked on Dreamsnes... I don't know if it's bad code or not, but I'm sure it's faster than the C implementation.

quzar
March 19th, 2006, 20:16
How does this compare in speed to DSNES, SFCv2 and SFCv1 with and without sound?

chui
March 19th, 2006, 21:13
RockinB-> SNES4ALL source code is free, change first lines of Makefile.dc for compiling with SH assember. OpcodesE1 are a ZSNES implementation (little variation) and compatible with OpcodesM2X2.

Also, a bad assembler implementation is worse than a good C implementation. I am not sure if that code speed up the emu, but we think that it is not a good code.

For profiling with Dreamcast, you can see UAE4ALL source code (find uae4all.h and debug_uae4all.h).

RockinB
March 20th, 2006, 07:58
RockinB-> SNES4ALL source code is free, change first lines of Makefile.dc for compiling with SH assember. OpcodesE1 are a ZSNES implementation (little variation) and compatible with OpcodesM2X2.
Thanks for these hints, I'll try it out soon. Strange that it didn't work for you (as you said above).



For profiling with Dreamcast, you can see UAE4ALL source code (find uae4all.h and debug_uae4all.h).
Ah okay, I thought you were using the GNU profiler or something like that.

chui
March 20th, 2006, 08:25
No, i use a own profiler functions using kallistiOS, there are 2/3 options for profiling in Makefile.dc of UAE4ALL.

Cid Highwind
March 20th, 2006, 11:30
How does this compare in speed to DSNES, SFCv2 and SFCv1 with and without sound?
I played around a bit last night and from my experience it isn't as fast as DreamSnes yet. Killer Instinct, Donkey Kong Country and FF4 don't run at the same speed, but for an alpha release I was pleasantly surprised. Great job Chui, I'm looking forward to any further releases.

Btw, what does the throttle setting do?

Eric
April 6th, 2006, 15:36
Fantastic guys i havent played it much myself cause i have been from Super Nintendo Emulator to Super Nintendo Emulator so i'm going to wait for a further updated one and play from there.

Eric

RockinB
April 10th, 2006, 12:26
@Chui: About the SH asm cpu core
When I tried it out on Saturn, it didn't work. From having a brief look into the asm code, it seems that it defaults to LSB access and unlike the C sourcecode, it hasn't got a MSB option at all. So I would have to patch MSB access in.
Does the Dreamcast not support unaligned accesses? Because in macro Immediate16 for example, it performs word access byte by byte, unlike with flag FAST_LSB_ACCESS in C sourcecode. Furthermore (and that might be an additional speed-up option for you, or me on Saturn), there might be some redundancy left, because it reads the word in big-endian format and then swaps it to little endian. Maybe this is due to sign extension...
Which endianess is the snes itself and does it support unaligned accesses (importand for optimizing on Saturn)?

EDIT:
Immediate16 really seems to be a special case, all other LSB related asm stuff reads in LSB format. The fact that the asm code always reads word byte-by-byte makes only sense if unaligned access can occur and if furthermore the SH4 doesn't support them, just as the SH2 of Saturn.