summaryrefslogtreecommitdiffstatshomepage
path: root/src/tools/ldresample.cpp
diff options
context:
space:
mode:
author R. Belmont <rb6502@users.noreply.github.com>2020-01-21 16:21:12 -0500
committer GitHub <noreply@github.com>2020-01-21 16:21:12 -0500
commitddf571d8d4488fe9f1003f1cf219cc31d8868283 (patch)
tree3bdc65911a97caeff965cc739a5e67c3f9170c52 /src/tools/ldresample.cpp
parentaa2fa1ddb9f588acc327afc3f399786114290a2b (diff)
parentbb3b73e58b75a9c1a02150a50967aa90ced9e3ec (diff)
Merge pull request #6193 from firewave/fastdebug
removed the remaining bits of the FASTDEBUG/MAME_DEBUG_FAST silliness…
Diffstat (limited to 'src/tools/ldresample.cpp')
0 files changed, 0 insertions, 0 deletions
0133u4&id=c8e552b3dfd8ee2a928be922b760dc55281a120b'>Cleanups and version bump.mame0132u2 Aaron Giles2009-06-251-1/+1 | * From: Atari Ace [mailto:atari_ace@verizon.net] Aaron Giles2009-06-251-5/+4 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sent: Sunday, June 21, 2009 6:15 PM To: submit@mamedev.org Cc: atariace@hotmail.com Subject: Re: [patch] Convert most legacy drawgfx apis to new apis On Sun, 21 Jun 2009 18:12:39 -0700, you wrote: Woops, hit send before I attaches the patches. >Hi mamedev, > >The following set of patches migrates much of MAME from the legacy >drawgfx apis to the new drawgfx apis introduced in January. > >0. This removes the machine parameter from some custom drawgfx >routines to align them better with the current idiom. >1. This changes some custom drawgfx routines to follow the (bitmap, >cliprect, gfx, ...) convention of the new drawgfx apis and adjusts a >few apis to use an explicit transparency constant. >2. This patch is entirely mechanical (generated by gfx07.pl) and >converts legacys apis to the new apis. >3. This patch fixes a few cases where the last patch mangled the >code. > >This leaves about twenty uses of the legacy drawgfx apis in MAME. I'll >likely try to modify most of these before moving the legacy apis to >deprecat.h > >~aa * Bulk change alert. Aaron Giles2009-04-261-2/+2 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This update changes the way we handle memory allocation. Rather than allocating in terms of bytes, allocations are now done in terms of objects. This is done via new set of macros that replace the malloc_or_die() macro: alloc_or_die(t) - allocate memory for an object of type 't' alloc_array_or_die(t,c) - allocate memory for an array of 'c' objects of type 't' alloc_clear_or_die(t) - same as alloc_or_die but memset's the memory to 0 alloc_array_clear_or_die(t,c) - same as alloc_array_or_die but memset's the memory to 0 All original callers of malloc_or_die have been updated to call these new macros. If you just need an array of bytes, you can use alloc_array_or_die(UINT8, numbytes). Made a similar change to the auto_* allocation macros. In addition, added 'machine' as a required parameter to the auto-allocation macros, as the resource pools will eventually be owned by the machine object. The new macros are: auto_alloc(m,t) - allocate memory for an object of type 't' auto_alloc_array(m,t,c) - allocate memory for an array of 'c' objects of type 't' auto_alloc_clear(m,t) - allocate and memset auto_alloc_array_clear(m,t,c) - allocate and memset All original calls or auto_malloc have been updated to use the new macros. In addition, auto_realloc(), auto_strdup(), auto_astring_alloc(), and auto_bitmap_alloc() have been updated to take a machine parameter. Changed validity check allocations to not rely on auto_alloc* anymore because they are not done in the context of a machine. One final change that is included is the removal of SMH_BANKn macros. Just use SMH_BANK(n) instead, which is what the previous macros mapped to anyhow. * Major drawgfx cleanup, global removal, and feature enhancements: Aaron Giles2009-01-121-2/+2 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Added built-in dirty tile tracking to the gfx_element. This removes the need for all drivers that had dynamically populated graphics to do their own dirty tracking. Tiles are marked dirty via the new function gfx_element_mark_dirty(). Any driver that needs access to the decoded data must call gfx_element_get_data() in order to ensure that the referenced tile is clean before proceeding. - In order to support dirty tracking, the gfx_element was enhanced to keep track of the original source pointer, so that it can go back and regenerate tiles on demand. For systems that set NULL for the region in the gfxdecode, they must use gfx_element_set_source() to specify a pointer to the raw data before drawing anything. - Changed allocgfx() to gfx_element_alloc(), and added parameters to specify the source data pointer, base color index, and total colors. Many drivers had to whack these values in after the fact, so this allowed for some minor additional cleanup. - Added a dirtyseq member to the gfx_element struct. This is incremented on each tile dirty, and can be used to sniff if something has changed. - Added logic in the tilemap engine to track which gfx_elements are used for a given tilemap, and automatically detect changes to the tiles so that drivers no longer have to explicitly invalidate the tilemap when tiles change. In the future, this may grow smarter to only invalidate the affected tiles, but for now it invalidates the entire tilemap. - Updated a number of drivers to remove their own dirty handling and leverage the new internal dirty marking. - Because the source data must always be present, updated the atarigen zwackery and mystwarr graphics handing code to support this. - Thanks to the dirty tracking, this actually allows all gfx decoding to happen on the fly instead of all at once up front. Since there was some concern that this would cause undesirable behavior due to decoding lots of tiles on the fly, it is controlled with a compile- time constant in mame.h (PREDECODE_GFX). Set this to 1 to get the old behavior back. - Moved decodechar() and decodegfx() to deprecat.h. All drivers in MAME have been updated to simply mark tiles dirty and let the rendering system decode them as needed, so these functions may go away in the future. - Rewrote entirely the rendering code in drawgfx. This code previously used extensive recursive #includes and tricks to build, and was very difficult to understand. The new code is based off of a set of macros defined in drawgfxm.h. These new macros separate the core rendering logic from the per-pixel operation, allowing the operation to be easily "plugged" into any of the renderers. These macros are also available to any driver that wants custom rendering behavior that is similar to existing core behavior, without needing to populate the core with esoteric one-off rendering behaviors. - Added a set of new functions for [p]drawgfx[zoom], one for each transparency type. The old [p]drawgfx[zoom] functions are still present, but now switch off the transparency type and call through to one of these new transparency-specific functions. The old functions are also now reduced to only supporting TRANSPARENCY_NONE, TRANSPARENCY_PEN, and TRANSPARENCY_PENS. All other rendering types must use the new functions. - All new rendering functions have extensive asserts to catch improper clipping rectangles and other common errors. - All new rendering functions automatically downgrade to optimized versions where appropriate. For example, calling drawgfx_transpen with an out-of-range pen automatically falls back to drawgfx_opaque. And drawgfxzoom_* with xscale=yscale=1.0 automatically falls back to drawgfx_*. And many other examples. In general, this relieves drivers from needing to make these sorts of decisions. - All new rendering functions have a consistent parameter order that is a bit different from the existing functions. The cliprect parameter is now specified immediately after the destination bitmap, to match the convention used throughout the rest of the system. The core parameters are followed by the scale parameters (for the zoom functions), and then followed by the priority parameters (for the pdrawgfx* functions), finally followed by any PIXEL_OP*-specific parameters (such as transparent pen, alpha, drawing tables, etc.) - Removed drawgfx_alpha_cache, alpha_set_level(), and the inline functions alpha_blend16() and alpha_blend32(). To render graphics with alpha, use the new [p]drawgfx[zoom]_alpha functions, which take an explicit alpha value. To render tilemaps with alpha, the TILEMAP_DRAW_ALPHA option now takes an explicit alpha parameter. And to do you own alpha blending, use the alpha_blend_r16() and alpha_blend_r32() functions, which take an explicit alpha. - Updated a number of drivers as a result of removing the implicit alpha in the drawgfx_alpha_cache. - Removed drawgfx_pen_table and TRANSPARENCY_PEN_TABLE. To achieve the same effect, build your own table and pass it to [p]drawgfx[zoom]_transtable, along with a pointer to the machine->shadow_table to use for shadows. Eventually machine->shadow_table is likely to go away, and drivers will need to fetch the shadow table from the palette directly. - Updated a number of drivers to remove use of drawgfx_pen_table. - Removed TRANSPARENCY_ALPHARANGE; it was only used by the psikyosh driver, so it is now moved locally into that driver and built using the macros in drawgfxm.h. - Removed TRANSPARENCY_PEN_RAW; to achieve the same effect, call the new [p]drawgfx[zoom]_transpen_raw() functions. Updated drivers to make this change. - Removed the unused mdrawgfx* functions entirely. - Added new function gfx_element_set_source_clip() to specify a source clipping rectangle for any element. This replaces the nasty hacks that were being used in bnstars, ms32, namcos86, and namcos1 to achieve similar behaviors. - Simplified the copyrozbitmap() functions to match the copybitmap() functions in having separate opaque and transparent versions. Also removed the 'priority' parameter which was only used by one driver, and moved that logic into a custom renderer built using macros in drawgfxm.h. Updated copyrozbitmap* to use the destbitmap, cliprect parameter ordering convention as well. - Simplified the draw_scanline*() functions to always render opaque. Only one driver was doing otherwise, and it now does its work internally (draw_scanline is dead-simple ever since we moved rotation to the OSD code; I almost just removed it entirely). Other changes: - Added a cliprect to the bitmap_t type, which describes the full bitmap. - Removed tilemap_set_pen_data_offset; unfortunately, this adds a random tile offset behind the scenes and goes against the dirty tile detection and invalidation. Updated the mainsnk, snk, and snk68 drivers to use old fashioned tile banking. (Sorry Nicola.) - Changed zac2650 gfxdecode to use scale factors. - Added function video_assert_out_of_range_pixels() to help find the source of invalid pixels (generally out-of-range palette entries due to invalid data or sloppy calculations). Place this after each step in your rendering in a debug build to discover which code is generating improper pixels. * From: Atari Ace [mailto:atari_ace@verizon.net] Aaron Giles2008-12-141-6/+6 | | | | | | | | | | | | | | | | | | | | | | | Sent: Saturday, December 13, 2008 1:34 PM To: submit@mamedev.org Cc: atariace@hotmail.com Subject: [patch] Add machine parameter to tilemap_create() Hi mamdev, This set of patches eliminates the #include "deprecat.h" from tilemap.c. The main change is to require callers of tilemap_create to provide a machine pointer. This pointer is then attached to the tilemap and used when needed inside tilemap.c. The first patch simply adds running_machine *machine to some driver functions that will soon need them. The second patch makes the needed changes to tilemap.[ch]. The (large) third patch adds machine to all the tilemap_create calls, and was generated entirely by the attached script. ~aa * Removed fillbitmap() macro in favor of direct calls to bitmap_fill(). Aaron Giles2008-12-041-4/+4 | | | | | Note that the parameters to the latter are in a different order (bitmap, clip, color). [Atari Ace] * WARNING: this compiles, but not fully cleanly, and a number of drivers Aaron Giles2008-11-141-1/+1 | | | | | | | | | | | | | | | | are broken. Changed READ/WRITE handlers to accept an address_space * instead of a machine *. The address_space object was enhanced to contain a machine and a pointer to the relevant CPU object. Fixed a number of errors found by the compiler, mostly in the core and CPU/sound handlers, but there is a lot remaining to fix. Added new function cpu_get_address_space() to fetch the address space for calling in manually to these functions. In some instances, code which should eventually be converted to a device is hard-coding fetching the program space of CPU #0 in order to have something valid to pass. * Fixed sound loading in jchan / jchan2 [Angelo Salese] davidhay2008-11-131-0/+12 | | | | | | | | | | | | | original dump was fine, there just needed to be a gap in the rom loading.. there are still some 'nasty' sounds, but this seems typical of our ymz280b emulation, I'm still pretty sure the ADPCM decode is broken, it must be 'special'. I've also promoted them to playable.. so New Playable Games ------------------ Jackie Chan - The Kung-Fu Master [David Haywood, Andreas Naive, stephh, Angelo Salese] Jackie Chan in Fists of Fire [David Haywood, Andreas Naive, stephh, Angelo Salese] * Kaneko update part 3: davidhay2008-11-131-3/+16 | | | more Jackie Chan video improvements (view2 tilemaps) * Major cpuintrf changes: Aaron Giles2008-11-101-1/+1 | | | | | | | | | | | | | | | | | | | | | | * 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 * by DITraI4D0 Brian Troha2008-09-291-1/+31 | | | | | | | | | | | | | | | | | | | | expro02.c - fixed DIPSW - added graphics decode routine (probably it can be simpler) video/kaneko16.c - tilemap scroll position is different for expro02, so added new function (is it better to fix current one?) TODO - in gfx data banking function (newly added), some strange gfx are shown. Timing issue? New games added or promoted from NOT_WORKING status --------------------------------------------------- Gals Panic (US, EXPRO-02 PCB) * Region classes go bye-bye. Aaron Giles2008-07-281-1/+1 | * Changed the way memory regions are referenced. Instead of a single Aaron Giles2008-07-281-1/+1 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | integer value, regions are now referred to by a region class and a region tag. The class specifies the type of region (one of CPU, gfx, sound, user, disk, prom, pld) while the tag uniquely specifies the region. This change required updating all the ROM region definitions in the project to specify the class/tag instead of region number. Updated the core memory_region_* functions to accept a class/tag pair. Added new memory_region_next() function to allow for iteration over all memory regions of a given class. Added new function memory_region_class_name() to return the name for a given CPU memory region class. Changed the auto-binding behavior of CPU regions. Previously, the first CPU would auto-bind to REGION_CPU1 (that is, any ROM references would automatically assume that they lived in the corresponding region). Now, each CPU automatically binds to the RGNCLASS_CPU region with the same tag as the CPU itself. This behavior required ensuring that all previous REGION_CPU* regions were changed to RGNCLASS_CPU with the same tag as the CPU. Introduced a new auto-binding mechanism for sound cores. This works similarly to the CPU binding. Each sound core that requires a memory region now auto-binds to the RGNCLASS_SOUND with the same tag as the sound core. In almost all cases, this allowed for the removal of the explicit region item in the sound configuration, which in turn allowed for many sound configurations to removed altogether. Updated the expression engine's memory reference behavior. A recent update expanded the scope of memory references to allow for referencing data in non-active CPU spaces, in memory regions, and in EEPROMs. However, this previous update required an index, which is no longer appropriate for regions and will become increasingly less appropriate for CPUs over time. Instead, a new syntax is supported, of the form: "[tag.][space]size@addr", where 'tag' is an optional tag for the CPU or memory region you wish to access, followed by a period as a separator; 'space' is the memory address space or region class you wish to access (p/d/i for program/data/I/O spaces; o for opcode space; r for direct RAM; c/u/g/s for CPU/user/gfx/sound regions; e for EEPROMs); and 'size' is the usual b/w/d/q for byte/word/dword/qword. Cleaned up ROM definition flags and removed some ugly hacks that had existed previously. Expanded to support up to 256 BIOSes. Updated ROM_COPY to support specifying class/tag for the source region. Updated the address map AM_REGION macro to support specifying a class/tag for the region. Updated debugger windows to display the CPU and region tags where appropriate. Updated -listxml to output region class and tag for each ROM entry. * From: Atari Ace [mailto:atari_ace@verizon.net] Aaron Giles2008-06-231-1/+1 | | | | | | | | | | | | | | | | | | | | | | Subject: [patch] memory_region madness reloaded Hi mamedev, The memory_region and memory_region_length functions are probably the two most common functions in MAME that don't take a machine parameter but should given the syntax of the related apis memory_region_type and memory_region_flags. Clearly they didn't get the parameter because of the sheer number of changes needed to change the apis. This pair of patches makes the change, and deals with the consequences. The second patch then changes the api for memory_region and memory_region_length, and fixes the fallout. It generally plumbs through machine parameters where needed, except for the case of sound apis which I deferred doing so till later. This increased the number of deprecat.h includes by ~50. Given it is a massive patch, there are bound to be a few mistakes in it (I had to make ~20% of the changes by hand), but I exercised care and reviewed the patch several times to minimize the problems. * From: Oliver Stoeneberg [mailto:oliverst@online.de] Aaron Giles2008-06-121-1/+1 | | | | | | | | | Sent: Thursday, June 05, 2008 9:00 PM To: submit@mamedev.org Subject: Machine -> machine cleanups This cleans up the usage of Machine in many of the src/video files. * Switched from ACCESSING_BYTE_*, ACCESSING_WORD_*, ACCESSING_DWORD_* Aaron Giles2008-04-031-1/+1 | | | | macros to ACCESSING_BITS_*_* macros. * New macros added for checking mem_mask. ACCESSING_BYTE_n, ACCESSING_WORD_n & ↵