summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/debug/dvmemory.cpp
Commit message (Collapse)AuthorAgeFilesLines
* emu/debug, osd/modules/debugger/qt: Clean up #includes a bit AJR2024-09-301-1/+0
|
* Clean up several sprintf() deprecation warningss in non-3rdparty code. [R. ↵ arbee2023-06-031-4/+4
| | | | Belmont]
* mcs96: Translate first 256 bytes of main memory space to register space AJR2023-03-191-0/+2
| | | | * dvmemory.cpp: Fix oversight in recent refactoring (uninitialized variable)
* dimemory: Add the target address space to translate, wrap the constants Olivier Galibert2023-03-181-2/+3
| | | | divtlb: Wrap the constants
* dvmemory.cpp: Small refactoring; verify that data written to memory spaces ↵ AJR2022-05-221-10/+37
| | | | read back as the same values
* Fixed some debugger memory view annoyances and cleaned up Lua bindings. Vas Crabb2022-03-161-3/+17
| | | | | | | | | | | | Made the debugger memory view not depend on isprint which is affected by the global locale. Assume the OSD will display as ISO-8869-1 and replace problematic printable characters. Started changing Lua function bindings to use set_function to avoid potential issues related to ThePhD/sol2#608, and worked out what was causing problems with symbol table read_memory/write_memory. (They aren't really essential - you can do the same thing with the address space object itself, but they're easier to parameterise.)
* Debug memory view improvements AJR2021-10-271-33/+99
| | | | | | | | - Add options for 1-byte, 2-byte, 4-byte and 8-byte octal data display, which are selected automatically for memory spaces configured as octal. Octal data has also been made editable. - Add options for displaying addresses in decimal or octal as alternatives to the typical hexadecimal format. This also affects the address expression box. - Prevent the cursor from moving left from the first address or right from the maximum address. Note that the new options have only been hooked up for the Qt debugger. The Windows and OS X debuggers should also be updated to include them.
* dvmemory: remove outdated/unused FD1094_HACK hap2021-09-291-9/+0
|
* Move endianness type into lib/util header AJR2021-08-311-1/+1
|
* Fix exception in debug memory viewer selecting a floating point format when ↵ AJR2021-08-161-0/+2
| | | | the number of chunks per row is too small
* debugger/win/memorywininfo.cpp: Fix build AJR2021-08-161-1/+1
|
* dvmemory: Substitute strongly typed enum for magic numbers specifying data ↵ AJR2021-08-161-49/+55
| | | | format
* Fairly significant overhaul of Lua engine and some cleanup. Vas Crabb2020-11-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The things that were previously called device iterators are not iterators in the C++ sense of the word. This is confusing for newcomers. These have been renamed to be device enumerators. Several Lua methods and properties that previously returned tables now return lightweight wrappers for the underlying objects. This means creating them is a lot faster, but you can't modify them, and the performance characteristics of different operations varies. The render manager's target list uses 1-based indexing to be more like idiomatic Lua. It's now possible to create a device enumerator on any device, and then get subdevices (or sibling devices) using a relative tag. Much more render/layout functionality has been exposed to Lua. Layout scripts now have access to the layout file and can directly set the state of an item with no bindings, or register callbacks to obtain state. Some things that were previously methods are now read-only properties. Layout files are no longer required to supply a "name". This was problematic because the same layout file could be loaded for multiple instances of the same device, and each instance of the layout file should use the correct inputs (and in the future outputs) for the device instance it's associated with. This should also fix video output with MSVC builds by avoiding delegates that return things that don't fit in a register.
* -Switch to building MAME as C++17. Vas Crabb2020-11-151-16/+16
| | | | | | | * Updated sol2 to 3.2.2 * Updated pugixml to 1.10 * Increased minimum clang version to 6 * Cleaned up some stuff that can use new features
* 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)