summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/debug/express.c
Commit message (Collapse)AuthorAgeFilesLines
* Rename *.c -> *.cpp in our source (nw) Miodrag Milanovic2015-11-081-1753/+0
|
* moved all to std::string (nw) Miodrag Milanovic2015-04-221-4/+4
|
* removed bool conversion and implicit empty check (nw) Miodrag Milanovic2015-04-191-1/+1
|
* more conversions to std::string (nw) Miodrag Milanovic2015-04-191-23/+23
|
* There is no implicit conversion to char* in std::string (nw) Miodrag Milanovic2015-04-121-5/+5
|
* cstr() - > c_str() as preparation for move to std::string (nw) Miodrag Milanovic2015-04-111-8/+8
|
* Fix uninitialized auto; should fix instances where a game with cheats active ↵ Scott Stone2014-07-211-1/+2
| | | | using multiple expressions in one action crashes at start. [m4st4]
* Moved eminline and related files into /src/osd since it's system related (nw) Miodrag Milanovic2014-04-161-2/+2
| | | | | | | | Moved delegates into /src/lib/util to enable usage of delegates in other project parts Moved mame_printf_* calls into /src/osd/osdcore.c and renamed them to osd_printf_* Changed mess.mak to display compilation of ymmu100.ppm nicely
* Bulk convert files that already had standard BSD license in my name Aaron Giles2013-10-161-31/+2
| | | | to new license tagged form.
* Cleanups and version bumpmame0148 Miodrag Milanovic2013-01-111-118/+118
|
* make expression functions work (nw) cracyc2012-11-041-2/+2
|
* Removed old C-based interface to astrings. astring exists only as Aaron Giles2012-01-031-3/+3
| | | | | | a class now. Updated all stragglers (mostly tools) to use the class form. [Aaron Giles]
* - Removing MD5 support in ROMLOAD_* [Oliver Stoneberg] Miodrag Milanovic2011-07-311-2/+1
| | | | - Various core and tools memory leaks fixes [Oliver Stoneberg]
* Created new enum type address_spacenum for specifying an address Aaron Giles2011-03-271-3/+3
| | | | | | | | | | | | space by index. Update functions and methods that accepted an address space index to take an address_spacenum instead. Note that this means you can't use a raw integer in ADDRESS_SPACE macros, so instead of 0 use the enumerated AS_0. Standardized the project on the shortened constants AS_* over the older ADDRESS_SPACE_*. Removed the latter to prevent confusion. Also centralized the location of these definitions to memory.h.
* Move generic templates from emucore.h to emutempl.h. Aaron Giles2011-02-071-4/+5
| | | | | | Normalize the tagged_list template to wrap a regular standard_list and have similar semantics. Updated a few direct callers to handle the changes.
* Cleanup & version bump.mame0140u1 Aaron Giles2010-11-081-40/+40
|
* Fix issues with setting condition expressions on break/watchpoints. Aaron Giles2010-11-081-15/+20
|
* OSX compile fix. Tomasz Slanina2010-11-011-0/+1
|
* Converted the expression engine to C++, did the usual cleanup. Aaron Giles2010-11-011-1633/+1243
|
* Cleanups and version bump. Aaron Giles2010-05-051-11/+11
|
* Disable many unused variables as identifed by cppcheck. [Oliver Stöneberg] Scott Stone2010-04-231-2/+4
|
* several cleanups based on cppcheck and VS2008 Code Analysis [Oliver Stöneberg] Fabio Priuli2010-03-171-1/+1
| | | | | | | | | | | | | split.c: made the "split" return the actual result instead of just 0. [Oliver Stöneberg] clifront.c: made the identation of the CPU device in -listdevices the same like the others [Oliver Stöneberg] i386.c: gave some fatalerror() calls in the i386 proper messages [Oliver Stöneberg] ssem.c: fixed compilation of SSEM core with SSEM_DISASM_ON_UNIMPL [Oliver Stöneberg] srcclean.c: small wording change in the srcclean summary [Oliver Stöneberg] sdl/window.c: fixed a potential memory leak in sdlwindow_video_window_create() [Oliver Stöneberg]
* Make mips register names accessible in the debugger expressions [Olivier ↵ Olivier Galibert2010-02-191-2/+2
| | | | | | | | | | Galibert] The trick is to lookup the register name before treating '$' as announcing an hex value. It doesn't make anything impossible or even hard since even if you have the register name '$a0' you can still use a bare 'a0' or an explicit '0xa0' to get to the value. Symmetrically, '$a0' still works for the hex value on say m68k with 'a0' as the register.
* All files modified here solely depend on osdcore.h. Therefore changed all ↵ Couriersud2010-01-171-14/+14
| | | | malloc/free to osd_malloc and osd_free.
* Cleanups and version bump. Aaron Giles2010-01-161-2/+2
|
* NOTE: This change requires two new osd functions: osd_malloc() and Aaron Giles2010-01-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | osd_free(). They take the same parameters as malloc() and free(). Renamed mamecore.h -> emucore.h. New C++-aware memory manager, implemented in emualloc.*. This is a simple manager that allows you to add any type of object to a resource pool. Most commonly, allocated objects are added, and so a set of allocation macros is provided to allow you to manage objects in a particular pool: pool_alloc(p, t) = allocate object of type 't' and add to pool 'p' pool_alloc_clear(p, t) = same as above, but clear the memory first pool_alloc_array(p, t, c) = allocate an array of 'c' objects of type 't' and add to pool 'p' pool_alloc_array_clear(p, t, c) = same, but with clearing pool_free(p, v) = free object 'v' and remove it from the pool Note that pool_alloc[_clear] is roughly equivalent to "new t" and pool_alloc_array[_clear] is roughly equivalent to "new t[c]". Also note that pool_free works for single objects and arrays. There is a single global_resource_pool defined which should be used for any global allocations. It has equivalent macros to the pool_* macros above that automatically target the global pool. In addition, the memory module defines global new/delete overrides that access file and line number parameters so that allocations can be tracked. Currently this tracking is only done if MAME_DEBUG is enabled. In debug builds, any unfreed memory will be printed at the end of the session. emualloc.h also has #defines to disable malloc/free/realloc/calloc. Since emualloc.h is included by emucore.h, this means pretty much all code within the emulator is forced to use the new allocators. Although straight new/delete do work, their use is discouraged, as any allocations made with them will not be tracked. Changed the familar auto_alloc_* macros to map to the resource pool model described above. The running_machine is now a class and contains a resource pool which is automatically destructed upon deletion. If you are a driver writer, all your allocations should be done with auto_alloc_*. Changed all drivers and files in the core using malloc/realloc or the old alloc_*_or_die macros to use (preferably) the auto_alloc_* macros instead, or the global_alloc_* macros if necessary. Added simple C++ wrappers for astring and bitmap_t, as these need proper constructors/destructors to be used for auto_alloc_astring and auto_alloc_bitmap. Removed references to the winalloc prefix file. Most of its functionality has moved into the core, save for the guard page allocations, which are now implemented in osd_alloc and osd_free.
* Exposed an address space for EEPROM devices. This has several Aaron Giles2009-12-281-2/+0
| | | | | | | | | | | | | | | | | | side-effects: - EEPROM memory is now visible in the debugger - EEPROM memory can be accessed like any CPU/device memory (i.e., use eeprom.b@<addr> instead of eeprom.eb@<addr>) Removed support in the expression engine for EEPROM-specific accesses. Updated all systems that muck directly with EEPROM memory to use memory accessors instead on the EEPROM address space. Extended the devtempl.h file to support device address spaces. Cleaned up romload a bit to make it clear that region flags are enforced for any device with an address space, not just CPUs.
* Results of running the latest srcclean. Aaron Giles2009-12-281-3/+3
|
* Memory references can now explicitly specify logical or physical access Aaron Giles2009-10-011-16/+35
| | | | | | by prepending with an 'l' or 'p'. Logical remains the default. Example: ppb@1000 = physical program space byte at address $1000. ldw@2000 = logical data space word at address $2000.
* Added casts to ensure proper values are passed to the ctype.h functions. Aaron Giles2009-06-251-6/+6
| | | | [Juergen Buchmueller]
* Cleanups and version bump. Aaron Giles2009-05-281-1/+1
|
* Sent: Monday, May 11, 2009 10:32 PM Aaron Giles2009-05-151-0/+4
| | | | | | | | | | | | | | | To: submit@mamedev.org Subject: LSHIFT/<< expression diff fix Tafoid pointed out that it's currently impossible to use '<<' in a cheat xml file, this fix adds an alternate LSHIFT to cheat.c and express.c and also adds the working '>>' as an alternate RSHIFT to express.c (not needed in cheat.c as >> parses fine) diff file attached
* Many casts added to the core files, and various other tweaks Aaron Giles2009-03-121-11/+11
| | | | to make them compile as either C or C++.
* Initialize some structs to fix warnings with some GCC versions. R. Belmont2009-01-221-0/+4
|
* Cleaned up device and sound interfaces to match the CPU Aaron Giles2008-12-191-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | interfaces when handling strings. Namely, the generic get_info functions allocate a temporary string and the device in question copies its string to the target, instead of assigning a const char *. Updated all device and sound cores to operate this way. Added the concept of a cpu_state_table, which is supplied by the CPU cores and which describes all the register state accessible to the debugger and other subsystems. The format of the table is such that most data can be simply fetched from memory without the further involvement of the CPU core, including the display of common formats. Extensibility points are available for custom display and for importing/exporting the data to intermediate variables for more complicated scenarios. Updated the ADSP21xx, TMS340x0, and i86 cores to use this. Removed the old debugger register list, which was never used. Replaced it with using ordering from the cpu_state_table. Renamed REG_PC -> REG_GENPC, REG_SP -> REG_GENSP, and REG_PREVIOUSPC -> REG_GENPCBASE. Updated a few spots that were using these directly. Moved these definitions into the end of the register area rather than leaving them outside which put them in a weird range.
* Further debugger cleanup. Symbol tables now have a global ref Aaron Giles2008-11-221-9/+23
| | | | | as well as a per-symbol ref. Debugcpu is now clear of active CPU references and global Machine references.
* Debugger interfaces cleanup. Still more to do but this compiles and Aaron Giles2008-11-211-6/+9
| | | | | | | works. Added callback parameters to the expression engine. Improved CPU parsing so you can use a CPU tag or index in most commands that take one. Switched to passing CPU and address space objects around where appropriate. Lots of other minor tweaks.
* CPUs, sound chips, devices, and ROM-regions which are specified by devices Aaron Giles2008-09-081-1/+1
| | | | | | | | | | | | | | | | | now have their tags auto-prefixed with the device's tag. This allows for multiple instances to be present. For example, the PR-8210 laserdisc player has a CPU with a tag of "pr8210". When it is included as a device by a driver, the driver may tag the device "laserdisc". The resulting final CPU tag name will be "laserdisc:pr8210". Also updated the debugger expression engine to support names with embedded colons. Added warnings to ensure that tags used for CPUs, sound chips, regions, and devices follow some basic rules: they should be less than 12 characters long, be all lower-case, and only contain letters, numbers, underscores, or dots (no spaces). This is to ensure that they can be used properly in debugger expressions and don't get too long or unwieldy to type (even 12 chars is a bit long).
* Fix GCC warning. R. Belmont2008-08-071-1/+1
|
* Cleanups and version bump.mame0126u4 Aaron Giles2008-08-071-4/+4
|
* Added expression validation callback to verify names for CPUs and Aaron Giles2008-08-071-24/+42
| | | | | | | | | | | | | | | | | | memory regions. Extended error codes to report incorrect memory spaces, memory names, or memory sizes. Added verification callback to the debugger to validate CPU and memory region names, as well as verifying that a requested address space exists for a given CPU. Added support for oneshot cheats (those with only an "on" script). They are activated via UI_SELECT in the cheat menu, and pop up a message when activated. Also added a "Reset All" item in the cheat menu to reset all cheats back to their default state, and added support for UI_SELECT on a non-oneshot cheat so that it resets that cheat to its default value. Restored previous behavior that allowed popmessage() messages to overlay menus and other UI.
* Added word alternates for operators in expressions: Aaron Giles2008-08-071-1/+41
| | | | | | | | | | | | | | | | | | | | | | | | | + plus - minus * times or mul / div % mod ! not ~ bnot && and & band || or | bor ^ bxor lt < le <= gt > ge >= eq == ne != Changed cheat escaping to automatically escape && & < and <= to and band lt and le.
* Cleanups/version bump.mame0126u3 Aaron Giles2008-07-311-5/+5
|
* Changed symbol table reference parameters to void * from UINT32. Aaron Giles2008-07-311-3/+3
|
* Changed space character for memory regions from re'g'ion to 'm'emory_region. Aaron Giles2008-07-291-1/+1
|
* Region classes go bye-bye. Aaron Giles2008-07-281-8/+2
|
* Changed the way memory regions are referenced. Instead of a single Aaron Giles2008-07-281-53/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | integer value, regions are now referred to by a region class and a region tag. The class specifies the type of region (one of CPU, gfx, sound, user, disk, prom, pld) while the tag uniquely specifies the region. This change required updating all the ROM region definitions in the project to specify the class/tag instead of region number. Updated the core memory_region_* functions to accept a class/tag pair. Added new memory_region_next() function to allow for iteration over all memory regions of a given class. Added new function memory_region_class_name() to return the name for a given CPU memory region class. Changed the auto-binding behavior of CPU regions. Previously, the first CPU would auto-bind to REGION_CPU1 (that is, any ROM references would automatically assume that they lived in the corresponding region). Now, each CPU automatically binds to the RGNCLASS_CPU region with the same tag as the CPU itself. This behavior required ensuring that all previous REGION_CPU* regions were changed to RGNCLASS_CPU with the same tag as the CPU. Introduced a new auto-binding mechanism for sound cores. This works similarly to the CPU binding. Each sound core that requires a memory region now auto-binds to the RGNCLASS_SOUND with the same tag as the sound core. In almost all cases, this allowed for the removal of the explicit region item in the sound configuration, which in turn allowed for many sound configurations to removed altogether. Updated the expression engine's memory reference behavior. A recent update expanded the scope of memory references to allow for referencing data in non-active CPU spaces, in memory regions, and in EEPROMs. However, this previous update required an index, which is no longer appropriate for regions and will become increasingly less appropriate for CPUs over time. Instead, a new syntax is supported, of the form: "[tag.][space]size@addr", where 'tag' is an optional tag for the CPU or memory region you wish to access, followed by a period as a separator; 'space' is the memory address space or region class you wish to access (p/d/i for program/data/I/O spaces; o for opcode space; r for direct RAM; c/u/g/s for CPU/user/gfx/sound regions; e for EEPROMs); and 'size' is the usual b/w/d/q for byte/word/dword/qword. Cleaned up ROM definition flags and removed some ugly hacks that had existed previously. Expanded to support up to 256 BIOSes. Updated ROM_COPY to support specifying class/tag for the source region. Updated the address map AM_REGION macro to support specifying a class/tag for the region. Updated debugger windows to display the CPU and region tags where appropriate. Updated -listxml to output region class and tag for each ROM entry.
* Cleanups. Aaron Giles2008-07-171-3/+3
|
* Changed direct access EEPROM interface to return the "bus width" of the Aaron Giles2008-07-171-65/+116
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Copyright cleanup: Aaron Giles2008-01-061-1/+1
| | | | | | - removed years from copyright notices - removed redundant (c) from copyright notices - updated "the MAME Team" to be "Nicola Salmoria and the MAME Team"