summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/cpu/i86
Commit message (Collapse)AuthorAgeFilesLines
* CPU cores now compile cleanly. Aaron Giles2009-03-152-16/+35
|
* REP instructions with high interleave would never complete. Aaron Giles2008-12-303-32/+69
| | | | Also fixed cpu.mak dependencies for i286.
* Cleanups and version bump. Aaron Giles2008-12-222-10/+10
|
* More cleanup. Added address-space-specific constants for the various Aaron Giles2008-12-202-22/+22
| | | | | | | | | | | | | | bus width and shift CPU interface constants. Changed all the cores to use them. Minor spacing cleanup in Z80, Z180, TMS34010, ADSP21xx cores. Changed ADSP21xx cores to accept a configuration struct instead of using set_info to specify serial port callbacks. Simplified the ADSP21xx get/set info significantly. Removed support for only including certain variants of the chips; they are now either all supported or all unsupported.
* Renamed CPUINFO_PTR_* to CPUINFO_FCT_* for function get infos. Aaron Giles2008-12-192-18/+18
| | | | Changed Z80 over to the new cpu_state_table mechanism.
* Cleaned up device and sound interfaces to match the CPU Aaron Giles2008-12-192-131/+228
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* CPU header cleanups.... Aaron Giles2008-12-189-197/+172
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | i86/i286/i386/nec/v30mz: * renamed i86.h -> i86priv.h * renamed i86intrf.h -> i86.h * consolidated i88intrf.h, i186intf.h, i188intf.h, etc into i86.h m6805: * moved memory read/write macros out of public header m37710: * moved memory read/write macros out of public header spc700: * moved many structs/functions/macros out of public header tms32010: * moved memory read/write macros out of public header sm8500: * pointer-ified the core (apparently never had get/set context!) g65816: * moved memory read/write macros out of public header pic16c5x: * moved memory read/write macros out of public header t11: * moved memory read/write macros out of public header
* Removed unneeded segment base changes from the 80286 core. Wilbert Pol2008-12-171-5/+0
|
* From: Atari Ace [atari_ace@verizon.net] Aaron Giles2008-12-175-0/+5
| | | | | | | | | | | | | | | | | | | | | Sent: Tuesday, December 16, 2008 12:20 PM To: submit@mamedev.org Cc: atariace@hotmail.com Subject: [patch] Migrate CPU defines to cpu header files Hi mamedev, This patch migrates all the CPU definitions into the cpu header files. The #defines and CPU_GET_INFO declarations were added by hand to the cpu cores in the first patch, plus a few partly related fixes to the non-DRC cores. The second patch was produced by the attached script which inserts all needed #includes, except for two that were added by hand in the first patch. The first patch also removed an extra define of N2A03_DEFAULTCLOCK that would have caused problems with the second patch. ~aa
* Removed get context/set context calls from the CPU interface entirely. Aaron Giles2008-12-112-4/+0
| | | | Pointer-ified the TMS99xx core (missed that one!)
* Pointer-ified the i86/i286 cores. Aaron Giles2008-12-0922-4414/+2498
| | | | Removed unused v20/v30 implementation.
* activecpu_count -= 133 Aaron Giles2008-12-061-17/+17
| | | | Removed mostly silly uses of activecpu from the CPU cores.
* Removed unused variables Nathan Woods2008-12-052-2/+0
|
* Changed save state system to accept machine parameters where Aaron Giles2008-12-052-55/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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-042-2/+2
| | | | | | CPU_IS_BE -> ENDIANNESS_BIG Also fixed help for step over/in to specify correct keys.
* change_pc? What change_pc? Aaron Giles2008-11-242-4/+1
|
* Removed NO_LEGACY_MEMORY_HANDLERS defines. Aaron Giles2008-11-242-2/+0
|
* Converted a bunch of CPU cores over to the new memory functions. Aaron Giles2008-11-225-67/+42
|
* Debugger interfaces cleanup. Still more to do but this compiles and Aaron Giles2008-11-212-3/+3
| | | | | | | 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.
* Generalized the concept of opbase access into "direct" access. Aaron Giles2008-11-171-4/+4
| | | | | | | | 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-57/+57
| | | | | | 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.
* This patch replaces the Machine parameter where an running_machine * Aaron Giles2008-11-132-5/+3
| | | | | | is available and removes the deprecat.h where unnecessary. [Oliver Stoeneberg]
* Removed save_device pattern if favor of just accepting the Aaron Giles2008-11-101-3/+1
| | | | device from the reset.
* Major cpuintrf changes: Aaron Giles2008-11-101-17/+17
| | | | | | | | | | | | | | | | | | | | | | * 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-091-2/+2
| | | | | parameter from CPU_INIT. Modified CPU cores to pull config from the device static_config.
* Added macros for all CPU callbacks to ease future changes. Aaron Giles2008-11-0810-36/+36
| | | | Updated all CPU cores to use them.
* WARNING: This is a significant change. If you are risk-averse and Aaron Giles2008-11-064-357/+364
| | | | | | | | | | | | | | | | | | | | | 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.
* From Oliver Stoeneberg [oliverst@online.de] Aaron Giles2008-09-042-0/+2
| | | | | | | | | | | | | | | | | | | | | | | 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.
* Final CPU header updates. Mostly just re-naming the re-inclusions. Derrick Renaud2008-08-1311-83/+6
| | | | | The structures/names were getting too complex for my macros to handle. They would require hand editing and my computer is too slow to keep re-compiling. Passes a clean compile.
* structure, lower-casing functions and re-inclusion updates of the ↵ Derrick Renaud2008-08-1122-30/+137
| | | | | src\emu\cpu headers up to I. It's mostly just re-inclusion renaming, but there are few other re-nameings.
* I80286: Fixed POP ES in protected mode. Wilbert Pol2008-07-011-0/+6
|
* Removed DEBUGGER flag from makefile and ENABLE_DEBUGGER Aaron Giles2008-06-263-12/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Fixed memory access in the 80286 cpu core which made i286.h obsolete. ↵ Wilbert Pol2008-05-242-38/+4
| | | | Changed CPUINFO_INT_MAX_INSTRUCTION_BYTES to prevent crashes during disassembly.
* Fixed 80286 databus widths. Wilbert Pol2008-05-191-2/+2
|
* From: Atari Ace [mailto:atari_ace@verizon.net] Aaron Giles2008-04-242-2/+0
| | | | | | | | | | | | | | | | | | | Subject: [patch] Remove more Machine globals, #include "deprecat.h" Hi mamedev, The attached patch goes through and converts a number of Machine globals to machine locals, and then removes #include "deprecat.h" if appropriate. The script that generated it is included, since the patch itself is rather large and would have been time consuming to produce otherwise. The script doesn't convert cases of Machine that aren't in common macros. I'll try to tackle those later if someone doesn't beat me to it. ~aa
* Rewrote core memory handlers as inline functions. These should be easier to Aaron Giles2008-04-092-39/+15
| | | | | | | | | | | | | | | | trace through in a debug build, yet should operate the same as before. Created a complete set of functions for all databus sizes (8,16,32,64) and all endiannesses. A few functions are redundant, but it is now very clear which functions to use in which scenarios. It is also now possible to rely on being able to access values of 8, 16, 32 or 64 bits via the built-in accessors without fear of crashing. Updated all cores using 8-bit handlers to explicitly call the 8-bit handlers with the appropriate endianness. Fixed a few games which were calling n-bit handlers directly to use the generic forms. In the future, this is all the access drivers will have.
* Various clean ups: Couriersud2008-03-011-0/+1
| | | | | * remove more unreachable code * identify more functions not being used * Changed a number of global functions to being static
* Fix compile issues introduced with r844 Couriersud2008-03-011-6/+0
|
* Identified code not used and marked with "#ifdef UNUSED_FUNCTION" Couriersud2008-03-011-2/+6
|
* Changed debugger-related code to be based off a new makefile define ↵ Aaron Giles2008-02-022-11/+11
| | | | | | | | | | | | | (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-252-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
* Cleaned up leland clocks a little. Aaron Giles2008-01-151-0/+4
| | | | | | Fixed alleymas0119u3gre (with a pointer from RansAckeR) Added missing multipliers to the h8 and i960 cores. Made the i186 divide-by-2 clock internal.
* Added CPUINFO_INT_CLOCK_MULTIPLIER to support CPU clock multipliers. Aaron Giles2008-01-142-0/+2
| | | | | | | | | | | | | | | | | | | | | | | Updated all CPU cores to return a CPUINFO_INT_CLOCK_MULTIPLIER of 1. Changed the core to actually respect both CPUINFO_INT_CLOCK_MULTIPLIER and CPUINFO_INT_CLOCK_DIVIDER. Updated a number of drivers to use cpunum_get_clock() instead of Machine->drv->cpu[x].clock. ***** Raw input clock speeds should now be specified for all CPUs in the MACHINE_DRIVER. ***** Removed explicit divisors from all drivers using the following CPU types, which were already specifying non-1 values for CPUINFO_INT_CLOCK_DIVIDER: * COP4x0 * I8039/8048 families * M68(7)05, HD63705 * M6809E * PIC16C5X * TMS32010 * TMS340x0 In a few cases, it appears that the divisor was not being used, so I guessed in those cases whether or not the specified clock speed was raw.
* (From Atari Ace) Aaron Giles2007-12-312-15/+11
| | | | | | | | 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.121u3.mame0121u3 Aaron Giles2007-12-174-4/+4
|
* Changes for MAME 0.121u1.mame0121u1 Aaron Giles2007-12-172-2/+2
|
* Initial checkin of MAME 0.121.mame0121 Aaron Giles2007-12-1732-0/+9440