1//============================================================================
2//
3// MM MM 6666 555555 0000 2222
4// MMMM MMMM 66 66 55 00 00 22 22
5// MM MMM MM 66 55 00 00 22
6// MM M MM 66666 55555 00 00 22222 -- "A 6502 Microprocessor Emulator"
7// MM MM 66 66 55 00 00 22
8// MM MM 66 66 55 55 00 00 22
9// MM MM 6666 5555 0000 222222
10//
11// Copyright (c) 1995-2019 by Bradford W. Mott, Stephen Anthony
12// and the Stella Team
13//
14// See the file "License.txt" for information on usage and redistribution of
15// this file, and for a DISCLAIMER OF ALL WARRANTIES.
16//============================================================================
17
18#include "DispatchResult.hxx"
19
20// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
21bool DispatchResult::isSuccess() const
22{
23 return myStatus == Status::debugger || myStatus == Status::ok;
24}
25
26// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
27void DispatchResult::setOk(uInt64 cycles)
28{
29 myStatus = Status::ok;
30 myCycles = cycles;
31}
32
33// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
34void DispatchResult::setDebugger(uInt64 cycles, const string& message, int address, bool wasReadTrap)
35{
36 myStatus = Status::debugger;
37 myCycles = cycles;
38 myMessage = message;
39 myAddress = address;
40 myWasReadTrap = wasReadTrap;
41}
42
43// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
44void DispatchResult::setFatal(uInt64 cycles)
45{
46 myCycles = cycles;
47
48 myStatus = Status::fatal;
49}
50
51// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
52void DispatchResult::setMessage(const string& message)
53{
54 myMessage = message;
55}
56