summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/tp84.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Device tag renaming. Moving away from generic names like "main" Aaron Giles2009-02-251-7/+7
| | | | | | | | | | | | | | | to names that capture the device type as well. Added validity checks for the short-term to prevent the continuance of this pattern (which I started :) Changes: CPU/"main" -> "maincpu" CPU/"audio" -> "audiocpu" CPU/"sound" -> "soundcpu" SCREEN/main -> "screen" (since it's the only one) Eventually, devices will be required to have unique tags within a machine, regardless of type.
* Ok, this is The Big One. Aaron Giles2009-02-111-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Please note: regression testing is in progress, but the first round of glaring regressions have already been taken care of. That said, there is likely to be a host of regressions as a result of this change. Also note: There are still a few rough edges in the interfaces. I will try to clean them up systematically once the basic system is working. All sound chips are now proper devices. Merged the sound chip interface into the device interface, removing any differences (such as the whole ALIASing concept). Modified every sound chip in the following ways: * updated to match the device interface * reduced read/write handlers down to the minimal number * added the use of get_safe_token() for ensuring correctness * other minor cleanup Removed the custom sound device. The additional work to just make custom sound cases into full devices is minimal, so I just converted them all over to be actual devices. Vastly simplified the sound interfaces, removing the ghastly sndti_* business and moving everyone over to using tags for sound identity. sndintrf, like cpuintrf, is now just a header file with no implementation. Modified each and every driver that references a sound chip: * all memory maps explicitly reference the targeted device via AM_DEVREAD/AM_DEVWRITE/AM_DEVREADWRITE * 16-bit and 32-bit accesses to 8-bit chips no longer use trampoline functions but instead use the 8-bit AM_DEVREAD/WRITE macros * all references to sound chips are now done via tags * note that these changes are brute force, not optimal; in many cases drivers should grab pointers to devices in MACHINE_START and stash them away
* Removed MDRV_INTERLEAVE(x), which specified the minimum scheduling Aaron Giles2008-12-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | quantum in terms of "frames" (a dubious concept now with multiple screens and changing refresh rates). Replaced it with a new MDRV_QUANTUM_TIME(x) which specifies the minimum scheduling quantum as a time value. Time can be specified as HZ(x), NSEC(x), USEC(x), etc. Updated all drivers to use this, assuming 60 was the frame rate (this is not perfect but should work for almost all cases). Changed MDRV_WATCHDOG_INIT_TIME(x) to automatically prepend UINT64_ATTOTIME_IN_ to the parameter, ensuring there is no improper use of this macro and bringing it in line with the MDRV_QUANTUM_TIME() macro. Updated all callers. Added new MDRV_QUANTUM_PERFECT_CPU(x) to specify that the minimum quantum should be enough to ensure that the specified CPU tag only ever executes a single instruction at a time. This can be used to explicitly require "perfect" synchronization for drivers that have multiple CPUs with shared memory. Turned this on for the arknoid2 driver for now as a test (the interleave on that driver was already very close to perfect anyway).
* From: Atari Ace [atari_ace@verizon.net] Aaron Giles2008-12-171-0/+2
| | | | | | | | | | | | | | | | | | | | | 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
* WARNING: this compiles, but not fully cleanly, and a number of drivers Aaron Giles2008-11-141-2/+2
| | | | | | | | | | | | | | | | 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.
* Massive API cleanup/change. The primary goal is that all CPU- Aaron Giles2008-11-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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_*.
* From: Fabio Priuli [mailto:doge.fabio@gmail.com] Aaron Giles2008-08-281-20/+20
| | | | | | | | | | | | | | | | | | | | | Subject: few more patches Hi, enclosed please find a few patches: TV_1.diff -> TV_4.diff: clean up of input ports for drivers starting with T,U,V eeprom.diff: some remaining eeprom_bit_r made CUSTOM_PORT stv_fix.diff: a small missing bit in my previous stv fix for bug 650. this patch assumes the previous has been applied and removes duplication of button 4 also from batmanfr (somehow I think I sent an outdated version of stv.diff previously) That's all folks Regards, Fabio
* Updated src\emu\sound headers from K-S, so they use latest naming/structure ↵ Derrick Renaud2008-08-101-3/+3
| | | | | | | and re-inclusion support. Also lowercased the handler names. What a PITA. :) I'll have to go back and do A-J to lower case the handlers to match the new structure names I already did. Sorry Mess and other port developers, but the code should match what is stated on the official WIKI. But don't worry, I don't plan on updating anything but the sound cores.
* NOTE: with this change, I have also removed PORT_START and renamed Aaron Giles2008-08-061-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | PORT_START_TAG to PORT_START. From: Fabio Priuli [mailto:doge.fabio@gmail.com] Subject: let's say goodbye to untagged input ports ;) Hi, enclosed please find a few patches against 126u3 source * port01.diff -> port09.diff : these patches continues the cleanup of inputs in drivers starting with C (the remaining ones), D and E. No ambiguous situations this time, so I guess there should be no problem with the changes. Improvements include conditional dips added to dynduke and diplocations for chinagat, chqflag, circus, citycon, cloak, contra and dynduke * tag01.diff -> tag09.diff : these patches add tag to EVERY input port in drivers starting with F->Z. Notice that only tags are added, no AM_READ_PORT, nor PORT_INCLUDE (and I saw a lot of drivers would need it ;) ), nor other cleanups contained in the patches above. I'll keep cleaning input next week, probably, but at least we can definitely remove the untagged version of PORT_START :) Notice I was able to compile the source commenting out the definition of PORT_START, so I guess every occurrence is covered...
* Region classes go bye-bye. Aaron Giles2008-07-281-18/+18
|
* Changed the way memory regions are referenced. Instead of a single Aaron Giles2008-07-281-20/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | integer value, regions are now referred to by a region class and a region tag. The class specifies the type of region (one of CPU, gfx, sound, user, disk, prom, pld) while the tag uniquely specifies the region. This change required updating all the ROM region definitions in the project to specify the class/tag instead of region number. Updated the core memory_region_* functions to accept a class/tag pair. Added new memory_region_next() function to allow for iteration over all memory regions of a given class. Added new function memory_region_class_name() to return the name for a given CPU memory region class. Changed the auto-binding behavior of CPU regions. Previously, the first CPU would auto-bind to REGION_CPU1 (that is, any ROM references would automatically assume that they lived in the corresponding region). Now, each CPU automatically binds to the RGNCLASS_CPU region with the same tag as the CPU itself. This behavior required ensuring that all previous REGION_CPU* regions were changed to RGNCLASS_CPU with the same tag as the CPU. Introduced a new auto-binding mechanism for sound cores. This works similarly to the CPU binding. Each sound core that requires a memory region now auto-binds to the RGNCLASS_SOUND with the same tag as the sound core. In almost all cases, this allowed for the removal of the explicit region item in the sound configuration, which in turn allowed for many sound configurations to removed altogether. Updated the expression engine's memory reference behavior. A recent update expanded the scope of memory references to allow for referencing data in non-active CPU spaces, in memory regions, and in EEPROMs. However, this previous update required an index, which is no longer appropriate for regions and will become increasingly less appropriate for CPUs over time. Instead, a new syntax is supported, of the form: "[tag.][space]size@addr", where 'tag' is an optional tag for the CPU or memory region you wish to access, followed by a period as a separator; 'space' is the memory address space or region class you wish to access (p/d/i for program/data/I/O spaces; o for opcode space; r for direct RAM; c/u/g/s for CPU/user/gfx/sound regions; e for EEPROMs); and 'size' is the usual b/w/d/q for byte/word/dword/qword. Cleaned up ROM definition flags and removed some ugly hacks that had existed previously. Expanded to support up to 256 BIOSes. Updated ROM_COPY to support specifying class/tag for the source region. Updated the address map AM_REGION macro to support specifying a class/tag for the region. Updated debugger windows to display the CPU and region tags where appropriate. Updated -listxml to output region class and tag for each ROM entry.
* Changed MDRV_CPU_ADD to require a tag. Removed MDRV_CPU_ADD_TAG. Aaron Giles2008-07-191-4/+3
| | | | | Tagged all CPUs. Now I will take a break until my fingers stop cramping. :)
* Removed MDRV_SOUND_ADD. Renamed MDRV_SOUND_ADD_TAG to Aaron Giles2008-07-181-6/+6
| | | | | | | | | | | MDRV_SOUND_ADD. All sound chips must now include a tag. Laboriously changed all existing drivers to define a unique tag for each sound chip. CPUs are next, but will require a more hands-on manual process to produce reasonable tags.
* From: Atari Ace [mailto:atari_ace@verizon.net] Aaron Giles2008-04-241-2/+1
| | | | | | | | | | | | | | | | | | | 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
* Created new macro: AM_RAM_WRITE(handler) which specifies a memory Aaron Giles2008-04-161-1/+1
| | | | | | | range to be RAM-like for reads but calls the given handler for writes. Replaced AM_READWRITE(SMH_RAM, handler) with AM_RAM_WRITE(handler). Also replaced AM_RAM AM_WRITE(handler) with AM_RAM_WRITE(handler).
* Replaced the following macros (SMH == static memory handler) Aaron Giles2008-03-101-14/+14
| | | | | | | | | | | | | | MRA*_BANK*/MRA*_BANK* -> SMH_BANK* MRA*_RAM/MRA*_ROM -> SMH_RAM MRA*_ROM/MWA*_ROM -> SMH_ROM MRA*_NOP/MWA*_NOP -> SMH_NOP MRA*_UNMAP/MWA*_UNMAP -> SMH_UNMAP This removes the silly need for a bunch of redundant constants with faux type definitions that didn't buy anything. Moved some memory system constants into memory.c.
* tp84: Replaces sprite multiplexing hack with video_screen_update_now() on ↵ Zsolt Vasvari2008-03-021-97/+56
| | | | | | | sprite RAM write General driver clean-up tilemap.h: Deletes no longer applicable comment
* Most of this descriptions taken directly from an e-mail by Aaron: Zsolt Vasvari2008-02-291-2/+2
| | | | | | | | | | | - Define a new MDRV_CPU_VBLANK_INT_HACK() (ZV: defined in deprecat.h) which is a copy of the current MDRV_CPU_VBLANK_INT() - Find all the places where VBLANK_INT is used with something other than 1 interrupt per frame and change it to the new macro - Remove the "# per frame" parameter from the MDRV_SCREEN_VBLANK_INT() and add a screen tag in its place; updated all callers appropriately. - ZV: Added some validation of the interrupt setup to validate.c The idea behind this is that using a VBLANK interrupt with more than one interrupt per frame in conceptually wrong. The screen tag will allow us to move the interrupt timing code from cpuexec.c to video.c, where it really belongs.
* Most important thing to note about this change: Aaron Giles2008-02-211-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ALL DRIVERS MUST NOW EXPLICITLY DECLARE THEIR SCREENS. Read on for more detail.... Added device tag as a parameter to the start function for devices. Updated MC6845 to accept this tag. Added new functions for iterating through the device list and counting devices of a given type. Updated search and iteration functions to accept DEVICE_TYPE_WILDCARD to work across all devices. Added new macro MDRV_DEVICE_CONFIG_DATA() which is used to set a single item in an inline data structure. Removed the per-screen palette_base. This was an idea that never really worked out, nor have we really needed it. Defined a new device type VIDEO_SCREEN. Currently this has no live functionality, but merely serves as a placeholder/identifier for video screens. Eventually some of the screen management code may move into the start/stop/reset functions. Changed MDRV_SCREEN_* macros to build up VIDEO_SCREEN devices rather than storing values in the screen[] array. Changed MDRV_SCREEN_ADD to specify a screen type (RASTER, VECTOR, LCD for the moment). Removed the older VIDEO_TYPE_RASTER and VIDEO_TYPE_VECTOR; this information is now determined by walking the screen list. Removed the screen[] array from machine_config. Modified all code referencing Machine->config->screen[] and changed it to iterate over the devices using the new video_screen_first() and video_screen_next() functions. (The next step will be to add video_* functions that accept a tag instead of screen index, and then move systems over to always referencing screens by tag instead of index.) Removed implicit screen #0. This means that ALL DRIVERS MUST EXPLICITLY DECLARE THEIR SCREENS. Updated all drivers to do so. While there, grouped all MDRV_SCREEN_* parameters together. Also removed unnecessary VIDEO_TYPE_RASTER and VIDEO_TYPE_VECTOR. Also removed VBLANK and bitmap format information from vector games. This was painful and very tedious. Changed game information to display info about all screens.
* New module: devintrf.c/.h. Implements a generic device interface similar Aaron Giles2008-02-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to the sound and CPU interfaces. This is still a bit WIP, but works at a fundamental level. Currently the only example of usage is in qix.c for the MC6845 CRTC. New module: mconfig.c/.h. Moved all machine_config and MDRV_* macros here, out of driver.c/.h. Added MDRV macros for adding/removing/configuring devices. qix.c: Moved video part of machine driver to video/qix.c. Added MC6845 as a device in the machine driver. Removed explicit MC6845 initialization from VIDEO_START in favor of simply retrieving the token from the device interface code. mc6845.c: Updated all callbacks to pass the mc6845_t * object. Updated all drivers accordingly. Added a minimal device interface. Deprecated the following constants because global constants that pretend to document things but which are only guesses are dumb: - DEFAULT_60HZ_VBLANK_DURATION - DEFAULT_30HZ_VBLANK_DURATION - DEFAULT_REAL_60HZ_VBLANK_DURATION - DEFAULT_REAL_30HZ_VBLANK_DURATION - DEFAULT_60HZ_3S_VBLANK_WATCHDOG - DEFAULT_30HZ_3S_VBLANK_WATCHDOG Updated all drivers to explicitly specify the equivalent bogus times. Added comments for the "REAL" VBLANK durations to indicate that they are not accurate.
* - Color table removal Zsolt Vasvari2008-02-061-34/+20
| | | | - resnet conversion
* - Added deprecat.h that contains some deprecated/discouraged contructs (see ↵ Zsolt Vasvari2008-01-251-0/+1
| | | | | | | | | 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
* - Changed cpunum_set_input_line* functions to take running_machine as an ↵ Zsolt Vasvari2008-01-241-1/+1
| | | | | | argument - Added that fix the arm7dasm, otherwise I couldn't compile the code
* (From Corrado Tomaselli) Aaron Giles2008-01-141-6/+6
| | | | | | | | | | | | | | | Verified and changed cpu frequencies and oki m6295 pin 7 on the following pcbs: Asuka&Asuka, Cadash, Equites h/w games and sound board, F1GP, Super Formula, Gladiator, Ping Pong king, Great Swordsman, Irem m52 sound board, Tropical Angel, Explosive Breakers, Magical Crystal, Mad Gear, Roller Aces, Chinese Hero, Simpsons, Golfing Greats, Time Pilot 84. Updated Xtal.h to use new OSC values found on Great swordman, Gladiator h/w and Equites sound board. Updated informations in Equites.c for the sound board
* Initial checkin of MAME 0.121.mame0121 Aaron Giles2007-12-171-0/+628