2005-07-14 23:47:17 +00:00
|
|
|
//============================================================================
|
|
|
|
//
|
|
|
|
// SSSS tt lll lll
|
|
|
|
// SS SS tt ll ll
|
|
|
|
// SS tttttt eeee ll ll aaaa
|
|
|
|
// SSSS tt ee ee ll ll aa
|
|
|
|
// SS tt eeeeee ll ll aaaaa -- "An Atari 2600 VCS Emulator"
|
|
|
|
// SS SS tt ee ll ll aa aa
|
|
|
|
// SSSS ttt eeeee llll llll aaaaa
|
|
|
|
//
|
2010-04-10 21:37:23 +00:00
|
|
|
// Copyright (c) 1995-2010 by Bradford W. Mott, Stephen Anthony
|
|
|
|
// and the Stella Team
|
2005-07-14 23:47:17 +00:00
|
|
|
//
|
2010-01-10 03:23:32 +00:00
|
|
|
// See the file "License.txt" for information on usage and redistribution of
|
2005-07-14 23:47:17 +00:00
|
|
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
|
|
|
//
|
2009-05-13 13:55:40 +00:00
|
|
|
// $Id$
|
2005-07-14 23:47:17 +00:00
|
|
|
//
|
|
|
|
// Based on code from ScummVM - Scumm Interpreter
|
|
|
|
// Copyright (C) 2002-2004 The ScummVM project
|
|
|
|
//============================================================================
|
|
|
|
|
2005-08-30 17:51:26 +00:00
|
|
|
#ifndef ROM_WIDGET_HXX
|
|
|
|
#define ROM_WIDGET_HXX
|
2005-07-14 23:47:17 +00:00
|
|
|
|
|
|
|
class GuiObject;
|
2005-10-13 18:53:07 +00:00
|
|
|
class EditTextWidget;
|
2005-10-06 17:28:55 +00:00
|
|
|
class InputTextDialog;
|
OK, I've finally gotten back to Stella development and fixing the
disassembler. Hopefully this will lead to a new release very soon.
Added 'autocode' commandline argument and associated UI item (in the
RomWidget debugger area), which controls how Distella will use the
'automatic code determination' option. If set to 0/never, this is
completely disabled. If set to 1/always, it is always enabled.
The default is 2/automatic, whereby it is first turned on, and then
turned off if the disassembly doesn't contain the current PC address.
RomListWidget has now been completely reworked, so that it informs
RomWidget of its intent to change breakpoints and patch ROM. If
either of these fail, the action won't be performed, and more
importantly, it won't appear onscreen as if the action has succeeded.
This fixes an old bug whereby patching could fail, yet the onscreen
ROM data was actually changed. Related to this, the list has been
made as efficient as possible, and its contents are never un-necessarily
copied. Also, lines in the disassembly that cannot be modified no
longer show an edit area.
Due to the way the new disassembly works, you can no longer switch between
banks in the RomWidget (Distella would probably fail to disassemble in
such as case).
EditTextWidget can now indicate its contents have changed when adding
text to it.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1966 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-03-18 16:36:12 +00:00
|
|
|
class PopUpWidget;
|
2005-08-30 17:51:26 +00:00
|
|
|
class RomListWidget;
|
|
|
|
class StringList;
|
2005-07-14 23:47:17 +00:00
|
|
|
|
2005-08-30 17:51:26 +00:00
|
|
|
#include "Array.hxx"
|
2005-07-14 23:47:17 +00:00
|
|
|
#include "Widget.hxx"
|
|
|
|
#include "Command.hxx"
|
2010-02-07 21:23:26 +00:00
|
|
|
#include "CartDebug.hxx"
|
2005-07-14 23:47:17 +00:00
|
|
|
|
2005-08-30 17:51:26 +00:00
|
|
|
class RomWidget : public Widget, public CommandSender
|
|
|
|
{
|
2005-07-14 23:47:17 +00:00
|
|
|
public:
|
2005-08-30 17:51:26 +00:00
|
|
|
RomWidget(GuiObject* boss, const GUI::Font& font, int x, int y);
|
|
|
|
virtual ~RomWidget();
|
|
|
|
|
2010-03-23 18:00:47 +00:00
|
|
|
void invalidate() { myListIsDirty = true; loadConfig(); }
|
2005-08-30 17:51:26 +00:00
|
|
|
|
2005-09-15 19:43:36 +00:00
|
|
|
void handleCommand(CommandSender* sender, int cmd, int data, int id);
|
2005-08-30 17:51:26 +00:00
|
|
|
void loadConfig();
|
|
|
|
|
|
|
|
private:
|
OK, I've finally gotten back to Stella development and fixing the
disassembler. Hopefully this will lead to a new release very soon.
Added 'autocode' commandline argument and associated UI item (in the
RomWidget debugger area), which controls how Distella will use the
'automatic code determination' option. If set to 0/never, this is
completely disabled. If set to 1/always, it is always enabled.
The default is 2/automatic, whereby it is first turned on, and then
turned off if the disassembly doesn't contain the current PC address.
RomListWidget has now been completely reworked, so that it informs
RomWidget of its intent to change breakpoints and patch ROM. If
either of these fail, the action won't be performed, and more
importantly, it won't appear onscreen as if the action has succeeded.
This fixes an old bug whereby patching could fail, yet the onscreen
ROM data was actually changed. Related to this, the list has been
made as efficient as possible, and its contents are never un-necessarily
copied. Also, lines in the disassembly that cannot be modified no
longer show an edit area.
Due to the way the new disassembly works, you can no longer switch between
banks in the RomWidget (Distella would probably fail to disassemble in
such as case).
EditTextWidget can now indicate its contents have changed when adding
text to it.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1966 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-03-18 16:36:12 +00:00
|
|
|
void setBreak(int disasm_line, bool state);
|
|
|
|
void setPC(int disasm_line);
|
2010-04-09 20:13:12 +00:00
|
|
|
void runtoPC(int disasm_line);
|
OK, I've finally gotten back to Stella development and fixing the
disassembler. Hopefully this will lead to a new release very soon.
Added 'autocode' commandline argument and associated UI item (in the
RomWidget debugger area), which controls how Distella will use the
'automatic code determination' option. If set to 0/never, this is
completely disabled. If set to 1/always, it is always enabled.
The default is 2/automatic, whereby it is first turned on, and then
turned off if the disassembly doesn't contain the current PC address.
RomListWidget has now been completely reworked, so that it informs
RomWidget of its intent to change breakpoints and patch ROM. If
either of these fail, the action won't be performed, and more
importantly, it won't appear onscreen as if the action has succeeded.
This fixes an old bug whereby patching could fail, yet the onscreen
ROM data was actually changed. Related to this, the list has been
made as efficient as possible, and its contents are never un-necessarily
copied. Also, lines in the disassembly that cannot be modified no
longer show an edit area.
Due to the way the new disassembly works, you can no longer switch between
banks in the RomWidget (Distella would probably fail to disassemble in
such as case).
EditTextWidget can now indicate its contents have changed when adding
text to it.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1966 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-03-18 16:36:12 +00:00
|
|
|
void patchROM(int disasm_line, const string& bytes);
|
2005-10-06 17:28:55 +00:00
|
|
|
void saveROM(const string& rom);
|
2005-09-07 18:34:52 +00:00
|
|
|
|
2005-08-30 17:51:26 +00:00
|
|
|
private:
|
2009-06-03 14:49:42 +00:00
|
|
|
enum {
|
2010-04-10 20:00:16 +00:00
|
|
|
kResolveDataChanged = 'ACrd',
|
OK, I've finally gotten back to Stella development and fixing the
disassembler. Hopefully this will lead to a new release very soon.
Added 'autocode' commandline argument and associated UI item (in the
RomWidget debugger area), which controls how Distella will use the
'automatic code determination' option. If set to 0/never, this is
completely disabled. If set to 1/always, it is always enabled.
The default is 2/automatic, whereby it is first turned on, and then
turned off if the disassembly doesn't contain the current PC address.
RomListWidget has now been completely reworked, so that it informs
RomWidget of its intent to change breakpoints and patch ROM. If
either of these fail, the action won't be performed, and more
importantly, it won't appear onscreen as if the action has succeeded.
This fixes an old bug whereby patching could fail, yet the onscreen
ROM data was actually changed. Related to this, the list has been
made as efficient as possible, and its contents are never un-necessarily
copied. Also, lines in the disassembly that cannot be modified no
longer show an edit area.
Due to the way the new disassembly works, you can no longer switch between
banks in the RomWidget (Distella would probably fail to disassemble in
such as case).
EditTextWidget can now indicate its contents have changed when adding
text to it.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1966 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-03-18 16:36:12 +00:00
|
|
|
kRomNameEntered = 'RWrn'
|
2009-06-03 14:49:42 +00:00
|
|
|
};
|
|
|
|
|
2010-02-07 21:23:26 +00:00
|
|
|
RomListWidget* myRomList;
|
OK, I've finally gotten back to Stella development and fixing the
disassembler. Hopefully this will lead to a new release very soon.
Added 'autocode' commandline argument and associated UI item (in the
RomWidget debugger area), which controls how Distella will use the
'automatic code determination' option. If set to 0/never, this is
completely disabled. If set to 1/always, it is always enabled.
The default is 2/automatic, whereby it is first turned on, and then
turned off if the disassembly doesn't contain the current PC address.
RomListWidget has now been completely reworked, so that it informs
RomWidget of its intent to change breakpoints and patch ROM. If
either of these fail, the action won't be performed, and more
importantly, it won't appear onscreen as if the action has succeeded.
This fixes an old bug whereby patching could fail, yet the onscreen
ROM data was actually changed. Related to this, the list has been
made as efficient as possible, and its contents are never un-necessarily
copied. Also, lines in the disassembly that cannot be modified no
longer show an edit area.
Due to the way the new disassembly works, you can no longer switch between
banks in the RomWidget (Distella would probably fail to disassemble in
such as case).
EditTextWidget can now indicate its contents have changed when adding
text to it.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1966 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2010-03-18 16:36:12 +00:00
|
|
|
EditTextWidget* myBank;
|
2005-10-13 18:53:07 +00:00
|
|
|
EditTextWidget* myBankCount;
|
2010-04-10 20:00:16 +00:00
|
|
|
PopUpWidget* myResolveData;
|
2005-10-06 17:28:55 +00:00
|
|
|
InputTextDialog* mySaveRom;
|
|
|
|
|
2005-09-15 19:43:36 +00:00
|
|
|
bool myListIsDirty;
|
2005-08-30 17:51:26 +00:00
|
|
|
int myCurrentBank;
|
2005-07-14 23:47:17 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|