summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/debug
Commit message (Collapse)AuthorAgeFilesLines
* Robustified key behavior when the debugger is visible. Should now Aaron Giles2008-07-174-4/+30
| | | | | | | | | | | properly ignore the "break into debugger" keypress and not allow related characters to filter through. Removed some hacks related to making that work in the past. Changed osd_wait_for_debugger() to take a machine parameter and a "firsttime" parameter, which is set to 1 the first time the function is called after a break. The Windows debugger uses this to ensure that the debugger has focus when you break into it.
* Cleanups. Aaron Giles2008-07-172-41/+41
|
* Changed direct access EEPROM interface to return the "bus width" of the Aaron Giles2008-07-177-126/+647
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | EEPROM data, and the size is in terms of units, not bytes. Updated all drivers accordingly. Changed the ROM loading code to actually alter the region flags based on the CPU endianness and bus width when creating the region, rather than fixing them up on the fly. This means that callers to memory_region_flags() will get the correct results. Changed the expression engine to use two callbacks for read/write rather than relying on externally defined functions. Expanded memory access support in the expression engine. Memory accesses can now be specified as [space][num]<size>@<address>. 'space' can be one of the following: p = program address space of CPU #num (default) d = data address space of CPU #num i = I/O address space of CPU #num o = opcode address space of CPU #num (R/W access to decrypted opcodes) r = direct RAM space of CPU #num (always allows writes, even for ROM) e = EEPROM index #num c = direct REGION_CPU#num access u = direct REGION_USER#num access g = direct REGION_GFX#num access s = direct REGION_SOUND#num access The 'num' field is optional for p/d/i/o/r, where is defaults to the current CPU, and for e, where it defaults to EEPROM #0. 'num' is required for all region-related prefixes. Some examples: w@curpc = word at 'curpc' in the active CPU's program address space dd@0 = dword at 0x0 in the active CPU's data address space r2b@100 = byte at 0x100 from a RAM/ROM region in CPU #2's program space ew@7f = word from EEPROM address 0x7f u2q@40 = qword from REGION_USER2, offset 0x40 The 'size' field is always required, and can be b/w/d/q for byte, word, dword, and qword accesses.
* Note: I have done some testing, but there are probably more bugs Aaron Giles2008-07-121-1/+2
| | | | | | | | | | | | | | | | | | | lurking. If you run into anything odd, please let me know. Added new module uiinput.c which manages input for the user interface. The OSD is responsible for pushing mouse events and character events to this interface in order to support mouse movement and text-based input (currently only used for the select game menu). Added support for navigating through the menus using the mouse. [Nathan Woods, Aaron Giles] Redesigned the UI menus so that they can maintain a richer state. Now the menus can be generated once and reused, rather than requiring them to be regenerated on each frame. All menus also share a comment eventing system and navigation through them is managed centrally. Rewrote all the menus to use the new system, apart from the cheat menus, which are now disabled. Reorganized the video menu to make it easier to understand. [Aaron Giles]
* Cleanups and version bump.mame0125u9 Aaron Giles2008-07-031-8/+8
|
* Changed how watchpoints work so that supporting them adds 0 overhead Aaron Giles2008-06-282-71/+64
| | | | | | unless some are actually live. Changed a few call sites from using memory_set_context() to cpuintrf_push_context().
* GCC 64-bit compile fix R. Belmont2008-06-261-1/+1
|
* Cleanups/version bump.mame0125u7 Aaron Giles2008-06-261-30/+30
|
* Removed DEBUGGER flag from makefile and ENABLE_DEBUGGER Aaron Giles2008-06-265-785/+991
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | macro from the source code. All MAME builds now include the debugger, and it is enabled/disabled exclusively by the runtime command-line/ini settings. This is a minor speed hit for now, but will be further optimized going forward. Changed the 'd' suffix in the makefile to apply to DEBUG builds (versus DEBUGGER builds as it did before). Changed machine->debug_mode to machine->debug_flags. These flags now indicate several things, such as whether debugging is enabled, whether CPU cores should call the debugger on each instruction, and whether there are live watchpoints on each address space. Redesigned a significant portion of debugcpu.c around the concept of maintaining these flags globally and a similar, more complete set of flags internally for each CPU. All previous functionality should work as designed but should be more robust and faster to work with. Added new debugger hooks for starting/stopping CPU execution. This allows the debugger to decide whether or not a given CPU needs to call the debugger on each instruction during the coming timeslice. Added new debugger hook for reporting exceptions. Proper exception breakpoints are not yet implemented. Added new module debugger.c which is where global debugger functions live.
* Do not stop in the debugger while we are waiting for a pending Aaron Giles2008-06-241-1/+1
| | | | | event to occur. This eliminates some confusion during reset and state loading.
* From: Atari Ace [mailto:atari_ace@verizon.net] Aaron Giles2008-06-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | Subject: [patch] memory_region madness reloaded Hi mamedev, The memory_region and memory_region_length functions are probably the two most common functions in MAME that don't take a machine parameter but should given the syntax of the related apis memory_region_type and memory_region_flags. Clearly they didn't get the parameter because of the sheer number of changes needed to change the apis. This pair of patches makes the change, and deals with the consequences. The second patch then changes the api for memory_region and memory_region_length, and fixes the fallout. It generally plumbs through machine parameters where needed, except for the case of sound apis which I deferred doing so till later. This increased the number of deprecat.h includes by ~50. Given it is a massive patch, there are bound to be a few mistakes in it (I had to make ~20% of the changes by hand), but I exercised care and reviewed the patch several times to minimize the problems.
* Cleaned up software bilinear filtering code. Added bounds checking. Aaron Giles2008-06-161-1/+1
| | | | | | | | | | | | | | | | | | | | | Enabled by default for snapshots and movie rendering. Added new option: -snapsize, which lets you specify the target resolution for snapshots and movies. The existing behavior is still the default: create snapshots and movies at native pixel resolutions. Added new option: -snapview, which lets you specify a particular view to use for rendering snapshots and movies. The existing behavior is still the default: use a special internal view and render each screen to its own snapshot in its own file. When using this option to specify a view other than 'internal', only a single snapshot file will be produced regardless of how many screens the game has. Improved AVI and MNG recording to properly duplicate/skip frames as appropriate to keep the correct framerate.
* map command in the debugger now does separate read/write/fetch lookups Aaron Giles2008-06-091-12/+16
|
* Several miscellaneous changes: Aaron Giles2008-05-294-35/+35
| | | | | | | | | | | | | | | | | | | | | | | | 1. In the MIPS core: - renamed struct mips3_config -> mips3_config - updated all drivers to the new names - removed MIPS3DRC_STRICT_COP0 flag, which is no longer used - a few minor cleanups 2. In the CPU interface: - added new 'intention' parameter to the translate callback to indicate read/write/fetch access, user/supervisor mode, and a flag for debugging - updated all call sites to pass an appropriate value - updated all CPU cores to the new prototype 3. In the UML: - added new opcode SETC to set the carry flag from a source bit - added new opcode BSWAP to swap bytes within a value - updated C, x86, x64 back-ends to support the new opcodes - updated disassembler to support the new opcodes 4. In the DRC frontend: - fixed bug in handling edge case with the PC near the 0 or ~0
* Restructured input port internals and cleaned up inptport.c: Aaron Giles2008-05-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Input ports are now maintained hierarchically. At the top level are input ports, which contain a list of fields. Each field represents one or more bits of the port. Certain fields such as DIP switches and configuration switches contain a list of settings, which can be selected. DIP switch fields can also contain a list of DIP switch locations. * Normalized behavior of port overrides (via PORT_INCLUDE or by defining multiple overlapping bits). All fields within a port are kept in strict increasing bit order, so altered DIP switches are now kept in the appropriate order. This addresses MAMETesters bug 01671. * Live port state is now fully separate from configured state. This is manifested in a similar way to devices, where a const list of ports can be managed either offline or live. Each port has a pointer to an opaque set of live state which is NULL when offline or valid when live. Each port also has a running_machine * which is also NULL when offline. * Because of this new arrangement, the conversion from tokens to a list of ports now requires reasonably complex memory allocation, so these port lists must be explicitly allocated and freed (they are not mantained by automatic resource allocation). * Custom and changed callbacks now take a pointer to a field config instead of a running machine. This provides more information about what field triggered the change notification. The machine can be found by referenced field->port->machine. * The inptport.c module has been cleaned up and many ambiguities resolved. Most of this is internal, though it did result in osd_customize_inputport_list() being changed to osd_customize_input_type_list(). The parameter to this function is now a linked list instead of an array, and the structures referenced have been reorganized somewhat. * Updated config.c to pass machine parameters to its callbacks. * Updated validity checks, XML output, and UI system to handle the new structures. * Moved large table of default input settings to a separate include file inpttype.h. * Removed gross hacks in trackfld and hyperspt NVRAM. These may be broken as a result.
* From: Atari Ace [mailto:atari_ace@verizon.net] Aaron Giles2008-05-151-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | Subject: [patch] Remove opbase globals from the public interface Hi mamedev, There are several variables associated with opbase handling which are global and documented in memory.h and thus their use is not well controlled. This patch attempts to remedy this. Because they are used in various inline memory functions, they can't yet be made local to memory.c, but by rescoping their declaration they can be hidden, much like we hide totalcpu. Most of the uses are in OPBASE_HANDLER() macros, so by encapsulating the opbase state into a struct and adding that to the handler interface those can be converted to local variable manipulation. There is one use in missile.c in a MACHINE_START that I simply removed, it shouldn't be needed. One side effect of this patch is that the various unsafe memory macros can't be used directly, they will be a compiler error now. That is probably for the best. ~aa
* Flipped the damn mem_mask. It is no longer inverted when passed to Aaron Giles2008-04-201-5/+1
| | | | | | | read/write handlers. Updated all drivers accordingly. Hope I didn't miss anything important! Blame OG and smf for goading me into it. :)
* Cleanups and version bump to 0.124u1.mame0124u1 Aaron Giles2008-04-031-1/+1
|
* From: Oliver Stoeneberg [mailto:oliverst@online.de] Aaron Giles2008-04-022-2/+2
| | | | | | | | | | | | | Subject: Machine -> machine cleanups This patch changes "Machine" to "machine", when the runnin-machine parameter is already available. In some cases I could even remove the dprecat.h. I will look for some occurances where it can be easily changed and afterward take a step at adding the running_machine parameter in a few places.
* Passes mem_mask to the read and write debug hooks. This allows the address & ↵ smf-2008-03-272-14/+45
| | | | size of the memory access to be correctly calculated when using a memory call that takes a mem_mask. Unexpected results will occur if you pass in a mem_mask that has a gap in. For example 0x00ff00ff is treated as a 3 byte operation, a watchpoint for the gap will still trigger. To simplify the mem_mask decoding it is inverted before passing to the debugger.
* reverted, I misunderstood something and it's broken. I'm on it. smf-2008-03-272-45/+14
|
* Passes mem_mask to the read and write debug hooks. This allows the address & ↵ smf-2008-03-272-14/+45
| | | | size of the memory access to be correctly calculated when using a memory call that takes a mem_mask. While testing I found that the address had already had it's lower bits masked out, so watch points were broken already. Unexpected results will occur if you pass in a mem_mask that has a gap in. For example 0x00ff00ff is treated as a 3 byte operation, a watchpoint for the gap will still trigger. To simplify the mem_mask decoding it is inverted before passing to the debugger.
* Renamed *_vbl_cb to *_vblank_callback. Aaron Giles2008-03-141-1/+1
| | | | | | Fixed 01475: Screenless systems are broken because of a vblank callback. We now create an artificial update mechanism when there are no screens.
* Removes "global" VBLANK callback hack Zsolt Vasvari2008-03-121-2/+3
|
* - More machine->screen removal Zsolt Vasvari2008-03-111-2/+1
| | | | - Hooked up swapped videoram in Karnov properly -- same idea as Burger Time
* All video_screen_*_scrnum functions have been removed. Next step is to ↵ Zsolt Vasvari2008-03-101-2/+14
| | | | remove the scrnum from VIDEO_UPDATE
* Voodoo now takes a device_config for the screen Zsolt Vasvari2008-03-101-2/+4
| | | | | Added video_screen_get_visible_area()
* Changes MC6845 to take a screen tag instead of a screen number Zsolt Vasvari2008-03-091-5/+6
|
* Changes first argument of video_screen_* functions to take a device_config Zsolt Vasvari2008-03-092-4/+4
| | | | | | | All callers that used 0 for the screen number now use machine->primary_screen As a gap meassure, Where necessary, create a parallel set of video_screen_*_scrnum functions that take scrnum All callers that specified a specific screen number now call the *_scrnum versions Changed game info screen and overlay UI to display the screen tag instead of screen number
* Seperates out the notion of screen specific vs. "global" VBLANK callbacks Zsolt Vasvari2008-03-071-2/+2
| | | | "Global" VBLANK callbacks, of course, make no conceptual sense -- it should probably fire every once in a while even if there is no screen
* Removed runnning_machine as the first parameter of a VBLANK callback Zsolt Vasvari2008-03-071-1/+1
| | | | video.c: some Machine->machine changes
* debug build - fixed compilation error and warning. Tomasz Slanina2008-03-061-1/+1
|
* VBLANK based watchdogs can be disabled once again Zsolt Vasvari2008-03-051-1/+0
| | | | Removed debugging fprintf
* Normalized function pointer typedefs: they are now all Aaron Giles2008-03-032-4/+4
| | | | | | | | | | suffixed with _func. Did this throughout the core and drivers I was familiar with. Fixed gcc compiler error with recent render.c changes. gcc does not like explicit (int) casts on float or double functions. This is fracking annoying and stupid, but there you have it.
* - Moves all video timing logic from cpuexec.c to video.c Zsolt Vasvari2008-03-012-18/+20
| | | | | | | | | - Added a video_screen_register_vbl_cb() function for registering VBLANK callbanks - Changed inptport.c and debugcpu.c to make use the VBLANK callbacks - Added video_screen_get_time_until_vblank_start() - CCPU and anything using cpu_scalebyfcount() are currently broken - I did some fairly extensive testing, but this is a very signficant internal change, so some things may have broke
* The term "driver" is way overloaded in the system. Aaron Giles2008-02-181-1/+1
| | | | | machine->drv is now machine->config. Sorry.
* Fixes error: Andrew Gardner2008-02-031-6/+9
| | | | | pool_object_add (via src/emu/debug/debugcmt.c:107): Attempted to add a NULL object of size 0 This was happening when mame_debug_init was being called with 0 CPUs (eg. when starting MAME from the command line without a ROMset specified).
* From: Atari Ace [mailto:atari_ace@verizon.net] Aaron Giles2008-02-031-1/+1
| | | | | | | | | | | | | Subject: [patch] Fix some comments Hi mamedev, The following patch updates the initialization comments at the top of mame.c and corrects/adds a few filename declarations at the top of a handful of files. ~aa
* Changed debugger-related code to be based off a new makefile define ↵ Aaron Giles2008-02-021-2/+1
| | | | | | | | | | | | | (DEBUGGER) which sets a new compile-time define (ENABLE_DEBUGGER). This means that MAME_DEBUG no longer means "enable debugger", it simply enables debugging features such as assertions and debug code in drivers. Also removed the various levels of opbase protection in memory.h and always just turned on full bounds checking. Fixed build break due to missing ampoker.lay -> ampoker2.lay renaming.
* - Added deprecat.h that contains some deprecated/discouraged contructs (see ↵ Zsolt Vasvari2008-01-254-2/+4
| | | | | | | | | below) The idea is to create extra work if a driver wants to use these and hopefully gives an incentive to look for an alternate solution - Added #include of deprecat.h that rely on these contructs - Removed a bunch of unneccassary #include's from these files
* First in a series of updates to remove the use of the global Machine from as ↵ Zsolt Vasvari2008-01-241-1/+1
| | | | many places as possible
* Fixed default memory view width for CPUs with >byte-sized minimum Aaron Giles2008-01-211-2/+8
| | | | Made menu updating dynamic at click time, fixing issues with incorrect checkmarks
* (From Oliver Stoneberg) Aaron Giles2008-01-071-0/+6
| | | | Added missing debugger commands to the help.
* Copyright cleanup: Aaron Giles2008-01-0616-16/+16
| | | | | | - removed years from copyright notices - removed redundant (c) from copyright notices - updated "the MAME Team" to be "Nicola Salmoria and the MAME Team"
* (From Oliver Stoneberg) Aaron Giles2008-01-032-5/+2
| | | | | This patch fixes a few UNICODE=1 issues in the disassembly and memory windows of the MAME debugger. I also removed two redundant arrays.
* (From Oliver Stoneberg) Aaron Giles2008-01-031-1/+1
| | | | | | | This is an updated version of my earlier ATTR_PRINTF patch. It was reviewed by Atari Ace to use ATTR_PRINTF properly and fixes even more format errors. I also reviewed the whole source again and it is now used in all possible places.
* (From Atari Ace) Aaron Giles2007-12-311-7/+2
| | | | | | | | The attached patch adjusts most conditional logging in MAME to use the idiom "do { if (VERBOSE) logerror x; } while (0)". This has the benefit that the compiler checks the syntax of the logging even in the case it will be eliminated, and in fact a number of cases here needed adjustments to compile because of this.
* fixed help for wpset to match the required syntax for checking the data written. smf-2007-12-301-1/+1
|
* Changes for MAME 0.121u4.mame0121u4 Aaron Giles2007-12-174-6/+12
|
* Changes for MAME 0.121u2.mame0121u2 Aaron Giles2007-12-171-1/+1
|