summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/debug/dvmemory.cpp
Commit message (Collapse)AuthorAgeFilesLines
* emu/save.cpp: Fix bad SFINAE trick breaking segapcm.cpp, fix saving attotime ↵ Vas Crabb2020-09-141-1/+1
| | | | array on 32-bit Linux targets that align u64 on 32-bit boundaries
* emu: correct some file headers (nw) hap2020-06-191-1/+1
|
* Debugger expression and memory access overhaul AJR2020-05-251-113/+117
| | | | | | | | | | | | | - Memory references in expressions no longer default to the console's visible CPU if no device name was specified, except when entered through the console itself. Expressions in view windows now use the context of the currently selected device instead. - The pcatmem debug command and similar qt mouseover function now produce an error message if the initial address translation fails. Related internal changes (nw) - The debugger_cpu class no longer interprets memory accesses. The existing routines have been moved into symbol_table (which used to invoke them as callbacks), and reimplemented in most other places. Thecode duplication is a bit messy, but could be potentially improved in the future with new utility classes. - The cheat engine no longer needs to hook into the debugger_cpu class or instantiate a dummy instance of it. - The inclusion of debug/express.h within emu.h has been undone. Some debugging structures now need unique_ptr to wrap the resulting incomplete classes; hopefully the performance impact of this is negligible. Another direct consequence is that the breakpoint, watchpoint and registerpoint classes are no longer inside device_debug and have their own source file. - The breakpoint list is now a std::multimap, using the addresses as keys to hopefully expedite lookup. - The visible CPU pointer has been removed from the debugger_cpu class, being now considered a property of the console instead. - Many minor bits of code have been simplified.
* use C++ library includes (nw) firewave2020-01-221-1/+1
|
* Allow saving members of structures in n-dimensional arrays, even if the ↵ Vas Crabb2019-12-091-12/+18
| | | | members themselves are n-dimensional arrays - see qsoundhle.cpp for an example of loops disappearing. This can greatly reduce the number of save state registrations in some cases. Obviously I want to know if save states are broken in something by this.
* Make debugger view startup more efficient - it's still not going to be ↵ Vas Crabb2019-11-181-45/+51
| | | | practical with 200k save items, but it's better than before
* misc cleanup: Vas Crabb2019-11-181-6/+7
| | | | | | | * Got rid of some more simple_list in core debugger code * Fixed a buffer overrun in wavwrite (buffer half requried size) * Slightly reduced dependencies and overhead in wavwrite * Made new disassembly windows in Qt debugger default to current CPU
* dvmemory: migrate to softfloat3 (nw) Patrick Mackinlay2019-10-251-8/+8
|
* Make debug memory view show correct data when chunks are too small for a ↵ AJR2019-07-291-1/+26
| | | | space's address shift
* Fix debugger memory view editing for address-shifted spaces AJR2018-09-241-2/+4
|
* Fix scrolling glitch in memory view when address expression is applied AJR2018-08-121-3/+3
|
* Emulate V33/V53 expanded addressing mode, including BRKXA and RETXA instructions AJR2018-08-121-1/+1
| | | | Mask address expressions correctly in debug memory view when using physical addresses beyond logical limits
* prune upfront - makes the other stuff cheaper (nw) Vas Crabb2018-05-181-11/+5
|
* try this for size - emu.h no net change (nw) Vas Crabb2018-05-181-12/+9
|
* WARNING emu.h recompile! Curt Coder2018-05-181-8/+21
| | | | debugger: Show save state items in alphabetical order in the debugger view. [Curt Coder]
* Fix masking of offset expressions in debug view of address-shifted spaces (nw) AJR2018-03-121-8/+2
|
* Fix extent of debug view of address-shifted memory spaces AJR2018-03-111-2/+4
|
* Grammar police (nw) Olivier Galibert2018-02-241-2/+2
|
* Revert "Revert "Merge branch 'master' of https://github.com/mamedev/mame"" Firehawke2017-12-131-19/+38
| | | | This reverts commit 54155441e9ba9941e85d80c4834a66376a11e791.
* Revert "Merge branch 'master' of https://github.com/mamedev/mame" Firehawke2017-12-131-38/+19
| | | | | This reverts commit f537428e5a40ba6dde8ca9bf0fe9ae6b1f189ac4, reversing changes made to 0d70d798107d4e4e8fb9f230410aeb1e888d65c5.
* Yes another memory window fix (nw) Olivier Galibert2017-12-071-1/+3
|
* Fix the memory windows (nw) Olivier Galibert2017-12-031-18/+35
|
* emumem: API change [O. Galibert] Olivier Galibert2017-11-291-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* This is too contentious, please put it up for review Vas Crabb2017-08-011-15/+9
| | | | | | Revert "Changes to debugger memory address translation" This reverts commit bb0964f9a284b15851773f5428bd602ca01cc28b.
* Changes to debugger memory address translation AJR2017-08-011-9/+15
| | | | | | - 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.
* dimemory: Lift the cap on the number of address spaces per device [O. Galibert] Olivier Galibert2017-07-031-1/+1
|
* Changed a few 'const char *' ==> 'const std::string &' in the MAME debugger ↵ npwoods2017-06-241-1/+1
| | | | (#2170)
* Don't try to read past the end of a memory space in debug view AJR2017-06-221-3/+6
|
* general cleanup: Vas Crabb2017-05-231-2/+2
| | | | | | | | | | | * 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.
* debugger_access: Refactor [O. Galibert] Olivier Galibert2017-03-021-0/+4
|
* Introduce u8/u16/u32/u64/s8/s16/s32/s64 Vas Crabb2016-11-191-34/+34
| | | | | | | | | | | | * New abbreviated types are in osd and util namespaces, and also in global namespace for things that #include "emu.h" * Get rid of import of cstdint types to global namespace (C99 does this anyway) * Remove the cstdint types from everything in emu * Get rid of U64/S64 macros * Fix a bug in dps16 caused by incorrect use of macro * Fix debugcon not checking for "do " prefix case-insensitively * Fix a lot of messed up tabulation * More constexpr * Fix up many __names
* Moved device_memory_interface from driver_device to dummy_space_device. ↵ smf-2016-11-031-8/+7
| | | | Exposed the dummy_space_device as machine().dummy_space(), with a trampoline in driver_device for existing callers. Debugger no longer needs to special case root_device() to avoid showing the dummy address space. [smf]
* more TRUE/FALSE cleanup (nw) Miodrag Milanovic2016-10-221-1/+1
|
* NOTICE (TYPE NAME CONSOLIDATION) Miodrag Milanovic2016-10-221-30/+30
| | | | | Use standard uint64_t, uint32_t, uint16_t or uint8_t instead of UINT64, UINT32, UINT16 or UINT8 also use standard int64_t, int32_t, int16_t or int8_t instead of INT64, INT32, INT16 or INT8
* cleanup of some conversions (nw) Miodrag Milanovic2016-07-311-2/+2
|
* std::min and std:max instead of MIN and MAX, also some more macros converted ↵ Miodrag Milanovic2016-07-311-7/+7
| | | | to inline functions (nw)
* tagged_list to unordered_map in emumem (nw) Miodrag Milanovic2016-06-181-3/+3
|
* Major refactoring of debugger core [Ryan Holtz] therealmogminer@gmail.com2016-06-081-8/+9
| | | | | | | | * 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
* Iterate over devices C++11 style AJR2016-04-181-6/+5
| | | | | | Replace the old device_iterator and its specialized versions with functionally equivalent classes that use standard operators to yield references to devices/interfaces rather than pointers. With range-based for loops, they no longer have to be stored in named variables, though they can also be reused concurrently since the iteration state is now maintained by a subclass. Add a few more typical getters to device_t::subdevice_list.
* Iterate over core classes C++11 style AJR2016-03-311-3/+3
| | | | | | | | C++11 range-based for loops can now iterate over simple_list, tagged_list, core_options, device_t::subdevice_list, device_t::interface_list, render_primitive_list and all subclasses of the above, and much code has been refactored to use them. Most core classes that have these lists as members now have methods that return the lists themselves, replacing most of the methods that returned the object at an owned list's head. (A few have been retained due to their use in drivers or OSD.) device_t now manages subdevice and interface lists through subclasses, but has given up the work of adding and removing subdevices to machine_config. memory_manager has its tagged lists exposed, though the old rooted tag lookup methods have been removed (they were privatized already).
* Replace strformat, strprintf and strcatprintf with type-safe steam_format ↵ Vas Crabb2016-02-281-5/+5
| | | | | | | | | and string_format Update MAME to use new function Instantiate ODR-used static constant members Make some of the UI code more localisable Remove use of retired functions in tools
* reverting: Miodrag Milanovic2016-01-201-1/+1
| | | | | | | SHA-1: 1f90ceab075c4869298e963bf0a14a0aac2f1caa * tags are now strings (nw) fix start project for custom builds in Visual Studio (nw)
* Revert "rest of device parameters to std::string (nw)" Miodrag Milanovic2016-01-201-1/+1
| | | | This reverts commit caba131d844ade3f2b30d6be24ea6cf46b2949d7.
* Revert "Memory region to use std::string (nw)" Miodrag Milanovic2016-01-201-1/+1
| | | | This reverts commit 14d0bff4d0dca0fb6e6b7bd70e29b3d4f0d18061.
* Memory region to use std::string (nw) Miodrag Milanovic2016-01-201-1/+1
|
* rest of device parameters to std::string (nw) Miodrag Milanovic2016-01-161-1/+1
|
* tags are now strings (nw) Miodrag Milanovic2016-01-161-1/+1
| | | | fix start project for custom builds in Visual Studio (nw)
* Cleanups and version bumpmame0169 Miodrag Milanovic2015-12-301-1/+1
|
* macro removal INLINE -> static inline (nw) Miodrag Milanovic2015-12-121-2/+2
|
* Fixed uninitialized variables, detected by VS2015 x64 build (nw) Miodrag Milanovic2015-12-071-2/+2
|