summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/cpuint.c
Commit message (Collapse)AuthorAgeFilesLines
* Massive API cleanup/change. The primary goal is that all CPU- Aaron Giles2008-11-131-434/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | related APIs now take a device pointer instead of an index. All functions that take a CPU device are prefixed with cpu_* All functions that are globally related to cpu execution are prefixed with cpuexec_*. Below is a list of some of the mappings: cpu_boost_interleave -> cpuexec_boost_interleave cpunum_suspend -> cpu_suspend cpunum_resume -> cpu_resume cpunum_is_suspended -> cpu_is_suspended cpunum_get_clock -> cpu_get_clock cpunum_set_clock -> cpu_set_clock cpunum_get_clockscale -> cpu_get_clockscale cpunum_set_clockscale -> cpu_set_clockscale cpunum_get_localtime -> cpu_get_local_time cpunum_gettotalcycles -> cpu_get_total_cycles activecpu_eat_cycles -> cpu_eat_cycles activecpu_adjust_icount -> cpu_adjust_icount cpu_trigger -> cpuexec_trigger cpu_triggertime -> cpuexec_triggertime cpunum_set_input_line -> cpu_set_input_line cpunum_set_irq_callback -> cpu_set_irq_callback In addition, a number of functions retain the same name but now require a specific CPU parameter to be passed in: cpu_yield cpu_spin cpu_spinuntil_time cpu_spinuntil_int cpu_spinuntil_trigger cpu_triggerint Merged cpuint.c into cpuexec.c. One side-effect of this change is that driver reset callbacks are called AFTER the CPUs and devices are reset. This means that if you make changes to the CPU state and expect the reset vectors to recognize the changes in your reset routine, you will need to manually reset the CPU after making the change (since it has already been reset). Added a number of inline helper functions to cpuintrf.h for managing addresses Removed cpu_gettotalcpu(). This information is rarely needed outside of the core and can be obtained by looking at the machine->cpu[] array. Changed CPU interrupt acknowledge callbacks to pass a CPU device instead of machine/cpunum pair. Changed VBLANK and periodic timer callbacks to pass a CPU device instead of machine/cpunum pair. Renamed all information getters from cpu_* to cpu_get_* and from cputype_* to cputype_get_*.
* Major cpuintrf changes: Aaron Giles2008-11-101-10/+10
| | | | | | | | | | | | | | | | | | | | | | * added a set of cpu_* calls which accept a CPU device object; these are now the preferred means of manipulating a CPU * removed the cpunum_* calls; added an array of cpu[] to the running_machine object; converted all existing cpunum_* calls to cpu_* calls, pulling the CPU device object from the new array in the running_machine * removed the activecpu_* calls; added an activecpu member to the running_machine object; converted all existing activecpu_* calls to cpu_* calls, pulling the active CPU device object from the running_machine * changed cpuintrf_push_context() to cpu_push_context(), taking a CPU object pointer; changed cpuintrf_pop_context() to cpu_pop_context(); eventually these will go away * many other similar changes moving toward a model where all CPU references are done by the CPU object and not by index
* WARNING: This is a significant change. If you are risk-averse and Aaron Giles2008-11-061-22/+19
| | | | | | | | | | | | | | | | | | | | | working on something, hold off syncing. Defined macros for core CPU functions: CPU_INIT, CPU_RESET, CPU_EXIT, CPU_EXECUTE, along with macros for the name and for calling, in the spirit of the devintrf.h macros. More will come later. Changed init, reset, exit, and execute interfaces to be passed a const device_config * object. This is a fake object for the moment, but encapsulates the machine pointer and token. Eventually this will be a real device. Changed the CPU IRQ callbacks to a proper type, and added a device parameter to them. Updated all CPU cores to the new macros and parameters. Note that this changes the way we "pointer"-ify cores. I'll send an update shortly.
* Cleanups and version bump.mame0127u6 Aaron Giles2008-10-021-1/+1
|
* Stupid compiler. Aaron Giles2008-10-011-0/+3
|
* Changed 68000 interrupts to only trigger during execution. This Aaron Giles2008-10-011-0/+52
| | | | | | | | | | | means that multiple changes without any execution will be seen as atomic. It also means that PULSE_LINE no longer works for signalling IRQs. Added checks in the debug build to catch people who try to use PULSE_LINE for non-NMI and non-RESET input lines on CPUs that no longer support direct interrupt generation. Over time expect this list to increase.
* More gottlieb cleanup. Fixed rev 2 sound again, fleshed out memory Aaron Giles2008-08-011-0/+14
| | | | | | | | maps and behaviors according to the schematics. Hooked up coin counters. Added new functions cputag_set_input_line() to assert input lines via CPU tag instead of index.
* Removed DEBUGGER flag from makefile and ENABLE_DEBUGGER Aaron Giles2008-06-261-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* From: Oliver Stoeneberg [mailto:oliverst@online.de] Aaron Giles2008-04-111-12/+13
| | | | | | | | | Subject: change for cpunum_set_irq_callback() callback function This patch adds the running_machine* parameter to the function passed into cpunum_set_irq_callback() and adds the IRQ_CALLBACK macro for the callback function.
* From: Oliver Stoeneberg [mailto:oliverst@online.de] Aaron Giles2008-03-191-15/+0
| | | | | | | | | | | Subject: SH-4 debugger output fix This patch fixes "garbage" (newlines) in the debugger window when debugging the SH-4 CPU. It also conatins a small comment fix in video/playch10.c and the removal of some yet unused or just obsolete macros in emu/cpuint.h.
* The term "driver" is way overloaded in the system. Aaron Giles2008-02-181-2/+2
| | | | | machine->drv is now machine->config. Sorry.
* Changed debugger-related code to be based off a new makefile define ↵ Aaron Giles2008-02-021-2/+2
| | | | | | | | | | | | | (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.
* - Changed cpunum_set_input_line* functions to take running_machine as an ↵ Zsolt Vasvari2008-01-241-5/+5
| | | | | | argument - Added that fix the arm7dasm, otherwise I couldn't compile the code
* 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
* 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"
* (From Atari Ace) Aaron Giles2007-12-311-5/+1
| | | | | | | | 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.
* Changes for MAME 0.121u4.mame0121u4 Aaron Giles2007-12-171-1/+1
|
* Changes for MAME 0.121u2.mame0121u2 Aaron Giles2007-12-171-2/+2
|
* Initial checkin of MAME 0.121.mame0121 Aaron Giles2007-12-171-0/+390