summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/cpu
Commit message (Collapse)AuthorAgeFilesLines
* Cleanups and version bump.mame0126u4 Aaron Giles2008-08-072-5/+5
|
* Changes to avoid collisions with system globals on OpenSolaris. (qmc2) R. Belmont2008-08-069-0/+28
|
* Fix compile errors. Wilbert Pol2008-08-042-2/+2
|
* Improved Dsp56k CPU interrupt handling. Polygonet Commanders now advances ↵ Andrew Gardner2008-08-044-25/+42
| | | | past its first dsp handshake.
* Revert accidentially commited changes. Sorry! Couriersud2008-08-031-16/+5
|
* 8257dma and z80dma devices now require device callback handlers instead of ↵ Couriersud2008-08-031-5/+16
| | | | | machine handlers. Updated affected drivers accordingly.
* Cleanups/version bump.mame0126u3 Aaron Giles2008-07-316-255/+255
|
* (From Atari Ace. Note that I only took the first patch, which applied Aaron Giles2008-07-311-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | to whole functions. The other one I'm not so sure about. Commented code is usually hilighted differently, making it very easy to spot.) Hi mamedev, This set of patches has one aim only, to identify chunks of code that have been disabled by the use of C/C++ comments, and to disable them instead by using the preprocessor. The C comment approach to disabling code isn't safe (embedded comments will trip it up), and the C++ comment approach isn't elegant (you shouldn't need to touch every line to disable a chunk of code). Using #if...#endif is preferable always, excepting perhaps if (0) { ... }. The patch has three parts. The first only handles cases where full functions were disabled. The second handles cases where parts of functions were disabled. The third then tries to restore the whitespace that the use of comments converted from tabs to spaces via srcclean.exe. It also cleans up the whitespace in a handful of the files in areas outside of the original two patches. ~aa
* 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
* Changed symbol table reference parameters to void * from UINT32. Aaron Giles2008-07-311-4/+4
|
* 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.
* i8051 cpu core timer updates: Wilbert Pol2008-07-291-141/+153
| | | | | - Added support for timer mode 0 (13 bit timer) - Cleaned up timer code a bit, fixing some off-by-one errors when timers overflow.
* 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).
* Region classes go bye-bye. Aaron Giles2008-07-281-1/+1
|
* Changed the way memory regions are referenced. Instead of a single Aaron Giles2008-07-282-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* 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]
* DSP56156 CPU Core updates. Andrew Gardner2008-07-287-1104/+2357
| | | | | | | | | - Rewrote core logic, communications, and interfaces. - Added three parallel memory moves to the disassembler. - Initial interrupt logic in place. Plygonet.c updates. - All communication hacks have been removed. - Memory maps have been temporarily reverted while new DSP56k cpu core catches up.
* Cleanups and version bump.mame0126u2 Aaron Giles2008-07-242-43/+43
|
* From: Atari Ace [mailto:atari_ace@verizon.net] Aaron Giles2008-07-2411-80/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Subject: [patch] Conditional code cleanup resubmit Hi mamedev, This is a resubmit of a previous patch. The earlier version would not compile with 32-bit MSVC, due to the fact that its linker required external dependencies in dead code to be met before dead code elimination was done, causing linker errors. The proper fix for this would be to add the necessary dependencies, so I instead simply left the conditional code in place in winalloc.c and chd.c. ~aa Original submission email below: ---- Conditionally compiled code tends to bitrot, so MAME should try to avoid it as much as possible. I sent a patch six months ago to eliminate conditional code associated with logging, here's another patch that does more of this. Some notes: 1. drc_ops.c: I couldn't find a LOG_CODE anywhere, so I used if (0). 2. romload.c: I converted all the users of debugload to use LOG((...)) instead, following the traditional conditional logging pattern. 3. windows/sound.c: I eliminated the separate sound log and directed the few outputs to the error log. ~aa
* From: Atari Ace [mailto:atari_ace@verizon.net] Aaron Giles2008-07-244-17/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Subject: [patch] .data removals to fix reset/multisession bugs Hi mamedev, One nice artifact of properly constifying data structures in MAME is that it makes it relatively easy to spot a class of reset/multisession bugs, namely that almost any object in .data is probably in error. Unless the value is properly initialized in a reset routine the initial non-zero value can't be relied upon, so there's no need to have a non-zero value to begin with. With that in mind, here's a patch to move more items out of .data by either applying const, removing the non-zero initializer (if its overwritten by init/reset) or by adding appropriate initialization code. In most cases I tried to add initialization code to a reset routine, but in some cases I chose an init routine, possibly leaving a reset bug intact. Some interesting bits: 1. tms9900 core. The use of .data to initialize the irq_level wasn't correct in some cases as the layout of the structure was core dependent. 2. bfcobra.c. By introducing a VIDEO_START routine a hack in VIDEO_UPDATE could be removed. ~aa
* 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.
* Dsp56156 Disassembler rewrite. Andrew Gardner2008-07-191-1447/+1666
| | | | | | | | - Rearranged decoding behavior. - Updated code style to MAME standards. - Tested each single-word opcode with custom ROMs. (This is a precursor to other major dsp56k changes I have made. I just gotta' get plygonet commanders up and running to do some tests)
* TGP / Model 2 fixes [ElSemi] davidhay2008-07-192-84/+160
| | | | | | - TGP now correctly uses table roms (model1/2 updated accordingly) - removed FIFO hack on srallyc (game now runs) - added analog ports reading for model 2A/B/C - fixed some loading instructions in the TGP. that fixes srallyc automatic transmission bug
* ElSemi's fix for the i960 issue: Brian Troha2008-07-181-2/+2
| | | | | | | | | | | | | well, the fix is not that but changing them this way: program_write_dword_32le(i960.r[I960_FP]-16, i960.PC); program_write_dword_32le(i960.r[I960_FP]-12, i960.AC); in take_interrupt. It seems it came from a partial fix in the ret instruction. the manual says that PC is saved at FP-16 and AC at FP-12 it was reversed in mame, so when trying to fix it, i suppose Ernesto forgot to change the push too. I've tested this fix and apart from having daytona working, pilot kids 2A works too (that I think has been broken for ages).
* Cleanups. Aaron Giles2008-07-174-282/+282
|
* Changed direct access EEPROM interface to return the "bus width" of the Aaron Giles2008-07-172-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
|
* Fixed simple but deadly typo in previous update. R. Belmont2008-07-151-1/+1
|
* i960: respect the rounding mode for CVTRI [ElSemi] R. Belmont2008-07-151-1/+11
|
* SH-4 update [Samuele Zannoli] R. Belmont2008-07-142-91/+127
| | | | | | - Fixed TRAPA and some versions of FMOV - Improved disassembly for MOV.W, MOVA, MOV.L, FIPR, and FSCA.
* added save state suport to Konami CPU & Aliens Nicola Salmoria2008-07-141-21/+13
|
* 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-137-13/+4339
| | | | | | | | | - 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.
* Fixed edge case in the DRC front-end that would incorrectly tag the Aaron Giles2008-07-131-1/+5
| | | | | end of a sequence as "return to start" even if the last instruction did not abet the starting instruction.
* Adding per-device and per-CPU validity checks Nathan Woods2008-07-061-0/+19
|
* Cleanups and version bump.mame0125u9 Aaron Giles2008-07-033-3/+3
|
* Lighter weight debugger optimization for ADSP2100. Aaron Giles2008-07-031-746/+702
|
* I80286: Fixed POP ES in protected mode. Wilbert Pol2008-07-011-0/+6
|
* 01942: All konamim2.c sets: hang Aaron Giles2008-07-013-12/+9
| | | | | heatof11 gets to the color bars but only if you enable the debugger. Not sure why.
* Fixed sense of debugger flag in ADSP-2100 optimization. Aaron Giles2008-07-011-1/+1
|
* Fixed LWXC1/LDXC1; corrects gauntleg camera. Aaron Giles2008-07-011-4/+4
|
* Fixed 64-bit writes in C back-end. Aaron Giles2008-07-011-35/+33
|
* Fixed incorrect assumption in HASHJMP that the base table for a mode Aaron Giles2008-07-012-2/+2
| | | | will always be allocated when a fixed mode is first used.
* MIPS recompiler: Aaron Giles2008-06-303-9/+20
| | | | | | | | | * marked IDT instructions for R4650 only * accounted for time taken in throwaway likely branch slots * fixed jalr to respect the correct link register * fixed c.eq, c.lt, c.le to fail if unordered * fixed swxc1, sdxc1 to use the correct source register (fixes many Gauntlet problems) * fixed CCR31 display in debugger
* Split ADSP2100 execution loop between debug/non-debug. Aaron Giles2008-06-291-708/+747
|
* Stash jump target address before executing delay slot. Aaron Giles2008-06-291-6/+11
| | | | | | | Also, don't update link register until delay slot has finished executing. Fixes hang in gauntleg, though there are math problems lurking still.
* Fixed 32031 so that it doesn't call the debugger if not enabled. Aaron Giles2008-06-282-4/+16
|