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
Subject: saturn CPU patch
Dear MAMEDev,
The attached patch corrects several bugs in the emulation of the saturn
CPU. These corrections are needed to make new HP48 drivers (to be
submitted to MESS imminently) work.
AFAIK, MESS is the only place where this CPU is used, so, the patch
should
not cause any regression in MAME.
The patch is against 0125u1.
Best regards,
-
Antoine Mine
* 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
- Confirmed the CPU clock after some PCB measurements.
- Changed the SND clock to 1MHz to match the PCB measurement.
- Corrected the internal OKI6295 frequency turning the pin 7 state to HIGH.
- Inputs: Eliminated all pulse limitations.
Affected buttons have a rattled sound in the real thing too.
- Updated technical notes.
Please also co-credit f205v for the measurements.
machine registers if the machine supports it. Currently only x64 on
Windows has enough free registers to do so, though PowerPC will almost
certainly be able to take advantage of this. Gives a minor speedup.
I was able to clean up 24 meg of already-emulated ROMs from /roms/unemulated/Misc. Only one of the sets had a readme that wasn't in MAME.
I have a local copy of discoboy.zip, FishingManiac3.zip, PashaPasha2.zip, and PashaPasha2_redump.zip, and will continue to keep these around in case anyone needs them.
* Fixed front-end so that virtual no-op instructions are still targeted
as branch targets.
* Fixed front-end to mark the beginning of each sequence as needing TLB
validation, since any sequence can be jumped to from anywhere.
* Redid the MIPS3 TLB implementation. Fixed the exception vector and
type handling. Changed the bitfields to directly map from the MIPS TLB
format. Added distinction between TLB fill and TLB valid/modified
exceptions.
* Added separate modes for user, supervisor, and kernel modes. Each mode
does proper verification of addresses now and generates address errors
for invalid accesses.
* Fixed several bugs in the TLB implementation; not everything works
yet but it's a lot closer.
* Made COP0 access checking mandatory in non-kernel modes.
* Fixed several crashes when recompiling virtual no-ops.
* Fixed TLB bug where entries for virtual address 0 were present by
default.
* Fixed bug in the map variable implementation that would sometimes
result in incorrectly recovered values.
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.
He has the Atari manual that clearly says that the game has one pedal (accel) and the gear shift.
He has done some tests between the PCB and driver and now both behave the same.
Sorry if I caused some confusion...
- a wheel
- 2 analog pedals (acceleration, brake)
- gear shift
Currently if you use the analog controls, it takes a lot of time to accelerate and there is no gear shift mapped. I have sent an email to Mirko so probably he will figure out the missing bits of non joystick mode.
Adjustment to roz layer priority - prevents roz layer from incorrectly being displayed over backgrounds in some games (i.e. numanathj)
Added a mask when processing the roz tilemap to avoid defects in emeraldj
The problem is that original submission was sent with reversed diff, I applied it (after Aaron request to commit external submissions), and then Aaron applied it again (with original reversed diff), effectively reverting to old version of code.
* Input ports are now maintained hierarchically. At the top
level are input ports, which contain a list of fields. Each
field represents one or more bits of the port. Certain fields
such as DIP switches and configuration switches contain a
list of settings, which can be selected. DIP switch fields
can also contain a list of DIP switch locations.
* Normalized behavior of port overrides (via PORT_INCLUDE or
by defining multiple overlapping bits). All fields within a
port are kept in strict increasing bit order, so altered DIP
switches are now kept in the appropriate order. This addresses
MAMETesters bug 01671.
* Live port state is now fully separate from configured
state. This is manifested in a similar way to devices, where
a const list of ports can be managed either offline or live.
Each port has a pointer to an opaque set of live state which
is NULL when offline or valid when live. Each port also has
a running_machine * which is also NULL when offline.
* Because of this new arrangement, the conversion from tokens
to a list of ports now requires reasonably complex memory
allocation, so these port lists must be explicitly allocated
and freed (they are not mantained by automatic resource
allocation).
* Custom and changed callbacks now take a pointer to a field
config instead of a running machine. This provides more
information about what field triggered the change notification.
The machine can be found by referenced field->port->machine.
* The inptport.c module has been cleaned up and many
ambiguities resolved. Most of this is internal, though it did
result in osd_customize_inputport_list() being changed to
osd_customize_input_type_list(). The parameter to this function
is now a linked list instead of an array, and the structures
referenced have been reorganized somewhat.
* Updated config.c to pass machine parameters to its callbacks.
* Updated validity checks, XML output, and UI system to handle
the new structures.
* Moved large table of default input settings to a separate
include file inpttype.h.
* Removed gross hacks in trackfld and hyperspt NVRAM. These
may be broken as a result.