Update to bsnes v060r08 release.

This version embeds mightymo's cheats.xml inside the bsnes executable.
It's about 1.3MB, but thankfully Qt compresses it heavily first, so
the binary only grows by 100kb. BZip2 doesn't fare as well,
surprisingly, and grows the source archive by 200kb. I think it's
worth it.

The cheat code editor window gets a new button, "Find Cheat Codes ..."
If you click it, it will match the SHA256 of the currently loaded game
to an entry in the database. No matches? It apologizes for letting you
down. But if it finds some, and there's a good chance it will with
~1500 entries, it gives you a list of them. Check the codes you want
and they are imported into the available slots. The way it works is
the first checked code goes to the first empty slot, the second
checked code to the second empty slot, and if there aren't any slots
left available (very unlikely), it won't import them.

It's incredible, actual innovation in the SNES scene.
- no more web searching for codes
- no more applying codes for the wrong revision, or the wrong country,
or whatever
- no more flat out broken codes
- no more having to name the codes yourself
- cheat grouping avoids the need to add and toggle multiple slots to
get a single effect

Anyone who likes this, please send a thank you PM to mightymo77 and
tukuyomi. They deserve all the credit for the amazing database that
makes this possible.

Now then: **major caveat, for the love of god read this first!** My
XML parser is ... brutal on this file. It has to allocate memory for
each attribute and each element. And ... it rapes the ever loving SHIT
out of malloc(). Oh my god. On my E8400, it takes a good 30 seconds to
parse the 1.3MB database on Linux. And on Windows, holy god, it has a
horrendous version of malloc. It takes at least 3-5 minutes.
Seriously, go make yourself a cup of coffee if you are running
Windows.

I only have to parse the file one time per program run, and I only
parse it when you click the find cheat codes button for the first
time. But yes, it is painful. Very, very painful.

[No archive available]
This commit is contained in:
byuu 2010-03-01 05:59:52 +00:00
parent 1934197fb7
commit f1d1ab7ed1

Diff Content Not Available