summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu
Commit message (Collapse)AuthorAgeFilesLines
* This patch replaces the Machine parameter where an running_machine * Aaron Giles2008-11-1377-170/+119
| | | | | | is available and removes the deprecat.h where unnecessary. [Oliver Stoeneberg]
* Hooked up disconnected reset functions. Aaron Giles2008-11-134-19/+19
|
* From AtariAce: Aaron Giles2008-11-1380-929/+960
| | | | | | | | | | | With Aaron's change to macroize the cpu apis, the cpu/sound interfaces are now using different idioms. This patch fixes that. It uses the prefix SND_ instead of SOUND_, to avoid changing SOUND_START, SOUND_RESET in driver.h. While working on it, I noticed that the reset routines for k053260, msm5205, upd7759 and vlm5030 aren't hooked up, but I decided this was an oversight and macroized the functions anyways (but left them unhooked).
* Massive API cleanup/change. The primary goal is that all CPU- Aaron Giles2008-11-1367-2361/+2320
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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_*.
* Fix state save in discrete sound Couriersud2008-11-123-7/+55
| | | | | | | * sndindex now considered as well in state save * expose discrete_sound_n_r(void *chip, ...) to enable accessing multiple discrete sound cores Curt Coder, is this sufficient?
* abc_step and abc_reset now declared as DISCRETE_STEP( abc ) and ↵ Couriersud2008-11-126-141/+155
| | | | DISCRETE_RESET( abc )
* Transparent mc6545 phi1/pi2 addressing Couriersud2008-11-112-2/+75
| | | | | | | * implemented support for phi1/phi2 transparent addressing * added callback to communicate address back to driver Implementation is not and can not be "clock" accurate since the timing is totally up to the hardware implementation. It is the main cpu and hardware which determines phi clocking and when data is written to video ram. The only support in the 6545 is that the update address is latched out to the ma lines during phi2.
* Sync with MESS Nathan Woods2008-11-116-49/+48
|
* Converted TMS340x0 cores to be pointer-based. Aaron Giles2008-11-109-2668/+2589
|
* Fix compile error. Aaron Giles2008-11-101-1/+1
|
* Removed save_device pattern if favor of just accepting the Aaron Giles2008-11-1020-60/+24
| | | | device from the reset.
* Added CPU device parameters to all CPU callbacks except for the Aaron Giles2008-11-1025-289/+234
| | | | | | | | 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-10141-1658/+1489
| | | | | | | | | | | | | | | | | | | | | | * 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
* * Renamed mcs51_regs to mcs51_state_t Couriersud2008-11-091-412/+412
| | | | | * Renamed mcs51 to mcs51_state Shouldn't the state struct just be called cpu_state?
* Fix deleted CHECK_IRQ_LINES() Couriersud2008-11-091-3/+3
|
* Formatting, identation Couriersud2008-11-092-44/+44
| | | * the hd6309 is very similar to the m6809, cleaned up a bit for windiff & friends.
* i960 core switched to pointer state access Couriersud2008-11-091-1057/+1076
|
* Converted i8x41 to use pointers for state access Couriersud2008-11-092-1416/+1453
| | | Separated opcodes into i8x41ops.c
* s14001a.c: added chip pinout and operation notes. Jonathan Gevaryahu2008-11-091-1/+85
|
* Populated tag and static_config parts of fake CPU device. Removed 'config' Aaron Giles2008-11-0959-177/+184
| | | | | parameter from CPU_INIT. Modified CPU cores to pull config from the device static_config.
* i8x41: fixed missing space at the end of file Roberto Zandona2008-11-091-1/+1
|
* UPI-41/42 (still I8x41.c) changes: Couriersud2008-11-097-105/+189
| | | | | | | | | | | | * cpu/i8x41 should be renamed to UPI-4x, since UPI-41/42 was an intel chip family postponed for now until core moved to pointers. * removed I8041 definition from mcs48 * removed I8x41 cpu definition and config struct * added I8041, I8741, I8042, I8242 and I8742 cpus to i8x41.c * added internal memory maps * internal ram now uses DATA memory space * updated drivers * increased interleave to 70 in decocass. This fixes decocass hanging in countdown around 13 No idea when this bug was introduced.
* Cleanups/version bump.mame0128u3 Aaron Giles2008-11-0919-178/+178
|
* From: Atari Ace [mailto:atari_ace@verizon.net] Aaron Giles2008-11-0825-97/+98
| | | | | | | | | | | | | | | | | | | | | | | | 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-08225-3583/+3638
| | | | Updated all CPU cores to use them.
* Rewrite of the Motorola DSP56k CPU core. (Andrew Gardner, PhilB, RBelmont) Andrew Gardner2008-11-083-128/+737
| | | | | | | | | * Added proper clock speed to plygonet.c and internal divider to dsp56k.c * Fixed up disassembler add/sub, 05xx, and bsr ops. * Handle mysterious uuuuF instruction found in plygonet add op. * Partially implemented add, sub, mac, mpy, inc, cmpm, macr, asr16, jscc, lea, and movec ops. * Added dual X memory read and data move with short displacement parallel moves.
* Merged DS5002FP into MCS51 Couriersud2008-11-078-5088/+574
| | | | | | | | | * Merged DS5002FP * Disassembler now uses type specific memory names * Merged DS5002FP disasm * added 83C751 memory names to disassembler * delete DS5002FP specific files * removed unnecessary cpu callback in wrally * DATA_MAP ==> IO_MAP in wrally
* More 68000 cleanup. Aaron Giles2008-11-075-2266/+2258
|
* Fixed 68020+ Aaron Giles2008-11-071-3/+3
|
* Minor fixes. Aaron Giles2008-11-072-12/+13
|
* Fix a reg-ex replace issue - Thx Andrew Gardner! Couriersud2008-11-071-1/+1
|
* "Pointer"-ified the 6502 Couriersud2008-11-0717-612/+700
| | | * a perfect candidate for a code merge. Replication all over the place.
* i386 seems to already be defined by the compiler? changed to _i386 davidhay2008-11-061-9/+9
|
* Some more gcc 64bit tranquilizers Couriersud2008-11-064-10/+7
|
* Fix 64 bit compile Couriersud2008-11-061-0/+2
| | | * Aaron, please review my change.
* WARNING: This is a significant change. If you are risk-averse and Aaron Giles2008-11-06126-2252/+2450
| | | | | | | | | | | | | | | | | | | | | 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.
* Fixed a few issues caught by an MSVC compile (why doesn't gcc complain??) Aaron Giles2008-11-063-8/+8
|
* Removed a bunch of useless macros. Consolidated several others. Aaron Giles2008-11-064-2334/+2197
| | | | | | Standardized on MAME types. Defined uint/sint to be 32-bits rather than all this target platform guessing about how many bits are in an int.
* Fixed compilation issues with 68000 changes. Aaron Giles2008-11-067-471/+48
| | | | | | | Began the process of pruning options from the 68000 core, hard-coding it for MAME's needs. We've hacked on it sufficiently that it is no longer generic, so this is a good opportunity to simplify the code so that it can actually be followed.
* "Pointer"-ified the 68000. What a mess! Aaron Giles2008-11-0610-2380/+2386
| | | | There are a few remaining globals; we'll get them later.
* Re-added suspend/resume synchronization to fix a few games. Aaron Giles2008-11-061-0/+8
|
* "Pointer"-ified the ADSP-21xx core. Aaron Giles2008-11-063-1827/+1700
|
* Fixed bug in new quantum code that could result in an invalid Aaron Giles2008-11-061-1/+1
| | | | interleave of 0 being used. Fixes problems with stv games.
* Changed core cycle computations to use div_64x32 instead of full 64-bit Aaron Giles2008-11-051-6/+28
| | | | | divides. This involves tossing a few bits of resolution at divide time, but should make no real difference in practice.
* Fix bad bug in scheduler quantum code. Aaron Giles2008-11-051-1/+1
|
* Added concept of scheduling quanta to the timer system. Also added Aaron Giles2008-11-0510-131/+197
| | | | | | | | | | | | | | | | | means of setting the minimum useful scheduling quantum, and clamping all quanta to that value. Changed interleave/boost handling to use scheduling quanta instead of timers. Added machine parameter to cpu_boost_interleave. Updated cpuexec to compute the "perfect" interleave value taking into account the minimum number of cycles per instruction specified by the CPU core. Updated Z80 core to indicate that the minimum cpi is 2. Fixed incorrect minimum cpi in the 68020+ cores. Simplified a bit of logic in cpuexec_timeslice.
* "Pointer-ified" the mcs51 core Couriersud2008-11-052-531/+557
|
* "Pointer-ified" the mcs48 core Couriersud2008-11-041-402/+414
|
* Pointer-ified the R3000 core. Aaron Giles2008-11-041-450/+468
|
* "Pointer-ified" the Z80 core as an example for testing. Aaron Giles2008-11-041-2126/+2143
|