Commit Graph

14 Commits

Author SHA1 Message Date
Nicola Salmoria
2e97ff9c21 02641: strider and clones: Problem with graphics layer 2008-11-19 09:14:29 +00:00
Aaron Giles
4a6fc8d5e5 Region classes go bye-bye. 2008-07-28 16:22:20 +00:00
Aaron Giles
27fed1ec97 Changed the way memory regions are referenced. Instead of a single
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.
2008-07-28 09:35:36 +00:00
Zsolt Vasvari
f8cbcafd5e Replaces mame_bitmap with bitmap_t
Removes mame_bitmap
2008-02-29 04:01:09 +00:00
Zsolt Vasvari
72dc0af97c Removes no longer used TRANSPARENCY_COLOR. Clean compile required. 2008-02-11 03:05:29 +00:00
Zsolt Vasvari
1426e5865f Removed TRANSPARENCY_BLEND_RAW transparancy mode. Needs a recompile just to be on the safe side. 2008-02-04 09:27:44 +00:00
Zsolt Vasvari
354acd5f1b - Removed TRANSPARENCY_NONE_RAW, TRANSPARENCY_PENS_RAW and TRANSPARENCY_PEN_TABLE_RAW as they were no
longer used.  Source needs to be recompiled because of the changed enum.

- Changed copybitmap and copyscrollbitmap:

  There are now 2 versions of each, one without and with transparency:

  void copybitmap(mame_bitmap *dest,mame_bitmap *src,int flipx,int flipy, int sx,int sy,const rectangle *clip);
  void copybitmap_trans(mame_bitmap *dest,mame_bitmap *src,int flipx,int flipy, int sx,int sy,const rectangle *clip, pen_t transparent_pen);
  void copyscrollbitmap(mame_bitmap *dest,mame_bitmap *src, nt rows,const int *rowscroll,int cols,const int *colscroll, const rectangle *clip);
  void copyscrollbitmap_trans(mame_bitmap *dest,mame_bitmap *src, int rows,const int *rowscroll,int cols,const int *colscroll, const rectangle *clip, pen_t transparent_pen);

  The version without _trans is the equivalent of the old TRANSPARENCY_NONE,  The *_trans version is the equivalent
  of the old TRANSPARENCY_PEN.  The old TRANSPARENCY_COLOR mode is done via calling *_trans version and passing in
  the pen that has been looked up via machine->pens[].
  So for example, copybitmap(..., TRANSPARENCY_COLOR, 0) becomes
  copybitmap_trans(..., machine->pens[0])

- Changed all drivers to the new calls.  Suprising how few drivers still use these functions.
  Most have still not been converted to tilemaps, or they are still writing to a tmpbitmap
  which gets copied over to the real bitmap in VIDEO_UPDATE.

- Changed machine->screen[0].visarea to 'cliprect' where appropriate.
2008-01-28 13:02:04 +00:00
Zsolt Vasvari
10b4ed5a2d Removes TRANSPARENCY_BLEND completely and TRANSPARENCY_BLEND_RAW as an option to copybitmap. Source tree needs to be recompiled as the transparancy mode enum has changed. 2008-01-27 07:48:31 +00:00
Zsolt Vasvari
596635241a - Removes copybitmap_remap and copyscrollbitmap_remap, neither which was used by anybody
- Removes some obsolete commented out code
- Fixed up some comments
2008-01-25 16:22:26 +00:00
Aaron Giles
c96a3b766a (From AtariAce)
While investigating alternate gfx layout schemes, I stumbled across
the fact that some drivers are allocating graphics with one layout and
then decoding them with another (!).  There's no guarantee this will
work, but for the drivers that do so (all Konami games), the layouts
are similar enough that it does.  A related potential bug is that many
drivers are decoding using the layout provided to allocgfx, not the
layout attached the element returned from allocgfx.  If the element
had scaling applied to it, this would be incorrect, but since scaling
is rare these are also benign.  It would also be a problem if the
layout data had a different internal representation (which is
something I'm experimenting with), so to reduce the possibility of
coding errors and allow for future changes, I'd like to remove the
layout parameter from decodechar.

So here's two patches, the first fixes the affected Konami drivers to
allocate and decode using the same layouts.  It changes the notion of
plane_order and bpp in the functions somewhat to let the start
routines select the appropriate layout, but acceptably so IMHO (I can
clean this up further if there are loud objections).  The second patch
then removes the layout parameter from all the decodechar() calls.

I also reviewed MESS to see if it had similar problems and didn't find
any.
2008-01-11 06:31:19 +00:00
Aaron Giles
fa3061392e (From Atari Ace)
0. This patch does minor cleanup to existing layouts, trimming/padding
entries as appropriate and reformating a few layouts.

1. This patch introduces a GFXLAYOUT_RAW() macro, and uses it
throughout.  It codifies the requirements for a raw layout in one
place.

2. This patch adds new validation code to the core for some previously
unchecked assumptions about layouts, and reduces the number of
references to the gfx_layout fields in preparation for a change in the
representation.

3. This patch constifies the remaining non-const gfx_layouts in MAME.
It does this by adjusting the code so that the only modification to a
layout ever needed is for the total field, which is then handled by
modifying a stack-based copy of the layout before invoking allocgfx. I
also spent some time consolidating and simplifying the layout code in
konamiic.c.
2008-01-06 01:21:33 +00:00
Aaron Giles
ee9f88963c Copyright cleanup:
- removed years from copyright notices
 - removed redundant (c) from copyright notices
 - updated "the MAME Team" to be "Nicola Salmoria and the MAME Team"
2008-01-06 00:47:40 +00:00
Aaron Giles
28d23853ae (From AtariAce)
This patch should complete the addition of static qualifiers to all
MAME symbols that aren't explicitly exported.  It primarily handles
generated code (e.g. amspdwy.c), plus a handful of cases I'd
previously missed and some new cases introduced in the last update.
One interesting bit was the discovery that the 32-bit scanline
routines in drawgfx.c are unused.  I debated eliminating them but
decided instead to just export them.  Various internal drawgfx
functions were conditionally removed by examining a new RAW define,
although one routine (blockmove_8toN_alphaone) was determined to be
dead code.

While investigating constifying MESS, I came across a few core APIs
that were missing const qualifiers which this patch fixes.  I also
consted up tx1.c while I was at it.
2007-12-26 16:55:35 +00:00
Aaron Giles
7b77f12186 Initial checkin of MAME 0.121. 2007-12-17 15:19:59 +00:00