From 6144e4fd5791d61a1ff5c8fe0f7883d64f23402c Mon Sep 17 00:00:00 2001 From: stephena Date: Wed, 9 Sep 2009 15:59:22 +0000 Subject: [PATCH] Improved ROM launcher so that going to a parent folder automatically selects the item that was previously selected. Fixed bug in Cheat dialog where editing a cheat didn't remove the old one. Updated TODO, rearranging improved disassembly as the #1 priority for the next release; I don't have time to finish it now. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1873 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba --- Todo.txt | 40 +++++++++++++++------------------- src/cheat/CheatManager.cxx | 2 +- src/common/Stack.hxx | 3 +-- src/debugger/gui/RomWidget.cxx | 2 +- src/gui/LauncherDialog.cxx | 22 ++++++++++++++----- src/gui/LauncherDialog.hxx | 4 +++- 6 files changed, 39 insertions(+), 34 deletions(-) diff --git a/Todo.txt b/Todo.txt index 8b20958c0..67608bda1 100644 --- a/Todo.txt +++ b/Todo.txt @@ -9,13 +9,17 @@ SSSS ttt eeeee llll llll aaaaa =============================================================================== - To Do List - August 2009 + To Do List - September 2009 =============================================================================== If you would like to contribute to Stella's development then find something on the list below and send email to Bradford Mott at bwmott@acm.org or Stephen Anthony at stephena@users.sourceforge.net. + * Step-debug through disassembled zero-page and SC code + + * Either Support Distella as frontend or integrate a 6507 Disassembler + * TIA infrastructure: further improve 'illegal' HMOVE emulation to fix problems in several homebrew ROMs. @@ -26,10 +30,6 @@ Stephen Anthony at stephena@users.sourceforge.net. * Look into adding Blargg NTSC filtering (perhaps as a GLSL program). - * Step-debug through disassembled zero-page code (get clarification on this) - - * Either Support Distella as frontend or integrate a 6507 Disassembler - * Add better support for 'floating' TIA reads as described here: http://www.atariage.com/forums/index.php?s=&showtopic=143363&view=findpost&p=1762433 @@ -66,37 +66,31 @@ Stephen Anthony at stephena@users.sourceforge.net. * More support for copy and paste. - * Add support for uncommon controllers (KidVid, Lightgun, etc) + * Add support for uncommon controllers (KidVid, Lightgun, etc). - * Fix "Tron Man Picture Cart" (32K Tigervision bankswitching) issue + * Fix "Tron Man Picture Cart" (32K Tigervision bankswitching) issue. * Possible 'trace mode' in debugger (generate a file containing all - internal state) + internal state). * Automatic statesave at beginning of each frame (including state of controllers and console switches), with the ability to 'roll back' to - a previous state/frame + a previous state/frame. * RewindManager to set up how often to save a state, and for how long - (debugger would be once per frame, normal probably once per second) + (debugger would be once per frame, normal probably once per second). - * Extra SECAM 'quirks' (see Stella 2.4.1 release thread on AtariAge) + * Extra SECAM 'quirks' (see Stella 2.4.1 release thread on AtariAge). - * Improve speed of Pitfall2 emulation + * Improve speed of Pitfall2 emulation. - * Add auto-detection for all remaining bankswitch types + * Add auto-detection for all remaining bankswitch types. - * Either Support DASM as frontend or integrate a 6507 Assembler + * Either Support DASM as frontend or integrate a 6507 Assembler. - * Add a Sprite/Animation Editor + * AVI/MPEG export. - * AVI/MPEG export - - * Add a PF Editor - - * Client/Server networked play for up to 4 Computers via LAN/Internet - - * Tracking Hiscores + * Client/Server networked play for up to 4 Computers via LAN/Internet. * Find people to handle new ports, and try to more actively recruit people - into the Stella project + into the Stella project. diff --git a/src/cheat/CheatManager.cxx b/src/cheat/CheatManager.cxx index c34c8bf06..5b2673a1c 100644 --- a/src/cheat/CheatManager.cxx +++ b/src/cheat/CheatManager.cxx @@ -55,7 +55,7 @@ const Cheat* CheatManager::add(const string& name, const string& code, // Delete duplicate entries for(unsigned int i = 0; i < myCheatList.size(); i++) { - if(myCheatList[i]->code() == code) + if(myCheatList[i]->name() == name || myCheatList[i]->code() == code) { myCheatList.remove_at(i); break; diff --git a/src/common/Stack.hxx b/src/common/Stack.hxx index a2b98ccb4..e9310a45a 100644 --- a/src/common/Stack.hxx +++ b/src/common/Stack.hxx @@ -52,8 +52,7 @@ class FixedStack { T tmp; assert(_size > 0); - tmp = _stack[_size - 1]; - _stack[--_size] = 0; + tmp = _stack[--_size]; return tmp; } int size() const { return _size; } diff --git a/src/debugger/gui/RomWidget.cxx b/src/debugger/gui/RomWidget.cxx index 716eaea3a..e746cf600 100644 --- a/src/debugger/gui/RomWidget.cxx +++ b/src/debugger/gui/RomWidget.cxx @@ -234,7 +234,7 @@ void RomWidget::initialUpdate() BoolArray state; // Disassemble zero-page RAM and entire bank and reset breakpoints - dbg.disassemble(myAddrList, label, data, disasm, 0x80, 0xff); +// dbg.disassemble(myAddrList, label, data, disasm, 0x80, 0xff); dbg.disassemble(myAddrList, label, data, disasm, 0xf000, 0xffff); for(unsigned int i = 0; i < data.size(); ++i) { diff --git a/src/gui/LauncherDialog.cxx b/src/gui/LauncherDialog.cxx index a18161e95..b8f7569cd 100644 --- a/src/gui/LauncherDialog.cxx +++ b/src/gui/LauncherDialog.cxx @@ -253,7 +253,7 @@ void LauncherDialog::enableButtons(bool enable) } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -void LauncherDialog::updateListing() +void LauncherDialog::updateListing(const string& nameToSelect) { // Start with empty list myGameList->clear(); @@ -284,8 +284,10 @@ void LauncherDialog::updateListing() int selected = -1; if(!myList->getList().isEmpty()) { - string lastrom = instance().settings().getString("lastrom"); - if(lastrom == "") + const string& find = + nameToSelect == "" ? instance().settings().getString("lastrom") : nameToSelect; + + if(find == "") selected = 0; else { @@ -294,7 +296,7 @@ void LauncherDialog::updateListing() for(iter = myList->getList().begin(); iter != myList->getList().end(); ++iter, ++itemToSelect) { - if(lastrom == *iter) + if(find == *iter) { selected = itemToSelect; break; @@ -490,11 +492,19 @@ void LauncherDialog::handleCommand(CommandSender* sender, int cmd, // Directory's should be selected (ie, enter them and redisplay) if(myGameList->isDir(item)) { + string dirname = ""; if(myGameList->name(item) == " [..]") + { myCurrentNode = myCurrentNode.getParent(); + if(!myNodeNames.empty()) + dirname = myNodeNames.pop(); + } else + { myCurrentNode = FilesystemNode(rom); - updateListing(); + myNodeNames.push(myGameList->name(item)); + } + updateListing(dirname); } else { @@ -524,7 +534,7 @@ void LauncherDialog::handleCommand(CommandSender* sender, int cmd, case kPrevDirCmd: case kListPrevDirCmd: myCurrentNode = myCurrentNode.getParent(); - updateListing(); + updateListing(myNodeNames.empty() ? "" : myNodeNames.pop()); break; case kListSelectionChangedCmd: diff --git a/src/gui/LauncherDialog.hxx b/src/gui/LauncherDialog.hxx index a445bf387..83888f63f 100644 --- a/src/gui/LauncherDialog.hxx +++ b/src/gui/LauncherDialog.hxx @@ -42,6 +42,7 @@ class StringListWidget; #include "Dialog.hxx" #include "FSNode.hxx" #include "StringList.hxx" +#include "Stack.hxx" // These must be accessible from dialogs created by this class enum { @@ -71,7 +72,7 @@ class LauncherDialog : public Dialog virtual void handleCommand(CommandSender* sender, int cmd, int data, int id); void loadConfig(); - void updateListing(); + void updateListing(const string& nameToSelect = ""); private: void enableButtons(bool enable); @@ -104,6 +105,7 @@ class LauncherDialog : public Dialog int mySelectedItem; int myRomInfoSize; FilesystemNode myCurrentNode; + FixedStack myNodeNames; bool myShowDirs; StringList myRomExts;