summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/cpu/mips
Commit message (Collapse)AuthorAgeFilesLines
* From: Atari Ace [mailto:atari_ace@verizon.net] Aaron Giles2008-12-071-1/+0
| | | | | | | | | | | | | | | | | | Sent: Saturday, December 06, 2008 4:52 PM To: submit@mamedev.org Cc: atariace@hotmail.com Subject: [patch] Deprecat.h cleanup Hi mamedev, This patch changes some global Machine references to use machine, device->machine, ... instead, and removes any unneeded #include "deprecat.h" lines as well (about 10% of them in fact). It was generated using the attached script, and then reverting some cases where it was overzealous. ~aa
* Pointer-ified the mips3drc. Aaron Giles2008-12-061-209/+231
|
* activecpu_count -= 133 Aaron Giles2008-12-062-9/+9
| | | | Removed mostly silly uses of activecpu from the CPU cores.
* Changed save state system to accept machine parameters where Aaron Giles2008-12-052-26/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | appropriate, and to keep all global variables hanging off the machine structure. Once again, this means all state registration call sites have been touched: - state_save_register_global* now takes a machine parameter - state_save_register_item* now takes a machine parameter - added new state_save_register_device_item* which now uses the device name and tag to generate the base name Extended the fake sound devices to have more populated fields. Modified sound cores to use tags from the devices and simplified the start function. Renumbered CPU and sound get/set info constants to align with the device constants, and shared values where they were perfectly aligned. Set the type field in the fake device_configs for CPU and sound chips to a get_info stub which calls through to the CPU and sound specific get_info functions. This means the device_get_info() functions work for CPU and sound cores, even in their fake state. Changed device information getters from device_info() to device_get_info() to match the CPU and sound macros.
* CPU_IS_LE -> ENDIANNESS_LITTLE Aaron Giles2008-12-045-31/+31
| | | | | | CPU_IS_BE -> ENDIANNESS_BIG Also fixed help for step over/in to specify correct keys.
* Moves empty brackets to the same line as CPU_(GET|SET)_CONTEXT calls. Andrew Gardner2008-11-302-12/+4
| | | This makes it easy to grep the CPU code to figure out which cores still need pointer-ification.
* Changed timer_alloc, timer_set, timer_pulse, timer_call_after_resynch, Aaron Giles2008-11-261-1/+1
| | | | | and timer_get_time to pass the machine parameter. Moved timer globals to hang off of the running_machine.
* Removed globals from cpuexec. Aaron Giles2008-11-251-1/+1
| | | | | | | | Removed ATTOTIME_TO_CYCLES() and ATTOTIME_IN_CYCLES(). Replaced them with functions in cpuexec: cpu_clocks_to_attotime() and cpu_attotime_to_clocks(), both of which take CPU devices instead of indexes. Updated all callers, many of which were using the functions dubiously.
* Cleanups and version bump for 0.128u4.mame0128u4 Aaron Giles2008-11-242-2/+2
|
* change_pc? What change_pc? Aaron Giles2008-11-243-14/+0
|
* Removed NO_LEGACY_MEMORY_HANDLERS defines. Aaron Giles2008-11-242-2/+0
|
* NEC core converted. Aaron Giles2008-11-221-7/+0
|
* A few more conversions. Aaron Giles2008-11-224-403/+379
|
* Debugger interfaces cleanup. Still more to do but this compiles and Aaron Giles2008-11-214-5/+5
| | | | | | | 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.
* changed bios call logging to read registers directly & all other accesses to ↵ smf-2008-11-202-13/+11
| | | | Machine have been removed.
* Memory banking now requires a machine object. This makes the memory Aaron Giles2008-11-201-1/+1
| | | | | | | system fully global-free, apart from the "active_address_space" which will eventually go away. Also fixed compiler errors from last checkin.
* pedantic, probably should number from 1 instead of 0... smf-2008-11-201-6/+6
|
* removed excessive casts and fixed mvmva bug introduced in last commit. smf-2008-11-201-236/+221
|
* Another big one. Aaron Giles2008-11-203-6/+5
| | | | | | | | | | | | | | | | | | | | Moved memory global state into a struct hanging off of the machine. Updated almost all memory APIs to take an address_space * where appropriate, and updated all callers. Changed memory internals to use address spaces where appropriate. Changed accessors to point to the memory_* functions instead of the address space-specific functions. Improved internal handling of watchpoints. Added cputag_* functions: cputag_reset(), cputag_get_index(), cputag_get_address_space(). These just expand via macros to an initial fetch of the CPU via cputag_get_cpu() followed by the standard CPU call. Added debugger_interrupt_hook() and debugger_exception_hook() calls which intelligently look at the debugger flags before calling. Did minimal cleanup of debugger, mainly moving CPU-specific data to hang off of the CPU classdata for more direct access.
* pointerified the psx cpu core & switched it to the new memory functions. ↵ smf-2008-11-195-1502/+1543
| | | | Changed some MIPS_* to PSXCPU_*
* Generalized the concept of opbase access into "direct" access. Aaron Giles2008-11-174-7/+7
| | | | | | | | Removed opbase globals to the address_space structure. Cleaned up names of pointers (decrypted and raw versus rom and ram). Added inline functions to read/write data via any address space. Added macros for existing functions to point them to the new functions. Other related cleanups.
* Added "tag" parameter to state_save_register_item_* calls. Removed Aaron Giles2008-11-172-29/+29
| | | | | | state_save_combine_module_and_tag() function in favor of passing the tag when registering. Revisited all save state item registrations and changed them to use the tag where appropriate.
* WARNING: this compiles, but not fully cleanly, and a number of drivers Aaron Giles2008-11-142-11/+12
| | | | | | | | | | | | | | | | are broken. Changed READ/WRITE handlers to accept an address_space * instead of a machine *. The address_space object was enhanced to contain a machine and a pointer to the relevant CPU object. Fixed a number of errors found by the compiler, mostly in the core and CPU/sound handlers, but there is a lot remaining to fix. Added new function cpu_get_address_space() to fetch the address space for calling in manually to these functions. In some instances, code which should eventually be converted to a device is hard-coding fetching the program space of CPU #0 in order to have something valid to pass.
* This patch replaces the Machine parameter where an running_machine * Aaron Giles2008-11-133-5/+4
| | | | | | is available and removes the deprecat.h where unnecessary. [Oliver Stoeneberg]
* Massive API cleanup/change. The primary goal is that all CPU- Aaron Giles2008-11-134-10/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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_*.
* Added CPU device parameters to all CPU callbacks except for the Aaron Giles2008-11-101-21/+22
| | | | | | | | context ones (which are going away), the disassembler (which should have no dependencies on the live CPU), and the validity check. Removed global token from all pointer-ified CPU cores that don't have internal read/write callbacks (which still need to reference it).
* Major cpuintrf changes: Aaron Giles2008-11-104-20/+22
| | | | | | | | | | | | | | | | | | | | | | * 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
* Populated tag and static_config parts of fake CPU device. Removed 'config' Aaron Giles2008-11-095-41/+42
| | | | | parameter from CPU_INIT. Modified CPU cores to pull config from the device static_config.
* Cleanups/version bump.mame0128u3 Aaron Giles2008-11-091-3/+3
|
* From: Atari Ace [mailto:atari_ace@verizon.net] Aaron Giles2008-11-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Sent: Wednesday, November 05, 2008 8:22 AM To: submit@mamedev.org Cc: atariace@hotmail.com Subject: [patch] Add ADDRESS_MAP_NAME macro Hi mamedev, In theory, MAME's interface macros should completely hide the naming conventions from the drivers and sound/cpu cores. So as an experiment, I renamed all the core apis and looked to see what broke. The most common api coupling was with address maps in the CPU cores, which this patch addresses by introducing a new macro, ADDRESS_MAP_NAME (mimicing what is done in devintrf.h). There were a handful of related problems in some drivers which this patch also fixes. Some remaining issues I left alone (laserdisk apis reference rom, video_update, machine_config, ksys573 use of nvram_handler, megadriv use of ipt), in principle all the apis need _NAME variants to encode the conventions. ~aa
* Added macros for all CPU callbacks to ease future changes. Aaron Giles2008-11-087-103/+103
| | | | Updated all CPU cores to use them.
* WARNING: This is a significant change. If you are risk-averse and Aaron Giles2008-11-066-127/+129
| | | | | | | | | | | | | | | | | | | | | 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.
* Pointer-ified the R3000 core. Aaron Giles2008-11-041-450/+468
|
* Here's another MAME tidy patch. This one adds missing const/statics, Aaron Giles2008-11-021-2/+0
| | | | | | | | | | adds/removes entries in header files, and fixes a few potential multisession issues by explicitly adding initializers. asic65.c has significant changes to accomodate using a struct instead of 16 variables, otherwise the changes in this patch are modest and obvious. [Atari Ace]
* From Oliver Stoeneberg [oliverst@online.de] Aaron Giles2008-09-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | | This contains three different patches: 20080829.patch Introducing the running_machine* parameter in a few more places. Next step would be to make the execute_* function aware of it, if that's OK. Also used the machine parameter in memory.c were it's available. 20080829_1.patch The already discussed and probably being rejected removal of dreprecat.h from debugger.h. I think this is a low-risk patch (we had worse cleanups) and it lowers the risk of new code using deprecated function beign introduced in MAME/MESS, because there is no invisible inclusion of deprecat.h anymore (I think one driver - kofball.c - got it with deprecated code). 20080829_2.patch The last Machine -> machine conversion I had sitting in my local tree. I know the proper way is to turn them into devices, but I still haven't looked into that.
* From: Oliver Stoeneberg [mailto:oliverst@online.de] Aaron Giles2008-08-191-1/+1
| | | | | | | | | | | | Subject: Various cleanups A couple of minor cleanups sitting on my disk for a while: - removed obsolete ENABLE_DEBUGGER occurance - removed more unprintable characters in SH-2 disassembler - memset() usage cleanups - removed duplicated TMS5110 entry in sound.mak - use machine in uigfx.c where it's already available
* reverted unit mask changes and removed the unused & unsafe memory_install ↵ smf-2008-08-181-3/+3
| | | | functions.
* Added unit mask to all memory installs that override the bus width. You ↵ smf-2008-08-171-3/+3
| | | | couldn't install a handler with a different width before, as it complained about the lack of the unit mask. So I've assumed it's safe for all current calls to be changed to the one that picks up the cpu bus width.
* structure, lower-casing functions and re-inclusion updates of the ↵ Derrick Renaud2008-08-126-10/+19
| | | | src\emu\cpu headers J - M.
* From: Atari Ace [mailto:atari_ace@verizon.net] Aaron Giles2008-07-242-16/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Subject: [patch] Conditional code cleanup resubmit Hi mamedev, This is a resubmit of a previous patch. The earlier version would not compile with 32-bit MSVC, due to the fact that its linker required external dependencies in dead code to be met before dead code elimination was done, causing linker errors. The proper fix for this would be to add the necessary dependencies, so I instead simply left the conditional code in place in winalloc.c and chd.c. ~aa Original submission email below: ---- Conditionally compiled code tends to bitrot, so MAME should try to avoid it as much as possible. I sent a patch six months ago to eliminate conditional code associated with logging, here's another patch that does more of this. Some notes: 1. drc_ops.c: I couldn't find a LOG_CODE anywhere, so I used if (0). 2. romload.c: I converted all the users of debugload to use LOG((...)) instead, following the traditional conditional logging pattern. 3. windows/sound.c: I eliminated the separate sound log and directed the few outputs to the error log. ~aa
* Cleanups and version bump.mame0125u9 Aaron Giles2008-07-031-1/+1
|
* Fixed LWXC1/LDXC1; corrects gauntleg camera. Aaron Giles2008-07-011-4/+4
|
* MIPS recompiler: Aaron Giles2008-06-303-9/+20
| | | | | | | | | * marked IDT instructions for R4650 only * accounted for time taken in throwaway likely branch slots * fixed jalr to respect the correct link register * fixed c.eq, c.lt, c.le to fail if unordered * fixed swxc1, sdxc1 to use the correct source register (fixes many Gauntlet problems) * fixed CCR31 display in debugger
* Stash jump target address before executing delay slot. Aaron Giles2008-06-291-6/+11
| | | | | | | Also, don't update link register until delay slot has finished executing. Fixes hang in gauntleg, though there are math problems lurking still.
* Don't generate compare interrupts unless the compare register was written Aaron Giles2008-06-273-1/+3
| | | | | to. Fixes hangs in blitz, calspeed, and others. Also fixed vegas input ports.
* Cleanups/version bump.mame0125u7 Aaron Giles2008-06-261-2/+2
|
* Removed DEBUGGER flag from makefile and ENABLE_DEBUGGER Aaron Giles2008-06-267-121/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Hornet driver: Aaron Giles2008-06-252-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | - connected EEPROM (doesn't seem to affect much) - cleaned up system register access GTI Club driver: - altered network IRQ clear to fix several problems - added Guru readme - fixed crashes due to missing inputs - gticlub "works" again ZR107 driver: - added Guru readme - cleaned up system register access - these games work again with altered network IRQ timing NWK-TR driver: - added Guru readme DRC frontend: - now passes pointer to previous instruction when describing PPC frontend: - attempts to roughly take into account branch and CR logical folding in timing computations
* Fixed compile where DEBUG=1 and DEBUGGER=0. R. Belmont2008-06-231-1/+1
|
* Save state support: Aaron Giles2008-06-231-24/+0
| | | | | | | | | | | | | * added save state support to the SHARC CPU core * added save state support to the PowerPC recompiler * added save state support to the virtual TLB system * added save state support to the RF5C400 sound core * added save state support to konppc module * added save state support to K056800 host controller * added save state support to the Konami hornet driver Fixed poor default CLUT handling in the voodoo driver