mirror of https://github.com/stella-emu/stella.git
Zero-byte ROMs are now rejected, instead of being loaded as Supercharger ROMs.
Fixed bug in handling analog axes with jitter; they were overriding events from digital, hat and keyboard input. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2251 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
parent
df71aa03d1
commit
cb3f0e96ba
20
Changes.txt
20
Changes.txt
|
@ -20,19 +20,29 @@
|
||||||
- it only has meaning while in emulation mode
|
- it only has meaning while in emulation mode
|
||||||
- it is enabled by default
|
- it is enabled by default
|
||||||
|
|
||||||
* Fixed bug with emulation of paddles using the mouse in Warlords;
|
* Fixed bug with emulation of paddles using the mouse most evident in
|
||||||
movement was being filtered out if the mouse was moved too fast.
|
Warlords; movement was being filtered out if the mouse was moved too
|
||||||
|
fast. There's still more work required in this area, however.
|
||||||
|
|
||||||
* Fixed bug whereby switching to the debugger and back again would
|
* Fixed bug with analog axes on gamepad devices, whereby jittering in
|
||||||
|
these axes would override input from digital axis, hat or keyboard
|
||||||
|
input.
|
||||||
|
|
||||||
|
* Fixed bug when switching to the debugger and back again would
|
||||||
sometimes cause an extra mouse motion event (which would cause the
|
sometimes cause an extra mouse motion event (which would cause the
|
||||||
emulation to think the mouse was moved and move the player
|
emulation to think the mouse was moved and move the player
|
||||||
accordingly).
|
accordingly).
|
||||||
|
|
||||||
* Tweaked bankswitch autodetection code for 4A50 bankswitching.
|
* Tweaked bankswitch autodetection code for 4A50 bankswitching; several
|
||||||
|
more test ROMs are automatically detected.
|
||||||
|
|
||||||
* The 'saverom' debugger command now saves ROMs in your home
|
* The 'saverom' debugger command now saves ROMs in your home
|
||||||
directory by default if you don't specify a valid path. This fixes
|
directory by default if you don't specify a valid path. This fixes
|
||||||
a bug whereby ROMs were saved and couldn't later be located.
|
a bug whereby ROMs were saved in strange locations and couldn't later
|
||||||
|
be found.
|
||||||
|
|
||||||
|
* Zero-byte ROMs are no longer loaded and mis-detected as Supercharger
|
||||||
|
images.
|
||||||
|
|
||||||
-Have fun!
|
-Have fun!
|
||||||
|
|
||||||
|
|
|
@ -2934,7 +2934,7 @@ Ms Pac-Man (Stella extended codes):
|
||||||
<tr><td>2K </td><td>64-2048 byte Atari </td></tr>
|
<tr><td>2K </td><td>64-2048 byte Atari </td></tr>
|
||||||
<tr><td>3E </td><td>32K Tigervision </td></tr>
|
<tr><td>3E </td><td>32K Tigervision </td></tr>
|
||||||
<tr><td>3F </td><td>512K Tigervision </td></tr>
|
<tr><td>3F </td><td>512K Tigervision </td></tr>
|
||||||
<tr><td>4A50 ¹</td><td>64K 4A50 + ram </td></tr>
|
<tr><td>4A50 </td><td>64K 4A50 + ram </td></tr>
|
||||||
<tr><td>4K </td><td>4K Atari </td></tr>
|
<tr><td>4K </td><td>4K Atari </td></tr>
|
||||||
<tr><td>AR </td><td>Supercharger </td></tr>
|
<tr><td>AR </td><td>Supercharger </td></tr>
|
||||||
<tr><td>CV </td><td>Commavid extra ram </td></tr>
|
<tr><td>CV </td><td>Commavid extra ram </td></tr>
|
||||||
|
|
|
@ -818,11 +818,20 @@ void EventHandler::poll(uInt64 time)
|
||||||
handleEvent(eventAxisNeg, 1);
|
handleEvent(eventAxisNeg, 1);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Turn off both events, since we don't know exactly which one
|
// Treat any deadzone value as zero
|
||||||
// was previously activated.
|
value = 0;
|
||||||
handleEvent(eventAxisNeg, 0);
|
|
||||||
handleEvent(eventAxisPos, 0);
|
// Now filter out consecutive, similar values
|
||||||
|
// (only pass on the event if the state has changed)
|
||||||
|
if(myAxisLastValue[stick][axis] != value)
|
||||||
|
{
|
||||||
|
// Turn off both events, since we don't know exactly which one
|
||||||
|
// was previously activated.
|
||||||
|
handleEvent(eventAxisNeg, 0);
|
||||||
|
handleEvent(eventAxisPos, 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
myAxisLastValue[stick][axis] = value;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -479,7 +479,7 @@ bool OSystem::createConsole(const string& romfile, const string& md5sum)
|
||||||
// Do a little error checking; it shouldn't be necessary
|
// Do a little error checking; it shouldn't be necessary
|
||||||
if(myConsole) deleteConsole();
|
if(myConsole) deleteConsole();
|
||||||
|
|
||||||
bool retval = false, showmessage = false;
|
bool showmessage = false;
|
||||||
|
|
||||||
// If a blank ROM has been given, we reload the current one (assuming one exists)
|
// If a blank ROM has been given, we reload the current one (assuming one exists)
|
||||||
if(romfile == "")
|
if(romfile == "")
|
||||||
|
@ -546,25 +546,24 @@ bool OSystem::createConsole(const string& romfile, const string& md5sum)
|
||||||
resetLoopTiming();
|
resetLoopTiming();
|
||||||
|
|
||||||
myFrameBuffer->setCursorState();
|
myFrameBuffer->setCursorState();
|
||||||
retval = true;
|
|
||||||
|
// Also check if certain virtual buttons should be held down
|
||||||
|
// These must be checked each time a new console is being created
|
||||||
|
if(mySettings->getBool("holdreset"))
|
||||||
|
myEventHandler->handleEvent(Event::ConsoleReset, 1);
|
||||||
|
if(mySettings->getBool("holdselect"))
|
||||||
|
myEventHandler->handleEvent(Event::ConsoleSelect, 1);
|
||||||
|
if(mySettings->getBool("holdbutton0"))
|
||||||
|
myEventHandler->handleEvent(Event::JoystickZeroFire1, 1);
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
buf << "ERROR: Couldn't create console for " << myRomFile << endl;
|
buf << "ERROR: Couldn't create console for " << myRomFile << endl;
|
||||||
logMessage(buf.str(), 0);
|
logMessage(buf.str(), 0);
|
||||||
retval = false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Also check if certain virtual buttons should be held down
|
|
||||||
// These must be checked each time a new console is being created
|
|
||||||
if(mySettings->getBool("holdreset"))
|
|
||||||
myEventHandler->handleEvent(Event::ConsoleReset, 1);
|
|
||||||
if(mySettings->getBool("holdselect"))
|
|
||||||
myEventHandler->handleEvent(Event::ConsoleSelect, 1);
|
|
||||||
if(mySettings->getBool("holdbutton0"))
|
|
||||||
myEventHandler->handleEvent(Event::JoystickZeroFire1, 1);
|
|
||||||
|
|
||||||
return retval;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
@ -813,6 +812,13 @@ uInt8* OSystem::openROM(string file, string& md5, uInt32& size)
|
||||||
gzclose(f);
|
gzclose(f);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Zero-byte files should be automatically discarded
|
||||||
|
if(size == 0)
|
||||||
|
{
|
||||||
|
delete[] image;
|
||||||
|
return (uInt8*) 0;
|
||||||
|
}
|
||||||
|
|
||||||
// If we get to this point, we know we have a valid file to open
|
// If we get to this point, we know we have a valid file to open
|
||||||
// Now we make sure that the file has a valid properties entry
|
// Now we make sure that the file has a valid properties entry
|
||||||
// To save time, only generate an MD5 if we really need one
|
// To save time, only generate an MD5 if we really need one
|
||||||
|
@ -868,7 +874,7 @@ void OSystem::validatePath(const string& setting, const string& partialpath,
|
||||||
{
|
{
|
||||||
const string& s = mySettings->getString(setting) != "" ?
|
const string& s = mySettings->getString(setting) != "" ?
|
||||||
mySettings->getString(setting) : myBaseDir + partialpath;
|
mySettings->getString(setting) : myBaseDir + partialpath;
|
||||||
FilesystemNode node = FilesystemNode(s);
|
FilesystemNode node(s);
|
||||||
if(!node.isDirectory())
|
if(!node.isDirectory())
|
||||||
{
|
{
|
||||||
AbstractFilesystemNode::makeDir(s);
|
AbstractFilesystemNode::makeDir(s);
|
||||||
|
|
|
@ -538,14 +538,11 @@ void LauncherDialog::handleCommand(CommandSender* sender, int cmd,
|
||||||
if(LauncherFilterDialog::isValidRomName(rom, extension))
|
if(LauncherFilterDialog::isValidRomName(rom, extension))
|
||||||
{
|
{
|
||||||
if(instance().createConsole(rom, md5))
|
if(instance().createConsole(rom, md5))
|
||||||
{
|
|
||||||
#if !defined(GP2X) // Quick GP2X hack to spare flash-card saves
|
|
||||||
instance().settings().setString("lastrom", myList->getSelectedString());
|
instance().settings().setString("lastrom", myList->getSelectedString());
|
||||||
#endif
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
instance().frameBuffer().showMessage(
|
instance().frameBuffer().showMessage(
|
||||||
"Error creating console (screen too small)", kMiddleCenter, true);
|
"Error creating console (check ROM file)",
|
||||||
|
kMiddleCenter, true);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
instance().frameBuffer().showMessage("Not a valid ROM file",
|
instance().frameBuffer().showMessage("Not a valid ROM file",
|
||||||
|
|
Loading…
Reference in New Issue