| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
| |
More deprecat.h cleanup in the core, notably changing the apis for
poly_alloc. I also made cpu_get_index_slow fatalerror on failure
since no one is checking the return value.
deprecat.h -= 14, Machine -= ~55
~aa
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Sent: Thursday, December 11, 2008 10:56 AM
To: submit@mamedev.org
Cc: atariace@hotmail.com
Subject: [patch] verboselog changes for future Machine removal
Hi mamedev,
Several mame files use an inline verboselog definition which saves
typing the cpuexec_describe_context repeatedly. While this is a nice
feature, each case introduces a then hard to remove deprecated Machine
variable. One way to fix this would be to add machine to the
parameter list for each verboselog call. Another way would be to
change them to include the context call explicitly inside a typical
logging macro (e.g. decocass.h). Not knowing which would be more
acceptable to mamedev, I've included patches for both.
~aa
(I chose to pass the machine to the verboselog function.)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Added new function cpuexec_describe_context(machine) which can be
used in logerror() and other printf-style functions to return a
description of the current CPU/PC given only the machine. Changed
several dozen sites to use this instead of directly interrogating
the activecpu.
Removed all other uses of activecpu throughout the system. Removed
activecpu from the machine structure to prevent future abuse.
Removed cpu_push_context() and cpu_pop_context(), and all call
sites.
Voodoo devices now require a CPU to be defined in the configuration
in order to know whom to steal cycles from or stall when FIFOs get
full. Updated all voodoo users to specify one.
CPD1869 devices now also require a CPU to be defined in the
configuration, in order to know which CPU's registers to fetch.
Updated all cdp1869 users to specify one.
Many other small changes to make this all work.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Sent: Wednesday, December 10, 2008 9:27 AM
To: submit@mamedev.org
Cc: atariace@hotmail.com
Subject: [patch] Add machine to some emu/machine init methods
Hi mamedev,
This patch widens some machine init interfaces to pass the machine
parameter, allowing more Machine global references to be eliminated.
Eventually most of these need to be converted to devices, but this
change reduces the deprecation surface in the meantime. I also
attached the script I used to do the initial changes to the drivers,
which handled about 90% of the cases without further editing.
~aa
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a reworked/expanded version of the patch I sent yesterday.
This one is split into three parts:
1. This introduces function macros for SAMPLES_START,
CUSTOM_{START,STOP,RESET}, and ANTIC_RENDERER.
2. This introduces running_machine *machine throughout MAME.
Principally it adds running_machine *machine = Machine to the top of
functions, but in some static functions the parameter is added
directly. Some similar changes in 99xxcore.h, v9938.c, v9938mod.c,
galaxold.c, psx.c, taito_l.c are also made to eliminate Machine
params. No global API is changed.
3. This changes the APIs introduced in the first part to pass device
or space as appropriate. A few similar changes in some other global
apis are made as well.
The net result of this sequence of patches is to remove 40% of the
Machine references and 27 deprecat.h includes.
~aa
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
appropriate, and to keep all global variables hanging off the
machine structure. Once again, this means all state registration
call sites have been touched:
- state_save_register_global* now takes a machine parameter
- state_save_register_item* now takes a machine parameter
- added new state_save_register_device_item* which now uses
the device name and tag to generate the base name
Extended the fake sound devices to have more populated fields.
Modified sound cores to use tags from the devices and simplified
the start function.
Renumbered CPU and sound get/set info constants to align with
the device constants, and shared values where they were perfectly
aligned.
Set the type field in the fake device_configs for CPU and sound
chips to a get_info stub which calls through to the CPU and sound
specific get_info functions. This means the device_get_info()
functions work for CPU and sound cores, even in their fake state.
Changed device information getters from device_info() to
device_get_info() to match the CPU and sound macros.
|
| |
|
|
|
|
|
| |
and timer_get_time to pass the machine parameter. Moved timer globals
to hang off of the running_machine.
|
|
|
|
|
|
| |
state_save_combine_module_and_tag() function in favor of passing
the tag when registering. Revisited all save state item registrations
and changed them to use the tag where appropriate.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* added a set of cpu_* calls which accept a CPU device object;
these are now the preferred means of manipulating a CPU
* removed the cpunum_* calls; added an array of cpu[] to the
running_machine object; converted all existing cpunum_* calls
to cpu_* calls, pulling the CPU device object from the new
array in the running_machine
* removed the activecpu_* calls; added an activecpu member to
the running_machine object; converted all existing activecpu_*
calls to cpu_* calls, pulling the active CPU device object
from the running_machine
* changed cpuintrf_push_context() to cpu_push_context(), taking
a CPU object pointer; changed cpuintrf_pop_context() to
cpu_pop_context(); eventually these will go away
* many other similar changes moving toward a model where all CPU
references are done by the CPU object and not by index
|
|
|
|
| |
changed to a const by not saving it. As the serial number cannot be changed at run time it was rather pointless. I can only imagine I did it so you could hack the state file instead of having to recompile, though it should probably load it from an external file so you can supply your own.
|
|
|
|
|
| |
Updated all call sites.
Fixed recent build breaks.
|
|
|
|
|
|
|
| |
This is an updated version of my earlier ATTR_PRINTF patch. It was
reviewed by Atari Ace to use ATTR_PRINTF properly and fixes even more
format errors. I also reviewed the whole source again and it is now
used in all possible places.
|
| |
|
| |
|
|
|