summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/timer.h
Commit message (Collapse)AuthorAgeFilesLines
* Added concept of scheduling quanta to the timer system. Also added Aaron Giles2008-11-051-0/+7
| | | | | | | | | | | | | | | | | 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.
* Added 22VP931 emulation, which is mostly working. Communication works Aaron Giles2008-09-251-3/+18
| | | | | | | | | | | | | | | | | | fine and basic searching/playback/skipping is functional. Still a bit glitchy. Firefox improvements: - removed need for deprecat.h - memory map is complete from schematics - gutted laserdisc hacks in favor of actual laserdisc implementation - fixed all CPU and sound clocks Removed old laserdsc.c implementation. Added generic timer devices, which simply allocate a timer but don't prime it. This is the preferred method for allocating timers, and may eventually be the only mechanism for doing so in the future.
* From: Oliver Stoeneberg [mailto:oliverst@online.de] Aaron Giles2008-09-111-1/+1
| | | | | | | | Subject: Machine -> machine This is a big patch adding running_machine* parameters and using "machine" where available.
* Changes MDRV_TIMER_DURATION to MDRV_TIMER_START_DELAY Zsolt Vasvari2008-03-151-4/+42
| | | | | Renames duration to start_delay in timer_adjust_periodic() as well Moves MDRV_ macros into proper header files
* Implements scanline based timer devices. Zsolt Vasvari2008-03-141-2/+10
| | | | | | | | | | | | | | | Converted Centipede, as an example. To define a scanline timer, use something like this: MDRV_TIMER_ADD("32V", SCANLINE, generate_interrupt) MDRV_TIMER_SCANLINE("main", 0, 16) The first number is the first scanline the timer will fire on, the 2nd number is the increment. So in this case, the timer will fire on 0, 16, 32, ..., 224, 240, then wrap around because the screen is defined as 256 lines high. The current scanline is passed to the callback in its 'param' argument
* Added skeletion device interface for timers. Just wanted to get feedback. Zsolt Vasvari2008-03-141-0/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Where applicable, added a parallel set of timer functions that take a device_config instead of emu_timer: void timer_device_adjust_oneshot(const device_config *timer, attotime duration, INT32 param); void timer_device_adjust_periodic(const device_config *timer, attotime duration, INT32 param, attotime period); void timer_device_reset(const device_config *timer, attotime duration); int timer_device_enable(const device_config *timer, int enable); int timer_device_enabled(const device_config *timer); int timer_device_get_param(const device_config *timer); void *timer_device_get_param_ptr(const device_config *timer); attotime timer_device_timeelapsed(const device_config *timer); attotime timer_device_timeleft(const device_config *timer); attotime timer_device_starttime(const device_config *timer); attotime timer_device_firetime(const device_config *timer); - Added MACHINE_CONFIG macros: MDRV_TIMER_ADD(_tag, _type, _callback) /* type can only be PERIODIC right now (can scanline based later, or even NE555) */ MDRV_TIMER_REMOVE(_tag) MDRV_TIMER_MODIFY(_tag) MDRV_TIMER_TYPE(_type) MDRV_TIMER_CALLBACK(_callback) MDRV_TIMER_DURATION(_duration) MDRV_TIMER_PERIOD(_period) MDRV_TIMER_PARAM(_param) MDRV_TIMER_PTR(_ptr) - Modified Space Encounters to create two timers and use those: MDRV_TIMER_ADD("STROBE_ON", PERIODIC, spcenctr_strobe_timer_callback) MDRV_TIMER_PARAM(TRUE) /* indicates strobe ON */ MDRV_TIMER_PERIOD(UINT64_ATTOTIME_IN_HZ(SPCENCTR_STROBE_FREQ)) MDRV_TIMER_ADD("STROBE_OFF", PERIODIC, spcenctr_strobe_timer_callback) MDRV_TIMER_PARAM(FALSE) /* indicates strobe OFF */ MDRV_TIMER_DURATION(UINT64_ATTOTIME_IN_HZ(SPCENCTR_STROBE_FREQ * 100 / SPCENCTR_DUTY_CYCLE)) MDRV_TIMER_PERIOD(UINT64_ATTOTIME_IN_HZ(SPCENCTR_STROBE_FREQ))
* Normalized function pointer typedefs: they are now all Aaron Giles2008-03-031-4/+4
| | | | | | | | | | suffixed with _func. Did this throughout the core and drivers I was familiar with. Fixed gcc compiler error with recent render.c changes. gcc does not like explicit (int) casts on float or double functions. This is fracking annoying and stupid, but there you have it.
* Converted MACHINE_DRIVER definitions from function Aaron Giles2008-02-261-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | constructors to tokenized lists. For the most part this is a non-invasive change, except for those drivers using MDRV_WATCHDOG_TIME_INIT. In order to allow for tokenization of attotimes, a set of new macros is provided called UINT64_ATTOTIME_IN_x() which follows the same pattern as ATTOTIME_IN_x() but packs the attotime down into a single 64-bit value for easier tokenization. Separated MDRV_DEVICE_CONFIG_DATA into 32-bit and 64-bit versions. Added floating-point versions with configurable resolutions. Fixed several errors in the machine drivers which were caught by the additional checks now done in the machine config detokenization code. Converted speakers into devices. Machine->config no longer houses an array of speakers; instead they are iterated through using the new macros (defined in sound.h) speaker_output_first() and speaker_output_next(). Updated all relevant code to do this. Improved game info display with multiple screens. Fixed bug which caused all screens to display equally. Added typedefs for all the machine config callback functions at the top of driver.h.
* Split timer_adjust() into timer_adjust_oneshot() and timer_adjust_periodic(). Aaron Giles2008-02-061-2/+5
| | | | | Updated all call sites. Fixed recent build breaks.
* 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"
* Changes for MAME 0.121u2.mame0121u2 Aaron Giles2007-12-171-39/+13
|
* Initial checkin of MAME 0.121.mame0121 Aaron Giles2007-12-171-0/+185