| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Also cleaned them so they compile.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Sent: Thursday, December 11, 2008 6:52 PM
To: submit@mamedev.org
Cc: atariace@hotmail.com
Subject: [patch] deprecat.h cpu cleanup
Hi mamedev,
This patch purges the last few uses of deprecat.h from the cpu cores,
plus a handful of other Machine cases elsewhere that were found by
script inspection.
~aa
--
Hi mamedev,
This patch eliminates most uses of deprecat.h in the sound cores by
attaching the device to the state object and using it where
appropriate. Given that all the cpu objects use this convention, and
three sound cores already do this, this seemed an appropriate
approach.
~aa
|
|
|
|
|
|
|
| |
works. Added callback parameters to the expression engine. Improved
CPU parsing so you can use a CPU tag or index in most commands that
take one. Switched to passing CPU and address space objects around
where appropriate. Lots of other minor tweaks.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Subject: [patch] Even more reset/multisession cleanup
Hi mamedev,
These two patches try to reduce the amount of variable in .data, which
usually point to multisession/reset bugs or missing const qualifiers.
The first patch just adds const to a number of items, moving them from
.data to .rdata. The second patch sets other items to zero (moving
them to .bss), adding reset/init code where appropriate.
~aa
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
| |
- reactivated back-end validation mechanism
- added back-end validation for ADD/SUB/MUL/DIV/CMP forms
- fixed several errors in dealing with more obscure flag combinations
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Converted sysreg_r/w to 8-bit handlers
* Added hack to make network IRQs work; brings some games back to life
UML:
* Fixed STORE opcode description to allow immediate source operands
x86/x64 back-ends:
* Added flag support to SEXT, ROLAND, ROLINS, LZCNT opcodes
PPC DRC:
* Rewrote lswi/stswi as subroutines
* Made accesses to tempdata explicitly dword or qword
* Fixed SRR0 when generating a syscall
* Removed no longer necessary TESTs on extsb/w, rlwinm, rlwnm, rlwimi, cntlzw
* Fixed bug where the SO flag was not being computed for compares
* Fixed flag computations for mulhw/mulhwu/mullw
* Fixed subtlety of shifts between 32 and 63 in srw/sraw
* Fixed mffs/mtfsf to use FP registers
* Fixed mtfsfi to use the immediate value properly
* Now marking terminal count bit in DMA status register
|
|
|
|
|
|
|
|
|
|
| |
* Added simple symbol table to the UML for improved disassembly
* Changed optional disassembler cache parameter to a drcuml object
PPC DRC:
* Added symbols for most common variables
* Fixed bug in handling XER carry flag for subo. forms
* Simplified flag insertion logic for opcodeo. forms
|
|
|
|
| |
* Improved disassembly output
|
|
|
|
|
|
| |
* Added logic to simplify opcodes as much as possible at the UML layer.
* Removed similar logic in the x86 and x64 back-ends.
* Added stricter parameter validation for registers and mapvars
|
|
|
|
| |
* Added NOP opcode
|
|
|
|
|
|
|
|
| |
* Removed explicit flag requests from the shorthand opcodes
* Added optimization function to drcuml which is called at block end
* Added logic to compute the necessary flags based on upcoming opcodes
and only select those flags which are required
* Updated the PPC and MIPS3 DRCs to no longer explicitly specify flags
|
|
|
|
|
|
| |
* Wrote new disassembler based on enhanced opcode info structure.
* Moved disassembler into drcuml.c and removed old code.
* Extended disassembler buffer sizes to at least 256 bytes.
|
|
|
|
|
|
|
|
|
|
| |
* Added more extensive per-opcode information in preparation for UML
optimization step.
* Made validation more thorough using the extended information.
* Disabled back-end validation for now until it can be revisited
using the new tables.
* Changed GETFLGS encoding so that the mask is in parameter 2 instead
of the flags field.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- rewrote PowerPC implementation as a dynamic recompiler on top
of the universal recompiler engine
- wrote a front-end to analyze PowerPC code paths and register usage
- wrote a common shared module with C implementations of tricky
CPU behaviors
- added separate CPU types for the variants supported, instead of
relying on a hidden model enum
- rewrote the serial port emulation for the 4xx series to be more
accurate and not rely on separate DMA handlers
- rewrote the MMU handling to implement a software TLB that faults
in pages and handles changed bits appropriately
- implemented emulation of the PowerPC 603's software TLB, which
allows the model 3 games to run without a hack to disable the MMU
Updated the PowerPC disassembler to share constants with the rest of
the core, and to more aggressively use simplified mnemonics, especially
for branches. [Aaron Giles]
Universal recompiler:
- fixed frontend to handle opcode widths different from bus width
- added several new opcodes:
* (D)GETFLGS - copies the UML flags to a destination operand
* FDRNDS - rounds a double precision value to single precision
- renamed several opcodes:
* SETC -> CARRY
* XTRACT -> ROLAND
* INSERT -> ROLINS
- consolidated the following opcodes:
* LOAD?U -> LOAD
* LOAD?S -> LOADS
* STORE? -> STORE
* READ?U -> READ
* READ?M -> READM
* WRITE? -> WRITE
* WRITM? -> WRITEM
* SEXT? -> SEXT
* FTOI?? -> FTOINT
* FFRI? -> FFRINT
* FFRF? -> FFRFLT
- removed some opcodes:
* FLAGS - can be done with GETFLGS/LOAD4/ROLINS
* ZEXT - can be achieved with AND
* READ?S - can be achieved with READ/SEXT
- updated C, x86, and x64 back-ends to support these opcode changes
- updated disassembler to support these opcode changes
MIPS3 dynamic recompiler:
- updated to use new/changed opcode forms
- changed context switch so that it only swaps a single pointer
Konami Hornet changes: [Aaron Giles]
- updated to new PowerPC configurations
- updated some memory handlers to be native 8-bit handlers
- cleaned up JVS implementation to work with new serial code
- added fast RAM for the work RAM to give a small speed boost
Konami GTI Club changes: [Aaron Giles]
- updated to new PowerPC configurations
- updated some memory handlers to be native 8-bit handlers
Konami Viper/ZR107 changes: [Aaron Giles]
- updated to new PowerPC configurations
Sega Model 3 changes: [Aaron Giles]
- updated to new PowerPC configurations
- reimplemented/centralized interrupt handling
- these games are broken for the moment
Fixed crasher due to some Konami games using 8 layers in
the K056832 implementation, even though it was only written
for 4. [Aaron Giles]
Added fisttp opcode to i386 disassembler. [Aaron Giles]
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1. In the MIPS core:
- renamed struct mips3_config -> mips3_config
- updated all drivers to the new names
- removed MIPS3DRC_STRICT_COP0 flag, which is no longer used
- a few minor cleanups
2. In the CPU interface:
- added new 'intention' parameter to the translate callback to
indicate read/write/fetch access, user/supervisor mode, and
a flag for debugging
- updated all call sites to pass an appropriate value
- updated all CPU cores to the new prototype
3. In the UML:
- added new opcode SETC to set the carry flag from a source bit
- added new opcode BSWAP to swap bytes within a value
- updated C, x86, x64 back-ends to support the new opcodes
- updated disassembler to support the new opcodes
4. In the DRC frontend:
- fixed bug in handling edge case with the PC near the 0 or ~0
|
|
|
|
| |
Minor tweaks/cleanups to the MIPS3 drc.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Subject: [patch] More Machine->machine changes, add machine to irq
callbacks
Hi mamedev,
Here are two more patches to eliminate Machine globals. The first
patch was autogenerated by the attached fixup script. That script has
been updated to catch additional cases which it previously missed
(when Machine is the last parameter to a function or Machine is used
in an assignment). This makes ~50 more files deprecat.h free.
A sizable chunk (~20%) of the remaining uses of the Machine global in
the drivers are due to irq callbacks for sound and machine updates.
Typically such callbacks need to call cpunum_set_input_line, which
requires a machine parameter, so if the callbacks don't pass the
machine parameter, these routines have no choice but to reference the
global variable.
The second patch attempts to address most cases of this by adding the
machine parameter to the callback interfaces. This allows us to
remove #include "deprecat.h" from ~150 files, at the cost of having to
fix up hundreds of callbacks.
In total, these patches reduced the number of files with deprecat.h
from 783 to 575.
~aa
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Added new opcode LZCNT which returns the number of leading zeros in
a parameter.
* Added new opcode XTRACT which is a combined rotate/mask (basically
rlwinm from PowerPC)
* Added new opcode INSERT which is a combined rotate/mask/blend
(basically rlwimi from PowerPC). Best. Opcode. Ever.
* Updated all back-ends to support these new opcodes.
* Fixed several bugs relating to shifts/rotates and optimizing out
cases incorrectly.
MIPS3 DRC changes:
* Updated to use INSERT and XTRACT where appropriate
* Cleaned up register usage to enable an additional direct mapping;
this means Linux gets 1 now and Windows gets 3
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This will be expanded in the future.
Added two new opcodes: SAVE and RESTORE to save and restore the entire
virtual machine state for examination/setup.
Added new back-end function get_info() which returns information from
the back-end about how many actual registers will be mapped.
Fixed a bug that mapped the high a low parts of registers to the same
address. This should help the C back-end run better on big-endian
architectures.
|
| |
|
|
is drcuml.c, which defines a universal machine language
syntax that can be generated by a frontend recompiler and
then retargeted via a generic backend interface to any of
a number of different architectures. A disassembler for the
UML is also included to allow examination of the generated
UML code.
Currently supported backend architectures include 32-bit x86,
64-bit x86, and a platform-neutral interpreted C backend that
can be used as a fallback for platforms without native
support. The C backend also performs additional validation
to ensure assumptions are met.
Along with the new architecture is a new MIPS III/IV
recompiler frontend. This frontend has been rewritten from
the old x64-specific recompiler to generate UML opcodes
instead. This means that the single recompiler can be used
to target multiple backend architectures and should in
theory produce identical results across all of them.
The old 32-bit and 64-bit MIPS recompilers are now officially
retired. The new system provides similar performance (within
5% generally) to the old system and has similar compatibility.
The only currently known issues are some problems with the
two Gauntlet 3D games.
|