mirror of https://github.com/stella-emu/stella.git
Preparing for upcoming 3.7.3 release.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2557 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
parent
99d79bdd67
commit
7e198cb34d
|
@ -12,7 +12,7 @@
|
||||||
Release History
|
Release History
|
||||||
===========================================================================
|
===========================================================================
|
||||||
|
|
||||||
3.7.2 to 3.8: (xxx xx, 2012)
|
3.7.2 to 3.7.3: (xxx xx, 2012)
|
||||||
|
|
||||||
* Note: because of TIA/RIOT changes, the state file format has changed
|
* Note: because of TIA/RIOT changes, the state file format has changed
|
||||||
again, and old state files will not work with this release.
|
again, and old state files will not work with this release.
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
|
|
||||||
#define STELLA_VERSION "3.8_pre1"
|
#define STELLA_VERSION "3.7.3_pre1"
|
||||||
#define STELLA_BUILD atoi("$Rev$" + 6)
|
#define STELLA_BUILD atoi("$Rev$" + 6)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
|
|
||||||
#include "StateManager.hxx"
|
#include "StateManager.hxx"
|
||||||
|
|
||||||
#define STATE_HEADER "03070103state"
|
#define STATE_HEADER "03070300state"
|
||||||
#define MOVIE_HEADER "03030000movie"
|
#define MOVIE_HEADER "03030000movie"
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
#include <cstdlib>
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
|
@ -51,39 +52,39 @@ int searchForBytes(const uInt8* image, uInt32 imagesize,
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
int main(int ac, char* av[])
|
int main(int ac, char* av[])
|
||||||
{
|
{
|
||||||
if(ac != 3)
|
if(ac != 3)
|
||||||
{
|
{
|
||||||
cout << "usage: " << av[0] << " <filename> <hex pattern>\n";
|
cout << "usage: " << av[0] << " <filename> <hex pattern>\n";
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
ifstream in(av[1], ios_base::binary);
|
ifstream in(av[1], ios_base::binary);
|
||||||
in.seekg(0, ios::end);
|
in.seekg(0, ios::end);
|
||||||
int i_size = (int) in.tellg();
|
int i_size = (int) in.tellg();
|
||||||
in.seekg(0, ios::beg);
|
in.seekg(0, ios::beg);
|
||||||
|
|
||||||
uInt8* image = new uInt8[i_size];
|
uInt8* image = new uInt8[i_size];
|
||||||
in.read((char*)(image), i_size);
|
in.read((char*)(image), i_size);
|
||||||
in.close();
|
in.close();
|
||||||
|
|
||||||
int s_size = 0;
|
int s_size = 0;
|
||||||
uInt8* sig = new uInt8[strlen(av[2])/2];
|
uInt8* sig = new uInt8[strlen(av[2])/2];
|
||||||
istringstream buf(av[2]);
|
istringstream buf(av[2]);
|
||||||
|
|
||||||
uInt32 c;
|
uInt32 c;
|
||||||
while(buf >> hex >> c)
|
while(buf >> hex >> c)
|
||||||
{
|
{
|
||||||
sig[s_size++] = (uInt8)c;
|
sig[s_size++] = (uInt8)c;
|
||||||
// cerr << "character = " << hex << (int)sig[s_size-1] << endl;
|
// cerr << "character = " << hex << (int)sig[s_size-1] << endl;
|
||||||
}
|
}
|
||||||
// cerr << "sig size = " << hex << s_size << endl;
|
// cerr << "sig size = " << hex << s_size << endl;
|
||||||
|
|
||||||
int result = searchForBytes(image, i_size, sig, s_size);
|
int result = searchForBytes(image, i_size, sig, s_size);
|
||||||
if(result > 0)
|
if(result > 0)
|
||||||
cout << setw(3) << result << " hits: \'" << av[2] << "\' - \"" << av[1] << "\"" << endl;
|
cout << setw(3) << result << " hits: \'" << av[2] << "\' - \"" << av[1] << "\"" << endl;
|
||||||
|
|
||||||
delete[] image;
|
delete[] image;
|
||||||
delete[] sig;
|
delete[] sig;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue