mirror of
https://github.com/libretro/stella2023.git
synced 2024-11-27 10:50:38 +00:00
Moved frying support from the Debugger to the Console. Also, frying now
occurs once per frame, as long as the backspace key is held down (previously it happened once per keypress only). Haven't decided whether this is an improvement or not, need more testing Also, added missing -O2 to new Makefile. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@580 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
parent
77f4c8e007
commit
b2903a36ca
@ -31,7 +31,10 @@ What the debugger can do:
|
||||
- Save CLI session to a text file.
|
||||
- Supports hex, decimal, and binary input and output almost everywhere.
|
||||
(disassembly is still hex)
|
||||
- (partial) Support for bank switching. Only F8 cart type works for now.
|
||||
- Support for bank switching. You can see how many banks a cart has,
|
||||
and switch banks. There's still more to be done here though.
|
||||
- Patching ROM in-place. Currently there's no way to save the patched
|
||||
ROM though.
|
||||
|
||||
Planned features for Stella 2.0 release:
|
||||
- Better TIA state display, with register names and GUI buttons for
|
||||
@ -44,15 +47,16 @@ Planned features for Stella 2.0 release:
|
||||
- TIA display should be updated during step/trace, so we can see our
|
||||
scanlines being drawn as it happens. The emulation core wasn't
|
||||
designed with this in mind, so it'll take a lot of work
|
||||
- Bankswitch support in the debugger for the remaining 20-odd cart
|
||||
types. Each one has to be added individually.
|
||||
- Bankswitch support in the debugger for the few remaining cart types
|
||||
that aren't supported.
|
||||
- Patch ROM support for a few cart types doesn't work.
|
||||
|
||||
Future plans (post 2.0):
|
||||
- Advanced breakpoint support (e.g. Break when carry flag
|
||||
changes, or break when player 0 collides with player 1,
|
||||
etc). This will implemented as a scripting language for
|
||||
the CLI.
|
||||
- Ability to patch ROM in-place, possibly including a mini-assembler
|
||||
- Possibly a mini-assembler
|
||||
- Support for extra RAM in Supercharger and other cart types.
|
||||
- Possibly support for recording and playing back input files, like
|
||||
MAME. This isn't a debugger feature per se, but it'll make it easier
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $Header: /home/stephena/STELLA_CVS-to-SVN/stella/Makefile,v 1.2 2005-06-28 23:17:58 stephena Exp $
|
||||
# $Header: /home/stephena/STELLA_CVS-to-SVN/stella/Makefile,v 1.3 2005-06-29 00:31:48 urchlay Exp $
|
||||
|
||||
#######################################################################
|
||||
# Default compilation parameters. Normally don't edit these #
|
||||
@ -22,7 +22,7 @@ include config.mak
|
||||
# CXXFLAGS+= -Werror
|
||||
|
||||
CXXFLAGS:= $(CXXFLAGS)
|
||||
CXXFLAGS+= -Wall -Wuninitialized -Wno-multichar -Wunused
|
||||
CXXFLAGS+= -O2 -Wall -Wuninitialized -Wno-multichar -Wunused
|
||||
# Even more warnings...
|
||||
#CXXFLAGS+= -pedantic -Wpointer-arith -Wcast-qual -Wconversion
|
||||
#CXXFLAGS+= -Wshadow -Wimplicit -Wundef -Wnon-virtual-dtor
|
||||
|
@ -13,7 +13,7 @@
|
||||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: Debugger.cxx,v 1.38 2005-06-28 03:34:40 urchlay Exp $
|
||||
// $Id: Debugger.cxx,v 1.39 2005-06-29 00:31:48 urchlay Exp $
|
||||
//============================================================================
|
||||
|
||||
#include "bspf.hxx"
|
||||
@ -729,8 +729,3 @@ bool Debugger::patchROM(int addr, int value) {
|
||||
return myConsole->cartridge().patch(addr, value);
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void Debugger::fry() {
|
||||
for (int ZPmem=0; ZPmem<255; ZPmem += rand() % 4)
|
||||
mySystem->poke(ZPmem, mySystem->peek(ZPmem) & (uInt8)rand() % 256);
|
||||
}
|
||||
|
@ -13,7 +13,7 @@
|
||||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: Debugger.hxx,v 1.35 2005-06-28 03:34:40 urchlay Exp $
|
||||
// $Id: Debugger.hxx,v 1.36 2005-06-29 00:31:48 urchlay Exp $
|
||||
//============================================================================
|
||||
|
||||
#ifndef DEBUGGER_HXX
|
||||
@ -51,7 +51,7 @@ enum {
|
||||
for all debugging operations in Stella (parser, 6502 debugger, etc).
|
||||
|
||||
@author Stephen Anthony
|
||||
@version $Id: Debugger.hxx,v 1.35 2005-06-28 03:34:40 urchlay Exp $
|
||||
@version $Id: Debugger.hxx,v 1.36 2005-06-29 00:31:48 urchlay Exp $
|
||||
*/
|
||||
class Debugger : public DialogContainer
|
||||
{
|
||||
@ -237,7 +237,6 @@ class Debugger : public DialogContainer
|
||||
bool patchROM(int addr, int value);
|
||||
void saveState(int state);
|
||||
void loadState(int state);
|
||||
void fry();
|
||||
|
||||
protected:
|
||||
Console* myConsole;
|
||||
|
@ -13,7 +13,7 @@
|
||||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: DebuggerParser.cxx,v 1.41 2005-06-28 03:34:40 urchlay Exp $
|
||||
// $Id: DebuggerParser.cxx,v 1.42 2005-06-29 00:31:48 urchlay Exp $
|
||||
//============================================================================
|
||||
|
||||
#include "bspf.hxx"
|
||||
@ -137,14 +137,6 @@ Command DebuggerParser::commands[] = {
|
||||
&DebuggerParser::executeFrame
|
||||
},
|
||||
|
||||
{
|
||||
"fry",
|
||||
"\"Fry\" console (randomly corrupt memory)",
|
||||
false,
|
||||
{ kARG_END_ARGS },
|
||||
&DebuggerParser::executeFry
|
||||
},
|
||||
|
||||
// TODO: height command
|
||||
|
||||
{
|
||||
@ -1080,11 +1072,6 @@ void DebuggerParser::executeFrame() {
|
||||
if(count != 1) commandResult += "s";
|
||||
}
|
||||
|
||||
// "fry"
|
||||
void DebuggerParser::executeFry() {
|
||||
debugger->fry();
|
||||
}
|
||||
|
||||
// "listbreaks"
|
||||
void DebuggerParser::executeListbreaks() {
|
||||
commandResult = listBreaks();
|
||||
|
@ -13,7 +13,7 @@
|
||||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: DebuggerParser.hxx,v 1.22 2005-06-28 03:34:40 urchlay Exp $
|
||||
// $Id: DebuggerParser.hxx,v 1.23 2005-06-29 00:31:48 urchlay Exp $
|
||||
//============================================================================
|
||||
|
||||
#ifndef DEBUGGER_PARSER_HXX
|
||||
@ -100,7 +100,6 @@ class DebuggerParser
|
||||
void executeDisasm();
|
||||
void executeDump();
|
||||
void executeFrame();
|
||||
void executeFry();
|
||||
void executeHelp();
|
||||
void executeListbreaks();
|
||||
void executeListtraps();
|
||||
|
@ -13,7 +13,7 @@
|
||||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: Console.cxx,v 1.61 2005-06-27 04:45:52 urchlay Exp $
|
||||
// $Id: Console.cxx,v 1.62 2005-06-29 00:31:49 urchlay Exp $
|
||||
//============================================================================
|
||||
|
||||
#include <assert.h>
|
||||
@ -350,6 +350,13 @@ void Console::setPalette()
|
||||
myOSystem->frameBuffer().setPalette(myMediaSource->palette());
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void Console::fry()
|
||||
{
|
||||
for (int ZPmem=0; ZPmem<255; ZPmem += rand() % 4)
|
||||
mySystem->poke(ZPmem, mySystem->peek(ZPmem) & (uInt8)rand() % 256);
|
||||
}
|
||||
|
||||
#ifdef DEVELOPER_SUPPORT
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void Console::changeXStart(const uInt32 direction)
|
||||
|
@ -13,7 +13,7 @@
|
||||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: Console.hxx,v 1.34 2005-06-27 04:45:52 urchlay Exp $
|
||||
// $Id: Console.hxx,v 1.35 2005-06-29 00:31:49 urchlay Exp $
|
||||
//============================================================================
|
||||
|
||||
#ifndef CONSOLE_HXX
|
||||
@ -37,7 +37,7 @@ class System;
|
||||
This class represents the entire game console.
|
||||
|
||||
@author Bradford W. Mott
|
||||
@version $Id: Console.hxx,v 1.34 2005-06-27 04:45:52 urchlay Exp $
|
||||
@version $Id: Console.hxx,v 1.35 2005-06-29 00:31:49 urchlay Exp $
|
||||
*/
|
||||
class Console
|
||||
{
|
||||
@ -155,6 +155,11 @@ class Console
|
||||
*/
|
||||
void setPalette();
|
||||
|
||||
/**
|
||||
"Fry" the Atari (mangle memory/TIA contents)
|
||||
*/
|
||||
void fry();
|
||||
|
||||
TIADebug *tiaDebugger() { return myTIAdebugger; }
|
||||
|
||||
#ifdef DEVELOPER_SUPPORT
|
||||
|
@ -13,7 +13,7 @@
|
||||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: EventHandler.cxx,v 1.77 2005-06-28 03:34:41 urchlay Exp $
|
||||
// $Id: EventHandler.cxx,v 1.78 2005-06-29 00:31:49 urchlay Exp $
|
||||
//============================================================================
|
||||
|
||||
#include <algorithm>
|
||||
@ -92,6 +92,8 @@ EventHandler::EventHandler(OSystem* osystem)
|
||||
setActionMappings();
|
||||
|
||||
myGrabMouseFlag = myOSystem->settings().getBool("grabmouse");
|
||||
|
||||
myFryingFlag = false;
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
@ -633,6 +635,10 @@ void EventHandler::handleKeyEvent(int unicode, SDLKey key, SDLMod mod, uInt8 sta
|
||||
enterDebugMode();
|
||||
return;
|
||||
}
|
||||
else if(myKeyTable[key] == Event::Fry)
|
||||
{
|
||||
myFryingFlag = bool(state);
|
||||
}
|
||||
else
|
||||
handleEvent(myKeyTable[key], state);
|
||||
|
||||
@ -842,10 +848,6 @@ void EventHandler::handleEvent(Event::Type event, Int32 state)
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if(myState == S_EMULATE && event == Event::Fry)
|
||||
{
|
||||
myOSystem->debugger().fry();
|
||||
}
|
||||
else if(event == Event::Quit)
|
||||
{
|
||||
myQuitFlag = true;
|
||||
|
@ -13,7 +13,7 @@
|
||||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: EventHandler.hxx,v 1.42 2005-06-28 04:40:21 urchlay Exp $
|
||||
// $Id: EventHandler.hxx,v 1.43 2005-06-29 00:31:49 urchlay Exp $
|
||||
//============================================================================
|
||||
|
||||
#ifndef EVENTHANDLER_HXX
|
||||
@ -74,7 +74,7 @@ struct Stella_Joystick {
|
||||
mapping can take place.
|
||||
|
||||
@author Stephen Anthony
|
||||
@version $Id: EventHandler.hxx,v 1.42 2005-06-28 04:40:21 urchlay Exp $
|
||||
@version $Id: EventHandler.hxx,v 1.43 2005-06-29 00:31:49 urchlay Exp $
|
||||
*/
|
||||
class EventHandler
|
||||
{
|
||||
@ -240,6 +240,8 @@ class EventHandler
|
||||
*/
|
||||
void handleEvent(Event::Type type, Int32 value);
|
||||
|
||||
bool frying() { return myFryingFlag; }
|
||||
|
||||
private:
|
||||
/**
|
||||
Send a keyboard event to the handler.
|
||||
@ -332,6 +334,9 @@ class EventHandler
|
||||
// Indicates whether to use launcher mode when exiting a game
|
||||
bool myUseLauncherFlag;
|
||||
|
||||
// Indicates whether or not we're in frying mode
|
||||
bool myFryingFlag;
|
||||
|
||||
// Indicates which paddle the mouse currently emulates
|
||||
Int8 myPaddleMode;
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
// See the file "license" for information on usage and redistribution of
|
||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
//
|
||||
// $Id: FrameBuffer.cxx,v 1.48 2005-06-25 16:35:36 stephena Exp $
|
||||
// $Id: FrameBuffer.cxx,v 1.49 2005-06-29 00:31:49 urchlay Exp $
|
||||
//============================================================================
|
||||
|
||||
#include <sstream>
|
||||
@ -168,7 +168,11 @@ void FrameBuffer::update()
|
||||
{
|
||||
// Draw changes to the mediasource
|
||||
if(!myPauseStatus)
|
||||
{
|
||||
myOSystem->console().mediaSource().update();
|
||||
if(myOSystem->eventHandler().frying())
|
||||
myOSystem->console().fry();
|
||||
}
|
||||
|
||||
// We always draw the screen, even if the core is paused
|
||||
drawMediaSource();
|
||||
|
Loading…
Reference in New Issue
Block a user