| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
| |
[Ryan Holtz, Bat Country Entertainment]
- 5-pass post-processing: Upscale, Post-Process, Store Last Frame, Defocus 1, Defocus 2
- Many tunable effects including: Scanlines, defocus, linear deconvergence, radial deconvergence, pincushion, RGB colorspace convolution, YIQ colorspace convolution, saturation, simulated dot crawl, simulated chroma subsampling, aperture masking, and more.
- Requires a GPU that supports Shader Model 3.0 to be enabled and a powerful GPU, the entire pipeline consists of approximately 30 texel fetches and approximately 230 arthimetic ops.
- Will supersample the framebuffer up to 9x in both X and Y, but this requires an enormously powerful GPU that has not been invented; users with Radeon 5000-class cards should limit themselves to 3x, Radeon 4000 to 1.5x.
- The default configuration will NOT appear to do anything; it requires tuning to the user's liking.
- Should nicely fall back in all cases except missing shaders, and it might fall back correctly in that case as well. Report any anomalies.
- For obvious reasons, the Direct3D8 renderer cannont support this.
|
|
|
|
| |
get rid of it across the board.
|
|
|
|
|
|
|
|
|
|
|
|
| |
- non-device timer callbacks
- machine state changing callbacks
- configuration callbacks
- per-screen VBLANK callbacks
- DRC backend callbacks
For the timer case only, I added wrappers for the old-style functions.
Over time, drivers should switch to device timers instead, reducing the
number of timers that are directly allocated through the scheduler.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove redundant machine items from address_space and device_t.
Neither machine nor m_machine are directly accessible anymore.
Instead a new getter machine() is available which returns a
machine reference. So:
space->machine->xxx ==> space->machine().xxx
device->machine->yyy ==> device->machine().yyy
Globally changed all running_machine pointers to running_machine
references. Any function/method that takes a running_machine takes
it as a required parameter (1 or 2 exceptions). Being consistent
here gets rid of a lot of odd &machine or *machine, but it does
mean a very large bulk change across the project.
Structs which have a running_machine * now have that variable
renamed to m_machine, and now have a shiny new machine() method
that works like the space and device methods above. Since most of
these are things that should eventually be devices anyway, consider
this a step in that direction.
98% of the update was done with regex searches. The changes are
architected such that the compiler will catch the remaining
errors:
// find things that use an embedded machine directly and replace
// with a machine() getter call
S: ->machine->
R: ->machine\(\)\.
// do the same if via a reference
S: \.machine->
R: \.machine\(\)\.
// convert function parameters to running_machine &
S: running_machine \*machine([^;])
R: running_machine \&machine\1
// replace machine-> with machine.
S: machine->
R: machine\.
// replace &machine() with machine()
S: \&([()->a-z0-9_]+machine\(\))
R: \1
// sanity check: look for this used as a cast
(running_machine &)
// and change to this:
*(running_machine *)
|
| |
|
|
|
|
|
| |
destructor which was inappropriate, as textures are allocated and
recycled via a fixed size allocator.
|
|
|
|
|
| |
Converted global video routines into a video_manager.
Moved video manager initialization earlier in startup.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
allocated.
Fix texture leak in crsshair.c.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
performance as a result of this change. Do not panic; report issues to the
list in the short term and I will look into them. There are probably also
some details I forgot to mention. Please ask questions if anything is not
clear.
NOTE: This is a major internal change to the way devices are handled in
MAME. There is a small impact on drivers, but the bulk of the changes are
to the devices themselves. Full documentation on the new device handling
is in progress at http://mamedev.org/devwiki/index.php/MAME_Device_Basics
Defined two new casting helpers: [Aaron Giles]
downcast<type>(value) should be used for safe and efficient downcasting
from a base class to a derived class. It wraps static_cast<> by adding
an assert that a matching dynamic_cast<> returns the same result in
debug builds.
crosscast<type>(value) should be used for safe casting from one type to
another in multiple inheritance scenarios. It compiles to a
dynamic_cast<> plus an assert on the result. Since it does not optimize
down to static_cast<>, you should prefer downcast<> over crosscast<>
when you can.
Redefined running_device to be a proper C++ class (now called device_t).
Same for device_config (still called device_config). All devices and
device_configs must now be derived from these base classes. This means
each device type now has a pair of its own unique classes that describe
the device. Drivers are encouraged to use the specific device types
instead of the generic running_device or device_t classes. Drivers that
have a state class defined in their header file are encouraged to use
initializers off the constructor to locate devices. [Aaron Giles]
Removed the following fields from the device and device configuration
classes as they never were necessary or provided any use: device class,
device family, source file, version, credits. [Aaron Giles]
Added templatized variant of machine->device() which performs a downcast
as part of the device fetch. Thus machine->device<timer_device>("timer")
will locate a device named "timer", downcast it to a timer_device, and
assert if the downcast fails. [Aaron Giles]
Removed most publically accessible members of running_device/device_t in
favor of inline accessor functions. The only remaining public member is
machine. Thus all references to device->type are now device->type(), etc.
[Aaron Giles]
Created a number of device interface classes which are designed to be mix-
ins for the device classes, providing specific extended functionality and
information. There are standard interface classes for sound, execution,
state, nvram, memory, and disassembly. Devices can opt into 0 or more of
these classes. [Aaron Giles]
Converted the classic CPU device to a standard device that uses the
execution, state, memory, and disassembly interfaces. Used this new class
(cpu_device) to implement the existing CPU device interface. In the future
it will be possible to convert each CPU core to its own device type, but
for now they are still all CPU devices with a cpu_type() that specifies
exactly which kind of CPU. [Aaron Giles]
Created a new header devlegcy.h which wraps the old device interface using
some special template classes. To use these with an existing device,
simply remove from the device header the DEVICE_GET_INFO() declaration and
the #define mapping the ALL_CAPS name to the DEVICE_GET_INFO. In their
place #include "devlegcy.h" and use the DECLARE_LEGACY_DEVICE() macro.
In addition, there is a DECLARE_LEGACY_SOUND_DEVICE() macro for wrapping
existing sound devices into new-style devices, and a
DECLARE_LEGACY_NVRAM_DEVICE() for wrapping NVRAM devices. Also moved the
token and inline_config members to the legacy device class, as these are
not used in modern devices. [Aaron Giles]
Converted the standard base devices (VIDEO_SCREEN, SPEAKER, and TIMER)
from legacy devices to the new C++ style. Also renamed VIDEO_SCREEN to
simply SCREEN. The various global functions that were previously used to
access information or modify the state of these devices are now replaced
by methods on the device classes. Specifically:
video_screen_configure() == screen->configure()
video_screen_set_visarea() == screen->set_visible_area()
video_screen_update_partial() == screen->update_partial()
video_screen_update_now() == screen->update_now()
video_screen_get_vpos() == screen->vpos()
video_screen_get_hpos() == screen->hpos()
video_screen_get_vblank() == screen->vblank()
video_screen_get_hblank() == screen->hblank()
video_screen_get_width() == screen->width()
video_screen_get_height() == screen->height()
video_screen_get_visible_area() == screen->visible_area()
video_screen_get_time_until_pos() == screen->time_until_pos()
video_screen_get_time_until_vblank_start() ==
screen->time_until_vblank_start()
video_screen_get_time_until_vblank_end() ==
screen->time_until_vblank_end()
video_screen_get_time_until_update() == screen->time_until_update()
video_screen_get_scan_period() == screen->scan_period()
video_screen_get_frame_period() == screen->frame_period()
video_screen_get_frame_number() == screen->frame_number()
timer_device_adjust_oneshot() == timer->adjust()
timer_device_adjust_periodic() == timer->adjust()
timer_device_reset() == timer->reset()
timer_device_enable() == timer->enable()
timer_device_enabled() == timer->enabled()
timer_device_get_param() == timer->param()
timer_device_set_param() == timer->set_param()
timer_device_get_ptr() == timer->get_ptr()
timer_device_set_ptr() == timer->set_ptr()
timer_device_timeelapsed() == timer->time_elapsed()
timer_device_timeleft() == timer->time_left()
timer_device_starttime() == timer->start_time()
timer_device_firetime() == timer->fire_time()
Updated all drivers that use the above functions to fetch the specific
device type (timer_device or screen_device) and call the appropriate
method. [Aaron Giles]
Changed machine->primary_screen and the 'screen' parameter to VIDEO_UPDATE
to specifically pass in a screen_device object. [Aaron Giles]
Defined a new custom interface for the Z80 daisy chain. This interface
behaves like the standard interfaces, and can be added to any device that
implements the Z80 daisy chain behavior. Converted all existing Z80 daisy
chain devices to new-style devices that inherit this interface.
[Aaron Giles]
Changed the way CPU state tables are built up. Previously, these were data
structures defined by a CPU core which described all the registers and how
to output them. This functionality is now part of the state interface and
is implemented via the device_state_entry class. Updated all CPU cores
which were using the old data structure to use the new form. The syntax is
currently awkward, but will be cleaner for CPUs that are native new
devices. [Aaron Giles]
Converted the okim6295 and eeprom devices to the new model. These were
necessary because they both require multiple interfaces to operate and it
didn't make sense to create legacy device templates for these single cases.
(okim6295 needs the sound interface and the memory interface, while eeprom
requires both the nvram and memory interfaces). [Aaron Giles]
Changed parameters in a few callback functions from pointers to references
in situations where they are guaranteed to never be NULL. [Aaron Giles]
Removed MDRV_CPU_FLAGS() which was only used for disabling a CPU. Changed
it to MDRV_DEVICE_DISABLE() instead. Updated drivers. [Aaron Giles]
Reorganized the token parsing for machine configurations. The core parsing
code knows how to create/replace/remove devices, but all device token
parsing is now handled in the device_config class, which in turn will make
use of any interface classes or device-specific token handling for custom
token processing. [Aaron Giles]
Moved many validity checks out of validity.c and into the device interface
classes. For example, address space validation is now part of the memory
interface class. [Aaron Giles]
Consolidated address space parameters (bus width, endianness, etc.) into
a single address_space_config class. Updated all code that queried for
address space parameters to use the new mechanism. [Aaron Giles]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- added support for arbitrary number of containers for render_target
- added command-line parameter -debug_internal (-di) to use the internal debugger when in debug mode
- internal debugger supports all views except memory view
- added "Debug" view to layout/vertical.lay to create more place for debug views in vertical games.
The colors are ugly. Font rendering needs improvement. There are no shortcut keys right now. There is still a lot of room for more improvements.
However, it works and does not depend on any ui toolkit. The interface has been designed to support displaying views programmatically e.g. from the ui.
Currently, the ui render target is used. In order to support views being displayed in separate windows further changes are needed:
- the osd layer must support creating and closing windows (render targets) on demand.
- There must be a mode for render targets where their bounds follows the window size - Currently the render target size depends on the aspect of currently selected "artwork" view.
- Render target needs a name property.
Short HowTo:
- Start MAME with "-debug -di"
- Console, register and disasm views will be shown. Place them by dragging the view on the title bar.
- Views can be resized by dragging the bottom-right yellow square.
- The view having the focus has a green background title bar.
- Hit "Tab" (IPT_UI_CONFIGURE) to show the menu.
- Console and disasm views support a very simple facility to support entering commands and addresses. Just start typing. Hit "enter" when finished.
|
|
|
|
|
|
|
| |
- ui_input_frame_update is now global
- moved element_component from rendlay.c to rendlay.h
- added ability to rendlay.c to define "container" components. These simply provide a render_container.
I plan to remove the above again and simply use one container covering the whole render_target. This container will be rendered after the artwork and before the ui. For this to work, DViews need move and resize support. Render_targets will than be equivalent to virtual desktops.
|
|
|
|
|
|
| |
- all ui functions now expect a render_container
- removed all macros referencing render_container_get_ui
- ui_menu_alloc now is passed a container to which to render the menu.
This is a first round of changes to allow using ui_* functions in a more generic way.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
is now separate from runtime device state. I have larger plans
for devices, so there is some temporary scaffolding to hold
everything together, but this first step does separate things
out.
There is a new class 'running_device' which represents the
state of a live device. A list of these running_devices sits
in machine->devicelist and is created when a running_machine
is instantiated.
To access the configuration state, use device->baseconfig()
which returns a reference to the configuration.
The list of running_devices in machine->devicelist has a 1:1
correspondance with the list of device configurations in
machine->config->devicelist, and most navigation options work
equally on either (scanning by class, type, etc.)
For the most part, drivers will now deal with running_device
objects instead of const device_config objects. In fact, in
order to do this patch, I did the following global search &
replace:
const device_config -> running_device
device->static_config -> device->baseconfig().static_config
device->inline_config -> device->baseconfig().inline_config
and then fixed up the compiler errors that fell out.
Some specifics:
Removed device_get_info_* functions and replaced them with
methods called get_config_*.
Added methods for get_runtime_* to access runtime state from
the running_device.
DEVICE_GET_INFO callbacks are only passed a device_config *.
This means they have no access to the token or runtime state
at all. For most cases this is fine.
Added new DEVICE_GET_RUNTIME_INFO callback that is passed
the running_device for accessing data that is live at runtime.
In the future this will go away to make room for a cleaner
mechanism.
Cleaned up the handoff of memory regions from the memory
subsystem to the devices.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Created new central header "emu.h"; this should be included
by pretty much any driver or device as the first include. This
file in turn includes pretty much everything a driver or device
will need, minus any other devices it references. Note that
emu.h should *never* be included by another header file.
- Updated all files in the core (src/emu) to use emu.h.
- Removed a ton of redundant and poorly-tracked header includes
from within other header files.
- Temporarily changed driver.h to map to emu.h until we update
files outside of the core.
Added class wrapper around tagmap so it can be directly included
and accessed within objects that need it. Updated all users to
embed tagmap objects and changed them to call through the class.
Added nicer functions for finding devices, ports, and regions in
a machine:
machine->device("tag") -- return the named device, or NULL
machine->port("tag") -- return the named port, or NULL
machine->region("tag"[, &length[, &flags]]) -- return the
named region and optionally its length and flags
Made the device tag an astring. This required touching a lot of
code that printed the device to explicitly fetch the C-string
from it. (Thank you gcc for flagging that issue!)
|
|
|
|
|
|
|
|
|
|
| |
adds/removes entries in header files, and fixes a few potential
multisession issues by explicitly adding initializers. asic65.c has
significant changes to accomodate using a struct instead of 16
variables, otherwise the changes in this patch are modest and obvious.
[Atari Ace]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
deprecat.h.
Changed render_texture_set_bitmap() to accept a palette object
instead of a palette index. The renderer remains optimized for the
system palette but will work if objects have their own palette as
well.
Changed renderer to permit palettes for RGB and YUY textures. If
specified, these palettes specify a 32-entry (RGB15) or 256-entry
(others) lookup for applying additional brightness/contrast/gamma
on a per-texture basis.
Removed rescale notification. It never really worked that well and
violated proper layering.
Renamed palette_set_brightness() to palette_set_pen_contrast() for
clarity.
Changed palette objects to support global brightness/contrast/gamma
in addition to per-group and per-entry controls.
|
|
|
|
|
| |
can be set directly in the palette entry and will be respected for
laserdisc overlays.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
for this new support to work.
Clickable input support. Mostly by Nathan. A few changes from the
proposal:
* as far as the layout is concerned, states are 0 (off) or 1 (on) and
aren't impacted by the port's ACTIVE_HIGH or ACTIVE_LOW
* instead of checking each individual field for a hit, we look to see
what is hit once per frame and then just check against that; this
is faster, but does limit us to a single hit item
* added function input_field_by_tag_and_mask() to look up a particular
input_field_config by tag and mask; this makes it possible to easily
get the port default value or other information as necessary
|
| |
|
|
|
|
| |
a single get/set of a user settings struct.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
lurking. If you run into anything odd, please let me know.
Added new module uiinput.c which manages input for the user interface.
The OSD is responsible for pushing mouse events and character events
to this interface in order to support mouse movement and text-based
input (currently only used for the select game menu). Added support
for navigating through the menus using the mouse.
[Nathan Woods, Aaron Giles]
Redesigned the UI menus so that they can maintain a richer state. Now
the menus can be generated once and reused, rather than requiring them
to be regenerated on each frame. All menus also share a comment eventing
system and navigation through them is managed centrally. Rewrote all the
menus to use the new system, apart from the cheat menus, which are now
disabled. Reorganized the video menu to make it easier to understand.
[Aaron Giles]
|
|
|
|
|
|
| |
on a command-line parameter and the configuration. Changed Windows OSD
code to use this instead of its own logic. Changed -snapview to share the
logic as well, enabling 'auto' as a -snapview option.
|
|
|
|
| |
- Hooked up swapped videoram in Karnov properly -- same idea as Burger Time
|
|
|
|
|
|
|
|
|
| |
- Added video_screen_auto_bitmap_alloc(screen) -- it is just a shorthand for
auto_bitmap_alloc(video_screen_get_width(screen), video_screen_get_height(screen), video_screen_get_format(screen))
which is a common operation
- The Dynax/Don Den Lover games now do their updating in VIDEO_UPDATE instead of VIDEO_EOF. This semmed to
have fixed the palette problems
- Went through some of these drivers and changed Machine to machine
|
|
|
|
|
|
| |
the screen device instead.
render.c now uses screen devices
|
|
|
|
|
|
|
|
|
|
| |
suffixed with _func. Did this throughout the core and
drivers I was familiar with.
Fixed gcc compiler error with recent render.c changes.
gcc does not like explicit (int) casts on float or
double functions. This is fracking annoying and stupid,
but there you have it.
|
|
|
|
| |
target_compute_visible_area to int for consistency with other calls.
|
|
|
|
| |
Removes mame_bitmap
|
|
|
|
|
|
| |
- removed years from copyright notices
- removed redundant (c) from copyright notices
- updated "the MAME Team" to be "Nicola Salmoria and the MAME Team"
|
| |
|
|
|