byuu's message board

For discussion of projects related to www.byuu.org/


1, 2, 3  Next
bsnes-mercury 
Author Message
User avatar

Joined: Mon 20 Apr 2009, 08:11:50

Posts: 5266
Location: 日本
Post bsnes-mercury
https://github.com/libretro/bsnes-mercury

Anyone ever notice this? It promises to restore useful features, but being a libretro core, there's not much that can be done in terms of that. I don't understand any real need for HLE cores in higan when we have Snes9X....
hunterk tells me there are some compiler optimisations, also.

_________________
CaptainJistuce: He's totally in the wrong, Kakashi's 100% in the right.
Note: The above statement is subject to act of byuu.

Sun 27 Jul 2014, 03:15:10

Joined: Fri 10 Apr 2009, 15:00:08

Posts: 13668
Post Re: bsnes-mercury
It's Alcaro. This is what he does. See: Asar, ZMZ, etc.

As long as nobody reports bugs he causes here, I don't mind this at all.

That said, I'm definitely hugely in favor of smarter LLE. You can get 90% of the speed of HLE with all of the accuracy pretty easily. And you can emulate the ones that lack HLE, such as the DSP3, ST011 and ST018. And get all the missing features of ones such as the DSP4 and Cx4.

It's really simple: the DSPs are strict Harvard architectures: ROM is ROM, RAM is RAM, they're entirely separate buses, so there's no self-modifying code. Thus we have the ability to perform 100% static recompilation. <pedantry mode: the ST018 isn't Harvard, but it also absolutely does not ever execute code out of RAM in the one game that uses it. You can hack the chip to do this [remember: firmware is embedded ROM], but since nobody does that, you can rely on static recompilation.>

So go through each and every instruction, and spit out C code for it. Now track all entry points, and eliminate all flag calculations that are easily provable to not be used. Now use profile-guided optimizations to train the resulting code, and you'll have something very lean and mean.

You could even add an option to ignore timing, and get the speed up even more. You might even find that it's faster than the HLE. And this code would be useful for every emulator that was willing to use it.

Quote:
Maximum accuracy is still uncompromisable ... Another change is the restoration of HLE emulation of some special chips, to improve performance


"lol"

Quote:
they're not really easy to find


Because of efforts like this that undermine their utility, and because everyone threw a shit-fit about my suggestion to include the ROM + firmware together.

Also, headphone jack mod.

Quote:
'inline' was added all across the PPU subclasses. Framerate went up by 20% from such a trivial change!


Wow, that's pretty impressive. I guess I'll do that myself.

I did this all throughout the original system and never really got above a ~5% improvement, so I was relying on the compiler with -O3 and PGO to figure out what to inline. Clearly another code profiling run is overdue.

Quote:
Is the compat core's DSP identical to that of the accuracy core, but a bit faster?


Yes. It's the one core where cooperative threading actually hinders things, since it only needs a single switch to maintain state. Plus it leaves on some of blargg's optimizations like duplicating arrays to avoid modulo arithmetic, etc. Smart optimizations, smart code.

Quote:
Reset permissions to sane values. C++ sources are not executable.


The source tarballs were created on an NTFS partition. Guess what happens when the filesystem lacks file permissions beyond "read only"?

Give me until v096 or so. I'm using ZFS now, but I may not go through and fix all the permissions by v095.

Quote:
The biggest change is getting the interface sane ... And like byuu's constantly changing interfaces, mercury is harmful to your brain :)


Image

Sun 27 Jul 2014, 03:24:02

Joined: Thu 19 Nov 2009, 16:18:55

Posts: 1586
Post Re: bsnes-mercury
The special chip HLE is back as a core option (LLE by default), mainly so MMX2/3 are less demanding.

Alcaro also spent some time with valgrind and inlined a few things(?) to get some substantial speedups, though I don't really remember the details. I also don't remember the exact magnitude of the speedups, so I guess some testing is in order. EDIT: nvm, byuu found the details :)

_________________
My Emulator Repo for Debian/Ubuntu/Mint/etc (includes bsnes, Retroarch, libretro, VBA, Nestopia, Dolphin)


hunterk


Sun 27 Jul 2014, 03:34:15
User avatar

Joined: Mon 20 Apr 2009, 08:11:50

Posts: 5266
Location: 日本
Post Re: bsnes-mercury
So it is Alcaro. I didn't even notice.
But fair enough. Valid points. I was surprised that no one ever brought this up before.

_________________
CaptainJistuce: He's totally in the wrong, Kakashi's 100% in the right.
Note: The above statement is subject to act of byuu.

Sun 27 Jul 2014, 03:38:08

Joined: Fri 10 Apr 2009, 15:00:08

Posts: 13668
Post Re: bsnes-mercury
> I was surprised that no one ever brought this up before.

I doubt anyone here cares about the myriad of higan forks. But it's interesting to me: I'll steal any good advice or decisions back for myself =)

If there's one aspect where I've truly exceeded other SNES emulators, it's in number of forks.

BSNES (Richard Bannister), OpenEmu, Mednafen, lsnes, Bizhawk, libretro-bsnes, bsnes-mercury, C# bsnes (dead and only kind of runs some games, don't ask about it), etc.

Sun 27 Jul 2014, 03:46:01
User avatar

Joined: Mon 20 Apr 2009, 08:11:50

Posts: 5266
Location: 日本
Post Re: bsnes-mercury
Well, pretty much everything you've mentioned are ports and not forks, in terms of the core. Alcaro has actually changed something.

_________________
CaptainJistuce: He's totally in the wrong, Kakashi's 100% in the right.
Note: The above statement is subject to act of byuu.

Sun 27 Jul 2014, 03:54:31

Joined: Fri 10 Apr 2009, 15:00:08

Posts: 13668
Post Re: bsnes-mercury
lsnes, Bizhawk, libretro-bsnes and bsnes-mercury all change the core.

The first two to add TAS functionality, the third to port it to C++98, the fourth to regress the emulation and give it an inferior interface that it claims is better because if you won't say why then I don't have to either.

The C# one was basically a total rewrite, even if it tried to behave the same.

Sun 27 Jul 2014, 04:06:22

Joined: Thu 19 Nov 2009, 16:18:55

Posts: 1586
Post Re: bsnes-mercury
byuu wrote:
the third to port it to C++98
There are 3 libretro-bsneses, the one ported to c++98 (this one's based on older code; v085 or 086?), bsnes-mercury and one that's unmodified except for the libretro wrapper around it. So, one port, 2 forks.

I wouldn't say including the option for HLE is regressing the emulation, particularly since it's LLE by default.

_________________
My Emulator Repo for Debian/Ubuntu/Mint/etc (includes bsnes, Retroarch, libretro, VBA, Nestopia, Dolphin)

Sun 27 Jul 2014, 04:19:20

Joined: Fri 10 Apr 2009, 15:00:08

Posts: 13668
Post Re: bsnes-mercury
Christ god, you people and pedantry.

Fine, bsnes has no forks. It has two forks. It has seven forks. I don't fucking care. Forget I said anything.

Sorry for being rude, but I really don't want to spend six hours and ten pages arguing about an offhand-tangent remark that doesn't really matter at all.

Sun 27 Jul 2014, 04:25:11
User avatar

Joined: Mon 20 Apr 2009, 08:11:50

Posts: 5266
Location: 日本
Post Re: bsnes-mercury
Ah yes, TAS. OK, two forks. Mmmmm.....fork.

_________________
CaptainJistuce: He's totally in the wrong, Kakashi's 100% in the right.
Note: The above statement is subject to act of byuu.

Sun 27 Jul 2014, 04:29:45

Joined: Wed 06 May 2009, 04:13:19

Posts: 4543
Post Re: bsnes-mercury
There is no fork.

_________________
This post best viewed at 800x600
;write ! ! !

Sun 27 Jul 2014, 08:26:07

Joined: Wed 09 Feb 2011, 13:29:34

Posts: 425
Post Re: bsnes-mercury
So you eat with your hands?

Sun 27 Jul 2014, 08:44:18
User avatar

Joined: Mon 20 Apr 2009, 08:11:50

Posts: 5266
Location: 日本
Post Re: bsnes-mercury
So chopsticks and spoons don't exist?

_________________
CaptainJistuce: He's totally in the wrong, Kakashi's 100% in the right.
Note: The above statement is subject to act of byuu.

Sun 27 Jul 2014, 08:57:09

Joined: Wed 09 Feb 2011, 13:29:34

Posts: 425
Post Re: bsnes-mercury
They are way too advanced items for our retro needs.

Sun 27 Jul 2014, 11:17:04

Joined: Fri 29 Nov 2013, 19:07:10

Posts: 22
Post Re: bsnes-mercury
Quote:
The biggest change is getting the interface sane ... And like byuu's constantly changing interfaces, mercury is harmful to your brain :)


I hope this is enough of my fault to take it personally

Sun 27 Jul 2014, 22:52:47
1, 2, 3  Next

Who is online

Users browsing this forum: No registered users and 0 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum