summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/cpu/sh2
Commit message (Collapse)AuthorAgeFilesLines
* WARNING: This is a significant change. If you are risk-averse and Aaron Giles2008-11-064-28/+36
| | | | | | | | | | | | | | | | | | | | | 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.
* Removed per-game hacks from CPS3 (moved to DMA callback in SH2 core) davidhay2008-10-184-7/+47
| | | | | | | (also added a to-check note, 16-bit wide DMA is currently using 32-bit functions, is this correct?) Removed Speedups from CPS3 / PsikyoSH, while they do still give a decent speed boost they're not really needed with the DRC and just clutter the code.
* Cleanups and version bump.mame0127u8 Aaron Giles2008-10-132-2/+2
|
* Fix Mantis #02211 R. Belmont2008-10-123-9/+39
| | | | | | | PsikyoSH: hook up VBL IRQ ack SH2: fix DRC's handling of internally generated IRQs SH2: fix compiling in interpreter mode
* Cleanups and version bump.mame0127 Aaron Giles2008-08-191-2/+2
|
* From: Oliver Stoeneberg [mailto:oliverst@online.de] Aaron Giles2008-08-191-2/+2
| | | | | | | | | | | | 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
* SH-2 DRC updates: R. Belmont2008-08-162-73/+253
| | | | | | | - Moved IRQ handling front-end into recompiled code - Added TSTM/ANDM/XORM instructions - Added SH-1 CPU support, including lower precision on MAC.W and locking out SH-2 only instructions
* SH2DRC: Allow delay slot of a BSR to trash the PR if it wants. (Manis 2059) R. Belmont2008-08-131-2/+4
|
* Final CPU header updates. Mostly just re-naming the re-inclusions. Derrick Renaud2008-08-133-13/+20
| | | | | 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.
* Cleanups/version bump.mame0126u3 Aaron Giles2008-07-311-2/+2
|
* From: Oliver Stoeneberg [mailto:oliverst@online.de] Aaron Giles2008-07-311-3/+3
| | | | | | | | | | | | | | | | | Subject: a few cleanups This patch contains: - removal of unprintable chars (newlines) in SH-2 disassembler (I submitted this in the past nd it wasn't included) - a few unnecessary checks after malloc_ort_die() calls - changes two romload.c warnings to use GAMENOUN instead - adds "deprecat.h" in a few src/mame/drivers files (would be necessary, if the debugger.h one would be removed) - cleans up the mame.mak by adding all missing defines and grouping them based on cpu.mak - renamed video_exit() to winvideo_exit() for consistency in function names
* Simplified shift/rotate instruction implementations. Aaron Giles2008-07-301-53/+18
| | | | | | The ROL/ROR/SHL/SHR opcodes provide the carry flags typically generated by almost all CPUs. The RORC/ROLC opcdes map directly to the rotate through carry of most CPUs as well.
* Oops, should have been using SETc versus GETFLGS in this case. Aaron Giles2008-07-291-4/+4
|
* Implemented ADDV/SUBV with flags. Kept C versions behind a compile-time define Aaron Giles2008-07-291-22/+23
| | | | for comparison.
* SH2DRC: add SUBV, replace ADDV with C version as a precaution. (Fixes most ↵ R. Belmont2008-07-281-7/+95
| | | | of Mantis #2026, except the part which is a separate bug).
* SH2DRC: Add PC-relative load optimization and ability to disable if ↵ R. Belmont2008-07-282-8/+27
| | | | necessary [R. Belmont, based on an idea by Mariusz Wojcieszek]
* Added new functions attotime_to_ticks() and ticks_to_attotime() to Aaron Giles2008-07-241-1/+1
| | | | | | | | | | | | | | | | | | | convert between attotimes and a clock tick at an integral frequency. Changed the 6532 RIOT device into a proper device. Rewrote the logic to be simpler and leverage the new attotime functions. Changed the I/O port setters to specify a mask, and changed the I/O port callbacks to pass in the previous value. Updated tourtabl and gameplan drivers to use the new device interface. Converted audio/starwars.c, audio/exidy.c, and audio/gottlieb.c to use the new RIOT implementation instead of rolling their own. Began gottlieb.c cleanup. Converted palette calculations to resistor weights. Corrected video timing. Reduced the number of separate machine drivers. Fixed incorrect spriteram sizes. Populated full memory maps for the main CPU and the rev 1 sound board. More to come.
* Cleanups. Aaron Giles2008-07-173-281/+281
|
* Changed direct access EEPROM interface to return the "bus width" of the Aaron Giles2008-07-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | EEPROM data, and the size is in terms of units, not bytes. Updated all drivers accordingly. Changed the ROM loading code to actually alter the region flags based on the CPU endianness and bus width when creating the region, rather than fixing them up on the fly. This means that callers to memory_region_flags() will get the correct results. Changed the expression engine to use two callbacks for read/write rather than relying on externally defined functions. Expanded memory access support in the expression engine. Memory accesses can now be specified as [space][num]<size>@<address>. 'space' can be one of the following: p = program address space of CPU #num (default) d = data address space of CPU #num i = I/O address space of CPU #num o = opcode address space of CPU #num (R/W access to decrypted opcodes) r = direct RAM space of CPU #num (always allows writes, even for ROM) e = EEPROM index #num c = direct REGION_CPU#num access u = direct REGION_USER#num access g = direct REGION_GFX#num access s = direct REGION_SOUND#num access The 'num' field is optional for p/d/i/o/r, where is defaults to the current CPU, and for e, where it defaults to EEPROM #0. 'num' is required for all region-related prefixes. Some examples: w@curpc = word at 'curpc' in the active CPU's program address space dd@0 = dword at 0x0 in the active CPU's data address space r2b@100 = byte at 0x100 from a RAM/ROM region in CPU #2's program space ew@7f = word from EEPROM address 0x7f u2q@40 = qword from REGION_USER2, offset 0x40 The 'size' field is always required, and can be b/w/d/q for byte, word, dword, and qword accesses.
* SH2DRC: cleanups and tweeks from Aaron's suggestions. R. Belmont2008-07-171-54/+27
|
* Added an exit function to the SH2 drc so that it doesn't leak Aaron Giles2008-07-141-0/+14
| | | | memory like crazy.
* [SH2DRC] Removed remnant of outdated interrupt design. R. Belmont2008-07-141-1/+1
|
* UDRC-based SH-2 dynamic recompiler. R. Belmont2008-07-136-12/+4330
| | | | | | | | | - All games on all drivers should work as before except "colmns97" and "stress" which crash due to sound system trouble. - All idle skips are still included. They are quite a bit less effective than they were on the interpreter, but they still give a boost. - Fast RAM bypass is not included yet so this does not represent final performance. That said, it's consistently faster than the interpreter even now. Example: sfiii3 on 0.126 gets 609% on the interpreter and 961% on the DRC. Major thanks to Aaron for his assistance with several sticky core bugs and other issues encountered writing this.
* SH2: convert context struct to go through a pointer R. Belmont2008-06-273-736/+739
|
* Refactor SH2 to separate out things that aren't part of the interpreter. R. Belmont2008-06-273-747/+818
|
* Removed DEBUGGER flag from makefile and ENABLE_DEBUGGER Aaron Giles2008-06-262-7/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Flipped the damn mem_mask. It is no longer inverted when passed to Aaron Giles2008-04-201-11/+11
| | | | | | | read/write handlers. Updated all drivers accordingly. Hope I didn't miss anything important! Blame OG and smf for goading me into it. :)
* Added running_machine * parameter to the front of all read/write handlers. Aaron Giles2008-03-051-6/+6
| | | | | | | | | | | | | | | | | | Updated all call-through handlers appropriately. Renamed read8_handler to read8_machine_func, replicating this pattern throughout. Defined new set of memory handler functions which are similar but which pass a const device_config * in place of the running_machine *. These are called read8_device_func, etc. Added macros READ8_DEVICE_HANDLER() for specifying functions of this type. Note that some plumbing still needs to happen in memory.c before this will work. This check-in should remove the need for the global Machine and in turn "deprecat.h" for a lot of drivers, but that work has not been done. On the flip side, some new accesses to the global Machine were added in the emu/ files. These should be addressed over time, but are smaller in number than the references in the driver.
* Split timer_adjust() into timer_adjust_oneshot() and timer_adjust_periodic(). Aaron Giles2008-02-061-7/+7
| | | | | Updated all call sites. Fixed recent build breaks.
* Changed debugger-related code to be based off a new makefile define ↵ Aaron Giles2008-02-022-6/+6
| | | | | | | | | | | | | (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.
* Removed distinction between *_gettotalcycles() and *_gettotalcycles64(). Aaron Giles2008-01-291-2/+2
| | | | | All functions now return 64-bit results. Updated all call sites appropriately.
* - 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
* Added CPUINFO_INT_CLOCK_MULTIPLIER to support CPU clock multipliers. Aaron Giles2008-01-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | | 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.
* Copyright cleanup: Aaron Giles2008-01-062-3/+3
| | | | | | - removed years from copyright notices - removed redundant (c) from copyright notices - updated "the MAME Team" to be "Nicola Salmoria and the MAME Team"
* (From Atari Ace) Aaron Giles2007-12-311-8/+6
| | | | | | | | 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.121u3.mame0121u3 Aaron Giles2007-12-171-1/+1
|
* Changes for MAME 0.121u2.mame0121u2 Aaron Giles2007-12-171-3/+3
|
* Changes for MAME 0.121u1.mame0121u1 Aaron Giles2007-12-171-1/+1
|
* Initial checkin of MAME 0.121.mame0121 Aaron Giles2007-12-173-0/+3866