| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| |
|
|
|
|
|
|
|
| |
emulation for interpreter.
Set MV, MU and MI flags and corresponding sticky flags for
multiplication. Flush denormals to zero and set AV flag (and
corresponding sticky flag) for dual add/subtract. More detailed NaN
handling for both.
|
| | |
|
| |
|
|
| |
dual multiplier/ALU ops, be stricter about Rn vs Fn.
|
| |
|
|
| |
and COPYSIGN, and some minor optimisation, for interpreter.
|
| |
|
|
|
|
| |
* Set AOS on fixed point dual add/subtract overflow.
* Handle corner cases better for floating point MIN, MAX and CLIP.
* Cleaned up code for floating point COMP.
|
| |
|
|
|
|
|
|
|
| |
* Implemented fixed-point ALU overflow sticky flag (AOS).
* More accurate implementation of Fn = -Fx, Fn = ABS Fx and
Fn = PASS Fx.
* Implemented Rn = ABS Rx and Fn = ABS(Fx - Fy).
* Sorted computer function declarations and definitions to match order
of instruction listings in documentation.
|
| | |
|
| |
|
|
|
|
| |
* Fixed carry flag calculation for subtract with carry.
* Implemented Rn = Rx + CI and Rn = Rx + CI - 1.
* Rn = Rx + 1, Rn = Rx - 1 and Rn = -Rx should saturate the result.
|
| |
|
|
|
| |
Neglected to git add the change after copy/pasting complementary
operation above.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Implemented fixed point CLIP and add/subtract with carry for
recompiler.
* Cleaned up and de-duplicated code for setting ASTAT flags on fixed
point ALU operationf for recompiler, and fixed AC flag for subract
operations.
* Optimised generated code for fixed point dual add subtrat, PASS and
COMP for recompiler.
* Reduced unnecessary ASTAT flag copies for recompiler and added more
glue that will be needed for supporting saturating arithmetic.
* Cleaned up fixed point COMP code for interpreter.
-machine/microtch.cpp: Added the host interface microcontroller to make
it easier to look at the program (disabled for now, will be emulated in
the future).
-video/vrender0.cpp: The inline qualifier implies internal linkage for
free functions in C++ - there's no need for static.
|
| |
|
|
|
|
|
|
|
| |
* Implemented short word sign extension.
* Fixed DAG2 (PM) register display in debugger.
* Track AF dependencies when analysing instructions.
* Log analysed instructions when logging UML code.
* Removed misplaced break in cpu/sharc/sharcfe.cpp.
* cpu/uml.h: Let C functions take any pointer/reference parameter.
|
| | |
|
| |
|
|
|
|
|
| |
interpreter. (#15055)
* Corrected logic for generating carry/overflow flags in add-with-carry and subtract-with-borrow operations.
* Corrected floating point clip calculation for Fx < 0.
* Implemented the LT, LE, GE and GT conditions properly.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
cpu/drcbearm64.cpp: Don't set the rounding mode on SETFMOD if it hasn't
changed.
cpu/e132xs.cpp: Skip more unnecessary flag calculations, use
pre-calculated PC for updating G0 in memory when possible, better
analysis of pre-calculated PC values when delay slots are involved.
cpu/sh: Cleaned up register dependency analysis logging, fixed an
instruction analysis bug.
cpu/sharc: Disassemble unimplemented instructions executed in recompiled
code, include tag in more fatal errors, use throw syntax to make it
cleared it's an early out.
|
| |
|
|
|
|
|
|
|
| |
* Fixes various things that were always broken with the C and ARM
backends or worked by chance with the x86-64 and i686 back-end.
* Also commented out some constexpr for now.
-cpu/drcfe.h: Added some helpers.
-cpu/sharc/sharcfe.cpp: Don't use memset to clear loop entries.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
The base opcode description now only has the parts that are used by the
base recompiler front-end. CPU cores are free to define their own
extensions as they see fit without being limited to pre-defined fields.
The base recompiler front-end is now a template, eliminating the virtual
member functions. It no longer has any dependencies on libemu, which
paves the way to decoupling the recompiler front-ends and allowing the
instruction analysis to be tested without the rest of the emulator.
Also added a compile-time option to disable ASTAT flag update elision in
the SHARC recompiler, and fixed some recompiler front-end bugs.
|
| |
|
|
| |
state when switching from input to output.
|
| |
|
|
| |
cpu/sharc: Fixed build.
|
| | |
|
| |
|
|
|
|
|
|
|
| |
* Current implementation gets confused, breaking Thrill Drive on Hornet.
-sega/model2.cpp: Marked Daytona games as having imperfect controls.
* The games are playable with analog controls, but the pedal ranges are
less than ideal, so it can have a warning for now.
|
| | |
|
| |
|
|
|
| |
konami/hornet.cpp: Enabled SHARC recompiler for NBA Play By Play,
Teraburst and Thrill Drive G family games.
|
| |
|
|
|
|
|
|
| |
* Flag pin bits are unaffected by push/pop status.
* Only flags set to input follow inputs on flag pins.
* Implemented ASTAT write for recompiler.
* Show ASTAT value in debugger when recompiler is enabled.
* Also don't allocated DRC cache when recompiler is disabled.
|
| |
|
|
|
|
|
|
|
| |
* Always access top-of-stack through pseudo-registers.
* Better behaviour when stack is empty or full.
* Implemented more read/write top-of-stack and explicit push/pop
operations.
* Try to get loop stack into a consistent state after loading a saved
state.
|
| |
|
|
| |
Fixes changing settings in Pilot Kids service mode menus.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
* Always access top-of-stack through the pseudo-register value.
* Better behaviour when PC stack is empty.
* Implemented effects of writing to PCSTKP.
* Mask PC stack values to 24 bits.
* Try to get PC stack into a consistent state after loading a saved
state.
* Also fixed loops with initial counter value of zero (should iterate
2^32 times).
|
| |
|
|
|
|
|
|
| |
* Also actually implemented ASTAT/MODE1 save/restore for recompiler.
-cpu/drcbearm64.cpp: Identify more valid bit mask immediates (saves an
instruction and a temporary register, e.g. when clearing a small
contiguous field in an integer).
|
| |
|
|
| |
STKY bits (should fix MT07295).
|
| |
|
|
|
|
| |
This reverts commit 874b81d69ff627964c765de543a7cbfdd2a63b0c.
This isn't ready.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Completely overhauled PC and loop stack handling, Top-of-stack always
uses pseudo-registers, explicit push and pop instruction work correctly,
various values are masked properly, and the device attempts to get back
into a consistent state after loading a saved state.
Improved behaviour of reading/writing top-of-stack registers,
particularly when stack is empty or full. Also prevent writes from
modifying read-only STKY bits, and update state properly on PCSTKP
writes.
Made some small improvements to status stack handling in interpreter,
and actually implemented ASTAT/MODE1 save/restore on status stack in
recompiler.
Fixed reset state for stacks and a few other things.
|
| |
|
|
|
|
|
| |
* Helper functions for getting commonly extracted opcode fields.
* More symbolic constants, fewer magic numbers.
* More constexpr helper functions, fewer macros, safer macros.
* More const local variables.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This is required by Last Bronx, which has code that de-duplicates the
common part of multiple successive loops. It reduces the performance of
do-nothing spin loops a bit but not too much - the DRC still has
substantially better performance than the interpreter.
Unfortunately, this exposes a pre-existing issue with how ASTAT
conditions are handled in the SHARC front-end which causes the Midnight
Run and Racing Jam DSP programs to crash. Fixing it will require major
changes. Use -nodrc for now, I'll probably have to disable to
recompiler before the next release until this can be fixed.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Fixed multiply/average and multiply/absolute for interpreter - the ALU
operations produce a floating point result.
Implemented move from multiplier register, multiply/average, average,
and FDEP with immediate field specification for recompiler.
Use a more accurate approach for the absolute value calculation in
multiply/average and average rather than hoping the C library does the
right thing for the interpreter and recompiler.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
cpu/sharc/sharcdrc.cpp: Exploit data memory layout to bypass the memory
system for both 32-bit and 16-bit SRAM accesses.
cpu/sharc/sharcdrc.cpp: Exploit the way the SHARC toolchain lays out
executable code and data in SRAM to greatly reduce unnecessary cache
flushes.
cpu/sharc/sharcdrc.cpp: Implemented Rn = NOT Rx (used by Sega Model 2B
games).
cpu/sharc/sharcdrc.cpp: Align 32-bit program memory accesses with the
most significant bit of the bus (corresponds to interpreter change in
0f368c268c1eabc176af8e5cdf780b5d60e8d9a0 from GitHub #13770).
emu/debug/points.cpp: Fixed hang when a watchpoint is hit on a 64-bit
wide address space with word addressing.
sega/model2.cpp: Enabled SHARC recompiler for Model 2B (can be disabled
again before release if too many things are broken).
|
| | |
|
| | |
|
| |
|
|
| |
added ADSP21060 (larger internal SRAM).
|
| |
|
|
| |
recompiler ASTAT for saved states.
|
| | |
|
| |
|
|
|
|
|
|
|
| |
* Implemented bit-accurate RECIPS and RSQRTS in recompiler (fast
approximation can be enabled by setting a macro).
* Fixed/optimised RECIPS flag calculation for interpreter.
* Fixed FIX for negative numbers when MODE1 TRUNC bit it set for
interpreter and recompiler (should round towards negative infinity).
* Don't regenerate static helpers on cache flush.
|
| |
|
|
|
| |
Members added in 5211a003a57a9ca5bb4b117499f313fd8fca4d32 were not added
to save states.
|
| |
|
| |
sega/model2.cpp: Got rid of now-obsolete SHARC 16-bit IOP workaround.
|
| | |
|
| |
|
|
|
|
|
|
| |
* machine/k033906.cpp: Added read side effects check (should fix
MT08830).
* cpu/tms320c3x: Marked TMS320C31 as parent ROM of TMS320VC33.
* cpu/sharc: Cleaned up formatting of 64-bit values and initialisation
of opcode dispatch table.
|
| |
|
|
|
| |
One pre-existing, one introducted in
26cac45f03c20cec397ddd3a75d2c5caff3239e1.
|
| |
|
|
|
|
|
|
|
| |
* Fixed SV flag for LSHIFT/ASHIFT in recompiler (interpreter was
correct).
* Simplified generated code for FEXT with non-immediate bit
position/length in recompiler.
* Fixed off-scale ASHIFT in recompiler.
* Fixed off-scale FEXT with sign extension in interpreter.
|
| | |
|