summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/debug/debugcpu.cpp (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* remove safe_pc() and safe_pcbase() (nw) smf-2018-04-131-4/+4
|
* Added suspend and resume debugger commands (#3411) GavinAndrews2018-04-021-0/+23
|
* fix scheduling session events from debugger (nw) Vas Crabb2018-03-291-1/+1
|
* Reshuffle some stuff: Vas Crabb2018-03-281-89/+35
| | | | | | * Move around the debugger hooks to get a small but measurable performance increase * Remove emucore from external tools * Improve performance of DSP16 interpreter a little by generating six variants of execution loop
* Remove all uses of first_screen() from core files, nw Ryan Holtz2018-03-111-9/+22
|
* Grammar police (nw) Olivier Galibert2018-02-241-9/+9
|
* Debugger: fix f10 step over of instructions with a branch delay slot [smf] smf-2018-02-211-1/+1
|
* *DUH*, also fix MT6857 (nw) Olivier Galibert2018-01-281-4/+4
|
* debugcpu.cpp: added missing initialization of m_vblank_occurred (nw) Oliver Stöneberg2018-01-061-0/+1
|
* debugcpu.cpp: Eliminate unnecessary downcast (nw) AJR2018-01-051-2/+5
|
* Eliminate machine().firstcpu (nw) AJR2018-01-041-1/+6
|
* space.machine -> machine (nw) Olivier Galibert2017-12-141-2/+2
|
* Revert "Revert "Merge branch 'master' of https://github.com/mamedev/mame"" Firehawke2017-12-131-65/+33
| | | | This reverts commit 54155441e9ba9941e85d80c4834a66376a11e791.
* Revert "Merge branch 'master' of https://github.com/mamedev/mame" Firehawke2017-12-131-33/+65
| | | | | This reverts commit f537428e5a40ba6dde8ca9bf0fe9ae6b1f189ac4, reversing changes made to 0d70d798107d4e4e8fb9f230410aeb1e888d65c5.
* Fix watchpoint hit message for address-shifted processors (nw) AJR2017-12-061-2/+2
|
* Merge pull request #2897 from vadosnaprimer/rewind R. Belmont2017-12-061-0/+8
|\ | | | | Rewind feature and RAM savestates.
| * Rewind feature and RAM savestates. vadosnaprimer2017-12-061-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This starts the work requested in #2398. How RAM states work. Implemented using util::vectorstream. Instead of dumping m_save.m_entry_list to file, it writes them as binary to vectorstream. Compression is not used, as it would slow down the process. The header is written as usual, also in binary. When a state is loaded, the savestate data gets binary-read from vectorstream. How rewind works. Rewind is optional, it can be turned off through MAME GUI while not running. Rewind capacity is available there too. Rewind step hotkey is available from the standard hotkey menu. In the debugger you have the "rewind" command ("rw" shortcut) that works the same as the hotkey. Every time you advance a frame (pause step), rewinder captures a RAM savestate of the frame you were at. It does the same when you do step into/over/out in the debugger. Every time it captures a new state (and when you unpause), it marks as invalid all its states that go after the current machine time, because input might change, so they are not relevant anymore. It keeps their buffers allocated though, for future use. When rewinder runs out of allowed amount of savestates it can have, it invalidates the first state in the list and tosses its unique_ptr to the end of the list, then it uses its buffer to capture a new state. When you hit the rewind step key, or use "rewind" command in the debugger, it loads a state that is immediately before the current machine time. Invalid states between valid ones are not allowed to appear, as that breaks rewinder integrity and causes problems. Rewinder keeps its own set of ram states as a vector of unique_ptr's. All rewinder operations and errors get reported using machine().popmessage().
* | More fixes and simplifications (nw) Olivier Galibert2017-12-031-63/+23
|/
* Fix non-initialized member of debugcpu (nw) Olivier Galibert2017-11-301-0/+1
|
* (nw) misc cleanup: start replacing auto_alloc_* with smart pointers, get Vas Crabb2017-12-011-53/+43
| | | | | rid of reference constants in the debugger in favour of capturing the value in the bind/lambda (less ugly casting)
* emumem: API change [O. Galibert] Olivier Galibert2017-11-291-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * direct_read_data is now a template which takes the address bus shift as a parameter. * address_space::direct<shift>() is now a template method that takes the shift as a parameter and returns a pointer instead of a reference * the address to give to {read|write}_* on address_space or direct_read_data is now the address one wants to access Longer explanation: Up until now, the {read|write}_* methods required the caller to give the byte offset instead of the actual address. That's the same on byte-addressing CPUs, e.g. the ones everyone knows, but it's different on the word/long/quad addressing ones (tms, sharc, etc...) or the bit-addressing one (tms340x0). Changing that required templatizing the direct access interface on the bus addressing granularity, historically called address bus shift. Also, since everybody was taking the address of the reference returned by direct(), and structurally didn't have much choice in the matter, it got changed to return a pointer directly. Longest historical explanation: In a cpu core, the hottest memory access, by far, is the opcode fetching. It's also an access with very good locality (doesn't move much, tends to stay in the same rom/ram zone even when jumping around, tends not to hit handlers), which makes efficient caching worthwhile (as in, 30-50% faster core iirc on something like the 6502, but that was 20 years ago and a number of things changed since then). In fact, opcode fetching was, in the distant past, just an array lookup indexed by pc on an offset pointer, which was updated on branches. It didn't stay that way because more elaborate access is often needed (handlers, banking with instructions crossing a bank...) but it still ends up with a frontend of "if the address is still in the current range read from pointer+address otherwise do the slowpath", e.g. two usually correctly predicted branches plus the read most of the time. Then the >8 bits cpus arrived. That was ok, it just required to do the add to a u8 *, then convert to a u16/u32 * and do the read. At the asm level, it was all identical except for the final read, and read_byte/word/long being separate there was no test (and associated overhead) added in the path. Then the word-addressing CPUs arrived with, iirc, the tms cpus used in atari games. They require, to read from the pointer, to shift the address, either explicitely, or implicitely through indexing a u16 *. There were three possibilities: 1- create a new read_* method for each size and granularity. That amounts to a lot of copy/paste in the end, and functions with identical prototypes so the compiler can't detect you're using the wrong one. 2- put a variable shift in the read path. That was too expensive especially since the most critical cpus are byte-addressing (68000 at the time was the key). Having bit-adressing cpus which means the shift can either be right or left depending on the variable makes things even worse. 3- require the caller to do the shift himself when needed. The last solution was chosen, and starting that day the address was a byte offset and not the real address. Which is, actually, quite surprising when writing a new cpu core or, worse, when using the read/write methods from the driver code. But since then, C++ happened. And, in particular, templates with non-type parameters. Suddendly, solution 1 can be done without the copy/paste and with different types allowing to detect (at runtime, but systematically and at startup) if you got it wrong, while still generating optimal code. So it was time to switch to that solution and makes the address parameter sane again. Especially since it makes mucking in the rest of the memory subsystem code a lot more understandable.
* dvdisasm: Overhaul [O. Galibert] Olivier Galibert2017-11-261-85/+28
| | | | | | | | Disassemblers are now independant classes. Not only the code is cleaner, but unidasm has access to all the cpu cores again. The interface to the disassembly method has changed from byte buffers to objects that give a result to read methods. This also adds support for lfsr and/or paged PCs.
* Explicitly allow floating point values for state registers AJR2017-10-131-2/+6
| | | | Note that the internal debugger's expression interpreter is not set up to handle floating point values at all, so they remain disabled there.
* device_state_interface: Polymorphism and std::function for entries (nw) (#2690) ajrhacker2017-10-121-1/+1
| | | | | | | | | | | * device_state_interface: Polymorphism and std::function for entries (nw) - Create a templated subclass of device_state_entry to provide separate read/write interfaces for registers of varying widths. The efficiency impact of this should be minimal, given that this eliminates the need to make each byte width a subcase for reads and writes. - Create similarly templated "pseudo-register" versions of device_state_entry that provides custom read/write interfaces through std::function. The intent of this is to eventually replace the dummy register + state_export interface hitherto necessary to provide debugger access to bankswitched or computed state registers. - State registers can now be made read-only, and this is automatically done now when state_add is called with a std::function read handler but no write handler. This property is honored by MAME debug expressions. * Add override keyword (nw) * Remove explicit instantiations that were causing linking errors in tools build (nw)
* This is too contentious, please put it up for review Vas Crabb2017-08-011-39/+432
| | | | | | Revert "Changes to debugger memory address translation" This reverts commit bb0964f9a284b15851773f5428bd602ca01cc28b.
* Changes to debugger memory address translation AJR2017-08-011-432/+39
| | | | | | - memory_translate now returns an address space number rather a boolean flag, permitting addresses in part of one space to map to an entirely different space. This is primarily intended to help MCUs which have blocks of internal memory that can be dynamically remapped, but may also allow for more accurate emulation of MMUs that drive multiple external address spaces, since the old limit of four address spaces per MAME device has been lifted. - memory_translate has also been made a const method, in spite of a couple of badly behaved CPU cores that can't honestly treat it as one. - The (read|write)_(byte|word|dword|qword|memory|opcode) accessors have been transferred from debugger_cpu to device_memory_interface, with somewhat modified arguments corresponding to the translate function it calls through to if requested.
* stop hotspot from crashing when you start running. (nw) smf-2017-07-251-29/+30
|
* Don't assume a watch point exists for the address space passed to ↵ smf-2017-07-251-8/+9
| | | | watchpoint_update_flags(), which fixes the hotspot command. (nw)
* * Make XML file a class of its own managed with smart poitners Vas Crabb2017-07-211-11/+6
| | | | * Save/restore a little more of Cocoa debugger state
* Revert f8 behaviour, to run until next start of vblank, by re-adding a check ↵ smf-2017-07-041-1/+2
| | | | | | | | | | | | that was removed as part of this commit (nw) SHA-1: 56bd36c5ef3960874628bc08cbfcedf4c6057a19 * Major refactoring of debugger core [Ryan Holtz] * Eliminate globals/file statics * Remove lots of stuff from global scope * Use std::function for custom command registration * Eliminate some trampolines * Build fixes from Vas Crabb and balr0g
* dimemory: Lift the cap on the number of address spaces per device [O. Galibert] Olivier Galibert2017-07-031-9/+9
|
* Rename AS_DECRYPTED_OPCODES to AS_OPCODES [O. Galibert] Olivier Galibert2017-07-031-7/+7
|
* debugcpu: Eliminate direct() from read_opcode [O. Galibert] Olivier Galibert2017-06-251-85/+6
|
* srcclean (nw) Vas Crabb2017-06-251-2/+2
|
* Fixed an issue that could cause the debugger 'source' command to falsely ↵ Nathan Woods2017-06-241-1/+1
| | | | | | display I/O error I've discovered a scenario where reading to the end of file seems to trigger the fail bit, in addition to the eof bit. Because of this, I've changed the error message to display when we can't read from the stream, but the eof bit is _not_ set
* Changed a few 'const char *' ==> 'const std::string &' in the MAME debugger ↵ npwoods2017-06-241-40/+36
| | | | (#2170)
* general cleanup: Vas Crabb2017-05-231-1/+1
| | | | | | | | | | | * move rarely-used output and pty interfaces out of emu.h * consolidate and de-duplicate forward declarations, also remove some obsolete ones * clean up more #include guard macros * scope down a few more things (nw) Everyone, please keep forward declarations for src/emu in src/emu/emufwd.h - this will make it far easier to keep them in sync with declarations than having them scattered through all the other files.
* srcclean (nw) Vas Crabb2017-04-231-1/+1
|
* disable: Better interface (nw) Olivier Galibert2017-03-261-42/+20
|
* disable: reverse polarity (nw) Olivier Galibert2017-03-261-10/+10
|
* Fixed writes to decrypted opcode memory [v3] (#2190) PugsyMAME2017-03-261-3/+48
| | | | | | | | | Fixes problem in the debugger and the cheat engine as currently the writes to opcode memory are not handled correctly, so separated EXPSPACE_RAMWRITE and EXPSPACE_OPCODE case statements to allow opcode writes to access the correct memory. Example: In flicky this will now disable cat collisions with the main sprite: maincpu.ob@3ac6=c3 This is the simplest way of updating this, EXPSPACE_OPCODE is now a copy of EXPSPACE_RAMWRITE except it uses AS_DECRYPTED_OPCODES instead of AS_PROGRAM. This method means I've got a lot of work updating a lot of cheat file warnings ...but this is the correct way of doing this.
* srcclean (nw) Vas Crabb2017-03-261-1/+1
|
* Revert "Fixed writes to decrypted opcode memory" (#2185) Olivier Galibert2017-03-241-41/+10
|
* Fixed writes to decrypted opcode memory PugsyMAME2017-03-241-10/+41
| | | | | | | Fixes problem in the debugger and the cheat engine as currently the writes to opcode memory are not handled correctly, so separated EXPSPACE_RAMWRITE and EXPSPACE_OPCODE case statements to allow opcode writes to access the correct memory. Example: In flicky this will now disable cat collisions with the main sprite: maincpu.ob@3ac6=c3
* debugger: print octal addresses in the trace if CPU is octal. Sergey Svishchev2017-03-161-1/+8
|
* debugger_access: Refactor [O. Galibert] Olivier Galibert2017-03-021-87/+35
|
* Self-registering devices prep: Vas Crabb2017-02-271-4/+10
| | | | | | | | | | | | | | * Make device_creator a variable template and get rid of the ampersands * Remove screen.h and speaker.h from emu.h and add where necessary * Centralise instantiations of screen and speaker finder templates * Add/standardise #include guards in many hearers * Remove many redundant #includes * Order #includesr to help catch headers that can't be #included alone (nw) This changes #include order to be prefix, unit header if applicable then other stuff roughly in order from most dependent to least dependent library. This helps catch headers that don't #include things that they use.
* srcclean (nw) Vas Crabb2017-01-221-1/+1
|
* Merge pull request #1987 from npwoods/tracesym_debugger_command R. Belmont2017-01-171-2/+2
|\ | | | | Created a new debugger command 'tracesym'
| * Created a new debugger command 'tracesym' Nathan Woods2017-01-151-2/+2
| | | | | | | | 'tracesym' is intended to be a shorthand of 'tracelog', whereby the user doesn't have to specify a format string; the default format string is used