Previous 15994 Revisions Next

r779 Thursday 2nd August, 2007 at 11:36:44 UTC by Nathan Woods
Sync with MAME 0.117u3 (GUI seems to be broken; more work to be done)
[ROOT]makefile makefile.mes
[docs]messnew.txt
[src/build]build.mak* file2str.c* png2bdc.c*
[src/emu]audit.c cheat.c clifront.c config.c fileio.c fileio.h info.c inptport.c inptport.h input.c input.h inputseq.c inputseq.h mame.c mame.h memory.c memory.h rendlay.c rendutil.c restrack.c restrack.h romload.c state.c state.h tilemap.c tilemap.h timer.c timer.h ui.c uimenu.c validity.c video.c
[src/emu/debug]debugcmd.c debugcmt.c debughlp.c
[src/emu/machine]generic.c
[src/emu/sound]samples.c
[src/lib]lib.mak
[src/lib/util]astring.c* astring.h* corefile.c corefile.h corestr.c corestr.h options.c pool.c pool.h
[src/mame]mame.mak mamedriv.c
[src/mame/audio]exidy.c vicdual.c
[src/mame/drivers]1945kiii.c 2mindril.c acommand.c ampoker.c berzerk.c bestleag.c bfm_sc2.c bigfghtr.c bmcbowl.c calorie.c cball.c cherrym.c cherrym2.c cntsteer.c coinmstr.c couple.c cowrace.c cps3.c cshooter.c cybertnk.c dacholer.c darkhors.c ddayjlc.c dreamwld.c drtomy.c dunhuang.c dynadice.c egghunt.c ettrivia.c exidy.c galaga.c gdrawpkr.c good.c gstream.c hitme.c hornet.c igs_m027.c jackpool.c jalmah.c jollyjgr.c koikoi.c konamigx.c ksys573.c laserbat.c limenko.c lockon.c looping.c ltcasino.c lucky8.c m72.c m92.c madalien.c magic10.c magicfly.c marinedt.c megadriv.c merit.c mgolf.c midas.c miniboy7.c mogura.c mpu4.c mwarr.c namcoic.c namcos23.c naomi.c nmg5.c nwk-tr.c olibochu.c onetwo.c panicr.c pipeline.c pkscram.c plygonet.c pmpoker.c powerbal.c powerins.c ppmast93.c pturn.c rabbit.c raiden2.c rcasino.c rmhaihai.c safarir.c sbowling.c segald.c* shadfrce.c skyarmy.c skylncr.c statriv2.c supdrapo.c superdq.c suprgolf.c talbot.c tattack.c tecmosys.c tourtabl.c trvmadns.c tubep.c twincobr.c vmetal.c vroulet.c wallc.c wilytowr.c wink.c witch.c yumefuda.c
[src/mame/includes]dc.h tubep.h twincobr.h
[src/mame/layout]bfm_sc2.lay connect4.lay gldncrwn.lay mpu4.lay paradice.lay pokio.lay pyramid.lay quintoon.lay slots.lay sltblgpo.lay sltblgtk.lay
[src/mame/machine]atari.c bfm_bd1.c* bfm_bd1.h* dc.c roc10937.c* roc10937.h* twincobr.c
[src/mame/video]1942.c 1943.c 40love.c 4enraya.c 88games.c actfancr.c aeroboto.c aerofgt.c afega.c airbustr.c ajax.c alpha68k.c amspdwy.c angelkds.c appoooh.c aquarium.c argus.c arkanoid.c armedf.c ashnojoe.c atarig1.c atarig42.c atarigt.c atarigx2.c atarisy1.c atarisy2.c atetris.c badlands.c bagman.c bankp.c baraduke.c batman.c battlane.c battlex.c bbusters.c bfm_adr2.c bigstrkb.c bionicc.c blktiger.c blmbycar.c blockade.c bloodbro.c blstroid.c blueprnt.c bogeyman.c bombjack.c bosco.c bottom9.c brkthru.c bsktball.c bwing.c cabal.c canyon.c carjmbre.c cave.c cbasebal.c cclimber.c centiped.c chaknpop.c champbas.c chqflag.c circus.c circusc.c citycon.c cloak.c clshroad.c combatsc.c commando.c compgolf.c contra.c cop01.c cps1.c crbaloon.c crospang.c crshrace.c cyberbal.c darius.c darkmist.c darkseal.c dbz.c dc.c dcon.c dday.c ddragon.c ddragon3.c ddrible.c deadang.c dec0.c dec8.c deco16ic.c deco32.c decocass.c deniam.c digdug.c djboy.c dkong.c docastle.c dogfgt.c dooyong.c dragrace.c drgnmst.c drmicro.c dynduke.c eprom.c equites.c esd16.c espial.c exctsccr.c exedexes.c exprraid.c f1gp.c fastfred.c fastlane.c fcombat.c firetrap.c firetrk.c fitfight.c flkatck.c flower.c flstory.c flyball.c foodf.c freekick.c fromanc2.c fromance.c funkybee.c funworld.c fuukifg2.c fuukifg3.c gaelco.c gaelco2.c gaiden.c galaga.c galaxian.c galivan.c gaplus.c gauntlet.c gberet.c gcpinbal.c ginganin.c gladiatr.c glass.c gng.c goal92.c goindol.c gomoku.c gotcha.c gottlieb.c gotya.c grchamp.c gstriker.c gsword.c gumbo.c gundealr.c gunsmoke.c hanaawas.c hcastle.c hexa.c hexion.c higemaru.c hng64.c holeland.c homedata.c homerun.c hyperspt.c hyprduel.c inufuku.c iqblock.c ironhors.c jack.c jackal.c jailbrek.c jcross.c kaneko16.c karnov.c kchamp.c kickgoal.c kingobox.c klax.c kncljoe.c konamigx.c konamiic.c kopunch.c ksayakyu.c kyugo.c labyrunr.c ladybug.c ladyfrog.c lasso.c lastduel.c legionna.c lemmings.c liberate.c lkage.c lordgun.c lvcards.c lwings.c m107.c m62.c m72.c m90.c m92.c macrossp.c madmotor.c mainsnk.c mappy.c marineb.c mario.c markham.c marvins.c mayumi.c mcatadv.c mcr.c mcr3.c mcr68.c meadows.c megasys1.c mermaid.c metlclsh.c metro.c mikie.c mitchell.c mjkjidai.c mole.c mosaic.c mpatrol.c mrdo.c mrjong.c ms32.c msisaac.c mugsmash.c mustache.c mystston.c mystwarr.c namcona1.c namcos1.c namcos2.c namcos22.c namcos86.c nemesis.c news.c ninjakd2.c ninjakid.c nitedrvr.c nmk16.c nova2001.c nycaptor.c offtwall.c ohmygod.c ojankohs.c omegaf.c oneshot.c othldrby.c overdriv.c pacland.c pacman.c pandoras.c paradise.c pass.c pbaction.c pcktgal.c pgm.c phoenix.c pingpong.c pirates.c pitnrun.c playch10.c playmark.c plygonet.c pokechmp.c polepos.c poolshrk.c pooyan.c popeye.c popper.c portrait.c powerins.c prehisle.c psikyo.c psychic5.c punchout.c pushman.c quizdna.c quizpani.c raiden.c raiders5.c rallyx.c realbrk.c redclash.c relief.c renegade.c retofinv.c rockola.c rocnrope.c rollerg.c rpunch.c runaway.c rungun.c sauro.c sbasketb.c sbrkout.c sbugger.c scotrsht.c sderby.c segag80r.c segaic16.c segaic24.c segas32.c seibuspi.c seicross.c sengokmj.c senjyo.c seta.c sf.c shadfrce.c shangkid.c shaolins.c shisen.c shootout.c shuuz.c sidearms.c sidepckt.c silkroad.c skullxbo.c skydiver.c skykid.c slapfght.c snk68.c solomon.c sonson.c spdodgeb.c speedatk.c speedbal.c speedspn.c splash.c sprcros2.c sprint2.c sprint4.c sprint8.c srumbler.c sshangha.c sslam.c ssozumo.c ssrj.c ssv.c stadhero.c starshp1.c stfight.c stlforce.c strnskil.c suna8.c superqix.c suprloco.c suprnova.c suprridr.c suprslam.c system16.c tagteam.c tail2nos.c taito_b.c taito_f3.c taito_l.c taitoic.c taitojc.c tank8.c tankbatt.c tankbust.c taotaido.c targeth.c tatsumi.c tbowl.c tceptor.c tecmo.c tecmo16.c tehkanwc.c terracre.c tetrisp2.c thedeep.c thepit.c thoop2.c thunderj.c tia.c tia.h tiamc1.c tigeroad.c timelimt.c timeplt.c tmnt.c toaplan1.c toaplan2.c toki.c toobin.c toypop.c tp84.c trackfld.c travrusa.c trucocl.c tryout.c tsamurai.c tubep.c tumbleb.c tunhunt.c turbo.c twin16.c twincobr.c tx1.c ultraman.c ultratnk.c unico.c usgames.c vastar.c vball.c videopin.c vindictr.c vulgus.c warpwarp.c wc90.c wc90b.c wecleman.c welltris.c wgp.c williams.c wrally.c wwfsstar.c wwfwfest.c xain.c xevious.c xorworld.c xybots.c xyonix.c yard.c ygv608.c yiear.c yunsun16.c yunsung8.c zac2650.c zaccaria.c zaxxon.c zerozone.c zodiack.c
[src/mess]device.c hashfile.c image.c inputx.c mscommon.c opresolv.c tagpool.c tagpool.h
[src/mess/formats]cassimg.c
[src/mess/machine]sms.c
[src/mess/osd/windows]dialog.c
[src/mess/tools/imgtool]imgtool.c imgtool.mak library.c
[src/mess/tools/imgtool/windows]wimgtool.c
[src/mess/tools/messdocs]messdocs.c
[src/mess/tools/messtest]testmess.c
[src/mess/video]abc80.c abc80x.c apple2.c aquarius.c microtan.c osi.c trs80.c x68k.c
[src/osd/windows]input.c winalloc.c window.c windows.mak winutf8.c winutf8.h
[src/osd/windows/ui]m32opts.c screenshot.c win32ui.c win32ui.h
[src/tools]src2html.c* srcclean.c tools.mak

makefile.mes
r778r779
504504include $(SRC)/emu/emu.mak
505505include $(SRC)/mess/messcore.mak
506506include $(SRC)/lib/lib.mak
507include $(SRC)/build/build.mak
507508include $(SRC)/tools/tools.mak
508509
509510# combine the various definitions to one
r778r779
515516# primary targets
516517#-------------------------------------------------
517518
518emulator: maketree $(EMULATORALL)
519emulator: maketree $(BUILD) $(EMULATORALL)
519520
520521tools: maketree $(TOOLS)
521522
src/build/png2bdc.c
r0r779
1/***************************************************************************
2
3    Super-simple PNG to BDC file generator
4
5    Copyright (c) 1996-2007, Nicola Salmoria and the MAME Team.
6    Visit http://mamedev.org for licensing and usage restrictions.
7
8****************************************************************************
9
10    Format of PNG data:
11
12    Multiple rows of characters. A black pixel means "on". All other colors
13    mean "off". Each row looks like this:
14
15    * 8888  ***    *
16    * 4444 *   *  **
17    * 2222 *   *   *
18    * 1111 *   *   *
19    *      *   *   *
20    **      ***   ***
21    *
22    *
23
24           ****** ****
25
26    The column of pixels on the left-hand side (column 0) indicates the
27    character cell height. This column must be present on each row and
28    the height must be consistent for each row.
29
30    Protruding one pixel into column 1 is the baseline indicator. There
31    should only be one row with a pixel in column 1 for each line, and
32    that pixel row index should be consistent for each row.
33
34    In columns 2-5 are a 4-hex-digit starting character index number. This
35    is encoded as binary value. Each column is 4 pixels tall and represents
36    one binary digit. The character index number is the unicode character
37    number of the first character encoded in this row; subsequent
38    characters in the row are at increasing character indices.
39
40    Starting in column 6 and beyond are the actual character bitmaps.
41    Below them, in the second row after the last row of the character,
42    is a solid line that indicates the width of the character, and also
43    where the character bitmap begins and ends.
44
45***************************************************************************/
46
47#include <stdio.h>
48#include <stdlib.h>
49#include <string.h>
50#include <ctype.h>
51#include "osdcore.h"
52#include "png.h"
53
54
55/***************************************************************************
56    CONSTANTS & DEFINES
57***************************************************************************/
58
59#define CACHED_CHAR_SIZE      12
60#define CACHED_HEADER_SIZE      16
61
62
63
64/***************************************************************************
65    TYPE DEFINITIONS
66***************************************************************************/
67
68/* a render_font contains information about a single character in a font */
69typedef struct _render_font_char render_font_char;
70struct _render_font_char
71{
72   INT32            width;            /* width from this character to the next */
73   INT32            xoffs, yoffs;      /* X and Y offset from baseline to top,left of bitmap */
74   INT32            bmwidth, bmheight;   /* width and height of bitmap */
75   bitmap_t *         bitmap;            /* pointer to the bitmap containing the raw data */
76};
77
78
79/* a render_font contains information about a font */
80typedef struct _render_font render_font;
81struct _render_font
82{
83   int               height;            /* height of the font, from ascent to descent */
84   int               yoffs;            /* y offset from baseline to descent */
85   render_font_char    chars[65536];      /* array of characters */
86};
87
88
89
90/***************************************************************************
91    INLINE FUNCTIONS
92***************************************************************************/
93
94INLINE int pixel_is_set(bitmap_t *bitmap, int y, int x)
95{
96   return (*BITMAP_ADDR32(bitmap, y, x) & 0xffffff) == 0;
97}
98
99
100
101/***************************************************************************
102    MAIN
103***************************************************************************/
104
105static int render_font_save_cached(render_font *font, const char *filename, UINT32 hash)
106{
107   file_error filerr;
108   render_font_char *ch;
109   UINT32 bytes_written;
110   UINT8 *tempbuffer;
111   UINT8 *chartable;
112   core_file *file;
113   int numchars;
114   UINT8 *dest;
115   int tableindex;
116   int chnum;
117
118   /* attempt to open the file */
119   filerr = core_fopen(filename, OPEN_FLAG_WRITE | OPEN_FLAG_CREATE, &file);
120   if (filerr != FILERR_NONE)
121      return 1;
122
123   /* determine the number of characters */
124   numchars = 0;
125   for (chnum = 0; chnum < 65536; chnum++)
126      if (font->chars[chnum].width > 0)
127         numchars++;
128
129   /* allocate an array to hold the character data */
130   chartable = malloc(numchars * CACHED_CHAR_SIZE);
131
132   /* allocate a temp buffer to compress into */
133   tempbuffer = malloc(65536);
134   if (chartable == NULL || tempbuffer == NULL)
135      goto error;
136
137   memset(chartable, 0, numchars * CACHED_CHAR_SIZE);
138
139   /* write the header */
140   dest = tempbuffer;
141   *dest++ = 'f';
142   *dest++ = 'o';
143   *dest++ = 'n';
144   *dest++ = 't';
145   *dest++ = hash >> 24;
146   *dest++ = hash >> 16;
147   *dest++ = hash >> 8;
148   *dest++ = hash & 0xff;
149   *dest++ = font->height >> 8;
150   *dest++ = font->height & 0xff;
151   *dest++ = font->yoffs >> 8;
152   *dest++ = font->yoffs & 0xff;
153   *dest++ = numchars >> 24;
154   *dest++ = numchars >> 16;
155   *dest++ = numchars >> 8;
156   *dest++ = numchars & 0xff;
157   bytes_written = core_fwrite(file, tempbuffer, dest - tempbuffer);
158   if (bytes_written != dest - tempbuffer)
159      goto error;
160
161   /* write the empty table to the beginning of the file */
162   bytes_written = core_fwrite(file, chartable, numchars * CACHED_CHAR_SIZE);
163   if (bytes_written != numchars * CACHED_CHAR_SIZE)
164      goto error;
165
166   /* loop over all characters */
167   tableindex = 0;
168   for (chnum = 0; chnum < 65536; chnum++)
169   {
170      ch = &font->chars[chnum];
171      if (ch->width > 0)
172      {
173         UINT8 accum, accbit;
174         int x, y;
175
176         /* write out a bit-compressed bitmap if we have one */
177         if (ch->bitmap != NULL)
178         {
179            /* write the data to the tempbuffer */
180            dest = tempbuffer;
181            accum = 0;
182            accbit = 7;
183
184            /* bit-encode the character data */
185            for (y = 0; y < ch->bmheight; y++)
186            {
187               int desty = y + font->height + font->yoffs - ch->yoffs - ch->bmheight;
188               const UINT32 *src = (desty >= 0 && desty < font->height) ? BITMAP_ADDR32(ch->bitmap, desty, 0) : NULL;
189               for (x = 0; x < ch->bmwidth; x++)
190               {
191                  if (src != NULL && src[x] != 0)
192                     accum |= 1 << accbit;
193                  if (accbit-- == 0)
194                  {
195                     *dest++ = accum;
196                     accum = 0;
197                     accbit = 7;
198                  }
199               }
200            }
201
202            /* flush any extra */
203            if (accbit != 7)
204               *dest++ = accum;
205
206            /* write the data */
207            bytes_written = core_fwrite(file, tempbuffer, dest - tempbuffer);
208            if (bytes_written != dest - tempbuffer)
209               goto error;
210
211            /* free the bitmap and texture */
212            bitmap_free(ch->bitmap);
213            ch->bitmap = NULL;
214         }
215
216         /* compute the table entry */
217         dest = &chartable[tableindex++ * CACHED_CHAR_SIZE];
218         *dest++ = chnum >> 8;
219         *dest++ = chnum & 0xff;
220         *dest++ = ch->width >> 8;
221         *dest++ = ch->width & 0xff;
222         *dest++ = ch->xoffs >> 8;
223         *dest++ = ch->xoffs & 0xff;
224         *dest++ = ch->yoffs >> 8;
225         *dest++ = ch->yoffs & 0xff;
226         *dest++ = ch->bmwidth >> 8;
227         *dest++ = ch->bmwidth & 0xff;
228         *dest++ = ch->bmheight >> 8;
229         *dest++ = ch->bmheight & 0xff;
230      }
231   }
232
233   /* seek back to the beginning and rewrite the table */
234   core_fseek(file, CACHED_HEADER_SIZE, SEEK_SET);
235   bytes_written = core_fwrite(file, chartable, numchars * CACHED_CHAR_SIZE);
236   if (bytes_written != numchars * CACHED_CHAR_SIZE)
237      goto error;
238
239   /* all done */
240   core_fclose(file);
241   free(tempbuffer);
242   free(chartable);
243   return 0;
244
245error:
246   core_fclose(file);
247   osd_rmfile(filename);
248   free(tempbuffer);
249   free(chartable);
250   return 1;
251}
252
253
254/*-------------------------------------------------
255    bitmap_to_chars - convert a bitmap to
256    characters in the given font
257-------------------------------------------------*/
258
259static int bitmap_to_chars(bitmap_t *bitmap, render_font *font)
260{
261   int rowstart = 0;
262   int x, y;
263
264   /* loop over rows */
265   while (rowstart < bitmap->height)
266   {
267      int rowend, baseline, colstart;
268      int chstart;
269
270      /* find the top of the row */
271      for ( ; rowstart < bitmap->height; rowstart++)
272         if (pixel_is_set(bitmap, rowstart, 0))
273            break;
274      if (rowstart >= bitmap->height)
275         break;
276
277      /* find the bottom of the row */
278      for (rowend = rowstart + 1; rowend < bitmap->height; rowend++)
279         if (!pixel_is_set(bitmap, rowend, 0))
280         {
281            rowend--;
282            break;
283         }
284
285      /* find the baseline */
286      for (baseline = rowstart; baseline <= rowend; baseline++)
287         if (pixel_is_set(bitmap, baseline, 1))
288            break;
289      if (baseline > rowend)
290      {
291         fprintf(stderr, "No baseline found between rows %d-%d\n", rowstart, rowend);
292         break;
293      }
294
295      /* set or confirm the height */
296      if (font->height == 0)
297      {
298         font->height = rowend - rowstart + 1;
299         font->yoffs = baseline - rowend;
300      }
301      else
302      {
303         if (font->height != rowend - rowstart + 1)
304         {
305            fprintf(stderr, "Inconsistent font height at rows %d-%d\n", rowstart, rowend);
306            break;
307         }
308         if (font->yoffs != baseline - rowend)
309         {
310            fprintf(stderr, "Inconsistent baseline at rows %d-%d\n", rowstart, rowend);
311            break;
312         }
313      }
314
315      /* decode the starting character */
316      chstart = 0;
317      for (x = 0; x < 4; x++)
318         for (y = 0; y < 4; y++)
319            chstart = (chstart << 1) | pixel_is_set(bitmap, rowstart + y, 2 + x);
320
321      /* print info */
322//      printf("Row %d-%d, baseline %d, character start %X\n", rowstart, rowend, baseline, chstart);
323
324      /* scan the column to find characters */
325      colstart = 0;
326      while (colstart < bitmap->width)
327      {
328         render_font_char *ch = &font->chars[chstart];
329         int colend;
330
331         /* find the start of the character */
332         for ( ; colstart < bitmap->width; colstart++)
333            if (pixel_is_set(bitmap, rowend + 2, colstart))
334               break;
335         if (colstart >= bitmap->width)
336            break;
337
338         /* find the end of the character */
339         for (colend = colstart + 1; colend < bitmap->width; colend++)
340            if (!pixel_is_set(bitmap, rowend + 2, colend))
341            {
342               colend--;
343               break;
344            }
345
346         /* print info */
347//          printf("  Character %X - width = %d\n", chstart, colend - colstart + 1);
348
349         /* allocate a bitmap */
350         ch->bitmap = bitmap_alloc(colend - colstart + 1, font->height, BITMAP_FORMAT_ARGB32);
351         if (ch->bitmap == NULL)
352         {
353            fprintf(stderr, "Error allocating character bitmap (%dx%d)\n", colend - colstart + 1, font->height);
354            continue;
355         }
356
357         /* plot the character */
358         for (y = rowstart; y <= rowend; y++)
359            for (x = colstart; x <= colend; x++)
360               *BITMAP_ADDR32(ch->bitmap, y - rowstart, x - colstart) = pixel_is_set(bitmap, y, x) ? 0xffffffff : 0x00000000;
361
362         /* set the character parameters */
363         ch->width = colend - colstart + 1;
364         ch->xoffs = 0;
365         ch->yoffs = font->yoffs;
366         ch->bmwidth = ch->bitmap->width;
367         ch->bmheight = ch->bitmap->height;
368
369         /* next character */
370         chstart++;
371         colstart = colend + 1;
372      }
373
374      /* next row */
375      rowstart = rowend + 1;
376   }
377
378   /* return non-zero (TRUE) if we errored */
379   return (rowstart < bitmap->height);
380}
381
382
383/*-------------------------------------------------
384    main - main entry point
385-------------------------------------------------*/
386
387int main(int argc, char *argv[])
388{
389   const char *bdcname;
390   render_font *font;
391   int error = FALSE;
392   int curarg;
393
394   /* validate arguments */
395    if (argc < 3)
396    {
397       fprintf(stderr, "Usage:\npng2bdf <input.png> [<input2.png> [...]] <output.bdc>\n");
398       return 1;
399    }
400    bdcname = argv[argc - 1];
401
402   /* allocate a font */
403   font = malloc(sizeof(*font));
404   if (font == NULL)
405      return 1;
406   memset(font, 0, sizeof(*font));
407
408   /* iterate over input files */
409   for (curarg = 1; curarg < argc - 1; curarg++)
410   {
411      const char *pngname = argv[curarg];
412      file_error filerr;
413      png_error pngerr;
414      bitmap_t *bitmap;
415      core_file *file;
416
417       /* load the png file */
418      filerr = core_fopen(pngname, OPEN_FLAG_READ, &file);
419      if (filerr != FILERR_NONE)
420       {
421          fprintf(stderr, "Error %d attempting to open PNG file\n", filerr);
422          error = TRUE;
423          break;
424       }
425      pngerr = png_read_bitmap(file, &bitmap);
426      core_fclose(file);
427      if (pngerr != PNGERR_NONE)
428      {
429         fprintf(stderr, "Error %d reading PNG file\n", pngerr);
430         error = TRUE;
431         break;
432      }
433
434      /* parse the PNG into characters */
435      error = bitmap_to_chars(bitmap, font);
436      bitmap_free(bitmap);
437      if (error)
438         break;
439   }
440
441   /* write out the resulting font */
442   if (!error)
443      render_font_save_cached(font, bdcname, 0);
444
445   /* cleanup after ourselves */
446   free(font);
447    return error;
448}
src/build/build.mak
r0r779
1###########################################################################
2#
3#   build.mak
4#
5#   MAME build tools makefile
6#
7#   Copyright (c) 1996-2007, Nicola Salmoria and the MAME Team.
8#   Visit http://mamedev.org for licensing and usage restrictions.
9#
10###########################################################################
11
12
13BUILDSRC = $(SRC)/build
14BUILDOBJ = $(OBJ)/build
15BUILDOUT = $(BUILDOBJ)
16
17OBJDIRS += \
18   $(BUILDOBJ) \
19
20
21
22#-------------------------------------------------
23# set of build targets
24#-------------------------------------------------
25
26FILE2STR = $(BUILDOUT)/file2str$(EXE)
27PNG2BDC = $(BUILDOUT)/png2bdc$(EXE)
28
29BUILD += \
30   $(FILE2STR) \
31   $(PNG2BDC) \
32
33
34
35#-------------------------------------------------
36# file2str
37#-------------------------------------------------
38
39FILE2STROBJS = \
40   $(BUILDOBJ)/file2str.o \
41
42$(FILE2STR): $(FILE2STROBJS) $(LIBOCORE)
43   @echo Linking $@...
44   $(LD) $(LDFLAGS) $^ $(LIBS) -o $@
45
46
47
48#-------------------------------------------------
49# png2bdc
50#-------------------------------------------------
51
52PNG2BDCOBJS = \
53   $(BUILDOBJ)/png2bdc.o \
54
55$(PNG2BDC): $(PNG2BDCOBJS) $(LIBUTIL) $(LIBOCORE) $(ZLIB) $(EXPAT)
56   @echo Linking $@...
57   $(LD) $(LDFLAGS) $^ $(LIBS) -o $@
src/build/file2str.c
r0r779
1/***************************************************************************
2
3    file2str.c
4
5    Simple file to string converter.
6
7    Copyright (c) 1996-2007, Nicola Salmoria and the MAME Team.
8    Visit http://mamedev.org for licensing and usage restrictions.
9
10***************************************************************************/
11
12#include <stdio.h>
13#include "osdcore.h"
14
15
16/*-------------------------------------------------
17    main - primary entry point
18-------------------------------------------------*/
19
20int main(int argc, char *argv[])
21{
22   const char *srcfile, *dstfile, *varname, *type;
23   FILE *src, *dst;
24   UINT8 *buffer;
25   int bytes, offs;
26   int terminate = 1;
27
28   /* needs at least three arguments */
29   if (argc < 4)
30   {
31      fprintf(stderr,
32         "Usage:\n"
33         "  laytostr <source.lay> <output.h> <varname> [<type>]\n"
34         "\n"
35         "The default <type> is char, with an assumed NULL terminator\n"
36      );
37      return 0;
38   }
39
40   /* extract arguments */
41   srcfile = argv[1];
42   dstfile = argv[2];
43   varname = argv[3];
44   type = (argc >= 5) ? argv[4] : "char";
45   if (argc >= 5)
46      terminate = 0;
47
48   /* open source file */
49   src = fopen(srcfile, "rb");
50   if (src == NULL)
51   {
52      fprintf(stderr, "Unable to open source file '%s'\n", srcfile);
53      return 1;
54   }
55
56   /* determine file size */
57   fseek(src, 0, SEEK_END);
58   bytes = ftell(src);
59   fseek(src, 0, SEEK_SET);
60
61   /* allocate memory */
62   buffer = malloc(bytes + 1);
63   if (buffer == NULL)
64   {
65      fprintf(stderr, "Out of memory allocating %d byte buffer\n", bytes);
66      return 1;
67   }
68
69   /* read the source file */
70   fread(buffer, 1, bytes, src);
71   buffer[bytes] = 0;
72   fclose(src);
73
74   /* open dest file */
75   dst = fopen(dstfile, "w");
76   if (dst == NULL)
77   {
78      fprintf(stderr, "Unable to open output file '%s'\n", dstfile);
79      return 1;
80   }
81
82   /* write the initial header */
83   fprintf(dst, "const %s %s[] =\n{\n\t", type, varname);
84
85   /* write out the data */
86   for (offs = 0; offs < bytes + terminate; offs++)
87   {
88      fprintf(dst, "0x%02x%s", buffer[offs], (offs != bytes + terminate - 1) ? "," : "");
89      if (offs % 16 == 15)
90         fprintf(dst, "\n\t");
91   }
92   fprintf(dst, "\n};\n");
93
94   /* close the files */
95   fclose(dst);
96   return 0;
97}
src/mame/audio/vicdual.c
r778r779
422422               HEADON_BONUS_OUT, HEADON_CRASH_OUT, &headon_mixer)
423423   //DISCRETE_OUTPUT(NODE_73, 1000)
424424   DISCRETE_OUTPUT(NODE_210, 37000.0 / 12.0)
425   DISCRETE_CSVLOG3(HEADON_CRASH_EN,NODE_81,NODE_80)
425   //DISCRETE_CSVLOG3(HEADON_CRASH_EN,NODE_81,NODE_80)
426426
427427DISCRETE_SOUND_END
428428
src/mame/audio/exidy.c
r778r779
1010#include "machine/6821pia.h"
1111#include "sound/hc55516.h"
1212#include "sound/5220intf.h"
13#include "sound/discrete.h"
1314#include "exidy.h"
1415
1516
r778r779
2425#define SH8253_CLOCK      (CRYSTAL_OSC/2)
2526#define SH6840_CLOCK      (CRYSTAL_OSC/4)
2627#define SH6532_CLOCK      (CRYSTAL_OSC/4)
27#define CVSD_CLOCK_FREQ    (1000000.0 / 34.0)
28#define CVSD_CLOCK_FREQ    (1.0 / (0.693 * (RES_K(2.4) + 2.0 * RES_K(20)) * CAP_P(2200)))
2829#define BASE_VOLUME         (32767 / 6)
2930
3031enum
r778r779
842843   }
843844    if (!(offset & 0x40))
844845    {
845       int clock_pulse = mame_time_to_double(scale_up_mame_time(mame_timer_get_time(), 2 * CVSD_CLOCK_FREQ));
846       mame_time curtime = mame_timer_get_time();
847       int clock_pulse = curtime.subseconds / HZ_TO_SUBSECONDS(2 * CVSD_CLOCK_FREQ);
846848       return (clock_pulse & 1) << 7;
847849   }
848850   return 0;
src/mame/machine/bfm_bd1.h
r0r779
1#ifndef BFM_BD1
2#define BFM_BD1
3
4#define MAX_BD1  3     // max number of displays emulated
5
6void   bfm_bd1_init( int id );               // setup a display
7
8void   bfm_bd1_reset( int id);               // reset the alpha
9
10void   bfm_bd1_shift_data(int id, int data);   // clock in a bit of data
11
12int      bfm_bd1_newdata(   int id, int data);   // clock in 8 bits of data
13
14UINT32   *bfm_bd1_get_segments(int id);         // get current segments displayed
15UINT32  *bfm_bd1_set_outputs(int id);         // convert segments to standard for display
16UINT32  *bfm_bd1_get_outputs(int id);         // get converted segments
17
18char   *bfm_bd1_get_string( int id);         // get current string   displayed (not as accurate)
19
20void   bfm_bd1_draw(int id);
21#endif
22
src/mame/machine/twincobr.c
r778r779
344344}
345345
346346
347MACHINE_RESET( twincobr_reset )   /* machine_reset_twincobr_reset */
347MACHINE_RESET( twincobr )
348348{
349349   toaplan_main_cpu = 0;      /* 68000 */
350350   twincobr_display(0);
src/mame/machine/roc10937.c
r0r779
1/**********************************************************************
2
3    Rockwell 10937/10957 interface and emulation by J.Wallace
4    OKI MSC1937 is a clone of this chip
5
6**********************************************************************/
7
8#include "driver.h"
9#include "roc10937.h"
10
11static struct
12{
13   UINT8   type,            // type of alpha display
14
15         reversed,         // Allows for the data being written from right to left, not left to right.
16
17         changed,         // flag <>0, if contents are changed
18         window_start,      // display window start pos 0-15
19         window_end,         // display window end   pos 0-15
20         window_size;      // window  size
21
22   INT8   pcursor_pos,      // previous cursor pos
23         cursor_pos;         // current cursor pos
24
25   UINT16  brightness;         // display brightness level 0-31 (31=MAX)
26
27   UINT8   string[18];         // text buffer
28   UINT32  segments[16],      // segments
29         outputs[16];      // standardised outputs
30
31   UINT8   count,            // bit counter
32         data;            // receive register
33
34} roc10937[MAX_ROCK_ALPHAS];
35
36//
37// Rockwell 10937 charset to ASCII conversion table
38//
39static const char roc10937ASCII[]=
40//0123456789ABCDEF0123456789ABC DEF01 23456789ABCDEF0123456789ABCDEF
41 "@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_ ?\"#$%%'()*+;-./0123456789&%<=>?"\
42 "@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_ ?\"#$%%'()*+;-./0123456789&%<=>?"\
43 "@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_ ?\"#$%%'()*+;-./0123456789&%<=>?";
44
45/*
46   Rockwell 10937 16 segment charset lookup table
47     0     1
48    ---- ----
49   |\   |   /|
50 7 | \F |8 /9| 2
51   |  \ | /  |
52    -E-- --A-
53   |  / | \  |
54 6 | /D |C \B| 3
55   |/   |   \|
56    ---- ----  .11
57      5    4   ,10
58
59In 14 segment mode, 0 represents the whole top line,
60and 5 the bottom line, allowing both modes to share
61a charset.
62
63Note that, although we call this a 16 segment display,
64we actually have 18 segments, including the semicolon portions.
65This means our segment maths needs to be more than 16-bit to work!
66*/
67
68static UINT32 roc10937charset[]=
69{           // 11 10 FEDC BA98 7654 3210
70   0x0507F, //  0  0 0101 0000 0111 1111 @.
71   0x044CF, //  0  0 0100 0100 1100 1111 A.
72   0x0153F, //  0  0 0001 0101 0011 1111 B.
73   0x000F3, //  0  0 0000 0000 1111 0011 C.
74   0x0113F, //  0  0 0001 0001 0011 1111 D.
75   0x040F3, //  0  0 0100 0000 1111 0011 E.
76   0x040C3, //  0  0 0100 0000 1100 0011 F.
77   0x004FB, //  0  0 0000 0100 1111 1011 G.
78   0x044CC, //  0  0 0100 0100 1100 1100 H.
79   0x01133, //  0  0 0001 0001 0011 0011 I.
80   0x0007C, //  0  0 0000 0000 0111 1100 J.
81   0x04AC0, //  0  0 0100 1010 1100 0000 K.
82   0x000F0, //  0  0 0000 0000 1111 0000 L.
83   0x082CC, //  0  0 1000 0010 1100 1100 M.
84   0x088CC, //  0  0 1000 1000 1100 1100 N.
85   0x000FF, //  0  0 0000 0000 1111 1111 O.
86   0x044C7, //  0  0 0100 0100 1100 0111 P.
87   0x008FF, //  0  0 0000 1000 1111 1111 Q.
88   0x04CC7, //  0  0 0100 1100 1100 0111 R.
89   0x044BB, //  0  0 0100 0100 1011 1011 S.
90   0x01103, //  0  0 0001 0001 0000 0011 T.
91   0x000FC, //  0  0 0000 0000 1111 1100 U.
92   0x022C0, //  0  0 0010 0010 1100 0000 V.
93   0x028CC, //  0  0 0010 1000 1100 1100 W.
94   0x0AA00, //  0  0 1010 1010 0000 0000 X.
95   0x09200, //  0  0 1001 0010 0000 0000 Y.
96   0x02233, //  0  0 0010 0010 0011 0011 Z.
97   0x000E1, //  0  0 0000 0000 1110 0001 [.
98   0x08800, //  0  0 1000 1000 0000 0000 \.
99   0x0001E, //  0  0 0000 0000 0001 1110 ].
100   0x02800, //  0  0 0010 1000 0000 0000 ^.
101   0x00030, //  0  0 0000 0000 0011 0000 _.
102   0x00000, //  0  0 0000 0000 0000 0000 dummy.
103   0x08121, //  0  0 1000 0001 0010 0001 Unknown symbol.
104   0x00180, //  0  0 0000 0001 1000 0000 ".
105   0x0553C, //  0  0 0101 0101 0011 1100 #.
106   0x055BB, //  0  0 0101 0101 1011 1011 $.
107   0x07799, //  0  0 0111 0111 1001 1001 %.
108   0x0C979, //  0  0 1100 1001 0111 1001 &.
109   0x00200, //  0  0 0000 0010 0000 0000 '.
110   0x00A00, //  0  0 0000 1010 0000 0000 (.
111   0x0A050, //  0  0 1010 0000 0000 0000 ).
112   0x0FF00, //  0  0 1111 1111 0000 0000 *.
113   0x05500, //  0  0 0101 0101 0000 0000 +.
114   0x30000, //  1  1 0000 0000 0000 0000 ;.
115   0x04400, //  0  0 0100 0100 0000 0000 --.
116   0x20000, //  1  0 0000 0000 0000 0000 . .
117   0x02200, //  0  0 0010 0010 0000 0000 /.
118   0x022FF, //  0  0 0010 0010 1111 1111 0.
119   0x01100, //  0  0 0001 0001 0000 0000 1.
120   0x04477, //  0  0 0100 0100 0111 0111 2.
121   0x0443F, //  0  0 0100 0100 0011 1111 3.
122   0x0448C, //  0  0 0100 0100 1000 1100 4.
123   0x044BB, //  0  0 0100 0100 1011 1011 5.
124   0x044FB, //  0  0 0100 0100 1111 1011 6.
125   0x0000E, //  0  0 0000 0000 0000 1110 7.
126   0x044FF, //  0  0 0100 0100 1111 1111 8.
127   0x044BF, //  0  0 0100 0100 1011 1111 9.
128   0x00021, //  0  0 0000 0000 0010 0001 -
129            //                           -.
130   0x02001, //  0  0 0010 0000 0000 0001 -
131          //                           /.
132   0x02430, //  0  0 0010 0100 0011 0000 <.
133   0x04430, //  0  0 0100 0100 0011 0000 =.
134   0x08830, //  0  0 1000 1000 0011 0000 >.
135   0x01407, //  0  0 0001 0100 0000 0111 ?.
136};
137
138static const int roc10937poslut[]=
139{
140   1,//0
141   2,
142   3,
143   4,
144   5,
145   6,
146   7,
147   8,
148   9,
149   10,
150   11,
151   12,
152   13,
153   14,
154   15,
155   0//15
156};
157
158///////////////////////////////////////////////////////////////////////////
159
160void ROC10937_init(int id, int type,int reversed)
161{
162   assert_always((id >= 0) && (id < MAX_ROCK_ALPHAS), "roc10937_init called on an invalid display ID!");
163
164   memset( &roc10937[id], 0, sizeof(roc10937[0]));
165
166   roc10937[id].type = type;
167   roc10937[id].reversed = reversed;
168   ROC10937_reset(id);
169}
170
171///////////////////////////////////////////////////////////////////////////
172
173void ROC10937_reset(int id)
174{
175   roc10937[id].window_end  = 15;
176   roc10937[id].window_size = (roc10937[id].window_end - roc10937[id].window_start)+1;
177   memset(roc10937[id].string, ' ', 16);
178
179   roc10937[id].brightness = 31;
180   roc10937[id].count      = 0;
181
182   roc10937[id].changed |= 1;
183}
184
185///////////////////////////////////////////////////////////////////////////
186
187UINT32 *ROC10937_get_segments(int id)
188{
189   return roc10937[id].segments;
190}
191
192///////////////////////////////////////////////////////////////////////////
193
194UINT32 *ROC10937_get_outputs(int id)
195{
196   return roc10937[id].outputs;
197}
198
199///////////////////////////////////////////////////////////////////////////
200
201UINT32 *ROC10937_set_outputs(int id)
202{
203   int cursor,val;
204   for (cursor = 0; cursor < 16; cursor++)
205   {
206      if (!roc10937[id].reversed)//Output to the screen is naturally backwards, so we need to invert it
207      {
208         val = 15-cursor;
209      }
210      else
211      {
212         //If the controller is reversed, things look normal.
213         val = cursor;
214      }
215
216      if ( ROC10937_get_segments(id)[val] & 0x0001 )   roc10937[id].outputs[cursor] |=  0x0001;
217      else                                       roc10937[id].outputs[cursor] &= ~0x0001;
218      if ( ROC10937_get_segments(id)[val] & 0x0002 )   roc10937[id].outputs[cursor] |=  0x0002;
219      else                                       roc10937[id].outputs[cursor] &= ~0x0002;
220      if ( ROC10937_get_segments(id)[val] & 0x0004 )   roc10937[id].outputs[cursor] |=  0x0004;
221      else                                          roc10937[id].outputs[cursor] &= ~0x0004;
222      if ( ROC10937_get_segments(id)[val] & 0x0008 )   roc10937[id].outputs[cursor] |=  0x0008;
223      else                                       roc10937[id].outputs[cursor] &= ~0x0008;
224      if ( ROC10937_get_segments(id)[val] & 0x0010 )   roc10937[id].outputs[cursor] |=  0x0010;
225      else                                       roc10937[id].outputs[cursor] &= ~0x0010;
226      if ( ROC10937_get_segments(id)[val] & 0x0020 )   roc10937[id].outputs[cursor] |=  0x0020;
227      else                                       roc10937[id].outputs[cursor] &= ~0x0020;
228      if ( ROC10937_get_segments(id)[val] & 0x0040 )   roc10937[id].outputs[cursor] |=  0x0040;
229      else                                       roc10937[id].outputs[cursor] &= ~0x0040;
230      if ( ROC10937_get_segments(id)[val] & 0x0080 )   roc10937[id].outputs[cursor] |=  0x0080;
231      else                                       roc10937[id].outputs[cursor] &= ~0x0080;
232      if ( ROC10937_get_segments(id)[val] & 0x4000 )   roc10937[id].outputs[cursor] |=  0x0100;
233      else                                       roc10937[id].outputs[cursor] &= ~0x0100;
234      if ( ROC10937_get_segments(id)[val] & 0x0400 )   roc10937[id].outputs[cursor] |=  0x0200;
235      else                                       roc10937[id].outputs[cursor] &= ~0x0200;
236      if ( ROC10937_get_segments(id)[val] & 0x0100 )   roc10937[id].outputs[cursor] |=  0x0400;
237      else                                       roc10937[id].outputs[cursor] &= ~0x0400;
238      if ( ROC10937_get_segments(id)[val] & 0x1000 )   roc10937[id].outputs[cursor] |=  0x0800;
239      else                                       roc10937[id].outputs[cursor] &= ~0x0800;
240      if ( ROC10937_get_segments(id)[val] & 0x2000 )   roc10937[id].outputs[cursor] |=  0x1000;
241      else                                          roc10937[id].outputs[cursor] &= ~0x1000;
242      if ( ROC10937_get_segments(id)[val] & 0x8000 )   roc10937[id].outputs[cursor] |=  0x2000;
243      else                                       roc10937[id].outputs[cursor] &= ~0x2000;
244      if ( ROC10937_get_segments(id)[val] & 0x0200 )   roc10937[id].outputs[cursor] |=  0x4000;
245      else                                       roc10937[id].outputs[cursor] &= ~0x4000;
246      if ( ROC10937_get_segments(id)[val] & 0x0800 )   roc10937[id].outputs[cursor] |=  0x8000;
247      else                                       roc10937[id].outputs[cursor] &= ~0x8000;
248
249      if ( ROC10937_get_segments(id)[val] & 0x10000 )   roc10937[id].outputs[cursor] |=  0x10000;
250      else                                       roc10937[id].outputs[cursor] &= ~0x10000;
251      if ( ROC10937_get_segments(id)[val] & 0x20000 )   roc10937[id].outputs[cursor] |=  0x20000;
252      else                                       roc10937[id].outputs[cursor] &= ~0x20000;
253   }
254   return 0;
255}
256
257///////////////////////////////////////////////////////////////////////////
258
259char  *ROC10937_get_string( int id)
260{
261   return (char *)roc10937[id].string;
262}
263
264///////////////////////////////////////////////////////////////////////////
265
266void ROC10937_shift_data(int id, int data)
267{
268   roc10937[id].data <<= 1;
269
270   if ( !data ) roc10937[id].data |= 1;
271
272   if ( ++roc10937[id].count >= 8 )
273   {
274      if ( ROC10937_newdata(id, roc10937[id].data) )
275      {
276         roc10937[id].changed |= 1;
277      }
278
279   roc10937[id].count = 0;
280   roc10937[id].data  = 0;
281  }
282}
283
284///////////////////////////////////////////////////////////////////////////
285
286int ROC10937_newdata(int id, int data)
287{
288   int change = 0;
289
290   if ( data & 0x80 )
291   { // Control data received
292      if ( (data & 0xF0) == 0xA0 ) // 1010 xxxx
293      { // 1010 xxxx Buffer Pointer control
294         roc10937[id].cursor_pos = roc10937poslut[data & 0x0F];
295      }
296      else if ( (data & 0xF0) == 0xC0 ) // 1100 xxxx
297      { // 1100 xxxx Set number of digits
298         data &= 0x07;
299
300         if ( data == 0 ) roc10937[id].window_size = 16;
301         else             roc10937[id].window_size = data+8;
302         roc10937[id].window_start = 0;
303         roc10937[id].window_end   = roc10937[id].window_size-1;
304      }
305      else if ( (data & 0xE0) == 0xE0 ) // 111x xxxx
306      { // 111x xxxx Set duty cycle ( brightness )
307         roc10937[id].brightness = (data & 0xF)*2;
308         change = 1;
309      }
310      else if ( (data & 0xE0) == 0x80 ) // 100x ---
311      { // 100x xxxx Test mode
312      }
313   }
314   else
315   { // Display data
316      data &= 0x3F;
317      change = 1;
318
319      switch ( data )
320      {
321         case 0x2C: // ;
322         roc10937[id].segments[roc10937[id].pcursor_pos] |= (1<<17);//.
323         roc10937[id].segments[roc10937[id].pcursor_pos] |= (1<<18);//,
324         break;
325         case 0x2E: //
326         roc10937[id].segments[roc10937[id].pcursor_pos] |= (1<<17);//.
327         break;
328         case 0x6C: // ;
329         roc10937[id].segments[roc10937[id].pcursor_pos] |= (1<<17);//.
330         if ( roc10937[id].type == ROCKWELL10937)
331         {
332            roc10937[id].segments[roc10937[id].pcursor_pos] |= (1<<18);//,
333         }
334         break;
335         case 0x6E: //
336         if ( roc10937[id].type == ROCKWELL10937)
337         {
338            roc10937[id].segments[roc10937[id].pcursor_pos] |= (1<<17);//.
339         }
340         else
341         {
342            roc10937[id].segments[roc10937[id].pcursor_pos] |= (1<<18);//,
343         }
344         break;
345         default :
346         roc10937[id].pcursor_pos = roc10937[id].cursor_pos;
347         roc10937[id].string[ roc10937[id].cursor_pos ] = roc10937ASCII[data];
348         roc10937[id].segments[roc10937[id].cursor_pos] = roc10937charset[data & 0x3F];
349
350         roc10937[id].cursor_pos++;
351         if (  roc10937[id].cursor_pos > roc10937[id].window_end )
352         {
353               roc10937[id].cursor_pos = 0;
354         }
355      break;
356      }
357
358   }
359   return change;
360}
361
362///////////////////////////////////////////////////////////////////////////
363
364static void ROC10937_plot(int id, int power)
365{
366   int cursor;
367   ROC10937_set_outputs(id);
368
369   for (cursor = 0; cursor < 16; cursor++)
370   {
371      output_set_indexed_value("vfd", (id*16)+cursor, power?ROC10937_get_outputs(id)[cursor]:0x00000);
372
373      if (ROC10937_get_outputs(id)[cursor] & 0x40000)
374      {
375         //activate flashing (unimplemented, just toggle on and off)
376      }
377      else
378      {
379         //deactivate flashing (unimplemented)
380      }
381   }
382}
383static void ROC10937_draw(int id, int segs)
384{
385   int cycle;
386   for (cycle = 0; cycle < 32; cycle++)
387   {
388      if ((roc10937[id].brightness < cycle)||(roc10937[id].brightness == cycle))
389      {
390         ROC10937_plot(id,1);
391      }
392      else
393      {
394         ROC10937_plot(id,0);
395      }
396   }
397}
398
399//Helper functions
400void ROC10937_draw_16seg(int id)
401{
402   ROC10937_draw(id,16);
403}
404void ROC10937_draw_14seg(int id)
405{
406   ROC10937_draw(id,14);
407}
src/mame/machine/roc10937.h
r0r779
1/**********************************************************************
2
3    Rockwell 10937/10957 interface and emulation by J.Wallace
4    OKI MSC1937 is a clone of this chip
5
6**********************************************************************/
7
8#ifndef ROC10937
9#define ROC10937
10
11#define MAX_ROCK_ALPHAS  3     // max number of displays emulated
12
13#define ROCKWELL10937 0   // Rockwell 10937
14#define MSC1937 0       // OKI MSC1937 clone of Rockwell 10937
15#define ROCKWELL10957 1   // Rockwell 10957
16
17void   ROC10937_init(  int id, int type,int reversed );      // setup a display
18
19void   ROC10937_reset( int id);            // reset the alpha
20
21void   ROC10937_shift_data(int id, int data);   // clock in a bit of data
22
23int      ROC10937_newdata(   int id, int data);   // clock in 8 bits of data
24
25UINT32   *ROC10937_get_segments(int id);         // get current segments displayed
26UINT32  *ROC10937_set_outputs(int id);         // convert segments to standard for display
27UINT32  *ROC10937_get_outputs(int id);         // get converted segments
28
29char   *ROC10937_get_string( int id);         // get current string   displayed (not as accurate)
30
31void   ROC10937_draw_16seg(int id);
32void   ROC10937_draw_14seg(int id);
33#endif
34
src/mame/machine/atari.c
r778r779
891891DEVICE_LOAD( a800xl_cart )
892892{
893893   UINT8 *mem = memory_region(REGION_CPU1);
894   char *fname;
894   astring *fname;
895895   mame_file *basic_fp;
896896   file_error filerr;
897897   unsigned size;
898898
899   fname = assemble_3_strings(Machine->gamedrv->name, PATH_SEPARATOR, "basic.rom");
900   filerr = mame_fopen(SEARCHPATH_ROM, fname, OPEN_FLAG_READ, &basic_fp);
901   free(fname);
899   fname = astring_assemble_3(astring_alloc(), Machine->gamedrv->name, PATH_SEPARATOR, "basic.rom");
900   filerr = mame_fopen(SEARCHPATH_ROM, astring_c(fname), OPEN_FLAG_READ, &basic_fp);
901   astring_free(fname);
902902
903903   if (filerr != FILERR_NONE)
904904   {
905905      size = mame_fread(basic_fp, &mem[0x14000], 0x2000);
906906      if( size < 0x2000 )
907907      {
908         logerror("%s image '%s' load failed (less than 8K)\n", Machine->gamedrv->name, fname);
908         logerror("%s image '%s' load failed (less than 8K)\n", Machine->gamedrv->name, astring_c(fname));
909909         mame_fclose(basic_fp);
910910         return 2;
911911      }
src/mame/machine/dc.c
r778r779
1/*
2
3   dc.c - Sega Dreamcast hardware
4
5*/
6
7#include "driver.h"
8#include "dc.h"
9
10READ64_HANDLER( dc_sysctrl_r )
11{
12   return 0;
13}
14
15WRITE64_HANDLER( dc_sysctrl_w )
16{
17   mame_printf_verbose("SYSCTRL: write %llx to %x, mask %llx\n", data, offset, mem_mask);
18}
19
20READ64_HANDLER( dc_maple_r )
21{   
22   return 0;
23}
24
25WRITE64_HANDLER( dc_maple_w )
26{
27   mame_printf_verbose("MAPLE: write %llx to %x, mask %llx\n", data, offset, mem_mask);
28}
29
30READ64_HANDLER( dc_gdrom_r )
31{   
32   return 0;
33}
34
35WRITE64_HANDLER( dc_gdrom_w )
36{
37   mame_printf_verbose("GDROM: write %llx to %x, mask %llx\n", data, offset, mem_mask);
38}
39
40READ64_HANDLER( dc_g1_ctrl_r )
41{   
42   return 0;
43}
44
45WRITE64_HANDLER( dc_g1_ctrl_w )
46{
47   mame_printf_verbose("G1CTRL: write %llx to %x, mask %llx\n", data, offset, mem_mask);
48}
49
50READ64_HANDLER( dc_g2_ctrl_r )
51{   
52   return 0;
53}
54
55WRITE64_HANDLER( dc_g2_ctrl_w )
56{
57   mame_printf_verbose("G2CTRL: write %llx to %x, mask %llx\n", data, offset, mem_mask);
58}
59
60READ64_HANDLER( dc_modem_r )
61{   
62   return 0;
63}
64
65WRITE64_HANDLER( dc_modem_w )
66{
67   mame_printf_verbose("MODEM: write %llx to %x, mask %llx\n", data, offset, mem_mask);
68}
69
70READ64_HANDLER( dc_rtc_r )
71{   
72   return 0;
73}
74
75WRITE64_HANDLER( dc_rtc_w )
76{
77   mame_printf_verbose("RTC: write %llx to %x, mask %llx\n", data, offset, mem_mask);
78}
79
80MACHINE_RESET( dc )
81{
82   /* halt the ARM7 */
83   cpunum_set_input_line(1, INPUT_LINE_RESET, ASSERT_LINE);
84}
85
86READ64_HANDLER( dc_aica_reg_r )
87{   
88   return 0;
89}
90
91WRITE64_HANDLER( dc_aica_reg_w )
92{
93   mame_printf_verbose("AICA REG: write %llx to %x, mask %llx\n", data, offset, mem_mask);
94}
95
1/*
2 
3    dc.c - Sega Dreamcast hardware
4 
5*/
6 
7#include "driver.h"
8#include "dc.h"
9 
10READ64_HANDLER( dc_sysctrl_r )
11{
12   return 0;
13}
14 
15WRITE64_HANDLER( dc_sysctrl_w )
16{
17   mame_printf_verbose("SYSCTRL: write %llx to %x, mask %llx\n", data, offset, mem_mask);
18}
19 
20READ64_HANDLER( dc_maple_r )
21{
22   return 0;
23}
24 
25WRITE64_HANDLER( dc_maple_w )
26{
27   mame_printf_verbose("MAPLE: write %llx to %x, mask %llx\n", data, offset, mem_mask);
28}
29 
30READ64_HANDLER( dc_gdrom_r )
31{
32   return 0;
33}
34 
35WRITE64_HANDLER( dc_gdrom_w )
36{
37   mame_printf_verbose("GDROM: write %llx to %x, mask %llx\n", data, offset, mem_mask);
38}
39 
40READ64_HANDLER( dc_g1_ctrl_r )
41{
42   return 0;
43}
44 
45WRITE64_HANDLER( dc_g1_ctrl_w )
46{
47   mame_printf_verbose("G1CTRL: write %llx to %x, mask %llx\n", data, offset, mem_mask);
48}
49 
50READ64_HANDLER( dc_g2_ctrl_r )
51{
52   return 0;
53}
54 
55WRITE64_HANDLER( dc_g2_ctrl_w )
56{
57   mame_printf_verbose("G2CTRL: write %llx to %x, mask %llx\n", data, offset, mem_mask);
58}
59 
60READ64_HANDLER( dc_modem_r )
61{
62   return 0;
63}
64 
65WRITE64_HANDLER( dc_modem_w )
66{
67   mame_printf_verbose("MODEM: write %llx to %x, mask %llx\n", data, offset, mem_mask);
68}
69 
70READ64_HANDLER( dc_rtc_r )
71{
72   return 0;
73}
74 
75WRITE64_HANDLER( dc_rtc_w )
76{
77   mame_printf_verbose("RTC: write %llx to %x, mask %llx\n", data, offset, mem_mask);
78}
79 
80MACHINE_RESET( dc )
81{
82   /* halt the ARM7 */
83   cpunum_set_input_line(1, INPUT_LINE_RESET, ASSERT_LINE);
84}
85 
86READ64_HANDLER( dc_aica_reg_r )
87{
88   return 0;
89}
90 
91WRITE64_HANDLER( dc_aica_reg_w )
92{
93   mame_printf_verbose("AICA REG: write %llx to %x, mask %llx\n", data, offset, mem_mask);
94}
95 
src/mame/machine/bfm_bd1.c
r0r779
1/**********************************************************************
2
3    Bellfruit BD1 VFD module interface and emulation by J.Wallace
4
5**********************************************************************/
6
7#include "driver.h"
8#include "bfm_bd1.h"
9
10static struct
11{
12   UINT8   type,            // type of alpha display
13
14         changed,         // flag <>0, if contents are changed
15         window_start,      // display window start pos 0-15
16         window_end,         // display window end   pos 0-15
17         window_size,      // window  size
18         pad;            // unused align byte
19
20   INT8   pcursor_pos,      // previous cursor pos
21         cursor_pos;         // current cursor pos
22
23   UINT16  user_def,         // user defined character state
24         user_data;         // user defined character data (16 bit)
25
26   UINT8   scroll_active,      // flag <>0, scrolling active
27         display_mode,      // display scroll   mode, 0/1/2/3
28         display_blanking,   // display blanking mode, 0/1/2/3
29         flash_rate,         // flash rate 0-F
30         flash_control;      // flash control 0/1/2/3
31
32   UINT8   string[18];         // text buffer
33   UINT32  segments[16],      // segments
34         outputs[16];      // standardised outputs
35
36   UINT8   count,            // bit counter
37         data;            // receive register
38
39} bd1[MAX_BD1];
40
41
42// local prototypes ///////////////////////////////////////////////////////
43
44static void ScrollLeft( int id);
45static int  BD1_setdata(int id, int segdata, int data);
46
47// local vars /////////////////////////////////////////////////////////////
48
49//
50// Bellfruit BD1 charset to ASCII conversion table
51//
52static const char BD1ASCII[] =
53//0123456789ABCDEF0123456789ABC DEF01 23456789ABCDEF0123456789ABCDEF
54 "@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_ ?\"#$%%'()*+.-./0123456789&%<=>?"\
55 "@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_ ?\"#$%%'()*+.-./0123456789&%<=>?"\
56 "@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_ ?\"#$%%'()*+.-./0123456789&%<=>?";
57
58/*
59   BD1 14 segment charset lookup table
60        2
61    ---------
62   |\   |3  /|
63 0 | \6 |  /7| 1
64   |  \ | /  |
65    -F-- --E-
66   |  / | \  |
67 D | /4 |A \B| 5
68   |/   |   \|
69    ---------  C
70        9
71
72  */
73
74static UINT16 BD1charset[]=
75{           // FEDC BA98 7654 3210
76   0xA626, // 1010 0110 0010 0110 @.
77   0xE027, // 1110 0000 0010 0111 A.
78   0x462E, // 0100 0110 0010 1110 B.
79   0x2205, // 0010 0010 0000 0101 C.
80   0x062E, // 0000 0110 0010 1110 D.
81   0xA205, // 1010 0010 0000 0101 E.
82   0xA005, // 1010 0000 0000 0101 F.
83   0x6225, // 0110 0010 0010 0101 G.
84   0xE023, // 1110 0000 0010 0011 H.
85   0x060C, // 0000 0110 0000 1100 I.
86   0x2222, // 0010 0010 0010 0010 J.
87   0xA881, // 1010 1000 1000 0001 K.
88   0x2201, // 0010 0010 0000 0001 L.
89   0x20E3, // 0010 0000 1110 0011 M.
90   0x2863, // 0010 1000 0110 0011 N.
91   0x2227, // 0010 0010 0010 0111 O.
92   0xE007, // 1110 0000 0000 0111 P.
93   0x2A27, // 0010 1010 0010 0111 Q.
94   0xE807, // 1110 1000 0000 0111 R.
95   0xC225, // 1100 0010 0010 0101 S.
96   0x040C, // 0000 0100 0000 1100 T.
97   0x2223, // 0010 0010 0010 0011 U.
98   0x2091, // 0010 0000 1001 0001 V.
99   0x2833, // 0010 1000 0011 0011 W.
100   0x08D0, // 0000 1000 1101 0000 X.
101   0x04C0, // 0000 0100 1100 0000 Y.
102   0x0294, // 0000 0010 1001 0100 Z.
103   0x2205, // 0010 0010 0000 0101 [.
104   0x0840, // 0000 1000 0100 0000 \.
105   0x0226, // 0000 0010 0010 0110 ].
106   0x0810, // 0000 1000 0001 0000 ^.
107   0x0200, // 0000 0010 0000 0000 _
108   0x0000, // 0000 0000 0000 0000
109   0xC290, // 1100 0010 1001 0000 POUND.
110   0x0009, // 0000 0000 0000 1001 ".
111   0xC62A, // 1100 0110 0010 1010 #.
112   0xC62D, // 1100 0110 0010 1101 $.
113   0x0100, // 0000 0000 0000 0000 flash ?
114   0x0000, // 0000 0000 0000 0000 not defined
115   0x0040, // 0000 0000 1000 0000 '.
116   0x0880, // 0000 1000 1000 0000 (.
117   0x0050, // 0000 0000 0101 0000 ).
118   0xCCD8, // 1100 1100 1101 1000 *.
119   0xC408, // 1100 0100 0000 1000 +.
120   0x1000, // 0001 0000 0000 0000 .
121   0xC000, // 1100 0000 0000 0000 -.
122   0x1000, // 0001 0000 0000 0000 ..
123   0x0090, // 0000 0000 1001 0000 /.
124   0x22B7, // 0010 0010 1011 0111 0.
125   0x0408, // 0000 0100 0000 1000 1.
126   0xE206, // 1110 0010 0000 0110 2.
127   0x4226, // 0100 0010 0010 0110 3.
128   0xC023, // 1100 0000 0010 0011 4.
129   0xC225, // 1100 0010 0010 0101 5.
130   0xE225, // 1110 0010 0010 0101 6.
131   0x0026, // 0000 0000 0010 0110 7.
132   0xE227, // 1110 0010 0010 0111 8.
133   0xC227, // 1100 0010 0010 0111 9.
134   0xFFFF, // 0000 0000 0000 0000 user defined, can be replaced by main program
135   0x0000, // 0000 0000 0000 0000 dummy
136   0x0290, // 0000 0010 1001 0000 <.
137   0xC200, // 1100 0010 0000 0000 =.
138   0x0A40, // 0000 1010 0100 0000 >.
139   0x4406, // 0100 0100 0000 0110 ?
140};
141
142///////////////////////////////////////////////////////////////////////////
143
144void bfm_bd1_init(int id)
145{
146   assert_always((id >= 0) && (id < MAX_BD1), "bfm_bd1_init called on an invalid display ID!");
147
148   memset( &bd1[id], 0, sizeof(bd1[0]));
149
150   bfm_bd1_reset(id);
151}
152
153///////////////////////////////////////////////////////////////////////////
154
155void bfm_bd1_reset(int id)
156{
157   bd1[id].window_end  = 15;
158   bd1[id].window_size = (bd1[id].window_end - bd1[id].window_start)+1;
159   memset(bd1[id].string, ' ', 16);
160
161   bd1[id].count      = 0;
162
163   bd1[id].changed |= 1;
164}
165
166///////////////////////////////////////////////////////////////////////////
167
168UINT32 *bfm_bd1_get_segments(int id)
169{
170   return bd1[id].segments;
171}
172
173///////////////////////////////////////////////////////////////////////////
174
175UINT32 *bfm_bd1_get_outputs(int id)
176{
177   return bd1[id].outputs;
178}
179
180///////////////////////////////////////////////////////////////////////////
181
182UINT32 *bfm_bd1_set_outputs(int id)
183{
184   int cursor;
185   for (cursor = 0; cursor < 16; cursor++)
186   {
187      if ( bfm_bd1_get_segments(id)[cursor] & 0x0004 )   bd1[id].outputs[cursor] |=  0x0001;
188      else                                          bd1[id].outputs[cursor] &= ~0x0001;
189      if ( bfm_bd1_get_segments(id)[cursor] & 0x0002 )   bd1[id].outputs[cursor] |=  0x0002;
190      else                                          bd1[id].outputs[cursor] &= ~0x0002;
191      if ( bfm_bd1_get_segments(id)[cursor] & 0x0020 )   bd1[id].outputs[cursor] |=  0x0004;
192      else                                          bd1[id].outputs[cursor] &= ~0x0004;
193      if ( bfm_bd1_get_segments(id)[cursor] & 0x0200 )   bd1[id].outputs[cursor] |=  0x0008;
194      else                                          bd1[id].outputs[cursor] &= ~0x0008;
195      if ( bfm_bd1_get_segments(id)[cursor] & 0x2000 )   bd1[id].outputs[cursor] |=  0x0010;
196      else                                          bd1[id].outputs[cursor] &= ~0x0010;
197      if ( bfm_bd1_get_segments(id)[cursor] & 0x0001 )   bd1[id].outputs[cursor] |=  0x0020;
198      else                                          bd1[id].outputs[cursor] &= ~0x0020;
199      if ( bfm_bd1_get_segments(id)[cursor] & 0x8000 )   bd1[id].outputs[cursor] |=  0x0040;
200      else                                          bd1[id].outputs[cursor] &= ~0x0040;
201      if ( bfm_bd1_get_segments(id)[cursor] & 0x4000 )   bd1[id].outputs[cursor] |=  0x0080;
202      else                                          bd1[id].outputs[cursor] &= ~0x0080;
203      if ( bfm_bd1_get_segments(id)[cursor] & 0x0008 )   bd1[id].outputs[cursor] |=  0x0100;
204      else                                          bd1[id].outputs[cursor] &= ~0x0100;
205      if ( bfm_bd1_get_segments(id)[cursor] & 0x0400 )   bd1[id].outputs[cursor] |=  0x0200;
206      else                                          bd1[id].outputs[cursor] &= ~0x0200;
207      if ( bfm_bd1_get_segments(id)[cursor] & 0x0010 )   bd1[id].outputs[cursor] |=  0x0400;
208      else                                          bd1[id].outputs[cursor] &= ~0x0400;
209      if ( bfm_bd1_get_segments(id)[cursor] & 0x0040 )   bd1[id].outputs[cursor] |=  0x0800;
210      else                                          bd1[id].outputs[cursor] &= ~0x0800;
211      if ( bfm_bd1_get_segments(id)[cursor] & 0x0080 )   bd1[id].outputs[cursor] |=  0x1000;
212      else                                          bd1[id].outputs[cursor] &= ~0x1000;
213      if ( bfm_bd1_get_segments(id)[cursor] & 0x0800 )   bd1[id].outputs[cursor] |=  0x2000;
214      else                                          bd1[id].outputs[cursor] &= ~0x2000;
215      if ( bfm_bd1_get_segments(id)[cursor] & 0x1000 )   bd1[id].outputs[cursor] |=  0x4000;
216      else                                          bd1[id].outputs[cursor] &= ~0x4000;
217      //Flashing ? Set an unused pin as a control
218      if ( bfm_bd1_get_segments(id)[cursor] & 0x100 )   bd1[id].outputs[cursor] |=  0x40000;
219      else                                    bd1[id].outputs[cursor] &= ~0x40000;
220   }
221   return 0;
222}
223///////////////////////////////////////////////////////////////////////////
224
225char  *bfm_bd1_get_string( int id)
226{
227   return (char *)bd1[id].string;
228}
229
230///////////////////////////////////////////////////////////////////////////
231
232void bfm_bd1_shift_data(int id, int data)
233{
234   bd1[id].data <<= 1;
235
236   if ( !data ) bd1[id].data |= 1;
237
238   if ( ++bd1[id].count >= 8 )
239   {
240      if ( bfm_bd1_newdata(id, bd1[id].data) )
241      {
242         bd1[id].changed |= 1;
243      }
244   //logerror("vfd %3d -> %02X \"%s\"\n", id, bd1[id].data, bd1[id].string);
245
246   bd1[id].count = 0;
247   bd1[id].data  = 0;
248  }
249}
250
251///////////////////////////////////////////////////////////////////////////
252
253int bfm_bd1_newdata(int id, int data)
254{
255   int change = 0;
256   int cursor;
257
258   if ( bd1[id].user_def )
259   {
260      bd1[id].user_def--;
261
262      bd1[id].user_data <<= 8;
263      bd1[id].user_data |= data;
264
265      if ( bd1[id].user_def )
266      {
267         return 0;
268      }
269
270   data = '@';
271   change = BD1_setdata(id, bd1[id].user_def, data);
272   }
273   else
274   {
275   }
276
277   switch ( data & 0xF0 )
278   {
279      case 0x80:   // 0x80 - 0x8F Set display blanking
280
281      bd1[id].display_blanking = data & 0x0F;
282      change = 1;
283      break;
284
285      case 0x90:   // 0x90 - 0x9F Set cursor pos
286
287      bd1[id].cursor_pos = data & 0x0F;
288
289      bd1[id].scroll_active = 0;
290      if ( bd1[id].display_mode == 2 )
291      {
292         if ( bd1[id].cursor_pos >= bd1[id].window_end) bd1[id].scroll_active = 1;
293      }
294      break;
295
296      case 0xA0:   // 0xA0 - 0xAF Set display mode
297
298      bd1[id].display_mode = data &0x03;
299      break;
300
301      case 0xB0:   // 0xB0 - 0xBF Clear display area
302
303      switch ( data & 0x03 )
304      {
305         case 0x00:   // clr nothing
306         break;
307
308         case 0x01:   // clr inside window
309
310         if ( bd1[id].window_size > 0 )
311         {
312            memset( bd1[id].string+bd1[id].window_start, ' ',bd1[id].window_size );
313         }
314         break;
315
316         case 0x02:   // clr outside window
317
318         if ( bd1[id].window_size > 0 )
319         {
320            if ( bd1[id].window_start > 0 )
321            {
322               memset( bd1[id].string, ' ', bd1[id].window_start);
323               for (cursor = 0; cursor < bd1[id].window_start; cursor++)
324               {
325                  bd1[id].segments[cursor] = 0x0000;
326               }
327            }
328
329            if (bd1[id].window_end < 15 )
330            {
331               memset( bd1[id].string+bd1[id].window_end, ' ', 15-bd1[id].window_end);
332               for (cursor = bd1[id].window_end; cursor < 15-bd1[id].window_end; cursor++)
333               {
334                  bd1[id].segments[cursor] = 0x0000;
335               }
336
337            }
338         }
339         case 0x03:   // clr entire display
340
341         memset(bd1[id].string, ' ' , 16);
342         for (cursor = 0; cursor < 16; cursor++)
343         {
344            bd1[id].segments[cursor] = 0x0000;
345         }
346         break;
347      }
348      change = 1;
349      break;
350
351      case 0xC0:   // 0xC0 - 0xCF Set flash rate
352
353      bd1[id].flash_rate = data & 0x0F;
354      break;
355
356      case 0xD0:   // 0xD0 - 0xDF Set Flash control
357
358      bd1[id].flash_control = data & 0x03;
359      break;
360
361      case 0xE0:   // 0xE0 - 0xEF Set window start pos
362
363      bd1[id].window_start = data &0x0F;
364      bd1[id].window_size  = (bd1[id].window_end - bd1[id].window_start)+1;
365      break;
366
367      case 0xF0:   // 0xF0 - 0xFF Set window end pos
368
369      bd1[id].window_end   = data &0x0F;
370      bd1[id].window_size  = (bd1[id].window_end - bd1[id].window_start)+1;
371
372      bd1[id].scroll_active = 0;
373      if ( bd1[id].display_mode == 2 )
374      {
375         if ( bd1[id].cursor_pos >= bd1[id].window_end)
376         {
377            bd1[id].scroll_active = 1;
378            bd1[id].cursor_pos    = bd1[id].window_end;
379         }
380      }
381      break;
382
383      default:   // normal character
384
385      change = BD1_setdata(id, BD1charset[data & 0x3F], data);
386      break;
387   }
388   return change;
389}
390
391///////////////////////////////////////////////////////////////////////////
392
393static void ScrollLeft(int id)
394{
395   int i = bd1[id].window_start;
396
397   while ( i < bd1[id].window_end )
398   {
399      bd1[id].string[ i ] = bd1[id].string[ i+1 ];
400      bd1[id].segments[i] = bd1[id].segments[i+1];
401      i++;
402   }
403}
404
405///////////////////////////////////////////////////////////////////////////
406
407static int BD1_setdata(int id, int segdata, int data)
408{
409   int change = 0, move = 0;
410
411   switch ( data )
412   {
413      case 0x25:   // flash
414      move++;
415      break;
416
417      case 0x26:  // undefined
418      break;
419
420      case 0x2C:  // semicolon
421      case 0x2E:  // decimal point
422
423      bd1[id].segments[bd1[id].pcursor_pos] |= (1<<12);
424      change++;
425      break;
426
427      case 0x3B:   // dummy char
428      move++;
429      break;
430
431      case 0x3A:
432      bd1[id].user_def = 2;
433      break;
434
435      default:
436      move   = 1;
437      change = 1;
438   }
439
440   if ( move )
441   {
442      int mode = bd1[id].display_mode;
443
444      bd1[id].pcursor_pos = bd1[id].cursor_pos;
445
446      if ( bd1[id].window_size <= 0 || (bd1[id].window_size > 16))
447         { // no window selected default to rotate mode
448              if ( mode == 2 )      mode = 0;
449            else if ( mode == 3 ) mode = 1;
450            //mode &= -2;
451   }
452
453   switch ( mode )
454   {
455      case 0: // rotate left
456
457      bd1[id].cursor_pos &= 0x0F;
458
459      if ( change )
460      {
461         bd1[id].string[bd1[id].cursor_pos]   = BD1ASCII[data];
462         bd1[id].segments[bd1[id].cursor_pos] = segdata;
463      }
464      bd1[id].cursor_pos++;
465      if ( bd1[id].cursor_pos >= 16 ) bd1[id].cursor_pos = 0;
466      break;
467
468
469      case 1: // Rotate right
470
471      bd1[id].cursor_pos &= 0x0F;
472
473      if ( change )
474      {
475         bd1[id].string[bd1[id].cursor_pos]   = BD1ASCII[data];
476         bd1[id].segments[bd1[id].cursor_pos] = segdata;
477      }
478      bd1[id].cursor_pos--;
479      if ( bd1[id].cursor_pos < 0  ) bd1[id].cursor_pos = 15;
480      break;
481
482      case 2: // Scroll left
483
484      if ( bd1[id].cursor_pos < bd1[id].window_end )
485      {
486         bd1[id].scroll_active = 0;
487         if ( change )
488         {
489            bd1[id].string[bd1[id].cursor_pos]   = BD1ASCII[data];
490            bd1[id].segments[bd1[id].cursor_pos] = segdata;
491         }
492         if ( move ) bd1[id].cursor_pos++;
493      }
494      else
495      {
496         if ( move )
497         {
498            if   ( bd1[id].scroll_active ) ScrollLeft(id);
499            else                            bd1[id].scroll_active = 1;
500         }
501
502         if ( change )
503         {
504            bd1[id].string[bd1[id].window_end]   = BD1ASCII[data];
505            bd1[id].segments[bd1[id].cursor_pos] = segdata;
506           }
507         else
508         {
509            bd1[id].string[bd1[id].window_end]   = ' ';
510            bd1[id].segments[bd1[id].cursor_pos] = 0;
511         }
512      }
513      break;
514
515      case 3: // Scroll right
516
517      if ( bd1[id].cursor_pos > bd1[id].window_start )
518         {
519            if ( change )
520            {
521               bd1[id].string[bd1[id].cursor_pos]   = BD1ASCII[data];
522               bd1[id].segments[bd1[id].cursor_pos] = segdata;
523            }
524            bd1[id].cursor_pos--;
525         }
526         else
527         {
528            int i = bd1[id].window_end;
529
530            while ( i > bd1[id].window_start )
531            {
532               bd1[id].string[ i ] = bd1[id].string[ i-1 ];
533               bd1[id].segments[i] = bd1[id].segments[i-1];
534               i--;
535            }
536
537            if ( change )
538            {
539               bd1[id].string[bd1[id].window_start]   = BD1ASCII[data];
540               bd1[id].segments[bd1[id].window_start] = segdata;
541            }
542         }
543         break;
544      }
545   }
546   return change;
547}
548
549void bfm_bd1_draw(int id)
550{
551   int cursor;
552   bfm_bd1_set_outputs(id);
553
554   for (cursor = 0; cursor < 16; cursor++)
555   {
556      output_set_indexed_value("vfd", (id*16)+cursor, bfm_bd1_get_outputs(id)[cursor]);
557
558      if (bfm_bd1_get_outputs(id)[cursor] & 0x40000)
559      {
560         //activate flashing (unimplemented, just toggle on and off)
561      }
562      else
563      {
564         //deactivate flashing (unimplemented)
565      }
566   }
567}
src/mame/mamedriv.c
r778r779
599599   DRIVER( digdugat )   /* 136007   (c) 1982 Atari */
600600   DRIVER( digduga1 )   /* 136007   (c) 1982 Atari */
601601   DRIVER( dzigzag )   /* bootleg */
602   DRIVER( digsid )   /* bootleg */
602603   DRIVER( xevious )   /* (c) 1982 */
603604   DRIVER( xeviousa )   /* 136018   (c) 1982 + Atari license */
604605   DRIVER( xeviousb )   /* 136018   (c) 1982 + Atari license */
r778r779
14121413   DRIVER( gunforcu )   /* (c) 1991 Irem America (US) */
14131414   DRIVER( gunforcj )   /* (c) 1991 Irem (Japan) */
14141415   DRIVER( bmaster )   /* (c) 1991 Irem */
1416   DRIVER( crossbld )   /* (c) 1991 Irem (Japan) */
14151417   DRIVER( lethalth )   /* (c) 1991 Irem (World) */
14161418   DRIVER( thndblst )   /* (c) 1991 Irem (Japan) */
14171419   DRIVER( uccops )   /* (c) 1992 Irem (World) */
r778r779
28542856   DRIVER( fbaitmcj )   /* 1999 - Fisherman's Bait - Marlin Challenge (GX889 VER. JA) */
28552857   DRIVER( fbaitmca )   /* 1999 - Fisherman's Bait - Marlin Challenge (GX889 VER. AA) */
28562858   DRIVER( ddr2m )      /* 1999 - Dance Dance Revolution 2nd Mix (GN895 VER. JAA) */
2859   DRIVER( ddrbocd )   /* 1999 - Dance Dance Revolution Best of Cool Dancers (GE892 VER. JAA) */
28572860   DRIVER( ddr2ml )   /* 1999 - Dance Dance Revolution 2nd Mix - Link Ver (GE885 VER. JAA) */
28582861   DRIVER( ddr2mc )   /* 1999 - Dance Dance Revolution 2nd Mix with beatmaniaIIDX CLUB VERSiON (GE896 VER. JAA) */
28592862   DRIVER( ddr2mc2 )   /* 1999 - Dance Dance Revolution 2nd Mix with beatmaniaIIDX substream CLUB VERSiON 2 (GE984 VER. JAA) */
r778r779
31653168   DRIVER( congo )      /* 605-5167 (c) 1983 */
31663169   DRIVER( tiptop )   /* 605-5167 (c) 1983 */
31673170
3171   /* Sega "LaserDisc hardware" games */
3172   DRIVER( astron )   /* (c) 1983 */
3173   DRIVER( astronp )   /* (c) 1983 */
3174   DRIVER( galaxyr )   /* (c) 1983 */
3175   DRIVER( galaxyrp )  /* (c) 1983 */
3176   DRIVER( sblazerp )  /* (c) 1983 */
3177   DRIVER( cobraseg )  /* (c) ???? */
3178
31683179   /* Sega SG1000 based games */
31693180   DRIVER( chboxing )   /* (c) 1984 */
31703181   DRIVER( chwrestl )   /* (c) 1985 */
r778r779
56895700   DRIVER( wwfwfstb )   /* bootleg */
56905701   DRIVER( wwfwfstj )   /* TA-0031 (c) 1991 (Japan) */
56915702   DRIVER( shadfrce )   /* TA-0032 (c) 1993 (US) */
5703   DRIVER( shadfrcj )   /* TA-0032 (c) 1993 (Japan) */
56925704
56935705   /* Stern "Berzerk hardware" games */
56945706   DRIVER( berzerk )   /* (c) 1980 */
r778r779
65966608   DRIVER( powerins )   /* (c) 1993 Atlus (Japan) */
65976609   DRIVER( powerina )   /* (c) 1993 Atlus (Japan) */
65986610   DRIVER( powerinb )   /* (c) 1993 Atlus (Japan) */
6599   DRIVER( powernjb )   /* (c) 1993 Atlus (Japan) */
66006611   DRIVER( ohmygod )   /* (c) 1993 Atlus (Japan) */
66016612   DRIVER( naname )   /* (c) 1994 Atlus (Japan) */
66026613   DRIVER( blmbycar )   /* (c) 1994 ABM & Gecas - uses same gfx chip as powerins? */
src/mame/includes/twincobr.h
r778r779
3232WRITE8_HANDLER(   wardner_control_w );
3333WRITE8_HANDLER(   wardner_coin_dsp_w );
3434
35MACHINE_RESET( twincobr_reset );
35MACHINE_RESET( twincobr );
3636MACHINE_RESET( wardner );
3737
3838extern void twincobr_driver_savestate(void);
src/mame/includes/dc.h
r778r779
1/*
2
3   dc.h - Sega Dreamcast includes
4
5*/
6
7#ifndef __DC_H__
8#define __DC_H__
9
10/* machine/dc.c */
11READ64_HANDLER( dc_sysctrl_r );
12WRITE64_HANDLER( dc_sysctrl_w );
13READ64_HANDLER( dc_maple_r );
14WRITE64_HANDLER( dc_maple_w );
15READ64_HANDLER( dc_gdrom_r );
16WRITE64_HANDLER( dc_gdrom_w );
17READ64_HANDLER( dc_g1_ctrl_r );
18WRITE64_HANDLER( dc_g1_ctrl_w );
19READ64_HANDLER( dc_g2_ctrl_r );
20WRITE64_HANDLER( dc_g2_ctrl_w );
21READ64_HANDLER( dc_modem_r );
22WRITE64_HANDLER( dc_modem_w );
23READ64_HANDLER( dc_rtc_r );
24WRITE64_HANDLER( dc_rtc_w );
25READ64_HANDLER( dc_aica_reg_r );
26WRITE64_HANDLER( dc_aica_reg_w );
27
28MACHINE_RESET( dc );
29
30/* video/dc.c */
31READ64_HANDLER( pvr_ctrl_r );
32WRITE64_HANDLER( pvr_ctrl_w );
33READ64_HANDLER( pvr_ta_r );
34WRITE64_HANDLER( pvr_ta_w );
35WRITE64_HANDLER( ta_fifo_poly_w );
36WRITE64_HANDLER( ta_fifo_yuv_w );
37VIDEO_START(dc);
38VIDEO_UPDATE(dc);
39
40#endif
1/*
2 
3    dc.h - Sega Dreamcast includes
4 
5*/
6 
7#ifndef __DC_H__
8#define __DC_H__
9 
10/* machine/dc.c */
11READ64_HANDLER( dc_sysctrl_r );
12WRITE64_HANDLER( dc_sysctrl_w );
13READ64_HANDLER( dc_maple_r );
14WRITE64_HANDLER( dc_maple_w );
15READ64_HANDLER( dc_gdrom_r );
16WRITE64_HANDLER( dc_gdrom_w );
17READ64_HANDLER( dc_g1_ctrl_r );
18WRITE64_HANDLER( dc_g1_ctrl_w );
19READ64_HANDLER( dc_g2_ctrl_r );
20WRITE64_HANDLER( dc_g2_ctrl_w );
21READ64_HANDLER( dc_modem_r );
22WRITE64_HANDLER( dc_modem_w );
23READ64_HANDLER( dc_rtc_r );
24WRITE64_HANDLER( dc_rtc_w );
25READ64_HANDLER( dc_aica_reg_r );
26WRITE64_HANDLER( dc_aica_reg_w );
27 
28MACHINE_RESET( dc );
29 
30/* video/dc.c */
31READ64_HANDLER( pvr_ctrl_r );
32WRITE64_HANDLER( pvr_ctrl_w );
33READ64_HANDLER( pvr_ta_r );
34WRITE64_HANDLER( pvr_ta_w );
35WRITE64_HANDLER( ta_fifo_poly_w );
36WRITE64_HANDLER( ta_fifo_yuv_w );
37VIDEO_START(dc);
38VIDEO_UPDATE(dc);
39 
40#endif
src/mame/includes/tubep.h
r778r779
11/*----------- defined in video/tubep.c -----------*/
22
3VIDEO_EOF( tubep_eof );
3VIDEO_EOF( tubep );
44PALETTE_INIT( tubep );
55VIDEO_UPDATE( tubep );
66PALETTE_INIT( rjammer );
src/mame/mame.mak
r778r779
575575   $(MACHINE)/lamps.o \
576576   $(MACHINE)/mmtr.o \
577577   $(MACHINE)/steppers.o \
578   $(MACHINE)/vacfdisp.o \
578   $(MACHINE)/bfm_bd1.o \
579   $(MACHINE)/roc10937.o \
579580
580581$(MAMEOBJ)/capcom.a: \
581582   $(DRIVERS)/1942.o $(VIDEO)/1942.o \
r778r779
11691170   $(DRIVERS)/model1.o $(MACHINE)/model1.o $(VIDEO)/model1.o \
11701171   $(DRIVERS)/model2.o $(VIDEO)/model2.o \
11711172   $(DRIVERS)/model3.o $(VIDEO)/model3.o $(MACHINE)/model3.o \
1172   $(DRIVERS)/naomi.o \
1173   $(DRIVERS)/naomi.o $(MACHINE)/dc.o $(VIDEO)/dc.o \
11731174   $(DRIVERS)/puckpkmn.o \
11741175   $(DRIVERS)/segac2.o \
11751176   $(DRIVERS)/segag80r.o $(MACHINE)/segag80.o $(AUDIO)/segag80r.o $(VIDEO)/segag80r.o \
11761177   $(DRIVERS)/segag80v.o $(AUDIO)/segag80v.o $(VIDEO)/segag80v.o \
11771178   $(DRIVERS)/segahang.o $(VIDEO)/segahang.o \
1179   $(DRIVERS)/segald.o \
11781180   $(DRIVERS)/segaorun.o $(VIDEO)/segaorun.o \
11791181   $(DRIVERS)/segas16a.o $(VIDEO)/segas16a.o \
11801182   $(DRIVERS)/segas16b.o $(VIDEO)/segas16b.o \
src/mame/video/sbugger.c
r778r779
3030
3131VIDEO_START(sbugger)
3232{
33   sbugger_tilemap = tilemap_create(get_sbugger_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE, 8, 16,64,16);
33   sbugger_tilemap = tilemap_create(get_sbugger_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE, 8, 16,64,16);
3434}
3535
3636VIDEO_UPDATE(sbugger)
src/mame/video/targeth.c
r778r779
7676
7777VIDEO_START( targeth )
7878{
79   pant[0] = tilemap_create(get_tile_info_targeth_screen0,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,64,32);
80   pant[1] = tilemap_create(get_tile_info_targeth_screen1,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,64,32);
79   pant[0] = tilemap_create(get_tile_info_targeth_screen0,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,64,32);
80   pant[1] = tilemap_create(get_tile_info_targeth_screen1,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,64,32);
8181
8282   tilemap_set_transparent_pen(pant[0],0);
8383}
src/mame/video/nycaptor.c
r778r779
7070VIDEO_START( nycaptor )
7171{
7272  nycaptor_spriteram = auto_malloc (160);
73  bg_tilemap = tilemap_create( get_tile_info,tilemap_scan_rows,TILEMAP_SPLIT,8,8,32,32 );
73  bg_tilemap = tilemap_create( get_tile_info,tilemap_scan_rows,TILEMAP_TYPE_SPLIT,8,8,32,32 );
7474
7575  tilemap_set_transmask(bg_tilemap,0,0xf800,0x7ff); //split 0
7676  tilemap_set_transmask(bg_tilemap,1,0xfe00,0x01ff);//split 1
src/mame/video/mitchell.c
r778r779
5252   paletteram=NULL;
5353
5454
55   bg_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,64,32);
55   bg_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,64,32);
5656
5757   tilemap_set_transparent_pen(bg_tilemap,15);
5858
src/mame/video/xevious.c
r778r779
220220
221221VIDEO_START( xevious )
222222{
223   bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,     8,8,64,32);
224   fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,64,32);
223   bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,     8,8,64,32);
224   fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,64,32);
225225
226226   tilemap_set_scrolldx(bg_tilemap,-20,288+27);
227227   tilemap_set_scrolldy(bg_tilemap,-16,-16);
src/mame/video/blktiger.c
r778r779
7272{
7373   scroll_ram = auto_malloc(BGRAM_BANK_SIZE * BGRAM_BANKS);
7474
75   tx_tilemap =    tilemap_create(get_tx_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,32,32);
76   bg_tilemap8x4 = tilemap_create(get_bg_tile_info,bg8x4_scan,       TILEMAP_SPLIT,   16,16,128,64);
77   bg_tilemap4x8 = tilemap_create(get_bg_tile_info,bg4x8_scan,       TILEMAP_SPLIT,   16,16,64,128);
75   tx_tilemap =    tilemap_create(get_tx_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,32,32);
76   bg_tilemap8x4 = tilemap_create(get_bg_tile_info,bg8x4_scan,       TILEMAP_TYPE_SPLIT,   16,16,128,64);
77   bg_tilemap4x8 = tilemap_create(get_bg_tile_info,bg4x8_scan,       TILEMAP_TYPE_SPLIT,   16,16,64,128);
7878
7979   tilemap_set_transparent_pen(tx_tilemap,3);
8080
src/mame/video/dynduke.c
r778r779
1818   palette_set_color_rgb(Machine,offset/2,pal4bit(color >> 0),pal4bit(color >> 4),pal4bit(color >> 8));
1919
2020   /* This is a kludge to handle 5bpp graphics but 4bpp palette data */
21   /* the 5th bit is actually transparency, so I should use TILEMAP_BITMASK */
21   /* the 5th bit is actually transparency, so I should use TILEMAP_TYPE_BITMASK */
2222   if (offset<1024) {
2323      palette_set_color_rgb(Machine,((offset&0x1f)/2) | (offset&0xffe0) | 2048,pal4bit(color >> 0),pal4bit(color >> 4),pal4bit(color >> 8));
2424      palette_set_color_rgb(Machine,((offset&0x1f)/2) | (offset&0xffe0) | 2048 | 16,pal4bit(color >> 0),pal4bit(color >> 4),pal4bit(color >> 8));
r778r779
8585
8686VIDEO_START( dynduke )
8787{
88   bg_layer = tilemap_create(get_bg_tile_info,tilemap_scan_cols,TILEMAP_SPLIT,      16,16,32,32);
89   fg_layer = tilemap_create(get_fg_tile_info,tilemap_scan_cols,TILEMAP_TRANSPARENT,16,16,32,32);
90   tx_layer = tilemap_create(get_tx_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT, 8, 8,32,32);
88   bg_layer = tilemap_create(get_bg_tile_info,tilemap_scan_cols,TILEMAP_TYPE_SPLIT,      16,16,32,32);
89   fg_layer = tilemap_create(get_fg_tile_info,tilemap_scan_cols,TILEMAP_TYPE_TRANSPARENT,16,16,32,32);
90   tx_layer = tilemap_create(get_tx_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 8, 8,32,32);
9191
9292   tilemap_set_transmask(bg_layer,0,0x0000ffff,0xffff0000); /* 4bpp + The rest - 1bpp */
9393
src/mame/video/tunhunt.c
r778r779
8787   tmpbitmap = auto_bitmap_alloc( 256, 64, machine->screen[0].format );
8888
8989   fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_cols,
90      TILEMAP_TRANSPARENT, 8, 8, 32, 32);
90      TILEMAP_TYPE_TRANSPARENT, 8, 8, 32, 32);
9191
9292   tilemap_set_transparent_pen(fg_tilemap, 0);
9393   tilemap_set_scrollx(fg_tilemap, 0, 64);
src/mame/video/tryout.c
r778r779
173173
174174VIDEO_START( tryout )
175175{
176   fg_tilemap = tilemap_create(get_fg_tile_info,get_fg_memory_offset,TILEMAP_TRANSPARENT,8,8,32,32);
177   bg_tilemap = tilemap_create(get_bg_tile_info,get_bg_memory_offset,TILEMAP_OPAQUE,16,16,64,16);
176   fg_tilemap = tilemap_create(get_fg_tile_info,get_fg_memory_offset,TILEMAP_TYPE_TRANSPARENT,8,8,32,32);
177   bg_tilemap = tilemap_create(get_bg_tile_info,get_bg_memory_offset,TILEMAP_TYPE_OPAQUE,16,16,64,16);
178178
179179   tryout_vram=auto_malloc(8 * 0x800);
180180   tryout_vram_gfx=auto_malloc(0x6000);
src/mame/video/rungun.c
r778r779
9292   K053936_wraparound_enable(0, 0);
9393   K053936_set_offset(0, 34, 9);
9494
95   rng_936_tilemap = tilemap_create(get_rng_936_tile_info, tilemap_scan_rows, TILEMAP_TRANSPARENT, 16, 16, 128, 128);
95   rng_936_tilemap = tilemap_create(get_rng_936_tile_info, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 16, 16, 128, 128);
9696   tilemap_set_transparent_pen(rng_936_tilemap, 0);
9797
9898   /* find first empty slot to decode gfx */
r778r779
118118   }
119119
120120   // create the tilemap
121   ttl_tilemap = tilemap_create(ttl_get_tile_info, ttl_scan, TILEMAP_TRANSPARENT, 8, 8, 64, 32);
121   ttl_tilemap = tilemap_create(ttl_get_tile_info, ttl_scan, TILEMAP_TYPE_TRANSPARENT, 8, 8, 64, 32);
122122
123123   tilemap_set_transparent_pen(ttl_tilemap, 0);
124124
src/mame/video/madmotor.c
r778r779
113113
114114VIDEO_START( madmotor )
115115{
116   madmotor_pf1_tilemap = tilemap_create(get_pf1_tile_info, pf1_scan, TILEMAP_TRANSPARENT, 8, 8, 64,64);
117   madmotor_pf2_tilemap = tilemap_create(get_pf2_tile_info, pf2_scan, TILEMAP_TRANSPARENT,16,16, 32,32);
118   madmotor_pf3_tilemap = tilemap_create(get_pf3_tile_info, pf3_scan, TILEMAP_OPAQUE,     16,16, 32,64);
119   madmotor_pf3a_tilemap= tilemap_create(get_pf3a_tile_info,pf3a_scan,TILEMAP_OPAQUE,     16,16,128,16);
116   madmotor_pf1_tilemap = tilemap_create(get_pf1_tile_info, pf1_scan, TILEMAP_TYPE_TRANSPARENT, 8, 8, 64,64);
117   madmotor_pf2_tilemap = tilemap_create(get_pf2_tile_info, pf2_scan, TILEMAP_TYPE_TRANSPARENT,16,16, 32,32);
118   madmotor_pf3_tilemap = tilemap_create(get_pf3_tile_info, pf3_scan, TILEMAP_TYPE_OPAQUE,     16,16, 32,64);
119   madmotor_pf3a_tilemap= tilemap_create(get_pf3a_tile_info,pf3a_scan,TILEMAP_TYPE_OPAQUE,     16,16,128,16);
120120
121121   tilemap_set_transparent_pen(madmotor_pf1_tilemap,0);
122122   tilemap_set_transparent_pen(madmotor_pf2_tilemap,0);
src/mame/video/eprom.c
r778r779
8484   };
8585
8686   /* initialize the playfield */
87   atarigen_playfield_tilemap = tilemap_create(get_playfield_tile_info, tilemap_scan_cols, TILEMAP_OPAQUE, 8,8, 64,64);
87   atarigen_playfield_tilemap = tilemap_create(get_playfield_tile_info, tilemap_scan_cols, TILEMAP_TYPE_OPAQUE, 8,8, 64,64);
8888
8989   /* initialize the motion objects */
9090   atarimo_init(machine, 0, &modesc);
9191
9292   /* initialize the alphanumerics */
93   atarigen_alpha_tilemap = tilemap_create(get_alpha_tile_info, tilemap_scan_rows, TILEMAP_TRANSPARENT, 8,8, 64,32);
93   atarigen_alpha_tilemap = tilemap_create(get_alpha_tile_info, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 8,8, 64,32);
9494   tilemap_set_transparent_pen(atarigen_alpha_tilemap, 0);
9595}
9696
src/mame/video/rocnrope.c
r778r779
104104VIDEO_START( rocnrope )
105105{
106106   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows,
107      TILEMAP_OPAQUE, 8, 8, 32, 32);
107      TILEMAP_TYPE_OPAQUE, 8, 8, 32, 32);
108108}
109109
110110static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect )
src/mame/video/aerofgt.c
r778r779
9595
9696VIDEO_START( pspikes )
9797{
98   bg1_tilemap = tilemap_create(get_pspikes_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,8,8,64,32);
98   bg1_tilemap = tilemap_create(get_pspikes_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,8,8,64,32);
9999   /* no bg2 in this game */
100100
101101   sprite_gfx = 1;
r778r779
104104
105105VIDEO_START( karatblz )
106106{
107   bg1_tilemap = tilemap_create(karatblz_bg1_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,     8,8,64,64);
108   bg2_tilemap = tilemap_create(karatblz_bg2_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,64,64);
107   bg1_tilemap = tilemap_create(karatblz_bg1_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,     8,8,64,64);
108   bg2_tilemap = tilemap_create(karatblz_bg2_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,64,64);
109109
110110   tilemap_set_transparent_pen(bg2_tilemap,15);
111111
r778r779
118118{
119119   int i;
120120
121   bg1_tilemap = tilemap_create(spinlbrk_bg1_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,     8,8,64,64);
122   bg2_tilemap = tilemap_create(karatblz_bg2_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,64,64);
121   bg1_tilemap = tilemap_create(spinlbrk_bg1_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,     8,8,64,64);
122   bg2_tilemap = tilemap_create(karatblz_bg2_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,64,64);
123123
124124   tilemap_set_transparent_pen(bg2_tilemap,15);
125125
r778r779
143143
144144VIDEO_START( turbofrc )
145145{
146   bg1_tilemap = tilemap_create(get_bg1_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,     8,8,64,64);
147   bg2_tilemap = tilemap_create(get_bg2_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,64,64);
146   bg1_tilemap = tilemap_create(get_bg1_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,     8,8,64,64);
147   bg2_tilemap = tilemap_create(get_bg2_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,64,64);
148148
149149   tilemap_set_transparent_pen(bg2_tilemap,15);
150150
r778r779
155155
156156VIDEO_START( wbbc97 )
157157{
158   bg1_tilemap = tilemap_create(get_pspikes_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,64,32);
158   bg1_tilemap = tilemap_create(get_pspikes_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,64,32);
159159   /* no bg2 in this game */
160160
161161   tilemap_set_transparent_pen(bg1_tilemap,15);
src/mame/video/omegaf.c
r778r779
270270   videoram_alloc(machine, 0x2000);
271271
272272   /*                           Info               Offset             Type                 w   h  col  row */
273   fg_tilemap  = tilemap_create(get_fg_tile_info,  tilemap_scan_rows, TILEMAP_TRANSPARENT, 8,  8,  32, 32);
274   bg0_tilemap = tilemap_create(get_bg0_tile_info, tilemap_scan_rows, TILEMAP_TRANSPARENT, 16, 16, 128, 32);
275   bg1_tilemap = tilemap_create(get_bg1_tile_info, tilemap_scan_rows, TILEMAP_TRANSPARENT, 16, 16, 128, 32);
276   bg2_tilemap = tilemap_create(get_bg2_tile_info, tilemap_scan_rows, TILEMAP_TRANSPARENT, 16, 16, 128, 32);
273   fg_tilemap  = tilemap_create(get_fg_tile_info,  tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 8,  8,  32, 32);
274   bg0_tilemap = tilemap_create(get_bg0_tile_info, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 16, 16, 128, 32);
275   bg1_tilemap = tilemap_create(get_bg1_tile_info, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 16, 16, 128, 32);
276   bg2_tilemap = tilemap_create(get_bg2_tile_info, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 16, 16, 128, 32);
277277
278278   tilemap_set_transparent_pen( fg_tilemap,  15 );
279279   tilemap_set_transparent_pen( bg0_tilemap, 15 );
r778r779
289289   videoram_alloc(machine, 0x0800);
290290
291291   /*                           Info               Offset             Type                         w   h  col  row */
292   fg_tilemap  = tilemap_create(        get_fg_tile_info,  tilemap_scan_rows, TILEMAP_TRANSPARENT, 8,  8,  32, 32);
293   bg0_tilemap = tilemap_create(robokid_get_bg0_tile_info, tilemap_scan_rows, TILEMAP_OPAQUE,      16, 16, 32, 32);
294   bg1_tilemap = tilemap_create(robokid_get_bg1_tile_info, tilemap_scan_rows, TILEMAP_TRANSPARENT, 16, 16, 32, 32);
295   bg2_tilemap = tilemap_create(robokid_get_bg2_tile_info, tilemap_scan_rows, TILEMAP_TRANSPARENT, 16, 16, 32, 32);
292   fg_tilemap  = tilemap_create(        get_fg_tile_info,  tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 8,  8,  32, 32);
293   bg0_tilemap = tilemap_create(robokid_get_bg0_tile_info, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE,      16, 16, 32, 32);
294   bg1_tilemap = tilemap_create(robokid_get_bg1_tile_info, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 16, 16, 32, 32);
295   bg2_tilemap = tilemap_create(robokid_get_bg2_tile_info, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 16, 16, 32, 32);
296296
297297   tilemap_set_transparent_pen( fg_tilemap,  15 );
298298   tilemap_set_transparent_pen( bg1_tilemap, 15 );
src/mame/video/docastle.c
r778r779
197197VIDEO_START( docastle )
198198{
199199   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows,
200      TILEMAP_OPAQUE, 8, 8, 32, 32);
200      TILEMAP_TYPE_OPAQUE, 8, 8, 32, 32);
201201
202202   fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows,
203      TILEMAP_TRANSPARENT_COLOR, 8, 8, 32, 32);
203      TILEMAP_TYPE_TRANSPARENT_COLOR, 8, 8, 32, 32);
204204
205205   tilemap_set_transparent_pen(fg_tilemap, 256);
206206}
src/mame/video/mystston.c
r778r779
124124VIDEO_START( mystston )
125125{
126126   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_cols_flip_x,
127      TILEMAP_OPAQUE, 16, 16, 16, 32);
127      TILEMAP_TYPE_OPAQUE, 16, 16, 16, 32);
128128
129129   fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_cols_flip_x,
130      TILEMAP_TRANSPARENT, 8, 8, 32, 32);
130      TILEMAP_TYPE_TRANSPARENT, 8, 8, 32, 32);
131131
132132   tilemap_set_transparent_pen(fg_tilemap, 0);
133133}
src/mame/video/mainsnk.c
r778r779
104104   old_bg_color = -1;
105105   stuff_palette( machine, 0, 0, 16*8 );
106106   stuff_palette( machine, 16*8*3, 16*8, 16*8 );
107   me_fg_tilemap = tilemap_create(get_me_fg_tile_info,tilemap_scan_cols,TILEMAP_TRANSPARENT,8,8,32, 32);
107   me_fg_tilemap = tilemap_create(get_me_fg_tile_info,tilemap_scan_cols,TILEMAP_TYPE_TRANSPARENT,8,8,32, 32);
108108   tilemap_set_transparent_pen(me_fg_tilemap,15);
109   me_bg_tilemap = tilemap_create(get_me_bg_tile_info,tilemap_scan_cols,TILEMAP_OPAQUE,8,8,32, 32);
109   me_bg_tilemap = tilemap_create(get_me_bg_tile_info,tilemap_scan_cols,TILEMAP_TYPE_OPAQUE,8,8,32, 32);
110110   tilemap_set_scrollx( me_fg_tilemap, 0, -mainsnk_offset );
111111   tilemap_set_scrollx( me_bg_tilemap, 0, -mainsnk_offset );
112112}
src/mame/video/ygv608.c
r778r779
508508   namcond1_gfxbank = 0;
509509
510510   /* create tilemaps of all sizes and combinations */
511   tilemap_A_cache_8[0] = tilemap_create(get_tile_info_A_8, get_tile_offset, TILEMAP_TRANSPARENT, 8,8, 32,32);
512   tilemap_A_cache_8[1] = tilemap_create(get_tile_info_A_8, get_tile_offset, TILEMAP_TRANSPARENT, 8,8, 64,32);
513   tilemap_A_cache_8[2] = tilemap_create(get_tile_info_A_8, get_tile_offset, TILEMAP_TRANSPARENT, 8,8, 32,64);
511   tilemap_A_cache_8[0] = tilemap_create(get_tile_info_A_8, get_tile_offset, TILEMAP_TYPE_TRANSPARENT, 8,8, 32,32);
512   tilemap_A_cache_8[1] = tilemap_create(get_tile_info_A_8, get_tile_offset, TILEMAP_TYPE_TRANSPARENT, 8,8, 64,32);
513   tilemap_A_cache_8[2] = tilemap_create(get_tile_info_A_8, get_tile_offset, TILEMAP_TYPE_TRANSPARENT, 8,8, 32,64);
514514
515   tilemap_A_cache_16[0] = tilemap_create(get_tile_info_A_16, get_tile_offset, TILEMAP_TRANSPARENT, 16,16, 32,32);
516   tilemap_A_cache_16[1] = tilemap_create(get_tile_info_A_16, get_tile_offset, TILEMAP_TRANSPARENT, 16,16, 64,32);
517   tilemap_A_cache_16[2] = tilemap_create(get_tile_info_A_16, get_tile_offset, TILEMAP_TRANSPARENT, 16,16, 32,64);
515   tilemap_A_cache_16[0] = tilemap_create(get_tile_info_A_16, get_tile_offset, TILEMAP_TYPE_TRANSPARENT, 16,16, 32,32);
516   tilemap_A_cache_16[1] = tilemap_create(get_tile_info_A_16, get_tile_offset, TILEMAP_TYPE_TRANSPARENT, 16,16, 64,32);
517   tilemap_A_cache_16[2] = tilemap_create(get_tile_info_A_16, get_tile_offset, TILEMAP_TYPE_TRANSPARENT, 16,16, 32,64);
518518
519   tilemap_B_cache_8[0] = tilemap_create(get_tile_info_B_8, get_tile_offset, TILEMAP_TRANSPARENT, 8,8, 32,32);
520   tilemap_B_cache_8[1] = tilemap_create(get_tile_info_B_8, get_tile_offset, TILEMAP_TRANSPARENT, 8,8, 64,32);
521   tilemap_B_cache_8[2] = tilemap_create(get_tile_info_B_8, get_tile_offset, TILEMAP_TRANSPARENT, 8,8, 32,64);
519   tilemap_B_cache_8[0] = tilemap_create(get_tile_info_B_8, get_tile_offset, TILEMAP_TYPE_TRANSPARENT, 8,8, 32,32);
520   tilemap_B_cache_8[1] = tilemap_create(get_tile_info_B_8, get_tile_offset, TILEMAP_TYPE_TRANSPARENT, 8,8, 64,32);
521   tilemap_B_cache_8[2] = tilemap_create(get_tile_info_B_8, get_tile_offset, TILEMAP_TYPE_TRANSPARENT, 8,8, 32,64);
522522
523   tilemap_B_cache_16[0] = tilemap_create(get_tile_info_B_16, get_tile_offset, TILEMAP_TRANSPARENT, 16,16, 32,32);
524   tilemap_B_cache_16[1] = tilemap_create(get_tile_info_B_16, get_tile_offset, TILEMAP_TRANSPARENT, 16,16, 64,32);
525   tilemap_B_cache_16[2] = tilemap_create(get_tile_info_B_16, get_tile_offset, TILEMAP_TRANSPARENT, 16,16, 32,64);
523   tilemap_B_cache_16[0] = tilemap_create(get_tile_info_B_16, get_tile_offset, TILEMAP_TYPE_TRANSPARENT, 16,16, 32,32);
524   tilemap_B_cache_16[1] = tilemap_create(get_tile_info_B_16, get_tile_offset, TILEMAP_TYPE_TRANSPARENT, 16,16, 64,32);
525   tilemap_B_cache_16[2] = tilemap_create(get_tile_info_B_16, get_tile_offset, TILEMAP_TYPE_TRANSPARENT, 16,16, 32,64);
526526
527527   tilemap_A = NULL;
528528   tilemap_B = NULL;
src/mame/video/senjyo.c
r778r779
118118
119119VIDEO_START( senjyo )
120120{
121   fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,32,32);
121   fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,32,32);
122122
123123   if (senjyo)
124124   {
125      bg1_tilemap = tilemap_create(senjyo_bg1_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,16,32);
126      bg2_tilemap = tilemap_create(get_bg2_tile_info,   tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,16,48);   /* only 16x32 used by Star Force */
127      bg3_tilemap = tilemap_create(get_bg3_tile_info,   tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,16,56);   /* only 16x32 used by Star Force */
125      bg1_tilemap = tilemap_create(senjyo_bg1_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,16,32);
126      bg2_tilemap = tilemap_create(get_bg2_tile_info,   tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,16,48);   /* only 16x32 used by Star Force */
127      bg3_tilemap = tilemap_create(get_bg3_tile_info,   tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,16,56);   /* only 16x32 used by Star Force */
128128   }
129129   else
130130   {
131      bg1_tilemap = tilemap_create(starforc_bg1_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,16,32);
132      bg2_tilemap = tilemap_create(get_bg2_tile_info,     tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,16,32);   /* only 16x32 used by Star Force */
133      bg3_tilemap = tilemap_create(get_bg3_tile_info,     tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,16,32);   /* only 16x32 used by Star Force */
131      bg1_tilemap = tilemap_create(starforc_bg1_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,16,32);
132      bg2_tilemap = tilemap_create(get_bg2_tile_info,     tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,16,32);   /* only 16x32 used by Star Force */
133      bg3_tilemap = tilemap_create(get_bg3_tile_info,     tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,16,32);   /* only 16x32 used by Star Force */
134134   }
135135
136136   tilemap_set_transparent_pen(fg_tilemap,0);
src/mame/video/yiear.c
r778r779
105105VIDEO_START( yiear )
106106{
107107   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows,
108      TILEMAP_OPAQUE, 8, 8, 32, 32);
108      TILEMAP_TYPE_OPAQUE, 8, 8, 32, 32);
109109}
110110
111111static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect)
src/mame/video/sonson.c
r778r779
128128VIDEO_START( sonson )
129129{
130130   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows,
131      TILEMAP_OPAQUE, 8, 8, 32, 32);
131      TILEMAP_TYPE_OPAQUE, 8, 8, 32, 32);
132132
133133   tilemap_set_scroll_rows(bg_tilemap, 32);
134134}
src/mame/video/sslam.c
r778r779
142142
143143VIDEO_START(sslam)
144144{
145   sslam_bg_tilemap = tilemap_create(get_sslam_bg_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,16,16,32,32);
146   sslam_md_tilemap = tilemap_create(get_sslam_md_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,32,32);
147   sslam_tx_tilemap = tilemap_create(get_sslam_tx_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,64,64);
145   sslam_bg_tilemap = tilemap_create(get_sslam_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,16,16,32,32);
146   sslam_md_tilemap = tilemap_create(get_sslam_md_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,32,32);
147   sslam_tx_tilemap = tilemap_create(get_sslam_tx_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,64,64);
148148
149149   tilemap_set_transparent_pen(sslam_md_tilemap,0);
150150   tilemap_set_transparent_pen(sslam_tx_tilemap,0);
r778r779
155155
156156VIDEO_START(powerbls)
157157{
158   sslam_bg_tilemap = tilemap_create(get_powerbls_bg_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,8,8,64,64);
158   sslam_bg_tilemap = tilemap_create(get_powerbls_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,8,8,64,64);
159159
160160   sprites_x_offset = -21;
161161   state_save_register_global(sprites_x_offset);
src/mame/video/hcastle.c
r778r779
108108
109109VIDEO_START( hcastle )
110110{
111   fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan,TILEMAP_TRANSPARENT,8,8,64,32);
112   bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan,TILEMAP_OPAQUE,     8,8,64,32);
111   fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan,TILEMAP_TYPE_TRANSPARENT,8,8,64,32);
112   bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan,TILEMAP_TYPE_OPAQUE,     8,8,64,32);
113113
114114   tilemap_set_transparent_pen(fg_tilemap,0);
115115}
src/mame/video/deadang.c
r778r779
6969
7070VIDEO_START( deadang )
7171{
72   pf3_layer = tilemap_create(get_pf3_tile_info,bg_scan,          TILEMAP_OPAQUE,     16,16,128,256);
73   pf2_layer = tilemap_create(get_pf2_tile_info,bg_scan,          TILEMAP_TRANSPARENT,16,16,128,256);
74   pf1_layer = tilemap_create(get_pf1_tile_info,tilemap_scan_cols,TILEMAP_TRANSPARENT,16,16, 32, 32);
75   text_layer = tilemap_create(get_text_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT, 8, 8, 32, 32);
72   pf3_layer = tilemap_create(get_pf3_tile_info,bg_scan,          TILEMAP_TYPE_OPAQUE,     16,16,128,256);
73   pf2_layer = tilemap_create(get_pf2_tile_info,bg_scan,          TILEMAP_TYPE_TRANSPARENT,16,16,128,256);
74   pf1_layer = tilemap_create(get_pf1_tile_info,tilemap_scan_cols,TILEMAP_TYPE_TRANSPARENT,16,16, 32, 32);
75   text_layer = tilemap_create(get_text_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 8, 8, 32, 32);
7676
7777   tilemap_set_transparent_pen(pf2_layer, 15);
7878   tilemap_set_transparent_pen(pf1_layer, 15);
src/mame/video/twincobr.c
r778r779
103103
104104static void twincobr_create_tilemaps(void)
105105{
106   bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,64,64);
107   fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,64,64);
108   tx_tilemap = tilemap_create(get_tx_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,64,32);
106   bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,64,64);
107   fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,64,64);
108   tx_tilemap = tilemap_create(get_tx_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,64,32);
109109
110110   tilemap_set_transparent_pen(fg_tilemap,0);
111111   tilemap_set_transparent_pen(tx_tilemap,0);
src/mame/video/hexion.c
r778r779
4343
4444VIDEO_START( hexion )
4545{
46   bg_tilemap[0] = tilemap_create(get_tile_info0,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,64,32);
47   bg_tilemap[1] = tilemap_create(get_tile_info1,tilemap_scan_rows,TILEMAP_OPAQUE,     8,8,64,32);
46   bg_tilemap[0] = tilemap_create(get_tile_info0,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,64,32);
47   bg_tilemap[1] = tilemap_create(get_tile_info1,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,     8,8,64,32);
4848
4949   tilemap_set_transparent_pen(bg_tilemap[0],0);
5050   tilemap_set_scrollx(bg_tilemap[1],0,-4);
src/mame/video/labyrunr.c
r778r779
9494
9595VIDEO_START( labyrunr )
9696{
97   layer0 = tilemap_create(get_tile_info0,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,32,32);
98   layer1 = tilemap_create(get_tile_info1,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,32,32);
97   layer0 = tilemap_create(get_tile_info0,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,32,32);
98   layer1 = tilemap_create(get_tile_info1,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,32,32);
9999
100100   tilemap_set_transparent_pen(layer0,0);
101101   tilemap_set_transparent_pen(layer1,0);
src/mame/video/ddragon3.c
r778r779
9494    state_save_register_global(ddragon3_bg_tilebase);
9595
9696    bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows,
97      TILEMAP_TRANSPARENT, 16, 16, 32, 32);
97      TILEMAP_TYPE_TRANSPARENT, 16, 16, 32, 32);
9898
9999   fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows,
100      TILEMAP_TRANSPARENT, 16, 16, 32, 32);
100      TILEMAP_TYPE_TRANSPARENT, 16, 16, 32, 32);
101101
102102   tilemap_set_transparent_pen(bg_tilemap, 0);
103103   tilemap_set_transparent_pen(fg_tilemap, 0);
src/mame/video/sprint2.c
r778r779
2727{
2828   helper = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format);
2929
30   bg_tilemap = tilemap_create(get_tile_info, tilemap_scan_rows, TILEMAP_OPAQUE, 16, 8, 32, 32);
30   bg_tilemap = tilemap_create(get_tile_info, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE, 16, 8, 32, 32);
3131}
3232
3333
src/mame/video/dragrace.c
r778r779
5656VIDEO_START( dragrace )
5757{
5858   bg_tilemap = tilemap_create(
59      get_tile_info, get_memory_offset, TILEMAP_OPAQUE, 16, 16, 16, 16);
59      get_tile_info, get_memory_offset, TILEMAP_TYPE_OPAQUE, 16, 16, 16, 16);
6060}
6161
6262
src/mame/video/seibuspi.c
r778r779
479479   int i;
480480   int region_length;
481481
482   text_layer   = tilemap_create( get_text_tile_info, tilemap_scan_rows, TILEMAP_TRANSPARENT, 8,8,64,32 );
483   back_layer   = tilemap_create( get_back_tile_info, tilemap_scan_cols, TILEMAP_OPAQUE, 16,16,32,32 );
484   mid_layer   = tilemap_create( get_mid_tile_info, tilemap_scan_cols, TILEMAP_TRANSPARENT, 16,16,32,32 );
485   fore_layer   = tilemap_create( get_fore_tile_info, tilemap_scan_cols, TILEMAP_TRANSPARENT, 16,16,32,32 );
482   text_layer   = tilemap_create( get_text_tile_info, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 8,8,64,32 );
483   back_layer   = tilemap_create( get_back_tile_info, tilemap_scan_cols, TILEMAP_TYPE_OPAQUE, 16,16,32,32 );
484   mid_layer   = tilemap_create( get_mid_tile_info, tilemap_scan_cols, TILEMAP_TYPE_TRANSPARENT, 16,16,32,32 );
485   fore_layer   = tilemap_create( get_fore_tile_info, tilemap_scan_cols, TILEMAP_TYPE_TRANSPARENT, 16,16,32,32 );
486486
487487   tilemap_set_transparent_pen(text_layer, 31);
488488   tilemap_set_transparent_pen(mid_layer, 63);
src/mame/video/sauro.c
r778r779
8585VIDEO_START( sauro )
8686{
8787   bg_tilemap = tilemap_create(get_tile_info_bg, tilemap_scan_cols,
88      TILEMAP_OPAQUE, 8, 8, 32, 32);
88      TILEMAP_TYPE_OPAQUE, 8, 8, 32, 32);
8989
9090   fg_tilemap = tilemap_create(get_tile_info_fg, tilemap_scan_cols,
91      TILEMAP_TRANSPARENT, 8, 8, 32, 32);
91      TILEMAP_TYPE_TRANSPARENT, 8, 8, 32, 32);
9292
9393   tilemap_set_transparent_pen(fg_tilemap, 0);
9494}
r778r779
157157VIDEO_START( trckydoc )
158158{
159159   bg_tilemap = tilemap_create(get_tile_info_bg, tilemap_scan_cols,
160      TILEMAP_OPAQUE, 8, 8, 32, 32);
160      TILEMAP_TYPE_OPAQUE, 8, 8, 32, 32);
161161}
162162
163163static void trckydoc_draw_sprites(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect)
src/mame/video/gaplus.c
r778r779
196196
197197VIDEO_START( gaplus )
198198{
199   bg_tilemap = tilemap_create(get_tile_info,tilemap_scan,TILEMAP_TRANSPARENT_COLOR,8,8,36,28);
199   bg_tilemap = tilemap_create(get_tile_info,tilemap_scan,TILEMAP_TYPE_TRANSPARENT_COLOR,8,8,36,28);
200200
201201   tilemap_set_transparent_pen(bg_tilemap, 0xff);
202202
src/mame/video/drmicro.c
r778r779
103103{
104104   drmicro_videoram = auto_malloc(0x1000);
105105
106   drmicro_bg1 = tilemap_create(get_bg1_tile_info, tilemap_scan_rows,TILEMAP_OPAQUE, 8,8,32,32);
107   drmicro_bg2 = tilemap_create(get_bg2_tile_info, tilemap_scan_rows,TILEMAP_TRANSPARENT, 8,8,32,32);
106   drmicro_bg1 = tilemap_create(get_bg1_tile_info, tilemap_scan_rows,TILEMAP_TYPE_OPAQUE, 8,8,32,32);
107   drmicro_bg2 = tilemap_create(get_bg2_tile_info, tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 8,8,32,32);
108108
109109   tilemap_set_transparent_pen(drmicro_bg2,0);
110110}
src/mame/video/speedatk.c
r778r779
9999
100100VIDEO_START( speedatk )
101101{
102   bg_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,8,8,34,32);
102   bg_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,8,8,34,32);
103103}
104104
105105VIDEO_UPDATE( speedatk )
src/mame/video/powerins.c
r778r779
199199{
200200   tilemap_0 = tilemap_create(   get_tile_info_0,
201201                        powerins_get_memory_offset_0,
202                        TILEMAP_OPAQUE,
202                        TILEMAP_TYPE_OPAQUE,
203203                        16,16,
204204                        DIM_NX_0, DIM_NY_0 );
205205
206206   tilemap_1 = tilemap_create(   get_tile_info_1,
207207                        tilemap_scan_cols,
208                        TILEMAP_TRANSPARENT,
208                        TILEMAP_TYPE_TRANSPARENT,
209209                        8,8,
210210                        DIM_NX_1, DIM_NY_1 );
211211
src/mame/video/exedexes.c
r778r779
175175VIDEO_START( exedexes )
176176{
177177   bg_tilemap = tilemap_create(get_bg_tile_info, exedexes_bg_tilemap_scan,
178      TILEMAP_OPAQUE, 32, 32, 64, 64);
178      TILEMAP_TYPE_OPAQUE, 32, 32, 64, 64);
179179
180180   fg_tilemap = tilemap_create(get_fg_tile_info, exedexes_fg_tilemap_scan,
181      TILEMAP_TRANSPARENT, 16, 16, 128, 128);
181      TILEMAP_TYPE_TRANSPARENT, 16, 16, 128, 128);
182182
183183   tx_tilemap = tilemap_create(get_tx_tile_info, tilemap_scan_rows,
184      TILEMAP_TRANSPARENT_COLOR, 8, 8, 32, 32);
184      TILEMAP_TYPE_TRANSPARENT_COLOR, 8, 8, 32, 32);
185185
186186   tilemap_set_transparent_pen(fg_tilemap, 0);
187187   tilemap_set_transparent_pen(tx_tilemap, 207);
src/mame/video/suprnova.c
r778r779
755755
756756VIDEO_START(skns)
757757{
758   skns_tilemap_A = tilemap_create(get_tilemap_A_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,64, 64);
758   skns_tilemap_A = tilemap_create(get_tilemap_A_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,64, 64);
759759      tilemap_set_transparent_pen(skns_tilemap_A,0);
760760
761   skns_tilemap_B = tilemap_create(get_tilemap_B_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,64, 64);
761   skns_tilemap_B = tilemap_create(get_tilemap_B_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,64, 64);
762762      tilemap_set_transparent_pen(skns_tilemap_B,0);
763763
764764   machine->gfx[2]->color_granularity=256;
src/mame/video/flkatck.c
r778r779
7272
7373VIDEO_START( flkatck )
7474{
75   k007121_tilemap[0] = tilemap_create(get_tile_info_A,tilemap_scan_rows,TILEMAP_OPAQUE,8,8,32,32);
76   k007121_tilemap[1] = tilemap_create(get_tile_info_B,tilemap_scan_rows,TILEMAP_OPAQUE,8,8,32,32);
75   k007121_tilemap[0] = tilemap_create(get_tile_info_A,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,8,8,32,32);
76   k007121_tilemap[1] = tilemap_create(get_tile_info_B,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,8,8,32,32);
7777
7878   k007121_clip[0] = machine->screen[0].visarea;
7979   k007121_clip[0].min_x += 40;
src/mame/video/shootout.c
r778r779
7272}
7373
7474VIDEO_START( shootout ){
75   background = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,8,8,32,32);
76   foreground = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,32,32);
75   background = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,8,8,32,32);
76   foreground = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,32,32);
7777      tilemap_set_transparent_pen( foreground, 0 );
7878}
7979
src/mame/video/contra.c
r778r779
137137
138138VIDEO_START( contra )
139139{
140   bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,     8,8,32,32);
141   fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,32,32);
142   tx_tilemap = tilemap_create(get_tx_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,     8,8,32,32);
140   bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,     8,8,32,32);
141   fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,32,32);
142   tx_tilemap = tilemap_create(get_tx_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,     8,8,32,32);
143143
144144   private_spriteram = auto_malloc(0x800);
145145   private_spriteram_2 = auto_malloc(0x800);
src/mame/video/paradise.c
r778r779
155155VIDEO_START( paradise )
156156{
157157   tilemap_0 = tilemap_create(   get_tile_info_0, tilemap_scan_rows,
158                        TILEMAP_TRANSPARENT, 8,8, 0x20,0x20 );
158                        TILEMAP_TYPE_TRANSPARENT, 8,8, 0x20,0x20 );
159159
160160   tilemap_1 = tilemap_create(   get_tile_info_1, tilemap_scan_rows,
161                        TILEMAP_TRANSPARENT, 8,8, 0x20,0x20 );
161                        TILEMAP_TYPE_TRANSPARENT, 8,8, 0x20,0x20 );
162162
163163   tilemap_2 = tilemap_create(   get_tile_info_2, tilemap_scan_rows,
164                        TILEMAP_TRANSPARENT, 8,8, 0x20,0x20 );
164                        TILEMAP_TYPE_TRANSPARENT, 8,8, 0x20,0x20 );
165165
166166   /* pixmap */
167167   tmpbitmap = auto_bitmap_alloc(machine->screen[0].width,machine->screen[0].height,machine->screen[0].format);
src/mame/video/chaknpop.c
r778r779
176176   UINT8 *RAM = memory_region(REGION_CPU1);
177177
178178   /*                          info                       offset             type             w   h  col row */
179   tx_tilemap = tilemap_create(chaknpop_get_tx_tile_info, tilemap_scan_rows, TILEMAP_OPAQUE,  8,  8, 32, 32);
179   tx_tilemap = tilemap_create(chaknpop_get_tx_tile_info, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE,  8,  8, 32, 32);
180180
181181   tilemap_set_transparent_pen(tx_tilemap, 0);
182182
src/mame/video/fitfight.c
r778r779
101101
102102VIDEO_START(fitfight)
103103{
104   fof_bak_tilemap = tilemap_create(get_fof_bak_tile_info,tilemap_scan_cols,TILEMAP_OPAQUE,8,8,128, 32);
104   fof_bak_tilemap = tilemap_create(get_fof_bak_tile_info,tilemap_scan_cols,TILEMAP_TYPE_OPAQUE,8,8,128, 32);
105105   /* opaque */
106106
107   fof_mid_tilemap = tilemap_create(get_fof_mid_tile_info,tilemap_scan_cols,TILEMAP_TRANSPARENT,8,8,128, 32);
107   fof_mid_tilemap = tilemap_create(get_fof_mid_tile_info,tilemap_scan_cols,TILEMAP_TYPE_TRANSPARENT,8,8,128, 32);
108108   tilemap_set_transparent_pen(fof_mid_tilemap,0);
109109
110   fof_txt_tilemap = tilemap_create(get_fof_txt_tile_info,tilemap_scan_cols,TILEMAP_TRANSPARENT,8,8,128, 32);
110   fof_txt_tilemap = tilemap_create(get_fof_txt_tile_info,tilemap_scan_cols,TILEMAP_TYPE_TRANSPARENT,8,8,128, 32);
111111   tilemap_set_transparent_pen(fof_txt_tilemap,0);
112112}
113113
src/mame/video/ashnojoe.c
r778r779
185185
186186VIDEO_START( ashnojoe )
187187{
188   joetilemap  =  tilemap_create(get_joe_tile_info,  tilemap_scan_rows,TILEMAP_TRANSPARENT, 8, 8,64,32);
189   joetilemap2 =  tilemap_create(get_joe_tile_info_2,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,32,32);
190   joetilemap3 =  tilemap_create(get_joe_tile_info_3,tilemap_scan_rows,TILEMAP_TRANSPARENT, 8, 8,64,64);
191   joetilemap4 =  tilemap_create(get_joe_tile_info_4,tilemap_scan_rows,TILEMAP_TRANSPARENT, 8, 8,64,64);
192   joetilemap5 =  tilemap_create(get_joe_tile_info_5,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,32,32);
193   joetilemap6 =  tilemap_create(get_joe_tile_info_6,tilemap_scan_rows,TILEMAP_OPAQUE,      16,16,32,32);
194   joetilemap7 =  tilemap_create(get_joe_tile_info_7,tilemap_scan_rows,TILEMAP_OPAQUE,      16,16,32,32);
188   joetilemap  =  tilemap_create(get_joe_tile_info,  tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 8, 8,64,32);
189   joetilemap2 =  tilemap_create(get_joe_tile_info_2,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,32,32);
190   joetilemap3 =  tilemap_create(get_joe_tile_info_3,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 8, 8,64,64);
191   joetilemap4 =  tilemap_create(get_joe_tile_info_4,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 8, 8,64,64);
192   joetilemap5 =  tilemap_create(get_joe_tile_info_5,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,32,32);
193   joetilemap6 =  tilemap_create(get_joe_tile_info_6,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,      16,16,32,32);
194   joetilemap7 =  tilemap_create(get_joe_tile_info_7,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,      16,16,32,32);
195195
196196   tilemap_set_transparent_pen(joetilemap, 15);
197197   tilemap_set_transparent_pen(joetilemap2,15);
src/mame/video/terracre.c
r778r779
199199
200200VIDEO_START( amazon )
201201{
202   background = tilemap_create(get_bg_tile_info,tilemap_scan_cols,TILEMAP_OPAQUE,16,16,64,32);
203   foreground = tilemap_create(get_fg_tile_info,tilemap_scan_cols,TILEMAP_TRANSPARENT,8,8,64,32);
202   background = tilemap_create(get_bg_tile_info,tilemap_scan_cols,TILEMAP_TYPE_OPAQUE,16,16,64,32);
203   foreground = tilemap_create(get_fg_tile_info,tilemap_scan_cols,TILEMAP_TYPE_TRANSPARENT,8,8,64,32);
204204      tilemap_set_transparent_pen(foreground,0xf);
205205
206206   /* register for saving */
src/mame/video/deco32.c
r778r779
948948
949949VIDEO_START( captaven )
950950{
951   pf1_tilemap = tilemap_create(get_pf1_tile_info,    tilemap_scan_rows,TILEMAP_TRANSPARENT, 8, 8,64,32);
952   pf1a_tilemap =tilemap_create(get_pf1a_tile_info,   deco16_scan_rows,TILEMAP_TRANSPARENT,16,16,64,32);
953   pf2_tilemap = tilemap_create(get_pf2_tile_info,    deco16_scan_rows,TILEMAP_TRANSPARENT,16,16,64,32);
954   pf3_tilemap = tilemap_create(get_ca_pf3_tile_info, tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,32,32);
951   pf1_tilemap = tilemap_create(get_pf1_tile_info,    tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 8, 8,64,32);
952   pf1a_tilemap =tilemap_create(get_pf1a_tile_info,   deco16_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,64,32);
953   pf2_tilemap = tilemap_create(get_pf2_tile_info,    deco16_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,64,32);
954   pf3_tilemap = tilemap_create(get_ca_pf3_tile_info, tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,32,32);
955955   deco32_raster_display_list=auto_malloc(10 * 256);
956956   memset(deco32_raster_display_list, 0, 10 * 256);
957957
r778r779
967967
968968VIDEO_START( fghthist )
969969{
970   pf1_tilemap = tilemap_create(get_pf1_tile_info, tilemap_scan_rows,TILEMAP_TRANSPARENT, 8, 8,64,32);
971   pf2_tilemap = tilemap_create(get_pf2_tile_info, deco16_scan_rows,TILEMAP_TRANSPARENT,16,16,64,32);
972   pf3_tilemap = tilemap_create(get_pf3_tile_info, deco16_scan_rows,TILEMAP_TRANSPARENT,16,16,64,32);
973   pf4_tilemap = tilemap_create(get_pf4_tile_info, deco16_scan_rows,TILEMAP_OPAQUE,     16,16,64,32);
970   pf1_tilemap = tilemap_create(get_pf1_tile_info, tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 8, 8,64,32);
971   pf2_tilemap = tilemap_create(get_pf2_tile_info, deco16_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,64,32);
972   pf3_tilemap = tilemap_create(get_pf3_tile_info, deco16_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,64,32);
973   pf4_tilemap = tilemap_create(get_pf4_tile_info, deco16_scan_rows,TILEMAP_TYPE_OPAQUE,     16,16,64,32);
974974   pf1a_tilemap =0;
975975   dirty_palette = auto_malloc(4096);
976976
r778r779
988988
989989VIDEO_START( dragngun )
990990{
991   pf1_tilemap = tilemap_create(get_pf1_tile_info,    tilemap_scan_rows,TILEMAP_TRANSPARENT, 8, 8,64,32);
992   pf2_tilemap = tilemap_create(get_pf2_tile_info,    deco16_scan_rows,TILEMAP_TRANSPARENT,16,16,64,32);
993   pf3_tilemap = tilemap_create(get_ll_pf3_tile_info, deco16_scan_rows,TILEMAP_TRANSPARENT,16,16,64,32);
994   pf4_tilemap = tilemap_create(get_ll_pf4_tile_info, deco16_scan_rows,TILEMAP_OPAQUE,     16,16,64,32);
995   pf1a_tilemap =tilemap_create(get_pf1a_tile_info,   deco16_scan_rows,TILEMAP_TRANSPARENT,16,16,64,32);
991   pf1_tilemap = tilemap_create(get_pf1_tile_info,    tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 8, 8,64,32);
992   pf2_tilemap = tilemap_create(get_pf2_tile_info,    deco16_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,64,32);
993   pf3_tilemap = tilemap_create(get_ll_pf3_tile_info, deco16_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,64,32);
994   pf4_tilemap = tilemap_create(get_ll_pf4_tile_info, deco16_scan_rows,TILEMAP_TYPE_OPAQUE,     16,16,64,32);
995   pf1a_tilemap =tilemap_create(get_pf1a_tile_info,   deco16_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,64,32);
996996   dirty_palette = auto_malloc(4096);
997997   deco32_raster_display_list = auto_malloc(10 * 256);
998998
r778r779
10111011
10121012VIDEO_START( lockload )
10131013{
1014   pf1_tilemap = tilemap_create(get_pf1_tile_info,    tilemap_scan_rows,TILEMAP_TRANSPARENT, 8, 8,64,32);
1015   pf2_tilemap = tilemap_create(get_pf2_tile_info,    deco16_scan_rows,TILEMAP_TRANSPARENT,16,16,64,32);
1016   pf3_tilemap = tilemap_create(get_ll_pf3_tile_info, deco16_scan_rows,TILEMAP_TRANSPARENT,16,16,32,32);
1017   pf4_tilemap = tilemap_create(get_ll_pf4_tile_info, deco16_scan_rows,TILEMAP_OPAQUE,     16,16,32,32);
1018   pf1a_tilemap =tilemap_create(get_pf1a_tile_info,   deco16_scan_rows,TILEMAP_TRANSPARENT,16,16,64,32);
1014   pf1_tilemap = tilemap_create(get_pf1_tile_info,    tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 8, 8,64,32);
1015   pf2_tilemap = tilemap_create(get_pf2_tile_info,    deco16_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,64,32);
1016   pf3_tilemap = tilemap_create(get_ll_pf3_tile_info, deco16_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,32,32);
1017   pf4_tilemap = tilemap_create(get_ll_pf4_tile_info, deco16_scan_rows,TILEMAP_TYPE_OPAQUE,     16,16,32,32);
1018   pf1a_tilemap =tilemap_create(get_pf1a_tile_info,   deco16_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,64,32);
10191019   dirty_palette = auto_malloc(4096);
10201020   deco32_raster_display_list = auto_malloc(10 * 256);
10211021   memset(deco32_raster_display_list, 0, 10 * 256);
r778r779
10351035
10361036VIDEO_START( nslasher )
10371037{
1038   pf1_tilemap = tilemap_create(get_pf1_tile_info, tilemap_scan_rows,TILEMAP_TRANSPARENT, 8, 8,64,32);
1039   pf2_tilemap = tilemap_create(get_pf2_tile_info, deco16_scan_rows,TILEMAP_TRANSPARENT,16,16,64,32);
1040   pf3_tilemap = tilemap_create(get_pf3_tile_info, deco16_scan_rows,TILEMAP_TRANSPARENT,16,16,64,32);
1041   pf4_tilemap = tilemap_create(get_pf4_tile_info, deco16_scan_rows,TILEMAP_OPAQUE,     16,16,64,32);
1038   pf1_tilemap = tilemap_create(get_pf1_tile_info, tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 8, 8,64,32);
1039   pf2_tilemap = tilemap_create(get_pf2_tile_info, deco16_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,64,32);
1040   pf3_tilemap = tilemap_create(get_pf3_tile_info, deco16_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,64,32);
1041   pf4_tilemap = tilemap_create(get_pf4_tile_info, deco16_scan_rows,TILEMAP_TYPE_OPAQUE,     16,16,64,32);
10421042   pf1a_tilemap =0;
10431043   dirty_palette = auto_malloc(4096);
10441044
src/mame/video/argus.c
r778r779
306306{
307307   lowbitscroll = 0;
308308   /*                           info                      offset             type                  w   h  col  row */
309   bg0_tilemap = tilemap_create(argus_get_bg0_tile_info,  tilemap_scan_cols, TILEMAP_OPAQUE,      16, 16, 32, 32);
310   bg1_tilemap = tilemap_create(argus_get_bg1_tile_info,  tilemap_scan_cols, TILEMAP_TRANSPARENT, 16, 16, 32, 32);
311   tx_tilemap  = tilemap_create(argus_get_tx_tile_info,   tilemap_scan_cols, TILEMAP_TRANSPARENT,  8,  8, 32, 32);
309   bg0_tilemap = tilemap_create(argus_get_bg0_tile_info,  tilemap_scan_cols, TILEMAP_TYPE_OPAQUE,      16, 16, 32, 32);
310   bg1_tilemap = tilemap_create(argus_get_bg1_tile_info,  tilemap_scan_cols, TILEMAP_TYPE_TRANSPARENT, 16, 16, 32, 32);
311   tx_tilemap  = tilemap_create(argus_get_tx_tile_info,   tilemap_scan_cols, TILEMAP_TYPE_TRANSPARENT,  8,  8, 32, 32);
312312
313313   /* dummy RAM for back ground */
314314   argus_dummy_bg0ram = auto_malloc( 0x800 );
r778r779
327327VIDEO_START( valtric )
328328{
329329   /*                           info                       offset             type                 w   h  col  row */
330   bg1_tilemap = tilemap_create(valtric_get_bg_tile_info,  tilemap_scan_cols, TILEMAP_OPAQUE,      16, 16, 32, 32);
331   tx_tilemap  = tilemap_create(valtric_get_tx_tile_info,  tilemap_scan_cols, TILEMAP_TRANSPARENT,  8,  8, 32, 32);
330   bg1_tilemap = tilemap_create(valtric_get_bg_tile_info,  tilemap_scan_cols, TILEMAP_TYPE_OPAQUE,      16, 16, 32, 32);
331   tx_tilemap  = tilemap_create(valtric_get_tx_tile_info,  tilemap_scan_cols, TILEMAP_TYPE_TRANSPARENT,  8,  8, 32, 32);
332332
333333   tilemap_set_transparent_pen( bg1_tilemap, 15 );
334334   tilemap_set_transparent_pen( tx_tilemap,  15 );
r778r779
340340VIDEO_START( butasan )
341341{
342342   /*                           info                       offset             type                 w   h  col  row */
343   bg0_tilemap = tilemap_create(butasan_get_bg0_tile_info, tilemap_scan_rows, TILEMAP_OPAQUE,      16, 16, 32, 32);
344   bg1_tilemap = tilemap_create(butasan_get_bg1_tile_info, tilemap_scan_rows, TILEMAP_OPAQUE,      16, 16, 32, 32);
345   tx_tilemap  = tilemap_create(butasan_get_tx_tile_info,  tilemap_scan_rows, TILEMAP_TRANSPARENT,  8,  8, 32, 32);
343   bg0_tilemap = tilemap_create(butasan_get_bg0_tile_info, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE,      16, 16, 32, 32);
344   bg1_tilemap = tilemap_create(butasan_get_bg1_tile_info, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE,      16, 16, 32, 32);
345   tx_tilemap  = tilemap_create(butasan_get_tx_tile_info,  tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT,  8,  8, 32, 32);
346346
347347   butasan_txram = auto_malloc( BUTASAN_TEXT_RAMSIZE );
348348   butasan_bg0ram = auto_malloc( BUTASAN_BG0_RAMSIZE );
r778r779
395395VIDEO_START( bombsa )
396396{
397397   /*                           info                       offset             type                 w   h  col  row */
398//  bg1_tilemap = tilemap_create(valtric_get_bg_tile_info,  tilemap_scan_cols, TILEMAP_OPAQUE,      16, 16, 32, 32);
399   tx_tilemap  = tilemap_create(valtric_get_tx_tile_info,  tilemap_scan_cols, TILEMAP_TRANSPARENT,  8,  8, 32, 32);
398//  bg1_tilemap = tilemap_create(valtric_get_bg_tile_info,  tilemap_scan_cols, TILEMAP_TYPE_OPAQUE,      16, 16, 32, 32);
399   tx_tilemap  = tilemap_create(valtric_get_tx_tile_info,  tilemap_scan_cols, TILEMAP_TYPE_TRANSPARENT,  8,  8, 32, 32);
400400
401401#if 0
402402   /* this might be wrong.. but it looks like there may be a tilemap here that can change between 8x8 and 16x16 mode.. */
403403   /* when you start the game it gets 'corrupted' with data for another layer.. */
404   tx_alt_tilemap  = tilemap_create(bombsa_get_tx_alt_tile_info,  tilemap_scan_cols, TILEMAP_TRANSPARENT,  8,  8, 32, 32);
404   tx_alt_tilemap  = tilemap_create(bombsa_get_tx_alt_tile_info,  tilemap_scan_cols, TILEMAP_TYPE_TRANSPARENT,  8,  8, 32, 32);
405405#endif
406406
407   bombsa_bg_tilemap  = tilemap_create(bombsa_get_bg_tile_info,  tilemap_scan_cols, TILEMAP_TRANSPARENT,  16,  16, 64, 32);
407   bombsa_bg_tilemap  = tilemap_create(bombsa_get_bg_tile_info,  tilemap_scan_cols, TILEMAP_TYPE_TRANSPARENT,  16,  16, 64, 32);
408408
409409#if 0
410410   bombsa_tx_alt_ram = auto_malloc(0x800);
src/mame/video/grchamp.c
r778r779
111111   state->work_bitmap = auto_bitmap_alloc(32,32,machine->screen[0].format);
112112
113113   /* allocate tilemaps for each of the three sections */
114   state->text_tilemap = tilemap_create(get_text_tile_info, tilemap_scan_rows, TILEMAP_OPAQUE, 8,8, 32,32);
115   state->left_tilemap = tilemap_create(get_left_tile_info, get_memory_offset, TILEMAP_OPAQUE, 8,8, 64,32);
116   state->right_tilemap = tilemap_create(get_right_tile_info, get_memory_offset, TILEMAP_OPAQUE, 8,8, 64,32);
117   state->center_tilemap = tilemap_create(get_center_tile_info, get_memory_offset, TILEMAP_OPAQUE, 8,8, 64,32);
114   state->text_tilemap = tilemap_create(get_text_tile_info, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE, 8,8, 32,32);
115   state->left_tilemap = tilemap_create(get_left_tile_info, get_memory_offset, TILEMAP_TYPE_OPAQUE, 8,8, 64,32);
116   state->right_tilemap = tilemap_create(get_right_tile_info, get_memory_offset, TILEMAP_TYPE_OPAQUE, 8,8, 64,32);
117   state->center_tilemap = tilemap_create(get_center_tile_info, get_memory_offset, TILEMAP_TYPE_OPAQUE, 8,8, 64,32);
118118}
119119
120120#if 0
src/mame/video/lkage.c
r778r779
8181{
8282   bg_tile_bank = fg_tile_bank = 0;
8383
84   bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,     8,8,32,32);
85   fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,32,32);
86   tx_tilemap = tilemap_create(get_tx_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,32,32);
84   bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,     8,8,32,32);
85   fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,32,32);
86   tx_tilemap = tilemap_create(get_tx_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,32,32);
8787
8888   tilemap_set_transparent_pen(fg_tilemap,0);
8989   tilemap_set_transparent_pen(tx_tilemap,0);
src/mame/video/ninjakid.c
r778r779
197197*******************************************************************************/
198198
199199VIDEO_START( ninjakid ){
200    fg_tilemap = tilemap_create( get_fg_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,32,32 );
201   bg_tilemap = tilemap_create( get_bg_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,8,8,32,32 );
200    fg_tilemap = tilemap_create( get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,32,32 );
201   bg_tilemap = tilemap_create( get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,8,8,32,32 );
202202   tilemap_set_transparent_pen( fg_tilemap,0 );
203203
204204   /* Save State Support */
src/mame/video/gaiden.c
r778r779
7777VIDEO_START( gaiden )
7878{
7979   /* set up tile layers */
80   background = tilemap_create(get_bg_tile_info, tilemap_scan_rows, TILEMAP_TRANSPARENT, 16, 16, 64, 32);
81   foreground = tilemap_create(get_fg_tile_info, tilemap_scan_rows, TILEMAP_TRANSPARENT, 16, 16, 64, 32);
82   text_layer = tilemap_create(get_tx_tile_info, tilemap_scan_rows, TILEMAP_TRANSPARENT,  8,  8, 32, 32);
80   background = tilemap_create(get_bg_tile_info, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 16, 16, 64, 32);
81   foreground = tilemap_create(get_fg_tile_info, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 16, 16, 64, 32);
82   text_layer = tilemap_create(get_tx_tile_info, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT,  8,  8, 32, 32);
8383
8484   tilemap_set_transparent_pen(background, 0);
8585   tilemap_set_transparent_pen(foreground, 0);
r778r779
9292   tile_bitmap_bg = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, BITMAP_FORMAT_INDEXED16);
9393   tile_bitmap_fg = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, BITMAP_FORMAT_INDEXED16);
9494
95   background = tilemap_create(get_bg_tile_info,      tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,64,32);
96   foreground = tilemap_create(get_fg_tile_info_raiga,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,64,32);
97   text_layer = tilemap_create(get_tx_tile_info,      tilemap_scan_rows,TILEMAP_TRANSPARENT, 8, 8,32,32);
95   background = tilemap_create(get_bg_tile_info,      tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,64,32);
96   foreground = tilemap_create(get_fg_tile_info_raiga,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,64,32);
97   text_layer = tilemap_create(get_tx_tile_info,      tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 8, 8,32,32);
9898
9999   tilemap_set_transparent_pen(background,0);
100100   tilemap_set_transparent_pen(foreground,0);
r778r779
107107VIDEO_START( drgnbowl )
108108{
109109   /* set up tile layers */
110   background = tilemap_create(get_bg_tile_info, tilemap_scan_rows, TILEMAP_OPAQUE,      16, 16, 64, 32);
111   foreground = tilemap_create(get_fg_tile_info, tilemap_scan_rows, TILEMAP_TRANSPARENT, 16, 16, 64, 32);
112   text_layer = tilemap_create(get_tx_tile_info, tilemap_scan_rows, TILEMAP_TRANSPARENT,  8,  8, 32, 32);
110   background = tilemap_create(get_bg_tile_info, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE,      16, 16, 64, 32);
111   foreground = tilemap_create(get_fg_tile_info, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 16, 16, 64, 32);
112   text_layer = tilemap_create(get_tx_tile_info, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT,  8,  8, 32, 32);
113113
114114   tilemap_set_transparent_pen(foreground, 15);
115115   tilemap_set_transparent_pen(text_layer, 15);
src/mame/video/zaxxon.c
r778r779
136136   memset(congo_custom, 0, sizeof(congo_custom));
137137
138138   /* create a background and foreground tilemap */
139   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, TILEMAP_OPAQUE, 8,8, 32,512);
140   fg_tilemap = tilemap_create(fg_tile_info, tilemap_scan_rows, TILEMAP_TRANSPARENT, 8,8, 32,32);
139   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE, 8,8, 32,512);
140   fg_tilemap = tilemap_create(fg_tile_info, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 8,8, 32,32);
141141
142142   /* configure the foreground tilemap */
143143   tilemap_set_transparent_pen(fg_tilemap, 0);
src/mame/video/shangkid.c
r778r779
5050
5151VIDEO_START( shangkid )
5252{
53   background = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,64,32);
53   background = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,64,32);
5454}
5555
5656WRITE8_HANDLER( shangkid_videoram_w )
src/mame/video/trackfld.c
r778r779
167167VIDEO_START( trackfld )
168168{
169169   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows,
170      TILEMAP_OPAQUE, 8, 8, 64, 32);
170      TILEMAP_TYPE_OPAQUE, 8, 8, 64, 32);
171171
172172   tilemap_set_scroll_rows(bg_tilemap, 32);
173173}
src/mame/video/fastfred.c
r778r779
128128
129129VIDEO_START( fastfred )
130130{
131   bg_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,8,8,32,32);
131   bg_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,8,8,32,32);
132132
133133   tilemap_set_scroll_cols(bg_tilemap, 32);
134134}
r778r779
376376
377377VIDEO_START( imago )
378378{
379   web_tilemap = tilemap_create(imago_get_tile_info_web,tilemap_scan_rows,TILEMAP_OPAQUE,     8,8,32,32);
380   bg_tilemap   = tilemap_create(imago_get_tile_info_bg, tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,32,32);
381   fg_tilemap   = tilemap_create(imago_get_tile_info_fg, tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,32,32);
379   web_tilemap = tilemap_create(imago_get_tile_info_web,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,     8,8,32,32);
380   bg_tilemap   = tilemap_create(imago_get_tile_info_bg, tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,32,32);
381   fg_tilemap   = tilemap_create(imago_get_tile_info_fg, tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,32,32);
382382
383383   tilemap_set_transparent_pen(bg_tilemap, 0);
384384   tilemap_set_transparent_pen(fg_tilemap, 0);
src/mame/video/karnov.c
r778r779
240240   dirty_f=auto_malloc(0x800);
241241   memset(dirty_f,1,0x800);
242242
243   fix_tilemap=tilemap_create(get_fix_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,32,32);
243   fix_tilemap=tilemap_create(get_fix_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,32,32);
244244
245245   tilemap_set_transparent_pen(fix_tilemap,0);
246246}
r778r779
253253   dirty_f=auto_malloc(0x800);
254254   memset(dirty_f,1,0x800);
255255
256   fix_tilemap=tilemap_create(get_fix_tile_info,tilemap_scan_cols,TILEMAP_TRANSPARENT,8,8,32,32);
256   fix_tilemap=tilemap_create(get_fix_tile_info,tilemap_scan_cols,TILEMAP_TYPE_TRANSPARENT,8,8,32,32);
257257
258258   tilemap_set_transparent_pen(fix_tilemap,0);
259259}
src/mame/video/lwings.c
r778r779
9090
9191VIDEO_START( lwings )
9292{
93   fg_tilemap  = tilemap_create(get_fg_tile_info,        tilemap_scan_rows,TILEMAP_TRANSPARENT, 8, 8,32,32);
94   bg1_tilemap = tilemap_create(lwings_get_bg1_tile_info,tilemap_scan_cols,TILEMAP_OPAQUE,     16,16,32,32);
93   fg_tilemap  = tilemap_create(get_fg_tile_info,        tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 8, 8,32,32);
94   bg1_tilemap = tilemap_create(lwings_get_bg1_tile_info,tilemap_scan_cols,TILEMAP_TYPE_OPAQUE,     16,16,32,32);
9595
9696   tilemap_set_transparent_pen(fg_tilemap,3);
9797}
9898
9999VIDEO_START( trojan )
100100{
101   fg_tilemap  = tilemap_create(get_fg_tile_info,        tilemap_scan_rows,    TILEMAP_TRANSPARENT,8, 8,32,32);
102   bg1_tilemap = tilemap_create(trojan_get_bg1_tile_info,tilemap_scan_cols,    TILEMAP_SPLIT,     16,16,32,32);
103   bg2_tilemap = tilemap_create(get_bg2_tile_info,       get_bg2_memory_offset,TILEMAP_OPAQUE,    16,16,32,16);
101   fg_tilemap  = tilemap_create(get_fg_tile_info,        tilemap_scan_rows,    TILEMAP_TYPE_TRANSPARENT,8, 8,32,32);
102   bg1_tilemap = tilemap_create(trojan_get_bg1_tile_info,tilemap_scan_cols,    TILEMAP_TYPE_SPLIT,     16,16,32,32);
103   bg2_tilemap = tilemap_create(get_bg2_tile_info,       get_bg2_memory_offset,TILEMAP_TYPE_OPAQUE,    16,16,32,16);
104104
105105      tilemap_set_transparent_pen(fg_tilemap,3);
106106      tilemap_set_transmask(bg1_tilemap,0,0xffff,0x0001); /* split type 0 is totally transparent in front half */
src/mame/video/punchout.c
r778r779
219219
220220VIDEO_START( punchout )
221221{
222   toptilemap = tilemap_create(top_get_info, tilemap_scan_rows, TILEMAP_OPAQUE, 8,8, 32,32);
223   bottilemap = tilemap_create(bot_get_info, tilemap_scan_rows, TILEMAP_OPAQUE, 8,8, 64,32);
222   toptilemap = tilemap_create(top_get_info, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE, 8,8, 32,32);
223   bottilemap = tilemap_create(bot_get_info, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE, 8,8, 64,32);
224224   tilemap_set_scroll_rows(bottilemap, 32);
225225
226   spr1tilemap = tilemap_create(bs1_get_info, tilemap_scan_rows, TILEMAP_OPAQUE, 8,8, 16,32);
227   spr2tilemap = tilemap_create(bs2_get_info, tilemap_scan_rows, TILEMAP_OPAQUE, 8,8, 16,32);
226   spr1tilemap = tilemap_create(bs1_get_info, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE, 8,8, 16,32);
227   spr2tilemap = tilemap_create(bs2_get_info, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE, 8,8, 16,32);
228228
229229   fgtilemap = NULL;
230230}
r778r779
263263
264264VIDEO_START( armwrest )
265265{
266   toptilemap = tilemap_create(armwrest_top_get_info, tilemap_scan_rows, TILEMAP_OPAQUE, 8,8, 32,32);
267   bottilemap = tilemap_create(armwrest_bot_get_info, tilemap_scan_rows, TILEMAP_OPAQUE, 8,8, 32,32);
266   toptilemap = tilemap_create(armwrest_top_get_info, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE, 8,8, 32,32);
267   bottilemap = tilemap_create(armwrest_bot_get_info, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE, 8,8, 32,32);
268268
269   spr1tilemap = tilemap_create(bs1_get_info, armwrest_bs1_scan, TILEMAP_OPAQUE, 8,8, 32,16);
270   spr2tilemap = tilemap_create(bs2_get_info, tilemap_scan_rows, TILEMAP_OPAQUE, 8,8, 16,32);
269   spr1tilemap = tilemap_create(bs1_get_info, armwrest_bs1_scan, TILEMAP_TYPE_OPAQUE, 8,8, 32,16);
270   spr2tilemap = tilemap_create(bs2_get_info, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE, 8,8, 16,32);
271271
272   fgtilemap = tilemap_create(armwrest_fg_get_info, tilemap_scan_rows, TILEMAP_TRANSPARENT, 8,8, 32,32);
272   fgtilemap = tilemap_create(armwrest_fg_get_info, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 8,8, 32,32);
273273   tilemap_set_transparent_pen(fgtilemap, 7);
274274}
275275
src/mame/video/kopunch.c
r778r779
9191VIDEO_START( kopunch )
9292{
9393   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows,
94      TILEMAP_OPAQUE, 8, 8, 32, 32);
94      TILEMAP_TYPE_OPAQUE, 8, 8, 32, 32);
9595
9696   fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows,
97      TILEMAP_TRANSPARENT, 8, 8, 16, 16);
97      TILEMAP_TYPE_TRANSPARENT, 8, 8, 16, 16);
9898
9999   tilemap_set_transparent_pen(fg_tilemap, 0);
100100}
src/mame/video/tecmo.c
r778r779
8585{
8686   if (tecmo_video_type == 2)   /* gemini */
8787   {
88      bg_tilemap = tilemap_create(gemini_get_bg_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,32,16);
89      fg_tilemap = tilemap_create(gemini_get_fg_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,32,16);
88      bg_tilemap = tilemap_create(gemini_get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,32,16);
89      fg_tilemap = tilemap_create(gemini_get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,32,16);
9090   }
9191   else   /* rygar, silkworm */
9292   {
93      bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,32,16);
94      fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,32,16);
93      bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,32,16);
94      fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,32,16);
9595   }
96   tx_tilemap = tilemap_create(get_tx_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT, 8, 8,32,32);
96   tx_tilemap = tilemap_create(get_tx_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 8, 8,32,32);
9797
9898   tilemap_set_transparent_pen(bg_tilemap,0);
9999   tilemap_set_transparent_pen(fg_tilemap,0);
src/mame/video/news.c
r778r779
5252VIDEO_START( news )
5353{
5454
55   fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,32, 32);
55   fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,32, 32);
5656   tilemap_set_transparent_pen(fg_tilemap,0);
5757
58   bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,8,8,32, 32);
58   bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,8,8,32, 32);
5959}
6060
6161
src/mame/video/shuuz.c
r778r779
7373   };
7474
7575   /* initialize the playfield */
76   atarigen_playfield_tilemap = tilemap_create(get_playfield_tile_info, tilemap_scan_cols, TILEMAP_OPAQUE, 8,8, 64,64);
76   atarigen_playfield_tilemap = tilemap_create(get_playfield_tile_info, tilemap_scan_cols, TILEMAP_TYPE_OPAQUE, 8,8, 64,64);
7777
7878   /* initialize the motion objects */
7979   atarimo_init(machine, 0, &modesc);
src/mame/video/cclimber.c
r778r779
807807
808808VIDEO_START( toprollr )
809809{
810   bg_tilemap = tilemap_create(get_tile_info_bg,tilemap_scan_rows,TILEMAP_OPAQUE,8,8,32,32);
810   bg_tilemap = tilemap_create(get_tile_info_bg,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,8,8,32,32);
811811}
812812
813813static void toprollr_draw_big_sprite(running_machine *machine, mame_bitmap *bitmap,const rectangle *cliprect,int priority)
src/mame/video/xorworld.c
r778r779
7575VIDEO_START( xorworld )
7676{
7777   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows,
78      TILEMAP_OPAQUE, 8, 8, 32, 32);
78      TILEMAP_TYPE_OPAQUE, 8, 8, 32, 32);
7979}
8080
8181/*
src/mame/video/speedspn.c
r778r779
2121VIDEO_START(speedspn)
2222{
2323   speedspn_vidram = auto_malloc(0x1000 * 2);
24   speedspn_tilemap = tilemap_create(get_speedspn_tile_info,tilemap_scan_cols,TILEMAP_OPAQUE, 8, 8,64,32);
24   speedspn_tilemap = tilemap_create(get_speedspn_tile_info,tilemap_scan_cols,TILEMAP_TYPE_OPAQUE, 8, 8,64,32);
2525}
2626
2727WRITE8_HANDLER( speedspn_vidram_w )
src/mame/video/hexa.c
r778r779
6464VIDEO_START( hexa )
6565{
6666   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows,
67      TILEMAP_OPAQUE, 8, 8, 32, 32);
67      TILEMAP_TYPE_OPAQUE, 8, 8, 32, 32);
6868}
6969
7070
src/mame/video/cloak.c
r778r779
181181VIDEO_START( cloak )
182182{
183183   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows,
184      TILEMAP_OPAQUE, 8, 8, 32, 32);
184      TILEMAP_TYPE_OPAQUE, 8, 8, 32, 32);
185185
186186   tmpbitmap = auto_bitmap_alloc(machine->screen[0].width,machine->screen[0].height,machine->screen[0].format);
187187   tmpbitmap2 = auto_bitmap_alloc(machine->screen[0].width,machine->screen[0].height,machine->screen[0].format);
src/mame/video/namcona1.c
r778r779
227227      bg_tilemap[i] = tilemap_create(
228228         get_info[i],
229229         tilemap_scan_rows,
230         TILEMAP_BITMASK,8,8,64,64 );
230         TILEMAP_TYPE_BITMASK,8,8,64,64 );
231231
232232      tilemap_palette_bank[i] = -1;
233233   }
src/mame/video/foodf.c
r778r779
4242   static const int resistances[3] = { 1000, 470, 220 };
4343
4444   /* initialize the playfield */
45   atarigen_playfield_tilemap = tilemap_create(get_playfield_tile_info, tilemap_scan_cols, TILEMAP_TRANSPARENT, 8,8, 32,32);
45   atarigen_playfield_tilemap = tilemap_create(get_playfield_tile_info, tilemap_scan_cols, TILEMAP_TYPE_TRANSPARENT, 8,8, 32,32);
4646   tilemap_set_transparent_pen(atarigen_playfield_tilemap, 0);
4747
4848   /* adjust the playfield for the 8 pixel offset */
src/mame/video/bsktball.c
r778r779
3030VIDEO_START( bsktball )
3131{
3232   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows,
33      TILEMAP_OPAQUE, 8, 8, 32, 32);
33      TILEMAP_TYPE_OPAQUE, 8, 8, 32, 32);
3434}
3535
3636static void draw_sprites(running_machine *machine,  mame_bitmap *bitmap, const rectangle *cliprect)
src/mame/video/armedf.c
r778r779
107107      sprite_offy = 128;
108108   }
109109
110   //bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_cols,TILEMAP_OPAQUE,16,16,64,32);
111   bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_cols,TILEMAP_TRANSPARENT,16,16,64,32);
112   fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_cols,TILEMAP_TRANSPARENT,16,16,64,32);
113   armedf_tx_tilemap = tilemap_create(get_tx_tile_info,armedf_scan,TILEMAP_TRANSPARENT,8,8,64,32);
110   //bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_cols,TILEMAP_TYPE_OPAQUE,16,16,64,32);
111   bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_cols,TILEMAP_TYPE_TRANSPARENT,16,16,64,32);
112   fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_cols,TILEMAP_TYPE_TRANSPARENT,16,16,64,32);
113   armedf_tx_tilemap = tilemap_create(get_tx_tile_info,armedf_scan,TILEMAP_TYPE_TRANSPARENT,8,8,64,32);
114114
115115   tilemap_set_transparent_pen(fg_tilemap,0xf);
116116   tilemap_set_transparent_pen(armedf_tx_tilemap,0xf);
src/mame/video/dkong.c
r778r779
807807
808808   video_start_dkong_base(machine);
809809
810   bg_tilemap = tilemap_create(dkong_bg_tile_info, tilemap_scan_rows, TILEMAP_OPAQUE, 8, 8, 32, 32);
810   bg_tilemap = tilemap_create(dkong_bg_tile_info, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE, 8, 8, 32, 32);
811811   tilemap_set_scrolldx(bg_tilemap, 0, 128);
812812}
813813
r778r779
832832
833833   vid_hw = HW_TRS01;
834834
835   bg_tilemap = tilemap_create(radarsc1_bg_tile_info, tilemap_scan_rows, TILEMAP_OPAQUE, 8, 8, 32, 32);
835   bg_tilemap = tilemap_create(radarsc1_bg_tile_info, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE, 8, 8, 32, 32);
836836   tilemap_set_scrolldx(bg_tilemap, 0, 128);
837837
838838   bg_bits = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format);
src/mame/video/sprint4.c
r778r779
5656{
5757   helper = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format);
5858
59   playfield = tilemap_create(sprint4_tile_info, tilemap_scan_rows, TILEMAP_OPAQUE, 8, 8, 32, 32);
59   playfield = tilemap_create(sprint4_tile_info, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE, 8, 8, 32, 32);
6060}
6161
6262
src/mame/video/appoooh.c
r778r779
151151***************************************************************************/
152152VIDEO_START( appoooh )
153153{
154   fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,32,32);
155   bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,     8,8,32,32);
154   fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,32,32);
155   bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,     8,8,32,32);
156156
157157   tilemap_set_transparent_pen(fg_tilemap,0);
158158   tilemap_set_scrolldy(fg_tilemap,8,8);
src/mame/video/travrusa.c
r778r779
210210
211211VIDEO_START( travrusa )
212212{
213   bg_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows,TILEMAP_SPLIT,8,8,64,32);
213   bg_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows,TILEMAP_TYPE_SPLIT,8,8,64,32);
214214
215215   tilemap_set_transmask(bg_tilemap,0,0xff,0x00); /* split type 0 is totally transparent in front half */
216216   tilemap_set_transmask(bg_tilemap,1,0x3f,0xc0); /* split type 1 has pens 6 and 7 opaque - tunnels */
src/mame/video/metlclsh.c
r778r779
144144{
145145   metlclsh_otherram = auto_malloc(0x800);   // banked ram
146146
147   bg_tilemap = tilemap_create(get_bg_tile_info,metlclsh_bgtilemap_scan,TILEMAP_TRANSPARENT,16,16,32,16);
148   fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,32,32);
147   bg_tilemap = tilemap_create(get_bg_tile_info,metlclsh_bgtilemap_scan,TILEMAP_TYPE_TRANSPARENT,16,16,32,16);
148   fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,32,32);
149149
150150   tilemap_set_transparent_pen( bg_tilemap, 0 );
151151   tilemap_set_transparent_pen( fg_tilemap, 0 );
src/mame/video/88games.c
r778r779
6363   zoom_colorbase = 48;
6464   K052109_vh_start(machine,REGION_GFX1,NORMAL_PLANE_ORDER,tile_callback);
6565   K051960_vh_start(machine,REGION_GFX2,NORMAL_PLANE_ORDER,sprite_callback);
66   K051316_vh_start_0(machine,REGION_GFX3,4,TILEMAP_TRANSPARENT,0,zoom_callback);
66   K051316_vh_start_0(machine,REGION_GFX3,4,TILEMAP_TYPE_TRANSPARENT,0,zoom_callback);
6767}
6868
6969
src/mame/video/kaneko16.c
r778r779
133133   video_start_kaneko16_sprites(machine);
134134
135135   kaneko16_tmap_0 = tilemap_create(   get_tile_info_0, tilemap_scan_rows,
136                              TILEMAP_TRANSPARENT, 16,16, 0x20,0x20   );
136                              TILEMAP_TYPE_TRANSPARENT, 16,16, 0x20,0x20   );
137137   kaneko16_tmap_1 = tilemap_create(   get_tile_info_1, tilemap_scan_rows,
138                              TILEMAP_TRANSPARENT, 16,16, 0x20,0x20   );
138                              TILEMAP_TYPE_TRANSPARENT, 16,16, 0x20,0x20   );
139139
140140   kaneko16_tmap_2 = 0;
141141
r778r779
179179   video_start_kaneko16_1xVIEW2(machine);
180180
181181   kaneko16_tmap_2 = tilemap_create(   get_tile_info_2, tilemap_scan_rows,
182                              TILEMAP_TRANSPARENT, 16,16, 0x20,0x20   );
182                              TILEMAP_TYPE_TRANSPARENT, 16,16, 0x20,0x20   );
183183   kaneko16_tmap_3 = tilemap_create(   get_tile_info_3, tilemap_scan_rows,
184                              TILEMAP_TRANSPARENT, 16,16, 0x20,0x20   );
184                              TILEMAP_TYPE_TRANSPARENT, 16,16, 0x20,0x20   );
185185
186186   {
187187      int dx, xdim = machine->screen[0].width;
src/mame/video/dbz.c
r778r779
9797   K056832_vh_start(machine, REGION_GFX1, K056832_BPP_4, 1, NULL, dbz_tile_callback, 1);
9898   K053247_vh_start(machine, REGION_GFX2, -52, 16, NORMAL_PLANE_ORDER, dbz_sprite_callback);
9999
100   dbz_bg1_tilemap = tilemap_create(get_dbz_bg1_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT, 16, 16,64,32);
101   dbz_bg2_tilemap = tilemap_create(get_dbz_bg2_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT, 16, 16,64,32);
100   dbz_bg1_tilemap = tilemap_create(get_dbz_bg1_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 16, 16,64,32);
101   dbz_bg2_tilemap = tilemap_create(get_dbz_bg2_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 16, 16,64,32);
102102
103103   tilemap_set_transparent_pen(dbz_bg1_tilemap,0);
104104   tilemap_set_transparent_pen(dbz_bg2_tilemap,0);
src/mame/video/wc90.c
r778r779
8989
9090VIDEO_START( wc90 )
9191{
92   bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,     16,16,64,32);
93   fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,64,32);
94   tx_tilemap = tilemap_create(get_tx_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT, 8, 8,64,32);
92   bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,     16,16,64,32);
93   fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,64,32);
94   tx_tilemap = tilemap_create(get_tx_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 8, 8,64,32);
9595
9696   tilemap_set_transparent_pen(fg_tilemap,0);
9797   tilemap_set_transparent_pen(tx_tilemap,0);
r778r779
9999
100100VIDEO_START( wc90t )
101101{
102   bg_tilemap = tilemap_create(track_get_bg_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,     16,16,64,32);
103   fg_tilemap = tilemap_create(track_get_fg_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,64,32);
104   tx_tilemap = tilemap_create(get_tx_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT, 8, 8,64,32);
102   bg_tilemap = tilemap_create(track_get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,     16,16,64,32);
103   fg_tilemap = tilemap_create(track_get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,64,32);
104   tx_tilemap = tilemap_create(get_tx_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 8, 8,64,32);
105105
106106   tilemap_set_transparent_pen(fg_tilemap,0);
107107   tilemap_set_transparent_pen(tx_tilemap,0);
src/mame/video/gauntlet.c
r778r779
106106   int i, size;
107107
108108   /* initialize the playfield */
109   atarigen_playfield_tilemap = tilemap_create(get_playfield_tile_info, tilemap_scan_cols, TILEMAP_OPAQUE, 8,8, 64,64);
109   atarigen_playfield_tilemap = tilemap_create(get_playfield_tile_info, tilemap_scan_cols, TILEMAP_TYPE_OPAQUE, 8,8, 64,64);
110110
111111   /* initialize the motion objects */
112112   atarimo_init(machine, 0, &modesc);
113113
114114   /* initialize the alphanumerics */
115   atarigen_alpha_tilemap = tilemap_create(get_alpha_tile_info, tilemap_scan_rows, TILEMAP_TRANSPARENT, 8,8, 64,32);
115   atarigen_alpha_tilemap = tilemap_create(get_alpha_tile_info, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 8,8, 64,32);
116116   tilemap_set_transparent_pen(atarigen_alpha_tilemap, 0);
117117
118118   /* modify the motion object code lookup table to account for the code XOR */
src/mame/video/ms32.c
r778r779
7171
7272VIDEO_START( ms32 )
7373{
74   ms32_tx_tilemap = tilemap_create(get_ms32_tx_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT, 8, 8,64,64);
75   ms32_bg_tilemap = tilemap_create(get_ms32_bg_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,64,64);
76   ms32_roz_tilemap = tilemap_create(get_ms32_roz_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,128,128);
74   ms32_tx_tilemap = tilemap_create(get_ms32_tx_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 8, 8,64,64);
75   ms32_bg_tilemap = tilemap_create(get_ms32_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,64,64);
76   ms32_roz_tilemap = tilemap_create(get_ms32_roz_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,128,128);
7777
7878   tilemap_set_transparent_pen(ms32_tx_tilemap,0);
7979   tilemap_set_transparent_pen(ms32_bg_tilemap,0);
src/mame/video/darkseal.c
r778r779
267267
268268VIDEO_START( darkseal )
269269{
270   pf1_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows,TILEMAP_TRANSPARENT, 8, 8,64,64);
271   pf2_tilemap = tilemap_create(get_bg_tile_info2,darkseal_scan,    TILEMAP_TRANSPARENT,16,16,64,64);
272   pf3_tilemap = tilemap_create(get_bg_tile_info3,darkseal_scan,    TILEMAP_OPAQUE,     16,16,64,64);
270   pf1_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 8, 8,64,64);
271   pf2_tilemap = tilemap_create(get_bg_tile_info2,darkseal_scan,    TILEMAP_TYPE_TRANSPARENT,16,16,64,64);
272   pf3_tilemap = tilemap_create(get_bg_tile_info3,darkseal_scan,    TILEMAP_TYPE_OPAQUE,     16,16,64,64);
273273
274274   tilemap_set_transparent_pen(pf1_tilemap,0);
275275   tilemap_set_transparent_pen(pf2_tilemap,0);
src/mame/video/seicross.c
r778r779
8888VIDEO_START( seicross )
8989{
9090   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows,
91      TILEMAP_OPAQUE, 8, 8, 32, 32);
91      TILEMAP_TYPE_OPAQUE, 8, 8, 32, 32);
9292
9393   tilemap_set_scroll_cols(bg_tilemap, 32);
9494}
src/mame/video/system16.c
r778r779
785785      background = tilemap_create(
786786         get_bg_tile_info,
787787         sys16_bg_map,
788         TILEMAP_OPAQUE,
788         TILEMAP_TYPE_OPAQUE,
789789         8,8,
790790         64*2,32*2 );
791791   else
792792      background = tilemap_create(
793793         get_bg_tile_info,
794794         sys16_bg_map,
795         TILEMAP_TRANSPARENT,
795         TILEMAP_TYPE_TRANSPARENT,
796796         8,8,
797797         64*2,32*2 );
798798
799799   foreground = tilemap_create(
800800      get_fg_tile_info,
801801      sys16_bg_map,
802      TILEMAP_TRANSPARENT,
802      TILEMAP_TYPE_TRANSPARENT,
803803      8,8,
804804      64*2,32*2 );
805805
806806   text_layer = tilemap_create(
807807      get_text_tile_info,
808808      sys16_text_map,
809      TILEMAP_TRANSPARENT,
809      TILEMAP_TYPE_TRANSPARENT,
810810      8,8,
811811      40,28 );
812812
r778r779
872872   background2 = tilemap_create(
873873      get_bg2_tile_info,
874874      sys16_bg_map,
875      TILEMAP_OPAQUE,
875      TILEMAP_TYPE_OPAQUE,
876876      8,8,
877877      64*2,32*2 );
878878
879879   foreground2 = tilemap_create(
880880      get_fg2_tile_info,
881881      sys16_bg_map,
882      TILEMAP_TRANSPARENT,
882      TILEMAP_TYPE_TRANSPARENT,
883883      8,8,
884884      64*2,32*2 );
885885
src/mame/video/deniam.c
r778r779
9797
9898VIDEO_START( deniam )
9999{
100   bg_tilemap = tilemap_create(get_bg_tile_info,scan_pages,       TILEMAP_OPAQUE,     8,8,128,64);
101   fg_tilemap = tilemap_create(get_fg_tile_info,scan_pages,       TILEMAP_TRANSPARENT,8,8,128,64);
102   tx_tilemap = tilemap_create(get_tx_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8, 64,32);
100   bg_tilemap = tilemap_create(get_bg_tile_info,scan_pages,       TILEMAP_TYPE_OPAQUE,     8,8,128,64);
101   fg_tilemap = tilemap_create(get_fg_tile_info,scan_pages,       TILEMAP_TYPE_TRANSPARENT,8,8,128,64);
102   tx_tilemap = tilemap_create(get_tx_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8, 64,32);
103103
104104   tilemap_set_transparent_pen(fg_tilemap,0);
105105   tilemap_set_transparent_pen(tx_tilemap,0);
src/mame/video/mcr3.c
r778r779
108108VIDEO_START( mcr3 )
109109{
110110   /* initialize the background tilemap */
111   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, TILEMAP_OPAQUE, 16,16, 32,30);
111   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE, 16,16, 32,30);
112112}
113113
114114
115115VIDEO_START( mcrmono )
116116{
117117   /* initialize the background tilemap */
118   bg_tilemap = tilemap_create(mcrmono_get_bg_tile_info, tilemap_scan_rows, TILEMAP_OPAQUE, 16,16, 32,30);
118   bg_tilemap = tilemap_create(mcrmono_get_bg_tile_info, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE, 16,16, 32,30);
119119}
120120
121121
122122VIDEO_START( spyhunt )
123123{
124124   /* initialize the background tilemap */
125   bg_tilemap = tilemap_create(spyhunt_get_bg_tile_info, spyhunt_bg_scan, TILEMAP_OPAQUE, 64,32, 64,32);
125   bg_tilemap = tilemap_create(spyhunt_get_bg_tile_info, spyhunt_bg_scan, TILEMAP_TYPE_OPAQUE, 64,32, 64,32);
126126
127127   /* initialize the text tilemap */
128   alpha_tilemap = tilemap_create(spyhunt_get_alpha_tile_info, tilemap_scan_cols, TILEMAP_TRANSPARENT, 16,16, 32,32);
128   alpha_tilemap = tilemap_create(spyhunt_get_alpha_tile_info, tilemap_scan_cols, TILEMAP_TYPE_TRANSPARENT, 16,16, 32,32);
129129   tilemap_set_transparent_pen(alpha_tilemap, 0);
130130   tilemap_set_scrollx(alpha_tilemap, 0, 16);
131131
src/mame/video/stadhero.c
r778r779
160160
161161VIDEO_START( stadhero )
162162{
163   pf1_tilemap =     tilemap_create(get_pf1_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT, 8, 8,32,32);
164   pf2_tilemap =     tilemap_create(get_pf2_tile_info,stadhero_scan,TILEMAP_OPAQUE,     16,16,64,64);
163   pf1_tilemap =     tilemap_create(get_pf1_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 8, 8,32,32);
164   pf2_tilemap =     tilemap_create(get_pf2_tile_info,stadhero_scan,TILEMAP_TYPE_OPAQUE,     16,16,64,64);
165165
166166   tilemap_set_transparent_pen(pf1_tilemap,0);
167167}
src/mame/video/prehisle.c
r778r779
9595VIDEO_START( prehisle )
9696{
9797   bg2_tilemap = tilemap_create(get_bg2_tile_info, tilemap_scan_cols,
98      TILEMAP_OPAQUE, 16, 16, 1024, 32);
98      TILEMAP_TYPE_OPAQUE, 16, 16, 1024, 32);
9999
100100   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_cols,
101      TILEMAP_TRANSPARENT, 16, 16, 256, 32);
101      TILEMAP_TYPE_TRANSPARENT, 16, 16, 256, 32);
102102
103103   fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows,
104      TILEMAP_TRANSPARENT, 8, 8, 32, 32);
104      TILEMAP_TYPE_TRANSPARENT, 8, 8, 32, 32);
105105
106106   tilemap_set_transparent_pen(bg_tilemap, 15);
107107   tilemap_set_transparent_pen(fg_tilemap, 15);
src/mame/video/marvins.c
r778r779
159159   stuff_palette( machine, 0, 0, 16*8 ); /* load sprite colors */
160160   stuff_palette( machine, 16*8*3, 16*8, 16*8 ); /* load text colors */
161161
162   fg_tilemap = tilemap_create(get_fg_tilemap_info,tilemap_scan_cols,TILEMAP_TRANSPARENT,8,8,64,32);
163   bg_tilemap = tilemap_create(get_bg_tilemap_info,tilemap_scan_cols,TILEMAP_TRANSPARENT,8,8,64,32);
164   tx_tilemap = tilemap_create(get_tx_tilemap_info,tilemap_scan_cols,TILEMAP_TRANSPARENT,8,8,32,32);
162   fg_tilemap = tilemap_create(get_fg_tilemap_info,tilemap_scan_cols,TILEMAP_TYPE_TRANSPARENT,8,8,64,32);
163   bg_tilemap = tilemap_create(get_bg_tilemap_info,tilemap_scan_cols,TILEMAP_TYPE_TRANSPARENT,8,8,64,32);
164   tx_tilemap = tilemap_create(get_tx_tilemap_info,tilemap_scan_cols,TILEMAP_TYPE_TRANSPARENT,8,8,32,32);
165165
166166   {
167167      tilemap_clip = machine->screen[0].visarea;
src/mame/video/wwfsstar.c
r778r779
205205
206206VIDEO_START( wwfsstar )
207207{
208   fg0_tilemap = tilemap_create(get_fg0_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT, 8, 8,32,32);
208   fg0_tilemap = tilemap_create(get_fg0_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 8, 8,32,32);
209209   tilemap_set_transparent_pen(fg0_tilemap,0);
210210
211   bg0_tilemap = tilemap_create(get_bg0_tile_info,bg0_scan,TILEMAP_OPAQUE, 16, 16,32,32);
211   bg0_tilemap = tilemap_create(get_bg0_tile_info,bg0_scan,TILEMAP_TYPE_OPAQUE, 16, 16,32,32);
212212   tilemap_set_transparent_pen(fg0_tilemap,0);
213213}
214214
src/mame/video/polepos.c
r778r779
197197
198198VIDEO_START( polepos )
199199{
200   bg_tilemap = tilemap_create(bg_get_tile_info,tilemap_scan_cols,TILEMAP_OPAQUE,8,8,64,16);
201   tx_tilemap = tilemap_create(tx_get_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT_COLOR,8,8,32,32);
200   bg_tilemap = tilemap_create(bg_get_tile_info,tilemap_scan_cols,TILEMAP_TYPE_OPAQUE,8,8,64,16);
201   tx_tilemap = tilemap_create(tx_get_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT_COLOR,8,8,32,32);
202202
203203   tilemap_set_transparent_pen(tx_tilemap, 0x2f);
204204}
src/mame/video/actfancr.c
r778r779
8686
8787VIDEO_START( actfancr )
8888{
89   pf1_tilemap = tilemap_create(get_tile_info,actfancr_scan,TILEMAP_OPAQUE,16,16,256,16);
90   pf1_alt_tilemap = tilemap_create(get_tile_info,actfancr_scan2,TILEMAP_OPAQUE,16,16,128,32);
91   pf2_tilemap = tilemap_create(get_pf2_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,32,32);
89   pf1_tilemap = tilemap_create(get_tile_info,actfancr_scan,TILEMAP_TYPE_OPAQUE,16,16,256,16);
90   pf1_alt_tilemap = tilemap_create(get_tile_info,actfancr_scan2,TILEMAP_TYPE_OPAQUE,16,16,128,32);
91   pf2_tilemap = tilemap_create(get_pf2_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,32,32);
9292
9393   tilemap_set_transparent_pen(pf2_tilemap,0);
9494
r778r779
9797
9898VIDEO_START( triothep )
9999{
100   pf1_tilemap = tilemap_create(get_trio_tile_info,triothep_scan,TILEMAP_OPAQUE,16,16,32,32);
101   pf2_tilemap = tilemap_create(get_pf2_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,32,32);
100   pf1_tilemap = tilemap_create(get_trio_tile_info,triothep_scan,TILEMAP_TYPE_OPAQUE,16,16,32,32);
101   pf2_tilemap = tilemap_create(get_pf2_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,32,32);
102102
103103   tilemap_set_transparent_pen(pf2_tilemap,0);
104104
src/mame/video/taito_b.c
r778r779
207207   framebuffer[1] = auto_bitmap_alloc(512,256,machine->screen[0].format);
208208   pixel_bitmap = NULL;  /* only hitice needs this */
209209
210   bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,     16,16,64,64);
211   fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,64,64);
212   tx_tilemap = tilemap_create(get_tx_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT, 8, 8,64,32);
210   bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,     16,16,64,64);
211   fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,64,64);
212   tx_tilemap = tilemap_create(get_tx_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 8, 8,64,32);
213213
214214   tilemap_set_transparent_pen(fg_tilemap,0);
215215   tilemap_set_transparent_pen(tx_tilemap,0);
src/mame/video/jackal.c
r778r779
6262VIDEO_START( jackal )
6363{
6464   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows,
65      TILEMAP_OPAQUE, 8, 8, 32, 32);
65      TILEMAP_TYPE_OPAQUE, 8, 8, 32, 32);
6666}
6767
6868static void draw_background( mame_bitmap *bitmap, const rectangle *cliprect )
src/mame/video/tank8.c
r778r779
8989   helper2 = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format);
9090   helper3 = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format);
9191
92   tilemap1 = tilemap_create(tank8_get_tile_info1, tilemap_scan_rows, TILEMAP_OPAQUE, 16, 16, 32, 32);
93   tilemap2 = tilemap_create(tank8_get_tile_info2, tilemap_scan_rows, TILEMAP_OPAQUE, 16, 16, 32, 32);
92   tilemap1 = tilemap_create(tank8_get_tile_info1, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE, 16, 16, 32, 32);
93   tilemap2 = tilemap_create(tank8_get_tile_info2, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE, 16, 16, 32, 32);
9494
9595   /* VBLANK starts on scanline #256 and ends on scanline #24 */
9696
src/mame/video/taitoic.c
r778r779
796796
797797      if (!PC080SN_dblwidth)   /* standard tilemaps */
798798      {
799         PC080SN_tilemap[i][0] = tilemap_create(PC080SN_get_tile_info[i][0],tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,64,64);
800         PC080SN_tilemap[i][1] = tilemap_create(PC080SN_get_tile_info[i][1],tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,64,64);
799         PC080SN_tilemap[i][0] = tilemap_create(PC080SN_get_tile_info[i][0],tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,64,64);
800         PC080SN_tilemap[i][1] = tilemap_create(PC080SN_get_tile_info[i][1],tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,64,64);
801801      }
802802      else   /* double width tilemaps */
803803      {
804         PC080SN_tilemap[i][0] = tilemap_create(PC080SN_get_tile_info[i][0],tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,128,64);
805         PC080SN_tilemap[i][1] = tilemap_create(PC080SN_get_tile_info[i][1],tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,128,64);
804         PC080SN_tilemap[i][0] = tilemap_create(PC080SN_get_tile_info[i][0],tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,128,64);
805         PC080SN_tilemap[i][1] = tilemap_create(PC080SN_get_tile_info[i][1],tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,128,64);
806806      }
807807
808808      PC080SN_ram[i] = auto_malloc(PC080SN_RAM_SIZE);
r778r779
15321532   TC0080VCO_bg_flip_yoffs = bg_flip_yoffs;   /* usually -2 */
15331533   TC0080VCO_has_tx = has_fg0;   /* for debugging only */
15341534
1535   TC0080VCO_tilemap[0] = tilemap_create(TC0080VCO_get_bg0_tile_info_0,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,64,64);
1536   TC0080VCO_tilemap[1] = tilemap_create(TC0080VCO_get_bg1_tile_info_0,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,64,64);
1535   TC0080VCO_tilemap[0] = tilemap_create(TC0080VCO_get_bg0_tile_info_0,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,64,64);
1536   TC0080VCO_tilemap[1] = tilemap_create(TC0080VCO_get_bg1_tile_info_0,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,64,64);
15371537   TC0080VCO_ram = auto_malloc(TC0080VCO_RAM_SIZE);
15381538
15391539   memset( TC0080VCO_ram,0,TC0080VCO_RAM_SIZE );
r778r779
15561556
15571557   /* Perform extra initialisations for text layer */
15581558   {
1559      TC0080VCO_tilemap[2] = tilemap_create(TC0080VCO_get_tx_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,64,64);
1559      TC0080VCO_tilemap[2] = tilemap_create(TC0080VCO_get_tx_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,64,64);
15601560      TC0080VCO_char_dirty = auto_malloc(TC0080VCO_TOTAL_CHARS);
15611561
15621562      TC0080VCO_dirty_chars();
r778r779
22912291      TC0100SCN_dblwidth[i]=0;
22922292
22932293      /* Single width versions */
2294      TC0100SCN_tilemap[i][0][0] = tilemap_create(TC0100SCN_get_tile_info[i][0],tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,64,64);
2295      TC0100SCN_tilemap[i][1][0] = tilemap_create(TC0100SCN_get_tile_info[i][1],tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,64,64);
2296      TC0100SCN_tilemap[i][2][0] = tilemap_create(TC0100SCN_get_tile_info[i][2],tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,64,64);
2294      TC0100SCN_tilemap[i][0][0] = tilemap_create(TC0100SCN_get_tile_info[i][0],tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,64,64);
2295      TC0100SCN_tilemap[i][1][0] = tilemap_create(TC0100SCN_get_tile_info[i][1],tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,64,64);
2296      TC0100SCN_tilemap[i][2][0] = tilemap_create(TC0100SCN_get_tile_info[i][2],tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,64,64);
22972297
22982298      /* Double width versions */
2299      TC0100SCN_tilemap[i][0][1] = tilemap_create(TC0100SCN_get_tile_info[i][0],tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,128,64);
2300      TC0100SCN_tilemap[i][1][1] = tilemap_create(TC0100SCN_get_tile_info[i][1],tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,128,64);
2301      TC0100SCN_tilemap[i][2][1] = tilemap_create(TC0100SCN_get_tile_info[i][2],tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,128,32);
2299      TC0100SCN_tilemap[i][0][1] = tilemap_create(TC0100SCN_get_tile_info[i][0],tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,128,64);
2300      TC0100SCN_tilemap[i][1][1] = tilemap_create(TC0100SCN_get_tile_info[i][1],tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,128,64);
2301      TC0100SCN_tilemap[i][2][1] = tilemap_create(TC0100SCN_get_tile_info[i][2],tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,128,32);
23022302
23032303      /* Set up clipping for multi-TC0100SCN games. We assume
23042304           this code won't ever affect single screen games:
r778r779
27882788void TC0280GRD_vh_start(int gfxnum)
27892789{
27902790   TC0280GRD_ram = auto_malloc(TC0280GRD_RAM_SIZE);
2791   TC0280GRD_tilemap = tilemap_create(TC0280GRD_get_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,64,64);
2791   TC0280GRD_tilemap = tilemap_create(TC0280GRD_get_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,64,64);
27922792
27932793   state_save_register_global_pointer(TC0280GRD_ram, TC0280GRD_RAM_SIZE/2);
27942794   state_save_register_global_array(TC0280GRD_ctrl);
r778r779
31663166      TC0480SCP_dblwidth=0;
31673167
31683168      /* Single width versions */
3169      TC0480SCP_tilemap[0][0] = tilemap_create(tc480_get_tile_info[0],tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,32,32);
3170      TC0480SCP_tilemap[1][0] = tilemap_create(tc480_get_tile_info[1],tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,32,32);
3171      TC0480SCP_tilemap[2][0] = tilemap_create(tc480_get_tile_info[2],tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,32,32);
3172      TC0480SCP_tilemap[3][0] = tilemap_create(tc480_get_tile_info[3],tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,32,32);
3173      TC0480SCP_tilemap[4][0] = tilemap_create(tc480_get_tile_info[4],tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,64,64);
3169      TC0480SCP_tilemap[0][0] = tilemap_create(tc480_get_tile_info[0],tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,32,32);
3170      TC0480SCP_tilemap[1][0] = tilemap_create(tc480_get_tile_info[1],tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,32,32);
3171      TC0480SCP_tilemap[2][0] = tilemap_create(tc480_get_tile_info[2],tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,32,32);
3172      TC0480SCP_tilemap[3][0] = tilemap_create(tc480_get_tile_info[3],tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,32,32);
3173      TC0480SCP_tilemap[4][0] = tilemap_create(tc480_get_tile_info[4],tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,64,64);
31743174
31753175      /* Double width versions */
3176      TC0480SCP_tilemap[0][1] = tilemap_create(tc480_get_tile_info[0],tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,64,32);
3177      TC0480SCP_tilemap[1][1] = tilemap_create(tc480_get_tile_info[1],tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,64,32);
3178      TC0480SCP_tilemap[2][1] = tilemap_create(tc480_get_tile_info[2],tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,64,32);
3179      TC0480SCP_tilemap[3][1] = tilemap_create(tc480_get_tile_info[3],tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,64,32);
3180      TC0480SCP_tilemap[4][1] = tilemap_create(tc480_get_tile_info[4],tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,64,64);
3176      TC0480SCP_tilemap[0][1] = tilemap_create(tc480_get_tile_info[0],tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,64,32);
3177      TC0480SCP_tilemap[1][1] = tilemap_create(tc480_get_tile_info[1],tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,64,32);
3178      TC0480SCP_tilemap[2][1] = tilemap_create(tc480_get_tile_info[2],tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,64,32);
3179      TC0480SCP_tilemap[3][1] = tilemap_create(tc480_get_tile_info[3],tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,64,32);
3180      TC0480SCP_tilemap[4][1] = tilemap_create(tc480_get_tile_info[4],tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,64,64);
31813181
31823182      TC0480SCP_ram = auto_malloc(TC0480SCP_RAM_SIZE);
31833183      TC0480SCP_char_dirty = auto_malloc(TC0480SCP_TOTAL_CHARS);
src/mame/video/namcos86.c
r778r779
131131
132132VIDEO_START( namcos86 )
133133{
134   bg_tilemap[0] = tilemap_create(get_tile_info0,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,64,32);
135   bg_tilemap[1] = tilemap_create(get_tile_info1,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,64,32);
136   bg_tilemap[2] = tilemap_create(get_tile_info2,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,64,32);
137   bg_tilemap[3] = tilemap_create(get_tile_info3,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,64,32);
134   bg_tilemap[0] = tilemap_create(get_tile_info0,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,64,32);
135   bg_tilemap[1] = tilemap_create(get_tile_info1,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,64,32);
136   bg_tilemap[2] = tilemap_create(get_tile_info2,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,64,32);
137   bg_tilemap[3] = tilemap_create(get_tile_info3,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,64,32);
138138
139139   tilemap_set_transparent_pen(bg_tilemap[0],7);
140140   tilemap_set_transparent_pen(bg_tilemap[1],7);
src/mame/video/suna8.c
r778r779
183183
184184#if TILEMAPS
185185   bg_tilemap = tilemap_create(   get_tile_info, tilemap_scan_cols,
186                        TILEMAP_TRANSPARENT,
186                        TILEMAP_TYPE_TRANSPARENT,
187187                        8,8,0x20*((suna8_text_dim > 0)?4:8),0x20);
188188
189189   tilemap_set_transparent_pen(bg_tilemap,15);
src/mame/video/nova2001.c
r778r779
149149VIDEO_START( nova2001 )
150150{
151151   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows,
152      TILEMAP_OPAQUE, 8, 8, 32, 32);
152      TILEMAP_TYPE_OPAQUE, 8, 8, 32, 32);
153153
154154   fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows,
155      TILEMAP_TRANSPARENT, 8, 8, 32, 32);
155      TILEMAP_TYPE_TRANSPARENT, 8, 8, 32, 32);
156156
157157   tilemap_set_transparent_pen(fg_tilemap, 0);
158158}
src/mame/video/cps1.c
r778r779
10201020      if (code == 0xf020) { gfxset = 4; code = 0; } // use a blank tile (see startup text..)
10211021
10221022   /* 0x0020 appears to never be drawn for CPS1 games (it is drawn for CPS2 games though, see gigawing '0' in score for example) */
1023   if (cps_version == 1 && code == 0x0020) { gfxset = 4; code = 0; tileinfo->pen_usage = 0x8000; }
1023   if (cps_version == 1 && code == 0x0020) { gfxset = 4; code = 0; }
10241024
10251025   SET_TILE_INFO(
10261026         gfxset,
r778r779
10511051   )
10521052   {
10531053      tileinfo->pen_data = empty_tile;
1054      tileinfo->pen_usage = 0x8000;
10551054   }
10561055}
10571056
r778r779
10851084   if (code < startcode || code > endcode)
10861085   {
10871086      tileinfo->pen_data = empty_tile;
1088      tileinfo->pen_usage = 0x8000;
10891087   }
10901088}
10911089
r778r779
11371135
11381136    machine_reset_cps(machine);
11391137
1140   cps1_bg_tilemap[0] = tilemap_create(get_tile0_info,tilemap0_scan,TILEMAP_SPLIT, 8, 8,64,64);
1141   cps1_bg_tilemap[1] = tilemap_create(get_tile1_info,tilemap1_scan,TILEMAP_SPLIT,16,16,64,64);
1142   cps1_bg_tilemap[2] = tilemap_create(get_tile2_info,tilemap2_scan,TILEMAP_SPLIT,32,32,64,64);
1138   cps1_bg_tilemap[0] = tilemap_create(get_tile0_info,tilemap0_scan,TILEMAP_TYPE_SPLIT, 8, 8,64,64);
1139   cps1_bg_tilemap[1] = tilemap_create(get_tile1_info,tilemap1_scan,TILEMAP_TYPE_SPLIT,16,16,64,64);
1140   cps1_bg_tilemap[2] = tilemap_create(get_tile2_info,tilemap2_scan,TILEMAP_TYPE_SPLIT,32,32,64,64);
11431141
11441142   /* front masks will change at runtime to handle sprite occluding */
11451143   cps1_update_transmasks();
src/mame/video/yunsun16.c
r778r779
102102VIDEO_START( yunsun16 )
103103{
104104   tilemap_0 = tilemap_create(   get_tile_info_0,yunsun16_tilemap_scan_pages,
105                        TILEMAP_TRANSPARENT,
105                        TILEMAP_TYPE_TRANSPARENT,
106106                        16,16,
107107                        TILES_PER_PAGE_X*PAGES_PER_TMAP_X,TILES_PER_PAGE_Y*PAGES_PER_TMAP_Y);
108108
109109   tilemap_1 = tilemap_create(   get_tile_info_1,yunsun16_tilemap_scan_pages,
110                        TILEMAP_TRANSPARENT,
110                        TILEMAP_TYPE_TRANSPARENT,
111111                        16,16,
112112                        TILES_PER_PAGE_X*PAGES_PER_TMAP_X,TILES_PER_PAGE_Y*PAGES_PER_TMAP_Y);
113113
src/mame/video/mermaid.c
r778r779
142142VIDEO_START( mermaid )
143143{
144144   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows,
145      TILEMAP_OPAQUE, 8, 8, 32, 32);
145      TILEMAP_TYPE_OPAQUE, 8, 8, 32, 32);
146146
147147   fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows,
148      TILEMAP_TRANSPARENT, 8, 8, 32, 32);
148      TILEMAP_TYPE_TRANSPARENT, 8, 8, 32, 32);
149149
150150   tilemap_set_scroll_cols(bg_tilemap, 32);
151151   tilemap_set_scroll_cols(fg_tilemap, 32);
src/mame/video/dcon.c
r778r779
131131
132132VIDEO_START( dcon )
133133{
134   background_layer = tilemap_create(get_back_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,     16,16,32,32);
135   foreground_layer = tilemap_create(get_fore_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,32,32);
136   midground_layer =  tilemap_create(get_mid_tile_info, tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,32,32);
137   text_layer =       tilemap_create(get_text_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,  8,8,64,32);
134   background_layer = tilemap_create(get_back_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,     16,16,32,32);
135   foreground_layer = tilemap_create(get_fore_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,32,32);
136   midground_layer =  tilemap_create(get_mid_tile_info, tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,32,32);
137   text_layer =       tilemap_create(get_text_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,  8,8,64,32);
138138
139139   tilemap_set_transparent_pen(midground_layer,15);
140140   tilemap_set_transparent_pen(foreground_layer,15);
src/mame/video/kickgoal.c
r778r779
5555
5656VIDEO_START( kickgoal )
5757{
58   kickgoal_fgtm = tilemap_create(get_kickgoal_fg_tile_info,tilemap_scan_kicksfg,TILEMAP_TRANSPARENT, 8, 16,64,64);
58   kickgoal_fgtm = tilemap_create(get_kickgoal_fg_tile_info,tilemap_scan_kicksfg,TILEMAP_TYPE_TRANSPARENT, 8, 16,64,64);
5959      tilemap_set_transparent_pen(kickgoal_fgtm,15);
60   kickgoal_bgtm = tilemap_create(get_kickgoal_bg_tile_info,tilemap_scan_kicksbg,TILEMAP_TRANSPARENT, 16, 32,64,64);
60   kickgoal_bgtm = tilemap_create(get_kickgoal_bg_tile_info,tilemap_scan_kicksbg,TILEMAP_TYPE_TRANSPARENT, 16, 32,64,64);
6161      tilemap_set_transparent_pen(kickgoal_bgtm,15);
62   kickgoal_bg2tm = tilemap_create(get_kickgoal_bg2_tile_info,tilemap_scan_kicksbg2,TILEMAP_OPAQUE, 32, 64,64,64);
62   kickgoal_bg2tm = tilemap_create(get_kickgoal_bg2_tile_info,tilemap_scan_kicksbg2,TILEMAP_TYPE_OPAQUE, 32, 64,64,64);
6363}
6464
6565
r778r779
200200
201201VIDEO_START( actionhw )
202202{
203   kickgoal_fgtm  = tilemap_create(get_actionhw_fg_tile_info,tilemap_scan_actionhwfg,TILEMAP_TRANSPARENT,  8, 8,64,64);
204   kickgoal_bgtm  = tilemap_create(get_actionhw_bg_tile_info,tilemap_scan_actionhwbg,TILEMAP_TRANSPARENT, 16,16,64,64);
205   kickgoal_bg2tm = tilemap_create(get_actionhw_bg2_tile_info,tilemap_scan_actionhwbg2,TILEMAP_OPAQUE,    16,16,64,64);
203   kickgoal_fgtm  = tilemap_create(get_actionhw_fg_tile_info,tilemap_scan_actionhwfg,TILEMAP_TYPE_TRANSPARENT,  8, 8,64,64);
204   kickgoal_bgtm  = tilemap_create(get_actionhw_bg_tile_info,tilemap_scan_actionhwbg,TILEMAP_TYPE_TRANSPARENT, 16,16,64,64);
205   kickgoal_bg2tm = tilemap_create(get_actionhw_bg2_tile_info,tilemap_scan_actionhwbg2,TILEMAP_TYPE_OPAQUE,    16,16,64,64);
206206
207207   tilemap_set_transparent_pen(kickgoal_fgtm,15);
208208   tilemap_set_transparent_pen(kickgoal_bgtm,15);
src/mame/video/galaxian.c
r778r779
514514
515515static void video_start_common(running_machine *machine, UINT32 (*get_memory_offset)(UINT32,UINT32,UINT32,UINT32))
516516{
517   bg_tilemap = tilemap_create(get_tile_info,get_memory_offset,TILEMAP_TRANSPARENT,8,8,32,32);
517   bg_tilemap = tilemap_create(get_tile_info,get_memory_offset,TILEMAP_TYPE_TRANSPARENT,8,8,32,32);
518518   tilemap_set_scrolldx(bg_tilemap, 0, -128);
519519
520520   tilemap_set_transparent_pen(bg_tilemap,0);
r778r779
813813VIDEO_START( rockclim )
814814{
815815   video_start_galaxian(machine);
816   rockclim_tilemap = tilemap_create(rockclim_get_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,8,8,64,32);
816   rockclim_tilemap = tilemap_create(rockclim_get_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,8,8,64,32);
817817   draw_background = rockclim_draw_background;
818818   modify_charcode = mooncrst_modify_charcode;
819819   modify_spritecode = rockclim_modify_spritecode;
r778r779
837837
838838VIDEO_START( drivfrcg )
839839{
840   bg_tilemap = tilemap_create(drivfrcg_get_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,32,32);
840   bg_tilemap = tilemap_create(drivfrcg_get_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,32,32);
841841
842842   tilemap_set_transparent_pen(bg_tilemap,0);
843843   tilemap_set_scroll_cols(bg_tilemap, 32);
r778r779
875875
876876VIDEO_START( ad2083 )
877877{
878   bg_tilemap = tilemap_create(drivfrcg_get_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,32,32);
878   bg_tilemap = tilemap_create(drivfrcg_get_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,32,32);
879879
880880   tilemap_set_transparent_pen(bg_tilemap,0);
881881   tilemap_set_scroll_cols(bg_tilemap, 32);
r778r779
933933
934934VIDEO_START( racknrol )
935935{
936   bg_tilemap = tilemap_create(racknrol_get_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,32,32);
936   bg_tilemap = tilemap_create(racknrol_get_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,32,32);
937937
938938   tilemap_set_transparent_pen(bg_tilemap,0);
939939   tilemap_set_scroll_cols(bg_tilemap, 32);
r778r779
10181018
10191019   /* make a copy of the tilemap to emulate background priority */
10201020   dambustr_videoram2 = auto_malloc(0x0400);
1021   dambustr_tilemap2 = tilemap_create(dambustr_get_tile_info2,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,32,32);
1021   dambustr_tilemap2 = tilemap_create(dambustr_get_tile_info2,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,32,32);
10221022
10231023   tilemap_set_transparent_pen(dambustr_tilemap2,0);
10241024}
src/mame/video/othldrby.c
r778r779
5959
6060VIDEO_START( othldrby )
6161{
62   bg_tilemap[0] = tilemap_create(get_tile_info0,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,32,32);
63   bg_tilemap[1] = tilemap_create(get_tile_info1,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,32,32);
64   bg_tilemap[2] = tilemap_create(get_tile_info2,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,32,32);
62   bg_tilemap[0] = tilemap_create(get_tile_info0,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,32,32);
63   bg_tilemap[1] = tilemap_create(get_tile_info1,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,32,32);
64   bg_tilemap[2] = tilemap_create(get_tile_info2,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,32,32);
6565
6666   vram = auto_malloc(VIDEORAM_SIZE * sizeof(vram[0]));
6767   buf_spriteram = auto_malloc(2*SPRITERAM_SIZE * sizeof(buf_spriteram[0]));
src/mame/video/bbusters.c
r778r779
7171
7272VIDEO_START( bbuster )
7373{
74   fix_tilemap = tilemap_create(get_bbuster_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,32,32);
75   pf1_tilemap = tilemap_create(get_pf1_tile_info,tilemap_scan_cols,TILEMAP_TRANSPARENT,16,16,128,32);
76   pf2_tilemap = tilemap_create(get_pf2_tile_info,tilemap_scan_cols,TILEMAP_TRANSPARENT,16,16,128,32);
74   fix_tilemap = tilemap_create(get_bbuster_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,32,32);
75   pf1_tilemap = tilemap_create(get_pf1_tile_info,tilemap_scan_cols,TILEMAP_TYPE_TRANSPARENT,16,16,128,32);
76   pf2_tilemap = tilemap_create(get_pf2_tile_info,tilemap_scan_cols,TILEMAP_TYPE_TRANSPARENT,16,16,128,32);
7777
7878   tilemap_set_transparent_pen(pf1_tilemap, 15);
7979   tilemap_set_transparent_pen(fix_tilemap, 15);
r778r779
8181
8282VIDEO_START( mechatt )
8383{
84   fix_tilemap = tilemap_create(get_bbuster_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,32,32);
85   pf1_tilemap = tilemap_create(get_pf1_tile_info,tilemap_scan_cols,TILEMAP_TRANSPARENT,16,16,256,32);
86   pf2_tilemap = tilemap_create(get_pf2_tile_info,tilemap_scan_cols,TILEMAP_TRANSPARENT,16,16,256,32);
84   fix_tilemap = tilemap_create(get_bbuster_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,32,32);
85   pf1_tilemap = tilemap_create(get_pf1_tile_info,tilemap_scan_cols,TILEMAP_TYPE_TRANSPARENT,16,16,256,32);
86   pf2_tilemap = tilemap_create(get_pf2_tile_info,tilemap_scan_cols,TILEMAP_TYPE_TRANSPARENT,16,16,256,32);
8787
8888   tilemap_set_transparent_pen(pf1_tilemap, 15);
8989   tilemap_set_transparent_pen(fix_tilemap, 15);
src/mame/video/gstriker.c
r778r779
6767
6868   for (i=0;i<numchips;i++)
6969   {
70      VS920A[i].tmap = tilemap_create(VS920A_get_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,64,32);
70      VS920A[i].tmap = tilemap_create(VS920A_get_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,64,32);
7171
7272      tilemap_set_transparent_pen(VS920A[i].tmap, 0);
7373   }
r778r779
225225
226226   for (i=0;i<numchips;i++)
227227   {
228      MB60553[i].tmap = tilemap_create(MB60553_get_tile_info,twc94_scan,TILEMAP_TRANSPARENT, 16,16,128,64);
228      MB60553[i].tmap = tilemap_create(MB60553_get_tile_info,twc94_scan,TILEMAP_TYPE_TRANSPARENT, 16,16,128,64);
229229
230230      tilemap_set_transparent_pen(MB60553[i].tmap, 0);
231231   }
src/mame/video/hyprduel.c
r778r779
147147   if (code & 0x8000) /* Special: draw a tile of a single color (i.e. not from the gfx ROMs) */
148148   {
149149      int _code = code & 0x000f;
150      tileinfo->tile_number = _code;
151150      tileinfo->pen_data = empty_tiles + _code*16*16;
152151      tileinfo->pal_data = &machine->remapped_colortable[(((code & 0x0ff0) ^ 0x0f0) + 0x1000)];
153      tileinfo->pen_usage = 0;
154152      tileinfo->flags = 0;
155153   }
156154   else
r778r779
185183   if (code & 0x8000) /* Special: draw a tile of a single color (i.e. not from the gfx ROMs) */
186184   {
187185      int _code = code & 0x000f;
188      tileinfo->tile_number = _code;
189186      tileinfo->pen_data = empty_tiles + _code*16*16;
190187      tileinfo->pal_data = &machine->remapped_colortable[(((code & 0x0ff0) ^ 0x0f0) + 0x1000)];
191      tileinfo->pen_usage = 0;
192188      tileinfo->flags = 0;
193189   }
194190   else if ((tile & 0x00f00000)==0x00f00000)   /* draw tile as 8bpp */
r778r779
228224   if (code & 0x8000) /* Special: draw a tile of a single color (i.e. not from the gfx ROMs) */
229225   {
230226      int _code = code & 0x000f;
231      tileinfo->tile_number = _code;
232227      tileinfo->pen_data = empty_tiles + _code*16*16;
233228      tileinfo->pal_data = &machine->remapped_colortable[(((code & 0x0ff0) ^ 0x0f0) + 0x1000)];
234      tileinfo->pen_usage = 0;
235229      tileinfo->flags = 0;
236230   }
237231   else if ((tile & 0x00f00000)==0x00f00000)   /* draw tile as 8bpp */
r778r779
323317   hypr_tiletable_old = auto_malloc(hyprduel_tiletable_size);
324318   dirtyindex = auto_malloc(hyprduel_tiletable_size/4);
325319
326   bg_tilemap[0] = tilemap_create(get_tile_info_0_8bit,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,WIN_NX,WIN_NY);
327   bg_tilemap[1] = tilemap_create(get_tile_info_1_8bit,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,WIN_NX,WIN_NY);
328   bg_tilemap[2] = tilemap_create(get_tile_info_2_8bit,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,WIN_NX,WIN_NY);
320   bg_tilemap[0] = tilemap_create(get_tile_info_0_8bit,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,WIN_NX,WIN_NY);
321   bg_tilemap[1] = tilemap_create(get_tile_info_1_8bit,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,WIN_NX,WIN_NY);
322   bg_tilemap[2] = tilemap_create(get_tile_info_2_8bit,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,WIN_NX,WIN_NY);
329323
330324   tilemap_set_transparent_pen(bg_tilemap[0],0);
331325   tilemap_set_transparent_pen(bg_tilemap[1],0);
src/mame/video/flstory.c
r778r779
4545
4646VIDEO_START( flstory )
4747{
48   bg_tilemap = tilemap_create( get_tile_info,tilemap_scan_rows,TILEMAP_SPLIT,8,8,32,32 );
48   bg_tilemap = tilemap_create( get_tile_info,tilemap_scan_rows,TILEMAP_TYPE_SPLIT,8,8,32,32 );
4949//  tilemap_set_transparent_pen( bg_tilemap,15 );
5050   tilemap_set_transmask(bg_tilemap,0,0x3fff,0xc000); /* split type 0 has pens 0-13 transparent in front half */
5151   tilemap_set_transmask(bg_tilemap,1,0x8000,0x7fff); /* split type 1 has pen 15 transparent in front half */
r778r779
5858
5959VIDEO_START( victnine )
6060{
61   bg_tilemap = tilemap_create( victnine_get_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,8,8,32,32 );
61   bg_tilemap = tilemap_create( victnine_get_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,8,8,32,32 );
6262   tilemap_set_scroll_cols(bg_tilemap,32);
6363
6464   paletteram = auto_malloc(0x200);
src/mame/video/suprslam.c
r778r779
139139
140140VIDEO_START( suprslam )
141141{
142   suprslam_bg_tilemap = tilemap_create(get_suprslam_bg_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE, 16, 16,64,64);
143   suprslam_screen_tilemap = tilemap_create(get_suprslam_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT, 8, 8,64,32);
142   suprslam_bg_tilemap = tilemap_create(get_suprslam_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE, 16, 16,64,64);
143   suprslam_screen_tilemap = tilemap_create(get_suprslam_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 8, 8,64,32);
144144
145145   K053936_wraparound_enable(0, 1);
146146   K053936_set_offset(0, -45, -21);
src/mame/video/strnskil.c
r778r779
7777VIDEO_START( strnskil )
7878{
7979   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_cols,
80      TILEMAP_OPAQUE, 8, 8, 32, 32);
80      TILEMAP_TYPE_OPAQUE, 8, 8, 32, 32);
8181
8282   tilemap_set_scroll_rows(bg_tilemap, 32);
8383}
src/mame/video/atetris.c
r778r779
4949
5050VIDEO_START( atetris )
5151{
52   bg_tilemap = tilemap_create(get_tile_info, tilemap_scan_rows, TILEMAP_OPAQUE, 8,8, 64,32);
52   bg_tilemap = tilemap_create(get_tile_info, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE, 8,8, 64,32);
5353}
5454
5555
src/mame/video/tia.c
r778r779
109109
110110static mame_bitmap *helper[3];
111111
112static UINT16 screen_height;
112113
113114static const int nusiz[8][3] =
114115{
r778r779
124125
125126static read16_handler   tia_read_input_port;
126127static read8_handler   tia_get_databus;
128static write16_handler   tia_vsync_callback;
127129
128130static void extend_palette(running_machine *machine) {
129131   int   i,j;
r778r779
271273VIDEO_START( tia )
272274{
273275   int cx = machine->screen[0].width;
274   int cy = machine->screen[0].height;
275276
276   helper[0] = auto_bitmap_alloc(cx, cy, machine->screen[0].format);
277   helper[1] = auto_bitmap_alloc(cx, cy, machine->screen[0].format);
278   helper[2] = auto_bitmap_alloc(cx, cy, machine->screen[0].format);
277   screen_height = machine->screen[0].height;
278   helper[0] = auto_bitmap_alloc(cx, TIA_MAX_SCREEN_HEIGHT, machine->screen[0].format);
279   helper[1] = auto_bitmap_alloc(cx, TIA_MAX_SCREEN_HEIGHT, machine->screen[0].format);
280   helper[2] = auto_bitmap_alloc(cx, TIA_MAX_SCREEN_HEIGHT, machine->screen[0].format);
279281}
280282
281283
282284VIDEO_UPDATE( tia )
283285{
286   screen_height = machine->screen[0].height;
284287   copybitmap(bitmap, helper[2], 0, 0, 0, 0,
285288      cliprect, TRANSPARENCY_NONE, 0);
286289   return 0;
r778r779
818821      if (collision_check(lineM0, lineM1, colx1, x2))
819822         CXPPMM |= 0x40;
820823
821      p = BITMAP_ADDR16(helper[current_bitmap], y % (helper[current_bitmap]->height), 34);
824      p = BITMAP_ADDR16(helper[current_bitmap], y % screen_height, 34);
822825
823826      for (x = x1; x < x2; x++)
824827      {
825828         p[x] = temp[x];
826829      }
827830
828      if ( x2 == 160 && y % (helper[current_bitmap]->height) == (helper[current_bitmap]->height - 1) ) {
829         // TODO: create combined screen in helper[2]
831      if ( x2 == 160 && y % screen_height == (screen_height - 1) ) {
830832         int   t_y;
831833         for ( t_y = 0; t_y < helper[2]->height; t_y++ ) {
832834            UINT16*   l0 = BITMAP_ADDR16( helper[current_bitmap], t_y, 0 );
r778r779
868870   {
869871      if (!(VSYNC & 2))
870872      {
871         if ( current_y() > 5 )
873         int curr_y = current_y();
874
875         if ( curr_y > 5 )
872876            update_bitmap(
873877               Machine->screen[0].width,
874878               Machine->screen[0].height);
875879
880         if ( tia_vsync_callback ) {
881            tia_vsync_callback( 0, curr_y, 0xFFFF );
882         }
883
876884         prev_y = 0;
877885         prev_x = 0;
878886
r778r779
11801188      {
11811189         setup_pXgfx();
11821190      }
1183      if (curr_y < helper[current_bitmap]->height)
1191      if (curr_y < screen_height)
11841192      {
11851193         memset(BITMAP_ADDR16(helper[current_bitmap], curr_y, 34), 0, 16);
11861194      }
r778r779
19821990   if ( ti ) {
19831991      tia_read_input_port = ti->read_input_port;
19841992      tia_get_databus = ti->databus_contents;
1993      tia_vsync_callback = ti->vsync_callback;
19851994   } else {
19861995      tia_read_input_port = NULL;
19871996      tia_get_databus = NULL;
1997      tia_vsync_callback = NULL;
19881998   }
19891999
19902000   tia_reset( Machine );
src/mame/video/shaolins.c
r778r779
148148VIDEO_START( shaolins )
149149{
150150   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows,
151      TILEMAP_OPAQUE, 8, 8, 32, 32);
151      TILEMAP_TYPE_OPAQUE, 8, 8, 32, 32);
152152
153153   tilemap_set_scroll_cols(bg_tilemap, 32);
154154}
src/mame/video/tia.h
r778r779
44#define TIA_PALETTE_LENGTH            128 + 128 * 128
55#define TIA_INPUT_PORT_ALWAYS_ON      0
66#define TIA_INPUT_PORT_ALWAYS_OFF      0xffff
7#define TIA_MAX_SCREEN_HEIGHT         342
78
89struct tia_interface {
910   read16_handler   read_input_port;
1011   read8_handler   databus_contents;
12   write16_handler   vsync_callback;
1113};
1214
1315PALETTE_INIT( tia_NTSC );
src/mame/video/sshangha.c
r778r779
172172
173173VIDEO_START( sshangha )
174174{
175   pf1_8x8_tilemap   = tilemap_create(get_pf1_8x8_tile_info,  tilemap_scan_rows,TILEMAP_TRANSPARENT, 8, 8,64,32);
176   pf1_16x16_tilemap = tilemap_create(get_pf1_16x16_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,32,32);
177   pf2_tilemap = tilemap_create(get_pf2_tile_info,tilemap_scan_rows,    TILEMAP_OPAQUE,     16,16,32,32);
175   pf1_8x8_tilemap   = tilemap_create(get_pf1_8x8_tile_info,  tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 8, 8,64,32);
176   pf1_16x16_tilemap = tilemap_create(get_pf1_16x16_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,32,32);
177   pf2_tilemap = tilemap_create(get_pf2_tile_info,tilemap_scan_rows,    TILEMAP_TYPE_OPAQUE,     16,16,32,32);
178178
179179   tilemap_set_transparent_pen(pf1_8x8_tilemap,0);
180180   tilemap_set_transparent_pen(pf1_16x16_tilemap,0);
src/mame/video/kyugo.c
r778r779
6363   color_codes = memory_region(REGION_PROMS) + 0x300;
6464
6565
66   fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows, TILEMAP_TRANSPARENT, 8,8, 64,32);
67   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, TILEMAP_OPAQUE,      8,8, 64,32);
66   fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 8,8, 64,32);
67   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE,      8,8, 64,32);
6868
6969   tilemap_set_transparent_pen(fg_tilemap,0);
7070
src/mame/video/segaic24.c
r778r779
148148
149149   sys24_char_dirtymap = auto_malloc(SYS24_TILES);
150150
151   sys24_tile_layer[0] = tilemap_create(sys24_tile_info_0s, tilemap_scan_rows, TILEMAP_TRANSPARENT, 8, 8, 64, 64);
152   sys24_tile_layer[1] = tilemap_create(sys24_tile_info_0w, tilemap_scan_rows, TILEMAP_TRANSPARENT, 8, 8, 64, 64);
153   sys24_tile_layer[2] = tilemap_create(sys24_tile_info_1s, tilemap_scan_rows, TILEMAP_TRANSPARENT, 8, 8, 64, 64);
154   sys24_tile_layer[3] = tilemap_create(sys24_tile_info_1w, tilemap_scan_rows, TILEMAP_TRANSPARENT, 8, 8, 64, 64);
151   sys24_tile_layer[0] = tilemap_create(sys24_tile_info_0s, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 8, 8, 64, 64);
152   sys24_tile_layer[1] = tilemap_create(sys24_tile_info_0w, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 8, 8, 64, 64);
153   sys24_tile_layer[2] = tilemap_create(sys24_tile_info_1s, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 8, 8, 64, 64);
154   sys24_tile_layer[3] = tilemap_create(sys24_tile_info_1w, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 8, 8, 64, 64);
155155
156156   tilemap_set_transparent_pen(sys24_tile_layer[0], 0);
157157   tilemap_set_transparent_pen(sys24_tile_layer[1], 0);
src/mame/video/popeye.c
r778r779
268268   bitmap_type = TYPE_SKYSKIPR;
269269
270270   fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows,
271      TILEMAP_TRANSPARENT, 16, 16, 32, 32);
271      TILEMAP_TYPE_TRANSPARENT, 16, 16, 32, 32);
272272
273273   tilemap_set_transparent_pen(fg_tilemap, 0);
274274}
r778r779
282282   bitmap_type = TYPE_POPEYE;
283283
284284   fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows,
285      TILEMAP_TRANSPARENT, 16, 16, 32, 32);
285      TILEMAP_TYPE_TRANSPARENT, 16, 16, 32, 32);
286286
287287   tilemap_set_transparent_pen(fg_tilemap, 0);
288288}
src/mame/video/4enraya.c
r778r779
2929
3030VIDEO_START( 4enraya )
3131{
32   bg_tilemap = tilemap_create( get_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,8,8,32,32 );
32   bg_tilemap = tilemap_create( get_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,8,8,32,32 );
3333   video_start_generic(machine);
3434}
3535
src/mame/video/blockade.c
r778r779
2525VIDEO_START( blockade )
2626{
2727   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows,
28      TILEMAP_OPAQUE, 8, 8, 32, 32);
28      TILEMAP_TYPE_OPAQUE, 8, 8, 32, 32);
2929}
3030
3131VIDEO_UPDATE( blockade )
src/mame/video/compgolf.c
r778r779
7171
7272VIDEO_START( compgolf )
7373{
74   background_tilemap = tilemap_create(get_back_info,back_scan,TILEMAP_OPAQUE, 16, 16, 32, 32);
75   text_tilemap = tilemap_create(get_text_info,tilemap_scan_rows,TILEMAP_TRANSPARENT, 8, 8, 32, 32);
74   background_tilemap = tilemap_create(get_back_info,back_scan,TILEMAP_TYPE_OPAQUE, 16, 16, 32, 32);
75   text_tilemap = tilemap_create(get_text_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 8, 8, 32, 32);
7676
7777   tilemap_set_transparent_pen(text_tilemap,0);
7878}
src/mame/video/lordgun.c
r778r779
123123VIDEO_START( lordgun )
124124{
125125   tilemap_0 = tilemap_create(   get_tile_info_0, tilemap_scan_rows,
126                        TILEMAP_TRANSPARENT, 8,8, 0x100, 0x40 );
126                        TILEMAP_TYPE_TRANSPARENT, 8,8, 0x100, 0x40 );
127127
128128   tilemap_1 = tilemap_create(   get_tile_info_1, tilemap_scan_rows,
129                        TILEMAP_TRANSPARENT, 16,16, 0x80,0x20 );
129                        TILEMAP_TYPE_TRANSPARENT, 16,16, 0x80,0x20 );
130130
131131   tilemap_2 = tilemap_create(   get_tile_info_2, tilemap_scan_rows,
132                        TILEMAP_TRANSPARENT, 32,32, 0x40,0x40 );
132                        TILEMAP_TYPE_TRANSPARENT, 32,32, 0x40,0x40 );
133133
134134   tilemap_3 = tilemap_create(   get_tile_info_3, tilemap_scan_rows,
135                        TILEMAP_TRANSPARENT, 8,8, 0x40,0x20 );
135                        TILEMAP_TYPE_TRANSPARENT, 8,8, 0x40,0x20 );
136136
137137   tilemap_set_scroll_rows(tilemap_0,1);
138138   tilemap_set_scroll_cols(tilemap_0,1);
src/mame/video/pushman.c
r778r779
4949
5050VIDEO_START( pushman )
5151{
52   bg_tilemap = tilemap_create(get_back_tile_info,background_scan_rows,TILEMAP_OPAQUE,     32,32,128,64);
53   tx_tilemap = tilemap_create(get_text_tile_info,tilemap_scan_rows,   TILEMAP_TRANSPARENT, 8, 8, 32,32);
52   bg_tilemap = tilemap_create(get_back_tile_info,background_scan_rows,TILEMAP_TYPE_OPAQUE,     32,32,128,64);
53   tx_tilemap = tilemap_create(get_text_tile_info,tilemap_scan_rows,   TILEMAP_TYPE_TRANSPARENT, 8, 8, 32,32);
5454
5555   tilemap_set_transparent_pen(tx_tilemap,3);
5656}
src/mame/video/lemmings.c
r778r779
9494VIDEO_START( lemmings )
9595{
9696   bitmap0 = auto_bitmap_alloc(2048,256,machine->screen[0].format);
97   vram_tilemap = tilemap_create(get_tile_info,tilemap_scan_cols,TILEMAP_TRANSPARENT,8,8,64,32);
97   vram_tilemap = tilemap_create(get_tile_info,tilemap_scan_cols,TILEMAP_TYPE_TRANSPARENT,8,8,64,32);
9898
9999   vram_buffer = (UINT8*)auto_malloc(2048*64); /* 64 bytes per VRAM character */
100100   vram_dirty = (UINT8*)auto_malloc(2048);
src/mame/video/zerozone.c
r778r779
4040{
4141   // i'm not 100% sure it should be opaque, pink title screen looks strange in las vegas girls
4242   // but if its transparent other things look incorrect
43   zerozone_tilemap = tilemap_create(get_zerozone_tile_info,tilemap_scan_cols,TILEMAP_OPAQUE,      8, 8, 64,32);
43   zerozone_tilemap = tilemap_create(get_zerozone_tile_info,tilemap_scan_cols,TILEMAP_TYPE_OPAQUE,      8, 8, 64,32);
4444}
4545
4646VIDEO_UPDATE( zerozone )
src/mame/video/espial.c
r778r779
100100
101101VIDEO_START( espial )
102102{
103   bg_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,8,8,32,32);
103   bg_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,8,8,32,32);
104104
105105   tilemap_set_scroll_cols(bg_tilemap, 32);
106106}
r778r779
108108VIDEO_START( netwars )
109109{
110110   /* Net Wars has a tile map that's twice as big as Espial's */
111   bg_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,8,8,32,64);
111   bg_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,8,8,32,64);
112112
113113   tilemap_set_scroll_cols(bg_tilemap, 32);
114114   tilemap_set_scrolldy(bg_tilemap, 0, 0x100);
src/mame/video/hyperspt.c
r778r779
106106VIDEO_START( hyperspt )
107107{
108108   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows,
109      TILEMAP_OPAQUE, 8, 8, 64, 32);
109      TILEMAP_TYPE_OPAQUE, 8, 8, 64, 32);
110110
111111   tilemap_set_scroll_rows(bg_tilemap, 32);
112112}
r778r779
183183VIDEO_START( roadf )
184184{
185185   bg_tilemap = tilemap_create(roadf_get_bg_tile_info, tilemap_scan_rows,
186      TILEMAP_OPAQUE, 8, 8, 64, 32);
186      TILEMAP_TYPE_OPAQUE, 8, 8, 64, 32);
187187
188188   tilemap_set_scroll_rows(bg_tilemap, 32);
189189}
src/mame/video/tiamc1.c
r778r779
142142VIDEO_START( tiamc1 )
143143{
144144   bg_tilemap1 = tilemap_create(get_bg1_tile_info, tilemap_scan_rows,
145      TILEMAP_OPAQUE, 8, 8, 32, 32);
145      TILEMAP_TYPE_OPAQUE, 8, 8, 32, 32);
146146
147147   bg_tilemap2 = tilemap_create(get_bg2_tile_info, tilemap_scan_rows,
148      TILEMAP_OPAQUE, 8, 8, 32, 32);
148      TILEMAP_TYPE_OPAQUE, 8, 8, 32, 32);
149149
150150   tiamc1_bg_vshift = 0;
151151   tiamc1_bg_hshift = 0;
src/mame/video/toaplan1.c
r778r779
255255
256256static void toaplan1_create_tilemaps(void)
257257{
258   pf1_tilemap = tilemap_create(get_pf1_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,64,64);
259   pf2_tilemap = tilemap_create(get_pf2_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,64,64);
260   pf3_tilemap = tilemap_create(get_pf3_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,64,64);
261   pf4_tilemap = tilemap_create(get_pf4_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,64,64);
258   pf1_tilemap = tilemap_create(get_pf1_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,64,64);
259   pf2_tilemap = tilemap_create(get_pf2_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,64,64);
260   pf3_tilemap = tilemap_create(get_pf3_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,64,64);
261   pf4_tilemap = tilemap_create(get_pf4_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,64,64);
262262
263263   tilemap_set_transparent_pen(pf1_tilemap,0);
264264   tilemap_set_transparent_pen(pf2_tilemap,0);
src/mame/video/segag80r.c
r778r779
227227      /* and one vertically scrolling */
228228      case G80_BACKGROUND_SPACEOD:
229229         spaceod_bg_init_palette(machine);
230         spaceod_bg_htilemap = tilemap_create(spaceod_get_tile_info, spaceod_scan_rows, TILEMAP_OPAQUE, 8,8, 128,32);
231         spaceod_bg_vtilemap = tilemap_create(spaceod_get_tile_info, spaceod_scan_rows, TILEMAP_OPAQUE, 8,8, 32,128);
230         spaceod_bg_htilemap = tilemap_create(spaceod_get_tile_info, spaceod_scan_rows, TILEMAP_TYPE_OPAQUE, 8,8, 128,32);
231         spaceod_bg_vtilemap = tilemap_create(spaceod_get_tile_info, spaceod_scan_rows, TILEMAP_TYPE_OPAQUE, 8,8, 32,128);
232232         break;
233233
234234      /* background tilemap is effectively 1 screen x n screens */
235235      case G80_BACKGROUND_MONSTERB:
236         bg_tilemap = tilemap_create(bg_get_tile_info, tilemap_scan_rows, TILEMAP_OPAQUE, 8,8, 32,memory_region_length(REGION_GFX2) / 32);
236         bg_tilemap = tilemap_create(bg_get_tile_info, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE, 8,8, 32,memory_region_length(REGION_GFX2) / 32);
237237         break;
238238
239239      /* background tilemap is effectively 4 screens x n screens */
240240      case G80_BACKGROUND_PIGNEWT:
241241      case G80_BACKGROUND_SINDBADM:
242         bg_tilemap = tilemap_create(bg_get_tile_info, tilemap_scan_rows, TILEMAP_OPAQUE, 8,8, 128,memory_region_length(REGION_GFX2) / 128);
242         bg_tilemap = tilemap_create(bg_get_tile_info, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE, 8,8, 128,memory_region_length(REGION_GFX2) / 128);
243243         break;
244244   }
245245
src/mame/video/tmnt.c
r778r779
279279   K052109_vh_start(machine,REGION_GFX1,NORMAL_PLANE_ORDER,tmnt_tile_callback);
280280   K053245_vh_start(machine,0, REGION_GFX2,NORMAL_PLANE_ORDER,lgtnfght_sprite_callback);
281281
282   roz_tilemap = tilemap_create(glfgreat_get_roz_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,512,512);
282   roz_tilemap = tilemap_create(glfgreat_get_roz_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,512,512);
283283
284284   tilemap_set_transparent_pen(roz_tilemap,0);
285285
r778r779
300300   K052109_vh_start(machine,REGION_GFX1,NORMAL_PLANE_ORDER,tmnt_tile_callback);
301301   K053245_vh_start(machine,0, REGION_GFX2,NORMAL_PLANE_ORDER,prmrsocr_sprite_callback);
302302
303   roz_tilemap = tilemap_create(prmrsocr_get_roz_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,512,256);
303   roz_tilemap = tilemap_create(prmrsocr_get_roz_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,512,256);
304304
305305   tilemap_set_transparent_pen(roz_tilemap,0);
306306
src/mame/video/zodiack.c
r778r779
133133VIDEO_START( zodiack )
134134{
135135   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows,
136      TILEMAP_OPAQUE, 8, 8, 32, 32);
136      TILEMAP_TYPE_OPAQUE, 8, 8, 32, 32);
137137
138138   fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows,
139      TILEMAP_TRANSPARENT, 8, 8, 32, 32);
139      TILEMAP_TYPE_TRANSPARENT, 8, 8, 32, 32);
140140
141141   tilemap_set_transparent_pen(fg_tilemap, 0);
142142   tilemap_set_scroll_cols(fg_tilemap, 32);
src/mame/video/dc.c
r778r779
1/*
2   dc.c - Dreamcast video emulation
3
4*/
5
6#include "driver.h"
7#include "dc.h"
8
9VIDEO_START(dc)
10{
11}
12
13VIDEO_UPDATE(dc)
14{
15   return 0;
16}
17
18READ64_HANDLER( pvr_ctrl_r )
19{   
20   return 0;
21}
22
23WRITE64_HANDLER( pvr_ctrl_w )
24{
25   mame_printf_verbose("PVRCTRL: write %llx to %x, mask %llx\n", data, offset, mem_mask);
26}
27
28READ64_HANDLER( pvr_ta_r )
29{   
30   return 0;
31}
32
33WRITE64_HANDLER( pvr_ta_w )
34{
35   mame_printf_verbose("PVR TA: write %llx to %x, mask %llx\n", data, offset, mem_mask);
36}
37
38
39WRITE64_HANDLER( ta_fifo_poly_w )
40{
41   mame_printf_verbose("Poly FIFO: write %llx to %x, mask %llx\n", data, offset, mem_mask);
42}
43
44WRITE64_HANDLER( ta_fifo_yuv_w )
45{
46   mame_printf_verbose("YUV FIFO: write %llx to %x, mask %llx\n", data, offset, mem_mask);
47}
48
1/*
2    dc.c - Dreamcast video emulation
3 
4*/
5 
6#include "driver.h"
7#include "dc.h"
8 
9VIDEO_START(dc)
10{
11}
12 
13VIDEO_UPDATE(dc)
14{
15   return 0;
16}
17 
18READ64_HANDLER( pvr_ctrl_r )
19{
20   return 0;
21}
22 
23WRITE64_HANDLER( pvr_ctrl_w )
24{
25   mame_printf_verbose("PVRCTRL: write %llx to %x, mask %llx\n", data, offset, mem_mask);
26}
27 
28READ64_HANDLER( pvr_ta_r )
29{
30   return 0;
31}
32 
33WRITE64_HANDLER( pvr_ta_w )
34{
35   mame_printf_verbose("PVR TA: write %llx to %x, mask %llx\n", data, offset, mem_mask);
36}
37 
38 
39WRITE64_HANDLER( ta_fifo_poly_w )
40{
41   mame_printf_verbose("Poly FIFO: write %llx to %x, mask %llx\n", data, offset, mem_mask);
42}
43 
44WRITE64_HANDLER( ta_fifo_yuv_w )
45{
46   mame_printf_verbose("YUV FIFO: write %llx to %x, mask %llx\n", data, offset, mem_mask);
47}
48 
src/mame/video/mole.c
r778r779
3232   tileram = (UINT16 *)auto_malloc(0x400 * sizeof(UINT16));
3333
3434   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows,
35      TILEMAP_OPAQUE, 8, 8, 40, 25);
35      TILEMAP_TYPE_OPAQUE, 8, 8, 40, 25);
3636}
3737
3838WRITE8_HANDLER( mole_videoram_w )
src/mame/video/taitojc.c
r778r779
189189
190190   assert(taitojc_gfx_index != MAX_GFX_ELEMENTS);
191191
192   taitojc_tilemap = tilemap_create(taitojc_tile_info, tilemap_scan_rows, TILEMAP_TRANSPARENT, 16, 16, 64, 64);
192   taitojc_tilemap = tilemap_create(taitojc_tile_info, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 16, 16, 64, 64);
193193   taitojc_dirty_map = auto_malloc(TAITOJC_NUM_TILES);
194194
195195   tilemap_set_transparent_pen(taitojc_tilemap, 0);
src/mame/video/pitnrun.c
r778r779
177177
178178VIDEO_START(pitnrun)
179179{
180   fg = tilemap_create( get_tile_info1,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,32,32 );
181   bg = tilemap_create( get_tile_info2,tilemap_scan_rows,TILEMAP_OPAQUE,8,8,32*4,32 );
180   fg = tilemap_create( get_tile_info1,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,32,32 );
181   bg = tilemap_create( get_tile_info2,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,8,8,32*4,32 );
182182   tilemap_set_transparent_pen( fg, 0 );
183183   tmp_bitmap[0] = auto_bitmap_alloc(128,128,machine->screen[0].format);
184184   tmp_bitmap[1] = auto_bitmap_alloc(128,128,machine->screen[0].format);
src/mame/video/segaic16.c
r778r779
12651265   }
12661266
12671267   /* create the tilemap for the text layer */
1268   info->textmap = tilemap_create(get_text_info, tilemap_scan_rows, TILEMAP_TRANSPARENT, 8,8, 64,28);
1268   info->textmap = tilemap_create(get_text_info, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 8,8, 64,28);
12691269
12701270   /* configure it */
12711271   info->textmap_info.rambase = info->textram;
r778r779
12811281   for (pagenum = 0; pagenum < info->numpages; pagenum++)
12821282   {
12831283      /* each page is 64x32 */
1284      info->tilemaps[pagenum] = tilemap_create(get_tile_info, tilemap_scan_rows, TILEMAP_TRANSPARENT, 8,8, 64,32);
1284      info->tilemaps[pagenum] = tilemap_create(get_tile_info, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 8,8, 64,32);
12851285
12861286      /* configure the tilemap */
12871287      info->tilemap_info[pagenum].rambase = info->tileram + pagenum * 64*32;
src/mame/video/tehkanwc.c
r778r779
9292VIDEO_START( tehkanwc )
9393{
9494   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows,
95      TILEMAP_OPAQUE, 16, 8, 32, 32);
95      TILEMAP_TYPE_OPAQUE, 16, 8, 32, 32);
9696
9797   fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows,
98      TILEMAP_TRANSPARENT, 8, 8, 32, 32);
98      TILEMAP_TYPE_TRANSPARENT, 8, 8, 32, 32);
9999
100100   tilemap_set_transparent_pen(fg_tilemap, 0);
101101}
src/mame/video/bionicc.c
r778r779
9191
9292VIDEO_START( bionicc )
9393{
94   tx_tilemap = tilemap_create(get_tx_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,  8,8,32,32);
95   fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_SPLIT,      16,16,64,64);
96   bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,  8,8,64,64);
94   tx_tilemap = tilemap_create(get_tx_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,  8,8,32,32);
95   fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_SPLIT,      16,16,64,64);
96   bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,  8,8,64,64);
9797
9898   tilemap_set_transparent_pen(tx_tilemap,3);
9999   tilemap_set_transmask(fg_tilemap,0,0xffff,0x8000); /* split type 0 is completely transparent in front half */
src/mame/video/citycon.c
r778r779
6060
6161VIDEO_START( citycon )
6262{
63   fg_tilemap = tilemap_create(get_fg_tile_info,citycon_scan,TILEMAP_TRANSPARENT,8,8,128,32);
64   bg_tilemap = tilemap_create(get_bg_tile_info,citycon_scan,TILEMAP_OPAQUE,     8,8,128,32);
63   fg_tilemap = tilemap_create(get_fg_tile_info,citycon_scan,TILEMAP_TYPE_TRANSPARENT,8,8,128,32);
64   bg_tilemap = tilemap_create(get_bg_tile_info,citycon_scan,TILEMAP_TYPE_OPAQUE,     8,8,128,32);
6565
6666   tilemap_set_transparent_pen(fg_tilemap,0);
6767   tilemap_set_scroll_rows(fg_tilemap,32);
src/mame/video/suprridr.c
r778r779
4747
4848VIDEO_START( suprridr )
4949{
50   fg_tilemap          = tilemap_create(get_tile_info2, tilemap_scan_rows, TILEMAP_TRANSPARENT, 8,8, 32,32);
51   bg_tilemap          = tilemap_create(get_tile_info,  tilemap_scan_rows, TILEMAP_OPAQUE,      8,8, 32,32);
52   bg_tilemap_noscroll = tilemap_create(get_tile_info,  tilemap_scan_rows, TILEMAP_OPAQUE,      8,8, 32,32);
50   fg_tilemap          = tilemap_create(get_tile_info2, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 8,8, 32,32);
51   bg_tilemap          = tilemap_create(get_tile_info,  tilemap_scan_rows, TILEMAP_TYPE_OPAQUE,      8,8, 32,32);
52   bg_tilemap_noscroll = tilemap_create(get_tile_info,  tilemap_scan_rows, TILEMAP_TYPE_OPAQUE,      8,8, 32,32);
5353
5454   tilemap_set_transparent_pen(fg_tilemap, 0);
5555}
src/mame/video/psikyo.c
r778r779
170170
171171   tilemap_0_size0   =   tilemap_create(   get_tile_info_0,
172172                           tilemap_scan_rows,
173                           TILEMAP_TRANSPARENT,
173                           TILEMAP_TYPE_TRANSPARENT,
174174                           16,16,
175175                           0x20, 0x80 );
176176   tilemap_0_size1   =   tilemap_create(   get_tile_info_0,
177177                           tilemap_scan_rows,
178                           TILEMAP_TRANSPARENT,
178                           TILEMAP_TYPE_TRANSPARENT,
179179                           16,16,
180180                           0x40, 0x40 );
181181
182182   tilemap_0_size2   =   tilemap_create(   get_tile_info_0,
183183                           tilemap_scan_rows,
184                           TILEMAP_TRANSPARENT,
184                           TILEMAP_TYPE_TRANSPARENT,
185185                           16,16,
186186                           0x80, 0x20 );
187187
188188   tilemap_0_size3   =   tilemap_create(   get_tile_info_0,
189189                           tilemap_scan_rows,
190                           TILEMAP_TRANSPARENT,
190                           TILEMAP_TYPE_TRANSPARENT,
191191                           16,16,
192192                           0x100, 0x10 );
193193
194194   tilemap_1_size0   =   tilemap_create(   get_tile_info_1,
195195                           tilemap_scan_rows,
196                           TILEMAP_TRANSPARENT,
196                           TILEMAP_TYPE_TRANSPARENT,
197197                           16,16,
198198                           0x20, 0x80 );
199199
200200   tilemap_1_size1   =   tilemap_create(   get_tile_info_1,
201201                           tilemap_scan_rows,
202                           TILEMAP_TRANSPARENT,
202                           TILEMAP_TYPE_TRANSPARENT,
203203                           16,16,
204204                           0x40, 0x40 );
205205
206206   tilemap_1_size2   =   tilemap_create(   get_tile_info_1,
207207                           tilemap_scan_rows,
208                           TILEMAP_TRANSPARENT,
208                           TILEMAP_TYPE_TRANSPARENT,
209209                           16,16,
210210                           0x80, 0x20 );
211211
212212   tilemap_1_size3   =   tilemap_create(   get_tile_info_1,
213213                           tilemap_scan_rows,
214                           TILEMAP_TRANSPARENT,
214                           TILEMAP_TYPE_TRANSPARENT,
215215                           16,16,
216216                           0x100, 0x10 );
217217
src/mame/video/playmark.c
r778r779
111111
112112VIDEO_START( bigtwin )
113113{
114   tx_tilemap = tilemap_create(bigtwin_get_tx_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT, 8, 8,64,32);
115   fg_tilemap = tilemap_create(bigtwin_get_fg_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,     16,16,32,32);
114   tx_tilemap = tilemap_create(bigtwin_get_tx_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 8, 8,64,32);
115   fg_tilemap = tilemap_create(bigtwin_get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,     16,16,32,32);
116116
117117   tilemap_set_transparent_pen(tx_tilemap,0);
118118
r778r779
124124
125125VIDEO_START( wbeachvl )
126126{
127   tx_tilemap = tilemap_create(wbeachvl_get_tx_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT, 8, 8,64,32);
128   fg_tilemap = tilemap_create(wbeachvl_get_fg_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,64,32);
129   bg_tilemap = tilemap_create(wbeachvl_get_bg_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,     16,16,64,32);
127   tx_tilemap = tilemap_create(wbeachvl_get_tx_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 8, 8,64,32);
128   fg_tilemap = tilemap_create(wbeachvl_get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,64,32);
129   bg_tilemap = tilemap_create(wbeachvl_get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,     16,16,64,32);
130130
131131   tilemap_set_transparent_pen(tx_tilemap,0);
132132   tilemap_set_transparent_pen(fg_tilemap,0);
r778r779
138138
139139VIDEO_START( excelsr )
140140{
141   tx_tilemap = tilemap_create(bigtwin_get_tx_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,32,32);
142   fg_tilemap = tilemap_create(bigtwin_get_fg_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,     16,16,32,32);
141   tx_tilemap = tilemap_create(bigtwin_get_tx_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,32,32);
142   fg_tilemap = tilemap_create(bigtwin_get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,     16,16,32,32);
143143
144144   tilemap_set_transparent_pen(tx_tilemap,0);
145145
r778r779
150150
151151VIDEO_START( hotmind )
152152{
153   tx_tilemap = tilemap_create(hrdtimes_get_tx_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT, 8, 8,64,64);
154   fg_tilemap = tilemap_create(hrdtimes_get_fg_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,32,32);
155   bg_tilemap = tilemap_create(hrdtimes_get_bg_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,     16,16,32,32);
153   tx_tilemap = tilemap_create(hrdtimes_get_tx_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 8, 8,64,64);
154   fg_tilemap = tilemap_create(hrdtimes_get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,32,32);
155   bg_tilemap = tilemap_create(hrdtimes_get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,     16,16,32,32);
156156
157157   tilemap_set_transparent_pen(tx_tilemap,0);
158158   tilemap_set_transparent_pen(fg_tilemap,0);
r778r779
172172
173173VIDEO_START( hrdtimes )
174174{
175   tx_tilemap = tilemap_create(hrdtimes_get_tx_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT, 8, 8,64,64);
176   fg_tilemap = tilemap_create(hrdtimes_get_fg_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,32,32);
177   bg_tilemap = tilemap_create(hrdtimes_get_bg_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,     16,16,32,32);
175   tx_tilemap = tilemap_create(hrdtimes_get_tx_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 8, 8,64,64);
176   fg_tilemap = tilemap_create(hrdtimes_get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,32,32);
177   bg_tilemap = tilemap_create(hrdtimes_get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,     16,16,32,32);
178178
179179   tilemap_set_transparent_pen(tx_tilemap,0);
180180   tilemap_set_transparent_pen(fg_tilemap,0);
src/mame/video/esd16.c
r778r779
131131VIDEO_START( esd16 )
132132{
133133   esdtilemap_0 = tilemap_create(   get_tile_info_0, tilemap_scan_rows,
134                        TILEMAP_OPAQUE,         8,8,   0x80,0x40);
134                        TILEMAP_TYPE_OPAQUE,         8,8,   0x80,0x40);
135135
136136   esdtilemap_1 = tilemap_create(   get_tile_info_1, tilemap_scan_rows,
137                        TILEMAP_TRANSPARENT,   8,8,   0x80,0x40);
137                        TILEMAP_TYPE_TRANSPARENT,   8,8,   0x80,0x40);
138138
139139   /* hedpanic changes tilemap 1 to 16x16 at various times */
140140   esdtilemap_1_16x16 = tilemap_create(   get_tile_info_1_16x16, tilemap_scan_rows,
141                        TILEMAP_TRANSPARENT,   16,16,   0x40,0x40);
141                        TILEMAP_TYPE_TRANSPARENT,   16,16,   0x40,0x40);
142142
143143   tilemap_set_scrolldx(esdtilemap_0, -0x60 + 2, -0x60     );
144144   tilemap_set_scrolldx(esdtilemap_1, -0x60    , -0x60 + 2 );
src/mame/video/pgm.c
r778r779
307307
308308VIDEO_START( pgm )
309309{
310   pgm_tx_tilemap= tilemap_create(get_pgm_tx_tilemap_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT, 8, 8,64,32);
310   pgm_tx_tilemap= tilemap_create(get_pgm_tx_tilemap_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 8, 8,64,32);
311311   tilemap_set_transparent_pen(pgm_tx_tilemap,15);
312312
313   pgm_bg_tilemap = tilemap_create(get_pgm_bg_tilemap_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT, 32, 32,64,64);
313   pgm_bg_tilemap = tilemap_create(get_pgm_bg_tilemap_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 32, 32,64,64);
314314   tilemap_set_transparent_pen(pgm_bg_tilemap,31);
315315   tilemap_set_scroll_rows(pgm_bg_tilemap,64*32);
316316
src/mame/video/iqblock.c
r778r779
4747
4848VIDEO_START( iqblock )
4949{
50   bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,     8, 8,64,32);
51   fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,8,32,64, 8);
50   bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,     8, 8,64,32);
51   fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,8,32,64, 8);
5252
5353   tilemap_set_transparent_pen(bg_tilemap,0);
5454   tilemap_set_scroll_cols(fg_tilemap,64);
src/mame/video/darius.c
r778r779
4545
4646VIDEO_START( darius )
4747{
48   fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,128,64);
48   fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,128,64);
4949
5050   spritelist = auto_malloc(0x800 * sizeof(*spritelist));
5151
src/mame/video/cbasebal.c
r778r779
4848   cbasebal_textram = auto_malloc(0x1000);
4949   cbasebal_scrollram = auto_malloc(0x1000);
5050
51   bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,   16,16,64,32);
52   fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,64,32);
51   bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,   16,16,64,32);
52   fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,64,32);
5353
5454   tilemap_set_transparent_pen(fg_tilemap,3);
5555}
src/mame/video/sbasketb.c
r778r779
125125VIDEO_START( sbasketb )
126126{
127127   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows,
128      TILEMAP_OPAQUE, 8, 8, 32, 32);
128      TILEMAP_TYPE_OPAQUE, 8, 8, 32, 32);
129129
130130   tilemap_set_scroll_cols(bg_tilemap, 32);
131131}
src/mame/video/ksayakyu.c
r778r779
100100
101101VIDEO_START(ksayakyu)
102102{
103   ksayakyu_tilemap = tilemap_create(get_ksayakyu_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE, 8, 8,32,32*8);
104   ksayakyu_textmap = tilemap_create(get_text_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT, 8, 8,32,32);
103   ksayakyu_tilemap = tilemap_create(get_ksayakyu_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE, 8, 8,32,32*8);
104   ksayakyu_textmap = tilemap_create(get_text_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 8, 8,32,32);
105105   tilemap_set_transparent_pen(ksayakyu_textmap,0);
106106}
107107
src/mame/video/ironhors.c
r778r779
155155VIDEO_START( ironhors )
156156{
157157   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows,
158      TILEMAP_OPAQUE, 8, 8, 32, 32);
158      TILEMAP_TYPE_OPAQUE, 8, 8, 32, 32);
159159
160160   tilemap_set_scroll_rows(bg_tilemap, 32);
161161}
src/mame/video/battlex.c
r778r779
7878VIDEO_START( battlex )
7979{
8080   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows,
81      TILEMAP_OPAQUE, 8, 8, 64, 32);
81      TILEMAP_TYPE_OPAQUE, 8, 8, 64, 32);
8282}
8383
8484static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect )
src/mame/video/skullxbo.c
r778r779
8383   };
8484
8585   /* initialize the playfield */
86   atarigen_playfield_tilemap = tilemap_create(get_playfield_tile_info, tilemap_scan_cols, TILEMAP_OPAQUE, 16,8, 64,64);
86   atarigen_playfield_tilemap = tilemap_create(get_playfield_tile_info, tilemap_scan_cols, TILEMAP_TYPE_OPAQUE, 16,8, 64,64);
8787
8888   /* initialize the motion objects */
8989   atarimo_init(machine, 0, &modesc);
9090
9191   /* initialize the alphanumerics */
92   atarigen_alpha_tilemap = tilemap_create(get_alpha_tile_info, tilemap_scan_rows, TILEMAP_TRANSPARENT, 16,8, 64,32);
92   atarigen_alpha_tilemap = tilemap_create(get_alpha_tile_info, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 16,8, 64,32);
9393   tilemap_set_transparent_pen(atarigen_alpha_tilemap, 0);
9494}
9595
src/mame/video/glass.c
r778r779
131131
132132VIDEO_START( glass )
133133{
134   pant[0] = tilemap_create(get_tile_info_glass_screen0,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,32,32);
135   pant[1] = tilemap_create(get_tile_info_glass_screen1,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,32,32);
134   pant[0] = tilemap_create(get_tile_info_glass_screen0,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,32,32);
135   pant[1] = tilemap_create(get_tile_info_glass_screen1,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,32,32);
136136   screen_bitmap = auto_bitmap_alloc (320, 200, machine->screen[0].format);
137137
138138   tilemap_set_transparent_pen(pant[0],0);
src/mame/video/mcatadv.c
r778r779
251251
252252VIDEO_START( mcatadv )
253253{
254   mcatadv_tilemap1 = tilemap_create(get_mcatadv_tile_info1,tilemap_scan_rows,TILEMAP_TRANSPARENT, 16, 16,32,32);
254   mcatadv_tilemap1 = tilemap_create(get_mcatadv_tile_info1,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 16, 16,32,32);
255255   tilemap_set_transparent_pen(mcatadv_tilemap1,0);
256256
257   mcatadv_tilemap2 = tilemap_create(get_mcatadv_tile_info2,tilemap_scan_rows,TILEMAP_TRANSPARENT, 16, 16,32,32);
257   mcatadv_tilemap2 = tilemap_create(get_mcatadv_tile_info2,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 16, 16,32,32);
258258   tilemap_set_transparent_pen(mcatadv_tilemap2,0);
259259
260260   spriteram_old = auto_malloc(spriteram_size);
src/mame/video/toaplan2.c
r778r779
405405***************************************************************************/
406406static void create_tilemaps_0(void)
407407{
408   top_tilemap[0] = tilemap_create(get_top0_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,32,32);
409   fg_tilemap[0] = tilemap_create(get_fg0_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,32,32);
410   bg_tilemap[0] = tilemap_create(get_bg0_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,32,32);
408   top_tilemap[0] = tilemap_create(get_top0_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,32,32);
409   fg_tilemap[0] = tilemap_create(get_fg0_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,32,32);
410   bg_tilemap[0] = tilemap_create(get_bg0_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,32,32);
411411
412412   tilemap_set_transparent_pen(top_tilemap[0],0);
413413   tilemap_set_transparent_pen(fg_tilemap[0],0);
r778r779
416416
417417static void create_tilemaps_1(void)
418418{
419   top_tilemap[1] = tilemap_create(get_top1_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,32,32);
420   fg_tilemap[1] = tilemap_create(get_fg1_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,32,32);
421   bg_tilemap[1] = tilemap_create(get_bg1_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,32,32);
419   top_tilemap[1] = tilemap_create(get_top1_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,32,32);
420   fg_tilemap[1] = tilemap_create(get_fg1_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,32,32);
421   bg_tilemap[1] = tilemap_create(get_bg1_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,32,32);
422422
423423   tilemap_set_transparent_pen(top_tilemap[1],0);
424424   tilemap_set_transparent_pen(fg_tilemap[1],0);
r778r779
427427
428428static void truxton2_create_tilemaps_0(void)
429429{
430   tx_tilemap = tilemap_create(get_text_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,64,32);
431   top_tilemap[0] = tilemap_create(get_top0_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,32,32);
432   fg_tilemap[0] = tilemap_create(get_fg0_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,32,32);
433   bg_tilemap[0] = tilemap_create(get_bg0_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,32,32);
430   tx_tilemap = tilemap_create(get_text_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,64,32);
431   top_tilemap[0] = tilemap_create(get_top0_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,32,32);
432   fg_tilemap[0] = tilemap_create(get_fg0_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,32,32);
433   bg_tilemap[0] = tilemap_create(get_bg0_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,32,32);
434434
435435   tilemap_set_scroll_rows(tx_tilemap,8*32);   /* line scrolling */
436436   tilemap_set_scroll_cols(tx_tilemap,1);
r778r779
443443
444444static void batrider_create_tilemaps_0(void)
445445{
446   tx_tilemap = tilemap_create(get_text_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,64,32);
447   top_tilemap[0] = tilemap_create(batrider_get_top0_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,32,32);
448   fg_tilemap[0] = tilemap_create(batrider_get_fg0_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,32,32);
449   bg_tilemap[0] = tilemap_create(batrider_get_bg0_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,32,32);
446   tx_tilemap = tilemap_create(get_text_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,64,32);
447   top_tilemap[0] = tilemap_create(batrider_get_top0_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,32,32);
448   fg_tilemap[0] = tilemap_create(batrider_get_fg0_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,32,32);
449   bg_tilemap[0] = tilemap_create(batrider_get_bg0_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,32,32);
450450
451451   tilemap_set_scroll_rows(tx_tilemap,8*32);   /* line scrolling */
452452   tilemap_set_scroll_cols(tx_tilemap,1);
src/mame/video/mjkjidai.c
r778r779
3232
3333VIDEO_START( mjkjidai )
3434{
35   bg_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,8,8,64,32);
35   bg_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,8,8,64,32);
3636}
3737
3838
src/mame/video/jailbrek.c
r778r779
7171VIDEO_START( jailbrek )
7272{
7373   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows,
74      TILEMAP_OPAQUE, 8, 8, 64, 32);
74      TILEMAP_TYPE_OPAQUE, 8, 8, 64, 32);
7575}
7676
7777static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect )
src/mame/video/gaelco.c
r778r779
8181
8282VIDEO_START( bigkarnk )
8383{
84   pant[0] = tilemap_create(get_tile_info_gaelco_screen0,tilemap_scan_rows,TILEMAP_SPLIT,16,16,32,32);
85   pant[1] = tilemap_create(get_tile_info_gaelco_screen1,tilemap_scan_rows,TILEMAP_SPLIT,16,16,32,32);
84   pant[0] = tilemap_create(get_tile_info_gaelco_screen0,tilemap_scan_rows,TILEMAP_TYPE_SPLIT,16,16,32,32);
85   pant[1] = tilemap_create(get_tile_info_gaelco_screen1,tilemap_scan_rows,TILEMAP_TYPE_SPLIT,16,16,32,32);
8686
8787   tilemap_set_transmask(pant[0],0,0xff01,0x00ff); /* pens 1-7 opaque, pens 0, 8-15 transparent */
8888   tilemap_set_transmask(pant[1],0,0xff01,0x00ff); /* pens 1-7 opaque, pens 0, 8-15 transparent */
r778r779
9090
9191VIDEO_START( maniacsq )
9292{
93   pant[0] = tilemap_create(get_tile_info_gaelco_screen0,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,32,32);
94   pant[1] = tilemap_create(get_tile_info_gaelco_screen1,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,32,32);
93   pant[0] = tilemap_create(get_tile_info_gaelco_screen0,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,32,32);
94   pant[1] = tilemap_create(get_tile_info_gaelco_screen1,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,32,32);
9595
9696   tilemap_set_transparent_pen(pant[0],0);
9797   tilemap_set_transparent_pen(pant[1],0);
src/mame/video/bankp.c
r778r779
153153VIDEO_START( bankp )
154154{
155155   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows,
156      TILEMAP_TRANSPARENT_COLOR, 8, 8, 32, 32);
156      TILEMAP_TYPE_TRANSPARENT_COLOR, 8, 8, 32, 32);
157157
158158   fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows,
159      TILEMAP_TRANSPARENT_COLOR, 8, 8, 32, 32);
159      TILEMAP_TYPE_TRANSPARENT_COLOR, 8, 8, 32, 32);
160160
161161   tilemap_set_transparent_pen(bg_tilemap, 0);
162162   tilemap_set_transparent_pen(fg_tilemap, 0);
src/mame/video/tankbust.c
r778r779
8383VIDEO_START( tankbust )
8484{
8585   /* not scrollable */
86   txt_tilemap = tilemap_create(get_txt_tile_info, tilemap_scan_rows, TILEMAP_TRANSPARENT, 8, 8, 64, 32);
86   txt_tilemap = tilemap_create(get_txt_tile_info, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 8, 8, 64, 32);
8787
8888   /* scrollable */
89   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, TILEMAP_OPAQUE, 8, 8, 64, 32);
89   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE, 8, 8, 64, 32);
9090
9191
9292   tilemap_set_transparent_pen(txt_tilemap, 0);
src/mame/video/wecleman.c
r778r779
920920
921921   bg_tilemap = tilemap_create(wecleman_get_bg_tile_info,
922922                        tilemap_scan_rows,
923                        TILEMAP_TRANSPARENT,   /* We draw part of the road below */
923                        TILEMAP_TYPE_TRANSPARENT,   /* We draw part of the road below */
924924                        8,8,
925925                        PAGE_NX * 2, PAGE_NY * 2 );
926926
927927   fg_tilemap = tilemap_create(wecleman_get_fg_tile_info,
928928                        tilemap_scan_rows,
929                        TILEMAP_TRANSPARENT,
929                        TILEMAP_TYPE_TRANSPARENT,
930930                        8,8,
931931                        PAGE_NX * 2, PAGE_NY * 2);
932932
933933   txt_tilemap = tilemap_create(wecleman_get_txt_tile_info,
934934                         tilemap_scan_rows,
935                         TILEMAP_TRANSPARENT,
935                         TILEMAP_TYPE_TRANSPARENT,
936936                         8,8,
937937                         PAGE_NX * 1, PAGE_NY * 1);
938938
r778r779
998998
999999   sprite_list = sprite_list_create(NUM_SPRITES);
10001000
1001   K051316_vh_start_0(machine,ZOOMROM0_MEM_REGION,4,TILEMAP_TRANSPARENT,0,zoom_callback_0);
1002   K051316_vh_start_1(machine,ZOOMROM1_MEM_REGION,4,TILEMAP_TRANSPARENT,0,zoom_callback_1);
1001   K051316_vh_start_0(machine,ZOOMROM0_MEM_REGION,4,TILEMAP_TYPE_TRANSPARENT,0,zoom_callback_0);
1002   K051316_vh_start_1(machine,ZOOMROM1_MEM_REGION,4,TILEMAP_TYPE_TRANSPARENT,0,zoom_callback_1);
10031003
10041004   K051316_wraparound_enable(0,1);
10051005//  K051316_wraparound_enable(1,1);
src/mame/video/crbaloon.c
r778r779
9494VIDEO_START( crbaloon )
9595{
9696   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows_flip_xy,
97      TILEMAP_OPAQUE, 8, 8, 32, 32);
97      TILEMAP_TYPE_OPAQUE, 8, 8, 32, 32);
9898
9999   tmpbitmap = auto_bitmap_alloc(machine->screen[0].width,machine->screen[0].height,machine->screen[0].format);
100100
src/mame/video/portrait.c
r778r779
6161
6262VIDEO_START( portrait )
6363{
64   background = tilemap_create( get_bg_tile_info, tilemap_scan_rows, TILEMAP_OPAQUE,      16, 16, 32, 32 );
65   foreground = tilemap_create( get_fg_tile_info, tilemap_scan_rows, TILEMAP_TRANSPARENT, 16, 16, 32, 32 );
64   background = tilemap_create( get_bg_tile_info, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE,      16, 16, 32, 32 );
65   foreground = tilemap_create( get_fg_tile_info, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 16, 16, 32, 32 );
6666
6767      tilemap_set_transparent_pen( foreground, 0 );
6868}
src/mame/video/bosco.c
r778r779
135135VIDEO_START( bosco )
136136{
137137
138   bg_tilemap = tilemap_create(bg_get_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,8,8,32,32);
139   fg_tilemap = tilemap_create(fg_get_tile_info,fg_tilemap_scan,  TILEMAP_OPAQUE,8,8, 8,32);
138   bg_tilemap = tilemap_create(bg_get_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,8,8,32,32);
139   fg_tilemap = tilemap_create(fg_get_tile_info,fg_tilemap_scan,  TILEMAP_TYPE_OPAQUE,8,8, 8,32);
140140
141141   tilemap_set_scrolldx(bg_tilemap,3,3);
142142
src/mame/video/funkybee.c
r778r779
9090VIDEO_START( funkybee )
9191{
9292   bg_tilemap = tilemap_create(get_bg_tile_info, funkybee_tilemap_scan,
93      TILEMAP_OPAQUE, 8, 8, 32, 32);
93      TILEMAP_TYPE_OPAQUE, 8, 8, 32, 32);
9494}
9595
9696static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect)
src/mame/video/tetrisp2.c
r778r779
267267VIDEO_START( tetrisp2 )
268268{
269269   tilemap_bg = tilemap_create(   get_tile_info_bg,tilemap_scan_rows,
270                        TILEMAP_TRANSPARENT,
270                        TILEMAP_TYPE_TRANSPARENT,
271271                        16,16,NX_0,NY_0);
272272
273273   tilemap_fg = tilemap_create(   get_tile_info_fg,tilemap_scan_rows,
274                        TILEMAP_TRANSPARENT,
274                        TILEMAP_TYPE_TRANSPARENT,
275275                        8,8,NX_1,NY_1);
276276
277277   tilemap_rot = tilemap_create(   get_tile_info_rot,tilemap_scan_rows,
278                        TILEMAP_TRANSPARENT,
278                        TILEMAP_TYPE_TRANSPARENT,
279279                        16,16,NX_0*2,NY_0*2);
280280
281281   tilemap_set_transparent_pen(tilemap_bg,0);
r778r779
286286VIDEO_START( rockntread )
287287{
288288   tilemap_bg = tilemap_create(   get_tile_info_bg,tilemap_scan_rows,
289                        TILEMAP_TRANSPARENT,
289                        TILEMAP_TYPE_TRANSPARENT,
290290                        16, 16, 256, 16);   // rockn ms(main),1,2,3,4
291291
292292   tilemap_fg = tilemap_create(   get_tile_info_fg,tilemap_scan_rows,
293                        TILEMAP_TRANSPARENT,
293                        TILEMAP_TYPE_TRANSPARENT,
294294                        8, 8, 64, 64);
295295
296296   tilemap_rot = tilemap_create(   get_tile_info_rot,tilemap_scan_rows,
297                        TILEMAP_TRANSPARENT,
297                        TILEMAP_TYPE_TRANSPARENT,
298298                        16, 16, 128, 128);
299299
300300   tilemap_set_transparent_pen(tilemap_bg, 0);
r778r779
306306VIDEO_START( rocknms )
307307{
308308   tilemap_bg = tilemap_create(get_tile_info_bg,tilemap_scan_rows,
309               TILEMAP_TRANSPARENT,
309               TILEMAP_TYPE_TRANSPARENT,
310310               16, 16, 256, 16);   // rockn ms(main),1,2,3,4
311311
312312   tilemap_fg = tilemap_create(get_tile_info_fg,tilemap_scan_rows,
313               TILEMAP_TRANSPARENT,
313               TILEMAP_TYPE_TRANSPARENT,
314314               8, 8, 64, 64);
315315
316316   tilemap_rot = tilemap_create(get_tile_info_rot,tilemap_scan_rows,
317               TILEMAP_TRANSPARENT,
317               TILEMAP_TYPE_TRANSPARENT,
318318               16, 16, 128, 128);
319319
320320   tilemap_sub_bg = tilemap_create(get_tile_info_rocknms_sub_bg,tilemap_scan_rows,
321               TILEMAP_TRANSPARENT,
321               TILEMAP_TYPE_TRANSPARENT,
322322               16, 16, 32, 256);   // rockn ms(sub)
323323
324324   tilemap_sub_fg = tilemap_create(get_tile_info_rocknms_sub_fg,tilemap_scan_rows,
325               TILEMAP_TRANSPARENT,
325               TILEMAP_TYPE_TRANSPARENT,
326326               8, 8, 64, 64);
327327
328328   tilemap_sub_rot = tilemap_create( get_tile_info_rocknms_sub_rot,tilemap_scan_rows,
329               TILEMAP_TRANSPARENT,
329               TILEMAP_TYPE_TRANSPARENT,
330330               16, 16, 128, 128);
331331
332332   tilemap_set_transparent_pen(tilemap_bg, 0);
src/mame/video/lastduel.c
r778r779
8585
8686VIDEO_START( lastduel )
8787{
88   bg_tilemap = tilemap_create(ld_get_bg_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,16,16,64,64);
89   fg_tilemap = tilemap_create(ld_get_fg_tile_info,tilemap_scan_rows,TILEMAP_SPLIT,16,16,64,64);
90   tx_tilemap = tilemap_create(get_fix_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,64,32);
88   bg_tilemap = tilemap_create(ld_get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,16,16,64,64);
89   fg_tilemap = tilemap_create(ld_get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_SPLIT,16,16,64,64);
90   tx_tilemap = tilemap_create(get_fix_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,64,32);
9191
9292   tilemap_set_transmask(fg_tilemap,0,0xffff,0x0001);
9393   tilemap_set_transmask(fg_tilemap,1,0xf07f,0x0f81);
r778r779
9999
100100VIDEO_START( madgear )
101101{
102   bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_cols,TILEMAP_OPAQUE,16,16,64,32);
103   fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_cols,TILEMAP_SPLIT,16,16,64,32);
104   tx_tilemap = tilemap_create(get_fix_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,64,32);
102   bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_cols,TILEMAP_TYPE_OPAQUE,16,16,64,32);
103   fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_cols,TILEMAP_TYPE_SPLIT,16,16,64,32);
104   tx_tilemap = tilemap_create(get_fix_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,64,32);
105105
106106   tilemap_set_transmask(fg_tilemap,0,0xffff,0x8000);
107107   tilemap_set_transmask(fg_tilemap,1,0x80ff,0xff00);
src/mame/video/alpha68k.c
r778r779
7272
7373VIDEO_START( alpha68k )
7474{
75   fix_tilemap = tilemap_create(get_tile_info,tilemap_scan_cols,TILEMAP_TRANSPARENT,8,8,32,32);
75   fix_tilemap = tilemap_create(get_tile_info,tilemap_scan_cols,TILEMAP_TYPE_TRANSPARENT,8,8,32,32);
7676
7777   tilemap_set_transparent_pen(fix_tilemap,0);
7878}
src/mame/video/drgnmst.c
r778r779
133133
134134VIDEO_START(drgnmst)
135135{
136   drgnmst_fg_tilemap = tilemap_create(get_drgnmst_fg_tile_info,drgnmst_fg_tilemap_scan_cols,TILEMAP_TRANSPARENT,      8, 8, 64,64);
136   drgnmst_fg_tilemap = tilemap_create(get_drgnmst_fg_tile_info,drgnmst_fg_tilemap_scan_cols,TILEMAP_TYPE_TRANSPARENT,      8, 8, 64,64);
137137   tilemap_set_transparent_pen(drgnmst_fg_tilemap,15);
138138
139   drgnmst_md_tilemap = tilemap_create(get_drgnmst_md_tile_info,drgnmst_md_tilemap_scan_cols,TILEMAP_TRANSPARENT,      16, 16, 64,64);
139   drgnmst_md_tilemap = tilemap_create(get_drgnmst_md_tile_info,drgnmst_md_tilemap_scan_cols,TILEMAP_TYPE_TRANSPARENT,      16, 16, 64,64);
140140   tilemap_set_transparent_pen(drgnmst_md_tilemap,15);
141141
142   drgnmst_bg_tilemap = tilemap_create(get_drgnmst_bg_tile_info,drgnmst_bg_tilemap_scan_cols,TILEMAP_TRANSPARENT,      32, 32, 64,64);
142   drgnmst_bg_tilemap = tilemap_create(get_drgnmst_bg_tile_info,drgnmst_bg_tilemap_scan_cols,TILEMAP_TYPE_TRANSPARENT,      32, 32, 64,64);
143143   tilemap_set_transparent_pen(drgnmst_bg_tilemap,15);
144144
145145   // do the other tilemaps have rowscroll too? probably not ..
src/mame/video/freekick.c
r778r779
1919
2020VIDEO_START(freekick)
2121{
22   freek_tilemap = tilemap_create(get_freek_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE, 8, 8,32,32);
22   freek_tilemap = tilemap_create(get_freek_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE, 8, 8,32,32);
2323}
2424
2525
src/mame/video/namcos22.c
r778r779
24652465         break;
24662466
24672467      default:
2468         logerror( "unk 3d data(%d) addr=0x%x!", len, pSource-(INT32*)namcos22_polygonram );
2468         logerror( "unk 3d data(%d) addr=0x%x!", len, (int)(pSource-(INT32*)namcos22_polygonram) );
24692469         {
24702470            int i;
24712471            for( i=0; i<len; i++ )
r778r779
25402540
25412541static void video_start_common(running_machine *machine)
25422542{
2543   bgtilemap = tilemap_create( TextTilemapGetInfo,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,64,64 );
2543   bgtilemap = tilemap_create( TextTilemapGetInfo,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,64,64 );
25442544      tilemap_set_transparent_pen( bgtilemap, 0xf );
25452545
25462546   mbDSPisActive = 0;
src/mame/video/redclash.c
r778r779
155155VIDEO_START( redclash )
156156{
157157   fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows,
158      TILEMAP_TRANSPARENT, 8, 8, 32, 32);
158      TILEMAP_TYPE_TRANSPARENT, 8, 8, 32, 32);
159159
160160   tilemap_set_transparent_pen(fg_tilemap, 0);
161161}
src/mame/video/flyball.c
r778r779
5050VIDEO_START( flyball )
5151{
5252   flyball_tilemap = tilemap_create(flyball_get_tile_info,
53      flyball_get_memory_offset, TILEMAP_OPAQUE, 8, 16, 32, 16);
53      flyball_get_memory_offset, TILEMAP_TYPE_OPAQUE, 8, 16, 32, 16);
5454}
5555
5656
src/mame/video/xybots.c
r778r779
8282   };
8383
8484   /* initialize the playfield */
85   atarigen_playfield_tilemap = tilemap_create(get_playfield_tile_info, tilemap_scan_rows, TILEMAP_OPAQUE, 8,8, 64,32);
85   atarigen_playfield_tilemap = tilemap_create(get_playfield_tile_info, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE, 8,8, 64,32);
8686
8787   /* initialize the motion objects */
8888   atarimo_init(machine, 0, &modesc);
8989
9090   /* initialize the alphanumerics */
91   atarigen_alpha_tilemap = tilemap_create(get_alpha_tile_info, tilemap_scan_rows, TILEMAP_TRANSPARENT, 8,8, 64,32);
91   atarigen_alpha_tilemap = tilemap_create(get_alpha_tile_info, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 8,8, 64,32);
9292   tilemap_set_transparent_pen(atarigen_alpha_tilemap, 0);
9393}
9494
src/mame/video/rockola.c
r778r779
175175VIDEO_START( rockola )
176176{
177177   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows,
178      TILEMAP_OPAQUE, 8, 8, 32, 32);
178      TILEMAP_TYPE_OPAQUE, 8, 8, 32, 32);
179179
180180   fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows,
181      TILEMAP_TRANSPARENT, 8, 8, 32, 32);
181      TILEMAP_TYPE_TRANSPARENT, 8, 8, 32, 32);
182182
183183   tilemap_set_transparent_pen(fg_tilemap, 0);
184184}
r778r779
304304VIDEO_START( satansat )
305305{
306306   bg_tilemap = tilemap_create(satansat_get_bg_tile_info, tilemap_scan_rows,
307      TILEMAP_OPAQUE, 8, 8, 32, 32);
307      TILEMAP_TYPE_OPAQUE, 8, 8, 32, 32);
308308
309309   fg_tilemap = tilemap_create(satansat_get_fg_tile_info, tilemap_scan_rows,
310      TILEMAP_TRANSPARENT, 8, 8, 32, 32);
310      TILEMAP_TYPE_TRANSPARENT, 8, 8, 32, 32);
311311
312312   tilemap_set_transparent_pen(fg_tilemap, 0);
313313}
src/mame/video/centiped.c
r778r779
6464
6565VIDEO_START( centiped )
6666{
67   bg_tilemap = tilemap_create(centiped_get_tile_info, tilemap_scan_rows, TILEMAP_OPAQUE, 8,8, 32,32);
67   bg_tilemap = tilemap_create(centiped_get_tile_info, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE, 8,8, 32,32);
6868
6969   centiped_flipscreen = 0;
7070
r778r779
7575
7676VIDEO_START( warlords )
7777{
78   bg_tilemap = tilemap_create(warlords_get_tile_info, tilemap_scan_rows, TILEMAP_OPAQUE, 8,8, 32,32);
78   bg_tilemap = tilemap_create(warlords_get_tile_info, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE, 8,8, 32,32);
7979
8080   /* we overload centiped_flipscreen here to track the cocktail/upright state */
8181   centiped_flipscreen = readinputport(0) & 0x80;
r778r779
8585
8686VIDEO_START( milliped )
8787{
88   bg_tilemap = tilemap_create(milliped_get_tile_info, tilemap_scan_rows, TILEMAP_OPAQUE, 8,8, 32,32);
88   bg_tilemap = tilemap_create(milliped_get_tile_info, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE, 8,8, 32,32);
8989
9090   centiped_flipscreen = 0;
9191   state_save_register_global(centiped_flipscreen);
r778r779
9494
9595VIDEO_START( bullsdrt )
9696{
97   bg_tilemap = tilemap_create(bullsdrt_get_tile_info, tilemap_scan_rows, TILEMAP_OPAQUE, 8,8, 32,32);
97   bg_tilemap = tilemap_create(bullsdrt_get_tile_info, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE, 8,8, 32,32);
9898
9999   centiped_flipscreen = 0;
100100}
src/mame/video/atarisy1.c
r778r779
175175   decode_gfx(machine, playfield_lookup, motable);
176176
177177   /* initialize the playfield */
178   atarigen_playfield_tilemap = tilemap_create(get_playfield_tile_info, tilemap_scan_rows, TILEMAP_OPAQUE, 8,8, 64,64);
178   atarigen_playfield_tilemap = tilemap_create(get_playfield_tile_info, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE, 8,8, 64,64);
179179
180180   /* initialize the motion objects */
181181   atarimo_init(machine, 0, &modesc);
182182
183183   /* initialize the alphanumerics */
184   atarigen_alpha_tilemap = tilemap_create(get_alpha_tile_info, tilemap_scan_rows, TILEMAP_TRANSPARENT, 8,8, 64,32);
184   atarigen_alpha_tilemap = tilemap_create(get_alpha_tile_info, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 8,8, 64,32);
185185   tilemap_set_transparent_pen(atarigen_alpha_tilemap, 0);
186186
187187   /* modify the motion object code lookup */
src/mame/video/wgp.c
r778r779
5656
5757static void wgp_core_vh_start(running_machine *machine, int x_offs,int y_offs,int piv_xoffs,int piv_yoffs)
5858{
59   wgp_piv_tilemap[0] = tilemap_create(get_piv0_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,64,64);
60   wgp_piv_tilemap[1] = tilemap_create(get_piv1_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,64,64);
61   wgp_piv_tilemap[2] = tilemap_create(get_piv2_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,64,64);
59   wgp_piv_tilemap[0] = tilemap_create(get_piv0_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,64,64);
60   wgp_piv_tilemap[1] = tilemap_create(get_piv1_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,64,64);
61   wgp_piv_tilemap[2] = tilemap_create(get_piv2_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,64,64);
6262
6363   TC0100SCN_vh_start(machine,1,TC0100SCN_GFX_NUM,x_offs,y_offs,0,0,0,0,0);
6464
src/mame/video/welltris.c
r778r779
216216
217217VIDEO_START( welltris )
218218{
219   char_tilemap = tilemap_create(get_welltris_tile_info, tilemap_scan_rows, TILEMAP_TRANSPARENT, 8, 8, 64, 32);
219   char_tilemap = tilemap_create(get_welltris_tile_info, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 8, 8, 64, 32);
220220
221221   tilemap_set_transparent_pen(char_tilemap, 15);
222222}
src/mame/video/sprint8.c
r778r779
8181   helper1 = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format);
8282   helper2 = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format);
8383
84   tilemap1 = tilemap_create(get_tile_info1, tilemap_scan_rows, TILEMAP_OPAQUE, 16, 8, 32, 32);
85   tilemap2 = tilemap_create(get_tile_info2, tilemap_scan_rows, TILEMAP_OPAQUE, 16, 8, 32, 32);
84   tilemap1 = tilemap_create(get_tile_info1, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE, 16, 8, 32, 32);
85   tilemap2 = tilemap_create(get_tile_info2, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE, 16, 8, 32, 32);
8686
8787   tilemap_set_scrolly(tilemap1, 0, +24);
8888   tilemap_set_scrolly(tilemap2, 0, +24);
src/mame/video/gumbo.c
r778r779
3838
3939VIDEO_START( gumbo )
4040{
41   gumbo_bg_tilemap = tilemap_create(get_gumbo_bg_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,      8, 8, 64,32);
42   gumbo_fg_tilemap = tilemap_create(get_gumbo_fg_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT, 4, 4,128,64);
41   gumbo_bg_tilemap = tilemap_create(get_gumbo_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,      8, 8, 64,32);
42   gumbo_fg_tilemap = tilemap_create(get_gumbo_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 4, 4,128,64);
4343   tilemap_set_transparent_pen(gumbo_fg_tilemap,0xff);
4444}
4545
src/mame/video/dec0.c
r778r779
696696
697697VIDEO_START( dec0_nodma )
698698{
699   pf1_tilemap_0 = tilemap_create(get_pf1_tile_info,tile_shape0_8x8_scan,TILEMAP_TRANSPARENT, 8, 8,128, 32);
700   pf1_tilemap_1 = tilemap_create(get_pf1_tile_info,tile_shape1_8x8_scan,TILEMAP_TRANSPARENT, 8, 8, 64, 64);
701   pf1_tilemap_2 = tilemap_create(get_pf1_tile_info,tile_shape2_8x8_scan,TILEMAP_TRANSPARENT, 8, 8, 32,128);
702   pf2_tilemap_0 = tilemap_create(get_pf2_tile_info,tile_shape0_scan,    TILEMAP_TRANSPARENT,16,16, 64, 16);
703   pf2_tilemap_1 = tilemap_create(get_pf2_tile_info,tile_shape1_scan,    TILEMAP_TRANSPARENT,16,16, 32, 32);
704   pf2_tilemap_2 = tilemap_create(get_pf2_tile_info,tile_shape2_scan,    TILEMAP_TRANSPARENT,16,16, 16, 64);
705   pf3_tilemap_0 = tilemap_create(get_pf3_tile_info,tile_shape0_scan,    TILEMAP_TRANSPARENT,16,16, 64, 16);
706   pf3_tilemap_1 = tilemap_create(get_pf3_tile_info,tile_shape1_scan,    TILEMAP_TRANSPARENT,16,16, 32, 32);
707   pf3_tilemap_2 = tilemap_create(get_pf3_tile_info,tile_shape2_scan,    TILEMAP_TRANSPARENT,16,16, 16, 64);
699   pf1_tilemap_0 = tilemap_create(get_pf1_tile_info,tile_shape0_8x8_scan,TILEMAP_TYPE_TRANSPARENT, 8, 8,128, 32);
700   pf1_tilemap_1 = tilemap_create(get_pf1_tile_info,tile_shape1_8x8_scan,TILEMAP_TYPE_TRANSPARENT, 8, 8, 64, 64);
701   pf1_tilemap_2 = tilemap_create(get_pf1_tile_info,tile_shape2_8x8_scan,TILEMAP_TYPE_TRANSPARENT, 8, 8, 32,128);
702   pf2_tilemap_0 = tilemap_create(get_pf2_tile_info,tile_shape0_scan,    TILEMAP_TYPE_TRANSPARENT,16,16, 64, 16);
703   pf2_tilemap_1 = tilemap_create(get_pf2_tile_info,tile_shape1_scan,    TILEMAP_TYPE_TRANSPARENT,16,16, 32, 32);
704   pf2_tilemap_2 = tilemap_create(get_pf2_tile_info,tile_shape2_scan,    TILEMAP_TYPE_TRANSPARENT,16,16, 16, 64);
705   pf3_tilemap_0 = tilemap_create(get_pf3_tile_info,tile_shape0_scan,    TILEMAP_TYPE_TRANSPARENT,16,16, 64, 16);
706   pf3_tilemap_1 = tilemap_create(get_pf3_tile_info,tile_shape1_scan,    TILEMAP_TYPE_TRANSPARENT,16,16, 32, 32);
707   pf3_tilemap_2 = tilemap_create(get_pf3_tile_info,tile_shape2_scan,    TILEMAP_TYPE_TRANSPARENT,16,16, 16, 64);
708708
709709   dec0_spriteram=spriteram16;
710710}
src/mame/video/ssv.c
r778r779
229229   eaglshot_dirty_tile   =   (char*)auto_malloc(4 * 0x100000 / (16*8));
230230
231231   gdfs_tmap         =   tilemap_create(   get_tile_info_0, tilemap_scan_rows,
232                                 TILEMAP_TRANSPARENT, 16,16, 0x100,0x100   );
232                                 TILEMAP_TYPE_TRANSPARENT, 16,16, 0x100,0x100   );
233233
234234   tilemap_set_transparent_pen(gdfs_tmap, 0);
235235}
src/mame/video/atarig42.c
r778r779
120120   atarigen_blend_gfx(machine, 0, 2, 0x0f, 0x30);
121121
122122   /* initialize the playfield */
123   atarigen_playfield_tilemap = tilemap_create(get_playfield_tile_info, atarig42_playfield_scan, TILEMAP_OPAQUE, 8,8, 128,64);
123   atarigen_playfield_tilemap = tilemap_create(get_playfield_tile_info, atarig42_playfield_scan, TILEMAP_TYPE_OPAQUE, 8,8, 128,64);
124124
125125   /* initialize the motion objects */
126126   adjusted_modesc.palettebase = atarig42_motion_object_base;
r778r779
129129   atarirle_init(0, &adjusted_modesc);
130130
131131   /* initialize the alphanumerics */
132   atarigen_alpha_tilemap = tilemap_create(get_alpha_tile_info, tilemap_scan_rows, TILEMAP_TRANSPARENT, 8,8, 64,32);
132   atarigen_alpha_tilemap = tilemap_create(get_alpha_tile_info, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 8,8, 64,32);
133133   tilemap_set_transparent_pen(atarigen_alpha_tilemap, 0);
134134
135135   /* reset statics */
src/mame/video/tceptor.c
r778r779
445445
446446   namco_road_set_transparent_color(machine->remapped_colortable[0xfff]);
447447
448   tx_tilemap = tilemap_create(get_tx_tile_info, tilemap_scan_cols, TILEMAP_TRANSPARENT_COLOR, 8, 8, 34, 28);
448   tx_tilemap = tilemap_create(get_tx_tile_info, tilemap_scan_cols, TILEMAP_TYPE_TRANSPARENT_COLOR, 8, 8, 34, 28);
449449
450450   tilemap_set_scrollx(tx_tilemap, 0, -2*8);
451451   tilemap_set_scrolly(tx_tilemap, 0, 0);
452452   tilemap_set_transparent_pen(tx_tilemap, 7);
453453
454   bg1_tilemap = tilemap_create(get_bg1_tile_info, tilemap_scan_rows, TILEMAP_OPAQUE, 8, 8, 64, 32);
455   bg2_tilemap = tilemap_create(get_bg2_tile_info, tilemap_scan_rows, TILEMAP_OPAQUE, 8, 8, 64, 32);
454   bg1_tilemap = tilemap_create(get_bg1_tile_info, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE, 8, 8, 64, 32);
455   bg2_tilemap = tilemap_create(get_bg2_tile_info, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE, 8, 8, 64, 32);
456456
457457   tilemap_set_transparent_pen(bg1_tilemap, 0);
458458   tilemap_set_transparent_pen(bg2_tilemap, 0);
src/mame/video/cop01.c
r778r779
111111
112112VIDEO_START( cop01 )
113113{
114   bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_SPLIT,      8,8,64,32);
115   fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,32,32);
114   bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_SPLIT,      8,8,64,32);
115   fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,32,32);
116116
117117   tilemap_set_transparent_pen(fg_tilemap,15);
118118
src/mame/video/vindictr.c
r778r779
9595   };
9696
9797   /* initialize the playfield */
98   atarigen_playfield_tilemap = tilemap_create(get_playfield_tile_info, tilemap_scan_cols, TILEMAP_OPAQUE, 8,8, 64,64);
98   atarigen_playfield_tilemap = tilemap_create(get_playfield_tile_info, tilemap_scan_cols, TILEMAP_TYPE_OPAQUE, 8,8, 64,64);
9999
100100   /* initialize the motion objects */
101101   atarimo_init(machine, 0, &modesc);
102102
103103   /* initialize the alphanumerics */
104   atarigen_alpha_tilemap = tilemap_create(get_alpha_tile_info, tilemap_scan_rows, TILEMAP_TRANSPARENT, 8,8, 64,32);
104   atarigen_alpha_tilemap = tilemap_create(get_alpha_tile_info, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 8,8, 64,32);
105105   tilemap_set_transparent_pen(atarigen_alpha_tilemap, 0);
106106}
107107
src/mame/video/hanaawas.c
r778r779
108108VIDEO_START( hanaawas )
109109{
110110   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows,
111      TILEMAP_OPAQUE, 8, 8, 32, 32);
111      TILEMAP_TYPE_OPAQUE, 8, 8, 32, 32);
112112}
113113
114114VIDEO_UPDATE( hanaawas )
src/mame/video/aquarium.c
r778r779
153153
154154VIDEO_START(aquarium)
155155{
156   aquarium_txt_tilemap = tilemap_create(get_aquarium_txt_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT, 8, 8,64,64);
156   aquarium_txt_tilemap = tilemap_create(get_aquarium_txt_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 8, 8,64,64);
157157   tilemap_set_transparent_pen(aquarium_txt_tilemap,0);
158158
159   aquarium_bak_tilemap = tilemap_create(get_aquarium_bak_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE, 16, 16,32,32);
160   aquarium_mid_tilemap = tilemap_create(get_aquarium_mid_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT, 16, 16,32,32);
159   aquarium_bak_tilemap = tilemap_create(get_aquarium_bak_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE, 16, 16,32,32);
160   aquarium_mid_tilemap = tilemap_create(get_aquarium_mid_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 16, 16,32,32);
161161   tilemap_set_transparent_pen(aquarium_mid_tilemap,0);
162162}
163163
src/mame/video/metro.c
r778r779
201201   if (code & 0x8000) /* Special: draw a tile of a single color (i.e. not from the gfx ROMs) */
202202   {
203203      int _code = code & 0x000f;
204      tileinfo->tile_number = _code;
205204      tileinfo->pen_data = empty_tiles + _code*16*16;
206205      tileinfo->pal_data = &machine->remapped_colortable[(((code & 0x0ff0) ^ 0x0f0) + 0x1000)];
207      tileinfo->pen_usage = 0;
208206      tileinfo->flags = 0;
209207   }
210208   else
r778r779
239237   if (code & 0x8000) /* Special: draw a tile of a single color (i.e. not from the gfx ROMs) */
240238   {
241239      int _code = code & 0x000f;
242      tileinfo->tile_number = _code;
243240      tileinfo->pen_data = empty_tiles + _code*16*16;
244241      tileinfo->pal_data = &machine->remapped_colortable[(((code & 0x0ff0) ^ 0x0f0) + 0x1000)];
245      tileinfo->pen_usage = 0;
246242      tileinfo->flags = 0;
247243   }
248244   else if ((tile & 0x00f00000)==0x00f00000)   /* draw tile as 8bpp */
r778r779
282278   if (code & 0x8000) /* Special: draw a tile of a single color (i.e. not from the gfx ROMs) */
283279   {
284280      int _code = code & 0x000f;
285      tileinfo->tile_number = _code;
286281      tileinfo->pen_data = empty_tiles + _code*16*16;
287282      tileinfo->pal_data = &machine->remapped_colortable[(((code & 0x0ff0) ^ 0x0f0) + 0x1000)];
288      tileinfo->pen_usage = 0;
289283      tileinfo->flags = 0;
290284   }
291285   else if ((tile & 0x00f00000)==0x00f00000)   /* draw tile as 8bpp */
r778r779
397391   metro_tiletable_old = auto_malloc(metro_tiletable_size);
398392   dirtyindex = auto_malloc(metro_tiletable_size/4);
399393
400   bg_tilemap[0] = tilemap_create(get_tile_info_0,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,WIN_NX,WIN_NY);
401   bg_tilemap[1] = tilemap_create(get_tile_info_1,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,WIN_NX,WIN_NY);
402   bg_tilemap[2] = tilemap_create(get_tile_info_2,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,WIN_NX,WIN_NY);
394   bg_tilemap[0] = tilemap_create(get_tile_info_0,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,WIN_NX,WIN_NY);
395   bg_tilemap[1] = tilemap_create(get_tile_info_1,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,WIN_NX,WIN_NY);
396   bg_tilemap[2] = tilemap_create(get_tile_info_2,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,WIN_NX,WIN_NY);
403397
404398   tilemap_16x16[0] = NULL;
405399   tilemap_16x16[1] = NULL;
r778r779
420414   metro_tiletable_old = auto_malloc(metro_tiletable_size);
421415   dirtyindex = auto_malloc(metro_tiletable_size/4);
422416
423   bg_tilemap[0] = tilemap_create(get_tile_info_0_8bit,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,WIN_NX,WIN_NY);
424   bg_tilemap[1] = tilemap_create(get_tile_info_1_8bit,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,WIN_NX,WIN_NY);
425   bg_tilemap[2] = tilemap_create(get_tile_info_2_8bit,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,WIN_NX,WIN_NY);
417   bg_tilemap[0] = tilemap_create(get_tile_info_0_8bit,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,WIN_NX,WIN_NY);
418   bg_tilemap[1] = tilemap_create(get_tile_info_1_8bit,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,WIN_NX,WIN_NY);
419   bg_tilemap[2] = tilemap_create(get_tile_info_2_8bit,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,WIN_NX,WIN_NY);
426420
427421   tilemap_16x16[0] = NULL;
428422   tilemap_16x16[1] = NULL;
r778r779
447441   metro_tiletable_old = auto_malloc(metro_tiletable_size);
448442   dirtyindex = auto_malloc(metro_tiletable_size/4);
449443
450   bg_tilemap[0] = tilemap_create(get_tile_info_0_8bit,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,WIN_NX,WIN_NY);
451   bg_tilemap[1] = tilemap_create(get_tile_info_1_8bit,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,WIN_NX,WIN_NY);
452   bg_tilemap[2] = tilemap_create(get_tile_info_2_8bit,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,WIN_NX,WIN_NY);
444   bg_tilemap[0] = tilemap_create(get_tile_info_0_8bit,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,WIN_NX,WIN_NY);
445   bg_tilemap[1] = tilemap_create(get_tile_info_1_8bit,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,WIN_NX,WIN_NY);
446   bg_tilemap[2] = tilemap_create(get_tile_info_2_8bit,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,WIN_NX,WIN_NY);
453447
454   tilemap_16x16[0] = tilemap_create(get_tile_info_0_16x16_8bit,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,WIN_NX,WIN_NY);
455   tilemap_16x16[1] = tilemap_create(get_tile_info_1_16x16_8bit,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,WIN_NX,WIN_NY);
456   tilemap_16x16[2] = tilemap_create(get_tile_info_2_16x16_8bit,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,WIN_NX,WIN_NY);
448   tilemap_16x16[0] = tilemap_create(get_tile_info_0_16x16_8bit,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,WIN_NX,WIN_NY);
449   tilemap_16x16[1] = tilemap_create(get_tile_info_1_16x16_8bit,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,WIN_NX,WIN_NY);
450   tilemap_16x16[2] = tilemap_create(get_tile_info_2_16x16_8bit,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,WIN_NX,WIN_NY);
457451
458452   tilemap_set_transparent_pen(bg_tilemap[0],0);
459453   tilemap_set_transparent_pen(bg_tilemap[1],0);
r778r779
470464   has_zoom = 1;
471465
472466   metro_K053936_tilemap = tilemap_create(metro_K053936_get_tile_info, tilemap_scan_rows,
473                        TILEMAP_OPAQUE, 8,8, 256, 512 );
467                        TILEMAP_TYPE_OPAQUE, 8,8, 256, 512 );
474468
475469   K053936_wraparound_enable(0, 0);
476470   K053936_set_offset(0, -69, -21);
r778r779
487481   has_zoom = 1;
488482
489483   metro_K053936_tilemap = tilemap_create(metro_K053936_gstrik2_get_tile_info, tilemap_scan_gstrik2,
490                        TILEMAP_OPAQUE, 16,16, 128, 256 );
484                        TILEMAP_TYPE_OPAQUE, 16,16, 128, 256 );
491485
492486   K053936_wraparound_enable(0, 0);
493487   K053936_set_offset(0, -69, -19);
src/mame/video/angelkds.c
r778r779
263263VIDEO_START( angelkds )
264264{
265265
266   tx_tilemap = tilemap_create(get_tx_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT, 8, 8,32,32);
266   tx_tilemap = tilemap_create(get_tx_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 8, 8,32,32);
267267   tilemap_set_transparent_pen(tx_tilemap,0);
268268
269   bgbot_tilemap = tilemap_create(get_bgbot_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT, 8, 8,32,32);
269   bgbot_tilemap = tilemap_create(get_bgbot_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 8, 8,32,32);
270270   tilemap_set_transparent_pen(bgbot_tilemap,15);
271271
272   bgtop_tilemap = tilemap_create(get_bgtop_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT, 8, 8,32,32);
272   bgtop_tilemap = tilemap_create(get_bgtop_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 8, 8,32,32);
273273   tilemap_set_transparent_pen(bgtop_tilemap,15);
274274}
275275
src/mame/video/circusc.c
r778r779
107107
108108VIDEO_START( circusc )
109109{
110   bg_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,8,8,32,32);
110   bg_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,8,8,32,32);
111111
112112   tilemap_set_scroll_cols(bg_tilemap,32);
113113}
src/mame/video/mikie.c
r778r779
131131VIDEO_START( mikie )
132132{
133133   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows,
134      TILEMAP_OPAQUE, 8, 8, 32, 32);
134      TILEMAP_TYPE_OPAQUE, 8, 8, 32, 32);
135135}
136136
137137static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect)
src/mame/video/usgames.c
r778r779
4646
4747VIDEO_START(usg)
4848{
49   usg_tilemap = tilemap_create(get_usg_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE, 8, 8,64,32);
49   usg_tilemap = tilemap_create(get_usg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE, 8, 8,64,32);
5050}
5151
5252
src/mame/video/zaccaria.c
r778r779
149149
150150VIDEO_START( zaccaria )
151151{
152   bg_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,8,8,32,32);
152   bg_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,8,8,32,32);
153153
154154   tilemap_set_scroll_cols(bg_tilemap,32);
155155}
src/mame/video/shadfrce.c
r778r779
6666
6767VIDEO_START( shadfrce )
6868{
69   shadfrce_fgtilemap = tilemap_create(get_shadfrce_fgtile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT, 8, 8,64,32);
69   shadfrce_fgtilemap = tilemap_create(get_shadfrce_fgtile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 8, 8,64,32);
7070      tilemap_set_transparent_pen(shadfrce_fgtilemap,0);
7171
72   shadfrce_bg0tilemap = tilemap_create(get_shadfrce_bg0tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT, 16, 16,32,32);
72   shadfrce_bg0tilemap = tilemap_create(get_shadfrce_bg0tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 16, 16,32,32);
7373      tilemap_set_transparent_pen(shadfrce_bg0tilemap,0);
7474
75   shadfrce_bg1tilemap = tilemap_create(get_shadfrce_bg1tile_info,tilemap_scan_rows,TILEMAP_OPAQUE, 16, 16,32,32);
75   shadfrce_bg1tilemap = tilemap_create(get_shadfrce_bg1tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE, 16, 16,32,32);
7676
7777   shadfrce_spvideoram_old = auto_malloc(spriteram_size);
7878}
src/mame/video/speedbal.c
r778r779
3737
3838VIDEO_START( speedbal )
3939{
40   bg_tilemap = tilemap_create(get_tile_info_bg, tilemap_scan_cols_flip_x, TILEMAP_SPLIT, 16, 16, 16, 16);
41   fg_tilemap = tilemap_create(get_tile_info_fg, tilemap_scan_cols_flip_x, TILEMAP_SPLIT,  8,  8, 32, 32);
40   bg_tilemap = tilemap_create(get_tile_info_bg, tilemap_scan_cols_flip_x, TILEMAP_TYPE_SPLIT, 16, 16, 16, 16);
41   fg_tilemap = tilemap_create(get_tile_info_fg, tilemap_scan_cols_flip_x, TILEMAP_TYPE_SPLIT,  8,  8, 32, 32);
4242
4343   tilemap_set_transmask(bg_tilemap,0,0xffff,0x0000); /* split type 0 is totally transparent in front half */
4444   tilemap_set_transmask(bg_tilemap,1,0x00f7,0x0000); /* split type 1 has pen 0-2, 4-7 transparent in front half */
src/mame/video/tagteam.c
r778r779
130130VIDEO_START( tagteam )
131131{
132132   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows_flip_x,
133      TILEMAP_OPAQUE, 8, 8, 32, 32);
133      TILEMAP_TYPE_OPAQUE, 8, 8, 32, 32);
134134}
135135
136136static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect)
src/mame/video/bagman.c
r778r779
104104VIDEO_START( bagman )
105105{
106106   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows,
107      TILEMAP_OPAQUE, 8, 8, 32, 32);
107      TILEMAP_TYPE_OPAQUE, 8, 8, 32, 32);
108108}
109109
110110static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect)
src/mame/video/inufuku.c
r778r779
222222
223223VIDEO_START( inufuku )
224224{
225   inufuku_bg_tilemap = tilemap_create(get_inufuku_bg_tile_info, tilemap_scan_rows, TILEMAP_TRANSPARENT, 8, 8, 64, 64);
226   inufuku_text_tilemap = tilemap_create(get_inufuku_text_tile_info, tilemap_scan_rows, TILEMAP_TRANSPARENT, 8, 8, 64, 64);
225   inufuku_bg_tilemap = tilemap_create(get_inufuku_bg_tile_info, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 8, 8, 64, 64);
226   inufuku_text_tilemap = tilemap_create(get_inufuku_text_tile_info, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 8, 8, 64, 64);
227227
228228   tilemap_set_transparent_pen(inufuku_bg_tilemap, 255);
229229   tilemap_set_transparent_pen(inufuku_text_tilemap, 255);
src/mame/video/commando.c
r778r779
8888VIDEO_START( commando )
8989{
9090   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_cols,
91      TILEMAP_OPAQUE, 16, 16, 32, 32);
91      TILEMAP_TYPE_OPAQUE, 16, 16, 32, 32);
9292
9393   fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows,
94      TILEMAP_TRANSPARENT, 8, 8, 32, 32);
94      TILEMAP_TYPE_TRANSPARENT, 8, 8, 32, 32);
9595
9696   tilemap_set_transparent_pen(fg_tilemap, 3);
9797}
src/mame/video/atarisy2.c
r778r779
123123   atarigen_playfield = &vram[0x2000];
124124
125125   /* initialize the playfield */
126   atarigen_playfield_tilemap = tilemap_create(get_playfield_tile_info, tilemap_scan_rows, TILEMAP_OPAQUE, 8,8, 128,64);
126   atarigen_playfield_tilemap = tilemap_create(get_playfield_tile_info, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE, 8,8, 128,64);
127127
128128   /* initialize the motion objects */
129129   atarimo_init(machine, 0, &modesc);
130130
131131   /* initialize the alphanumerics */
132   atarigen_alpha_tilemap = tilemap_create(get_alpha_tile_info, tilemap_scan_rows, TILEMAP_TRANSPARENT, 8,8, 64,48);
132   atarigen_alpha_tilemap = tilemap_create(get_alpha_tile_info, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 8,8, 64,48);
133133   tilemap_set_transparent_pen(atarigen_alpha_tilemap, 0);
134134
135135   /* reset the statics */
src/mame/video/ninjakd2.c
r778r779
2323
2424VIDEO_START( ninjakd2 )
2525{
26   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, TILEMAP_OPAQUE,      16, 16, 32, 32);
27   fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows, TILEMAP_TRANSPARENT,  8,  8,  32, 32);
26   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE,      16, 16, 32, 32);
27   fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT,  8,  8,  32, 32);
2828
2929   tilemap_set_transparent_pen(fg_tilemap, 15);
3030
src/mame/video/skydiver.c
r778r779
5555
5656VIDEO_START( skydiver )
5757{
58   bg_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,8,8,32,32);
58   bg_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,8,8,32,32);
5959}
6060
6161
src/mame/video/yunsung8.c
r778r779
166166VIDEO_START( yunsung8 )
167167{
168168   tilemap_0 = tilemap_create(   get_tile_info_0, tilemap_scan_rows,
169                        TILEMAP_OPAQUE, 8,8, DIM_NX_0, DIM_NY_0 );
169                        TILEMAP_TYPE_OPAQUE, 8,8, DIM_NX_0, DIM_NY_0 );
170170
171171   tilemap_1 = tilemap_create(   get_tile_info_1, tilemap_scan_rows,
172                        TILEMAP_TRANSPARENT, 8,8, DIM_NX_1, DIM_NY_1 );
172                        TILEMAP_TYPE_TRANSPARENT, 8,8, DIM_NX_1, DIM_NY_1 );
173173
174174      tilemap_set_transparent_pen(tilemap_1,0);
175175}
src/mame/video/warpwarp.c
r778r779
181181
182182VIDEO_START( geebee )
183183{
184   bg_tilemap = tilemap_create(geebee_get_tile_info,tilemap_scan,TILEMAP_OPAQUE,8,8,34,28);
184   bg_tilemap = tilemap_create(geebee_get_tile_info,tilemap_scan,TILEMAP_TYPE_OPAQUE,8,8,34,28);
185185}
186186
187187VIDEO_START( navarone )
188188{
189   bg_tilemap = tilemap_create(navarone_get_tile_info,tilemap_scan,TILEMAP_OPAQUE,8,8,34,28);
189   bg_tilemap = tilemap_create(navarone_get_tile_info,tilemap_scan,TILEMAP_TYPE_OPAQUE,8,8,34,28);
190190}
191191
192192VIDEO_START( warpwarp )
193193{
194   bg_tilemap = tilemap_create(warpwarp_get_tile_info,tilemap_scan,TILEMAP_TRANSPARENT,8,8,34,28);
194   bg_tilemap = tilemap_create(warpwarp_get_tile_info,tilemap_scan,TILEMAP_TYPE_TRANSPARENT,8,8,34,28);
195195}
196196
197197
src/mame/video/gng.c
r778r779
5454
5555VIDEO_START( gng )
5656{
57   fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,32,32);
58   bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_cols,TILEMAP_SPLIT,    16,16,32,32);
57   fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,32,32);
58   bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_cols,TILEMAP_TYPE_SPLIT,    16,16,32,32);
5959
6060   tilemap_set_transparent_pen(fg_tilemap,3);
6161
src/mame/video/ojankohs.c
r778r779
278278
279279VIDEO_START( ojankohs )
280280{
281   ojankohs_tilemap = tilemap_create(ojankohs_get_tile_info, tilemap_scan_rows, TILEMAP_OPAQUE, 8, 4, 64, 64);
281   ojankohs_tilemap = tilemap_create(ojankohs_get_tile_info, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE, 8, 4, 64, 64);
282282   ojankohs_videoram = auto_malloc(0x2000);
283283   ojankohs_colorram = auto_malloc(0x1000);
284284   ojankohs_paletteram = auto_malloc(0x800);
r778r779
286286
287287VIDEO_START( ojankoy )
288288{
289   ojankohs_tilemap = tilemap_create(ojankoy_get_tile_info, tilemap_scan_rows, TILEMAP_OPAQUE, 8, 4, 64, 64);
289   ojankohs_tilemap = tilemap_create(ojankoy_get_tile_info, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE, 8, 4, 64, 64);
290290   ojankohs_videoram = auto_malloc(0x2000);
291291   ojankohs_colorram = auto_malloc(0x1000);
292292   ojankohs_paletteram = auto_malloc(0x800);
src/mame/video/bfm_adr2.c
r778r779
9292
9393#include "driver.h"
9494#include "cpu/m6809/m6809.h"
95#include "machine/vacfdisp.h"  // vfd
95#include "machine/bfm_bd1.h"  // vfd
9696#include "video/bfm_adr2.h"
9797#include "rendlay.h"
9898
r778r779
206206   state_save_register_item_array("Adder", 0, adder_ram);
207207   state_save_register_item_2d_array("Adder", 0, adder_screen_ram);
208208
209   tilemap0 = tilemap_create(get_tile0_info, tilemap_scan_rows, TILEMAP_OPAQUE, 8, 8, 50, 35);
209   tilemap0 = tilemap_create(get_tile0_info, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE, 8, 8, 50, 35);
210210
211   tilemap1 = tilemap_create(get_tile1_info, tilemap_scan_rows, TILEMAP_OPAQUE, 8, 8, 50, 35);
211   tilemap1 = tilemap_create(get_tile1_info, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE, 8, 8, 50, 35);
212212}
213213
214214// video update ///////////////////////////////////////////////////////////
r778r779
257257{
258258   // setup the standard bellfruit BD1 display /////////////////////////////
259259
260   vfd_init(0, VFDTYPE_BFMBD1,0);
260   bfm_bd1_init(0);
261261}
262262
263263///////////////////////////////////////////////////////////////////////////
src/mame/video/raiders5.c
r778r779
6666
6767VIDEO_START( raiders5 )
6868{
69   background_tilemap = tilemap_create(get_background_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,8,8,32,32);
70   foreground_tilemap = tilemap_create(get_foreground_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,32,32);
69   background_tilemap = tilemap_create(get_background_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,8,8,32,32);
70   foreground_tilemap = tilemap_create(get_foreground_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,32,32);
7171
7272   tilemap_set_scrolldx(background_tilemap, 7, 0);
7373
src/mame/video/wc90b.c
r778r779
6262
6363VIDEO_START( wc90b )
6464{
65   bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,     16,16,64,32);
66   fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,64,32);
67   tx_tilemap = tilemap_create(get_tx_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT, 8, 8,64,32);
65   bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,     16,16,64,32);
66   fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,64,32);
67   tx_tilemap = tilemap_create(get_tx_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 8, 8,64,32);
6868
6969   tilemap_set_transparent_pen(fg_tilemap,15);
7070   tilemap_set_transparent_pen(tx_tilemap,15);
src/mame/video/kncljoe.c
r778r779
112112
113113VIDEO_START( kncljoe )
114114{
115   bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,8,8,64,32);
115   bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,8,8,64,32);
116116
117117   tilemap_set_scroll_rows(bg_tilemap,4);
118118
src/mame/video/holeland.c
r778r779
5454
5555VIDEO_START( holeland )
5656{
57   bg_tilemap = tilemap_create(holeland_get_tile_info,tilemap_scan_rows,TILEMAP_SPLIT,16,16,32,32);
57   bg_tilemap = tilemap_create(holeland_get_tile_info,tilemap_scan_rows,TILEMAP_TYPE_SPLIT,16,16,32,32);
5858
5959   tilemap_set_transmask(bg_tilemap,0,0xff,0x00); /* split type 0 is totally transparent in front half */
6060   tilemap_set_transmask(bg_tilemap,1,0x01,0xfe); /* split type 1 has pen 0? transparent in front half */
r778r779
6262
6363VIDEO_START( crzrally )
6464{
65   bg_tilemap = tilemap_create(crzrally_get_tile_info,tilemap_scan_cols,TILEMAP_SPLIT,8,8,32,32);
65   bg_tilemap = tilemap_create(crzrally_get_tile_info,tilemap_scan_cols,TILEMAP_TYPE_SPLIT,8,8,32,32);
6666}
6767
6868WRITE8_HANDLER( holeland_videoram_w )
src/mame/video/liberate.c
r778r779
118118
119119VIDEO_START( prosoccr )
120120{
121   background_tilemap = tilemap_create(get_back_tile_info,back_scan,TILEMAP_OPAQUE,16,16,32,32);
122   fix_tilemap = tilemap_create(get_fix_tile_info,fix_scan,TILEMAP_TRANSPARENT,8,8,32,32);
121   background_tilemap = tilemap_create(get_back_tile_info,back_scan,TILEMAP_TYPE_OPAQUE,16,16,32,32);
122   fix_tilemap = tilemap_create(get_fix_tile_info,fix_scan,TILEMAP_TYPE_TRANSPARENT,8,8,32,32);
123123
124124   tilemap_set_transparent_pen(fix_tilemap,0);
125125}
126126
127127VIDEO_START( boomrang )
128128{
129   background_tilemap = tilemap_create(get_back_tile_info,back_scan,TILEMAP_SPLIT,16,16,32,32);
130   fix_tilemap = tilemap_create(get_fix_tile_info,fix_scan,TILEMAP_TRANSPARENT,8,8,32,32);
129   background_tilemap = tilemap_create(get_back_tile_info,back_scan,TILEMAP_TYPE_SPLIT,16,16,32,32);
130   fix_tilemap = tilemap_create(get_fix_tile_info,fix_scan,TILEMAP_TYPE_TRANSPARENT,8,8,32,32);
131131
132132   tilemap_set_transmask(background_tilemap,0,0x0001,0x007e); /* Bottom 1 pen/Top 7 pens */
133133   tilemap_set_transparent_pen(fix_tilemap,0);
r778r779
135135
136136VIDEO_START( liberate )
137137{
138   background_tilemap = tilemap_create(get_back_tile_info,back_scan,TILEMAP_OPAQUE,16,16,32,32);
139   fix_tilemap = tilemap_create(get_fix_tile_info,fix_scan,TILEMAP_TRANSPARENT,8,8,32,32);
138   background_tilemap = tilemap_create(get_back_tile_info,back_scan,TILEMAP_TYPE_OPAQUE,16,16,32,32);
139   fix_tilemap = tilemap_create(get_fix_tile_info,fix_scan,TILEMAP_TYPE_TRANSPARENT,8,8,32,32);
140140
141141   tilemap_set_transparent_pen(fix_tilemap,0);
142142}
src/mame/video/spdodgeb.c
r778r779
7979
8080VIDEO_START( spdodgeb )
8181{
82   bg_tilemap = tilemap_create(get_bg_tile_info,background_scan,TILEMAP_OPAQUE,8,8,64,32);
82   bg_tilemap = tilemap_create(get_bg_tile_info,background_scan,TILEMAP_TYPE_OPAQUE,8,8,64,32);
8383
8484   tilemap_set_scroll_rows(bg_tilemap,32);
8585}
src/mame/video/gunsmoke.c
r778r779
155155
156156   /* create tilemaps */
157157   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_cols,
158      TILEMAP_OPAQUE, 32, 32, 2048, 8);
158      TILEMAP_TYPE_OPAQUE, 32, 32, 2048, 8);
159159
160160   fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows,
161      TILEMAP_TRANSPARENT_COLOR, 8, 8, 32, 32);
161      TILEMAP_TYPE_TRANSPARENT_COLOR, 8, 8, 32, 32);
162162
163163   tilemap_set_transparent_pen(fg_tilemap, 0x4f);
164164
src/mame/video/turbo.c
r778r779
179179   turbo_state *state = machine->driver_data;
180180
181181   /* initialize the foreground tilemap */
182   state->fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows, TILEMAP_OPAQUE, 8,8, 32,32);
182   state->fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE, 8,8, 32,32);
183183}
184184
185185
r778r779
188188   turbo_state *state = machine->driver_data;
189189
190190   /* initialize the foreground tilemap */
191   state->fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows, TILEMAP_OPAQUE, 8,8, 32,32);
191   state->fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE, 8,8, 32,32);
192192
193193   /* allocate the bitmap RAM */
194194   state->buckrog_bitmap_ram = auto_malloc(0xe000);
src/mame/video/seta.c
r778r779
445445
446446   /* layer 0 */
447447   tilemap_0 = tilemap_create(   get_tile_info_0, tilemap_scan_rows,
448                        TILEMAP_TRANSPARENT, 16,16, 64,32 );
448                        TILEMAP_TYPE_TRANSPARENT, 16,16, 64,32 );
449449
450450   tilemap_1 = tilemap_create(   get_tile_info_1, tilemap_scan_rows,
451                        TILEMAP_TRANSPARENT, 16,16, 64,32 );
451                        TILEMAP_TYPE_TRANSPARENT, 16,16, 64,32 );
452452
453453
454454   /* layer 1 */
455455   tilemap_2 = tilemap_create(   get_tile_info_2, tilemap_scan_rows,
456                        TILEMAP_TRANSPARENT, 16,16, 64,32 );
456                        TILEMAP_TYPE_TRANSPARENT, 16,16, 64,32 );
457457
458458   tilemap_3 = tilemap_create(   get_tile_info_3, tilemap_scan_rows,
459                        TILEMAP_TRANSPARENT, 16,16, 64,32 );
459                        TILEMAP_TYPE_TRANSPARENT, 16,16, 64,32 );
460460
461461      tilemaps_flip = 0;
462462
r778r779
478478
479479   /* layer 0 */
480480   tilemap_0 = tilemap_create(   get_tile_info_0, tilemap_scan_rows,
481                        TILEMAP_TRANSPARENT, 16,16, 64,32 );
481                        TILEMAP_TYPE_TRANSPARENT, 16,16, 64,32 );
482482
483483   tilemap_1 = tilemap_create(   get_tile_info_1, tilemap_scan_rows,
484                        TILEMAP_TRANSPARENT, 16,16, 64,32 );
484                        TILEMAP_TYPE_TRANSPARENT, 16,16, 64,32 );
485485
486486
487487   /* NO layer 1 */
r778r779
504504
505505   /* layer 0 */
506506   tilemap_0 = tilemap_create(   twineagl_get_tile_info_0, tilemap_scan_rows,
507                        TILEMAP_TRANSPARENT, 16,16, 64,32 );
507                        TILEMAP_TYPE_TRANSPARENT, 16,16, 64,32 );
508508
509509   tilemap_1 = tilemap_create(   twineagl_get_tile_info_1, tilemap_scan_rows,
510                        TILEMAP_TRANSPARENT, 16,16, 64,32 );
510                        TILEMAP_TYPE_TRANSPARENT, 16,16, 64,32 );
511511
512512
513513   /* NO layer 1 */
src/mame/video/tp84.c
r778r779
203203VIDEO_START( tp84 )
204204{
205205   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows,
206      TILEMAP_OPAQUE, 8, 8, 32, 32);
206      TILEMAP_TYPE_OPAQUE, 8, 8, 32, 32);
207207
208208   fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows,
209      TILEMAP_TRANSPARENT, 8, 8, 32, 32);
209      TILEMAP_TYPE_TRANSPARENT, 8, 8, 32, 32);
210210
211211   tilemap_set_transparent_pen(fg_tilemap, 0);
212212
src/mame/video/vball.c
r778r779
4949
5050VIDEO_START( vb )
5151{
52   bg_tilemap = tilemap_create(get_bg_tile_info,background_scan,TILEMAP_OPAQUE, 8, 8,64,64);
52   bg_tilemap = tilemap_create(get_bg_tile_info,background_scan,TILEMAP_TYPE_OPAQUE, 8, 8,64,64);
5353
5454   tilemap_set_scroll_rows(bg_tilemap,32);
5555}
src/mame/video/plygonet.c
r778r779
5252   tilemap_mark_tile_dirty(ttl_tilemap, offset*2+1);
5353}
5454
55VIDEO_START(polygonet_vh_start)
55VIDEO_START( polygonet )
5656{
5757   static const gfx_layout charlayout =
5858   {
r778r779
8888   }
8989
9090   // create the tilemap
91   ttl_tilemap = tilemap_create(ttl_get_tile_info, ttl_scan, TILEMAP_TRANSPARENT, 8, 8, 64, 32);
91   ttl_tilemap = tilemap_create(ttl_get_tile_info, ttl_scan, TILEMAP_TYPE_TRANSPARENT, 8, 8, 64, 32);
9292
9393   tilemap_set_transparent_pen(ttl_tilemap, 0);
9494
9595   state_save_register_global_array(ttl_vram);
9696}
9797
98VIDEO_UPDATE(polygonet_vh_screenrefresh)
98VIDEO_UPDATE( polygonet )
9999{
100100   fillbitmap(priority_bitmap, 0, NULL);
101101   fillbitmap(bitmap, get_black_pen(machine), &machine->screen[0].visarea);
src/mame/video/higemaru.c
r778r779
9090VIDEO_START( higemaru )
9191{
9292   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows,
93      TILEMAP_OPAQUE, 8, 8, 32, 32);
93      TILEMAP_TYPE_OPAQUE, 8, 8, 32, 32);
9494}
9595
9696static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect)
src/mame/video/batman.c
r778r779
106106   };
107107
108108   /* initialize the playfield */
109   atarigen_playfield_tilemap = tilemap_create(get_playfield_tile_info, tilemap_scan_cols, TILEMAP_OPAQUE, 8,8, 64,64);
109   atarigen_playfield_tilemap = tilemap_create(get_playfield_tile_info, tilemap_scan_cols, TILEMAP_TYPE_OPAQUE, 8,8, 64,64);
110110
111111   /* initialize the second playfield */
112   atarigen_playfield2_tilemap = tilemap_create(get_playfield2_tile_info, tilemap_scan_cols, TILEMAP_TRANSPARENT, 8,8, 64,64);
112   atarigen_playfield2_tilemap = tilemap_create(get_playfield2_tile_info, tilemap_scan_cols, TILEMAP_TYPE_TRANSPARENT, 8,8, 64,64);
113113   tilemap_set_transparent_pen(atarigen_playfield2_tilemap, 0);
114114
115115   /* initialize the motion objects */
116116   atarimo_init(machine, 0, &modesc);
117117
118118   /* initialize the alphanumerics */
119   atarigen_alpha_tilemap = tilemap_create(get_alpha_tile_info, tilemap_scan_rows, TILEMAP_TRANSPARENT, 8,8, 64,32);
119   atarigen_alpha_tilemap = tilemap_create(get_alpha_tile_info, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 8,8, 64,32);
120120   tilemap_set_transparent_pen(atarigen_alpha_tilemap, 0);
121121}
122122
src/mame/video/nemesis.c
r778r779
207207   spriteram_words = spriteram_size / 2;
208208
209209   background = tilemap_create(
210      get_bg_tile_info, tilemap_scan_rows, TILEMAP_TRANSPARENT, 8,8, 64,32 );
210      get_bg_tile_info, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 8,8, 64,32 );
211211
212212   foreground = tilemap_create(
213      get_fg_tile_info, tilemap_scan_rows, TILEMAP_TRANSPARENT, 8,8, 64,32 );
213      get_fg_tile_info, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 8,8, 64,32 );
214214
215215   tilemap_set_transparent_pen( background, 0 );
216216   tilemap_set_transparent_pen( foreground, 0 );
src/mame/video/afega.c
r778r779
172172VIDEO_START( afega )
173173{
174174   tilemap_0 = tilemap_create(   get_tile_info_0, afega_tilemap_scan_pages,
175                        TILEMAP_OPAQUE,
175                        TILEMAP_TYPE_OPAQUE,
176176                        16,16,
177177                        TILES_PER_PAGE_X*PAGES_PER_TMAP_X,TILES_PER_PAGE_Y*PAGES_PER_TMAP_Y);
178178
179179   tilemap_1 = tilemap_create(   get_tile_info_1, tilemap_scan_cols,
180                        TILEMAP_TRANSPARENT,
180                        TILEMAP_TYPE_TRANSPARENT,
181181                        8,8,
182182                        32,32);
183183
r778r779
188188VIDEO_START( twinactn )
189189{
190190   tilemap_0 = tilemap_create(   get_tile_info_0, afega_tilemap_scan_pages,
191                        TILEMAP_OPAQUE,
191                        TILEMAP_TYPE_OPAQUE,
192192                        16,16,
193193                        TWINACTN_TILES_PER_PAGE_X*TWINACTN_PAGES_PER_TMAP_X,TWINACTN_TILES_PER_PAGE_Y*TWINACTN_PAGES_PER_TMAP_Y);
194194
195195   tilemap_1 = tilemap_create(   get_tile_info_1, tilemap_scan_cols,
196                        TILEMAP_TRANSPARENT,
196                        TILEMAP_TYPE_TRANSPARENT,
197197                        8,8,
198198                        32,32);
199199
r778r779
204204VIDEO_START( firehawk )
205205{
206206   tilemap_0 = tilemap_create(   get_tile_info_0, firehawk_tilemap_scan_pages,
207                        TILEMAP_OPAQUE,
207                        TILEMAP_TYPE_OPAQUE,
208208                        16,16,
209209                        TILES_PER_PAGE_X*FIREHAWK_PAGES_PER_TMAP_X,TILES_PER_PAGE_Y*FIREHAWK_PAGES_PER_TMAP_Y);
210210
211211   tilemap_1 = tilemap_create(   get_tile_info_1, tilemap_scan_cols,
212                        TILEMAP_TRANSPARENT,
212                        TILEMAP_TYPE_TRANSPARENT,
213213                        8,8,
214214                        32,32);
215215
src/mame/video/timelimt.c
r778r779
7373VIDEO_START( timelimt )
7474{
7575   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows,
76      TILEMAP_OPAQUE, 8, 8, 64, 32);
76      TILEMAP_TYPE_OPAQUE, 8, 8, 64, 32);
7777
7878   fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows,
79      TILEMAP_TRANSPARENT, 8, 8, 32, 32);
79      TILEMAP_TYPE_TRANSPARENT, 8, 8, 32, 32);
8080
8181   tilemap_set_transparent_pen(fg_tilemap, 0);
8282}
src/mame/video/deco16ic.c
r778r779
519519{
520520   sprite_priority_bitmap = auto_bitmap_alloc( Machine->screen[0].width, Machine->screen[0].height, BITMAP_FORMAT_INDEXED8 );
521521
522   pf1_tilemap_16x16 =   tilemap_create(get_pf1_tile_info,   deco16_scan_rows, TILEMAP_TRANSPARENT,16,16,64,32);
523   pf1_tilemap_8x8 =   tilemap_create(get_pf1_tile_info_b, tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,64,32);
522   pf1_tilemap_16x16 =   tilemap_create(get_pf1_tile_info,   deco16_scan_rows, TILEMAP_TYPE_TRANSPARENT,16,16,64,32);
523   pf1_tilemap_8x8 =   tilemap_create(get_pf1_tile_info_b, tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,64,32);
524524
525525   if (split)
526      pf2_tilemap_16x16 =   tilemap_create(get_pf2_tile_info,   deco16_scan_rows, TILEMAP_SPLIT,16,16,full_width ? 64 : 32,32);
526      pf2_tilemap_16x16 =   tilemap_create(get_pf2_tile_info,   deco16_scan_rows, TILEMAP_TYPE_SPLIT,16,16,full_width ? 64 : 32,32);
527527   else
528      pf2_tilemap_16x16 =   tilemap_create(get_pf2_tile_info,   deco16_scan_rows, TILEMAP_TRANSPARENT,16,16,full_width ? 64 : 32,32);
529   pf2_tilemap_8x8 =   tilemap_create(get_pf2_tile_info_b, tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,full_width ? 64 : 32,32);
528      pf2_tilemap_16x16 =   tilemap_create(get_pf2_tile_info,   deco16_scan_rows, TILEMAP_TYPE_TRANSPARENT,16,16,full_width ? 64 : 32,32);
529   pf2_tilemap_8x8 =   tilemap_create(get_pf2_tile_info_b, tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,full_width ? 64 : 32,32);
530530
531531   dirty_palette = auto_malloc(4096);
532532   deco16_raster_display_list=auto_malloc(20 * 256);
533533
534534   if (!pf12_only)
535535   {
536      pf4_tilemap_16x16 =   tilemap_create(get_pf4_tile_info,   deco16_scan_rows, TILEMAP_TRANSPARENT,16,16,full_width ? 64 : 32,32);
537      pf3_tilemap_16x16 =   tilemap_create(get_pf3_tile_info,   deco16_scan_rows, TILEMAP_TRANSPARENT,16,16,full_width ? 64 : 32,32);
536      pf4_tilemap_16x16 =   tilemap_create(get_pf4_tile_info,   deco16_scan_rows, TILEMAP_TYPE_TRANSPARENT,16,16,full_width ? 64 : 32,32);
537      pf3_tilemap_16x16 =   tilemap_create(get_pf3_tile_info,   deco16_scan_rows, TILEMAP_TYPE_TRANSPARENT,16,16,full_width ? 64 : 32,32);
538538   }
539539   else
540540   {
src/mame/video/goal92.c
r778r779
135135
136136VIDEO_START( goal92 )
137137{
138   background_layer = tilemap_create(get_back_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,32,32);
139   foreground_layer = tilemap_create(get_fore_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,32,32);
140   text_layer       = tilemap_create(get_text_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,  8,8,64,32);
138   background_layer = tilemap_create(get_back_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,32,32);
139   foreground_layer = tilemap_create(get_fore_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,32,32);
140   text_layer       = tilemap_create(get_text_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,  8,8,64,32);
141141
142142   buffered_spriteram16 = auto_malloc(0x400*2);
143143
src/mame/video/1942.c
r778r779
131131***************************************************************************/
132132VIDEO_START( 1942 )
133133{
134   fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT, 8, 8,32,32);
135   bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_cols,TILEMAP_OPAQUE,     16,16,32,16);
134   fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 8, 8,32,32);
135   bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_cols,TILEMAP_TYPE_OPAQUE,     16,16,32,16);
136136
137137   tilemap_set_transparent_pen(fg_tilemap,0);
138138
src/mame/video/poolshrk.c
r778r779
2929VIDEO_START( poolshrk )
3030{
3131   bg_tilemap = tilemap_create(get_tile_info, get_memory_offset,
32      TILEMAP_TRANSPARENT, 8, 8, 32, 32);
32      TILEMAP_TYPE_TRANSPARENT, 8, 8, 32, 32);
3333
3434   tilemap_set_transparent_pen(bg_tilemap, 0);
3535}
src/mame/video/mayumi.c
r778r779
2424{
2525   mayumi_videoram = auto_malloc(0x1800);
2626
27   mayumi_tilemap = tilemap_create( get_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,8,8,64,32 );
27   mayumi_tilemap = tilemap_create( get_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,8,8,64,32 );
2828}
2929
3030WRITE8_HANDLER( mayumi_videoram_w )
src/mame/video/raiden.c
r778r779
8484
8585VIDEO_START( raiden )
8686{
87   bg_layer = tilemap_create(get_back_tile_info,tilemap_scan_cols,TILEMAP_OPAQUE,     16,16,32,32);
88   fg_layer = tilemap_create(get_fore_tile_info,tilemap_scan_cols,TILEMAP_TRANSPARENT,16,16,32,32);
89   tx_layer = tilemap_create(get_text_tile_info,tilemap_scan_cols,TILEMAP_TRANSPARENT,8,8,32,32);
87   bg_layer = tilemap_create(get_back_tile_info,tilemap_scan_cols,TILEMAP_TYPE_OPAQUE,     16,16,32,32);
88   fg_layer = tilemap_create(get_fore_tile_info,tilemap_scan_cols,TILEMAP_TYPE_TRANSPARENT,16,16,32,32);
89   tx_layer = tilemap_create(get_text_tile_info,tilemap_scan_cols,TILEMAP_TYPE_TRANSPARENT,8,8,32,32);
9090   ALTERNATE=0;
9191
9292   tilemap_set_transparent_pen(fg_layer,15);
r778r779
9595
9696VIDEO_START( raidena )
9797{
98   bg_layer = tilemap_create(get_back_tile_info,tilemap_scan_cols,TILEMAP_OPAQUE,     16,16,32,32);
99   fg_layer = tilemap_create(get_fore_tile_info,tilemap_scan_cols,TILEMAP_TRANSPARENT,16,16,32,32);
100   tx_layer = tilemap_create(get_text_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,32,32);
98   bg_layer = tilemap_create(get_back_tile_info,tilemap_scan_cols,TILEMAP_TYPE_OPAQUE,     16,16,32,32);
99   fg_layer = tilemap_create(get_fore_tile_info,tilemap_scan_cols,TILEMAP_TYPE_TRANSPARENT,16,16,32,32);
100   tx_layer = tilemap_create(get_text_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,32,32);
101101   ALTERNATE=1;
102102
103103   tilemap_set_transparent_pen(fg_layer,15);
src/mame/video/bloodbro.c
r778r779
5959
6060VIDEO_START( bloodbro )
6161{
62   bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,     16,16,32,16);
63   fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,32,16);
64   tx_tilemap = tilemap_create(get_tx_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT, 8, 8,32,32);
62   bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,     16,16,32,16);
63   fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,32,16);
64   tx_tilemap = tilemap_create(get_tx_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 8, 8,32,32);
6565
6666   tilemap_set_transparent_pen(fg_tilemap,15);
6767   tilemap_set_transparent_pen(tx_tilemap,15);
src/mame/video/fromanc2.c
r778r779
370370
371371VIDEO_START( fromanc2 )
372372{
373   fromanc2_tilemap[0][0] = tilemap_create(fromanc2_get_v0_l0_tile_info, tilemap_scan_rows, TILEMAP_OPAQUE,      8, 8, 64, 64);
374   fromanc2_tilemap[0][1] = tilemap_create(fromanc2_get_v0_l1_tile_info, tilemap_scan_rows, TILEMAP_TRANSPARENT, 8, 8, 64, 64);
375   fromanc2_tilemap[0][2] = tilemap_create(fromanc2_get_v0_l2_tile_info, tilemap_scan_rows, TILEMAP_TRANSPARENT, 8, 8, 64, 64);
376   fromanc2_tilemap[0][3] = tilemap_create(fromanc2_get_v0_l3_tile_info, tilemap_scan_rows, TILEMAP_TRANSPARENT, 8, 8, 64, 64);
377   fromanc2_tilemap[1][0] = tilemap_create(fromanc2_get_v1_l0_tile_info, tilemap_scan_rows, TILEMAP_OPAQUE,      8, 8, 64, 64);
378   fromanc2_tilemap[1][1] = tilemap_create(fromanc2_get_v1_l1_tile_info, tilemap_scan_rows, TILEMAP_TRANSPARENT, 8, 8, 64, 64);
379   fromanc2_tilemap[1][2] = tilemap_create(fromanc2_get_v1_l2_tile_info, tilemap_scan_rows, TILEMAP_TRANSPARENT, 8, 8, 64, 64);
380   fromanc2_tilemap[1][3] = tilemap_create(fromanc2_get_v1_l3_tile_info, tilemap_scan_rows, TILEMAP_TRANSPARENT, 8, 8, 64, 64);
373   fromanc2_tilemap[0][0] = tilemap_create(fromanc2_get_v0_l0_tile_info, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE,      8, 8, 64, 64);
374   fromanc2_tilemap[0][1] = tilemap_create(fromanc2_get_v0_l1_tile_info, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 8, 8, 64, 64);
375   fromanc2_tilemap[0][2] = tilemap_create(fromanc2_get_v0_l2_tile_info, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 8, 8, 64, 64);
376   fromanc2_tilemap[0][3] = tilemap_create(fromanc2_get_v0_l3_tile_info, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 8, 8, 64, 64);
377   fromanc2_tilemap[1][0] = tilemap_create(fromanc2_get_v1_l0_tile_info, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE,      8, 8, 64, 64);
378   fromanc2_tilemap[1][1] = tilemap_create(fromanc2_get_v1_l1_tile_info, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 8, 8, 64, 64);
379   fromanc2_tilemap[1][2] = tilemap_create(fromanc2_get_v1_l2_tile_info, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 8, 8, 64, 64);
380   fromanc2_tilemap[1][3] = tilemap_create(fromanc2_get_v1_l3_tile_info, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 8, 8, 64, 64);
381381
382382   fromanc2_videoram[0][0] = auto_malloc((64 * 64) * sizeof(UINT16));
383383   fromanc2_videoram[0][1] = auto_malloc((64 * 64) * sizeof(UINT16));
r778r779
401401
402402VIDEO_START( fromancr )
403403{
404   fromanc2_tilemap[0][0] = tilemap_create(fromancr_get_v0_l0_tile_info, tilemap_scan_rows, TILEMAP_OPAQUE,      8, 8, 64, 64);
405   fromanc2_tilemap[0][1] = tilemap_create(fromancr_get_v0_l1_tile_info, tilemap_scan_rows, TILEMAP_TRANSPARENT, 8, 8, 64, 64);
406   fromanc2_tilemap[0][2] = tilemap_create(fromancr_get_v0_l2_tile_info, tilemap_scan_rows, TILEMAP_TRANSPARENT, 8, 8, 64, 64);
404   fromanc2_tilemap[0][0] = tilemap_create(fromancr_get_v0_l0_tile_info, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE,      8, 8, 64, 64);
405   fromanc2_tilemap[0][1] = tilemap_create(fromancr_get_v0_l1_tile_info, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 8, 8, 64, 64);
406   fromanc2_tilemap[0][2] = tilemap_create(fromancr_get_v0_l2_tile_info, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 8, 8, 64, 64);
407407   fromanc2_tilemap[0][3] = 0;
408   fromanc2_tilemap[1][0] = tilemap_create(fromancr_get_v1_l0_tile_info, tilemap_scan_rows, TILEMAP_OPAQUE,      8, 8, 64, 64);
409   fromanc2_tilemap[1][1] = tilemap_create(fromancr_get_v1_l1_tile_info, tilemap_scan_rows, TILEMAP_TRANSPARENT, 8, 8, 64, 64);
410   fromanc2_tilemap[1][2] = tilemap_create(fromancr_get_v1_l2_tile_info, tilemap_scan_rows, TILEMAP_TRANSPARENT, 8, 8, 64, 64);
408   fromanc2_tilemap[1][0] = tilemap_create(fromancr_get_v1_l0_tile_info, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE,      8, 8, 64, 64);
409   fromanc2_tilemap[1][1] = tilemap_create(fromancr_get_v1_l1_tile_info, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 8, 8, 64, 64);
410   fromanc2_tilemap[1][2] = tilemap_create(fromancr_get_v1_l2_tile_info, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 8, 8, 64, 64);
411411   fromanc2_tilemap[1][3] = 0;
412412
413413   fromanc2_videoram[0][0] = auto_malloc((64 * 64) * sizeof(UINT16));
r778r779
429429
430430VIDEO_START( fromanc4 )
431431{
432   fromanc2_tilemap[0][0] = tilemap_create(fromancr_get_v0_l0_tile_info, tilemap_scan_rows, TILEMAP_OPAQUE,      8, 8, 256, 64);
433   fromanc2_tilemap[0][1] = tilemap_create(fromancr_get_v0_l1_tile_info, tilemap_scan_rows, TILEMAP_TRANSPARENT, 8, 8, 256, 64);
434   fromanc2_tilemap[0][2] = tilemap_create(fromancr_get_v0_l2_tile_info, tilemap_scan_rows, TILEMAP_TRANSPARENT, 8, 8, 256, 64);
432   fromanc2_tilemap[0][0] = tilemap_create(fromancr_get_v0_l0_tile_info, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE,      8, 8, 256, 64);
433   fromanc2_tilemap[0][1] = tilemap_create(fromancr_get_v0_l1_tile_info, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 8, 8, 256, 64);
434   fromanc2_tilemap[0][2] = tilemap_create(fromancr_get_v0_l2_tile_info, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 8, 8, 256, 64);
435435   fromanc2_tilemap[0][3] = 0;
436   fromanc2_tilemap[1][0] = tilemap_create(fromancr_get_v1_l0_tile_info, tilemap_scan_rows, TILEMAP_OPAQUE,      8, 8, 256, 64);
437   fromanc2_tilemap[1][1] = tilemap_create(fromancr_get_v1_l1_tile_info, tilemap_scan_rows, TILEMAP_TRANSPARENT, 8, 8, 256, 64);
438   fromanc2_tilemap[1][2] = tilemap_create(fromancr_get_v1_l2_tile_info, tilemap_scan_rows, TILEMAP_TRANSPARENT, 8, 8, 256, 64);
436   fromanc2_tilemap[1][0] = tilemap_create(fromancr_get_v1_l0_tile_info, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE,      8, 8, 256, 64);
437   fromanc2_tilemap[1][1] = tilemap_create(fromancr_get_v1_l1_tile_info, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 8, 8, 256, 64);
438   fromanc2_tilemap[1][2] = tilemap_create(fromancr_get_v1_l2_tile_info, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 8, 8, 256, 64);
439439   fromanc2_tilemap[1][3] = 0;
440440
441441   fromanc2_videoram[0][0] = auto_malloc((256 * 64) * sizeof(UINT16));
src/mame/video/bombjack.c
r778r779
6666VIDEO_START( bombjack )
6767{
6868   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows,
69      TILEMAP_OPAQUE, 16, 16, 16, 16);
69      TILEMAP_TYPE_OPAQUE, 16, 16, 16, 16);
7070
7171   fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows,
72      TILEMAP_TRANSPARENT, 8, 8, 32, 32);
72      TILEMAP_TYPE_TRANSPARENT, 8, 8, 32, 32);
7373
7474   tilemap_set_transparent_pen(fg_tilemap, 0);
7575
src/mame/video/rallyx.c
r778r779
257257
258258   if (video_type == TYPE_RALLYX || video_type == TYPE_JUNGLER)
259259   {
260      bg_tilemap = tilemap_create(rallyx_bg_get_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,8,8,32,32);
261      fg_tilemap = tilemap_create(rallyx_fg_get_tile_info,fg_tilemap_scan,  TILEMAP_OPAQUE,8,8, 8,32);
260      bg_tilemap = tilemap_create(rallyx_bg_get_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,8,8,32,32);
261      fg_tilemap = tilemap_create(rallyx_fg_get_tile_info,fg_tilemap_scan,  TILEMAP_TYPE_OPAQUE,8,8, 8,32);
262262   }
263263   else
264264   {
265      bg_tilemap = tilemap_create(locomotn_bg_get_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,8,8,32,32);
266      fg_tilemap = tilemap_create(locomotn_fg_get_tile_info,fg_tilemap_scan,  TILEMAP_OPAQUE,8,8, 8,32);
265      bg_tilemap = tilemap_create(locomotn_bg_get_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,8,8,32,32);
266      fg_tilemap = tilemap_create(locomotn_fg_get_tile_info,fg_tilemap_scan,  TILEMAP_TYPE_OPAQUE,8,8, 8,32);
267267   }
268268
269269   /* the scrolling tilemap is slightly misplaced in Rally X */
src/mame/video/trucocl.c
r778r779
7272
7373VIDEO_START( trucocl )
7474{
75   bg_tilemap = tilemap_create( get_bg_tile_info, tilemap_scan_rows, TILEMAP_OPAQUE, 8, 8, 32, 32 );
75   bg_tilemap = tilemap_create( get_bg_tile_info, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE, 8, 8, 32, 32 );
7676}
7777
7878VIDEO_UPDATE( trucocl )
src/mame/video/unico.c
r778r779
141141VIDEO_START( unico )
142142{
143143   tilemap_0 = tilemap_create(   get_tile_info_0,tilemap_scan_rows,
144                        TILEMAP_TRANSPARENT,   16,16,   0x40, 0x40);
144                        TILEMAP_TYPE_TRANSPARENT,   16,16,   0x40, 0x40);
145145
146146   tilemap_1 = tilemap_create(   get_tile_info_1,tilemap_scan_rows,
147                        TILEMAP_TRANSPARENT,   16,16,   0x40, 0x40);
147                        TILEMAP_TYPE_TRANSPARENT,   16,16,   0x40, 0x40);
148148
149149   tilemap_2 = tilemap_create(   get_tile_info_2,tilemap_scan_rows,
150                        TILEMAP_TRANSPARENT,   16,16,   0x40, 0x40);
150                        TILEMAP_TYPE_TRANSPARENT,   16,16,   0x40, 0x40);
151151
152152   sprites_scrolldx = -0x3f;
153153   sprites_scrolldy = -0x0e;
r778r779
168168VIDEO_START( zeropnt2 )
169169{
170170   tilemap_0 = tilemap_create(   get_tile_info32_0,tilemap_scan_rows,
171                        TILEMAP_TRANSPARENT,   16,16,   0x40, 0x40);
171                        TILEMAP_TYPE_TRANSPARENT,   16,16,   0x40, 0x40);
172172
173173   tilemap_1 = tilemap_create(   get_tile_info32_1,tilemap_scan_rows,
174                        TILEMAP_TRANSPARENT,   16,16,   0x40, 0x40);
174                        TILEMAP_TYPE_TRANSPARENT,   16,16,   0x40, 0x40);
175175
176176   tilemap_2 = tilemap_create(   get_tile_info32_2,tilemap_scan_rows,
177                        TILEMAP_TRANSPARENT,   16,16,   0x40, 0x40);
177                        TILEMAP_TYPE_TRANSPARENT,   16,16,   0x40, 0x40);
178178
179179   sprites_scrolldx = -0x3f;
180180   sprites_scrolldy = -0x0e;
src/mame/video/gcpinbal.c
r778r779
6969   int xoffs = 0;
7070   int yoffs = 0;
7171
72   gcpinbal_tilemap[0] = tilemap_create(get_bg0_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,32,32);
73   gcpinbal_tilemap[1] = tilemap_create(get_bg1_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,32,32);
74   gcpinbal_tilemap[2] = tilemap_create(get_fg_tile_info, tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,64,64);
72   gcpinbal_tilemap[0] = tilemap_create(get_bg0_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,32,32);
73   gcpinbal_tilemap[1] = tilemap_create(get_bg1_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,32,32);
74   gcpinbal_tilemap[2] = tilemap_create(get_fg_tile_info, tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,64,64);
7575
7676   tilemap_set_transparent_pen( gcpinbal_tilemap[0],0 );
7777   tilemap_set_transparent_pen( gcpinbal_tilemap[1],0 );
src/mame/video/realbrk.c
r778r779
154154{
155155   /* Backgrounds */
156156   tilemap_0 = tilemap_create(   get_tile_info_0, tilemap_scan_rows,
157                        TILEMAP_TRANSPARENT,
157                        TILEMAP_TYPE_TRANSPARENT,
158158                        16,16,
159159                        0x40, 0x20);
160160
161161   tilemap_1 = tilemap_create(   get_tile_info_1, tilemap_scan_rows,
162                        TILEMAP_TRANSPARENT,
162                        TILEMAP_TYPE_TRANSPARENT,
163163                        16,16,
164164                        0x40, 0x20);
165165
166166   /* Text */
167167   tilemap_2 = tilemap_create(   get_tile_info_2, tilemap_scan_rows,
168                        TILEMAP_TRANSPARENT,
168                        TILEMAP_TYPE_TRANSPARENT,
169169                        8,8,
170170                        0x40, 0x20);
171171
src/mame/video/carjmbre.c
r778r779
8282VIDEO_START( carjmbre )
8383{
8484
85   carjmbre_tilemap = tilemap_create( get_carjmbre_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,8,8,32,32 );
85   carjmbre_tilemap = tilemap_create( get_carjmbre_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,8,8,32,32 );
8686
8787   state_save_register_global(carjmbre_flipscreen);
8888   state_save_register_global(carjmbre_bgcolor);
src/mame/video/bottom9.c
r778r779
6565   zoom_colorbase = 48;
6666   K052109_vh_start(machine,REGION_GFX1,NORMAL_PLANE_ORDER,tile_callback);
6767   K051960_vh_start(machine,REGION_GFX2,NORMAL_PLANE_ORDER,sprite_callback);
68   K051316_vh_start_0(machine,REGION_GFX3,4,TILEMAP_TRANSPARENT,0,zoom_callback);
68   K051316_vh_start_0(machine,REGION_GFX3,4,TILEMAP_TYPE_TRANSPARENT,0,zoom_callback);
6969}
7070
7171
src/mame/video/flower.c
r778r779
138138
139139VIDEO_START(flower)
140140{
141   flower_bg0_tilemap        = tilemap_create(get_bg0_tile_info, tilemap_scan_rows,TILEMAP_OPAQUE,     16,16,16,16);
142   flower_bg1_tilemap        = tilemap_create(get_bg1_tile_info, tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,16,16);
143   flower_text_tilemap       = tilemap_create(get_text_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT, 8, 8,32,32);
144   flower_text_right_tilemap = tilemap_create(get_text_tile_info,tilemap_scan_cols,TILEMAP_TRANSPARENT, 8, 8, 2,32);
141   flower_bg0_tilemap        = tilemap_create(get_bg0_tile_info, tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,     16,16,16,16);
142   flower_bg1_tilemap        = tilemap_create(get_bg1_tile_info, tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,16,16);
143   flower_text_tilemap       = tilemap_create(get_text_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 8, 8,32,32);
144   flower_text_right_tilemap = tilemap_create(get_text_tile_info,tilemap_scan_cols,TILEMAP_TYPE_TRANSPARENT, 8, 8, 2,32);
145145
146146   tilemap_set_transparent_pen(flower_bg1_tilemap,15);
147147   tilemap_set_transparent_pen(flower_text_tilemap,3);
src/mame/video/xain.c
r778r779
8888
8989VIDEO_START( xain )
9090{
91   bgram0_tilemap = tilemap_create(get_bgram0_tile_info,back_scan,    TILEMAP_TRANSPARENT,16,16,32,32);
92   bgram1_tilemap = tilemap_create(get_bgram1_tile_info,back_scan,    TILEMAP_TRANSPARENT,16,16,32,32);
93   char_tilemap = tilemap_create(get_char_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT, 8, 8,32,32);
91   bgram0_tilemap = tilemap_create(get_bgram0_tile_info,back_scan,    TILEMAP_TYPE_TRANSPARENT,16,16,32,32);
92   bgram1_tilemap = tilemap_create(get_bgram1_tile_info,back_scan,    TILEMAP_TYPE_TRANSPARENT,16,16,32,32);
93   char_tilemap = tilemap_create(get_char_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 8, 8,32,32);
9494
9595   tilemap_set_transparent_pen(bgram0_tilemap,0);
9696   tilemap_set_transparent_pen(bgram1_tilemap,0);
src/mame/video/namcos1.c
r778r779
106106   namcos1_spriteram = auto_malloc(0x1000);
107107
108108   /* initialize playfields */
109   bg_tilemap[0] = tilemap_create(bg_get_info0,tilemap_scan_rows,TILEMAP_BITMASK,8,8,64,64);
110   bg_tilemap[1] = tilemap_create(bg_get_info1,tilemap_scan_rows,TILEMAP_BITMASK,8,8,64,64);
111   bg_tilemap[2] = tilemap_create(bg_get_info2,tilemap_scan_rows,TILEMAP_BITMASK,8,8,64,64);
112   bg_tilemap[3] = tilemap_create(bg_get_info3,tilemap_scan_rows,TILEMAP_BITMASK,8,8,64,32);
113   bg_tilemap[4] = tilemap_create(fg_get_info4,tilemap_scan_rows,TILEMAP_BITMASK,8,8,36,28);
114   bg_tilemap[5] = tilemap_create(fg_get_info5,tilemap_scan_rows,TILEMAP_BITMASK,8,8,36,28);
109   bg_tilemap[0] = tilemap_create(bg_get_info0,tilemap_scan_rows,TILEMAP_TYPE_BITMASK,8,8,64,64);
110   bg_tilemap[1] = tilemap_create(bg_get_info1,tilemap_scan_rows,TILEMAP_TYPE_BITMASK,8,8,64,64);
111   bg_tilemap[2] = tilemap_create(bg_get_info2,tilemap_scan_rows,TILEMAP_TYPE_BITMASK,8,8,64,64);
112   bg_tilemap[3] = tilemap_create(bg_get_info3,tilemap_scan_rows,TILEMAP_TYPE_BITMASK,8,8,64,32);
113   bg_tilemap[4] = tilemap_create(fg_get_info4,tilemap_scan_rows,TILEMAP_TYPE_BITMASK,8,8,36,28);
114   bg_tilemap[5] = tilemap_create(fg_get_info5,tilemap_scan_rows,TILEMAP_TYPE_BITMASK,8,8,36,28);
115115
116116   tilemap_set_scrolldx(bg_tilemap[4],73,512-73);
117117   tilemap_set_scrolldx(bg_tilemap[5],73,512-73);
src/mame/video/mrdo.c
r778r779
153153
154154VIDEO_START( mrdo )
155155{
156   bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,32,32);
157   fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,32,32);
156   bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,32,32);
157   fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,32,32);
158158
159159   tilemap_set_transparent_pen(bg_tilemap,0);
160160   tilemap_set_transparent_pen(fg_tilemap,0);
src/mame/video/gundealr.c
r778r779
5959
6060VIDEO_START( gundealr )
6161{
62   bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_cols,TILEMAP_OPAQUE,      8, 8,32,32);
63   fg_tilemap = tilemap_create(get_fg_tile_info,gundealr_scan,    TILEMAP_TRANSPARENT,16,16,64,32);
62   bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_cols,TILEMAP_TYPE_OPAQUE,      8, 8,32,32);
63   fg_tilemap = tilemap_create(get_fg_tile_info,gundealr_scan,    TILEMAP_TYPE_TRANSPARENT,16,16,64,32);
6464
6565   tilemap_set_transparent_pen(fg_tilemap,15);
6666}
src/mame/video/m62.c
r778r779
366366
367367void m62_start( tile_get_info_fn tile_get_info, int rows, int cols, int x1, int y1, int x2, int y2 )
368368{
369   m62_background = tilemap_create( tile_get_info, tilemap_scan_rows, TILEMAP_TRANSPARENT, x1, y1, x2, y2 );
369   m62_background = tilemap_create( tile_get_info, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, x1, y1, x2, y2 );
370370
371371   m62_background_hscroll = 0;
372372   m62_background_vscroll = 0;
r778r779
385385
386386void m62_textlayer( tile_get_info_fn tile_get_info, int rows, int cols, int x1, int y1, int x2, int y2 )
387387{
388   m62_foreground = tilemap_create( tile_get_info, tilemap_scan_rows, TILEMAP_TRANSPARENT, x1, y1, x2, y2 );
388   m62_foreground = tilemap_create( tile_get_info, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, x1, y1, x2, y2 );
389389
390390   if( rows != 0 )
391391   {
r778r779
699699
700700VIDEO_START( kidniki )
701701{
702   m62_background = tilemap_create( get_kidniki_bg_tile_info, tilemap_scan_rows, TILEMAP_SPLIT, 8, 8, 64, 32 );
702   m62_background = tilemap_create( get_kidniki_bg_tile_info, tilemap_scan_rows, TILEMAP_TYPE_SPLIT, 8, 8, 64, 32 );
703703
704704   m62_background_hscroll = 0;
705705   m62_background_vscroll = 0;
src/mame/video/pass.c
r778r779
5959
6060VIDEO_START( pass )
6161{
62   pass_bg_tilemap = tilemap_create(get_pass_bg_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE, 8, 8,64,32);
63   pass_fg_tilemap = tilemap_create(get_pass_fg_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT, 4, 4,128,64);
62   pass_bg_tilemap = tilemap_create(get_pass_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE, 8, 8,64,32);
63   pass_fg_tilemap = tilemap_create(get_pass_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 4, 4,128,64);
6464
6565   tilemap_set_transparent_pen(pass_fg_tilemap,255);
6666}
src/mame/video/toki.c
r778r779
9898
9999VIDEO_START( toki )
100100{
101   text_layer       = tilemap_create(get_text_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,  8,8,32,32);
102   background_layer = tilemap_create(get_back_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,32,32);
103   foreground_layer = tilemap_create(get_fore_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,32,32);
101   text_layer       = tilemap_create(get_text_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,  8,8,32,32);
102   background_layer = tilemap_create(get_back_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,32,32);
103   foreground_layer = tilemap_create(get_fore_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,32,32);
104104
105105   tilemap_set_transparent_pen(text_layer,15);
106106   tilemap_set_transparent_pen(background_layer,15);
src/mame/video/40love.c
r778r779
110110   pixel_bitmap1 = auto_bitmap_alloc(256,256,machine->screen[0].format);
111111   pixel_bitmap2 = auto_bitmap_alloc(256,256,machine->screen[0].format);
112112
113   background  = tilemap_create(get_bg_tile_info, tilemap_scan_rows,TILEMAP_TRANSPARENT, 8,8,64,32);
113   background  = tilemap_create(get_bg_tile_info, tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 8,8,64,32);
114114
115115   tilemap_set_scroll_rows(background,32);
116116   tilemap_set_transparent_pen(background,0);
src/mame/video/renegade.c
r778r779
7070
7171VIDEO_START( renegade )
7272{
73   bg_tilemap = tilemap_create(get_bg_tilemap_info, tilemap_scan_rows, TILEMAP_OPAQUE,     16, 16, 64, 16);
74   fg_tilemap = tilemap_create(get_fg_tilemap_info, tilemap_scan_rows, TILEMAP_TRANSPARENT,  8, 8, 32, 32);
73   bg_tilemap = tilemap_create(get_bg_tilemap_info, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE,     16, 16, 64, 16);
74   fg_tilemap = tilemap_create(get_fg_tilemap_info, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT,  8, 8, 32, 32);
7575
7676   tilemap_set_transparent_pen(fg_tilemap, 0);
7777   tilemap_set_scrolldx(bg_tilemap, 256, 0);
src/mame/video/galaga.c
r778r779
434434
435435VIDEO_START( galaga )
436436{
437   tx_tilemap = tilemap_create(get_tile_info,tilemap_scan,TILEMAP_TRANSPARENT_COLOR,8,8,36,28);
437   tx_tilemap = tilemap_create(get_tile_info,tilemap_scan,TILEMAP_TYPE_TRANSPARENT_COLOR,8,8,36,28);
438438
439439   tilemap_set_transparent_pen(tx_tilemap, 0x1f);
440440
src/mame/video/lasso.c
r778r779
145145VIDEO_START( lasso )
146146{
147147   /* create tilemap */
148   bg_tilemap = tilemap_create(lasso_get_bg_tile_info, tilemap_scan_rows, TILEMAP_OPAQUE, 8,8, 32,32);
148   bg_tilemap = tilemap_create(lasso_get_bg_tile_info, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE, 8,8, 32,32);
149149
150150   /* register for saving */
151151   state_save_register_global(gfxbank);
r778r779
154154VIDEO_START( wwjgtin )
155155{
156156   /* create tilemaps */
157   bg_tilemap =    tilemap_create(lasso_get_bg_tile_info,      tilemap_scan_rows, TILEMAP_TRANSPARENT, 8, 8,  32,  32);
158   track_tilemap = tilemap_create(wwjgtin_get_track_tile_info, tilemap_scan_rows, TILEMAP_OPAQUE,      16,16, 0x80,0x40);
157   bg_tilemap =    tilemap_create(lasso_get_bg_tile_info,      tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 8, 8,  32,  32);
158   track_tilemap = tilemap_create(wwjgtin_get_track_tile_info, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE,      16,16, 0x80,0x40);
159159
160160   tilemap_set_transparent_pen(bg_tilemap,0);
161161
r778r779
167167VIDEO_START( pinbo )
168168{
169169   /* create tilemap */
170   bg_tilemap = tilemap_create(pinbo_get_bg_tile_info, tilemap_scan_rows, TILEMAP_OPAQUE, 8,8, 32,32);
170   bg_tilemap = tilemap_create(pinbo_get_bg_tile_info, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE, 8,8, 32,32);
171171
172172   /* register for saving */
173173   state_save_register_global(gfxbank);
src/mame/video/psychic5.c
r778r779
282282   memset(jal_blend_table,0,0xc00) ;
283283
284284   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_cols,
285      TILEMAP_OPAQUE, 16, 16, 64, 32);
285      TILEMAP_TYPE_OPAQUE, 16, 16, 64, 32);
286286
287287   fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_cols,
288      TILEMAP_TRANSPARENT, 8, 8, 32, 32);
288      TILEMAP_TYPE_TRANSPARENT, 8, 8, 32, 32);
289289
290290   tilemap_set_transparent_pen(fg_tilemap, 15);
291291}
src/mame/video/ginganin.c
r778r779
141141
142142VIDEO_START( ginganin )
143143{
144   bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_cols,TILEMAP_OPAQUE,16,16,BG_NX,BG_NY);
145   fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_cols,TILEMAP_TRANSPARENT,16,16,FG_NX,FG_NY);
146   tx_tilemap = tilemap_create(get_txt_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,TXT_NX,TXT_NY);
144   bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_cols,TILEMAP_TYPE_OPAQUE,16,16,BG_NX,BG_NY);
145   fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_cols,TILEMAP_TYPE_TRANSPARENT,16,16,FG_NX,FG_NY);
146   tx_tilemap = tilemap_create(get_txt_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,TXT_NX,TXT_NY);
147147
148148   tilemap_set_transparent_pen(fg_tilemap,15);
149149   tilemap_set_transparent_pen(tx_tilemap,15);
src/mame/video/tail2nos.c
r778r779
5252
5353VIDEO_START( tail2nos )
5454{
55   bg_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,64,32);
55   bg_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,64,32);
5656
57   K051316_vh_start_0(machine,REGION_GFX3,4,TILEMAP_OPAQUE,0,zoom_callback);
57   K051316_vh_start_0(machine,REGION_GFX3,4,TILEMAP_TYPE_OPAQUE,0,zoom_callback);
5858
5959   dirtychar = auto_malloc(TOTAL_CHARS);
6060   memset(dirtychar,1,TOTAL_CHARS);
src/mame/video/mrjong.c
r778r779
9393VIDEO_START( mrjong )
9494{
9595   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows_flip_xy,
96      TILEMAP_OPAQUE, 8, 8, 32, 32);
96      TILEMAP_TYPE_OPAQUE, 8, 8, 32, 32);
9797}
9898
9999static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect)
src/mame/video/xyonix.c
r778r779
5353
5454VIDEO_START(xyonix)
5555{
56   xyonix_tilemap = tilemap_create(get_xyonix_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE, 4, 8,80,32);
56   xyonix_tilemap = tilemap_create(get_xyonix_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE, 4, 8,80,32);
5757}
5858
5959VIDEO_UPDATE(xyonix)
src/mame/video/1943.c
r778r779
180180VIDEO_START( 1943 )
181181{
182182   bg2_tilemap = tilemap_create(c1943_get_bg2_tile_info, tilemap_scan_cols,
183      TILEMAP_OPAQUE, 32, 32, 2048, 8);
183      TILEMAP_TYPE_OPAQUE, 32, 32, 2048, 8);
184184
185185   bg_tilemap = tilemap_create(c1943_get_bg_tile_info, tilemap_scan_cols,
186      TILEMAP_TRANSPARENT, 32, 32, 2048, 8);
186      TILEMAP_TYPE_TRANSPARENT, 32, 32, 2048, 8);
187187
188188   fg_tilemap = tilemap_create(c1943_get_fg_tile_info, tilemap_scan_rows,
189      TILEMAP_TRANSPARENT, 8, 8, 32, 32);
189      TILEMAP_TYPE_TRANSPARENT, 8, 8, 32, 32);
190190
191191   tilemap_set_transparent_pen(bg_tilemap, 0);
192192   tilemap_set_transparent_pen(fg_tilemap, 0);
src/mame/video/pacland.c
r778r779
171171   fg_bitmap = auto_bitmap_alloc(machine->screen[0].width,machine->screen[0].height,machine->screen[0].format);
172172   sprite_bitmap = auto_bitmap_alloc(machine->screen[0].width,machine->screen[0].height,machine->screen[0].format);
173173
174   bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,           8,8,64,32);
175   fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT_COLOR,8,8,64,32);
174   bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,           8,8,64,32);
175   fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT_COLOR,8,8,64,32);
176176
177177   tilemap_set_scroll_rows(fg_tilemap, 32);
178178   tilemap_set_transparent_pen(fg_tilemap, 0xff);
src/mame/video/jcross.c
r778r779
9696   stuff_palette( machine, 0, 0, 16*8 );
9797   stuff_palette( machine, 16*8*3, 16*8, 16*8 );
9898
99   bg_tilemap = tilemap_create(get_bg_tilemap_info,tilemap_scan_cols,TILEMAP_OPAQUE,8,8,64,64);
100   tx_tilemap = tilemap_create(get_tx_tilemap_info,tilemap_scan_cols,TILEMAP_TRANSPARENT,8,8,32,32);
99   bg_tilemap = tilemap_create(get_bg_tilemap_info,tilemap_scan_cols,TILEMAP_TYPE_OPAQUE,8,8,64,64);
100   tx_tilemap = tilemap_create(get_tx_tilemap_info,tilemap_scan_cols,TILEMAP_TYPE_TRANSPARENT,8,8,32,32);
101101
102102   tilemap_set_transparent_pen(bg_tilemap,0x0f);
103103   tilemap_set_transparent_pen(tx_tilemap,0xf);
src/mame/video/popper.c
r778r779
155155
156156VIDEO_START( popper )
157157{
158   popper_p123_tilemap    = tilemap_create( get_popper_p123_tile_info,   tilemap_scan_cols,TILEMAP_SPLIT,8,8,33,32 );
159   popper_p0_tilemap      = tilemap_create( get_popper_p0_tile_info,     tilemap_scan_cols,TILEMAP_SPLIT,8,8,33,32 );
160   popper_ol_p123_tilemap = tilemap_create( get_popper_ol_p123_tile_info,tilemap_scan_cols,TILEMAP_SPLIT,8,8,2 ,32 );
161   popper_ol_p0_tilemap   = tilemap_create( get_popper_ol_p0_tile_info,  tilemap_scan_cols,TILEMAP_SPLIT,8,8,2 ,32 );
158   popper_p123_tilemap    = tilemap_create( get_popper_p123_tile_info,   tilemap_scan_cols,TILEMAP_TYPE_SPLIT,8,8,33,32 );
159   popper_p0_tilemap      = tilemap_create( get_popper_p0_tile_info,     tilemap_scan_cols,TILEMAP_TYPE_SPLIT,8,8,33,32 );
160   popper_ol_p123_tilemap = tilemap_create( get_popper_ol_p123_tile_info,tilemap_scan_cols,TILEMAP_TYPE_SPLIT,8,8,2 ,32 );
161   popper_ol_p0_tilemap   = tilemap_create( get_popper_ol_p0_tile_info,  tilemap_scan_cols,TILEMAP_TYPE_SPLIT,8,8,2 ,32 );
162162
163163   tilemap_set_transmask(popper_p123_tilemap,   0,0x0f,0x01);
164164   tilemap_set_transmask(popper_p123_tilemap,   1,0x01,0x0f);
src/mame/video/ddrible.c
r778r779
112112
113113VIDEO_START( ddrible )
114114{
115   fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan,TILEMAP_TRANSPARENT,8,8,64,32);
116   bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan,TILEMAP_OPAQUE,     8,8,64,32);
115   fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan,TILEMAP_TYPE_TRANSPARENT,8,8,64,32);
116   bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan,TILEMAP_TYPE_OPAQUE,     8,8,64,32);
117117
118118   tilemap_set_transparent_pen(fg_tilemap,0);
119119}
src/mame/video/ladyfrog.c
r778r779
134134VIDEO_START( ladyfrog )
135135{
136136  ladyfrog_spriteram = auto_malloc (160);
137  bg_tilemap = tilemap_create( get_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,8,8,32,32 );
137  bg_tilemap = tilemap_create( get_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,8,8,32,32 );
138138
139139  paletteram = auto_malloc(0x200);
140140  paletteram_2 = auto_malloc(0x200);
src/mame/video/djboy.c
r778r779
4444
4545VIDEO_START( djboy )
4646{
47   background = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,16,16,64,32);
47   background = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,16,16,64,32);
4848   pandora_start(0,0,0);
4949}
5050
src/mame/video/sidearms.c
r778r779
151151   if (!sidearms_gameid)
152152   {
153153      bg_tilemap = tilemap_create(get_sidearms_bg_tile_info, sidearms_tilemap_scan,
154         TILEMAP_TRANSPARENT, 32, 32, 128, 128);
154         TILEMAP_TYPE_TRANSPARENT, 32, 32, 128, 128);
155155
156156      tilemap_set_transparent_pen(bg_tilemap, 15);
157157   }
158158   else
159159   {
160      bg_tilemap = tilemap_create(get_philko_bg_tile_info, sidearms_tilemap_scan,TILEMAP_OPAQUE, 32, 32, 128, 128);
160      bg_tilemap = tilemap_create(get_philko_bg_tile_info, sidearms_tilemap_scan,TILEMAP_TYPE_OPAQUE, 32, 32, 128, 128);
161161   }
162162
163163   fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows,
164      TILEMAP_TRANSPARENT, 8, 8, 64, 64);
164      TILEMAP_TYPE_TRANSPARENT, 8, 8, 64, 64);
165165
166166   tilemap_set_transparent_pen(fg_tilemap, 3);
167167
src/mame/video/jack.c
r778r779
5555
5656VIDEO_START( jack )
5757{
58   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_cols_flipy, TILEMAP_OPAQUE, 8, 8, 32, 32);
58   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_cols_flipy, TILEMAP_TYPE_OPAQUE, 8, 8, 32, 32);
5959}
6060
6161static void jack_draw_sprites(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect)
r778r779
136136
137137VIDEO_START( joinem )
138138{
139   bg_tilemap = tilemap_create(joinem_get_bg_tile_info, tilemap_scan_cols_flipy, TILEMAP_OPAQUE, 8, 8, 32, 32);
139   bg_tilemap = tilemap_create(joinem_get_bg_tile_info, tilemap_scan_cols_flipy, TILEMAP_TYPE_OPAQUE, 8, 8, 32, 32);
140140}
141141
142142static void joinem_draw_sprites(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect)
src/mame/video/dogfgt.c
r778r779
8181
8282VIDEO_START( dogfgt )
8383{
84   bg_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,16,16,32,32);
84   bg_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,16,16,32,32);
8585
8686   bitmapram = auto_malloc(BITMAPRAM_SIZE);
8787
src/mame/video/kingobox.c
r778r779
189189VIDEO_START( kingofb )
190190{
191191   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_cols_flip_y,
192      TILEMAP_OPAQUE, 16, 16, 16, 16);
192      TILEMAP_TYPE_OPAQUE, 16, 16, 16, 16);
193193
194194   fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_cols_flip_y,
195      TILEMAP_TRANSPARENT, 8, 8, 32, 32);
195      TILEMAP_TYPE_TRANSPARENT, 8, 8, 32, 32);
196196
197197   tilemap_set_transparent_pen(fg_tilemap, 0);
198198}
r778r779
249249VIDEO_START( ringking )
250250{
251251   bg_tilemap = tilemap_create(ringking_get_bg_tile_info, tilemap_scan_cols_flip_y,
252      TILEMAP_OPAQUE, 16, 16, 16, 16);
252      TILEMAP_TYPE_OPAQUE, 16, 16, 16, 16);
253253
254254   fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_cols_flip_y,
255      TILEMAP_TRANSPARENT, 8, 8, 32, 32);
255      TILEMAP_TYPE_TRANSPARENT, 8, 8, 32, 32);
256256
257257   tilemap_set_transparent_pen(fg_tilemap, 0);
258258}
src/mame/video/galivan.c
r778r779
203203   UINT8 *rombase = memory_region(REGION_CPU1);
204204   memory_configure_bank(1, 0, 2, &rombase[0x10000], 0x2000);
205205
206   bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,   16,16,128,128);
207   tx_tilemap = tilemap_create(get_tx_tile_info,tilemap_scan_cols,TILEMAP_TRANSPARENT,8,8,32,32);
206   bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,   16,16,128,128);
207   tx_tilemap = tilemap_create(get_tx_tile_info,tilemap_scan_cols,TILEMAP_TYPE_TRANSPARENT,8,8,32,32);
208208
209209   tilemap_set_transparent_pen(tx_tilemap,15);
210210
r778r779
222222   UINT8 *rombase = memory_region(REGION_CPU1);
223223   memory_configure_bank(1, 0, 4, &rombase[0x10000], 0x2000);
224224
225   bg_tilemap = tilemap_create(ninjemak_get_bg_tile_info,tilemap_scan_cols,TILEMAP_OPAQUE,   16,16,512,32);
226   tx_tilemap = tilemap_create(ninjemak_get_tx_tile_info,tilemap_scan_cols,TILEMAP_TRANSPARENT,8,8,32,32);
225   bg_tilemap = tilemap_create(ninjemak_get_bg_tile_info,tilemap_scan_cols,TILEMAP_TYPE_OPAQUE,   16,16,512,32);
226   tx_tilemap = tilemap_create(ninjemak_get_tx_tile_info,tilemap_scan_cols,TILEMAP_TYPE_TRANSPARENT,8,8,32,32);
227227
228228   tilemap_set_transparent_pen(tx_tilemap,15);
229229
src/mame/video/tsamurai.c
r778r779
5555
5656VIDEO_START( tsamurai )
5757{
58   background = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,32,32);
59   foreground = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,32,32);
58   background = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,32,32);
59   foreground = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,32,32);
6060
6161   tilemap_set_transparent_pen(background,0);
6262   tilemap_set_transparent_pen(foreground,0);
r778r779
255255
256256VIDEO_START( vsgongf )
257257{
258   foreground = tilemap_create(get_vsgongf_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,8,8,32,32);
258   foreground = tilemap_create(get_vsgongf_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,8,8,32,32);
259259}
260260
261261VIDEO_UPDATE( vsgongf )
src/mame/video/canyon.c
r778r779
3030VIDEO_START( canyon )
3131{
3232   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows,
33      TILEMAP_OPAQUE, 8, 8, 32, 32);
33      TILEMAP_TYPE_OPAQUE, 8, 8, 32, 32);
3434}
3535
3636
src/mame/video/splash.c
r778r779
177177
178178VIDEO_START( splash )
179179{
180   bg_tilemap[0] = tilemap_create(get_tile_info_splash_tilemap0,tilemap_scan_rows,TILEMAP_TRANSPARENT, 8, 8,64,32);
181   bg_tilemap[1] = tilemap_create(get_tile_info_splash_tilemap1,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,32,32);
180   bg_tilemap[0] = tilemap_create(get_tile_info_splash_tilemap0,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 8, 8,64,32);
181   bg_tilemap[1] = tilemap_create(get_tile_info_splash_tilemap1,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,32,32);
182182
183183   tilemap_set_transparent_pen(bg_tilemap[0],0);
184184   tilemap_set_transparent_pen(bg_tilemap[1],0);
src/mame/video/f1gp.c
r778r779
5454
5555VIDEO_START( f1gp )
5656{
57   roz_tilemap = tilemap_create(f1gp_get_roz_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,     16,16,64,64);
58   fg_tilemap =  tilemap_create(get_fg_tile_info,      tilemap_scan_rows,TILEMAP_TRANSPARENT, 8, 8,64,32);
57   roz_tilemap = tilemap_create(f1gp_get_roz_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,     16,16,64,64);
58   fg_tilemap =  tilemap_create(get_fg_tile_info,      tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 8, 8,64,32);
5959
6060   K053936_wraparound_enable(0, 1);
6161   K053936_set_offset(0, -58, -2);
r778r779
7070
7171VIDEO_START( f1gp2 )
7272{
73   roz_tilemap = tilemap_create(f1gp2_get_roz_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,64,64);
74   fg_tilemap =  tilemap_create(get_fg_tile_info,       tilemap_scan_rows,TILEMAP_TRANSPARENT, 8, 8,64,32);
73   roz_tilemap = tilemap_create(f1gp2_get_roz_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,64,64);
74   fg_tilemap =  tilemap_create(get_fg_tile_info,       tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 8, 8,64,32);
7575
7676   K053936_wraparound_enable(0, 1);
7777   K053936_set_offset(0, -48, -21);
src/mame/video/lvcards.c
r778r779
105105VIDEO_START( lvcards )
106106{
107107   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows,
108      TILEMAP_OPAQUE, 8, 8, 32, 32);
108      TILEMAP_TYPE_OPAQUE, 8, 8, 32, 32);
109109}
110110
111111VIDEO_UPDATE( lvcards )
src/mame/video/namcos2.c
r778r779
322322VIDEO_START( namcos2 )
323323{
324324   namco_tilemap_init(2,memory_region(REGION_GFX4),TilemapCB);
325   tilemap_roz = tilemap_create(get_tile_info_roz,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,256,256);
325   tilemap_roz = tilemap_create(get_tile_info_roz,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,256,256);
326326   tilemap_set_transparent_pen(tilemap_roz,0xff);
327327   DrawSpriteInit();
328328}
src/mame/video/tx1.c
r778r779
4848
4949VIDEO_START( tx1 )
5050{
51   tx1_tilemap = tilemap_create(get_tx1_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT, 8, 8,128,64);
51   tx1_tilemap = tilemap_create(get_tx1_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 8, 8,128,64);
5252   tilemap_set_transparent_pen(tx1_tilemap,0xff);
5353}
5454
r778r779
344344
345345VIDEO_START( buggyb1 )
346346{
347   buggyb1_tilemap = tilemap_create(get_buggyb1_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT, 8, 8,64,64);
347   buggyb1_tilemap = tilemap_create(get_buggyb1_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 8, 8,64,64);
348348        tilemap_set_transparent_pen(buggyb1_tilemap, 0);
349349}
350350
351351
352352VIDEO_START( buggyboy )
353353{
354   buggyboy_tilemap = tilemap_create(get_buggyboy_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT, 8, 8,128,64);
354   buggyboy_tilemap = tilemap_create(get_buggyboy_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 8, 8,128,64);
355355        tilemap_set_transparent_pen(buggyboy_tilemap, 0);
356356}
357357
src/mame/video/pingpong.c
r778r779
119119VIDEO_START( pingpong )
120120{
121121   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows,
122      TILEMAP_OPAQUE, 8, 8, 32, 32);
122      TILEMAP_TYPE_OPAQUE, 8, 8, 32, 32);
123123}
124124
125125static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect )
src/mame/video/ssrj.c
r778r779
232232
233233VIDEO_START( ssrj )
234234{
235   tilemap1 = tilemap_create( get_tile_info1,tilemap_scan_rows,TILEMAP_OPAQUE,8,8,32,32 );
236   tilemap2 = tilemap_create( get_tile_info2,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,32,32 );
237   tilemap4 = tilemap_create( get_tile_info4,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,32,32 );
235   tilemap1 = tilemap_create( get_tile_info1,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,8,8,32,32 );
236   tilemap2 = tilemap_create( get_tile_info2,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,32,32 );
237   tilemap4 = tilemap_create( get_tile_info4,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,32,32 );
238238   tilemap_set_transparent_pen(tilemap2,0);
239239   tilemap_set_transparent_pen(tilemap4,0);
240240}
src/mame/video/blstroid.c
r778r779
8282   };
8383
8484   /* initialize the playfield */
85   atarigen_playfield_tilemap = tilemap_create(get_playfield_tile_info, tilemap_scan_rows, TILEMAP_OPAQUE, 16,8, 64,64);
85   atarigen_playfield_tilemap = tilemap_create(get_playfield_tile_info, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE, 16,8, 64,64);
8686
8787   /* initialize the motion objects */
8888   atarimo_init(machine, 0, &modesc);
src/mame/video/gotya.c
r778r779
112112VIDEO_START( gotya )
113113{
114114   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows_thehand,
115      TILEMAP_OPAQUE, 8, 8, 64, 32);
115      TILEMAP_TYPE_OPAQUE, 8, 8, 64, 32);
116116}
117117
118118static void draw_status_row(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect, int sx, int col)
src/mame/video/tatsumi.c
r778r779
204204
205205VIDEO_START( apache3 )
206206{
207   tx_layer = tilemap_create(get_text_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,64,64);
207   tx_layer = tilemap_create(get_text_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,64,64);
208208   shadow_pen_array = auto_malloc(8192);
209209   temp_bitmap = auto_bitmap_alloc(512, 512, BITMAP_FORMAT_RGB32);
210210
r778r779
214214
215215VIDEO_START( roundup5 )
216216{
217   tx_layer = tilemap_create(get_text_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,128,64);
217   tx_layer = tilemap_create(get_text_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,128,64);
218218   shadow_pen_array = auto_malloc(8192);
219219   roundup5_vram = auto_malloc(0x48000 * 4);
220220
r778r779
224224
225225VIDEO_START( cyclwarr )
226226{
227   bg_layer = tilemap_create(get_bg_tile_info_cyclwarr,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,256,256);
228   tx_layer = tilemap_create(get_text_tile_info_cyclwarr,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,64,64);
227   bg_layer = tilemap_create(get_bg_tile_info_cyclwarr,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,256,256);
228   tx_layer = tilemap_create(get_text_tile_info_cyclwarr,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,64,64);
229229   shadow_pen_array = auto_malloc(8192);
230230
231231   memset(shadow_pen_array, 0, 8192);
src/mame/video/konamiic.c
r778r779
15021502   K007342_gfxnum = gfx_index;
15031503   K007342_callback = callback;
15041504
1505   K007342_tilemap[0] = tilemap_create(K007342_get_tile_info0,K007342_scan,TILEMAP_TRANSPARENT,8,8,64,32);
1506   K007342_tilemap[1] = tilemap_create(K007342_get_tile_info1,K007342_scan,TILEMAP_TRANSPARENT,8,8,64,32);
1505   K007342_tilemap[0] = tilemap_create(K007342_get_tile_info0,K007342_scan,TILEMAP_TYPE_TRANSPARENT,8,8,64,32);
1506   K007342_tilemap[1] = tilemap_create(K007342_get_tile_info1,K007342_scan,TILEMAP_TYPE_TRANSPARENT,8,8,64,32);
15071507
15081508   K007342_ram = auto_malloc(0x2000);
15091509   K007342_scroll_ram = auto_malloc(0x0200);
r778r779
19991999
20002000   has_extra_video_ram = 0;
20012001
2002   K052109_tilemap[0] = tilemap_create(K052109_get_tile_info0,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,64,32);
2003   K052109_tilemap[1] = tilemap_create(K052109_get_tile_info1,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,64,32);
2004   K052109_tilemap[2] = tilemap_create(K052109_get_tile_info2,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,64,32);
2002   K052109_tilemap[0] = tilemap_create(K052109_get_tile_info0,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,64,32);
2003   K052109_tilemap[1] = tilemap_create(K052109_get_tile_info1,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,64,32);
2004   K052109_tilemap[2] = tilemap_create(K052109_get_tile_info2,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,64,32);
20052005
20062006   K052109_ram = auto_malloc(0x6000);
20072007
r778r779
57385738
57395739   K056832_videoram = auto_malloc(0x2000 * (K056832_PAGE_COUNT+1));
57405740
5741   K056832_tilemap[0x0] = tilemap_create(K056832_get_tile_info0, K056832_scan, TILEMAP_TRANSPARENT, 8, 8, 64, 32);
5742   K056832_tilemap[0x1] = tilemap_create(K056832_get_tile_info1, K056832_scan, TILEMAP_TRANSPARENT, 8, 8, 64, 32);
5743   K056832_tilemap[0x2] = tilemap_create(K056832_get_tile_info2, K056832_scan, TILEMAP_TRANSPARENT, 8, 8, 64, 32);
5744   K056832_tilemap[0x3] = tilemap_create(K056832_get_tile_info3, K056832_scan, TILEMAP_TRANSPARENT, 8, 8, 64, 32);
5745   K056832_tilemap[0x4] = tilemap_create(K056832_get_tile_info4, K056832_scan, TILEMAP_TRANSPARENT, 8, 8, 64, 32);
5746   K056832_tilemap[0x5] = tilemap_create(K056832_get_tile_info5, K056832_scan, TILEMAP_TRANSPARENT, 8, 8, 64, 32);
5747   K056832_tilemap[0x6] = tilemap_create(K056832_get_tile_info6, K056832_scan, TILEMAP_TRANSPARENT, 8, 8, 64, 32);
5748   K056832_tilemap[0x7] = tilemap_create(K056832_get_tile_info7, K056832_scan, TILEMAP_TRANSPARENT, 8, 8, 64, 32);
5749   K056832_tilemap[0x8] = tilemap_create(K056832_get_tile_info8, K056832_scan, TILEMAP_TRANSPARENT, 8, 8, 64, 32);
5750   K056832_tilemap[0x9] = tilemap_create(K056832_get_tile_info9, K056832_scan, TILEMAP_TRANSPARENT, 8, 8, 64, 32);
5751   K056832_tilemap[0xa] = tilemap_create(K056832_get_tile_infoa, K056832_scan, TILEMAP_TRANSPARENT, 8, 8, 64, 32);
5752   K056832_tilemap[0xb] = tilemap_create(K056832_get_tile_infob, K056832_scan, TILEMAP_TRANSPARENT, 8, 8, 64, 32);
5753   K056832_tilemap[0xc] = tilemap_create(K056832_get_tile_infoc, K056832_scan, TILEMAP_TRANSPARENT, 8, 8, 64, 32);
5754   K056832_tilemap[0xd] = tilemap_create(K056832_get_tile_infod, K056832_scan, TILEMAP_TRANSPARENT, 8, 8, 64, 32);
5755   K056832_tilemap[0xe] = tilemap_create(K056832_get_tile_infoe, K056832_scan, TILEMAP_TRANSPARENT, 8, 8, 64, 32);
5756   K056832_tilemap[0xf] = tilemap_create(K056832_get_tile_infof, K056832_scan, TILEMAP_TRANSPARENT, 8, 8, 64, 32);
5741   K056832_tilemap[0x0] = tilemap_create(K056832_get_tile_info0, K056832_scan, TILEMAP_TYPE_TRANSPARENT, 8, 8, 64, 32);
5742   K056832_tilemap[0x1] = tilemap_create(K056832_get_tile_info1, K056832_scan, TILEMAP_TYPE_TRANSPARENT, 8, 8, 64, 32);
5743   K056832_tilemap[0x2] = tilemap_create(K056832_get_tile_info2, K056832_scan, TILEMAP_TYPE_TRANSPARENT, 8, 8, 64, 32);
5744   K056832_tilemap[0x3] = tilemap_create(K056832_get_tile_info3, K056832_scan, TILEMAP_TYPE_TRANSPARENT, 8, 8, 64, 32);
5745   K056832_tilemap[0x4] = tilemap_create(K056832_get_tile_info4, K056832_scan, TILEMAP_TYPE_TRANSPARENT, 8, 8, 64, 32);
5746   K056832_tilemap[0x5] = tilemap_create(K056832_get_tile_info5, K056832_scan, TILEMAP_TYPE_TRANSPARENT, 8, 8, 64, 32);
5747   K056832_tilemap[0x6] = tilemap_create(K056832_get_tile_info6, K056832_scan, TILEMAP_TYPE_TRANSPARENT, 8, 8, 64, 32);
5748   K056832_tilemap[0x7] = tilemap_create(K056832_get_tile_info7, K056832_scan, TILEMAP_TYPE_TRANSPARENT, 8, 8, 64, 32);
5749   K056832_tilemap[0x8] = tilemap_create(K056832_get_tile_info8, K056832_scan, TILEMAP_TYPE_TRANSPARENT, 8, 8, 64, 32);
5750   K056832_tilemap[0x9] = tilemap_create(K056832_get_tile_info9, K056832_scan, TILEMAP_TYPE_TRANSPARENT, 8, 8, 64, 32);
5751   K056832_tilemap[0xa] = tilemap_create(K056832_get_tile_infoa, K056832_scan, TILEMAP_TYPE_TRANSPARENT, 8, 8, 64, 32);
5752   K056832_tilemap[0xb] = tilemap_create(K056832_get_tile_infob, K056832_scan, TILEMAP_TYPE_TRANSPARENT, 8, 8, 64, 32);
5753   K056832_tilemap[0xc] = tilemap_create(K056832_get_tile_infoc, K056832_scan, TILEMAP_TYPE_TRANSPARENT, 8, 8, 64, 32);
5754   K056832_tilemap[0xd] = tilemap_create(K056832_get_tile_infod, K056832_scan, TILEMAP_TYPE_TRANSPARENT, 8, 8, 64, 32);
5755   K056832_tilemap[0xe] = tilemap_create(K056832_get_tile_infoe, K056832_scan, TILEMAP_TYPE_TRANSPARENT, 8, 8, 64, 32);
5756   K056832_tilemap[0xf] = tilemap_create(K056832_get_tile_infof, K056832_scan, TILEMAP_TYPE_TRANSPARENT, 8, 8, 64, 32);
57575757
57585758   for (i=0; i<K056832_PAGE_COUNT; i++)
57595759   {
r778r779
64736473      }
64746474
64756475      K056832_get_tile_info(machine, tileinfo, line, page);
6476      src_ptr = src_base + ((tileinfo->tile_number & ~7) << 6);
6476      src_ptr = tileinfo->pen_data;//src_base + ((tileinfo->tile_number & ~7) << 6);
64776477      basepen = tileinfo->pal_data - pal_ptr;
64786478      code_transparent = tileinfo->priority;
64796479      code_opaque = code_transparent | TILE_FLAG_FG_OPAQUE;
src/mame/video/blmbycar.c
r778r779
126126VIDEO_START( blmbycar )
127127{
128128   tilemap_0 = tilemap_create(   get_tile_info_0, tilemap_scan_rows,
129                        TILEMAP_OPAQUE, 16,16, DIM_NX, DIM_NY );
129                        TILEMAP_TYPE_OPAQUE, 16,16, DIM_NX, DIM_NY );
130130
131131   tilemap_1 = tilemap_create(   get_tile_info_1, tilemap_scan_rows,
132                        TILEMAP_TRANSPARENT, 16,16, DIM_NX, DIM_NY );
132                        TILEMAP_TYPE_TRANSPARENT, 16,16, DIM_NX, DIM_NY );
133133
134134      tilemap_set_scroll_rows(tilemap_0,1);
135135      tilemap_set_scroll_cols(tilemap_0,1);
src/mame/video/retofinv.c
r778r779
118118
119119VIDEO_START( retofinv )
120120{
121   bg_tilemap = tilemap_create(bg_get_tile_info,tilemap_scan,TILEMAP_OPAQUE,8,8,36,28);
122   fg_tilemap = tilemap_create(fg_get_tile_info,tilemap_scan,TILEMAP_TRANSPARENT_COLOR,8,8,36,28);
121   bg_tilemap = tilemap_create(bg_get_tile_info,tilemap_scan,TILEMAP_TYPE_OPAQUE,8,8,36,28);
122   fg_tilemap = tilemap_create(fg_get_tile_info,tilemap_scan,TILEMAP_TYPE_TRANSPARENT_COLOR,8,8,36,28);
123123
124124   tilemap_set_transparent_pen(fg_tilemap,0);
125125
src/mame/video/meadows.c
r778r779
3636
3737VIDEO_START( meadows )
3838{
39   bg_tilemap = tilemap_create(get_tile_info, tilemap_scan_rows, TILEMAP_OPAQUE, 8,8, 32,30);
39   bg_tilemap = tilemap_create(get_tile_info, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE, 8,8, 32,30);
4040}
4141
4242
src/mame/video/bogeyman.c
r778r779
9090VIDEO_START( bogeyman )
9191{
9292   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows,
93      TILEMAP_OPAQUE, 16, 16, 16, 16);
93      TILEMAP_TYPE_OPAQUE, 16, 16, 16, 16);
9494
9595   fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows,
96      TILEMAP_TRANSPARENT, 8, 8, 32, 32);
96      TILEMAP_TYPE_TRANSPARENT, 8, 8, 32, 32);
9797
9898   tilemap_set_transparent_pen(fg_tilemap, 0);
9999}
src/mame/video/m72.c
r778r779
165165
166166VIDEO_START( m72 )
167167{
168   bg_tilemap = tilemap_create(m72_get_bg_tile_info,tilemap_scan_rows,TILEMAP_SPLIT,8,8,64,64);
169   fg_tilemap = tilemap_create(m72_get_fg_tile_info,tilemap_scan_rows,TILEMAP_SPLIT,8,8,64,64);
168   bg_tilemap = tilemap_create(m72_get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_SPLIT,8,8,64,64);
169   fg_tilemap = tilemap_create(m72_get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_SPLIT,8,8,64,64);
170170
171171   m72_spriteram = auto_malloc(spriteram_size);
172172
r778r779
188188
189189VIDEO_START( rtype2 )
190190{
191   bg_tilemap = tilemap_create(rtype2_get_bg_tile_info,tilemap_scan_rows,TILEMAP_SPLIT,8,8,64,64);
192   fg_tilemap = tilemap_create(rtype2_get_fg_tile_info,tilemap_scan_rows,TILEMAP_SPLIT,8,8,64,64);
191   bg_tilemap = tilemap_create(rtype2_get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_SPLIT,8,8,64,64);
192   fg_tilemap = tilemap_create(rtype2_get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_SPLIT,8,8,64,64);
193193
194194   m72_spriteram = auto_malloc(spriteram_size);
195195
r778r779
222222{
223223// The tilemap can be 256x64, but seems to be used at 128x64 (scroll wraparound).
224224// The layout ramains 256x64, the right half is just not displayed.
225//  bg_tilemap = tilemap_create(rtype2_get_bg_tile_info,tilemap_scan_rows,TILEMAP_SPLIT,8,8,256,64);
226   bg_tilemap = tilemap_create(rtype2_get_bg_tile_info,majtitle_scan_rows,TILEMAP_SPLIT,8,8,128,64);
227   fg_tilemap = tilemap_create(rtype2_get_fg_tile_info,tilemap_scan_rows,TILEMAP_SPLIT,8,8,64,64);
225//  bg_tilemap = tilemap_create(rtype2_get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_SPLIT,8,8,256,64);
226   bg_tilemap = tilemap_create(rtype2_get_bg_tile_info,majtitle_scan_rows,TILEMAP_TYPE_SPLIT,8,8,128,64);
227   fg_tilemap = tilemap_create(rtype2_get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_SPLIT,8,8,64,64);
228228
229229   m72_spriteram = auto_malloc(spriteram_size);
230230
r778r779
246246
247247VIDEO_START( hharry )
248248{
249   bg_tilemap = tilemap_create(hharry_get_bg_tile_info,tilemap_scan_rows,TILEMAP_SPLIT,8,8,64,64);
250   fg_tilemap = tilemap_create(m72_get_fg_tile_info,   tilemap_scan_rows,TILEMAP_SPLIT,8,8,64,64);
249   bg_tilemap = tilemap_create(hharry_get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_SPLIT,8,8,64,64);
250   fg_tilemap = tilemap_create(m72_get_fg_tile_info,   tilemap_scan_rows,TILEMAP_TYPE_SPLIT,8,8,64,64);
251251
252252   m72_spriteram = auto_malloc(spriteram_size);
253253
src/mame/video/pokechmp.c
r778r779
3030VIDEO_START( pokechmp )
3131{
3232   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows,
33      TILEMAP_OPAQUE, 8, 8, 32, 32);
33      TILEMAP_TYPE_OPAQUE, 8, 8, 32, 32);
3434}
3535
3636static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect)
src/mame/video/ohmygod.c
r778r779
3535
3636VIDEO_START( ohmygod )
3737{
38   bg_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,8,8,64,64);
38   bg_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,8,8,64,64);
3939}
4040
4141
src/mame/video/snk68.c
r778r779
7979
8080VIDEO_START( pow )
8181{
82   fix_tilemap = tilemap_create(get_pow_tile_info,tilemap_scan_cols,TILEMAP_TRANSPARENT,8,8,32,32);
82   fix_tilemap = tilemap_create(get_pow_tile_info,tilemap_scan_cols,TILEMAP_TYPE_TRANSPARENT,8,8,32,32);
8383
8484   tilemap_set_transparent_pen(fix_tilemap,0);
8585}
8686
8787VIDEO_START( searchar )
8888{
89   fix_tilemap = tilemap_create(get_sar_tile_info,tilemap_scan_cols,TILEMAP_TRANSPARENT,8,8,32,32);
89   fix_tilemap = tilemap_create(get_sar_tile_info,tilemap_scan_cols,TILEMAP_TYPE_TRANSPARENT,8,8,32,32);
9090
9191   tilemap_set_transparent_pen(fix_tilemap,0);
9292}
9393
9494VIDEO_START( ikari3 )
9595{
96   fix_tilemap = tilemap_create(get_ikari3_tile_info,tilemap_scan_cols,TILEMAP_TRANSPARENT,8,8,32,32);
96   fix_tilemap = tilemap_create(get_ikari3_tile_info,tilemap_scan_cols,TILEMAP_TYPE_TRANSPARENT,8,8,32,32);
9797
9898   tilemap_set_transparent_pen(fix_tilemap,0);
9999}
src/mame/video/aeroboto.c
r778r779
4242
4343VIDEO_START( aeroboto )
4444{
45   bg_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,32,64);
45   bg_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,32,64);
4646
4747   tilemap_set_transparent_pen(bg_tilemap,0);
4848
src/mame/video/firetrap.c
r778r779
136136
137137VIDEO_START( firetrap )
138138{
139   fg_tilemap  = tilemap_create(get_fg_tile_info, get_fg_memory_offset,TILEMAP_TRANSPARENT, 8, 8,32,32);
140   bg1_tilemap = tilemap_create(get_bg1_tile_info,get_bg_memory_offset,TILEMAP_TRANSPARENT,16,16,32,32);
141   bg2_tilemap = tilemap_create(get_bg2_tile_info,get_bg_memory_offset,TILEMAP_OPAQUE,     16,16,32,32);
139   fg_tilemap  = tilemap_create(get_fg_tile_info, get_fg_memory_offset,TILEMAP_TYPE_TRANSPARENT, 8, 8,32,32);
140   bg1_tilemap = tilemap_create(get_bg1_tile_info,get_bg_memory_offset,TILEMAP_TYPE_TRANSPARENT,16,16,32,32);
141   bg2_tilemap = tilemap_create(get_bg2_tile_info,get_bg_memory_offset,TILEMAP_TYPE_OPAQUE,     16,16,32,32);
142142
143143   tilemap_set_transparent_pen(fg_tilemap,0);
144144   tilemap_set_transparent_pen(bg1_tilemap,0);
src/mame/video/thedeep.c
r778r779
108108
109109VIDEO_START( thedeep )
110110{
111   tilemap_0  = tilemap_create(get_tile_info_0,tilemap_scan_rows_back,TILEMAP_TRANSPARENT,16,16,0x20,0x20);
112   tilemap_1  = tilemap_create(get_tile_info_1,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,0x20,0x20);
111   tilemap_0  = tilemap_create(get_tile_info_0,tilemap_scan_rows_back,TILEMAP_TYPE_TRANSPARENT,16,16,0x20,0x20);
112   tilemap_1  = tilemap_create(get_tile_info_1,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,0x20,0x20);
113113
114114   tilemap_set_transparent_pen( tilemap_0,  0 );
115115   tilemap_set_transparent_pen( tilemap_1,  0 );
src/mame/video/oneshot.c
r778r779
6767
6868VIDEO_START( oneshot )
6969{
70   oneshot_bg_tilemap = tilemap_create(get_oneshot_bg_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT, 16, 16,32,32);
71   oneshot_mid_tilemap = tilemap_create(get_oneshot_mid_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT, 16, 16,32,32);
72   oneshot_fg_tilemap = tilemap_create(get_oneshot_fg_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT, 16, 16,32,32);
70   oneshot_bg_tilemap = tilemap_create(get_oneshot_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 16, 16,32,32);
71   oneshot_mid_tilemap = tilemap_create(get_oneshot_mid_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 16, 16,32,32);
72   oneshot_fg_tilemap = tilemap_create(get_oneshot_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 16, 16,32,32);
7373
7474   tilemap_set_transparent_pen(oneshot_bg_tilemap,0);
7575   tilemap_set_transparent_pen(oneshot_mid_tilemap,0);
src/mame/video/stlforce.c
r778r779
181181
182182VIDEO_START( stlforce )
183183{
184   stlforce_bg_tilemap    = tilemap_create(get_stlforce_bg_tile_info,   tilemap_scan_cols,TILEMAP_OPAQUE,      16,16,64,16);
185   stlforce_mlow_tilemap  = tilemap_create(get_stlforce_mlow_tile_info, tilemap_scan_cols,TILEMAP_TRANSPARENT, 16,16,64,16);
186   stlforce_mhigh_tilemap = tilemap_create(get_stlforce_mhigh_tile_info,tilemap_scan_cols,TILEMAP_TRANSPARENT, 16,16,64,16);
187   stlforce_tx_tilemap    = tilemap_create(get_stlforce_tx_tile_info,   tilemap_scan_rows,TILEMAP_TRANSPARENT,  8, 8,64,32);
184   stlforce_bg_tilemap    = tilemap_create(get_stlforce_bg_tile_info,   tilemap_scan_cols,TILEMAP_TYPE_OPAQUE,      16,16,64,16);
185   stlforce_mlow_tilemap  = tilemap_create(get_stlforce_mlow_tile_info, tilemap_scan_cols,TILEMAP_TYPE_TRANSPARENT, 16,16,64,16);
186   stlforce_mhigh_tilemap = tilemap_create(get_stlforce_mhigh_tile_info,tilemap_scan_cols,TILEMAP_TYPE_TRANSPARENT, 16,16,64,16);
187   stlforce_tx_tilemap    = tilemap_create(get_stlforce_tx_tile_info,   tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,  8, 8,64,32);
188188
189189   tilemap_set_transparent_pen(stlforce_mlow_tilemap,0);
190190   tilemap_set_transparent_pen(stlforce_mhigh_tilemap,0);
src/mame/video/amspdwy.c
r778r779
7979VIDEO_START( amspdwy )
8080{
8181   bg_tilemap   =   tilemap_create(   get_tile_info,   tilemap_scan_cols_back,
82                        TILEMAP_OPAQUE,   8,8,   0x20, 0x20 );
82                        TILEMAP_TYPE_OPAQUE,   8,8,   0x20, 0x20 );
8383}
8484
8585
src/mame/video/atarig1.c
r778r779
114114   atarigen_blend_gfx(machine, 0, 2, 0x0f, 0x10);
115115
116116   /* initialize the playfield */
117   atarigen_playfield_tilemap = tilemap_create(get_playfield_tile_info, tilemap_scan_rows, TILEMAP_OPAQUE, 8,8, 64,64);
117   atarigen_playfield_tilemap = tilemap_create(get_playfield_tile_info, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE, 8,8, 64,64);
118118
119119   /* initialize the motion objects */
120120   atarirle_init(0, atarig1_pitfight ? &modesc_pitfight : &modesc_hydra);
121121
122122   /* initialize the alphanumerics */
123   atarigen_alpha_tilemap = tilemap_create(get_alpha_tile_info, tilemap_scan_rows, TILEMAP_TRANSPARENT, 8,8, 64,32);
123   atarigen_alpha_tilemap = tilemap_create(get_alpha_tile_info, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 8,8, 64,32);
124124   tilemap_set_transparent_pen(atarigen_alpha_tilemap, 0);
125125
126126   /* reset statics */
src/mame/video/sbrkout.c
r778r779
2828VIDEO_START( sbrkout )
2929{
3030   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows,
31      TILEMAP_OPAQUE, 8, 8, 32, 32);
31      TILEMAP_TYPE_OPAQUE, 8, 8, 32, 32);
3232}
3333
3434static void draw_balls(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect)
src/mame/video/toobin.c
r778r779
9393   };
9494
9595   /* initialize the playfield */
96   atarigen_playfield_tilemap = tilemap_create(get_playfield_tile_info, tilemap_scan_rows, TILEMAP_OPAQUE, 8,8, 128,64);
96   atarigen_playfield_tilemap = tilemap_create(get_playfield_tile_info, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE, 8,8, 128,64);
9797
9898   /* initialize the motion objects */
9999   atarimo_init(machine, 0, &modesc);
100100
101101   /* initialize the alphanumerics */
102   atarigen_alpha_tilemap = tilemap_create(get_alpha_tile_info, tilemap_scan_rows, TILEMAP_TRANSPARENT, 8,8, 64,48);
102   atarigen_alpha_tilemap = tilemap_create(get_alpha_tile_info, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 8,8, 64,48);
103103   tilemap_set_transparent_pen(atarigen_alpha_tilemap, 0);
104104}
105105
src/mame/video/srumbler.c
r778r779
5050
5151VIDEO_START( srumbler )
5252{
53   fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_cols,TILEMAP_TRANSPARENT,8,8,64,32);
54   bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_cols,TILEMAP_SPLIT,    16,16,64,64);
53   fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_cols,TILEMAP_TYPE_TRANSPARENT,8,8,64,32);
54   bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_cols,TILEMAP_TYPE_SPLIT,    16,16,64,64);
5555
5656   tilemap_set_transparent_pen(fg_tilemap,3);
5757
src/mame/video/legionna.c
r778r779
155155
156156VIDEO_START( legionna )
157157{
158   background_layer = tilemap_create(get_back_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,32,32);
159   foreground_layer = tilemap_create(get_fore_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,32,32);
160   midground_layer =  tilemap_create(get_mid_tile_info, tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,32,32);
161   text_layer =       tilemap_create(get_text_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,  8,8,64,32);
158   background_layer = tilemap_create(get_back_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,32,32);
159   foreground_layer = tilemap_create(get_fore_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,32,32);
160   midground_layer =  tilemap_create(get_mid_tile_info, tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,32,32);
161   text_layer =       tilemap_create(get_text_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,  8,8,64,32);
162162
163163   legionna_scrollram16 = auto_malloc(0x60);
164164
r778r779
170170
171171VIDEO_START( denjinmk )
172172{
173   background_layer = tilemap_create(get_back_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,32,32);
174   foreground_layer = tilemap_create(get_fore_tile_info_denji,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,32,32);
175   midground_layer =  tilemap_create(get_mid_tile_info_denji, tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,32,32);
176   text_layer =       tilemap_create(get_text_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,  8,8,64,32);
173   background_layer = tilemap_create(get_back_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,32,32);
174   foreground_layer = tilemap_create(get_fore_tile_info_denji,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,32,32);
175   midground_layer =  tilemap_create(get_mid_tile_info_denji, tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,32,32);
176   text_layer =       tilemap_create(get_text_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,  8,8,64,32);
177177
178178   legionna_scrollram16 = auto_malloc(0x60);
179179
r778r779
185185
186186VIDEO_START( cupsoc )
187187{
188   background_layer = tilemap_create(get_back_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,32,32);
189   foreground_layer = tilemap_create(get_fore_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,32,32);
190   midground_layer =  tilemap_create(get_mid_tile_info_cupsoc, tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,32,32);
191   text_layer =       tilemap_create(get_text_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,  8,8,64,32);
188   background_layer = tilemap_create(get_back_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,32,32);
189   foreground_layer = tilemap_create(get_fore_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,32,32);
190   midground_layer =  tilemap_create(get_mid_tile_info_cupsoc, tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,32,32);
191   text_layer =       tilemap_create(get_text_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,  8,8,64,32);
192192
193193   legionna_scrollram16 = auto_malloc(0x60);
194194
src/mame/video/pbaction.c
r778r779
7474VIDEO_START( pbaction )
7575{
7676   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows,
77      TILEMAP_OPAQUE, 8, 8, 32, 32);
77      TILEMAP_TYPE_OPAQUE, 8, 8, 32, 32);
7878
7979   fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows,
80      TILEMAP_TRANSPARENT, 8, 8, 32, 32);
80      TILEMAP_TYPE_TRANSPARENT, 8, 8, 32, 32);
8181
8282   tilemap_set_transparent_pen(fg_tilemap, 0);
8383}
src/mame/video/mcr68.c
r778r779
6363VIDEO_START( mcr68 )
6464{
6565   /* initialize the background tilemap */
66   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, TILEMAP_TRANSPARENT, 16,16, 32,32);
66   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 16,16, 32,32);
6767   tilemap_set_transparent_pen(bg_tilemap, 0);
6868}
6969
r778r779
7676   int code, y, x;
7777
7878   /* initialize the background tilemap */
79   bg_tilemap = tilemap_create(zwackery_get_bg_tile_info, tilemap_scan_rows, TILEMAP_OPAQUE, 16,16, 32,32);
79   bg_tilemap = tilemap_create(zwackery_get_bg_tile_info, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE, 16,16, 32,32);
8080
8181   /* initialize the foreground tilemap */
82   fg_tilemap = tilemap_create(zwackery_get_fg_tile_info, tilemap_scan_rows, TILEMAP_TRANSPARENT, 16,16, 32,32);
82   fg_tilemap = tilemap_create(zwackery_get_fg_tile_info, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 16,16, 32,32);
8383   tilemap_set_transparent_pen(fg_tilemap, 0);
8484
8585   /* "colorize" each code */
src/mame/video/overdriv.c
r778r779
5252VIDEO_START( overdriv )
5353{
5454   K053251_vh_start();
55   K051316_vh_start_0(machine,REGION_GFX2,4,TILEMAP_OPAQUE,0,zoom_callback_0);
56   K051316_vh_start_1(machine,REGION_GFX3,4,TILEMAP_TRANSPARENT,0,zoom_callback_1);
55   K051316_vh_start_0(machine,REGION_GFX2,4,TILEMAP_TYPE_OPAQUE,0,zoom_callback_0);
56   K051316_vh_start_1(machine,REGION_GFX3,4,TILEMAP_TYPE_TRANSPARENT,0,zoom_callback_1);
5757   K053247_vh_start(machine, REGION_GFX1,77,22,NORMAL_PLANE_ORDER,overdriv_sprite_callback);
5858
5959   K051316_wraparound_enable(0,1);
src/mame/video/funworld.c
r778r779
105105VIDEO_START(funworld)
106106{
107107   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows,
108      TILEMAP_OPAQUE, 4, 8, 96, 29);
108      TILEMAP_TYPE_OPAQUE, 4, 8, 96, 29);
109109}
110110
111111VIDEO_START(magiccrd)
112112{
113113   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows,
114      TILEMAP_OPAQUE, 4, 8, 112, 34);
114      TILEMAP_TYPE_OPAQUE, 4, 8, 112, 34);
115115}
116116
117117VIDEO_UPDATE(funworld)
src/mame/video/gsword.c
r778r779
167167VIDEO_START( gsword )
168168{
169169   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows,
170      TILEMAP_OPAQUE, 8, 8, 32, 64);
170      TILEMAP_TYPE_OPAQUE, 8, 8, 32, 64);
171171}
172172
173173static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect)
src/mame/video/mario.c
r778r779
125125VIDEO_START( mario )
126126{
127127   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows,
128      TILEMAP_OPAQUE, 8, 8, 32, 32);
128      TILEMAP_TYPE_OPAQUE, 8, 8, 32, 32);
129129
130130   state_save_register_global(gfx_bank);
131131   state_save_register_global(palette_bank);
src/mame/video/silkroad.c
r778r779
137137
138138VIDEO_START(silkroad)
139139{
140   fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,64, 64);
140   fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,64, 64);
141141      tilemap_set_transparent_pen(fg_tilemap,0);
142142
143   fg2_tilemap = tilemap_create(get_fg2_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,64, 64);
143   fg2_tilemap = tilemap_create(get_fg2_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,64, 64);
144144      tilemap_set_transparent_pen(fg2_tilemap,0);
145145
146   fg3_tilemap = tilemap_create(get_fg3_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,64, 64);
146   fg3_tilemap = tilemap_create(get_fg3_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,64, 64);
147147      tilemap_set_transparent_pen(fg3_tilemap,0);
148148}
149149
src/mame/video/videopin.c
r778r779
3131
3232VIDEO_START( videopin )
3333{
34   bg_tilemap = tilemap_create(get_tile_info, get_memory_offset, TILEMAP_OPAQUE, 8, 8, 48, 32);
34   bg_tilemap = tilemap_create(get_tile_info, get_memory_offset, TILEMAP_TYPE_OPAQUE, 8, 8, 48, 32);
3535}
3636
3737
src/mame/video/exprraid.c
r778r779
8383VIDEO_START( exprraid )
8484{
8585   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows,
86      TILEMAP_OPAQUE, 16, 16, 32, 32);
86      TILEMAP_TYPE_OPAQUE, 16, 16, 32, 32);
8787
8888   fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows,
89      TILEMAP_TRANSPARENT, 8, 8, 32, 32);
89      TILEMAP_TYPE_TRANSPARENT, 8, 8, 32, 32);
9090
9191   tilemap_set_scroll_rows(bg_tilemap, 2);
9292   tilemap_set_transparent_pen(fg_tilemap, 0);
src/mame/video/tecmo16.c
r778r779
7171   /* set up sprites */
7272   sprite_bitmap = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, BITMAP_FORMAT_INDEXED16);
7373
74   fg_tilemap = tilemap_create(fg_get_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,32,32);
75   bg_tilemap = tilemap_create(bg_get_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,32,32);
76   tx_tilemap = tilemap_create(tx_get_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT, 8, 8,64,32);
74   fg_tilemap = tilemap_create(fg_get_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,32,32);
75   bg_tilemap = tilemap_create(bg_get_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,32,32);
76   tx_tilemap = tilemap_create(tx_get_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 8, 8,64,32);
7777
7878   tilemap_set_transparent_pen(fg_tilemap,0);
7979   tilemap_set_transparent_pen(bg_tilemap,0);
r778r779
9393   /* set up sprites */
9494   sprite_bitmap = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, BITMAP_FORMAT_INDEXED16);
9595
96   fg_tilemap = tilemap_create(fg_get_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,64,32);
97   bg_tilemap = tilemap_create(bg_get_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,64,32);
98   tx_tilemap = tilemap_create(tx_get_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT, 8, 8,64,32);
96   fg_tilemap = tilemap_create(fg_get_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,64,32);
97   bg_tilemap = tilemap_create(bg_get_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,64,32);
98   tx_tilemap = tilemap_create(tx_get_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 8, 8,64,32);
9999
100100   tilemap_set_transparent_pen(fg_tilemap,0);
101101   tilemap_set_transparent_pen(bg_tilemap,0);
r778r779
113113   /* set up sprites */
114114   sprite_bitmap = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, BITMAP_FORMAT_INDEXED16);
115115
116   fg_tilemap = tilemap_create(fg_get_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,64,32);
117   bg_tilemap = tilemap_create(bg_get_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,64,32);
118   tx_tilemap = tilemap_create(tx_get_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT, 8, 8,64,32);
116   fg_tilemap = tilemap_create(fg_get_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,64,32);
117   bg_tilemap = tilemap_create(bg_get_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,64,32);
118   tx_tilemap = tilemap_create(tx_get_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 8, 8,64,32);
119119
120120   tilemap_set_transparent_pen(fg_tilemap,0);
121121   tilemap_set_transparent_pen(bg_tilemap,0);
src/mame/video/runaway.c
r778r779
7676
7777VIDEO_START( runaway )
7878{
79   bg_tilemap = tilemap_create(runaway_get_tile_info, tilemap_scan_rows, TILEMAP_OPAQUE, 8, 8, 32, 30);
79   bg_tilemap = tilemap_create(runaway_get_tile_info, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE, 8, 8, 32, 30);
8080}
8181
8282
8383VIDEO_START( qwak )
8484{
85   bg_tilemap = tilemap_create(qwak_get_tile_info, tilemap_scan_rows, TILEMAP_OPAQUE, 8, 8, 32, 30);
85   bg_tilemap = tilemap_create(qwak_get_tile_info, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE, 8, 8, 32, 30);
8686}
8787
8888
src/mame/video/toypop.c
r778r779
126126
127127VIDEO_START( toypop )
128128{
129   bg_tilemap = tilemap_create(get_tile_info,tilemap_scan,TILEMAP_TRANSPARENT,8,8,36,28);
129   bg_tilemap = tilemap_create(get_tile_info,tilemap_scan,TILEMAP_TYPE_TRANSPARENT,8,8,36,28);
130130
131131   tilemap_set_transparent_pen(bg_tilemap, 0);
132132}
src/mame/video/tumbleb.c
r778r779
458458
459459VIDEO_START( pangpang )
460460{
461   pf1_tilemap =     tilemap_create(pangpang_get_fg_tile_info, tilemap_scan_rows,TILEMAP_TRANSPARENT, 8, 8,64,32);
462   pf1_alt_tilemap = tilemap_create(pangpang_get_bg1_tile_info,tumblep_scan,TILEMAP_TRANSPARENT,16,16,64,32);
463   pf2_tilemap =     tilemap_create(pangpang_get_bg2_tile_info,tumblep_scan,TILEMAP_OPAQUE,     16,16,64,32);
461   pf1_tilemap =     tilemap_create(pangpang_get_fg_tile_info, tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 8, 8,64,32);
462   pf1_alt_tilemap = tilemap_create(pangpang_get_bg1_tile_info,tumblep_scan,TILEMAP_TYPE_TRANSPARENT,16,16,64,32);
463   pf2_tilemap =     tilemap_create(pangpang_get_bg2_tile_info,tumblep_scan,TILEMAP_TYPE_OPAQUE,     16,16,64,32);
464464
465465   tilemap_set_transparent_pen(pf1_tilemap,0);
466466   tilemap_set_transparent_pen(pf1_alt_tilemap,0);
r778r779
473473
474474VIDEO_START( tumblepb )
475475{
476   pf1_tilemap =     tilemap_create(get_fg_tile_info, tilemap_scan_rows,TILEMAP_TRANSPARENT, 8, 8,64,32);
477   pf1_alt_tilemap = tilemap_create(get_bg1_tile_info,tumblep_scan,TILEMAP_TRANSPARENT,16,16,64,32);
478   pf2_tilemap =     tilemap_create(get_bg2_tile_info,tumblep_scan,TILEMAP_OPAQUE,     16,16,64,32);
476   pf1_tilemap =     tilemap_create(get_fg_tile_info, tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 8, 8,64,32);
477   pf1_alt_tilemap = tilemap_create(get_bg1_tile_info,tumblep_scan,TILEMAP_TYPE_TRANSPARENT,16,16,64,32);
478   pf2_tilemap =     tilemap_create(get_bg2_tile_info,tumblep_scan,TILEMAP_TYPE_OPAQUE,     16,16,64,32);
479479
480480   tilemap_set_transparent_pen(pf1_tilemap,0);
481481   tilemap_set_transparent_pen(pf1_alt_tilemap,0);
r778r779
487487
488488VIDEO_START( sdfight )
489489{
490   pf1_tilemap =     tilemap_create(get_fg_tile_info, tilemap_scan_rows,TILEMAP_TRANSPARENT, 8, 8,64,64); // 64*64 to prevent bad tilemap wrapping? - check real behavior
491   pf1_alt_tilemap = tilemap_create(get_bg1_tile_info,tumblep_scan,TILEMAP_TRANSPARENT,16,16,64,32);
492   pf2_tilemap =     tilemap_create(get_bg2_tile_info,tumblep_scan,TILEMAP_OPAQUE,     16,16,64,32);
490   pf1_tilemap =     tilemap_create(get_fg_tile_info, tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 8, 8,64,64); // 64*64 to prevent bad tilemap wrapping? - check real behavior
491   pf1_alt_tilemap = tilemap_create(get_bg1_tile_info,tumblep_scan,TILEMAP_TYPE_TRANSPARENT,16,16,64,32);
492   pf2_tilemap =     tilemap_create(get_bg2_tile_info,tumblep_scan,TILEMAP_TYPE_OPAQUE,     16,16,64,32);
493493
494494   tilemap_set_transparent_pen(pf1_tilemap,0);
495495   tilemap_set_transparent_pen(pf1_alt_tilemap,0);
r778r779
502502
503503VIDEO_START( fncywld )
504504{
505   pf1_tilemap =     tilemap_create(get_fncywld_fg_tile_info, tilemap_scan_rows,TILEMAP_TRANSPARENT, 8, 8,64,32);
506   pf1_alt_tilemap = tilemap_create(get_fncywld_bg1_tile_info,tumblep_scan,TILEMAP_TRANSPARENT,16,16,64,32);
507   pf2_tilemap =     tilemap_create(get_fncywld_bg2_tile_info,tumblep_scan,TILEMAP_OPAQUE,     16,16,64,32);
505   pf1_tilemap =     tilemap_create(get_fncywld_fg_tile_info, tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 8, 8,64,32);
506   pf1_alt_tilemap = tilemap_create(get_fncywld_bg1_tile_info,tumblep_scan,TILEMAP_TYPE_TRANSPARENT,16,16,64,32);
507   pf2_tilemap =     tilemap_create(get_fncywld_bg2_tile_info,tumblep_scan,TILEMAP_TYPE_OPAQUE,     16,16,64,32);
508508
509509   tilemap_set_transparent_pen(pf1_tilemap,15);
510510   tilemap_set_transparent_pen(pf1_alt_tilemap,15);
r778r779
516516
517517VIDEO_START( jumppop )
518518{
519   pf1_tilemap =     tilemap_create(get_jumppop_fg_tile_info, tilemap_scan_rows,TILEMAP_TRANSPARENT, 8, 8,128,64);
520   pf1_alt_tilemap = tilemap_create(get_jumppop_bg1_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,64,64);
521   pf2_tilemap =     tilemap_create(get_jumppop_bg2_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,     16,16,64,64);
522   pf2_alt_tilemap =     tilemap_create(get_jumppop_bg2_alt_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,     8,8,128,64);
519   pf1_tilemap =     tilemap_create(get_jumppop_fg_tile_info, tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 8, 8,128,64);
520   pf1_alt_tilemap = tilemap_create(get_jumppop_bg1_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,64,64);
521   pf2_tilemap =     tilemap_create(get_jumppop_bg2_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,     16,16,64,64);
522   pf2_alt_tilemap =     tilemap_create(get_jumppop_bg2_alt_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,     8,8,128,64);
523523
524524   tilemap_set_transparent_pen(pf1_tilemap,0);
525525   tilemap_set_transparent_pen(pf1_alt_tilemap,0);
r778r779
829829
830830VIDEO_START( suprtrio )
831831{
832   pf1_tilemap =     tilemap_create(get_fg_tile_info, tilemap_scan_rows,TILEMAP_OPAQUE, 8, 8,64,32);
833   pf1_alt_tilemap = tilemap_create(get_bg1_tile_info,tumblep_scan,TILEMAP_TRANSPARENT,16,16,64,32);
834   pf2_tilemap =     tilemap_create(get_bg2_tile_info,tumblep_scan,TILEMAP_OPAQUE,     16,16,64,32);
832   pf1_tilemap =     tilemap_create(get_fg_tile_info, tilemap_scan_rows,TILEMAP_TYPE_OPAQUE, 8, 8,64,32);
833   pf1_alt_tilemap = tilemap_create(get_bg1_tile_info,tumblep_scan,TILEMAP_TYPE_TRANSPARENT,16,16,64,32);
834   pf2_tilemap =     tilemap_create(get_bg2_tile_info,tumblep_scan,TILEMAP_TYPE_OPAQUE,     16,16,64,32);
835835
836836   tilemap_set_transparent_pen(pf1_alt_tilemap,0);
837837   bcstory_tilebank = 0;
src/mame/video/kchamp.c
r778r779
5454VIDEO_START( kchamp )
5555{
5656   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows,
57      TILEMAP_OPAQUE, 8, 8, 32, 32);
57      TILEMAP_TYPE_OPAQUE, 8, 8, 32, 32);
5858}
5959
6060/*
src/mame/video/digdug.c
r778r779
147147
148148VIDEO_START( digdug )
149149{
150   bg_tilemap = tilemap_create(bg_get_tile_info,tilemap_scan,TILEMAP_OPAQUE,     8,8,36,28);
151   tx_tilemap = tilemap_create(tx_get_tile_info,tilemap_scan,TILEMAP_TRANSPARENT,8,8,36,28);
150   bg_tilemap = tilemap_create(bg_get_tile_info,tilemap_scan,TILEMAP_TYPE_OPAQUE,     8,8,36,28);
151   tx_tilemap = tilemap_create(tx_get_tile_info,tilemap_scan,TILEMAP_TYPE_TRANSPARENT,8,8,36,28);
152152
153153   tilemap_set_transparent_pen(tx_tilemap, 0);
154154
src/mame/video/ultratnk.c
r778r779
5555{
5656   helper = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format);
5757
58   playfield = tilemap_create(ultratnk_tile_info, tilemap_scan_rows, TILEMAP_OPAQUE, 8, 8, 32, 32);
58   playfield = tilemap_create(ultratnk_tile_info, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE, 8, 8, 32, 32);
5959}
6060
6161
src/mame/video/m90.c
r778r779
5555
5656VIDEO_START( m90 )
5757{
58   pf1_layer =      tilemap_create(get_pf1_tile_info, tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,64,64);
59   pf1_wide_layer = tilemap_create(get_pf1w_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,128,64);
60   pf2_layer =      tilemap_create(get_pf2_tile_info, tilemap_scan_rows,TILEMAP_OPAQUE,8,8,64,64);
61   pf2_wide_layer = tilemap_create(get_pf2w_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,8,8,128,64);
58   pf1_layer =      tilemap_create(get_pf1_tile_info, tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,64,64);
59   pf1_wide_layer = tilemap_create(get_pf1w_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,128,64);
60   pf2_layer =      tilemap_create(get_pf2_tile_info, tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,8,8,64,64);
61   pf2_wide_layer = tilemap_create(get_pf2w_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,8,8,128,64);
6262
6363   tilemap_set_transparent_pen(pf1_layer,0);
6464   tilemap_set_transparent_pen(pf1_wide_layer,0);
src/mame/video/scotrsht.c
r778r779
151151
152152VIDEO_START( scotrsht )
153153{
154   bg_tilemap = tilemap_create(scotrsht_get_bg_tile_info, tilemap_scan_rows, TILEMAP_OPAQUE, 8, 8, 64, 32);
154   bg_tilemap = tilemap_create(scotrsht_get_bg_tile_info, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE, 8, 8, 64, 32);
155155
156156   tilemap_set_scroll_cols(bg_tilemap, 64);
157157}
src/mame/video/phoenix.c
r778r779
170170   current_videoram_pg = videoram_pg1;      /* otherwise, hiscore loading crashes */
171171
172172
173   fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,32,32);
174   bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,     8,8,32,32);
173   fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,32,32);
174   bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,     8,8,32,32);
175175
176176   tilemap_set_transparent_pen(fg_tilemap,0);
177177   tilemap_set_scrolldx(fg_tilemap,0,8);
src/mame/video/msisaac.c
r778r779
6060
6161VIDEO_START( msisaac )
6262{
63   background  = tilemap_create(get_bg_tile_info, tilemap_scan_rows,TILEMAP_OPAQUE,     8,8,32,32);
64   background2 = tilemap_create(get_bg2_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,32,32);
65   foreground  = tilemap_create(get_fg_tile_info, tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,32,32);
63   background  = tilemap_create(get_bg_tile_info, tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,     8,8,32,32);
64   background2 = tilemap_create(get_bg2_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,32,32);
65   foreground  = tilemap_create(get_fg_tile_info, tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,32,32);
6666
6767   tilemap_set_transparent_pen(background2,0);
6868   tilemap_set_transparent_pen(foreground,0);
src/mame/video/markham.c
r778r779
7474VIDEO_START( markham )
7575{
7676   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_cols,
77      TILEMAP_OPAQUE, 8, 8, 32, 32);
77      TILEMAP_TYPE_OPAQUE, 8, 8, 32, 32);
7878
7979   tilemap_set_scroll_rows(bg_tilemap, 32);
8080}
src/mame/video/superqix.c
r778r779
5454
5555VIDEO_START( pbillian )
5656{
57   bg_tilemap = tilemap_create(pb_get_bg_tile_info, tilemap_scan_rows, TILEMAP_OPAQUE, 8, 8,32,32);
57   bg_tilemap = tilemap_create(pb_get_bg_tile_info, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE, 8, 8,32,32);
5858}
5959
6060VIDEO_START( superqix )
6161{
6262   fg_bitmap[0] = auto_bitmap_alloc(256, 256, machine->screen[0].format);
6363   fg_bitmap[1] = auto_bitmap_alloc(256, 256, machine->screen[0].format);
64   bg_tilemap = tilemap_create(sqix_get_bg_tile_info, tilemap_scan_rows, TILEMAP_SPLIT, 8, 8, 32, 32);
64   bg_tilemap = tilemap_create(sqix_get_bg_tile_info, tilemap_scan_rows, TILEMAP_TYPE_SPLIT, 8, 8, 32, 32);
6565
6666   tilemap_set_transmask(bg_tilemap,0,0xffff,0x0000); /* split type 0 is totally transparent in front half */
6767   tilemap_set_transmask(bg_tilemap,1,0x0001,0xfffe); /* split type 1 has pen 0 transparent in front half */
src/mame/video/playch10.c
r778r779
9898VIDEO_START( playch10 )
9999{
100100   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows,
101      TILEMAP_OPAQUE, 8, 8, 32, 32);
101      TILEMAP_TYPE_OPAQUE, 8, 8, 32, 32);
102102
103103   ppu2c0x_init(machine, &ppu_interface );
104104}
src/mame/video/dday.c
r778r779
237237
238238VIDEO_START( dday )
239239{
240   bg_tilemap   = tilemap_create(get_bg_tile_info,  tilemap_scan_rows,TILEMAP_SPLIT,8,8,32,32);
241   fg_tilemap   = tilemap_create(get_fg_tile_info,  tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,32,32);
242   text_tilemap = tilemap_create(get_text_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,32,32);
243   sl_tilemap   = tilemap_create(get_sl_tile_info,  tilemap_scan_rows,TILEMAP_OPAQUE,8,8,32,32);
240   bg_tilemap   = tilemap_create(get_bg_tile_info,  tilemap_scan_rows,TILEMAP_TYPE_SPLIT,8,8,32,32);
241   fg_tilemap   = tilemap_create(get_fg_tile_info,  tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,32,32);
242   text_tilemap = tilemap_create(get_text_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,32,32);
243   sl_tilemap   = tilemap_create(get_sl_tile_info,  tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,8,8,32,32);
244244
245245   main_bitmap = auto_bitmap_alloc(machine->screen[0].width,machine->screen[0].height,machine->screen[0].format);
246246
src/mame/video/cyberbal.c
r778r779
169169   atarimo_1_slipram = &current_slip[1];
170170
171171   /* initialize the playfield */
172   atarigen_playfield_tilemap = tilemap_create(get_playfield_tile_info, tilemap_scan_rows, TILEMAP_OPAQUE, 16,8, 64,64);
172   atarigen_playfield_tilemap = tilemap_create(get_playfield_tile_info, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE, 16,8, 64,64);
173173
174174   /* initialize the motion objects */
175175   atarimo_init(machine, 0, &mo0desc);
176176
177177   /* initialize the alphanumerics */
178   atarigen_alpha_tilemap = tilemap_create(get_alpha_tile_info, tilemap_scan_rows, TILEMAP_TRANSPARENT, 16,8, 64,32);
178   atarigen_alpha_tilemap = tilemap_create(get_alpha_tile_info, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 16,8, 64,32);
179179   tilemap_set_transparent_pen(atarigen_alpha_tilemap, 0);
180180
181181   /* allocate the second screen if necessary */
182182   if (screens == 2)
183183   {
184184      /* initialize the playfield */
185      atarigen_playfield2_tilemap = tilemap_create(get_playfield2_tile_info, tilemap_scan_rows, TILEMAP_OPAQUE, 16,8, 64,64);
185      atarigen_playfield2_tilemap = tilemap_create(get_playfield2_tile_info, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE, 16,8, 64,64);
186186      tilemap_set_scrollx(atarigen_playfield2_tilemap, 0, 0);
187187
188188      /* initialize the motion objects */
189189      atarimo_init(machine, 1, &mo1desc);
190190
191191      /* initialize the alphanumerics */
192      atarigen_alpha2_tilemap = tilemap_create(get_alpha2_tile_info, tilemap_scan_rows, TILEMAP_TRANSPARENT, 16,8, 64,32);
192      atarigen_alpha2_tilemap = tilemap_create(get_alpha2_tile_info, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 16,8, 64,32);
193193      tilemap_set_scrollx(atarigen_alpha2_tilemap, 0, 0);
194194      tilemap_set_transparent_pen(atarigen_alpha2_tilemap, 0);
195195   }
src/mame/video/mappy.c
r778r779
339339
340340VIDEO_START( superpac )
341341{
342   bg_tilemap = tilemap_create(superpac_get_tile_info,superpac_tilemap_scan,TILEMAP_TRANSPARENT_COLOR,8,8,36,28);
342   bg_tilemap = tilemap_create(superpac_get_tile_info,superpac_tilemap_scan,TILEMAP_TYPE_TRANSPARENT_COLOR,8,8,36,28);
343343   sprite_bitmap = auto_bitmap_alloc(machine->screen[0].width,machine->screen[0].height,machine->screen[0].format);
344344
345345   tilemap_set_transparent_pen(bg_tilemap, 31);
r778r779
351351
352352VIDEO_START( phozon )
353353{
354   bg_tilemap = tilemap_create(phozon_get_tile_info,superpac_tilemap_scan,TILEMAP_TRANSPARENT_COLOR,8,8,36,28);
354   bg_tilemap = tilemap_create(phozon_get_tile_info,superpac_tilemap_scan,TILEMAP_TYPE_TRANSPARENT_COLOR,8,8,36,28);
355355
356356   tilemap_set_transparent_pen(bg_tilemap, 15);
357357
r778r779
362362
363363VIDEO_START( mappy )
364364{
365   bg_tilemap = tilemap_create(mappy_get_tile_info,mappy_tilemap_scan,TILEMAP_TRANSPARENT_COLOR,8,8,36,60);
365   bg_tilemap = tilemap_create(mappy_get_tile_info,mappy_tilemap_scan,TILEMAP_TYPE_TRANSPARENT_COLOR,8,8,36,60);
366366
367367   tilemap_set_transparent_pen(bg_tilemap, 31);
368368   tilemap_set_scroll_cols(bg_tilemap, 36);
src/mame/video/tigeroad.c
r778r779
142142VIDEO_START( tigeroad )
143143{
144144   bg_tilemap = tilemap_create(get_bg_tile_info, tigeroad_tilemap_scan,
145      TILEMAP_SPLIT, 32, 32, 128, 128);
145      TILEMAP_TYPE_SPLIT, 32, 32, 128, 128);
146146
147147   fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows,
148      TILEMAP_TRANSPARENT, 8, 8, 32, 32);
148      TILEMAP_TYPE_TRANSPARENT, 8, 8, 32, 32);
149149
150150   tilemap_set_transmask(bg_tilemap, 0, 0xffff, 0);
151151   tilemap_set_transmask(bg_tilemap, 1, 0x1ff, 0xfe00);
src/mame/video/segas32.c
r778r779
302302   {
303303      struct cache_entry *entry = auto_malloc(sizeof(struct cache_entry));
304304
305      entry->tmap = tilemap_create(get_tile_info, tilemap_scan_rows, TILEMAP_OPAQUE, 16,16, 32,16);
305      entry->tmap = tilemap_create(get_tile_info, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE, 16,16, 32,16);
306306      entry->page = 0xff;
307307      entry->bank = 0;
308308      entry->next = cache_head;
src/mame/video/badlands.c
r778r779
8282   };
8383
8484   /* initialize the playfield */
85   atarigen_playfield_tilemap = tilemap_create(get_playfield_tile_info, tilemap_scan_rows, TILEMAP_OPAQUE, 8,8, 64,32);
85   atarigen_playfield_tilemap = tilemap_create(get_playfield_tile_info, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE, 8,8, 64,32);
8686
8787   /* initialize the motion objects */
8888   atarimo_init(machine, 0, &modesc);
src/mame/video/slapfght.c
r778r779
7575
7676VIDEO_START( perfrman )
7777{
78   pf1_tilemap = tilemap_create(get_pf_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,64,32);
78   pf1_tilemap = tilemap_create(get_pf_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,64,32);
7979
8080   tilemap_set_transparent_pen(pf1_tilemap,0);
8181}
8282
8383VIDEO_START( slapfight )
8484{
85   pf1_tilemap = tilemap_create(get_pf1_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,8,8,64,32);
86   fix_tilemap = tilemap_create(get_fix_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,64,32);
85   pf1_tilemap = tilemap_create(get_pf1_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,8,8,64,32);
86   fix_tilemap = tilemap_create(get_fix_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,64,32);
8787
8888   tilemap_set_transparent_pen(fix_tilemap,0);
8989}
src/mame/video/quizdna.c
r778r779
5959   quizdna_bg_ram = auto_malloc(0x2000);
6060   quizdna_fg_ram = auto_malloc(0x1000);
6161
62   quizdna_bg_tilemap = tilemap_create( get_bg_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,8,8,64,32 );
63   quizdna_fg_tilemap = tilemap_create( get_fg_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,8,32,32 );
62   quizdna_bg_tilemap = tilemap_create( get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,8,8,64,32 );
63   quizdna_fg_tilemap = tilemap_create( get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,8,32,32 );
6464
6565   tilemap_set_transparent_pen( quizdna_fg_tilemap,0 );
6666}
src/mame/video/offtwall.c
r778r779
7373   };
7474
7575   /* initialize the playfield */
76   atarigen_playfield_tilemap = tilemap_create(get_playfield_tile_info, tilemap_scan_cols, TILEMAP_OPAQUE, 8,8, 64,64);
76   atarigen_playfield_tilemap = tilemap_create(get_playfield_tile_info, tilemap_scan_cols, TILEMAP_TYPE_OPAQUE, 8,8, 64,64);
7777
7878   /* initialize the motion objects */
7979   atarimo_init(machine, 0, &modesc);
src/mame/video/mpatrol.c
r778r779
200200{
201201   int y;
202202
203   bg_tilemap = tilemap_create(get_tile_info, tilemap_scan_rows, TILEMAP_TRANSPARENT, 8, 8, 32, 32);
203   bg_tilemap = tilemap_create(get_tile_info, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 8, 8, 32, 32);
204204
205205   tilemap_set_transparent_pen(bg_tilemap, 0);
206206
src/mame/video/equites.c
r778r779
106106
107107VIDEO_START( equites )
108108{
109   charmap0 = tilemap_create(equites_charinfo, tilemap_scan_cols, TILEMAP_TRANSPARENT, 8, 8, 32, 32);
109   charmap0 = tilemap_create(equites_charinfo, tilemap_scan_cols, TILEMAP_TYPE_TRANSPARENT, 8, 8, 32, 32);
110110   tilemap_set_transparent_pen(charmap0, 0);
111111   tilemap_set_scrolldx(charmap0, BMPAD, BMPAD);
112112   tilemap_set_scrolldy(charmap0, BMPAD, BMPAD);
r778r779
224224
225225   tmpbitmap = auto_bitmap_alloc(BMW, BMW, machine->screen[0].format);
226226
227   charmap0 = tilemap_create(splndrbt_char0info, tilemap_scan_cols, TILEMAP_TRANSPARENT_COLOR, 8, 8, 32, 32);
227   charmap0 = tilemap_create(splndrbt_char0info, tilemap_scan_cols, TILEMAP_TYPE_TRANSPARENT_COLOR, 8, 8, 32, 32);
228228   tilemap_set_transparent_pen(charmap0, 0);
229229   tilemap_set_scrolldx(charmap0, 8, 8);
230230   tilemap_set_scrolldy(charmap0, 32, 32);
231231
232   charmap1 = tilemap_create(splndrbt_char1info, tilemap_scan_cols, TILEMAP_TRANSPARENT_COLOR, 8, 8, 32, 32);
232   charmap1 = tilemap_create(splndrbt_char1info, tilemap_scan_cols, TILEMAP_TYPE_TRANSPARENT_COLOR, 8, 8, 32, 32);
233233   tilemap_set_transparent_pen(charmap1, 0);
234234   tilemap_set_scrolldx(charmap1, 8, 8);
235235   tilemap_set_scrolldy(charmap1, 32, 32);
src/mame/video/decocass.c
r778r779
583583   char_dirty = auto_malloc(1024);
584584   tile_dirty = auto_malloc(16);
585585
586   bg_tilemap_l = tilemap_create( get_bg_l_tile_info, bgvideoram_scan_cols, TILEMAP_TRANSPARENT, 16, 16, 32, 32 );
587   bg_tilemap_r = tilemap_create( get_bg_r_tile_info, bgvideoram_scan_cols, TILEMAP_TRANSPARENT, 16, 16, 32, 32 );
588   fg_tilemap = tilemap_create( get_fg_tile_info, fgvideoram_scan_cols, TILEMAP_TRANSPARENT,  8,  8, 32, 32 );
586   bg_tilemap_l = tilemap_create( get_bg_l_tile_info, bgvideoram_scan_cols, TILEMAP_TYPE_TRANSPARENT, 16, 16, 32, 32 );
587   bg_tilemap_r = tilemap_create( get_bg_r_tile_info, bgvideoram_scan_cols, TILEMAP_TYPE_TRANSPARENT, 16, 16, 32, 32 );
588   fg_tilemap = tilemap_create( get_fg_tile_info, fgvideoram_scan_cols, TILEMAP_TYPE_TRANSPARENT,  8,  8, 32, 32 );
589589
590590   tilemap_set_transparent_pen( bg_tilemap_l, 0 );
591591   tilemap_set_transparent_pen( bg_tilemap_r, 0 );
src/mame/video/mystwarr.c
r778r779
180180   K053936_wraparound_enable(0, 1);
181181   K053936GP_set_offset(0, -10,  0); // floor tiles in demo loop2 (Elaine vs. boss)
182182
183   ult_936_tilemap = tilemap_create(get_gai_936_tile_info, tilemap_scan_rows, TILEMAP_TRANSPARENT, 16, 16, 512, 512);
183   ult_936_tilemap = tilemap_create(get_gai_936_tile_info, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 16, 16, 512, 512);
184184   tilemap_set_transparent_pen(ult_936_tilemap, 0);
185185}
186186
r778r779
224224   K053936_wraparound_enable(0, 1);
225225   K053936GP_set_offset(0, -8, 0); // Brainy's laser
226226
227   ult_936_tilemap = tilemap_create(get_ult_936_tile_info, tilemap_scan_rows, TILEMAP_TRANSPARENT, 16, 16, 512, 512);
227   ult_936_tilemap = tilemap_create(get_ult_936_tile_info, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 16, 16, 512, 512);
228228   tilemap_set_transparent_pen(ult_936_tilemap, 0);
229229}
230230
src/mame/video/fromance.c
r778r779
7676VIDEO_START( fromance )
7777{
7878   /* allocate tilemaps */
79   bg_tilemap = tilemap_create(get_fromance_bg_tile_info, tilemap_scan_rows, TILEMAP_OPAQUE,      8,4, 64,64);
80   fg_tilemap = tilemap_create(get_fromance_fg_tile_info, tilemap_scan_rows, TILEMAP_TRANSPARENT, 8,4, 64,64);
79   bg_tilemap = tilemap_create(get_fromance_bg_tile_info, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE,      8,4, 64,64);
80   fg_tilemap = tilemap_create(get_fromance_fg_tile_info, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 8,4, 64,64);
8181
8282   /* allocate local videoram */
8383   local_videoram[0] = auto_malloc(0x1000 * 3);
r778r779
115115VIDEO_START( nekkyoku )
116116{
117117   /* allocate tilemaps */
118   bg_tilemap = tilemap_create(get_nekkyoku_bg_tile_info, tilemap_scan_rows, TILEMAP_OPAQUE,      8,4, 64,64);
119   fg_tilemap = tilemap_create(get_nekkyoku_fg_tile_info, tilemap_scan_rows, TILEMAP_TRANSPARENT, 8,4, 64,64);
118   bg_tilemap = tilemap_create(get_nekkyoku_bg_tile_info, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE,      8,4, 64,64);
119   fg_tilemap = tilemap_create(get_nekkyoku_fg_tile_info, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 8,4, 64,64);
120120
121121   /* allocate local videoram */
122122   local_videoram[0] = auto_malloc(0x1000 * 3);
src/mame/video/skykid.c
r778r779
127127
128128VIDEO_START( skykid )
129129{
130   tx_tilemap = tilemap_create(tx_get_tile_info,tx_tilemap_scan,  TILEMAP_TRANSPARENT,8,8,36,28);
131   bg_tilemap = tilemap_create(bg_get_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,     8,8,64,32);
130   tx_tilemap = tilemap_create(tx_get_tile_info,tx_tilemap_scan,  TILEMAP_TYPE_TRANSPARENT,8,8,36,28);
131   bg_tilemap = tilemap_create(bg_get_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,     8,8,64,32);
132132
133133   tilemap_set_transparent_pen(tx_tilemap, 0);
134134
src/mame/video/klax.c
r778r779
7373   };
7474
7575   /* initialize the playfield */
76   atarigen_playfield_tilemap = tilemap_create(get_playfield_tile_info, tilemap_scan_cols, TILEMAP_OPAQUE, 8,8, 64,32);
76   atarigen_playfield_tilemap = tilemap_create(get_playfield_tile_info, tilemap_scan_cols, TILEMAP_TYPE_OPAQUE, 8,8, 64,32);
7777
7878   /* initialize the motion objects */
7979   atarimo_init(machine, 0, &modesc);
src/mame/video/quizpani.c
r778r779
7373
7474VIDEO_START( quizpani )
7575{
76   bg_tilemap  = tilemap_create(bg_tile_info, bg_scan,TILEMAP_OPAQUE,16,16,256,32);
77   txt_tilemap = tilemap_create(txt_tile_info,bg_scan,TILEMAP_TRANSPARENT,16,16,256,32);
76   bg_tilemap  = tilemap_create(bg_tile_info, bg_scan,TILEMAP_TYPE_OPAQUE,16,16,256,32);
77   txt_tilemap = tilemap_create(txt_tile_info,bg_scan,TILEMAP_TYPE_TRANSPARENT,16,16,256,32);
7878   tilemap_set_transparent_pen(txt_tilemap,15);
7979}
8080
src/mame/video/gomoku.c
r778r779
121121
122122   gomoku_bg_bitmap = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format);
123123
124   fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,32, 32);
124   fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,32, 32);
125125
126126   tilemap_set_transparent_pen(fg_tilemap,0);
127127
src/mame/video/firetrk.c
r778r779
296296   helper1 = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format);
297297   helper2 = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, machine->screen[0].format);
298298
299   tilemap1 = tilemap_create(get_tile_info1, get_memory_offset, TILEMAP_OPAQUE, 16, 16, 16, 16);
300   tilemap2 = tilemap_create(get_tile_info2, get_memory_offset, TILEMAP_OPAQUE, 16, 16, 16, 16);
299   tilemap1 = tilemap_create(get_tile_info1, get_memory_offset, TILEMAP_TYPE_OPAQUE, 16, 16, 16, 16);
300   tilemap2 = tilemap_create(get_tile_info2, get_memory_offset, TILEMAP_TYPE_OPAQUE, 16, 16, 16, 16);
301301
302302   memset(&car[0], 0, sizeof (struct sprite_data));
303303   memset(&car[1], 0, sizeof (struct sprite_data));
src/mame/video/mustache.c
r778r779
8989VIDEO_START( mustache )
9090{
9191   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows_flip_x,
92      TILEMAP_OPAQUE, 8, 8, 64, 32);
92      TILEMAP_TYPE_OPAQUE, 8, 8, 64, 32);
9393
9494   tilemap_set_scroll_rows(bg_tilemap, 4);
9595}
src/mame/video/konamigx.c
r778r779
273273
274274   _gxcommoninit(machine);
275275
276   gx_psac_tilemap = tilemap_create(get_gx_psac3_tile_info, tilemap_scan_rows, TILEMAP_TRANSPARENT, 16, 16, 256, 1024);
276   gx_psac_tilemap = tilemap_create(get_gx_psac3_tile_info, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 16, 16, 256, 1024);
277277   gx_rozenable = 1;
278278
279279   K053936_wraparound_enable(0, 1);
r778r779
286286
287287   _gxcommoninit(machine);
288288
289   gx_psac_tilemap = tilemap_create(get_gx_psac_tile_info, tilemap_scan_rows, TILEMAP_TRANSPARENT, 16, 16, 128, 128);
289   gx_psac_tilemap = tilemap_create(get_gx_psac_tile_info, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 16, 16, 128, 128);
290290   gx_rozenable = 1;
291291
292292   K053936_wraparound_enable(0, 0);
r778r779
321321   K056832_set_LayerOffset(2,  2+1, 0);
322322   K056832_set_LayerOffset(3,  3+1, 0);
323323
324   gx_psac_tilemap = tilemap_create(get_gx_psac1a_tile_info, tilemap_scan_rows, TILEMAP_TRANSPARENT, 16, 16, 128, 128);
325   gx_psac_tilemap2 = tilemap_create(get_gx_psac1b_tile_info, tilemap_scan_rows, TILEMAP_TRANSPARENT, 16, 16, 128, 128);
324   gx_psac_tilemap = tilemap_create(get_gx_psac1a_tile_info, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 16, 16, 128, 128);
325   gx_psac_tilemap2 = tilemap_create(get_gx_psac1b_tile_info, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 16, 16, 128, 128);
326326   tilemap_set_transparent_pen(gx_psac_tilemap, 0);
327327   tilemap_set_transparent_pen(gx_psac_tilemap2, 0);
328328
r778r779
341341   K056832_set_LayerOffset(2,  2+1, 0);
342342   K056832_set_LayerOffset(3,  3+1, 0);
343343
344   gx_psac_tilemap = tilemap_create(get_gx_psac1a_tile_info, tilemap_scan_rows, TILEMAP_TRANSPARENT, 16, 16, 128, 128);
345   gx_psac_tilemap2 = tilemap_create(get_gx_psac1b_tile_info, tilemap_scan_rows, TILEMAP_TRANSPARENT, 16, 16, 128, 128);
344   gx_psac_tilemap = tilemap_create(get_gx_psac1a_tile_info, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 16, 16, 128, 128);
345   gx_psac_tilemap2 = tilemap_create(get_gx_psac1b_tile_info, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 16, 16, 128, 128);
346346   tilemap_set_transparent_pen(gx_psac_tilemap, 0);
347347   tilemap_set_transparent_pen(gx_psac_tilemap2, 0);
348348
src/mame/video/sprcros2.c
r778r779
108108
109109VIDEO_START( sprcros2 )
110110{
111   sprcros2_bgtilemap = tilemap_create( get_sprcros2_bgtile_info,tilemap_scan_rows,TILEMAP_OPAQUE,8,8,32,32 );
112   sprcros2_fgtilemap = tilemap_create( get_sprcros2_fgtile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT_COLOR,8,8,32,32 );
111   sprcros2_bgtilemap = tilemap_create( get_sprcros2_bgtile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,8,8,32,32 );
112   sprcros2_fgtilemap = tilemap_create( get_sprcros2_fgtile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT_COLOR,8,8,32,32 );
113113
114114   tilemap_set_transparent_pen(sprcros2_fgtilemap,0);
115115}
src/mame/video/thunderj.c
r778r779
105105   };
106106
107107   /* initialize the playfield */
108   atarigen_playfield_tilemap = tilemap_create(get_playfield_tile_info, tilemap_scan_cols, TILEMAP_OPAQUE, 8,8, 64,64);
108   atarigen_playfield_tilemap = tilemap_create(get_playfield_tile_info, tilemap_scan_cols, TILEMAP_TYPE_OPAQUE, 8,8, 64,64);
109109
110110   /* initialize the second playfield */
111   atarigen_playfield2_tilemap = tilemap_create(get_playfield2_tile_info, tilemap_scan_cols, TILEMAP_TRANSPARENT, 8,8, 64,64);
111   atarigen_playfield2_tilemap = tilemap_create(get_playfield2_tile_info, tilemap_scan_cols, TILEMAP_TYPE_TRANSPARENT, 8,8, 64,64);
112112   tilemap_set_transparent_pen(atarigen_playfield2_tilemap, 0);
113113
114114   /* initialize the motion objects */
115115   atarimo_init(machine, 0, &modesc);
116116
117117   /* initialize the alphanumerics */
118   atarigen_alpha_tilemap = tilemap_create(get_alpha_tile_info, tilemap_scan_rows, TILEMAP_TRANSPARENT, 8,8, 64,32);
118   atarigen_alpha_tilemap = tilemap_create(get_alpha_tile_info, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 8,8, 64,32);
119119   tilemap_set_transparent_pen(atarigen_alpha_tilemap, 0);
120120}
121121
src/mame/video/ultraman.c
r778r779
6464   zoom_colorbase[2] = 128;
6565
6666   K051960_vh_start(machine,SPRITEROM_MEM_REGION,NORMAL_PLANE_ORDER,sprite_callback);
67   K051316_vh_start_0(machine,ZOOMROM0_MEM_REGION,4,TILEMAP_TRANSPARENT,0,zoom_callback_0);
68   K051316_vh_start_1(machine,ZOOMROM1_MEM_REGION,4,TILEMAP_TRANSPARENT,0,zoom_callback_1);
69   K051316_vh_start_2(machine,ZOOMROM2_MEM_REGION,4,TILEMAP_OPAQUE,0,zoom_callback_2);
67   K051316_vh_start_0(machine,ZOOMROM0_MEM_REGION,4,TILEMAP_TYPE_TRANSPARENT,0,zoom_callback_0);
68   K051316_vh_start_1(machine,ZOOMROM1_MEM_REGION,4,TILEMAP_TYPE_TRANSPARENT,0,zoom_callback_1);
69   K051316_vh_start_2(machine,ZOOMROM2_MEM_REGION,4,TILEMAP_TYPE_OPAQUE,0,zoom_callback_2);
7070
7171   K051316_set_offset(0, 8, 0);
7272   K051316_set_offset(1, 8, 0);
src/mame/video/ladybug.c
r778r779
326326VIDEO_START( ladybug )
327327{
328328   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows,
329      TILEMAP_OPAQUE, 8, 8, 32, 32);
329      TILEMAP_TYPE_OPAQUE, 8, 8, 32, 32);
330330
331331   tilemap_set_scroll_rows(bg_tilemap, 32);
332332}
r778r779
334334VIDEO_START( sraider )
335335{
336336   grid_tilemap = tilemap_create(get_grid_tile_info, tilemap_scan_rows,
337      TILEMAP_TRANSPARENT, 8, 8, 32, 32);
337      TILEMAP_TYPE_TRANSPARENT, 8, 8, 32, 32);
338338
339339   tilemap_set_scroll_rows(grid_tilemap, 32);
340340
341341   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows,
342      TILEMAP_TRANSPARENT, 8, 8, 32, 32);
342      TILEMAP_TYPE_TRANSPARENT, 8, 8, 32, 32);
343343
344344   tilemap_set_scroll_rows(bg_tilemap, 32);
345345
src/mame/video/combatsc.c
r778r779
224224{
225225   combasc_vreg = -1;
226226
227   bg_tilemap[0] = tilemap_create(get_tile_info0,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,32,32);
228   bg_tilemap[1] = tilemap_create(get_tile_info1,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,32,32);
229   textlayer =  tilemap_create(get_text_info, tilemap_scan_rows,TILEMAP_OPAQUE,     8,8,32,32);
227   bg_tilemap[0] = tilemap_create(get_tile_info0,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,32,32);
228   bg_tilemap[1] = tilemap_create(get_tile_info1,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,32,32);
229   textlayer =  tilemap_create(get_text_info, tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,     8,8,32,32);
230230
231231   private_spriteram[0] = auto_malloc(0x800);
232232   private_spriteram[1] = auto_malloc(0x800);
r778r779
244244{
245245   combasc_vreg = -1;
246246
247   bg_tilemap[0] = tilemap_create(get_tile_info0_bootleg,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,32,32);
248   bg_tilemap[1] = tilemap_create(get_tile_info1_bootleg,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,32,32);
249   textlayer =  tilemap_create(get_text_info_bootleg, tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,32,32);
247   bg_tilemap[0] = tilemap_create(get_tile_info0_bootleg,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,32,32);
248   bg_tilemap[1] = tilemap_create(get_tile_info1_bootleg,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,32,32);
249   textlayer =  tilemap_create(get_text_info_bootleg, tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,32,32);
250250
251251   private_spriteram[0] = auto_malloc(0x800);
252252   private_spriteram[1] = auto_malloc(0x800);
src/mame/video/blueprnt.c
r778r779
8282VIDEO_START( blueprnt )
8383{
8484   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_cols_flip_x,
85      TILEMAP_TRANSPARENT, 8, 8, 32, 32);
85      TILEMAP_TYPE_TRANSPARENT, 8, 8, 32, 32);
8686
8787   tilemap_set_transparent_pen(bg_tilemap, 0);
8888   tilemap_set_scroll_cols(bg_tilemap, 32);
src/mame/video/gotcha.c
r778r779
3939
4040VIDEO_START( gotcha )
4141{
42   fg_tilemap = tilemap_create(fg_get_tile_info,gotcha_tilemap_scan,TILEMAP_TRANSPARENT,16,16,64,32);
43   bg_tilemap = tilemap_create(bg_get_tile_info,gotcha_tilemap_scan,TILEMAP_OPAQUE,     16,16,64,32);
42   fg_tilemap = tilemap_create(fg_get_tile_info,gotcha_tilemap_scan,TILEMAP_TYPE_TRANSPARENT,16,16,64,32);
43   bg_tilemap = tilemap_create(bg_get_tile_info,gotcha_tilemap_scan,TILEMAP_TYPE_OPAQUE,     16,16,64,32);
4444
4545   tilemap_set_transparent_pen(fg_tilemap,0);
4646
src/mame/video/starshp1.c
r778r779
5757
5858   int i;
5959
60   bg_tilemap = tilemap_create(get_tile_info, get_memory_offset, TILEMAP_TRANSPARENT, 16, 8, 32, 32);
60   bg_tilemap = tilemap_create(get_tile_info, get_memory_offset, TILEMAP_TYPE_TRANSPARENT, 16, 8, 32, 32);
6161
6262   tilemap_set_transparent_pen(bg_tilemap, 0);
6363
src/mame/video/pandoras.c
r778r779
9090
9191VIDEO_START( pandoras )
9292{
93   layer0 = tilemap_create(get_tile_info0,tilemap_scan_rows,TILEMAP_OPAQUE,8,8,32,32);
93   layer0 = tilemap_create(get_tile_info0,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,8,8,32,32);
9494}
9595
9696/***************************************************************************
src/mame/video/bigstrkb.c
r778r779
115115
116116VIDEO_START(bigstrkb)
117117{
118   bsb_tilemap = tilemap_create(get_bsb_tile_info,tilemap_scan_cols,TILEMAP_TRANSPARENT, 8, 8,64,32);
119   bsb_tilemap2 = tilemap_create(get_bsb_tile2_info,bsb_bg_scan,TILEMAP_OPAQUE, 16, 16,128,64);
120   bsb_tilemap3 = tilemap_create(get_bsb_tile3_info,bsb_bg_scan,TILEMAP_TRANSPARENT, 16, 16,128,64);
118   bsb_tilemap = tilemap_create(get_bsb_tile_info,tilemap_scan_cols,TILEMAP_TYPE_TRANSPARENT, 8, 8,64,32);
119   bsb_tilemap2 = tilemap_create(get_bsb_tile2_info,bsb_bg_scan,TILEMAP_TYPE_OPAQUE, 16, 16,128,64);
120   bsb_tilemap3 = tilemap_create(get_bsb_tile3_info,bsb_bg_scan,TILEMAP_TYPE_TRANSPARENT, 16, 16,128,64);
121121
122122   tilemap_set_transparent_pen(bsb_tilemap,15);
123123//  tilemap_set_transparent_pen(bsb_tilemap2,15);
src/mame/video/gberet.c
r778r779
108108VIDEO_START( gberet )
109109{
110110   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows,
111      TILEMAP_TRANSPARENT_COLOR, 8, 8, 64, 32);
111      TILEMAP_TYPE_TRANSPARENT_COLOR, 8, 8, 64, 32);
112112
113113   tilemap_set_transparent_pen(bg_tilemap, 0x10);
114114   tilemap_set_scroll_rows(bg_tilemap, 32);
src/mame/video/stfight.c
r778r779
152152
153153VIDEO_START( stfight )
154154{
155   bg_tilemap = tilemap_create(get_bg_tile_info,bg_scan,TILEMAP_OPAQUE,     16,16,128,256);
156   fg_tilemap = tilemap_create(get_fg_tile_info,fg_scan,TILEMAP_TRANSPARENT,16,16,128,256);
155   bg_tilemap = tilemap_create(get_bg_tile_info,bg_scan,TILEMAP_TYPE_OPAQUE,     16,16,128,256);
156   fg_tilemap = tilemap_create(get_fg_tile_info,fg_scan,TILEMAP_TYPE_TRANSPARENT,16,16,128,256);
157157   tx_tilemap = tilemap_create(get_tx_tile_info,tilemap_scan_rows,
158         TILEMAP_TRANSPARENT_COLOR,8,8,32,32);
158         TILEMAP_TYPE_TRANSPARENT_COLOR,8,8,32,32);
159159
160160   tilemap_set_transparent_pen(fg_tilemap,0x0F);
161161   tilemap_set_transparent_pen(tx_tilemap,256);
src/mame/video/gottlieb.c
r778r779
158158static void gottlieb_video_start_common(void)
159159{
160160   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows,
161      TILEMAP_TRANSPARENT, 8, 8, 32, 32);
161      TILEMAP_TYPE_TRANSPARENT, 8, 8, 32, 32);
162162
163163   tilemap_set_transparent_pen(bg_tilemap, 0);
164164}
src/mame/video/ddragon.c
r778r779
105105
106106VIDEO_START( ddragon )
107107{
108   bg_tilemap = tilemap_create(get_bg_tile_info,background_scan,  TILEMAP_OPAQUE,     16,16,32,32);
109   fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT, 8, 8,32,32);
108   bg_tilemap = tilemap_create(get_bg_tile_info,background_scan,  TILEMAP_TYPE_OPAQUE,     16,16,32,32);
109   fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 8, 8,32,32);
110110
111111   tilemap_set_transparent_pen(fg_tilemap,0);
112112}
113113
114114VIDEO_START( chinagat )
115115{
116   bg_tilemap = tilemap_create(get_bg_tile_info,background_scan,  TILEMAP_OPAQUE,     16,16,32,32);
117   fg_tilemap = tilemap_create(get_fg_16color_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT, 8, 8,32,32);
116   bg_tilemap = tilemap_create(get_bg_tile_info,background_scan,  TILEMAP_TYPE_OPAQUE,     16,16,32,32);
117   fg_tilemap = tilemap_create(get_fg_16color_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 8, 8,32,32);
118118
119119   tilemap_set_transparent_pen(fg_tilemap,0);
120120}
src/mame/video/tubep.c
r778r779
650650   }
651651}
652652
653VIDEO_EOF( tubep_eof )
653VIDEO_EOF( tubep )
654654{
655655   /* clear displayed frame */
656656   memset(spritemap+DISP*256*256, 0x0f, 256*256);
src/mame/video/homedata.c
r778r779
502502
503503VIDEO_START( mrokumei )
504504{
505   bg_tilemap[0][0] = tilemap_create( mrokumei_get_info0_0, tilemap_scan_rows, TILEMAP_OPAQUE,      8, 8, 64,32 );
506   bg_tilemap[0][1] = tilemap_create( mrokumei_get_info0_1, tilemap_scan_rows, TILEMAP_TRANSPARENT, 8, 8, 64,32 );
507   bg_tilemap[1][0] = tilemap_create( mrokumei_get_info1_0, tilemap_scan_rows, TILEMAP_OPAQUE,      8, 8, 64,32 );
508   bg_tilemap[1][1] = tilemap_create( mrokumei_get_info1_1, tilemap_scan_rows, TILEMAP_TRANSPARENT, 8, 8, 64,32 );
505   bg_tilemap[0][0] = tilemap_create( mrokumei_get_info0_0, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE,      8, 8, 64,32 );
506   bg_tilemap[0][1] = tilemap_create( mrokumei_get_info0_1, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 8, 8, 64,32 );
507   bg_tilemap[1][0] = tilemap_create( mrokumei_get_info1_0, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE,      8, 8, 64,32 );
508   bg_tilemap[1][1] = tilemap_create( mrokumei_get_info1_1, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 8, 8, 64,32 );
509509
510510   tilemap_set_transparent_pen(bg_tilemap[0][1],0);
511511   tilemap_set_transparent_pen(bg_tilemap[1][1],0);
r778r779
513513
514514VIDEO_START( reikaids )
515515{
516   bg_tilemap[0][0] = tilemap_create( reikaids_get_info0_0, tilemap_scan_rows, TILEMAP_TRANSPARENT, 8, 8, 32, 32 );
517   bg_tilemap[0][1] = tilemap_create( reikaids_get_info0_1, tilemap_scan_rows, TILEMAP_TRANSPARENT, 8, 8, 32, 32 );
518   bg_tilemap[0][2] = tilemap_create( reikaids_get_info0_2, tilemap_scan_rows, TILEMAP_TRANSPARENT, 8, 8, 32, 32 );
519   bg_tilemap[0][3] = tilemap_create( reikaids_get_info0_3, tilemap_scan_rows, TILEMAP_TRANSPARENT, 8, 8, 32, 32 );
520   bg_tilemap[1][0] = tilemap_create( reikaids_get_info1_0, tilemap_scan_rows, TILEMAP_TRANSPARENT, 8, 8, 32, 32 );
521   bg_tilemap[1][1] = tilemap_create( reikaids_get_info1_1, tilemap_scan_rows, TILEMAP_TRANSPARENT, 8, 8, 32, 32 );
522   bg_tilemap[1][2] = tilemap_create( reikaids_get_info1_2, tilemap_scan_rows, TILEMAP_TRANSPARENT, 8, 8, 32, 32 );
523   bg_tilemap[1][3] = tilemap_create( reikaids_get_info1_3, tilemap_scan_rows, TILEMAP_TRANSPARENT, 8, 8, 32, 32 );
516   bg_tilemap[0][0] = tilemap_create( reikaids_get_info0_0, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 8, 8, 32, 32 );
517   bg_tilemap[0][1] = tilemap_create( reikaids_get_info0_1, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 8, 8, 32, 32 );
518   bg_tilemap[0][2] = tilemap_create( reikaids_get_info0_2, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 8, 8, 32, 32 );
519   bg_tilemap[0][3] = tilemap_create( reikaids_get_info0_3, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 8, 8, 32, 32 );
520   bg_tilemap[1][0] = tilemap_create( reikaids_get_info1_0, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 8, 8, 32, 32 );
521   bg_tilemap[1][1] = tilemap_create( reikaids_get_info1_1, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 8, 8, 32, 32 );
522   bg_tilemap[1][2] = tilemap_create( reikaids_get_info1_2, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 8, 8, 32, 32 );
523   bg_tilemap[1][3] = tilemap_create( reikaids_get_info1_3, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 8, 8, 32, 32 );
524524
525525   tilemap_set_transparent_pen(bg_tilemap[0][0],0xff);
526526   tilemap_set_transparent_pen(bg_tilemap[0][1],0xff);
r778r779
534534
535535VIDEO_START( pteacher )
536536{
537   bg_tilemap[0][0] = tilemap_create( pteacher_get_info0_0, tilemap_scan_rows, TILEMAP_OPAQUE,      8, 8, 64,32 );
538   bg_tilemap[0][1] = tilemap_create( pteacher_get_info0_1, tilemap_scan_rows, TILEMAP_TRANSPARENT, 8, 8, 64,32 );
539   bg_tilemap[1][0] = tilemap_create( pteacher_get_info1_0, tilemap_scan_rows, TILEMAP_OPAQUE,      8, 8, 64,32 );
540   bg_tilemap[1][1] = tilemap_create( pteacher_get_info1_1, tilemap_scan_rows, TILEMAP_TRANSPARENT, 8, 8, 64,32 );
537   bg_tilemap[0][0] = tilemap_create( pteacher_get_info0_0, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE,      8, 8, 64,32 );
538   bg_tilemap[0][1] = tilemap_create( pteacher_get_info0_1, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 8, 8, 64,32 );
539   bg_tilemap[1][0] = tilemap_create( pteacher_get_info1_0, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE,      8, 8, 64,32 );
540   bg_tilemap[1][1] = tilemap_create( pteacher_get_info1_1, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 8, 8, 64,32 );
541541
542542   tilemap_set_transparent_pen(bg_tilemap[0][1],0xff);
543543   tilemap_set_transparent_pen(bg_tilemap[1][1],0xff);
r778r779
545545
546546VIDEO_START( lemnangl )
547547{
548   bg_tilemap[0][0] = tilemap_create( lemnangl_get_info0_0, tilemap_scan_rows, TILEMAP_OPAQUE,      8, 8, 64,32 );
549   bg_tilemap[0][1] = tilemap_create( lemnangl_get_info0_1, tilemap_scan_rows, TILEMAP_TRANSPARENT, 8, 8, 64,32 );
550   bg_tilemap[1][0] = tilemap_create( lemnangl_get_info1_0, tilemap_scan_rows, TILEMAP_OPAQUE,      8, 8, 64,32 );
551   bg_tilemap[1][1] = tilemap_create( lemnangl_get_info1_1, tilemap_scan_rows, TILEMAP_TRANSPARENT, 8, 8, 64,32 );
548   bg_tilemap[0][0] = tilemap_create( lemnangl_get_info0_0, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE,      8, 8, 64,32 );
549   bg_tilemap[0][1] = tilemap_create( lemnangl_get_info0_1, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 8, 8, 64,32 );
550   bg_tilemap[1][0] = tilemap_create( lemnangl_get_info1_0, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE,      8, 8, 64,32 );
551   bg_tilemap[1][1] = tilemap_create( lemnangl_get_info1_1, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 8, 8, 64,32 );
552552
553553   tilemap_set_transparent_pen(bg_tilemap[0][1],0x0f);
554554   tilemap_set_transparent_pen(bg_tilemap[1][1],0x0f);
src/mame/video/mugsmash.c
r778r779
140140VIDEO_START( mugsmash )
141141{
142142
143   mugsmash_tilemap1 = tilemap_create(get_mugsmash_tile_info1,tilemap_scan_rows,TILEMAP_TRANSPARENT, 16, 16,32,32);
143   mugsmash_tilemap1 = tilemap_create(get_mugsmash_tile_info1,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 16, 16,32,32);
144144   tilemap_set_transparent_pen(mugsmash_tilemap1,0);
145145
146   mugsmash_tilemap2 = tilemap_create(get_mugsmash_tile_info2,tilemap_scan_rows,TILEMAP_OPAQUE, 16, 16,32,32);
146   mugsmash_tilemap2 = tilemap_create(get_mugsmash_tile_info2,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE, 16, 16,32,32);
147147}
148148
149149VIDEO_UPDATE( mugsmash )
src/mame/video/pcktgal.c
r778r779
5656VIDEO_START( pcktgal )
5757{
5858   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows,
59      TILEMAP_OPAQUE, 8, 8, 32, 32);
59      TILEMAP_TYPE_OPAQUE, 8, 8, 32, 32);
6060}
6161
6262static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect)
src/mame/video/hng64.c
r778r779
12531253        tilemap2Offset = hng64_videoregs[0xc] ;
12541254
12551255        tilemap_dispose(hng64_tilemap1) ;
1256        hng64_tilemap1 = tilemap_create(get_hng64_tile2_info,tilemap_scan_rows,TILEMAP_TRANSPARENT, 16, 16, 128,128); // 128x128x4 = 0x10000
1256        hng64_tilemap1 = tilemap_create(get_hng64_tile2_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 16, 16, 128,128); // 128x128x4 = 0x10000
12571257    }
12581258    */
12591259
r778r779
12961296
12971297VIDEO_START( hng64 )
12981298{
1299   hng64_tilemap0 = tilemap_create(get_hng64_tile0_info, tilemap_scan_rows, TILEMAP_TRANSPARENT, 8,   8, 128,128); /* 128x128x4 = 0x10000 */
1300   hng64_tilemap1 = tilemap_create(get_hng64_tile1_info, tilemap_scan_rows, TILEMAP_TRANSPARENT, 16, 16, 128,128); /* 128x128x4 = 0x10000 */
1301   hng64_tilemap2 = tilemap_create(get_hng64_tile2_info, tilemap_scan_rows, TILEMAP_TRANSPARENT, 16, 16, 128,128); /* 128x128x4 = 0x10000 */
1302   hng64_tilemap3 = tilemap_create(get_hng64_tile3_info, tilemap_scan_rows, TILEMAP_TRANSPARENT, 16, 16, 128,128); /* 128x128x4 = 0x10000 */
1299   hng64_tilemap0 = tilemap_create(get_hng64_tile0_info, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 8,   8, 128,128); /* 128x128x4 = 0x10000 */
1300   hng64_tilemap1 = tilemap_create(get_hng64_tile1_info, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 16, 16, 128,128); /* 128x128x4 = 0x10000 */
1301   hng64_tilemap2 = tilemap_create(get_hng64_tile2_info, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 16, 16, 128,128); /* 128x128x4 = 0x10000 */
1302   hng64_tilemap3 = tilemap_create(get_hng64_tile3_info, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 16, 16, 128,128); /* 128x128x4 = 0x10000 */
13031303   tilemap_set_transparent_pen(hng64_tilemap0,0);
13041304   tilemap_set_transparent_pen(hng64_tilemap1,0);
13051305   tilemap_set_transparent_pen(hng64_tilemap2,0);
src/mame/video/solomon.c
r778r779
6060VIDEO_START( solomon )
6161{
6262   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows,
63      TILEMAP_OPAQUE, 8, 8, 32, 32);
63      TILEMAP_TYPE_OPAQUE, 8, 8, 32, 32);
6464
6565   fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows,
66      TILEMAP_TRANSPARENT, 8, 8, 32, 32);
66      TILEMAP_TYPE_TRANSPARENT, 8, 8, 32, 32);
6767
6868   tilemap_set_transparent_pen(fg_tilemap, 0);
6969}
src/mame/video/macrossp.c
r778r779
152152   memset(spriteram_old,0,spriteram_size);
153153   memset(spriteram_old2,0,spriteram_size);
154154
155   macrossp_text_tilemap = tilemap_create(get_macrossp_text_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,64,64);
156   macrossp_scra_tilemap = tilemap_create(get_macrossp_scra_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,64,64);
157   macrossp_scrb_tilemap = tilemap_create(get_macrossp_scrb_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,64,64);
158   macrossp_scrc_tilemap = tilemap_create(get_macrossp_scrc_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,64,64);
155   macrossp_text_tilemap = tilemap_create(get_macrossp_text_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,64,64);
156   macrossp_scra_tilemap = tilemap_create(get_macrossp_scra_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,64,64);
157   macrossp_scrb_tilemap = tilemap_create(get_macrossp_scrb_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,64,64);
158   macrossp_scrc_tilemap = tilemap_create(get_macrossp_scrc_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,64,64);
159159
160160   tilemap_set_transparent_pen(macrossp_text_tilemap,0);
161161   tilemap_set_transparent_pen(macrossp_scra_tilemap,0);
src/mame/video/gladiatr.c
r778r779
5353
5454VIDEO_START( ppking )
5555{
56   bg_tilemap = tilemap_create(bg_get_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,8,8,32,64);
57   fg_tilemap = tilemap_create(fg_get_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,32,64);
56   bg_tilemap = tilemap_create(bg_get_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,8,8,32,64);
57   fg_tilemap = tilemap_create(fg_get_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,32,64);
5858
5959   tilemap_set_transparent_pen(fg_tilemap,0);
6060
r778r779
6565
6666VIDEO_START( gladiatr )
6767{
68   bg_tilemap = tilemap_create(bg_get_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,8,8,64,32);
69   fg_tilemap = tilemap_create(fg_get_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,64,32);
68   bg_tilemap = tilemap_create(bg_get_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,8,8,64,32);
69   fg_tilemap = tilemap_create(fg_get_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,64,32);
7070
7171   tilemap_set_transparent_pen(fg_tilemap,0);
7272
src/mame/video/goindol.c
r778r779
5858
5959VIDEO_START( goindol )
6060{
61   bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_SPLIT,      8,8,32,32);
62   fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,32,32);
61   bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_SPLIT,      8,8,32,32);
62   fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,32,32);
6363
6464   tilemap_set_transparent_pen(fg_tilemap,0);
6565}
src/mame/video/taito_l.c
r778r779
7575{
7676   int i;
7777
78   bg18_tilemap = tilemap_create(get_bg18_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,64,32);
79   bg19_tilemap = tilemap_create(get_bg19_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,     8,8,64,32);
80   ch1a_tilemap = tilemap_create(get_ch1a_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,64,32);
78   bg18_tilemap = tilemap_create(get_bg18_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,64,32);
79   bg19_tilemap = tilemap_create(get_bg19_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,     8,8,64,32);
80   ch1a_tilemap = tilemap_create(get_ch1a_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,64,32);
8181
8282   bankc[0] = bankc[1] = bankc[2] = bankc[3] = 0;
8383   horshoes_gfxbank = 0;
src/mame/video/fastlane.c
r778r779
8383
8484VIDEO_START( fastlane )
8585{
86   layer0 = tilemap_create(get_tile_info0,tilemap_scan_rows,TILEMAP_OPAQUE,8,8,32,32);
87   layer1 = tilemap_create(get_tile_info1,tilemap_scan_rows,TILEMAP_OPAQUE,8,8,32,32);
86   layer0 = tilemap_create(get_tile_info0,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,8,8,32,32);
87   layer1 = tilemap_create(get_tile_info1,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,8,8,32,32);
8888
8989   tilemap_set_scroll_rows( layer0, 32 );
9090
src/mame/video/cabal.c
r778r779
4242
4343VIDEO_START( cabal )
4444{
45   background_layer = tilemap_create(get_back_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,16,16);
46   text_layer       = tilemap_create(get_text_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,  8,8,32,32);
45   background_layer = tilemap_create(get_back_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,16,16);
46   text_layer       = tilemap_create(get_text_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,  8,8,32,32);
4747
4848   tilemap_set_transparent_pen(text_layer,3);
4949   tilemap_set_transparent_pen(background_layer,15);
src/mame/video/suprloco.c
r778r779
9797
9898VIDEO_START( suprloco )
9999{
100   bg_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,8,8,32,32);
100   bg_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,8,8,32,32);
101101
102102   tilemap_set_scroll_rows(bg_tilemap,32);
103103}
src/mame/video/m92.c
r778r779
349349{
350350   pf1_layer = tilemap_create(
351351      get_pf1_tile_info,tilemap_scan_rows,
352      TILEMAP_SPLIT,
352      TILEMAP_TYPE_SPLIT,
353353      8,8,
354354      64,64
355355   );
356356
357357   pf2_layer = tilemap_create(
358358      get_pf2_tile_info,tilemap_scan_rows,
359      TILEMAP_SPLIT,
359      TILEMAP_TYPE_SPLIT,
360360      8,8,
361361      64,64
362362   );
363363
364364   pf3_layer = tilemap_create(
365365      get_pf3_tile_info,tilemap_scan_rows,
366      TILEMAP_SPLIT,
366      TILEMAP_TYPE_SPLIT,
367367      8,8,
368368      64,64
369369   );
370370
371371   pf1_wide_layer = tilemap_create(
372372      get_pf1_wide_tile_info,tilemap_scan_rows,
373      TILEMAP_SPLIT,
373      TILEMAP_TYPE_SPLIT,
374374      8,8,
375375      128,64
376376   );
377377
378378   pf3_wide_layer = tilemap_create(
379379      get_pf3_wide_tile_info,tilemap_scan_rows,
380      TILEMAP_SPLIT,
380      TILEMAP_TYPE_SPLIT,
381381      8,8,
382382      128,64
383383   );
src/mame/video/fcombat.c
r778r779
115115
116116VIDEO_START( fcombat )
117117{
118   bgmap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE, 16, 16,32*8*2,32);
118   bgmap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE, 16, 16,32*8*2,32);
119119   video_start_generic(machine);
120120}
121121
src/mame/video/thoop2.c
r778r779
8888{
8989   int i;
9090
91   pant[0] = tilemap_create(get_tile_info_thoop2_screen0,tilemap_scan_rows,TILEMAP_SPLIT,16,16,32,32);
92   pant[1] = tilemap_create(get_tile_info_thoop2_screen1,tilemap_scan_rows,TILEMAP_SPLIT,16,16,32,32);
91   pant[0] = tilemap_create(get_tile_info_thoop2_screen0,tilemap_scan_rows,TILEMAP_TYPE_SPLIT,16,16,32,32);
92   pant[1] = tilemap_create(get_tile_info_thoop2_screen1,tilemap_scan_rows,TILEMAP_TYPE_SPLIT,16,16,32,32);
9393
9494   tilemap_set_transmask(pant[0],0,0xff01,0x00ff); /* pens 1-7 opaque, pens 0, 8-15 transparent */
9595   tilemap_set_transmask(pant[1],0,0xff01,0x00ff); /* pens 1-7 opaque, pens 0, 8-15 transparent */
src/mame/video/wwfwfest.c
r778r779
224224
225225VIDEO_START( wwfwfest )
226226{
227   fg0_tilemap = tilemap_create(get_fg0_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT, 8, 8,64,32);
228   bg1_tilemap = tilemap_create(get_bg1_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT, 16, 16,32,32);
229   bg0_tilemap = tilemap_create(get_bg0_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT, 16, 16,32,32);
227   fg0_tilemap = tilemap_create(get_fg0_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 8, 8,64,32);
228   bg1_tilemap = tilemap_create(get_bg1_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 16, 16,32,32);
229   bg0_tilemap = tilemap_create(get_bg0_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 16, 16,32,32);
230230
231231   tilemap_set_transparent_pen(fg0_tilemap,0);
232232   tilemap_set_transparent_pen(bg1_tilemap,0);
src/mame/video/marineb.c
r778r779
4949
5050VIDEO_START( marineb )
5151{
52   bg_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,8,8,32,32);
52   bg_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,8,8,32,32);
5353
5454   tilemap_set_scroll_cols(bg_tilemap, 32);
5555}
src/mame/video/timeplt.c
r778r779
114114
115115VIDEO_START( timeplt )
116116{
117   bg_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,8,8,32,32);
117   bg_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,8,8,32,32);
118118
119119   sprite_mux_buffer = auto_malloc(256 * spriteram_size);
120120   sprite_mux_buffer_2 = auto_malloc(256 * spriteram_size);
src/mame/video/atarigx2.c
r778r779
120120   atarigen_blend_gfx(machine, 0, 2, 0x0f, 0x30);
121121
122122   /* initialize the playfield */
123   atarigen_playfield_tilemap = tilemap_create(get_playfield_tile_info, atarigx2_playfield_scan, TILEMAP_OPAQUE, 8,8, 128,64);
123   atarigen_playfield_tilemap = tilemap_create(get_playfield_tile_info, atarigx2_playfield_scan, TILEMAP_TYPE_OPAQUE, 8,8, 128,64);
124124
125125   /* initialize the motion objects */
126126   adjusted_modesc.palettebase = atarigx2_motion_object_base;
r778r779
129129   atarirle_init(0, &adjusted_modesc);
130130
131131   /* initialize the alphanumerics */
132   atarigen_alpha_tilemap = tilemap_create(get_alpha_tile_info, tilemap_scan_rows, TILEMAP_TRANSPARENT, 8,8, 64,32);
132   atarigen_alpha_tilemap = tilemap_create(get_alpha_tile_info, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 8,8, 64,32);
133133   tilemap_set_transparent_pen(atarigen_alpha_tilemap, 0);
134134
135135   /* reset statics */
src/mame/video/fuukifg2.c
r778r779
9797VIDEO_START( fuuki16 )
9898{
9999   tilemap_0 = tilemap_create(   get_tile_info_0, tilemap_scan_rows,
100                        TILEMAP_TRANSPARENT, 16, 16, 64,32);
100                        TILEMAP_TYPE_TRANSPARENT, 16, 16, 64,32);
101101
102102   tilemap_1 = tilemap_create(   get_tile_info_1, tilemap_scan_rows,
103                        TILEMAP_TRANSPARENT, 16, 16, 64,32);
103                        TILEMAP_TYPE_TRANSPARENT, 16, 16, 64,32);
104104
105105   tilemap_2 = tilemap_create(   get_tile_info_2, tilemap_scan_rows,
106                        TILEMAP_TRANSPARENT,  8,  8, 64,32);
106                        TILEMAP_TYPE_TRANSPARENT,  8,  8, 64,32);
107107
108108   tilemap_3 = tilemap_create(   get_tile_info_3, tilemap_scan_rows,
109                        TILEMAP_TRANSPARENT,  8,  8, 64,32);
109                        TILEMAP_TYPE_TRANSPARENT,  8,  8, 64,32);
110110
111111   tilemap_set_transparent_pen(tilemap_0,0x0f);   // 4 bits
112112   tilemap_set_transparent_pen(tilemap_1,0xff);   // 8 bits
src/mame/video/vulgus.c
r778r779
120120
121121VIDEO_START( vulgus )
122122{
123   fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT_COLOR, 8, 8,32,32);
124   bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_cols,TILEMAP_OPAQUE           ,16,16,32,32);
123   fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT_COLOR, 8, 8,32,32);
124   bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_cols,TILEMAP_TYPE_OPAQUE           ,16,16,32,32);
125125
126126   tilemap_set_transparent_pen(fg_tilemap,47);
127127}
src/mame/video/sderby.c
r778r779
9595
9696VIDEO_START( sderby )
9797{
98   sderby_tilemap = tilemap_create(get_sderby_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE, 16, 16,32,32);
99   sderby_md_tilemap = tilemap_create(get_sderby_md_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT, 16, 16,32,32);
98   sderby_tilemap = tilemap_create(get_sderby_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE, 16, 16,32,32);
99   sderby_md_tilemap = tilemap_create(get_sderby_md_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 16, 16,32,32);
100100
101101   tilemap_set_transparent_pen(sderby_md_tilemap,0);
102102
103   sderby_fg_tilemap = tilemap_create(get_sderby_fg_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT, 8, 8,64,32);
103   sderby_fg_tilemap = tilemap_create(get_sderby_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 8, 8,64,32);
104104   tilemap_set_transparent_pen(sderby_fg_tilemap,0);
105105}
106106
src/mame/video/circus.c
r778r779
4848VIDEO_START( circus )
4949{
5050   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows,
51      TILEMAP_OPAQUE, 8, 8, 32, 32);
51      TILEMAP_TYPE_OPAQUE, 8, 8, 32, 32);
5252}
5353
5454static void draw_line(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect, int x1, int y1, int x2, int y2, int dotted)
src/mame/video/zac2650.c
r778r779
140140VIDEO_START( tinvader )
141141{
142142   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows,
143      TILEMAP_OPAQUE, 24, 24, 32, 32);
143      TILEMAP_TYPE_OPAQUE, 24, 24, 32, 32);
144144
145145   spritebitmap = auto_bitmap_alloc(machine->screen[0].width,machine->screen[0].height,machine->screen[0].format);
146146   tmpbitmap = auto_bitmap_alloc(machine->screen[0].width,machine->screen[0].height,machine->screen[0].format);
src/mame/video/vastar.c
r778r779
7272
7373VIDEO_START( vastar )
7474{
75   fg_tilemap  = tilemap_create(get_fg_tile_info, tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,32,32);
76   bg1_tilemap = tilemap_create(get_bg1_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,32,32);
77   bg2_tilemap = tilemap_create(get_bg2_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,32,32);
75   fg_tilemap  = tilemap_create(get_fg_tile_info, tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,32,32);
76   bg1_tilemap = tilemap_create(get_bg1_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,32,32);
77   bg2_tilemap = tilemap_create(get_bg2_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,32,32);
7878
7979   tilemap_set_transparent_pen(fg_tilemap,0);
8080   tilemap_set_transparent_pen(bg1_tilemap,0);
src/mame/video/taotaido.c
r778r779
191191
192192VIDEO_START(taotaido)
193193{
194   bg_tilemap = tilemap_create(taotaido_bg_tile_info,taotaido_tilemap_scan_rows,TILEMAP_OPAQUE,     16,16,128,64);
194   bg_tilemap = tilemap_create(taotaido_bg_tile_info,taotaido_tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,     16,16,128,64);
195195
196196   taotaido_spriteram_old = auto_malloc(0x2000);
197197   taotaido_spriteram_older = auto_malloc(0x2000);
src/mame/video/relief.c
r778r779
8686   atarigen_blend_gfx(machine, 1, 2, 0x0f, 0x10);
8787
8888   /* initialize the playfield */
89   atarigen_playfield_tilemap = tilemap_create(get_playfield_tile_info, tilemap_scan_cols, TILEMAP_OPAQUE, 8,8, 64,64);
89   atarigen_playfield_tilemap = tilemap_create(get_playfield_tile_info, tilemap_scan_cols, TILEMAP_TYPE_OPAQUE, 8,8, 64,64);
9090
9191   /* initialize the second playfield */
92   atarigen_playfield2_tilemap = tilemap_create(get_playfield2_tile_info, tilemap_scan_cols, TILEMAP_TRANSPARENT, 8,8, 64,64);
92   atarigen_playfield2_tilemap = tilemap_create(get_playfield2_tile_info, tilemap_scan_cols, TILEMAP_TYPE_TRANSPARENT, 8,8, 64,64);
9393   tilemap_set_transparent_pen(atarigen_playfield2_tilemap, 0);
9494
9595   /* initialize the motion objects */
src/mame/video/taito_f3.c
r778r779
565565   f3_game_config=pCFG;
566566
567567   if (f3_game_config->extend) {
568      pf1_tilemap = tilemap_create(get_tile_info1,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,64,32);
569      pf2_tilemap = tilemap_create(get_tile_info2,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,64,32);
570      pf3_tilemap = tilemap_create(get_tile_info3,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,64,32);
571      pf4_tilemap = tilemap_create(get_tile_info4,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,64,32);
568      pf1_tilemap = tilemap_create(get_tile_info1,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,64,32);
569      pf2_tilemap = tilemap_create(get_tile_info2,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,64,32);
570      pf3_tilemap = tilemap_create(get_tile_info3,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,64,32);
571      pf4_tilemap = tilemap_create(get_tile_info4,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,64,32);
572572
573573      f3_pf_data_1=f3_pf_data+0x0000;
574574      f3_pf_data_2=f3_pf_data+0x0800;
r778r779
580580      twidth_mask_bit=6;
581581
582582   } else {
583      pf1_tilemap = tilemap_create(get_tile_info1,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,32,32);
584      pf2_tilemap = tilemap_create(get_tile_info2,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,32,32);
585      pf3_tilemap = tilemap_create(get_tile_info3,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,32,32);
586      pf4_tilemap = tilemap_create(get_tile_info4,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,32,32);
583      pf1_tilemap = tilemap_create(get_tile_info1,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,32,32);
584      pf2_tilemap = tilemap_create(get_tile_info2,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,32,32);
585      pf3_tilemap = tilemap_create(get_tile_info3,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,32,32);
586      pf4_tilemap = tilemap_create(get_tile_info4,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,32,32);
587587
588588      f3_pf_data_1=f3_pf_data+0x0000;
589589      f3_pf_data_2=f3_pf_data+0x0400;
r778r779
598598   spriteram32_buffered = (UINT32 *)auto_malloc(0x10000);
599599   spritelist = auto_malloc(0x400 * sizeof(*spritelist));
600600   sprite_end = spritelist;
601   vram_layer = tilemap_create(get_tile_info_vram,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,64,64);
602   pixel_layer = tilemap_create(get_tile_info_pixel,tilemap_scan_cols,TILEMAP_TRANSPARENT,8,8,64,32);
601   vram_layer = tilemap_create(get_tile_info_vram,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,64,64);
602   pixel_layer = tilemap_create(get_tile_info_pixel,tilemap_scan_cols,TILEMAP_TYPE_TRANSPARENT,8,8,64,32);
603603   pivot_dirty = (UINT8 *)auto_malloc(2048);
604604   pf_line_inf = auto_malloc(5 * sizeof(struct f3_playfield_line_inf));
605605   sa_line_inf = auto_malloc(1 * sizeof(struct f3_spritealpha_line_inf));
src/mame/video/gaelco2.c
r778r779
267267   gaelco2_videoram = spriteram16;
268268
269269   /* create tilemaps */
270   pant[0] = tilemap_create(get_tile_info_gaelco2_screen0,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,64,32);
271   pant[1] = tilemap_create(get_tile_info_gaelco2_screen1,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,64,32);
270   pant[0] = tilemap_create(get_tile_info_gaelco2_screen0,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,64,32);
271   pant[1] = tilemap_create(get_tile_info_gaelco2_screen1,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,64,32);
272272
273273   /* set tilemap properties */
274274   tilemap_set_transparent_pen(pant[0],0);
r778r779
287287   gaelco2_videoram = spriteram16;
288288
289289   /* create tilemaps */
290   pant[0] = tilemap_create(get_tile_info_gaelco2_screen0_dual,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,64,32);
291   pant[1] = tilemap_create(get_tile_info_gaelco2_screen1_dual,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,64,32);
290   pant[0] = tilemap_create(get_tile_info_gaelco2_screen0_dual,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,64,32);
291   pant[1] = tilemap_create(get_tile_info_gaelco2_screen1_dual,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,64,32);
292292
293293   /* set tilemap properties */
294294   tilemap_set_transparent_pen(pant[0],0);
src/mame/video/homerun.c
r778r779
6262
6363VIDEO_START(homerun)
6464{
65   homerun_tilemap = tilemap_create(get_homerun_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE, 8, 8,64,64);
65   homerun_tilemap = tilemap_create(get_homerun_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE, 8, 8,64,64);
6666}
6767
6868static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect )
src/mame/video/champbas.c
r778r779
117117VIDEO_START( champbas )
118118{
119119   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows,
120      TILEMAP_OPAQUE, 8, 8, 32, 32);
120      TILEMAP_TYPE_OPAQUE, 8, 8, 32, 32);
121121}
122122
123123static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect)
src/mame/video/baraduke.c
r778r779
119119
120120VIDEO_START( baraduke )
121121{
122   tx_tilemap = tilemap_create(tx_get_tile_info,tx_tilemap_scan,TILEMAP_TRANSPARENT,8,8,36,28);
123   bg_tilemap[0] = tilemap_create(get_tile_info0,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,64,32);
124   bg_tilemap[1] = tilemap_create(get_tile_info1,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,64,32);
122   tx_tilemap = tilemap_create(tx_get_tile_info,tx_tilemap_scan,TILEMAP_TYPE_TRANSPARENT,8,8,36,28);
123   bg_tilemap[0] = tilemap_create(get_tile_info0,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,64,32);
124   bg_tilemap[1] = tilemap_create(get_tile_info1,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,64,32);
125125
126126   tilemap_set_transparent_pen(tx_tilemap,3);
127127   tilemap_set_transparent_pen(bg_tilemap[0],7);
src/mame/video/ssozumo.c
r778r779
131131VIDEO_START( ssozumo )
132132{
133133   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_cols_flip_x,
134      TILEMAP_OPAQUE, 16, 16, 16, 32);
134      TILEMAP_TYPE_OPAQUE, 16, 16, 16, 32);
135135
136136   fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_cols_flip_x,
137      TILEMAP_TRANSPARENT, 8, 8, 32, 32);
137      TILEMAP_TYPE_TRANSPARENT, 8, 8, 32, 32);
138138
139139   tilemap_set_transparent_pen(fg_tilemap, 0);
140140}
src/mame/video/mcr.c
r778r779
9898   switch (mcr_cpu_board)
9999   {
100100      case 90009:
101         bg_tilemap = tilemap_create(mcr_90009_get_tile_info, tilemap_scan_rows, TILEMAP_OPAQUE, 16,16, 32,30);
101         bg_tilemap = tilemap_create(mcr_90009_get_tile_info, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE, 16,16, 32,30);
102102         break;
103103
104104      case 90010:
105         bg_tilemap = tilemap_create(mcr_90010_get_tile_info, tilemap_scan_rows, TILEMAP_OPAQUE, 16,16, 32,30);
105         bg_tilemap = tilemap_create(mcr_90010_get_tile_info, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE, 16,16, 32,30);
106106         break;
107107
108108      case 91475:
109         bg_tilemap = tilemap_create(mcr_90010_get_tile_info, tilemap_scan_rows, TILEMAP_OPAQUE, 16,16, 32,30);
109         bg_tilemap = tilemap_create(mcr_90010_get_tile_info, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE, 16,16, 32,30);
110110         break;
111111
112112      case 91490:
113         bg_tilemap = tilemap_create(mcr_91490_get_tile_info, tilemap_scan_rows, TILEMAP_OPAQUE, 16,16, 32,30);
113         bg_tilemap = tilemap_create(mcr_91490_get_tile_info, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE, 16,16, 32,30);
114114         break;
115115
116116      default:
src/mame/video/m107.c
r778r779
218218{
219219   pf1_layer = tilemap_create(
220220      get_pf1_tile_info,tilemap_scan_rows,
221      TILEMAP_TRANSPARENT,
221      TILEMAP_TYPE_TRANSPARENT,
222222      8,8,
223223      64,64
224224   );
225225
226226   pf2_layer = tilemap_create(
227227      get_pf2_tile_info,tilemap_scan_rows,
228      TILEMAP_TRANSPARENT,
228      TILEMAP_TYPE_TRANSPARENT,
229229      8,8,
230230      64,64
231231   );
232232
233233   pf3_layer = tilemap_create(
234234      get_pf3_tile_info,tilemap_scan_rows,
235      TILEMAP_TRANSPARENT,
235      TILEMAP_TYPE_TRANSPARENT,
236236      8,8,
237237      64,64
238238   );
src/mame/video/arkanoid.c
r778r779
7575VIDEO_START( arkanoid )
7676{
7777   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows,
78      TILEMAP_OPAQUE, 8, 8, 32, 32);
78      TILEMAP_TYPE_OPAQUE, 8, 8, 32, 32);
7979
8080   state_save_register_global(gfxbank);
8181   state_save_register_global(palettebank);
src/mame/video/twin16.c
r778r779
503503VIDEO_START( twin16 )
504504{
505505   fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows_flip_y,
506      TILEMAP_TRANSPARENT, 8, 8, 64, 32);
506      TILEMAP_TYPE_TRANSPARENT, 8, 8, 64, 32);
507507
508508   tilemap_set_transparent_pen(fg_tilemap, 0);
509509}
r778r779
511511VIDEO_START( fround )
512512{
513513   fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows,
514      TILEMAP_TRANSPARENT, 8, 8, 64, 32);
514      TILEMAP_TYPE_TRANSPARENT, 8, 8, 64, 32);
515515
516516   tilemap_set_transparent_pen(fg_tilemap, 0);
517517}
src/mame/video/megasys1.c
r778r779
385385   {
386386      /* 16x16 tilemaps */
387387      megasys1_tilemap[layer][0][0] = tilemap_create(megasys1_get_scroll_tile_info_16x16, megasys1_scan_16x16,
388                        TILEMAP_TRANSPARENT, 8,8, TILES_PER_PAGE_X * 16, TILES_PER_PAGE_Y * 2);
388                        TILEMAP_TYPE_TRANSPARENT, 8,8, TILES_PER_PAGE_X * 16, TILES_PER_PAGE_Y * 2);
389389      megasys1_tilemap[layer][0][1] = tilemap_create(megasys1_get_scroll_tile_info_16x16, megasys1_scan_16x16,
390                        TILEMAP_TRANSPARENT, 8,8, TILES_PER_PAGE_X * 8, TILES_PER_PAGE_Y * 4);
390                        TILEMAP_TYPE_TRANSPARENT, 8,8, TILES_PER_PAGE_X * 8, TILES_PER_PAGE_Y * 4);
391391      megasys1_tilemap[layer][0][2] = tilemap_create(megasys1_get_scroll_tile_info_16x16, megasys1_scan_16x16,
392                        TILEMAP_TRANSPARENT, 8,8, TILES_PER_PAGE_X * 4, TILES_PER_PAGE_Y * 8);
392                        TILEMAP_TYPE_TRANSPARENT, 8,8, TILES_PER_PAGE_X * 4, TILES_PER_PAGE_Y * 8);
393393      megasys1_tilemap[layer][0][3] = tilemap_create(megasys1_get_scroll_tile_info_16x16, megasys1_scan_16x16,
394                        TILEMAP_TRANSPARENT, 8,8, TILES_PER_PAGE_X * 2, TILES_PER_PAGE_Y * 16);
394                        TILEMAP_TYPE_TRANSPARENT, 8,8, TILES_PER_PAGE_X * 2, TILES_PER_PAGE_Y * 16);
395395
396396      /* 8x8 tilemaps */
397397      megasys1_tilemap[layer][1][0] = tilemap_create(megasys1_get_scroll_tile_info_8x8, megasys1_scan_8x8,
398                        TILEMAP_TRANSPARENT, 8,8, TILES_PER_PAGE_X * 8, TILES_PER_PAGE_Y * 1);
398                        TILEMAP_TYPE_TRANSPARENT, 8,8, TILES_PER_PAGE_X * 8, TILES_PER_PAGE_Y * 1);
399399      megasys1_tilemap[layer][1][1] = tilemap_create(megasys1_get_scroll_tile_info_8x8, megasys1_scan_8x8,
400                        TILEMAP_TRANSPARENT, 8,8, TILES_PER_PAGE_X * 4, TILES_PER_PAGE_Y * 2);
400                        TILEMAP_TYPE_TRANSPARENT, 8,8, TILES_PER_PAGE_X * 4, TILES_PER_PAGE_Y * 2);
401401      megasys1_tilemap[layer][1][2] = tilemap_create(megasys1_get_scroll_tile_info_8x8, megasys1_scan_8x8,
402                        TILEMAP_TRANSPARENT, 8,8, TILES_PER_PAGE_X * 4, TILES_PER_PAGE_Y * 2);
402                        TILEMAP_TYPE_TRANSPARENT, 8,8, TILES_PER_PAGE_X * 4, TILES_PER_PAGE_Y * 2);
403403      megasys1_tilemap[layer][1][3] = tilemap_create(megasys1_get_scroll_tile_info_8x8, megasys1_scan_8x8,
404                        TILEMAP_TRANSPARENT, 8,8, TILES_PER_PAGE_X * 2, TILES_PER_PAGE_Y * 4);
404                        TILEMAP_TYPE_TRANSPARENT, 8,8, TILES_PER_PAGE_X * 2, TILES_PER_PAGE_Y * 4);
405405
406406      /* set user data and transparency */
407407      for (i = 0; i < 8; i++)
408408      {
409         tilemap_set_user_data(megasys1_tilemap[layer][i/4][i%4], (void *)layer);
409         tilemap_set_user_data(megasys1_tilemap[layer][i/4][i%4], (void *)(FPTR)layer);
410410         tilemap_set_transparent_pen(megasys1_tilemap[layer][i/4][i%4], 15);
411411      }
412412   }
src/mame/video/crshrace.c
r778r779
4141
4242VIDEO_START( crshrace )
4343{
44   tilemap1 = tilemap_create(get_tile_info1,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,64,64);
45   tilemap2 = tilemap_create(get_tile_info2,tilemap_scan_rows,TILEMAP_TRANSPARENT, 8, 8,64,64);
44   tilemap1 = tilemap_create(get_tile_info1,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,64,64);
45   tilemap2 = tilemap_create(get_tile_info2,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 8, 8,64,64);
4646
4747   K053936_wraparound_enable(0, 1);
4848   K053936_set_offset(0, -48, -21);
src/mame/video/airbustr.c
r778r779
116116VIDEO_START( airbustr )
117117{
118118   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows,
119      TILEMAP_OPAQUE, 16, 16, 32, 32);
119      TILEMAP_TYPE_OPAQUE, 16, 16, 32, 32);
120120
121121   fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows,
122      TILEMAP_TRANSPARENT, 16, 16, 32, 32);
122      TILEMAP_TYPE_TRANSPARENT, 16, 16, 32, 32);
123123
124124   sprites_bitmap = auto_bitmap_alloc(machine->screen[0].width,machine->screen[0].height,machine->screen[0].format);
125125   tilemap_set_transparent_pen(fg_tilemap, 0);
src/mame/video/pacman.c
r778r779
197197   /* one pixel to the left to get a more correct placement */
198198   xoffsethack = 1;
199199
200   bg_tilemap = tilemap_create( pacman_get_tile_info, pacman_scan_rows, TILEMAP_OPAQUE, 8, 8, 36, 28 );
200   bg_tilemap = tilemap_create( pacman_get_tile_info, pacman_scan_rows, TILEMAP_TYPE_OPAQUE, 8, 8, 36, 28 );
201201
202202   tilemap_set_scrolldx( bg_tilemap, 0, 384 - 288 );
203203   tilemap_set_scrolldy( bg_tilemap, 0, 264 - 224 );
r778r779
315315
316316   xoffsethack = 0;
317317
318   bg_tilemap = tilemap_create( pacman_get_tile_info, pacman_scan_rows, TILEMAP_OPAQUE, 8, 8, 36, 28 );
318   bg_tilemap = tilemap_create( pacman_get_tile_info, pacman_scan_rows, TILEMAP_TYPE_OPAQUE, 8, 8, 36, 28 );
319319}
320320
321321WRITE8_HANDLER( pengo_palettebank_w )
r778r779
391391
392392   xoffsethack = 1;
393393
394   bg_tilemap = tilemap_create( s2650_get_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,8,8,32,32 );
394   bg_tilemap = tilemap_create( s2650_get_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,8,8,32,32 );
395395
396396   tilemap_set_scroll_cols(bg_tilemap, 32);
397397}
r778r779
562562
563563   xoffsethack = 1;
564564
565   bg_tilemap = tilemap_create( jrpacman_get_tile_info,jrpacman_scan_rows,TILEMAP_TRANSPARENT,8,8,36,54 );
565   bg_tilemap = tilemap_create( jrpacman_get_tile_info,jrpacman_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,36,54 );
566566
567567   tilemap_set_transparent_pen( bg_tilemap, 0 );
568568   tilemap_set_scroll_cols( bg_tilemap, 36 );
src/mame/video/clshroad.c
r778r779
229229VIDEO_START( firebatl )
230230{
231231   /* These 2 use the graphics and scroll value */
232   tilemap_0a = tilemap_create(get_tile_info_0a,tilemap_scan_rows,TILEMAP_OPAQUE,     16,16,0x20,0x10);
233   tilemap_0b = tilemap_create(get_tile_info_0b,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,0x20,0x10);
232   tilemap_0a = tilemap_create(get_tile_info_0a,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,     16,16,0x20,0x10);
233   tilemap_0b = tilemap_create(get_tile_info_0b,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,0x20,0x10);
234234   /* Text (No scrolling) */
235   tilemap_1  = tilemap_create(get_tile_info_fb1,tilemap_scan_rows_extra,TILEMAP_TRANSPARENT_COLOR,8,8,0x24,0x20);
235   tilemap_1  = tilemap_create(get_tile_info_fb1,tilemap_scan_rows_extra,TILEMAP_TYPE_TRANSPARENT_COLOR,8,8,0x24,0x20);
236236
237237   tilemap_set_scroll_rows( tilemap_0a, 1);
238238   tilemap_set_scroll_rows( tilemap_0b, 1);
r778r779
253253VIDEO_START( clshroad )
254254{
255255   /* These 2 use the graphics and scroll value */
256   tilemap_0a = tilemap_create(get_tile_info_0a,tilemap_scan_rows,TILEMAP_OPAQUE,     16,16,0x20,0x10);
257   tilemap_0b = tilemap_create(get_tile_info_0b,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,0x20,0x10);
256   tilemap_0a = tilemap_create(get_tile_info_0a,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,     16,16,0x20,0x10);
257   tilemap_0b = tilemap_create(get_tile_info_0b,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,0x20,0x10);
258258   /* Text (No scrolling) */
259   tilemap_1  = tilemap_create(get_tile_info_1,tilemap_scan_rows_extra,TILEMAP_TRANSPARENT,8,8,0x24,0x20);
259   tilemap_1  = tilemap_create(get_tile_info_1,tilemap_scan_rows_extra,TILEMAP_TYPE_TRANSPARENT,8,8,0x24,0x20);
260260
261261   tilemap_set_scroll_rows( tilemap_0a, 1);
262262   tilemap_set_scroll_rows( tilemap_0b, 1);
src/mame/video/chqflag.c
r778r779
6161   zoom_colorbase[1] = 0x02;
6262
6363   K051960_vh_start(machine,SPRITEROM_MEM_REGION,NORMAL_PLANE_ORDER,sprite_callback);
64   K051316_vh_start_0(machine,ZOOMROM0_MEM_REGION,4,TILEMAP_TRANSPARENT,0,zoom_callback_0);
65   K051316_vh_start_1(machine,ZOOMROM1_MEM_REGION,8,TILEMAP_SPLIT_PENBIT,0xc0,zoom_callback_1);
64   K051316_vh_start_0(machine,ZOOMROM0_MEM_REGION,4,TILEMAP_TYPE_TRANSPARENT,0,zoom_callback_0);
65   K051316_vh_start_1(machine,ZOOMROM1_MEM_REGION,8,TILEMAP_TYPE_SPLIT_PENBIT,0xc0,zoom_callback_1);
6666
6767   K051316_set_offset(0,7,0);
6868   K051316_wraparound_enable(1,1);
src/mame/video/bwing.c
r778r779
164164// Initializations
165165
166166#define BW_SET_TILE_INFO(GFX, CODE, COLOR) { \
167   tileinfo->tile_number = (CODE); \
168167   tileinfo->pen_data = GFX->gfxdata + (CODE) * GFX->char_modulo; \
169168   tileinfo->pal_data = &GFX->colortable[(COLOR) << 3]; \
170   tileinfo->pen_usage = GFX->pen_usage[(CODE)]; }
169   }
171170
172171static TILE_GET_INFO( get_fgtileinfo )
173172{
r778r779
197196   UINT32 *dwptr;
198197   int i;
199198
200   charmap = tilemap_create(get_charinfo,tilemap_scan_cols,TILEMAP_TRANSPARENT, 8, 8,32,32);
201   fgmap = tilemap_create(get_fgtileinfo,bwing_scan_cols,TILEMAP_TRANSPARENT,16,16,64,64);
202   bgmap = tilemap_create(get_bgtileinfo,bwing_scan_cols,TILEMAP_OPAQUE,16,16,64,64);
199   charmap = tilemap_create(get_charinfo,tilemap_scan_cols,TILEMAP_TYPE_TRANSPARENT, 8, 8,32,32);
200   fgmap = tilemap_create(get_fgtileinfo,bwing_scan_cols,TILEMAP_TYPE_TRANSPARENT,16,16,64,64);
201   bgmap = tilemap_create(get_bgtileinfo,bwing_scan_cols,TILEMAP_TYPE_OPAQUE,16,16,64,64);
203202   srxlat = auto_malloc(0x8000);
204203
205204   scrollmap[0] = fgmap;
src/mame/video/sf.c
r778r779
6060
6161VIDEO_START( sf )
6262{
63   bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_cols,TILEMAP_OPAQUE,     16,16,2048,16);
64   fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_cols,TILEMAP_TRANSPARENT,16,16,2048,16);
65   tx_tilemap = tilemap_create(get_tx_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT, 8, 8,  64,32);
63   bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_cols,TILEMAP_TYPE_OPAQUE,     16,16,2048,16);
64   fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_cols,TILEMAP_TYPE_TRANSPARENT,16,16,2048,16);
65   tx_tilemap = tilemap_create(get_tx_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 8, 8,  64,32);
6666
6767   tilemap_set_transparent_pen(fg_tilemap,15);
6868   tilemap_set_transparent_pen(tx_tilemap,3);
src/mame/video/sengokmj.c
r778r779
105105
106106VIDEO_START( sengokmj )
107107{
108   bg_tilemap = tilemap_create(sengoku_bg_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,     16,16,32,16);
109   md_tilemap = tilemap_create(sengoku_md_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,32,16);
110   fg_tilemap = tilemap_create(sengoku_fg_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,32,16);
111   tx_tilemap = tilemap_create(sengoku_tx_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT, 8, 8,64,32);
108   bg_tilemap = tilemap_create(sengoku_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,     16,16,32,16);
109   md_tilemap = tilemap_create(sengoku_md_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,32,16);
110   fg_tilemap = tilemap_create(sengoku_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,32,16);
111   tx_tilemap = tilemap_create(sengoku_tx_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 8, 8,64,32);
112112
113113   tilemap_set_transparent_pen(md_tilemap,15);
114114   tilemap_set_transparent_pen(fg_tilemap,15);
src/mame/video/cave.c
r778r779
410410   {
411411      case 4:
412412         tilemap_3 = tilemap_create(   get_tile_info_3, tilemap_scan_rows,
413                              TILEMAP_TRANSPARENT, 8,8, 512/8,512/8 );
413                              TILEMAP_TYPE_TRANSPARENT, 8,8, 512/8,512/8 );
414414         tilemap_set_transparent_pen(tilemap_3, 0);
415415         tilemap_set_scroll_rows(tilemap_3, 1);
416416         tilemap_set_scroll_cols(tilemap_3, 1);
417417
418418      case 3:
419419         tilemap_2 = tilemap_create(   get_tile_info_2, tilemap_scan_rows,
420                              TILEMAP_TRANSPARENT, 8,8, 512/8,512/8 );
420                              TILEMAP_TYPE_TRANSPARENT, 8,8, 512/8,512/8 );
421421         tilemap_set_transparent_pen(tilemap_2, 0);
422422         tilemap_set_scroll_rows(tilemap_2, 1);
423423         tilemap_set_scroll_cols(tilemap_2, 1);
424424
425425      case 2:
426426         tilemap_1 = tilemap_create(   get_tile_info_1, tilemap_scan_rows,
427                              TILEMAP_TRANSPARENT, 8,8, 512/8,512/8 );
427                              TILEMAP_TYPE_TRANSPARENT, 8,8, 512/8,512/8 );
428428         tilemap_set_transparent_pen(tilemap_1, 0);
429429         tilemap_set_scroll_rows(tilemap_1, 1);
430430         tilemap_set_scroll_cols(tilemap_1, 1);
431431
432432      case 1:
433433         tilemap_0 = tilemap_create(   get_tile_info_0, tilemap_scan_rows,
434                              TILEMAP_TRANSPARENT, 8,8, 512/8,512/8 );
434                              TILEMAP_TYPE_TRANSPARENT, 8,8, 512/8,512/8 );
435435         tilemap_set_transparent_pen(tilemap_0, 0);
436436         tilemap_set_scroll_rows(tilemap_0, 1);
437437         tilemap_set_scroll_cols(tilemap_0, 1);
r778r779
479479
480480   /* Layer 2 (8x8) needs to be handled differently */
481481   tilemap_2 = tilemap_create(   sailormn_get_tile_info_2, tilemap_scan_rows,
482                        TILEMAP_TRANSPARENT, 8,8, 512/8,512/8 );
482                        TILEMAP_TYPE_TRANSPARENT, 8,8, 512/8,512/8 );
483483   tilemap_set_transparent_pen(tilemap_2, 0);
484484   tilemap_set_scroll_rows(tilemap_2, 1);
485485   tilemap_set_scroll_cols(tilemap_2, 1);
src/mame/video/dooyong.c
r778r779
630630
631631   /* Create tilemaps */
632632   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_cols,
633      TILEMAP_OPAQUE, 32, 32, 32, 8);
633      TILEMAP_TYPE_OPAQUE, 32, 32, 32, 8);
634634   fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_cols,
635      TILEMAP_TRANSPARENT, 32, 32, 32, 8);
635      TILEMAP_TYPE_TRANSPARENT, 32, 32, 32, 8);
636636   tx_tilemap = tilemap_create(get_tx_tile_info, tilemap_scan_cols,
637      TILEMAP_TRANSPARENT, 8, 8, 64, 32);
637      TILEMAP_TYPE_TRANSPARENT, 8, 8, 64, 32);
638638
639639   /* Configure tilemap transparency */
640640   tilemap_set_transparent_pen(fg_tilemap, 15);
r778r779
662662
663663   /* Create tilemaps */
664664   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_cols,
665      TILEMAP_OPAQUE, 32, 32, 32, 8);
665      TILEMAP_TYPE_OPAQUE, 32, 32, 32, 8);
666666   fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_cols,
667      TILEMAP_TRANSPARENT, 32, 32, 32, 8);
667      TILEMAP_TYPE_TRANSPARENT, 32, 32, 32, 8);
668668   tx_tilemap = tilemap_create(get_tx_tile_info, tilemap_scan_cols,
669      TILEMAP_TRANSPARENT, 8, 8, 64, 32);
669      TILEMAP_TYPE_TRANSPARENT, 8, 8, 64, 32);
670670
671671   /* Configure tilemap transparency */
672672   tilemap_set_transparent_pen(fg_tilemap, 15);
r778r779
693693
694694   /* Create tilemaps */
695695   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_cols,
696      TILEMAP_OPAQUE, 32, 32, 32, 8);
696      TILEMAP_TYPE_OPAQUE, 32, 32, 32, 8);
697697   fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_cols,
698      TILEMAP_TRANSPARENT, 32, 32, 32, 8);
698      TILEMAP_TYPE_TRANSPARENT, 32, 32, 32, 8);
699699   tx_tilemap = tilemap_create(get_tx_tile_info, tilemap_scan_cols,
700      TILEMAP_TRANSPARENT, 8, 8, 64, 32);
700      TILEMAP_TYPE_TRANSPARENT, 8, 8, 64, 32);
701701
702702   /* Configure tilemap transparency */
703703   tilemap_set_transparent_pen(fg_tilemap, 15);
r778r779
724724
725725   /* Create tilemaps */
726726   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_cols,
727      TILEMAP_OPAQUE, 32, 32, 32, 8);
727      TILEMAP_TYPE_OPAQUE, 32, 32, 32, 8);
728728   fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_cols,
729      TILEMAP_TRANSPARENT, 32, 32, 32, 8);
729      TILEMAP_TYPE_TRANSPARENT, 32, 32, 32, 8);
730730   fg2_tilemap = tilemap_create(get_fg2_tile_info, tilemap_scan_cols,
731      TILEMAP_TRANSPARENT, 32, 32, 32, 8);
731      TILEMAP_TYPE_TRANSPARENT, 32, 32, 32, 8);
732732   tx_tilemap = tilemap_create(get_tx_tile_info, tilemap_scan_cols,
733      TILEMAP_TRANSPARENT, 8, 8, 64, 32);
733      TILEMAP_TYPE_TRANSPARENT, 8, 8, 64, 32);
734734
735735   /* Configure tilemap transparency */
736736   tilemap_set_transparent_pen(fg_tilemap, 15);
r778r779
756756
757757   /* Create tilemaps */
758758   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_cols,
759      TILEMAP_TRANSPARENT, 32, 32, 32, 8);
759      TILEMAP_TYPE_TRANSPARENT, 32, 32, 32, 8);
760760   fg_tilemap = tilemap_create(flytiger_get_fg_tile_info, tilemap_scan_cols,
761      TILEMAP_TRANSPARENT, 32, 32, 32, 8);
761      TILEMAP_TYPE_TRANSPARENT, 32, 32, 32, 8);
762762   tx_tilemap = tilemap_create(get_tx_tile_info, tilemap_scan_cols,
763      TILEMAP_TRANSPARENT, 8, 8, 64, 32);
763      TILEMAP_TYPE_TRANSPARENT, 8, 8, 64, 32);
764764
765765   /* Configure tilemap transparency */
766766   tilemap_set_transparent_pen(bg_tilemap, 15);
r778r779
789789
790790   /* Create tilemaps */
791791   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_cols,
792      TILEMAP_OPAQUE, 32, 32, 32, 8);
792      TILEMAP_TYPE_OPAQUE, 32, 32, 32, 8);
793793   fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_cols,
794      TILEMAP_TRANSPARENT, 32, 32, 32, 8);
794      TILEMAP_TYPE_TRANSPARENT, 32, 32, 32, 8);
795795   tx_tilemap = tilemap_create(get_tx_tile_info, tilemap_scan_cols,
796      TILEMAP_TRANSPARENT, 8, 8, 64, 32);
796      TILEMAP_TYPE_TRANSPARENT, 8, 8, 64, 32);
797797
798798   /* Configure tilemap transparency */
799799   tilemap_set_transparent_pen(fg_tilemap, 15);
r778r779
823823
824824   /* Create tilemaps */
825825   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_cols,
826      TILEMAP_OPAQUE, 16, 16, 64, 32);
826      TILEMAP_TYPE_OPAQUE, 16, 16, 64, 32);
827827   bg2_tilemap = tilemap_create(get_bg2_tile_info, tilemap_scan_cols,
828      TILEMAP_TRANSPARENT, 16, 16, 64, 32);
828      TILEMAP_TYPE_TRANSPARENT, 16, 16, 64, 32);
829829   fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_cols,
830      TILEMAP_TRANSPARENT, 16, 16, 64, 32);
830      TILEMAP_TYPE_TRANSPARENT, 16, 16, 64, 32);
831831   fg2_tilemap = tilemap_create(get_fg2_tile_info, tilemap_scan_cols,
832      TILEMAP_TRANSPARENT, 16, 16, 64, 32);
832      TILEMAP_TYPE_TRANSPARENT, 16, 16, 64, 32);
833833
834834   /* Configure tilemap transparency */
835835   tilemap_set_transparent_pen(bg2_tilemap, 15);
r778r779
852852
853853   /* Create tilemaps */
854854   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_cols,
855      TILEMAP_OPAQUE, 32, 32, 32, 8);
855      TILEMAP_TYPE_OPAQUE, 32, 32, 32, 8);
856856   bg2_tilemap = fg_tilemap = fg2_tilemap = NULL;   /* Stop scroll handler from crashing on these */
857857
858858   /* Register for save/restore */
src/mame/video/brkthru.c
r778r779
117117
118118VIDEO_START( brkthru )
119119{
120   fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,32,32);
121   bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_cols,TILEMAP_TRANSPARENT,16,16,32,16);
120   fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,32,32);
121   bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_cols,TILEMAP_TYPE_TRANSPARENT,16,16,32,16);
122122
123123   tilemap_set_transparent_pen( fg_tilemap, 0 );
124124   tilemap_set_transparent_pen( bg_tilemap, 0 );
src/mame/video/williams.c
r778r779
209209   state_save_register_global_pointer(williams2_paletteram, 0x400 * 2);
210210
211211   /* create the tilemap */
212   bg_tilemap = tilemap_create(get_tile_info, tilemap_scan_cols, TILEMAP_OPAQUE, 24,16, 128,16);
212   bg_tilemap = tilemap_create(get_tile_info, tilemap_scan_cols, TILEMAP_TYPE_OPAQUE, 24,16, 128,16);
213213   tilemap_set_scrolldx(bg_tilemap, 2, 0);
214214
215215   state_save_register();
src/mame/video/dec8.c
r778r779
508508VIDEO_START( cobracom )
509509{
510510   dec8_pf0_tilemap = tilemap_create(get_bac0_tile_info,bac0_scan_rows,0,16,16,32,32);
511   dec8_pf1_tilemap = tilemap_create(get_bac1_tile_info,bac0_scan_rows,TILEMAP_TRANSPARENT,16,16,32,32);
512   dec8_fix_tilemap = tilemap_create(get_cobracom_fix_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,32,32);
511   dec8_pf1_tilemap = tilemap_create(get_bac1_tile_info,bac0_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,32,32);
512   dec8_fix_tilemap = tilemap_create(get_cobracom_fix_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,32,32);
513513
514514   tilemap_set_transparent_pen(dec8_pf1_tilemap,0);
515515   tilemap_set_transparent_pen(dec8_fix_tilemap,0);
r778r779
556556VIDEO_START( ghostb )
557557{
558558   dec8_pf0_tilemap = tilemap_create(get_bac0_tile_info,bac0_scan_rows,0,16,16,32,32);
559   dec8_fix_tilemap = tilemap_create(get_ghostb_fix_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,32,32);
559   dec8_fix_tilemap = tilemap_create(get_ghostb_fix_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,32,32);
560560   tilemap_set_transparent_pen(dec8_fix_tilemap,0);
561561
562562   game_uses_priority=0;
r778r779
595595
596596VIDEO_START( oscar )
597597{
598   dec8_pf0_tilemap = tilemap_create(get_bac0_tile_info,bac0_scan_rows,TILEMAP_SPLIT,16,16,32,32);
599   dec8_fix_tilemap = tilemap_create(get_oscar_fix_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,32,32);
598   dec8_pf0_tilemap = tilemap_create(get_bac0_tile_info,bac0_scan_rows,TILEMAP_TYPE_SPLIT,16,16,32,32);
599   dec8_fix_tilemap = tilemap_create(get_oscar_fix_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,32,32);
600600
601601   tilemap_set_transparent_pen(dec8_fix_tilemap,0);
602602   tilemap_set_transmask(dec8_pf0_tilemap,0,0x00ff,0xff00); /* Bottom 8 pens */
r778r779
669669VIDEO_START( lastmiss )
670670{
671671   dec8_pf0_tilemap = tilemap_create(get_lastmiss_tile_info,lastmiss_scan_rows,0,16,16,32,32);
672   dec8_fix_tilemap = tilemap_create(get_lastmiss_fix_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,32,32);
672   dec8_fix_tilemap = tilemap_create(get_lastmiss_fix_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,32,32);
673673
674674   tilemap_set_transparent_pen(dec8_fix_tilemap,0);
675675   game_uses_priority=0;
r778r779
677677
678678VIDEO_START( shackled )
679679{
680   dec8_pf0_tilemap = tilemap_create(get_lastmiss_tile_info,lastmiss_scan_rows,TILEMAP_SPLIT,16,16,32,32);
681   dec8_fix_tilemap = tilemap_create(get_lastmiss_fix_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,32,32);
680   dec8_pf0_tilemap = tilemap_create(get_lastmiss_tile_info,lastmiss_scan_rows,TILEMAP_TYPE_SPLIT,16,16,32,32);
681   dec8_fix_tilemap = tilemap_create(get_lastmiss_fix_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,32,32);
682682
683683   tilemap_set_transparent_pen(dec8_fix_tilemap,0);
684684   tilemap_set_transmask(dec8_pf0_tilemap,0,0x000f,0xfff0); /* Bottom 12 pens */
r778r779
733733
734734VIDEO_START( srdarwin )
735735{
736   dec8_pf0_tilemap = tilemap_create(get_srdarwin_tile_info,tilemap_scan_rows,TILEMAP_SPLIT,16,16,32,16);
737   dec8_fix_tilemap = tilemap_create(get_srdarwin_fix_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,32,32);
736   dec8_pf0_tilemap = tilemap_create(get_srdarwin_tile_info,tilemap_scan_rows,TILEMAP_TYPE_SPLIT,16,16,32,16);
737   dec8_fix_tilemap = tilemap_create(get_srdarwin_fix_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,32,32);
738738
739739   tilemap_set_transparent_pen(dec8_fix_tilemap,0);
740740   tilemap_set_transmask(dec8_pf0_tilemap,0,0xffff,0x0000); //* draw as background only
r778r779
800800
801801VIDEO_START( gondo )
802802{
803   dec8_fix_tilemap=tilemap_create(get_gondo_fix_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,32,32);
804   dec8_pf0_tilemap=tilemap_create(get_gondo_tile_info,tilemap_scan_rows,TILEMAP_SPLIT,16,16,32,32);
803   dec8_fix_tilemap=tilemap_create(get_gondo_fix_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,32,32);
804   dec8_pf0_tilemap=tilemap_create(get_gondo_tile_info,tilemap_scan_rows,TILEMAP_TYPE_SPLIT,16,16,32,32);
805805
806806   tilemap_set_transparent_pen(dec8_fix_tilemap,0);
807807   tilemap_set_transmask(dec8_pf0_tilemap,0,0x00ff,0xff00); /* Bottom 8 pens */
r778r779
810810
811811VIDEO_START( garyoret )
812812{
813   dec8_fix_tilemap=tilemap_create(get_gondo_fix_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,32,32);
814   dec8_pf0_tilemap=tilemap_create(get_gondo_tile_info,tilemap_scan_rows,TILEMAP_SPLIT,16,16,32,32);
813   dec8_fix_tilemap=tilemap_create(get_gondo_fix_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,32,32);
814   dec8_pf0_tilemap=tilemap_create(get_gondo_tile_info,tilemap_scan_rows,TILEMAP_TYPE_SPLIT,16,16,32,32);
815815
816816   tilemap_set_transparent_pen(dec8_fix_tilemap,0);
817817   game_uses_priority=1;
src/mame/video/fuukifg3.c
r778r779
110110   buffered_spriteram32_2 = auto_malloc(spriteram_size);
111111
112112   tilemap_0 = tilemap_create(   get_tile_info_0, tilemap_scan_rows,
113                        TILEMAP_TRANSPARENT, 16, 16, 64,32);
113                        TILEMAP_TYPE_TRANSPARENT, 16, 16, 64,32);
114114
115115   tilemap_1 = tilemap_create(   get_tile_info_1, tilemap_scan_rows,
116                        TILEMAP_TRANSPARENT, 16, 16, 64,32);
116                        TILEMAP_TYPE_TRANSPARENT, 16, 16, 64,32);
117117
118118   tilemap_2 = tilemap_create(   get_tile_info_2, tilemap_scan_rows,
119                        TILEMAP_TRANSPARENT,  8,  8, 64,32);
119                        TILEMAP_TYPE_TRANSPARENT,  8,  8, 64,32);
120120
121121   tilemap_3 = tilemap_create(   get_tile_info_3, tilemap_scan_rows,
122                        TILEMAP_TRANSPARENT,  8,  8, 64,32);
122                        TILEMAP_TYPE_TRANSPARENT,  8,  8, 64,32);
123123
124124   tilemap_set_transparent_pen(tilemap_0,0xff);   // 8 bits
125125   tilemap_set_transparent_pen(tilemap_1,0xff);   // 8 bits
src/mame/video/tbowl.c
r778r779
204204
205205VIDEO_START( tbowl )
206206{
207   tx_tilemap = tilemap_create(get_tx_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT, 8, 8,64,32);
208   bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT, 16, 16,128,32);
209   bg2_tilemap = tilemap_create(get_bg2_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT, 16, 16,128,32);
207   tx_tilemap = tilemap_create(get_tx_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 8, 8,64,32);
208   bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 16, 16,128,32);
209   bg2_tilemap = tilemap_create(get_bg2_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 16, 16,128,32);
210210
211211   tilemap_set_transparent_pen(tx_tilemap,0);
212212   tilemap_set_transparent_pen(bg_tilemap,0);
src/mame/video/battlane.c
r778r779
144144VIDEO_START( battlane )
145145{
146146   bg_tilemap = tilemap_create(get_tile_info_bg, battlane_tilemap_scan_rows_2x2,
147      TILEMAP_OPAQUE, 16, 16, 32, 32);
147      TILEMAP_TYPE_OPAQUE, 16, 16, 32, 32);
148148
149149   screen_bitmap = auto_bitmap_alloc(32 * 8, 32 * 8, BITMAP_FORMAT_INDEXED8);
150150}
src/mame/video/atarigt.c
r778r779
138138   atarigen_blend_gfx(machine, 0, 2, 0x0f, 0x30);
139139
140140   /* initialize the playfield */
141   atarigen_playfield_tilemap = tilemap_create(get_playfield_tile_info, atarigt_playfield_scan, TILEMAP_OPAQUE, 8,8, 128,64);
141   atarigen_playfield_tilemap = tilemap_create(get_playfield_tile_info, atarigt_playfield_scan, TILEMAP_TYPE_OPAQUE, 8,8, 128,64);
142142
143143   /* initialize the motion objects */
144144   atarirle_init(0, &adjusted_modesc);
145145
146146   /* initialize the alphanumerics */
147   atarigen_alpha_tilemap = tilemap_create(get_alpha_tile_info, tilemap_scan_rows, TILEMAP_OPAQUE, 8,8, 64,32);
147   atarigen_alpha_tilemap = tilemap_create(get_alpha_tile_info, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE, 8,8, 64,32);
148148
149149   /* allocate temp bitmaps */
150150   pf_bitmap = auto_bitmap_alloc(machine->screen[0].width, machine->screen[0].height, BITMAP_FORMAT_INDEXED16);
src/mame/video/thepit.c
r778r779
191191
192192static void video_start_common(UINT8 _color_count, int _color_granularity)
193193{
194   thepit_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,8,8,32,32);
194   thepit_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,8,8,32,32);
195195
196196   tilemap_set_scroll_cols(thepit_tilemap, 32);
197197
src/mame/video/rpunch.c
r778r779
8585VIDEO_START( rpunch )
8686{
8787   /* allocate tilemaps for the backgrounds */
88   background[0] = tilemap_create(get_bg0_tile_info,tilemap_scan_cols,TILEMAP_OPAQUE,     8,8,64,64);
89   background[1] = tilemap_create(get_bg1_tile_info,tilemap_scan_cols,TILEMAP_TRANSPARENT,8,8,64,64);
88   background[0] = tilemap_create(get_bg0_tile_info,tilemap_scan_cols,TILEMAP_TYPE_OPAQUE,     8,8,64,64);
89   background[1] = tilemap_create(get_bg1_tile_info,tilemap_scan_cols,TILEMAP_TYPE_TRANSPARENT,8,8,64,64);
9090
9191   /* configure the tilemaps */
9292   tilemap_set_transparent_pen(background[1],15);
src/mame/video/yard.c
r778r779
206206VIDEO_START( yard )
207207{
208208   bg_tilemap = tilemap_create(yard_get_bg_tile_info, yard_tilemap_scan_rows,
209      TILEMAP_OPAQUE, 8, 8, 64, 32);
209      TILEMAP_TYPE_OPAQUE, 8, 8, 64, 32);
210210
211211   scroll_panel_bitmap = auto_bitmap_alloc(SCROLL_PANEL_WIDTH, machine->screen[0].height, machine->screen[0].format);
212212}
src/mame/video/pooyan.c
r778r779
105105VIDEO_START( pooyan )
106106{
107107   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows,
108      TILEMAP_OPAQUE, 8, 8, 32, 32);
108      TILEMAP_TYPE_OPAQUE, 8, 8, 32, 32);
109109}
110110
111111static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect)
src/mame/video/rollerg.c
r778r779
5353   zoom_colorbase = 0;
5454
5555   K053245_vh_start(machine,0,REGION_GFX1,NORMAL_PLANE_ORDER,sprite_callback);
56   K051316_vh_start_0(machine,REGION_GFX2,4,TILEMAP_TRANSPARENT,0,zoom_callback);
56   K051316_vh_start_0(machine,REGION_GFX2,4,TILEMAP_TYPE_TRANSPARENT,0,zoom_callback);
5757
5858   K051316_set_offset(0, 22, 1);
5959}
src/mame/video/sidepckt.c
r778r779
6464
6565VIDEO_START( sidepckt )
6666{
67   bg_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows,TILEMAP_SPLIT,8,8,32,32);
67   bg_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows,TILEMAP_TYPE_SPLIT,8,8,32,32);
6868
6969   tilemap_set_transmask(bg_tilemap,0,0xff,0x00); /* split type 0 is totally transparent in front half */
7070   tilemap_set_transmask(bg_tilemap,1,0x01,0xfe); /* split type 1 has pen 0 transparent in front half */
src/mame/video/pirates.c
r778r779
4040
4141VIDEO_START(pirates)
4242{
43   tx_tilemap = tilemap_create(get_tx_tile_info,tilemap_scan_cols,TILEMAP_TRANSPARENT,8,8,36,32);
43   tx_tilemap = tilemap_create(get_tx_tile_info,tilemap_scan_cols,TILEMAP_TYPE_TRANSPARENT,8,8,36,32);
4444
4545   /* Not sure how big they can be, Pirates uses only 32 columns, Genix 44 */
46   fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_cols,TILEMAP_TRANSPARENT,8,8,64,32);
47   bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_cols,TILEMAP_OPAQUE,     8,8,64,32);
46   fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_cols,TILEMAP_TYPE_TRANSPARENT,8,8,64,32);
47   bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_cols,TILEMAP_TYPE_OPAQUE,     8,8,64,32);
4848
4949   tilemap_set_transparent_pen(tx_tilemap,0);
5050   tilemap_set_transparent_pen(fg_tilemap,0);
src/mame/video/tankbatt.c
r778r779
8080VIDEO_START( tankbatt )
8181{
8282   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows,
83      TILEMAP_OPAQUE, 8, 8, 32, 32);
83      TILEMAP_TYPE_OPAQUE, 8, 8, 32, 32);
8484}
8585
8686static void draw_bullets(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect)
src/mame/video/wrally.c
r778r779
7979
8080VIDEO_START( wrally )
8181{
82   pant[0] = tilemap_create(get_tile_info_wrally_screen0,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,64,32);
83   pant[1] = tilemap_create(get_tile_info_wrally_screen1,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,64,32);
82   pant[0] = tilemap_create(get_tile_info_wrally_screen0,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,64,32);
83   pant[1] = tilemap_create(get_tile_info_wrally_screen1,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,64,32);
8484
8585   tilemap_set_transparent_pen(pant[0],0);
8686   tilemap_set_transparent_pen(pant[1],0);
src/mame/video/mosaic.c
r778r779
5252
5353VIDEO_START( mosaic )
5454{
55   fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,64,32);
56   bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,     8,8,64,32);
55   fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,64,32);
56   bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,     8,8,64,32);
5757
5858   tilemap_set_transparent_pen(fg_tilemap,0xff);
5959}
src/mame/video/crospang.c
r778r779
190190
191191VIDEO_START( crospang )
192192{
193   bg_layer = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,16,16,32,32);
194   fg_layer = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,32,32);
193   bg_layer = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,16,16,32,32);
194   fg_layer = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,32,32);
195195
196196   tilemap_set_transparent_pen(fg_layer,0);
197197   bestri_tilebank = 0;
src/mame/video/darkmist.c
r778r779
137137
138138VIDEO_START(darkmist)
139139{
140   bgtilemap = tilemap_create( get_bgtile_info,tilemap_scan_rows,TILEMAP_OPAQUE,16,16,512,64 );
141   fgtilemap = tilemap_create( get_fgtile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,64,256 );
142   txtilemap = tilemap_create( get_txttile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,32,32 );
140   bgtilemap = tilemap_create( get_bgtile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,16,16,512,64 );
141   fgtilemap = tilemap_create( get_fgtile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,64,256 );
142   txtilemap = tilemap_create( get_txttile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,32,32 );
143143   tilemap_set_transparent_pen(fgtilemap, 0);
144144   tilemap_set_transparent_pen(txtilemap, 0);
145145}
src/mame/video/exctsccr.c
r778r779
141141VIDEO_START( exctsccr )
142142{
143143   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows,
144      TILEMAP_OPAQUE, 8, 8, 32, 32);
144      TILEMAP_TYPE_OPAQUE, 8, 8, 32, 32);
145145
146146   mame_timer_pulse(MAME_TIME_IN_HZ(75), 0, exctsccr_fm_callback); /* updates fm */
147147}
src/mame/video/ajax.c
r778r779
7777   zoom_colorbase = 6;   /* == 48 since it's 7-bit graphics */
7878   K052109_vh_start(machine,REGION_GFX1,NORMAL_PLANE_ORDER,tile_callback);
7979   K051960_vh_start(machine,REGION_GFX2,NORMAL_PLANE_ORDER,sprite_callback);
80   K051316_vh_start_0(machine,REGION_GFX3,7,TILEMAP_TRANSPARENT,0,zoom_callback);
80   K051316_vh_start_0(machine,REGION_GFX3,7,TILEMAP_TYPE_TRANSPARENT,0,zoom_callback);
8181}
8282
8383
src/mame/video/shisen.c
r778r779
5555VIDEO_START( sichuan2 )
5656{
5757   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows,
58      TILEMAP_OPAQUE, 8, 8, 64, 32);
58      TILEMAP_TYPE_OPAQUE, 8, 8, 64, 32);
5959}
6060
6161VIDEO_UPDATE( sichuan2 )
src/mame/video/nmk16.c
r778r779
9090
9191VIDEO_START( bioship )
9292{
93   bg_tilemap = tilemap_create(macross_get_bg_tile_info,bg_scan,TILEMAP_TRANSPARENT,16,16,256,32);
94   tx_tilemap = tilemap_create(macross_get_tx_tile_info,tilemap_scan_cols,TILEMAP_TRANSPARENT,8,8,32,32);
93   bg_tilemap = tilemap_create(macross_get_bg_tile_info,bg_scan,TILEMAP_TYPE_TRANSPARENT,16,16,256,32);
94   tx_tilemap = tilemap_create(macross_get_tx_tile_info,tilemap_scan_cols,TILEMAP_TYPE_TRANSPARENT,8,8,32,32);
9595   spriteram_old = auto_malloc(spriteram_size);
9696   spriteram_old2 = auto_malloc(spriteram_size);
9797   background_bitmap = auto_bitmap_alloc(8192,512,machine->screen[0].format);
r778r779
109109
110110VIDEO_START( strahl )
111111{
112   bg_tilemap = tilemap_create(macross_get_bg_tile_info,bg_scan,TILEMAP_OPAQUE,16,16,256,32);
113   fg_tilemap = tilemap_create(strahl_get_fg_tile_info, bg_scan,TILEMAP_TRANSPARENT,16,16,256,32);
114   tx_tilemap = tilemap_create(macross_get_tx_tile_info,tilemap_scan_cols,TILEMAP_TRANSPARENT,8,8,32,32);
112   bg_tilemap = tilemap_create(macross_get_bg_tile_info,bg_scan,TILEMAP_TYPE_OPAQUE,16,16,256,32);
113   fg_tilemap = tilemap_create(strahl_get_fg_tile_info, bg_scan,TILEMAP_TYPE_TRANSPARENT,16,16,256,32);
114   tx_tilemap = tilemap_create(macross_get_tx_tile_info,tilemap_scan_cols,TILEMAP_TYPE_TRANSPARENT,8,8,32,32);
115115   spriteram_old = auto_malloc(spriteram_size);
116116   spriteram_old2 = auto_malloc(spriteram_size);
117117
r778r779
127127
128128VIDEO_START( macross )
129129{
130   bg_tilemap = tilemap_create(macross_get_bg_tile_info,bg_scan,TILEMAP_OPAQUE,16,16,256,32);
131   tx_tilemap = tilemap_create(macross_get_tx_tile_info,tilemap_scan_cols,TILEMAP_TRANSPARENT,8,8,32,32);
130   bg_tilemap = tilemap_create(macross_get_bg_tile_info,bg_scan,TILEMAP_TYPE_OPAQUE,16,16,256,32);
131   tx_tilemap = tilemap_create(macross_get_tx_tile_info,tilemap_scan_cols,TILEMAP_TYPE_TRANSPARENT,8,8,32,32);
132132   spriteram_old = auto_malloc(spriteram_size);
133133   spriteram_old2 = auto_malloc(spriteram_size);
134134
r778r779
143143
144144VIDEO_START( gunnail )
145145{
146   bg_tilemap = tilemap_create(macross_get_bg_tile_info,bg_scan,TILEMAP_OPAQUE,16,16,256,32);
147   tx_tilemap = tilemap_create(macross_get_tx_tile_info,tilemap_scan_cols,TILEMAP_TRANSPARENT,8,8,64,32);
146   bg_tilemap = tilemap_create(macross_get_bg_tile_info,bg_scan,TILEMAP_TYPE_OPAQUE,16,16,256,32);
147   tx_tilemap = tilemap_create(macross_get_tx_tile_info,tilemap_scan_cols,TILEMAP_TYPE_TRANSPARENT,8,8,64,32);
148148   spriteram_old = auto_malloc(spriteram_size);
149149   spriteram_old2 = auto_malloc(spriteram_size);
150150
r778r779
161161
162162VIDEO_START( macross2 )
163163{
164   bg_tilemap = tilemap_create(macross_get_bg_tile_info,bg_scan,TILEMAP_OPAQUE,16,16,1024,128);
165   tx_tilemap = tilemap_create(macross_get_tx_tile_info,tilemap_scan_cols,TILEMAP_TRANSPARENT,8,8,64,32);
164   bg_tilemap = tilemap_create(macross_get_bg_tile_info,bg_scan,TILEMAP_TYPE_OPAQUE,16,16,1024,128);
165   tx_tilemap = tilemap_create(macross_get_tx_tile_info,tilemap_scan_cols,TILEMAP_TYPE_TRANSPARENT,8,8,64,32);
166166   spriteram_old = auto_malloc(spriteram_size);
167167   spriteram_old2 = auto_malloc(spriteram_size);
168168
r778r779
178178
179179VIDEO_START( tdragon2 )
180180{
181   bg_tilemap = tilemap_create(macross_get_bg_tile_info,bg_scan_td2,TILEMAP_OPAQUE,16,16,1024,32);
182   tx_tilemap = tilemap_create(macross_get_tx_tile_info,tilemap_scan_cols,TILEMAP_TRANSPARENT,8,8,64,32);
181   bg_tilemap = tilemap_create(macross_get_bg_tile_info,bg_scan_td2,TILEMAP_TYPE_OPAQUE,16,16,1024,32);
182   tx_tilemap = tilemap_create(macross_get_tx_tile_info,tilemap_scan_cols,TILEMAP_TYPE_TRANSPARENT,8,8,64,32);
183183   spriteram_old = auto_malloc(spriteram_size);
184184   spriteram_old2 = auto_malloc(spriteram_size);
185185
r778r779
195195
196196VIDEO_START( bjtwin )
197197{
198   bg_tilemap = tilemap_create(bjtwin_get_bg_tile_info,tilemap_scan_cols,TILEMAP_OPAQUE,8,8,64,32);
198   bg_tilemap = tilemap_create(bjtwin_get_bg_tile_info,tilemap_scan_cols,TILEMAP_TYPE_OPAQUE,8,8,64,32);
199199   spriteram_old = auto_malloc(spriteram_size);
200200   spriteram_old2 = auto_malloc(spriteram_size);
201201
src/mame/video/nitedrvr.c
r778r779
3737VIDEO_START( nitedrvr )
3838{
3939   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows,
40      TILEMAP_OPAQUE, 8, 8, 32, 32);
40      TILEMAP_TYPE_OPAQUE, 8, 8, 32, 32);
4141}
4242
4343static void draw_box(running_machine *machine, mame_bitmap *bitmap, int bx, int by, int ex, int ey )
src/mame/layout/slots.lay
r778r779
8787         <bounds x="0" y="0.1" width="1" height="0.8" />
8888      </text>
8989   </element>
90   <element name="vfd0">
91   <led14segsc>
92         <color red="0" green="0.6" blue="1.0" />
93   </led14segsc>
94   </element>
9095
9196   <view name="Adder,VFD and Lamps">
9297      <bezel name="lamp1" element="slot1">
r778r779
113118      <bezel name="door" element="door0">
114119         <bounds x="370" y="280" width="26" height="14" />
115120      </bezel>
121      <bezel name="vfd0" element="vfd0" state="0">
122         <bounds x="0" y="280" width="9" height="14"/>
123      </bezel>
124      <bezel name="vfd1" element="vfd0" state="0">
125         <bounds x="9" y="280" width="9" height="14"/>
126      </bezel>
127      <bezel name="vfd2" element="vfd0" state="0">
128         <bounds x="18" y="280" width="9" height="14"/>
129      </bezel>
130      <bezel name="vfd3" element="vfd0" state="0">
131         <bounds x="27" y="280" width="9" height="14"/>
132      </bezel>
133      <bezel name="vfd4" element="vfd0" state="0">
134         <bounds x="36" y="280" width="9" height="14"/>
135      </bezel>
136      <bezel name="vfd5" element="vfd0" state="0">
137         <bounds x="45" y="280" width="9" height="14"/>
138      </bezel>
139      <bezel name="vfd6" element="vfd0" state="0">
140         <bounds x="54" y="280" width="9" height="14"/>
141      </bezel>
142      <bezel name="vfd7" element="vfd0" state="0">
143         <bounds x="63" y="280" width="9" height="14"/>
144      </bezel>
145      <bezel name="vfd8" element="vfd0" state="0">
146         <bounds x="72" y="280" width="9" height="14"/>
147      </bezel>
148      <bezel name="vfd9" element="vfd0" state="0">
149         <bounds x="81" y="280" width="9" height="14"/>
150      </bezel>
151      <bezel name="vfd10" element="vfd0" state="0">
152         <bounds x="90" y="280" width="9" height="14"/>
153      </bezel>
154      <bezel name="vfd11" element="vfd0" state="0">
155         <bounds x="99" y="280" width="9" height="14"/>
156      </bezel>
157      <bezel name="vfd12" element="vfd0" state="0">
158         <bounds x="108" y="280" width="9" height="14"/>
159      </bezel>
160      <bezel name="vfd13" element="vfd0" state="0">
161         <bounds x="117" y="280" width="9" height="14"/>
162      </bezel>
163      <bezel name="vfd14" element="vfd0" state="0">
164         <bounds x="126" y="280" width="9" height="14"/>
165      </bezel>
166      <bezel name="vfd15" element="vfd0" state="0">
167         <bounds x="135" y="280" width="9" height="14"/>
168      </bezel>
116169      <screen index="0">
117170         <bounds x="0" y="0" width="400" height="280" />
118171      </screen>
119      <screen index="1">
120         <bounds x="0" y="280" width="144" height="14" />
121      </screen>
122172   </view>
123173</mamelayout>
124174
src/mame/layout/gldncrwn.lay
r778r779
8787         <color red="0.0" green="1.0" blue="0.0" />
8888      </rect>
8989   </element>
90   <element name="vfd0">
91   <led14segsc>
92         <color red="0" green="0.6" blue="1.0" />
93   </led14segsc>
94   </element>
9095   <view name="Adder,VFD and Lamps">
9196      <bezel name="lamp1" element="reel1">
9297         <bounds x="145" y="280" width="26" height="14" />
r778r779
112117      <bezel name="lamp16" element="start">
113118         <bounds x="355" y="280" width="26" height="14" />
114119      </bezel>
120      <bezel name="vfd0" element="vfd0" state="0">
121         <bounds x="0" y="280" width="9" height="14"/>
122      </bezel>
123      <bezel name="vfd1" element="vfd0" state="0">
124         <bounds x="9" y="280" width="9" height="14"/>
125      </bezel>
126      <bezel name="vfd2" element="vfd0" state="0">
127         <bounds x="18" y="280" width="9" height="14"/>
128      </bezel>
129      <bezel name="vfd3" element="vfd0" state="0">
130         <bounds x="27" y="280" width="9" height="14"/>
131      </bezel>
132      <bezel name="vfd4" element="vfd0" state="0">
133         <bounds x="36" y="280" width="9" height="14"/>
134      </bezel>
135      <bezel name="vfd5" element="vfd0" state="0">
136         <bounds x="45" y="280" width="9" height="14"/>
137      </bezel>
138      <bezel name="vfd6" element="vfd0" state="0">
139         <bounds x="54" y="280" width="9" height="14"/>
140      </bezel>
141      <bezel name="vfd7" element="vfd0" state="0">
142         <bounds x="63" y="280" width="9" height="14"/>
143      </bezel>
144      <bezel name="vfd8" element="vfd0" state="0">
145         <bounds x="72" y="280" width="9" height="14"/>
146      </bezel>
147      <bezel name="vfd9" element="vfd0" state="0">
148         <bounds x="81" y="280" width="9" height="14"/>
149      </bezel>
150      <bezel name="vfd10" element="vfd0" state="0">
151         <bounds x="90" y="280" width="9" height="14"/>
152      </bezel>
153      <bezel name="vfd11" element="vfd0" state="0">
154         <bounds x="99" y="280" width="9" height="14"/>
155      </bezel>
156      <bezel name="vfd12" element="vfd0" state="0">
157         <bounds x="108" y="280" width="9" height="14"/>
158      </bezel>
159      <bezel name="vfd13" element="vfd0" state="0">
160         <bounds x="117" y="280" width="9" height="14"/>
161      </bezel>
162      <bezel name="vfd14" element="vfd0" state="0">
163         <bounds x="126" y="280" width="9" height="14"/>
164      </bezel>
165      <bezel name="vfd15" element="vfd0" state="0">
166         <bounds x="135" y="280" width="9" height="14"/>
167      </bezel>
115168      <screen index="0">
116169         <bounds x="0" y="0" width="400" height="280" />
117170      </screen>
118      <screen index="1">
119         <bounds x="0" y="280" width="144" height="14" />
120      </screen>
121171   </view>
122172</mamelayout>
123173
src/mame/layout/mpu4.lay
r778r779
405405         <bounds x="0" y="0.1" width="1" height="1" />
406406      </text>
407407   </element>
408   <element name="vfd0">
409   <led16segsc>
410         <color red="0" green="0.6" blue="1.0" />
411   </led16segsc>
412   </element>
408413
409414   <view name="AWP Simulated Video (No Artwork)">
410      <screen index="0">
411         <bounds x="10" y="200" width="112" height="24" />
412      </screen>
413415      <backdrop name="reel1" element="Steppers" state="0">
414416         <bounds x="10" y="300" width="50" height="50"/>
415417      </backdrop>
r778r779
837839         <bounds x="356" y="200" width="8" height="10"/>
838840      </backdrop>
839841   </view>
842      <bezel name="vfd0" element="vfd0" state="0">
843         <bounds x="17" y="280" width="7" height="24"/>
844      </bezel>
845      <bezel name="vfd1" element="vfd0" state="0">
846         <bounds x="24" y="280" width="7" height="24"/>
847      </bezel>
848      <bezel name="vfd2" element="vfd0" state="0">
849         <bounds x="31" y="280" width="7" height="24"/>
850      </bezel>
851      <bezel name="vfd3" element="vfd0" state="0">
852         <bounds x="38" y="280" width="7" height="24"/>
853      </bezel>
854      <bezel name="vfd4" element="vfd0" state="0">
855         <bounds x="45" y="280" width="7" height="24"/>
856      </bezel>
857      <bezel name="vfd5" element="vfd0" state="0">
858         <bounds x="52" y="280" width="7" height="24"/>
859      </bezel>
860      <bezel name="vfd6" element="vfd0" state="0">
861         <bounds x="59" y="280" width="7" height="24"/>
862      </bezel>
863      <bezel name="vfd7" element="vfd0" state="0">
864         <bounds x="66" y="280" width="7" height="24"/>
865      </bezel>
866      <bezel name="vfd8" element="vfd0" state="0">
867         <bounds x="73" y="280" width="7" height="24"/>
868      </bezel>
869      <bezel name="vfd9" element="vfd0" state="0">
870         <bounds x="80" y="280" width="7" height="24"/>
871      </bezel>
872      <bezel name="vfd10" element="vfd0" state="0">
873         <bounds x="87" y="280" width="7" height="24"/>
874      </bezel>
875      <bezel name="vfd11" element="vfd0" state="0">
876         <bounds x="94" y="280" width="7" height="24"/>
877      </bezel>
878      <bezel name="vfd12" element="vfd0" state="0">
879         <bounds x="101" y="280" width="7" height="24"/>
880      </bezel>
881      <bezel name="vfd13" element="vfd0" state="0">
882         <bounds x="108" y="280" width="7" height="24"/>
883      </bezel>
884      <bezel name="vfd14" element="vfd0" state="0">
885         <bounds x="115" y="280" width="7" height="24"/>
886      </bezel>
887      <bezel name="vfd15" element="vfd0" state="0">
888         <bounds x="122" y="280" width="7" height="24"/>
889      </bezel>
890
840891   <view name="VFD Display Output Only">
841      <screen index="0">
842         <bounds x="10" y="200" width="144" height="17" />
843      </screen>
892      <bezel name="vfd0" element="vfd0" state="0">
893         <bounds x="10" y="200" width="9" height="17"/>
894      </bezel>
895      <bezel name="vfd1" element="vfd0" state="0">
896         <bounds x="19" y="200" width="9" height="17"/>
897      </bezel>
898      <bezel name="vfd2" element="vfd0" state="0">
899         <bounds x="28" y="200" width="9" height="17"/>
900      </bezel>
901      <bezel name="vfd3" element="vfd0" state="0">
902         <bounds x="37" y="200" width="9" height="17"/>
903      </bezel>
904      <bezel name="vfd4" element="vfd0" state="0">
905         <bounds x="46" y="200" width="9" height="17"/>
906      </bezel>
907      <bezel name="vfd5" element="vfd0" state="0">
908         <bounds x="55" y="200" width="9" height="17"/>
909      </bezel>
910      <bezel name="vfd6" element="vfd0" state="0">
911         <bounds x="64" y="200" width="9" height="17"/>
912      </bezel>
913      <bezel name="vfd7" element="vfd0" state="0">
914         <bounds x="73" y="200" width="9" height="17"/>
915      </bezel>
916      <bezel name="vfd8" element="vfd0" state="0">
917         <bounds x="82" y="200" width="9" height="17"/>
918      </bezel>
919      <bezel name="vfd9" element="vfd0" state="0">
920         <bounds x="91" y="200" width="9" height="17"/>
921      </bezel>
922      <bezel name="vfd10" element="vfd0" state="0">
923         <bounds x="100" y="200" width="9" height="17"/>
924      </bezel>
925      <bezel name="vfd11" element="vfd0" state="0">
926         <bounds x="109" y="200" width="9" height="17"/>
927      </bezel>
928      <bezel name="vfd12" element="vfd0" state="0">
929         <bounds x="118" y="200" width="9" height="17"/>
930      </bezel>
931      <bezel name="vfd13" element="vfd0" state="0">
932         <bounds x="127" y="200" width="9" height="17"/>
933      </bezel>
934      <bezel name="vfd14" element="vfd0" state="0">
935         <bounds x="136" y="200" width="9" height="17"/>
936      </bezel>
937      <bezel name="vfd15" element="vfd0" state="0">
938         <bounds x="145" y="200" width="9" height="17"/>
939      </bezel>
844940   </view>
845941</mamelayout>
src/mame/layout/sltblgpo.lay
r778r779
6868         <bounds x="0" y="0.1" width="1" height="0.8" />
6969      </text>
7070   </element>
71   <element name="vfd0">
72   <led14segsc>
73         <color red="0" green="0.6" blue="1.0" />
74   </led14segsc>
75   </element>
7176
7277   <view name="Adder,VFD and Lamps">
7378      <bezel name="lamp1" element="slot1">
r778r779
8893      <bezel name="door" element="door0">
8994         <bounds x="370" y="280" width="26" height="14" />
9095      </bezel>
96      <bezel name="vfd0" element="vfd0" state="0">
97         <bounds x="0" y="280" width="9" height="14"/>
98      </bezel>
99      <bezel name="vfd1" element="vfd0" state="0">
100         <bounds x="9" y="280" width="9" height="14"/>
101      </bezel>
102      <bezel name="vfd2" element="vfd0" state="0">
103         <bounds x="18" y="280" width="9" height="14"/>
104      </bezel>
105      <bezel name="vfd3" element="vfd0" state="0">
106         <bounds x="27" y="280" width="9" height="14"/>
107      </bezel>
108      <bezel name="vfd4" element="vfd0" state="0">
109         <bounds x="36" y="280" width="9" height="14"/>
110      </bezel>
111      <bezel name="vfd5" element="vfd0" state="0">
112         <bounds x="45" y="280" width="9" height="14"/>
113      </bezel>
114      <bezel name="vfd6" element="vfd0" state="0">
115         <bounds x="54" y="280" width="9" height="14"/>
116      </bezel>
117      <bezel name="vfd7" element="vfd0" state="0">
118         <bounds x="63" y="280" width="9" height="14"/>
119      </bezel>
120      <bezel name="vfd8" element="vfd0" state="0">
121         <bounds x="72" y="280" width="9" height="14"/>
122      </bezel>
123      <bezel name="vfd9" element="vfd0" state="0">
124         <bounds x="81" y="280" width="9" height="14"/>
125      </bezel>
126      <bezel name="vfd10" element="vfd0" state="0">
127         <bounds x="90" y="280" width="9" height="14"/>
128      </bezel>
129      <bezel name="vfd11" element="vfd0" state="0">
130         <bounds x="99" y="280" width="9" height="14"/>
131      </bezel>
132      <bezel name="vfd12" element="vfd0" state="0">
133         <bounds x="108" y="280" width="9" height="14"/>
134      </bezel>
135      <bezel name="vfd13" element="vfd0" state="0">
136         <bounds x="117" y="280" width="9" height="14"/>
137      </bezel>
138      <bezel name="vfd14" element="vfd0" state="0">
139         <bounds x="126" y="280" width="9" height="14"/>
140      </bezel>
141      <bezel name="vfd15" element="vfd0" state="0">
142         <bounds x="135" y="280" width="9" height="14"/>
143      </bezel>
91144      <screen index="0">
92145         <bounds x="0" y="0" width="400" height="280" />
93146      </screen>
94      <screen index="1">
95         <bounds x="0" y="280" width="144" height="14" />
96      </screen>
97147   </view>
98148</mamelayout>
99149
src/mame/layout/sltblgtk.lay
r778r779
8686         <bounds x="0" y="0.1" width="1" height="0.8" />
8787      </text>
8888   </element>
89   <element name="vfd0">
90   <led14segsc>
91         <color red="0" green="0.6" blue="1.0" />
92   </led14segsc>
93   </element>
8994
9095   <view name="Adder,VFD and Lamps">
9196      <bezel name="lamp1" element="slot1">
r778r779
112117      <bezel name="door" element="door0">
113118         <bounds x="370" y="280" width="26" height="14" />
114119      </bezel>
120      <bezel name="vfd0" element="vfd0" state="0">
121         <bounds x="0" y="280" width="9" height="14"/>
122      </bezel>
123      <bezel name="vfd1" element="vfd0" state="0">
124         <bounds x="9" y="280" width="9" height="14"/>
125      </bezel>
126      <bezel name="vfd2" element="vfd0" state="0">
127         <bounds x="18" y="280" width="9" height="14"/>
128      </bezel>
129      <bezel name="vfd3" element="vfd0" state="0">
130         <bounds x="27" y="280" width="9" height="14"/>
131      </bezel>
132      <bezel name="vfd4" element="vfd0" state="0">
133         <bounds x="36" y="280" width="9" height="14"/>
134      </bezel>
135      <bezel name="vfd5" element="vfd0" state="0">
136         <bounds x="45" y="280" width="9" height="14"/>
137      </bezel>
138      <bezel name="vfd6" element="vfd0" state="0">
139         <bounds x="54" y="280" width="9" height="14"/>
140      </bezel>
141      <bezel name="vfd7" element="vfd0" state="0">
142         <bounds x="63" y="280" width="9" height="14"/>
143      </bezel>
144      <bezel name="vfd8" element="vfd0" state="0">
145         <bounds x="72" y="280" width="9" height="14"/>
146      </bezel>
147      <bezel name="vfd9" element="vfd0" state="0">
148         <bounds x="81" y="280" width="9" height="14"/>
149      </bezel>
150      <bezel name="vfd10" element="vfd0" state="0">
151         <bounds x="90" y="280" width="9" height="14"/>
152      </bezel>
153      <bezel name="vfd11" element="vfd0" state="0">
154         <bounds x="99" y="280" width="9" height="14"/>
155      </bezel>
156      <bezel name="vfd12" element="vfd0" state="0">
157         <bounds x="108" y="280" width="9" height="14"/>
158      </bezel>
159      <bezel name="vfd13" element="vfd0" state="0">
160         <bounds x="117" y="280" width="9" height="14"/>
161      </bezel>
162      <bezel name="vfd14" element="vfd0" state="0">
163         <bounds x="126" y="280" width="9" height="14"/>
164      </bezel>
165      <bezel name="vfd15" element="vfd0" state="0">
166         <bounds x="135" y="280" width="9" height="14"/>
167      </bezel>
168     
115169      <screen index="0">
116170         <bounds x="0" y="0" width="400" height="280" />
117171      </screen>
118      <screen index="1">
119         <bounds x="0" y="280" width="144" height="14" />
120      </screen>
121172   </view>
122173</mamelayout>
123174
src/mame/layout/pyramid.lay
r778r779
6868         <bounds x="0" y="0.1" width="1" height="0.8" />
6969      </text>
7070   </element>
71   <element name="vfd0">
72   <led14segsc>
73         <color red="0" green="0.6" blue="1.0" />
74   </led14segsc>
75   </element>
7176
7277   <view name="Adder,VFD and Lamps">
7378      <bezel name="lamp3" element="left">
r778r779
8893      <bezel name="door" element="door0">
8994         <bounds x="370" y="280" width="28" height="14" />
9095      </bezel>
96      <bezel name="vfd0" element="vfd0" state="0">
97         <bounds x="0" y="280" width="9" height="14"/>
98      </bezel>
99      <bezel name="vfd1" element="vfd0" state="0">
100         <bounds x="9" y="280" width="9" height="14"/>
101      </bezel>
102      <bezel name="vfd2" element="vfd0" state="0">
103         <bounds x="18" y="280" width="9" height="14"/>
104      </bezel>
105      <bezel name="vfd3" element="vfd0" state="0">
106         <bounds x="27" y="280" width="9" height="14"/>
107      </bezel>
108      <bezel name="vfd4" element="vfd0" state="0">
109         <bounds x="36" y="280" width="9" height="14"/>
110      </bezel>
111      <bezel name="vfd5" element="vfd0" state="0">
112         <bounds x="45" y="280" width="9" height="14"/>
113      </bezel>
114      <bezel name="vfd6" element="vfd0" state="0">
115         <bounds x="54" y="280" width="9" height="14"/>
116      </bezel>
117      <bezel name="vfd7" element="vfd0" state="0">
118         <bounds x="63" y="280" width="9" height="14"/>
119      </bezel>
120      <bezel name="vfd8" element="vfd0" state="0">
121         <bounds x="72" y="280" width="9" height="14"/>
122      </bezel>
123      <bezel name="vfd9" element="vfd0" state="0">
124         <bounds x="81" y="280" width="9" height="14"/>
125      </bezel>
126      <bezel name="vfd10" element="vfd0" state="0">
127         <bounds x="90" y="280" width="9" height="14"/>
128      </bezel>
129      <bezel name="vfd11" element="vfd0" state="0">
130         <bounds x="99" y="280" width="9" height="14"/>
131      </bezel>
132      <bezel name="vfd12" element="vfd0" state="0">
133         <bounds x="108" y="280" width="9" height="14"/>
134      </bezel>
135      <bezel name="vfd13" element="vfd0" state="0">
136         <bounds x="117" y="280" width="9" height="14"/>
137      </bezel>
138      <bezel name="vfd14" element="vfd0" state="0">
139         <bounds x="126" y="280" width="9" height="14"/>
140      </bezel>
141      <bezel name="vfd15" element="vfd0" state="0">
142         <bounds x="135" y="280" width="9" height="14"/>
143      </bezel>
91144      <screen index="0">
92145         <bounds x="0" y="0" width="400" height="280" />
93146      </screen>
94      <screen index="1">
95         <bounds x="0" y="280" width="144" height="14" />
96      </screen>
97147   </view>
98148</mamelayout>
99149
src/mame/layout/paradice.lay
r778r779
7777         <bounds x="0" y="0.1" width="1" height="0.8" />
7878      </text>
7979   </element>
80
80   <element name="vfd0">
81   <led14segsc>
82         <color red="0" green="0.6" blue="1.0" />
83   </led14segsc>
84   </element>
8185   <view name="Adder,VFD and Lamps">
8286      <bezel name="lamp0" element="p1start">
8387         <bounds x="145" y="280" width="28" height="14" />
r778r779
100104      <bezel name="door" element="door0">
101105         <bounds x="370" y="280" width="28" height="14" />
102106      </bezel>
107      <bezel name="vfd0" element="vfd0" state="0">
108         <bounds x="0" y="280" width="9" height="14"/>
109      </bezel>
110      <bezel name="vfd1" element="vfd0" state="0">
111         <bounds x="9" y="280" width="9" height="14"/>
112      </bezel>
113      <bezel name="vfd2" element="vfd0" state="0">
114         <bounds x="18" y="280" width="9" height="14"/>
115      </bezel>
116      <bezel name="vfd3" element="vfd0" state="0">
117         <bounds x="27" y="280" width="9" height="14"/>
118      </bezel>
119      <bezel name="vfd4" element="vfd0" state="0">
120         <bounds x="36" y="280" width="9" height="14"/>
121      </bezel>
122      <bezel name="vfd5" element="vfd0" state="0">
123         <bounds x="45" y="280" width="9" height="14"/>
124      </bezel>
125      <bezel name="vfd6" element="vfd0" state="0">
126         <bounds x="54" y="280" width="9" height="14"/>
127      </bezel>
128      <bezel name="vfd7" element="vfd0" state="0">
129         <bounds x="63" y="280" width="9" height="14"/>
130      </bezel>
131      <bezel name="vfd8" element="vfd0" state="0">
132         <bounds x="72" y="280" width="9" height="14"/>
133      </bezel>
134      <bezel name="vfd9" element="vfd0" state="0">
135         <bounds x="81" y="280" width="9" height="14"/>
136      </bezel>
137      <bezel name="vfd10" element="vfd0" state="0">
138         <bounds x="90" y="280" width="9" height="14"/>
139      </bezel>
140      <bezel name="vfd11" element="vfd0" state="0">
141         <bounds x="99" y="280" width="9" height="14"/>
142      </bezel>
143      <bezel name="vfd12" element="vfd0" state="0">
144         <bounds x="108" y="280" width="9" height="14"/>
145      </bezel>
146      <bezel name="vfd13" element="vfd0" state="0">
147         <bounds x="117" y="280" width="9" height="14"/>
148      </bezel>
149      <bezel name="vfd14" element="vfd0" state="0">
150         <bounds x="126" y="280" width="9" height="14"/>
151      </bezel>
152      <bezel name="vfd15" element="vfd0" state="0">
153         <bounds x="135" y="280" width="9" height="14"/>
154      </bezel>
103155      <screen index="0">
104156         <bounds x="0" y="0" width="400" height="280" />
105157      </screen>
106      <screen index="1">
107         <bounds x="0" y="280" width="144" height="14" />
108      </screen>
109158   </view>
110159</mamelayout>
111160
src/mame/layout/bfm_sc2.lay
r778r779
2323         <bounds x="0" y="0.1" width="1" height="0.8" />
2424      </text>
2525   </element>
26
26   <element name="vfd0">
27   <led14segsc>
28         <color red="0" green="0.6" blue="1.0" />
29   </led14segsc>
30   </element>
2731   <view name="Adder,VFD and Lamp Matrix">
2832      <backdrop name="lamp0" element="matrixlamp" state="0">
2933         <bounds x="0" y="0" width="7" height="7"/>
r778r779
797801      <bezel name="door" element="door0">
798802         <bounds x="370" y="270" width="30" height="10" />
799803      </bezel>
804      <backdrop name="vfd0" element="vfd0" state="0">
805         <bounds x="0" y="280" width="9" height="14"/>
806      </backdrop>
807      <backdrop name="vfd1" element="vfd0" state="0">
808         <bounds x="9" y="280" width="9" height="14"/>
809      </backdrop>
810      <backdrop name="vfd2" element="vfd0" state="0">
811         <bounds x="18" y="280" width="9" height="14"/>
812      </backdrop>
813      <backdrop name="vfd3" element="vfd0" state="0">
814         <bounds x="27" y="280" width="9" height="14"/>
815      </backdrop>
816      <backdrop name="vfd4" element="vfd0" state="0">
817         <bounds x="36" y="280" width="9" height="14"/>
818      </backdrop>
819      <backdrop name="vfd5" element="vfd0" state="0">
820         <bounds x="45" y="280" width="9" height="14"/>
821      </backdrop>
822      <backdrop name="vfd6" element="vfd0" state="0">
823         <bounds x="54" y="280" width="9" height="14"/>
824      </backdrop>
825      <backdrop name="vfd7" element="vfd0" state="0">
826         <bounds x="63" y="280" width="9" height="14"/>
827      </backdrop>
828      <backdrop name="vfd8" element="vfd0" state="0">
829         <bounds x="72" y="280" width="9" height="14"/>
830      </backdrop>
831      <backdrop name="vfd9" element="vfd0" state="0">
832         <bounds x="81" y="280" width="9" height="14"/>
833      </backdrop>
834      <backdrop name="vfd10" element="vfd0" state="0">
835         <bounds x="90" y="280" width="9" height="14"/>
836      </backdrop>
837      <backdrop name="vfd11" element="vfd0" state="0">
838         <bounds x="99" y="280" width="9" height="14"/>
839      </backdrop>
840      <backdrop name="vfd12" element="vfd0" state="0">
841         <bounds x="108" y="280" width="9" height="14"/>
842      </backdrop>
843      <backdrop name="vfd13" element="vfd0" state="0">
844         <bounds x="117" y="280" width="9" height="14"/>
845      </backdrop>
846      <backdrop name="vfd14" element="vfd0" state="0">
847         <bounds x="126" y="280" width="9" height="14"/>
848      </backdrop>
849      <backdrop name="vfd15" element="vfd0" state="0">
850         <bounds x="135" y="280" width="9" height="14"/>
851      </backdrop>
800852      <screen index="0">
801853         <bounds x="0" y="0" width="400" height="280" />
802854      </screen>
803      <screen index="1">
804         <bounds x="0" y="280" width="144" height="14" />
805      </screen>
806855   </view>
807856   <view name="Adder 2 Output Only (400:280)">
808857      <screen index="0">
r778r779
810859      </screen>
811860   </view>
812861   <view name="VFD Only (144:17)">
813      <screen index="1">
814         <bounds x="0" y="0" width="144" height="17" />
815      </screen>
862      <backdrop name="vfd0" element="vfd0" state="0">
863         <bounds x="0" y="0" width="9" height="14"/>
864      </backdrop>
865      <backdrop name="vfd1" element="vfd0" state="0">
866         <bounds x="9" y="0" width="9" height="14"/>
867      </backdrop>
868      <backdrop name="vfd2" element="vfd0" state="0">
869         <bounds x="18" y="0" width="9" height="14"/>
870      </backdrop>
871      <backdrop name="vfd3" element="vfd0" state="0">
872         <bounds x="27" y="0" width="9" height="14"/>
873      </backdrop>
874      <backdrop name="vfd4" element="vfd0" state="0">
875         <bounds x="36" y="0" width="9" height="14"/>
876      </backdrop>
877      <backdrop name="vfd5" element="vfd0" state="0">
878         <bounds x="45" y="0" width="9" height="14"/>
879      </backdrop>
880      <backdrop name="vfd6" element="vfd0" state="0">
881         <bounds x="54" y="0" width="9" height="14"/>
882      </backdrop>
883      <backdrop name="vfd7" element="vfd0" state="0">
884         <bounds x="63" y="0" width="9" height="14"/>
885      </backdrop>
886      <backdrop name="vfd8" element="vfd0" state="0">
887         <bounds x="72" y="0" width="9" height="14"/>
888      </backdrop>
889      <backdrop name="vfd9" element="vfd0" state="0">
890         <bounds x="81" y="0" width="9" height="14"/>
891      </backdrop>
892      <backdrop name="vfd10" element="vfd0" state="0">
893         <bounds x="90" y="0" width="9" height="14"/>
894      </backdrop>
895      <backdrop name="vfd11" element="vfd0" state="0">
896         <bounds x="99" y="0" width="9" height="14"/>
897      </backdrop>
898      <backdrop name="vfd12" element="vfd0" state="0">
899         <bounds x="108" y="0" width="9" height="14"/>
900      </backdrop>
901      <backdrop name="vfd13" element="vfd0" state="0">
902         <bounds x="117" y="0" width="9" height="14"/>
903      </backdrop>
904      <backdrop name="vfd14" element="vfd0" state="0">
905         <bounds x="126" y="0" width="9" height="14"/>
906      </backdrop>
907      <backdrop name="vfd15" element="vfd0" state="0">
908         <bounds x="135" y="0" width="9" height="14"/>
909      </backdrop>
816910   </view>
817911</mamelayout>
818
src/mame/layout/quintoon.lay
r778r779
7878         <bounds x="0" y="0.1" width="1" height="0.8" />
7979      </text>
8080   </element>
81   <element name="vfd0">
82   <led14segsc>
83         <color red="0" green="0.6" blue="1.0" />
84   </led14segsc>
85   </element>
8186
8287   <view name="Adder,VFD and Lamps">
8388      <bezel name="lamp1" element="hand1">
r778r779
101106      <bezel name="door" element="door0">
102107         <bounds x="370" y="280" width="28" height="14" />
103108      </bezel>
109      <bezel name="vfd0" element="vfd0" state="0">
110         <bounds x="0" y="280" width="9" height="14"/>
111      </bezel>
112      <bezel name="vfd1" element="vfd0" state="0">
113         <bounds x="9" y="280" width="9" height="14"/>
114      </bezel>
115      <bezel name="vfd2" element="vfd0" state="0">
116         <bounds x="18" y="280" width="9" height="14"/>
117      </bezel>
118      <bezel name="vfd3" element="vfd0" state="0">
119         <bounds x="27" y="280" width="9" height="14"/>
120      </bezel>
121      <bezel name="vfd4" element="vfd0" state="0">
122         <bounds x="36" y="280" width="9" height="14"/>
123      </bezel>
124      <bezel name="vfd5" element="vfd0" state="0">
125         <bounds x="45" y="280" width="9" height="14"/>
126      </bezel>
127      <bezel name="vfd6" element="vfd0" state="0">
128         <bounds x="54" y="280" width="9" height="14"/>
129      </bezel>
130      <bezel name="vfd7" element="vfd0" state="0">
131         <bounds x="63" y="280" width="9" height="14"/>
132      </bezel>
133      <bezel name="vfd8" element="vfd0" state="0">
134         <bounds x="72" y="280" width="9" height="14"/>
135      </bezel>
136      <bezel name="vfd9" element="vfd0" state="0">
137         <bounds x="81" y="280" width="9" height="14"/>
138      </bezel>
139      <bezel name="vfd10" element="vfd0" state="0">
140         <bounds x="90" y="280" width="9" height="14"/>
141      </bezel>
142      <bezel name="vfd11" element="vfd0" state="0">
143         <bounds x="99" y="280" width="9" height="14"/>
144      </bezel>
145      <bezel name="vfd12" element="vfd0" state="0">
146         <bounds x="108" y="280" width="9" height="14"/>
147      </bezel>
148      <bezel name="vfd13" element="vfd0" state="0">
149         <bounds x="117" y="280" width="9" height="14"/>
150      </bezel>
151      <bezel name="vfd14" element="vfd0" state="0">
152         <bounds x="126" y="280" width="9" height="14"/>
153      </bezel>
154      <bezel name="vfd15" element="vfd0" state="0">
155         <bounds x="135" y="280" width="9" height="14"/>
156      </bezel>
104157      <screen index="0">
105158         <bounds x="0" y="0" width="400" height="280" />
106159      </screen>
107      <screen index="1">
108         <bounds x="0" y="280" width="144" height="14" />
109      </screen>
110160   </view>
111161</mamelayout>
112162
src/mame/layout/connect4.lay
r778r779
8686         <bounds x="0" y="0.1" width="1" height="0.8" />
8787      </text>
8888   </element>
89   <element name="vfd0">
90   <led16segsc>
91         <color red="0" green="0.6" blue="1.0" />
92   </led16segsc>
93   </element>
8994
9095   <view name="Classic graphics and VFD">
9196      <backdrop name="lamp96" element="greenpiece" state="0">
r778r779
539544      <backdrop name="lamp123" element="drop" state="0">
540545         <bounds x="20" y="90" width="28" height="14"/>
541546      </backdrop>
542      <screen index="0">
543         <bounds x="0" y="120" width="144" height="14" />
544      </screen>
547      <backdrop name="vfd0" element="vfd0" state="0">
548         <bounds x="0" y="120" width="9" height="14"/>
549      </backdrop>
550      <backdrop name="vfd1" element="vfd0" state="0">
551         <bounds x="9" y="120" width="9" height="14"/>
552      </backdrop>
553      <backdrop name="vfd2" element="vfd0" state="0">
554         <bounds x="18" y="120" width="9" height="14"/>
555      </backdrop>
556      <backdrop name="vfd3" element="vfd0" state="0">
557         <bounds x="27" y="120" width="9" height="14"/>
558      </backdrop>
559      <backdrop name="vfd4" element="vfd0" state="0">
560         <bounds x="36" y="120" width="9" height="14"/>
561      </backdrop>
562      <backdrop name="vfd5" element="vfd0" state="0">
563         <bounds x="45" y="120" width="9" height="14"/>
564      </backdrop>
565      <backdrop name="vfd6" element="vfd0" state="0">
566         <bounds x="54" y="120" width="9" height="14"/>
567      </backdrop>
568      <backdrop name="vfd7" element="vfd0" state="0">
569         <bounds x="63" y="120" width="9" height="14"/>
570      </backdrop>
571      <backdrop name="vfd8" element="vfd0" state="0">
572         <bounds x="72" y="120" width="9" height="14"/>
573      </backdrop>
574      <backdrop name="vfd9" element="vfd0" state="0">
575         <bounds x="81" y="120" width="9" height="14"/>
576      </backdrop>
577      <backdrop name="vfd10" element="vfd0" state="0">
578         <bounds x="90" y="120" width="9" height="14"/>
579      </backdrop>
580      <backdrop name="vfd11" element="vfd0" state="0">
581         <bounds x="99" y="120" width="9" height="14"/>
582      </backdrop>
583      <backdrop name="vfd12" element="vfd0" state="0">
584         <bounds x="108" y="120" width="9" height="14"/>
585      </backdrop>
586      <backdrop name="vfd13" element="vfd0" state="0">
587         <bounds x="117" y="120" width="9" height="14"/>
588      </backdrop>
589      <backdrop name="vfd14" element="vfd0" state="0">
590         <bounds x="126" y="120" width="9" height="14"/>
591      </backdrop>
592      <backdrop name="vfd15" element="vfd0" state="0">
593         <bounds x="135" y="120" width="9" height="14"/>
594      </backdrop>
545595   </view>
546596</mamelayout>
547597
598
src/mame/layout/pokio.lay
r778r779
7979         <bounds x="0" y="0.1" width="1" height="0.8" />
8080      </text>
8181   </element>
82   <element name="vfd0">
83   <led14segsc>
84         <color red="0" green="0.6" blue="1.0" />
85   </led14segsc>
86   </element>
8287
8388   <view name="Adder,VFD and Lamps">
8489      <bezel name="lamp0" element="hand1">
r778r779
111116      <bezel name="door" element="door0">
112117         <bounds x="369" y="260" width="26" height="14" />
113118      </bezel>
119      <bezel name="vfd0" element="vfd0" state="0">
120         <bounds x="0" y="280" width="9" height="14"/>
121      </bezel>
122      <bezel name="vfd1" element="vfd0" state="0">
123         <bounds x="9" y="280" width="9" height="14"/>
124      </bezel>
125      <bezel name="vfd2" element="vfd0" state="0">
126         <bounds x="18" y="280" width="9" height="14"/>
127      </bezel>
128      <bezel name="vfd3" element="vfd0" state="0">
129         <bounds x="27" y="280" width="9" height="14"/>
130      </bezel>
131      <bezel name="vfd4" element="vfd0" state="0">
132         <bounds x="36" y="280" width="9" height="14"/>
133      </bezel>
134      <bezel name="vfd5" element="vfd0" state="0">
135         <bounds x="45" y="280" width="9" height="14"/>
136      </bezel>
137      <bezel name="vfd6" element="vfd0" state="0">
138         <bounds x="54" y="280" width="9" height="14"/>
139      </bezel>
140      <bezel name="vfd7" element="vfd0" state="0">
141         <bounds x="63" y="280" width="9" height="14"/>
142      </bezel>
143      <bezel name="vfd8" element="vfd0" state="0">
144         <bounds x="72" y="280" width="9" height="14"/>
145      </bezel>
146      <bezel name="vfd9" element="vfd0" state="0">
147         <bounds x="81" y="280" width="9" height="14"/>
148      </bezel>
149      <bezel name="vfd10" element="vfd0" state="0">
150         <bounds x="90" y="280" width="9" height="14"/>
151      </bezel>
152      <bezel name="vfd11" element="vfd0" state="0">
153         <bounds x="99" y="280" width="9" height="14"/>
154      </bezel>
155      <bezel name="vfd12" element="vfd0" state="0">
156         <bounds x="108" y="280" width="9" height="14"/>
157      </bezel>
158      <bezel name="vfd13" element="vfd0" state="0">
159         <bounds x="117" y="280" width="9" height="14"/>
160      </bezel>
161      <bezel name="vfd14" element="vfd0" state="0">
162         <bounds x="126" y="280" width="9" height="14"/>
163      </bezel>
164      <bezel name="vfd15" element="vfd0" state="0">
165         <bounds x="135" y="280" width="9" height="14"/>
166      </bezel>
114167      <screen index="0">
115168         <bounds x="0" y="0" width="400" height="280" />
116169      </screen>
117      <screen index="1">
118         <bounds x="0" y="280" width="144" height="14" />
119      </screen>
120170   </view>
121171</mamelayout>
122172
src/mame/drivers/rcasino.c
r778r779
103103VIDEO_START(rcasino)
104104{
105105   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows,
106      TILEMAP_OPAQUE, 8, 8, 32, 32);
106      TILEMAP_TYPE_OPAQUE, 8, 8, 32, 32);
107107}
108108
109109VIDEO_UPDATE(rcasino)
src/mame/drivers/mgolf.c
r778r779
3434
3535static VIDEO_START( mgolf )
3636{
37   bg_tilemap = tilemap_create(get_tile_info, tilemap_scan_rows, TILEMAP_OPAQUE, 8, 8, 32, 32);
37   bg_tilemap = tilemap_create(get_tile_info, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE, 8, 8, 32, 32);
3838}
3939
4040
src/mame/drivers/cshooter.c
r778r779
138138
139139VIDEO_START(cshooter)
140140{
141   cshooter_txtilemap = tilemap_create(get_cstx_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,32, 32);
141   cshooter_txtilemap = tilemap_create(get_cstx_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,32, 32);
142142   tilemap_set_transparent_pen(cshooter_txtilemap, 3);
143143}
144144
src/mame/drivers/coinmstr.c
r778r779
535535
536536VIDEO_START( coinmstr )
537537{
538   bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE, 8, 8, 46, 64);
538   bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE, 8, 8, 46, 64);
539539}
540540
541541VIDEO_UPDATE( coinmstr )
src/mame/drivers/hitme.c
r778r779
5555
5656static VIDEO_START(hitme)
5757{
58   hitme_tilemap = tilemap_create(get_hitme_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE, 8,10, 40,19);
58   hitme_tilemap = tilemap_create(get_hitme_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE, 8,10, 40,19);
5959}
6060
6161
6262static VIDEO_START(barricad)
6363{
64   hitme_tilemap = tilemap_create(get_hitme_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE, 8,8, 32,24);
64   hitme_tilemap = tilemap_create(get_hitme_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE, 8,8, 32,24);
6565}
6666
6767
src/mame/drivers/cntsteer.c
r778r779
8181
8282VIDEO_START( zerotrgt )
8383{
84   bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,       TILEMAP_OPAQUE,     16,16,64,64);
85   fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows_flip_x,TILEMAP_TRANSPARENT, 8, 8,32,32);
84   bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,       TILEMAP_TYPE_OPAQUE,     16,16,64,64);
85   fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows_flip_x,TILEMAP_TYPE_TRANSPARENT, 8, 8,32,32);
8686
8787   tilemap_set_transparent_pen(fg_tilemap,0);
8888
src/mame/drivers/twincobr.c
r778r779
667667   MDRV_SCREEN_VBLANK_TIME(DEFAULT_REAL_60HZ_VBLANK_DURATION)
668668   MDRV_INTERLEAVE(100)
669669
670   MDRV_MACHINE_RESET(twincobr_reset)   /* Reset fshark bootleg 8741 MCU data */
670   MDRV_MACHINE_RESET(twincobr)   /* Reset fshark bootleg 8741 MCU data */
671671
672672   /* video hardware */
673673   MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER | VIDEO_UPDATE_BEFORE_VBLANK | VIDEO_BUFFERS_SPRITERAM)
src/mame/drivers/hornet.c
r778r779
323323
324324   if (chip == 0)
325325   {
326      K037122_layer[chip][0] = tilemap_create(K037122_0_tile_info_layer0, tilemap_scan_rows, TILEMAP_TRANSPARENT, 8, 8, 256, 64);
327      K037122_layer[chip][1] = tilemap_create(K037122_0_tile_info_layer1, tilemap_scan_rows, TILEMAP_TRANSPARENT, 8, 8, 128, 64);
326      K037122_layer[chip][0] = tilemap_create(K037122_0_tile_info_layer0, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 8, 8, 256, 64);
327      K037122_layer[chip][1] = tilemap_create(K037122_0_tile_info_layer1, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 8, 8, 128, 64);
328328   }
329329   else
330330   {
331      K037122_layer[chip][0] = tilemap_create(K037122_1_tile_info_layer0, tilemap_scan_rows, TILEMAP_TRANSPARENT, 8, 8, 256, 64);
332      K037122_layer[chip][1] = tilemap_create(K037122_1_tile_info_layer1, tilemap_scan_rows, TILEMAP_TRANSPARENT, 8, 8, 128, 64);
331      K037122_layer[chip][0] = tilemap_create(K037122_1_tile_info_layer0, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 8, 8, 256, 64);
332      K037122_layer[chip][1] = tilemap_create(K037122_1_tile_info_layer1, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 8, 8, 128, 64);
333333   }
334334
335335   tilemap_set_transparent_pen(K037122_layer[chip][0], 0);
src/mame/drivers/mwarr.c
r778r779
311311
312312VIDEO_START( mwarr )
313313{
314   bg_tilemap    = tilemap_create(get_bg_tile_info,   tilemap_scan_cols,TILEMAP_OPAQUE,      16, 16,64,16);
315   mlow_tilemap  = tilemap_create(get_mlow_tile_info, tilemap_scan_cols,TILEMAP_TRANSPARENT, 16, 16,64,16);
316   mhigh_tilemap = tilemap_create(get_mhigh_tile_info,tilemap_scan_cols,TILEMAP_TRANSPARENT, 16, 16,64,16);
317   tx_tilemap    = tilemap_create(get_tx_tile_info,   tilemap_scan_rows,TILEMAP_TRANSPARENT,  8,  8,64,32);
314   bg_tilemap    = tilemap_create(get_bg_tile_info,   tilemap_scan_cols,TILEMAP_TYPE_OPAQUE,      16, 16,64,16);
315   mlow_tilemap  = tilemap_create(get_mlow_tile_info, tilemap_scan_cols,TILEMAP_TYPE_TRANSPARENT, 16, 16,64,16);
316   mhigh_tilemap = tilemap_create(get_mhigh_tile_info,tilemap_scan_cols,TILEMAP_TYPE_TRANSPARENT, 16, 16,64,16);
317   tx_tilemap    = tilemap_create(get_tx_tile_info,   tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,  8,  8,64,32);
318318
319319   sprites_buffer = auto_malloc(sizeof(UINT16) * 0x800);
320320
src/mame/drivers/vroulet.c
r778r779
8787VIDEO_START(vroulet)
8888{
8989   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows,
90      TILEMAP_OPAQUE, 8, 8, 32, 32);
90      TILEMAP_TYPE_OPAQUE, 8, 8, 32, 32);
9191}
9292
9393VIDEO_UPDATE(vroulet)
src/mame/drivers/powerins.c
r778r779
9393   AM_RANGE(0x10000a, 0x10000b) AM_READ(input_port_3_word_r      )   // DSW 2
9494   AM_RANGE(0x10003e, 0x10003f) AM_READ(OKIM6295_status_0_lsb_r   )   // OKI Status (used by powerina)
9595   AM_RANGE(0x120000, 0x120fff) AM_READ(MRA16_RAM            )   // Palette
96/**/AM_RANGE(0x130000, 0x130007) AM_READ(MRA16_RAM            )   // VRAM 0 Control
96   AM_RANGE(0x130000, 0x130007) AM_READ(MRA16_RAM            )   // VRAM 0 Control
9797   AM_RANGE(0x140000, 0x143fff) AM_READ(MRA16_RAM            )   // VRAM 0
9898   AM_RANGE(0x170000, 0x170fff) AM_READ(MRA16_RAM            )   // VRAM 1
9999   AM_RANGE(0x180000, 0x18ffff) AM_READ(MRA16_RAM            )   // RAM + Sprites
r778r779
186186   PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)
187187   PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2)
188188
189   PORT_START   // IN2 - $100008 - DSW 1
190   PORT_DIPNAME( 0x0001, 0x0001, DEF_STR( Free_Play ) )
189   PORT_START_TAG("DSW1")   // IN2 - $100008 - DSW 1
190   PORT_DIPNAME( 0x0001, 0x0001, DEF_STR( Free_Play ) )      PORT_DIPLOCATION("SW1:8")
191191   PORT_DIPSETTING(      0x0001, DEF_STR( Off ) )
192192   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
193   PORT_DIPNAME( 0x000e, 0x000e, DEF_STR( Coin_A ) )
193   PORT_DIPNAME( 0x000e, 0x000e, DEF_STR( Coin_B ) )         PORT_DIPLOCATION("SW1:7,6,5")
194194   PORT_DIPSETTING(      0x0008, DEF_STR( 4C_1C ) )
195195   PORT_DIPSETTING(      0x0004, DEF_STR( 3C_1C ) )
196196   PORT_DIPSETTING(      0x000c, DEF_STR( 2C_1C ) )
197//  PORT_DIPSETTING(      0x0000, DEF_STR( 2C_1C ) ) /* 2C to start, 1C to continue */
197  PORT_DIPSETTING(      0x0000, "2 Coins/1 Credit (1 to continue)" )
198198   PORT_DIPSETTING(      0x000e, DEF_STR( 1C_1C ) )
199199   PORT_DIPSETTING(      0x0006, DEF_STR( 1C_2C ) )
200200   PORT_DIPSETTING(      0x000a, DEF_STR( 1C_3C ) )
201201   PORT_DIPSETTING(      0x0002, DEF_STR( 1C_4C ) )
202   PORT_DIPNAME( 0x0070, 0x0070, DEF_STR( Coin_B ) )
202   PORT_DIPNAME( 0x0070, 0x0070, DEF_STR( Coin_A ) )         PORT_DIPLOCATION("SW1:4,3,2")
203203   PORT_DIPSETTING(      0x0040, DEF_STR( 4C_1C ) )
204204   PORT_DIPSETTING(      0x0020, DEF_STR( 3C_1C ) )
205205   PORT_DIPSETTING(      0x0060, DEF_STR( 2C_1C ) )
206//  PORT_DIPSETTING(      0x0000, DEF_STR( 2C_1C ) ) /* 2C to start, 1C to continue */
206  PORT_DIPSETTING(      0x0000, "2 Coins/1 Credit (1 to continue)" )
207207   PORT_DIPSETTING(      0x0070, DEF_STR( 1C_1C ) )
208208   PORT_DIPSETTING(      0x0030, DEF_STR( 1C_2C ) )
209209   PORT_DIPSETTING(      0x0050, DEF_STR( 1C_3C ) )
210210   PORT_DIPSETTING(      0x0010, DEF_STR( 1C_4C ) )
211   PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Flip_Screen ) )
211   PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Flip_Screen ) )    PORT_DIPLOCATION("SW1:1")
212212   PORT_DIPSETTING(      0x0080, DEF_STR( Off ) )
213213   PORT_DIPSETTING(      0x0000, DEF_STR( On )  )
214214
215   PORT_START   // IN3 - $10000a - DSW 2
216   PORT_DIPNAME( 0x0001, 0x0001, "Coin Chutes" )
215   PORT_START_TAG("DSW2")   // IN3 - $10000a - DSW 2
216   PORT_DIPNAME( 0x0001, 0x0001, "Coin Chutes" )             PORT_DIPLOCATION("SW2:8")
217217   PORT_DIPSETTING(      0x0001, "1 Chute" )
218218   PORT_DIPSETTING(      0x0000, "2 Chutes" )
219   PORT_DIPNAME( 0x0002, 0x0002, "Join In Mode" )
220   PORT_DIPSETTING(      0x0000, DEF_STR( Off ) )
221   PORT_DIPSETTING(      0x0002, DEF_STR( On ) )
219   PORT_DIPNAME( 0x0002, 0x0002, "Join In Mode" )            PORT_DIPLOCATION("SW2:7")
220   PORT_DIPSETTING(      0x0002, DEF_STR( Off ) )
221   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
222222/*
223223    In "Join In" mode, a second player can join even if one player has aready
224224    begun to play.  Please refer to chart below:
225225
226226    Join In Mode    Credit          Join In     Game Over
227227    -----------------------------------------------------------------------------------------------
228    Join In ON  1C per Player       Anytime     Winner of VS Plays Computer
229    Join In OFF 1C = VS Mode 2 players  Cannot      After win VS Game Over for both players
228    Join In OFF 1C per Player       Anytime     Winner of VS Plays Computer
229    Join In ON  1C = VS Mode 2 players  Cannot      After win VS Game Over for both players
230230
231231*/
232   PORT_DIPNAME( 0x0004, 0x0000, DEF_STR( Demo_Sounds ) )
232   PORT_DIPNAME( 0x0004, 0x0000, DEF_STR( Demo_Sounds ) )    PORT_DIPLOCATION("SW2:6")
233233   PORT_DIPSETTING(      0x0004, DEF_STR( Off ) )
234234   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
235   PORT_DIPNAME( 0x0008, 0x0008, DEF_STR( Allow_Continue ) )
235   PORT_DIPNAME( 0x0008, 0x0008, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("SW2:5")
236236   PORT_DIPSETTING(      0x0000, DEF_STR( Off ) )
237237   PORT_DIPSETTING(      0x0008, DEF_STR( On ) )
238   PORT_DIPNAME( 0x0010, 0x0010, "Blood Color" )
238   PORT_DIPNAME( 0x0010, 0x0010, "Blood Color" )             PORT_DIPLOCATION("SW2:4")
239239   PORT_DIPSETTING(      0x0010, "Red" )
240240   PORT_DIPSETTING(      0x0000, "Blue" )
241   PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Game_Time ) )
241   PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Game_Time ) )      PORT_DIPLOCATION("SW2:3")
242242   PORT_DIPSETTING(      0x0020, DEF_STR( Normal ) )
243243   PORT_DIPSETTING(      0x0000, "Short" )
244   PORT_DIPNAME( 0x00c0, 0x00c0, DEF_STR( Difficulty ) )
244   PORT_DIPNAME( 0x00c0, 0x00c0, DEF_STR( Difficulty ) )     PORT_DIPLOCATION("SW2:2,1")
245245   PORT_DIPSETTING(      0x0040, DEF_STR( Easy ) )
246246   PORT_DIPSETTING(      0x00c0, DEF_STR( Normal ) )
247247   PORT_DIPSETTING(      0x0080, DEF_STR( Hard ) )
248248   PORT_DIPSETTING(      0x0000, DEF_STR( Hardest ) )
249249INPUT_PORTS_END
250250
251INPUT_PORTS_START( powerinj )
252   PORT_INCLUDE(powerins)
251253
254   PORT_MODIFY("DSW2")
255   PORT_DIPNAME( 0x0001, 0x0001, DEF_STR( Unknown ) )        PORT_DIPLOCATION("SW2:8")
256   PORT_DIPSETTING(      0x0001, DEF_STR( Off ) )
257   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
258INPUT_PORTS_END
252259
260
261
253262/***************************************************************************
254263
255264                                Graphics Layouts
r778r779
671680   ROM_LOAD( "82s147.bin", 0x0020, 0x0200, CRC(d7818542) SHA1(e94f8004c804f260874a117d59dfa0637c5d3d73) )
672681ROM_END
673682
674/* set only contained the 2 program roms */
675ROM_START( powernjb )
676   ROM_REGION( 0x100000, REGION_CPU1, 0 )      /* 68000 Code */
677   /* 32_WORD on a 68k? strange, maybe the bootleg was just hooked up in an unusual way */
678   ROM_LOAD32_WORD( "j21.a3", 0x000000, 0x80000, CRC(59594382) SHA1(de89257f15cbd3051d15d4496e8f0105ae8810e3) )
679   ROM_LOAD32_WORD( "j22.a3", 0x000002, 0x80000, CRC(598e47e3) SHA1(86b216b52bbe77baf957917d16baf1180a120088) )
680683
681   ROM_REGION( 0x20000, REGION_CPU2, 0 )      /* Z80 Code */
682   ROM_LOAD( "1f.bin",  0x000000, 0x20000, CRC(4b123cc6) SHA1(ed61d3a2ab20c86b91fd7bafa717be3ce26159be) )
683
684   ROM_REGION( 0x280000, REGION_GFX1, ROMREGION_DISPOSE )   /* Layer 0 */
685   ROM_LOAD( "13k.bin", 0x000000, 0x80000, CRC(1975b4b8) SHA1(cb400967744fa602df1bd2d88950dfdbdc77073f) )
686   ROM_LOAD( "13l.bin", 0x080000, 0x80000, CRC(376e4919) SHA1(12baa17382c176838df1b5ef86f1fa6dbcb978dd) )
687   ROM_LOAD( "13o.bin", 0x100000, 0x80000, CRC(0d5ff532) SHA1(4febdb9cdacd85903a4a28e8df945dee0ce85558) )
688   ROM_LOAD( "13q.bin", 0x180000, 0x80000, CRC(99b25791) SHA1(82f4bb5780826773d2e5f7143afb3ba209f57652) )
689   ROM_LOAD( "13r.bin", 0x200000, 0x80000, CRC(2dd76149) SHA1(975e4d371fdfbbd9a568da4d4c91ffd3f0ae636e) )
690
691   ROM_REGION( 0x100000, REGION_GFX2, ROMREGION_DISPOSE )   /* Layer 1 */
692   ROM_LOAD( "6n.bin", 0x000000, 0x20000, CRC(6a579ee0) SHA1(438e87b930e068e0cf7352e614a14049ebde6b8a) )
693
694   ROM_REGION( 0x800000, REGION_GFX3, ROMREGION_DISPOSE )   /* Sprites */
695   ROM_LOAD16_BYTE( "14g.bin", 0x000000, 0x80000, CRC(8b9b89c9) SHA1(f1d39d1a62e40a14642d8f22fc38b764465a8daa) )
696   ROM_LOAD16_BYTE( "11g.bin", 0x000001, 0x80000, CRC(4d127bdf) SHA1(26a7c277e7660a7c7c0c11cacadf815d2487ba8a) )
697   ROM_LOAD16_BYTE( "13g.bin", 0x100000, 0x80000, CRC(298eb50e) SHA1(2b922c1473bb559a1e8bd6221619141658179bb9) )
698   ROM_LOAD16_BYTE( "11i.bin", 0x100001, 0x80000, CRC(57e6d283) SHA1(4701576c8663ba47f388a02e61ef078a9dbbd212) )
699   ROM_LOAD16_BYTE( "12g.bin", 0x200000, 0x80000, CRC(fb184167) SHA1(20924d3f35509f2f6af61f565b852ea72326d02c) )
700   ROM_LOAD16_BYTE( "11j.bin", 0x200001, 0x80000, CRC(1b752a4d) SHA1(1b13f28af208542bee9da298d6e9db676cbc0845) )
701   ROM_LOAD16_BYTE( "14m.bin", 0x300000, 0x80000, CRC(2f26ba7b) SHA1(026f960fa4de09ed940dd83a3db467c3676c5024) )
702   ROM_LOAD16_BYTE( "11k.bin", 0x300001, 0x80000, CRC(0263d89b) SHA1(526b8ed05dffcbe98a44372bd55ad7b0ba91fc0f) )
703   ROM_LOAD16_BYTE( "14n.bin", 0x400000, 0x80000, CRC(c4633294) SHA1(9578f516eaf09e743ee0262ce227f811bea1be8f) )
704   ROM_LOAD16_BYTE( "11l.bin", 0x400001, 0x80000, CRC(5e4b5655) SHA1(f86509e75ec0c68f728715a5a325f6d1a30cfd93) )
705   ROM_LOAD16_BYTE( "14p.bin", 0x500000, 0x80000, CRC(4d4b0e4e) SHA1(782c5edc533f10757cb18d2411046e44aa075ba1) )
706   ROM_LOAD16_BYTE( "11o.bin", 0x500001, 0x80000, CRC(7e9f2d2b) SHA1(cfee03c38a6c781ad370638748244a164b83d588) )
707   ROM_LOAD16_BYTE( "13p.bin", 0x600000, 0x80000, CRC(0e7671f2) SHA1(301af5c4229451cba9fdf40285dd7243626ffed4) )
708   ROM_LOAD16_BYTE( "11p.bin", 0x600001, 0x80000, CRC(ee59b1ec) SHA1(437bc50c3b32c2edee549f5021345f1c924896b4) )
709   ROM_LOAD16_BYTE( "12p.bin", 0x700000, 0x80000, CRC(9ab1998c) SHA1(fadaa4a46cefe0093ee1ebeddbae63143fa7bb5a) )
710   ROM_LOAD16_BYTE( "11q.bin", 0x700001, 0x80000, CRC(1ab0c88a) SHA1(8bc72732f5911e0d4e0cf12fd2fb12d67e03299e) )
711
712   ROM_REGION( 0x240000, REGION_SOUND1, 0 )   /* 8 bit adpcm (banked) */
713   ROM_LOAD( "4a.bin", 0x040000, 0x80000, CRC(8cd6824e) SHA1(aa6d8917558de4f2aa8d80527209b9fe91122eb3) )
714   ROM_LOAD( "4b.bin", 0x0c0000, 0x80000, CRC(e31ae04d) SHA1(c08d58a4250d8bdb68b8e5012624f345936520e1) )
715   ROM_LOAD( "4c.bin", 0x140000, 0x80000, CRC(c4c9f599) SHA1(1d74acd626406052bec533a918ca24e14a2578f2) )
716   ROM_LOAD( "4d.bin", 0x1c0000, 0x80000, CRC(f0a9f0e1) SHA1(4221e0824cdc8bcd6ea1c3811f4e3b7cd99478f2) )
717
718   ROM_REGION( 0x240000, REGION_SOUND2, 0 )   /* 8 bit adpcm (banked) */
719   ROM_LOAD( "5a.bin", 0x040000, 0x80000, CRC(62557502) SHA1(d72abdaec1c6f55f9b0099b7a8a297e0e14f920c) )
720   ROM_LOAD( "5b.bin", 0x0c0000, 0x80000, CRC(dbc86bd7) SHA1(6f1bc3c7e6976fdcd4b2341cea07002fb0cefb14) )
721   ROM_LOAD( "5c.bin", 0x140000, 0x80000, CRC(5839a2bd) SHA1(53988086ef97b2671044f6da9d97b1886900b64d) )
722   ROM_LOAD( "5d.bin", 0x1c0000, 0x80000, CRC(446f9dc3) SHA1(5c81eb9a7cbea995db9a10d3b6460d02e104825f) )
723
724   ROM_REGION( 0x0220, REGION_PROMS, 0 )      /* unknown */
725   ROM_LOAD( "82s123.bin", 0x0000, 0x0020, CRC(67d5ec4b) SHA1(87d32948a0c88277dcdd0eaa035bde40fc7db5fe) )
726   ROM_LOAD( "82s147.bin", 0x0020, 0x0200, CRC(d7818542) SHA1(e94f8004c804f260874a117d59dfa0637c5d3d73) )
727ROM_END
728
729
730684/* all supported sets give a 93.10.20 date */
731GAME( 1993, powerins, 0,        powerins, powerins, 0, ROT0, "Atlus", "Gouketsuji Ichizoku (Japan)", 0 )
685GAME( 1993, powerins, 0,        powerins, powerinj, 0, ROT0, "Atlus", "Gouketsuji Ichizoku (Japan)", 0 )
732686GAME( 1993, powerina, powerins, powerina, powerins, 0, ROT0, "Atlus", "Power Instinct (USA, bootleg set 1)", 0 )
733687GAME( 1993, powerinb, powerins, powerinb, powerins, 0, ROT0, "Atlus", "Power Instinct (USA, bootleg set 2)", 0 )
734GAME( 1993, powernjb, powerins, powerinb, powerins, 0, ROT0, "Atlus", "Gouketsuji Ichizoku (Japan, bootleg)", 0 )
src/mame/drivers/bfm_sc2.c
r778r779
147147#include "machine/steppers.h" // stepper motor
148148
149149#include "machine/lamps.h"
150#include "machine/vacfdisp.h"  // vfd
150#include "machine/bfm_bd1.h"  // vfd
151151#include "machine/mmtr.h"
152152
153153#include "bfm_sc2.lh"
r778r779
328328   watchdog_kicked = 0;
329329
330330
331   vfd_reset(0);   // reset display1
332   vfd_reset(1);   // reset display2
331   bfm_bd1_reset(0);   // reset display1
332   bfm_bd1_reset(1);   // reset display2
333333
334334   e2ram_reset();
335335
r778r779
441441
442442///////////////////////////////////////////////////////////////////////////
443443
444static NVRAM_HANDLER( nvram )
444static NVRAM_HANDLER( bfm_sc2 )
445445{
446446   if ( read_or_write )
447447   {   // writing
r778r779
10841084static WRITE8_HANDLER( vfd1_data_w )
10851085{
10861086   vfd1_latch = data;
1087   vfd_newdata(0, data);
1087   bfm_bd1_newdata(0, data);
10881088}
10891089
10901090///////////////////////////////////////////////////////////////////////////
r778r779
10921092static WRITE8_HANDLER( vfd2_data_w )
10931093{
10941094   vfd2_latch = data;
1095   vfd_newdata(1, data);
1095   bfm_bd1_newdata(1, data);
10961096}
10971097
10981098///////////////////////////////////////////////////////////////////////////
10991099
11001100static WRITE8_HANDLER( vfd_reset_w )
11011101{
1102   vfd_reset(0);     // reset both VFD's
1103   vfd_reset(1);
1102   bfm_bd1_reset(0);     // reset both VFD's
1103   bfm_bd1_reset(1);
11041104}
11051105
11061106///////////////////////////////////////////////////////////////////////////
r778r779
16071607      output_set_value("door",( Scorpion2_GetSwitchState(sc2_door_state>>4, sc2_door_state & 0x0F) ) );
16081608   }
16091609
1610   if (screen == 1)
1610   if ( sc2_show_vfd_display )//Configuration switch on, indicating VFD present
16111611   {
1612      if ( sc2_show_vfd_display )//Configuration switch on, indicating VFD present
1613      {
1614         vfd_draw_14seg(bitmap,0,3,1);
1615      }
1616      else
1617      {
1618         vfd_draw_14seg(bitmap,0,0,0);//Keep receiving the data, but show nothing, like real h/w
1619      }
1612      bfm_bd1_draw(0);
16201613   }
16211614   return video_update_adder2(machine,screen,bitmap,cliprect);
16221615}
r778r779
31323125   MDRV_CPU_ADD_TAG("main", M6809, 2000000 )            // 6809 CPU at 2 Mhz
31333126   MDRV_CPU_PROGRAM_MAP(memmap_vid,0)               // setup scorpion2 board memorymap
31343127   MDRV_CPU_PERIODIC_INT(timer_irq, 1000)            // generate 1000 IRQ's per second
3135   MDRV_NVRAM_HANDLER(nvram)
3128   MDRV_NVRAM_HANDLER(bfm_sc2)
31363129   MDRV_DEFAULT_LAYOUT(layout_bfm_sc2)
31373130
31383131   MDRV_SCREEN_ADD("ADDER", 0x000)
r778r779
31453138   MDRV_VIDEO_RESET( adder2)
31463139   MDRV_VIDEO_UPDATE(addersc2)
31473140
3148   MDRV_SCREEN_ADD("VFD", 0x000)
3149   MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
3150   MDRV_SCREEN_REFRESH_RATE(50)
3151   MDRV_SCREEN_SIZE( 288, 34)
3152   MDRV_SCREEN_VISIBLE_AREA(  0, 288-1, 0, 34-1)
3153
31543141   MDRV_PALETTE_LENGTH(16)
31553142   MDRV_COLORTABLE_LENGTH(16)
31563143   MDRV_PALETTE_INIT(adder2)
r778r779
34983485GAMEL( 1994, pokio,    0,        scorpion2_vid, pokio,     adder_dutch,0,       "BFM/ELAM", "Pokio (Dutch, Game Card 95-750-278)",         GAME_SUPPORTS_SAVE,layout_pokio )
34993486GAMEL( 1995, slotsnl,  0,        scorpion2_vid, slotsnl,   adder_dutch,0,       "BFM/ELAM", "Slots (Dutch, Game Card 95-750-368)",         GAME_SUPPORTS_SAVE,layout_slots )
35003487GAMEL( 1995, paradice, 0,        scorpion2_vid, paradice,  adder_dutch,0,       "BFM/ELAM", "Paradice (Dutch, Game Card 95-750-615)",      GAME_SUPPORTS_SAVE,layout_paradice )
3501GAMEL( 1996, pyramid,  0,        scorpion2_vid, pyramid,   pyramid,0,       "BFM/ELAM", "Pyramid (Dutch, Game Card 95-750-898)",      GAME_SUPPORTS_SAVE,layout_pyramid )
3488GAMEL( 1996, pyramid,  0,        scorpion2_vid, pyramid,   pyramid,   0,       "BFM/ELAM", "Pyramid (Dutch, Game Card 95-750-898)",      GAME_SUPPORTS_SAVE,layout_pyramid )
35023489
35033490GAMEL( 1996, sltblgtk, 0,        scorpion2_vid, sltblgtk,  sltsbelg,   0,       "BFM/ELAM", "Slots (Belgian Token, Game Card 95-750-943)",   GAME_SUPPORTS_SAVE,layout_sltblgtk )
35043491GAMEL( 1996, sltblgpo, 0,         scorpion2_vid, sltblgpo,  sltsbelg,   0,       "BFM/ELAM", "Slots (Belgian Cash, Game Card 95-750-938)",   GAME_SUPPORTS_SAVE,layout_sltblgpo )
src/mame/drivers/witch.c
r778r779
681681
682682VIDEO_START(witch)
683683{
684   gfx0a_tilemap = tilemap_create(get_gfx0a_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,32,32);
685   gfx0b_tilemap = tilemap_create(get_gfx0b_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,32,32);
686   gfx1_tilemap = tilemap_create(get_gfx1_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,8,8,32,32);
684   gfx0a_tilemap = tilemap_create(get_gfx0a_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,32,32);
685   gfx0b_tilemap = tilemap_create(get_gfx0b_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,32,32);
686   gfx1_tilemap = tilemap_create(get_gfx1_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,8,8,32,32);
687687
688688   tilemap_set_transparent_pen(gfx0a_tilemap,0);
689689   tilemap_set_transparent_pen(gfx0b_tilemap,0);
src/mame/drivers/megadriv.c
r778r779
42244224int hazemdchoice_megadrive_region_pal;
42254225int hazemdchoice_megadriv_framerate;
42264226
4227MACHINE_RESET( megadriv_reset )
4227MACHINE_RESET( megadriv )
42284228{
42294229   /* default state of z80 = reset, with bus */
42304230   mame_printf_debug("Resetting Megadrive / Genesis\n");
r778r779
44924492
44934493   MDRV_SCREEN_REFRESH_RATE(60)
44944494   MDRV_SCREEN_VBLANK_TIME(TIME_IN_USEC(0)) // Vblank handled manually.
4495   MDRV_MACHINE_RESET(megadriv_reset)
4495   MDRV_MACHINE_RESET(megadriv)
44964496
44974497   MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER)
44984498   MDRV_SCREEN_FORMAT(BITMAP_FORMAT_RGB15)
src/mame/drivers/superdq.c
r778r779
5454
5555VIDEO_START( superdq )
5656{
57   superdq_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE, 8, 8, 32, 32);
57   superdq_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE, 8, 8, 32, 32);
5858
5959   add_exit_callback(machine, video_cleanup);
6060}
src/mame/drivers/bestleag.c
r778r779
7171
7272VIDEO_START(bestleag)
7373{
74   tx_tilemap = tilemap_create(get_tx_tile_info,tilemap_scan_cols,TILEMAP_TRANSPARENT,8,8,256, 32);
75   bg_tilemap = tilemap_create(get_bg_tile_info,bsb_bg_scan,TILEMAP_OPAQUE,16,16,128, 64);
76   fg_tilemap = tilemap_create(get_fg_tile_info,bsb_bg_scan,TILEMAP_TRANSPARENT,16,16,128, 64);
74   tx_tilemap = tilemap_create(get_tx_tile_info,tilemap_scan_cols,TILEMAP_TYPE_TRANSPARENT,8,8,256, 32);
75   bg_tilemap = tilemap_create(get_bg_tile_info,bsb_bg_scan,TILEMAP_TYPE_OPAQUE,16,16,128, 64);
76   fg_tilemap = tilemap_create(get_fg_tile_info,bsb_bg_scan,TILEMAP_TYPE_TRANSPARENT,16,16,128, 64);
7777
7878   tilemap_set_transparent_pen(tx_tilemap,15);
7979   tilemap_set_transparent_pen(fg_tilemap,15);
src/mame/drivers/cowrace.c
r778r779
3333VIDEO_START( cowrace )
3434{
3535   tmap = tilemap_create(   get_tile_info, tilemap_scan_rows,
36                     TILEMAP_TRANSPARENT, 8,8, 0x20,0x20   );
36                     TILEMAP_TYPE_TRANSPARENT, 8,8, 0x20,0x20   );
3737
3838   tilemap_set_transparent_pen(tmap, 0);
3939}
src/mame/drivers/koikoi.c
r778r779
211211
212212VIDEO_START(koikoi)
213213{
214   koikoi_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,8,8,32,32);
214   koikoi_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,8,8,32,32);
215215}
216216
217217VIDEO_UPDATE(koikoi)
src/mame/drivers/cybertnk.c
r778r779
192192
193193VIDEO_START( cybertnk )
194194{
195   tx_tilemap = tilemap_create(get_tx_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,8,8,128,32);
195   tx_tilemap = tilemap_create(get_tx_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,8,8,128,32);
196196}
197197
198198VIDEO_UPDATE( cybertnk )
src/mame/drivers/mpu4.c
r778r779
6868an anti-tampering device which helped to prevent the hacking of certain titles in a manner which broke UK gaming laws.
6969
7070One of the advantages of the hardware setup was that the developer could change the nature of the game card
71up to a point, adding extra lamp support, different amounts of RAM, and (in many cases) an OKI MSM6376 and related PIA and PTM
72for improved ADPCM sample support (This was eventually endorsed in the most recent official 'MOD' of the board)
71up to a point, adding extra lamp support, different amounts of RAM, and (in many cases) an OKI MSM6376 or Yamaha synth chip
72and related PIA and PTM for improved audio (This was eventually made the only way to generate sound in MOD4 of the hardware,
73when the AY8913 was removed from the main board)
7374
7475For the Barcrest MPU4 Video system, the cartridge contains the MPU4 video bios in the usual ROM space (occupying 16k), an interface
7576interface card to connect an additional Video board, and a 6850 serial IO to communicate with said board.
r778r779
270271#include "timer.h"
271272#include "cpu/m6809/m6809.h"
272273#include "sound/ay8910.h"
274#include "sound/flt_rc.h"
275#include "sound/2413intf.h"
273276#include "machine/lamps.h"      // lamp matrix
274277#include "machine/steppers.h"   // stepper motor
275#include "machine/vacfdisp.h"   // vfd
278#include "machine/roc10937.h"   // vfd
276279#include "machine/mmtr.h"
277280
278281// Video
r778r779
291294#define LOG_IC8(x)
292295#define LOGSTUFF(x)
293296#else
294#define LOG(x)
297#define LOG(x) logerror x
295298#define LOG_CHR(x)
296299#define LOG_IC3(x)
297300#define LOG_IC8(x)
r778r779
304307#define VIDEO_MASTER_CLOCK (10000000)
305308
306309// local vars /////////////////////////////////////////////////////////////
310static int mod_number;
307311static int mmtr_data;
308312static int alpha_data_line;
309313static int alpha_clock;
r778r779
330334static UINT8  lamp_data;
331335static UINT8  aydata;
332336
333const UINT8 chr_lut[72];
334UINT8 chr_data[72];
335UINT16 chr16_data[72];
337const UINT8 MPU4_chr_lut[72];
338UINT8 MPU4_chr_data[72];
336339static UINT8 led_segs[8];
337340static UINT8 Lamps[128];      // 128 multiplexed lamps
338341                        // 32  multiplexed inputs - but a further 8 possible per AUX.
r778r779
390393   output_set_digit_value(id,value);
391394}
392395
393static const UINT8 MPU4_matrix1[] =
394{   //1   2    3    4     5   6    8     9
395   0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
396   0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,
397   0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
398   0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,
399   0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
400   0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,
401   0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
402   0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07
403};
404
405static const UINT8 MPU4_matrix2[] =
406{
407   //10  11   12   13   14   15   16   17     -> drives (lamp strobe)
408   0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,//1
409   0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,//2 | selects (input strobe)
410   0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,//3 V
411   0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,//4
412   0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,//5
413   0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,//7
414   0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,//8
415   0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47 //9
416};
417
418396static void update_lamps(void)
419397{
420398   int i;
421399
422400   for (i=0; i<8; i++)
423401   {
424      Lamps[MPU4_matrix1[(8*input_strobe)+i]] = (lamp_strobe  & (1 << i)) != 0;
425      Lamps[MPU4_matrix2[(8*input_strobe)+i]] = (lamp_strobe2 & (1 << i)) != 0;
402      Lamps[(8*input_strobe)+i]    = (lamp_strobe  & (1 << i)) != 0;
403      Lamps[(8*input_strobe)+i+64] = (lamp_strobe2 & (1 << i)) != 0;
426404   }
427
405      Lamps_SetBrightness(0, 127, Lamps);
428406   //if ( input_strobe == 0 ) Lamps_SetBrightness(0, 127, Lamps); // update all lamps after strobe 0 has been updated, needs a new timer
429   Lamps_SetBrightness(0, 127, Lamps);
430407}
431408
432409static void mpu4_lamp_draw(void)
r778r779
455432
456433   if (screen == 0)
457434   {
458      vfd_draw_16seg(bitmap,0,3,9);
435      ROC10937_draw_16seg(0);
459436   }
460437
461438   for (i=0; i<8; i++)
r778r779
479456      mpu4_draw_led(8, pled_segs[0]);
480457      mpu4_draw_led(9, pled_segs[1]);
481458   }
482
483459   return 0;
484460}
485461// palette initialisation /////////////////////////////////////////////////
r778r779
516492
517493static MACHINE_RESET( mpu4 )
518494{
519   vfd_reset(0);   // reset display1
495   ROC10937_reset(0);   // reset display1
520496
521497   mpu4_stepper_reset();
522498
r778r779
549525
550526static MACHINE_RESET( mpu4_vid )
551527{
552   vfd_reset(0);   // reset display1
528   ROC10937_reset(0);   // reset display1
553529
554530//  cpunum_set_input_line(1, INPUT_LINE_HALT, ASSERT_LINE);
555531   mpu4_stepper_reset();
r778r779
614590{
615591   ptm6840_set_c1(   0, data); // copy output value to IC2 c1
616592
617   if (serial_card_connected)
618   {
619      m6809_m68k_line=data;
620   }
593/*  if (serial_card_connected)
594    {
595        m6809_m68k_line=data;
596    }*/
621597}
622598
623599static const ptm6840_interface ptm_ic2_intf =
r778r779
659635{
660636   LOG_IC3(("%04x IC3 PIA Write CB (alpha reset), %02X\n",activecpu_get_previouspc(),data&0xff));
661637
662   if ( data ) vfd_reset(0);
638   if ( data ) ROC10937_reset(0);
663639}
664640
665641// IC3, lamp data lines + alpha numeric display
r778r779
682658
683659static void ic23_update(void)
684660{
685   LOGSTUFF(("G2A %d G2B %d G1 %d \n",IC23G2A,IC23G2B,IC23G1));
686661   if (!IC23G2A)
687662   {
688663      if (!IC23G2B)
r778r779
905880static WRITE8_HANDLER( pia_ic6_porta_w )
906881{
907882   LOG(("%04x IC6 PIA Write A %2x\n", activecpu_get_previouspc(),data));
908     aydata = data;
909    update_ay();
883   if (mod_number <4)
884   {
885        aydata = data;
886       update_ay();
887   }
910888}
911889
912890static WRITE8_HANDLER( pia_ic6_ca2_w )
913891{
914   LOG(("%04x IC6 PIA write CA2 %2x (AY8912 BC1)\n", activecpu_get_previouspc(),data));
915
916   if ( data ) ay8913_address |=  0x01;
917   else        ay8913_address &= ~0x01;
918
919   update_ay();
892   LOG(("%04x IC6 PIA write CA2 %2x (AY8913 BC1)\n", activecpu_get_previouspc(),data));
893   if (mod_number <4)
894   {
895      if ( data ) ay8913_address |=  0x01;
896      else        ay8913_address &= ~0x01;
897      update_ay();
898   }
920899}
921900
922901static WRITE8_HANDLER( pia_ic6_cb2_w )
923902{
924   LOG(("%04x IC6 PIA write CB2 %2x (AY8912 BCDIR)\n", activecpu_get_previouspc(),data));
925
926   if ( data ) ay8913_address |=  0x02;
927   else        ay8913_address &= ~0x02;
928
929   update_ay();
903   LOG(("%04x IC6 PIA write CB2 %2x (AY8913 BCDIR)\n", activecpu_get_previouspc(),data));
904   if (mod_number <4)
905   {
906      if ( data ) ay8913_address |=  0x02;
907      else        ay8913_address &= ~0x02;
908      update_ay();
909   }
930910}
931911
932912static const pia6821_interface pia_ic6_intf =
r778r779
10251005
10261006static WRITE8_HANDLER( pia_ic8_portb_w )
10271007{
1008   int i;
10281009   LOG_IC8(("%04x IC8 PIA Port B Set to %2x (OUTPUT PORT, TRIACS)\n", activecpu_get_previouspc(),data));
1010   for (i=0; i<8; i++)
1011      if ( data & (1 << i) )      output_set_indexed_value("triac", i, data & (1 << i));
10291012}
10301013
10311014static WRITE8_HANDLER( pia_ic8_ca2_w )
r778r779
10421025
10431026   if ( !alpha_clock && (data) )
10441027   {
1045      vfd_shift_data(0, alpha_data_line&0x01?0:1);
1028      ROC10937_shift_data(0, alpha_data_line&0x01?0:1);
10461029   }
10471030   alpha_clock = data;
10481031}
r778r779
10541037   /*irqs   : A/B             */ cpu0_irq, cpu0_irq
10551038};
10561039
1040
10571041// Video
10581042
10591043/*************************************
r778r779
10741058    2 - 6850 ACIA
10751059    1 - 6840 PTM
10761060    0 - Unused
1077    So far, none of the games studied use any IRQ above 3
10781061*/
10791062
10801063static void update_mpu68_interrupts(void)
r778r779
23642347   pia_config(3,&pia_ic6_intf);
23652348   pia_config(4,&pia_ic7_intf);
23662349   pia_config(5,&pia_ic8_intf);
2350
23672351   freq_timer = mame_timer_alloc(freq_timeout);
23682352   ic24_timer = mame_timer_alloc(ic24_timeout);
23692353   // setup ptm ////////////////////////////////////////////////////////////
r778r779
23992383
24002384// setup the standard oki MSC1937 display ///////////////////////////////
24012385
2402   vfd_init(0, VFDTYPE_MSC1937,0);   // ?
2386   ROC10937_init(0, MSC1937,0);   // ?
24032387}
24042388
2405static MACHINE_START( mpu4 )
2389static MACHINE_START( mpu4mod2 )
24062390{
24072391   mpu4_config_common();
24082392   pia_reset();
24092393
24102394   serial_card_connected=0;
2411
2395   mod_number=2;
24122396// setup 128 lamps //////////////////////////////////////////////////////
24132397   Lamps_init(128);
24142398
r778r779
24222406   Stepper_init(3, BARCREST_48STEP_REEL);
24232407
24242408// setup the standard oki MSC1937 display ///////////////////////////////
2425   vfd_init(0, VFDTYPE_MSC1937,0);
2409   ROC10937_init(0, MSC1937,0);
2410   filter_rc_set_RC(0,FLT_RC_LOWPASS, 820,500,0,CAP_U(0.01));
24262411}
24272412
24282413/*
r778r779
24382423
24392424For most Barcrest games, the following method was used:
24402425
2441To calculate the values necessary to program the CHR, we must first find the version string,
2442which starts at ff28 and terminates at ff2f for club celebration (an AWP) ff2f then represents the CHR address.
2426To calculate the values necessary to program the CHR, we must first find the version string, taking
2427the example of an AWP called Club Celebration, this starts at 0xff28 and terminates at 0xff2f.
24280xff2f then represents the CHR address.
24432429For some reason, the tables always seem to start and end with '00 00'.
24442430
24452431From that point on, every word represents a call and response pair, until we have generated 8 8 byte rows of data.
r778r779
24792465   {
24802466      for ( x = prot_col; x < 64; x++ )
24812467      {
2482         if   (chr_lut[(x)] == call)
2468         if   (MPU4_chr_lut[(x)] == call)
24832469         {
24842470            prot_col = x;
24852471            LOG_CHR(("Characteriser find column %02X\n",prot_col));
r778r779
24982484      LOG_CHR(("Characteriser write 2 data %02X\n",data));
24992485      for ( x = lamp_col; x < 16; x++ )
25002486      {
2501         if   (chr_lut[(64+x)] == call)
2487         if   (MPU4_chr_lut[(64+x)] == call)
25022488         {
25032489            lamp_col = x;
25042490            LOG_CHR(("Characteriser find column %02X\n",lamp_col));
r778r779
25182504   if (offset == 0)
25192505   {
25202506      LOG_CHR(("Characteriser read data %02X \n",chr_data[prot_col]));
2521      return chr_data[prot_col];
2507      return MPU4_chr_data[prot_col];
25222508   }
25232509   if (offset == 3)
25242510   {
25252511      LOG_CHR(("Characteriser read data %02X \n",chr_data[lamp_col+64]));
2526      return chr_data[lamp_col+64];
2512      return MPU4_chr_data[lamp_col+64];
25272513   }
25282514   return 0;
25292515}
r778r779
25352521   LOG_CHR(("Characteriser write offset %02X data %02X\n",offset,data));
25362522   for ( x = prot_col; x < 64; x++ )
25372523   {
2538      if   (chr_lut[(x)] == call)
2524      if   (MPU4_chr_lut[(x)] == call)
25392525      {
25402526         prot_col = x;
25412527         LOG_CHR(("Characteriser find column %02X\n",prot_col));
r778r779
25502536{
25512537   LOG_CHR(("Characteriser read offset %02X \n",offset));
25522538   LOG_CHR(("Characteriser read data %02X \n",chr16_data[prot_col]));
2553   return chr16_data[prot_col];
2539   return MPU4_chr_data[prot_col];
25542540}
25552541
25562542// generate a 50 Hz signal (based on an RC time) //////////////////////////
r778r779
26402626   AM_RANGE(0xC000, 0xFFFF) AM_ROM   AM_REGION(REGION_CPU1,0)  // 64k EPROM on board, only this region read
26412627ADDRESS_MAP_END
26422628
2643static ADDRESS_MAP_START( memmap, ADDRESS_SPACE_PROGRAM, 8 )
2629static ADDRESS_MAP_START( mod2_memmap, ADDRESS_SPACE_PROGRAM, 8 )
26442630   AM_RANGE(0x0000, 0x07ff) AM_RAM AM_BASE(&generic_nvram) AM_SIZE(&generic_nvram_size)
26452631
2646   AM_RANGE(0x0800, 0x0810) AM_WRITE(characteriser_w)
2647   AM_RANGE(0x0800, 0x0810) AM_READ( characteriser_r)
2632//  AM_RANGE(0x0800, 0x0810) AM_WRITE(characteriser_w)
2633//  AM_RANGE(0x0800, 0x0810) AM_READ( characteriser_r)
26482634
26492635   AM_RANGE(0x0850, 0x0850) AM_WRITE(bankswitch_w)   // write bank (rom page select)
26502636
2651//  AM_RANGE(0x0880, 0x0883) AM_WRITE(pia_6_w)      // PIA6821 on game board
2652//c AM_RANGE(0x0880, 0x0883) AM_READ( pia_6_r)
2653
2654//  AM_RANGE(0x08C0, 0x08C7) AM_READ( ptm6840_1_r)  // 6840PTM on game board
2655//  AM_RANGE(0x08C0, 0x08C7) AM_WRITE(ptm6840_1_w)
2656
26572637//  AM_RANGE(0x08E0, 0x08E7) AM_READ( 68681_duart_r)
26582638//  AM_RANGE(0x08E0, 0x08E7) AM_WRITE( 68681_duart_w)
26592639
r778r779
27672747
27682748VIDEO_START(dealem)
27692749{
2770   dealem_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE, 8, 8,32,32);
2750   dealem_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE, 8, 8,32,32);
27712751}
27722752
27732753WRITE8_HANDLER( dealem_videoram_w )
r778r779
28382818   AM_RANGE(0x0F00, 0x0F03) AM_READ( pia_5_r)
28392819
28402820   AM_RANGE(0x1000, 0x3000) AM_WRITE(dealem_videoram_w) AM_BASE(&dealem_videoram)
2841   AM_RANGE(0xBE00, 0xffff) AM_ROM   AM_WRITENOP// 64k  paged ROM (4 pages)
2821   AM_RANGE(0xBE00, 0xFFFF) AM_ROM   AM_WRITENOP// 64k  paged ROM (4 pages)
28422822
28432823ADDRESS_MAP_END
28442824
r778r779
28692849   MDRV_PALETTE_LENGTH(16)
28702850
28712851   MDRV_SPEAKER_STANDARD_MONO("mono")
2872   MDRV_SOUND_ADD(AY8913, MPU4_MASTER_CLOCK/4)
2873   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
2852   MDRV_SOUND_ADD_TAG("AY8913",AY8913, MPU4_MASTER_CLOCK/4)
2853   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "filter1", 1.0)
2854   MDRV_SOUND_ADD_TAG("filter1", FILTER_RC, 0)
2855   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
28742856
28752857   MDRV_SPEAKER_STANDARD_STEREO("left", "right")// Present on all video cards
28762858   MDRV_SOUND_ADD(SAA1099, 8000000)
r778r779
28812863
28822864// machine driver for barcrest mpu4 board /////////////////////////////////
28832865
2884static MACHINE_DRIVER_START( mpu4 )
2866static MACHINE_DRIVER_START( mpu4mod2 )
28852867
2886   MDRV_MACHINE_START(mpu4)
2868   MDRV_MACHINE_START(mpu4mod2)
28872869   MDRV_MACHINE_RESET(mpu4)
28882870   MDRV_CPU_ADD_TAG("main", M6809, MPU4_MASTER_CLOCK/4)
2889   MDRV_CPU_PROGRAM_MAP(memmap,0)
2871   MDRV_CPU_PROGRAM_MAP(mod2_memmap,0)
28902872
28912873   MDRV_CPU_PERIODIC_INT(gen_50hz, 50)
28922874
28932875   MDRV_SPEAKER_STANDARD_MONO("mono")
2894   MDRV_SOUND_ADD(AY8913, MPU4_MASTER_CLOCK/4)
2895   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
2876   MDRV_SOUND_ADD_TAG("AY8913",AY8913, MPU4_MASTER_CLOCK/4)
2877   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "filter1", 1.0)
2878   MDRV_SOUND_ADD_TAG("filter1", FILTER_RC, 0)
2879   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
28962880
2897   MDRV_NVRAM_HANDLER(generic_0fill)
2881   MDRV_NVRAM_HANDLER(generic_0fill)               // load/save nv RAM
28982882   MDRV_DEFAULT_LAYOUT(layout_mpu4)
28992883   /* video hardware */
29002884   MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER)
r778r779
29142898
29152899static MACHINE_DRIVER_START( dealem )
29162900
2917   MDRV_MACHINE_START(mpu4)                     // main mpu4 board initialisation
2901   MDRV_MACHINE_START(mpu4mod2)                     // main mpu4 board initialisation
29182902   MDRV_MACHINE_RESET(mpu4_vid)
29192903   MDRV_CPU_ADD_TAG("main", M6809, MPU4_MASTER_CLOCK/4)// 6809 CPU
29202904   MDRV_CPU_PROGRAM_MAP(dealem_memmap,0)                  // setup read and write memorymap
r778r779
29262910   MDRV_SCREEN_VBLANK_TIME(DEFAULT_REAL_60HZ_VBLANK_DURATION)
29272911
29282912   MDRV_SPEAKER_STANDARD_MONO("mono")
2929   MDRV_SOUND_ADD(AY8913, MPU4_MASTER_CLOCK/4)
2930   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
2913   MDRV_SOUND_ADD_TAG("AY8913",AY8913, MPU4_MASTER_CLOCK/4)
2914   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "filter1", 1.0)
2915   MDRV_SOUND_ADD_TAG("filter1", FILTER_RC, 0)
2916   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
29312917
29322918   MDRV_NVRAM_HANDLER(generic_0fill)               // load/save nv RAM
29332919   /* video hardware */
r778r779
29462932
29472933MACHINE_DRIVER_END
29482934
2949   const UINT8 chr_lut[72]= {   0x00,0x1A,0x04,0x10,0x18,0x0F,0x13,0x1B,
2935   const UINT8 MPU4_chr_lut[72]= {   0x00,0x1A,0x04,0x10,0x18,0x0F,0x13,0x1B,
29502936                        0x03,0x07,0x17,0x1D,0x36,0x35,0x2B,0x28,
29512937                        0x39,0x21,0x22,0x25,0x2C,0x29,0x31,0x34,
29522938                        0x0A,0x1F,0x06,0x0E,0x1C,0x12,0x1E,0x0D,
r778r779
29712957
29722958   for (x=0; x < 72; x++)
29732959   {
2974      chr16_data[(x)] = chr_table[(x)];
2960      MPU4_chr_data[(x)] = chr_table[(x)];
29752961   }
29762962}
29772963
r778r779
29902976
29912977   for (x=0; x < 72; x++)
29922978   {
2993      chr16_data[(x)] = chr_table[(x)];
2979      MPU4_chr_data[(x)] = chr_table[(x)];
29942980   }
29952981}
29962982
r778r779
31713157   ROM_LOAD( "zenndlem.u10",      0x000, 0x104, CRC(e3103c05) SHA1(91b7be75c5fb37025039ab54b484e46a033969b5) )
31723158ROM_END
31733159
3174GAMEL(1989?,connect4,0,       mpu4,     connect4, 0,        0,   "Dolbeck Systems", "Connect 4",                                          GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING,layout_connect4 )
3175GAME( 199?, bctvidbs,0,       mpu4,      mpu4,     0,     ROT0,   "Barcrest",       "MPU4 Video Firmware",                                    GAME_IS_BIOS_ROOT )
3160GAMEL(1989?,connect4,0,       mpu4mod2,     connect4, 0,        0,   "Dolbeck Systems", "Connect 4",                                          GAME_IMPERFECT_GRAPHICS|GAME_NO_SOUND,layout_connect4 )
3161GAME( 199?, bctvidbs,0,       mpu4mod2,      mpu4,     0,    ROT0,   "Barcrest",       "MPU4 Video Firmware",                                    GAME_IS_BIOS_ROOT )
31763162
31773163//Deal 'Em was a conversion kit designed to make early MPU4 machines into video games by replacing the top glass
31783164//and reel assembly with this kit and a supplied monitor.
31793165//The real Deal 'Em ran on Summit Coin hardware, and was made by someone else.
31803166//A further different release was made in 2000, running on the Barcrest MPU4 Video, rather than this one.
3181GAME( 198?, dealem,0,       dealem,   dealem,   0,    ROT0,   "Zenitone",       "Deal 'Em (MPU4 Conversion Kit)",                           GAME_NOT_WORKING|GAME_IMPERFECT_GRAPHICS|GAME_WRONG_COLORS )
3167GAME( 1987, dealem,0,       dealem,   dealem,   0,    ROT0,   "Zenitone",       "Deal 'Em (MPU4 Conversion Kit)",                           GAME_NOT_WORKING|GAME_IMPERFECT_GRAPHICS|GAME_WRONG_COLORS )
31823168
3183GAME( 1994, crmaze,  bctvidbs,mpu4_vid, crmaze,   crmaze,ROT0,   "Barcrest",       "The Crystal Maze: Team Challenge (SWP)",                     GAME_NOT_WORKING|GAME_NO_SOUND )
3184GAME( 1994, crmazea, crmaze,  mpu4_vid, crmaze,   crmaze,ROT0,   "Barcrest",       "The Crystal Maze (AMLD version SWP)",                        GAME_NOT_WORKING|GAME_NO_SOUND )
3185GAME( 1994, crmazeb, crmaze,  mpu4_vid, crmaze,     0,     ROT0,   "Barcrest",       "The Crystal Maze - Now Featuring Ocean Zone (AMLD Version SWP)",   GAME_NOT_WORKING|GAME_NO_SOUND ) // unprotected?
3169GAME( 1994?,crmaze,  bctvidbs,mpu4_vid, crmaze,   crmaze,ROT0,   "Barcrest",       "The Crystal Maze: Team Challenge (SWP)",                     GAME_NOT_WORKING|GAME_NO_SOUND )
3170GAME( 1992?,crmazea, crmaze,  mpu4_vid, crmaze,   crmaze,ROT0,   "Barcrest",       "The Crystal Maze (AMLD version SWP)",                        GAME_NOT_WORKING|GAME_NO_SOUND )
3171GAME( 1993?,crmazeb, crmaze,  mpu4_vid, crmaze,   0,     ROT0,   "Barcrest",       "The Crystal Maze - Now Featuring Ocean Zone (AMLD Version SWP)",   GAME_NOT_WORKING|GAME_NO_SOUND ) // unprotected?
31863172GAME( 1990, turnover,bctvidbs,mpu4_vid, mpu4,     0,     ROT0,   "Barcrest",       "Turnover",                                             GAME_NOT_WORKING|GAME_NO_SOUND ) // unprotected?
31873173GAME( 1992, skiltrek,bctvidbs,mpu4_vid, mpu4,     0,     ROT0,   "Barcrest",       "Skill Trek",                                          GAME_NOT_WORKING|GAME_NO_SOUND )
31883174GAME( 199?, mating,  bctvidbs,mpu4_vid, mpu4,     mating,ROT0,   "Barcrest",       "The Mating Game (Datapak)",                              GAME_NOT_WORKING|GAME_NO_SOUND )
src/mame/drivers/skylncr.c
r778r779
7171{
7272
7373   tmap = tilemap_create(   get_tile_info, tilemap_scan_rows,
74                     TILEMAP_TRANSPARENT, 8,8, 0x40,0x20   );
74                     TILEMAP_TYPE_TRANSPARENT, 8,8, 0x40,0x20   );
7575
7676   tmap2 = tilemap_create(   get_tile_info2, skylncr_tilemap_scan_pages,
77                     TILEMAP_TRANSPARENT, 8,32,
77                     TILEMAP_TYPE_TRANSPARENT, 8,32,
7878                     TILES_PER_PAGE_X*PAGES_PER_TMAP_X,TILES_PER_PAGE_Y*PAGES_PER_TMAP_Y );
7979
8080   tilemap_set_transparent_pen(tmap,  0);
src/mame/drivers/limenko.c
r778r779
273273
274274VIDEO_START( limenko )
275275{
276   bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,     8,8,128,64);
277   md_tilemap = tilemap_create(get_md_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,128,64);
278   fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,128,64);
276   bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,     8,8,128,64);
277   md_tilemap = tilemap_create(get_md_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,128,64);
278   fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,128,64);
279279
280280   tilemap_set_transparent_pen(md_tilemap,0);
281281   tilemap_set_transparent_pen(fg_tilemap,0);
src/mame/drivers/pipeline.c
r778r779
9090VIDEO_START ( pipeline )
9191{
9292   palram=auto_malloc(0x1000);
93   tilemap1 = tilemap_create( get_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,8,8,64,32 );
94   tilemap2 = tilemap_create( get_tile_info2,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,64,32 );
93   tilemap1 = tilemap_create( get_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,8,8,64,32 );
94   tilemap2 = tilemap_create( get_tile_info2,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,64,32 );
9595   tilemap_set_transparent_pen(tilemap2,0);
9696}
9797
src/mame/drivers/calorie.c
r778r779
109109
110110VIDEO_START( calorie )
111111{
112   bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,     16,16,16,16);
113   fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT, 8, 8,32,32);
112   bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,     16,16,16,16);
113   fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 8, 8,32,32);
114114
115115   tilemap_set_transparent_pen(fg_tilemap,0);
116116}
src/mame/drivers/drtomy.c
r778r779
9191
9292VIDEO_START( drtomy )
9393{
94   tilemap_bg = tilemap_create(get_tile_info_bg,tilemap_scan_rows,TILEMAP_OPAQUE,      16,16,32,32);
95   tilemap_fg = tilemap_create(get_tile_info_fg,tilemap_scan_rows,TILEMAP_TRANSPARENT, 16,16,32,32);
94   tilemap_bg = tilemap_create(get_tile_info_bg,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,      16,16,32,32);
95   tilemap_fg = tilemap_create(get_tile_info_fg,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 16,16,32,32);
9696
9797   tilemap_set_transparent_pen(tilemap_fg,0);
9898}
src/mame/drivers/gdrawpkr.c
r778r779
205205VIDEO_START( gdrawpkr )
206206{
207207   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows,
208      TILEMAP_OPAQUE, 8, 8, 32, 31);
208      TILEMAP_TYPE_OPAQUE, 8, 8, 32, 31);
209209}
210210
211211VIDEO_UPDATE( gdrawpkr )
src/mame/drivers/bmcbowl.c
r778r779
296296   }
297297}
298298
299static NVRAM_HANDLER( bmc_nvram )
299static NVRAM_HANDLER( bmcbowl )
300300{
301301   int i;
302302
r778r779
509509   MDRV_VIDEO_START(bmcbowl)
510510   MDRV_VIDEO_UPDATE(bmcbowl)
511511
512   MDRV_NVRAM_HANDLER(bmc_nvram)
512   MDRV_NVRAM_HANDLER(bmcbowl)
513513   MDRV_MACHINE_RESET(bmcbowl)
514514
515515   MDRV_SPEAKER_STANDARD_STEREO("left", "right")
src/mame/drivers/gstream.c
r778r779
534534
535535VIDEO_START(gstream)
536536{
537   gstream_tilemap1 = tilemap_create(get_gs1_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT, 32, 32,16,16);
538   gstream_tilemap2 = tilemap_create(get_gs2_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT, 32, 32,16,16);
539   gstream_tilemap3 = tilemap_create(get_gs3_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE, 32, 32,16,16);
537   gstream_tilemap1 = tilemap_create(get_gs1_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 32, 32,16,16);
538   gstream_tilemap2 = tilemap_create(get_gs2_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 32, 32,16,16);
539   gstream_tilemap3 = tilemap_create(get_gs3_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE, 32, 32,16,16);
540540
541541   tilemap_set_transparent_pen(gstream_tilemap1,0);
542542   tilemap_set_transparent_pen(gstream_tilemap2,0);
src/mame/drivers/magic10.c
r778r779
294294
295295VIDEO_START( magic10 )
296296{
297   layer0_tilemap = tilemap_create(get_layer0_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,     16,16,32,32);
298   layer1_tilemap = tilemap_create(get_layer1_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,32,32);
299   layer2_tilemap = tilemap_create(get_layer2_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT, 8, 8,64,64);
297   layer0_tilemap = tilemap_create(get_layer0_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,     16,16,32,32);
298   layer1_tilemap = tilemap_create(get_layer1_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,32,32);
299   layer2_tilemap = tilemap_create(get_layer2_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 8, 8,64,64);
300300
301301   tilemap_set_transparent_pen(layer1_tilemap,0);
302302   tilemap_set_transparent_pen(layer2_tilemap,0);
src/mame/drivers/raiden2.c
r778r779
230230
231231VIDEO_START(raiden2)
232232{
233   text_layer       = tilemap_create( get_text_tile_info,tilemap_scan_rows, TILEMAP_TRANSPARENT,  8, 8,64,32 );
234   background_layer = tilemap_create( get_back_tile_info,tilemap_scan_rows, TILEMAP_OPAQUE,      16,16,32,32 );
235   midground_layer  = tilemap_create( get_mid_tile_info, tilemap_scan_rows, TILEMAP_TRANSPARENT, 16,16,32,32 );
236   foreground_layer = tilemap_create( get_fore_tile_info,tilemap_scan_rows, TILEMAP_TRANSPARENT, 16,16,32,32 );
233   text_layer       = tilemap_create( get_text_tile_info,tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT,  8, 8,64,32 );
234   background_layer = tilemap_create( get_back_tile_info,tilemap_scan_rows, TILEMAP_TYPE_OPAQUE,      16,16,32,32 );
235   midground_layer  = tilemap_create( get_mid_tile_info, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 16,16,32,32 );
236   foreground_layer = tilemap_create( get_fore_tile_info,tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 16,16,32,32 );
237237
238238   tilemap_set_transparent_pen(midground_layer,15);
239239   tilemap_set_transparent_pen(foreground_layer,15);
src/mame/drivers/mogura.c
r778r779
5555
5656VIDEO_START( mogura )
5757{
58   mogura_tilemap = tilemap_create(get_mogura_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,8,8,64, 32);
58   mogura_tilemap = tilemap_create(get_mogura_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,8,8,64, 32);
5959}
6060
6161VIDEO_UPDATE( mogura )
src/mame/drivers/berzerk.c
r778r779
854854   ROM_LOAD( "2c",           0x0800, 0x0800, CRC(d2b6324e) SHA1(20a6611ad6ec19409ac138bdae7bdfaeab6c47cf) )        /* ditto */
855855
856856   ROM_REGION( 0x0020, REGION_PROMS, ROMREGION_DISPOSE )
857   ROM_LOAD( "prom.6e",        0x0000, 0x0020, BAD_DUMP CRC(56bffba3) SHA1(c8e24f6361c50bcb4c9d3f39cdaf4172c2a2b318) ) /* address decoder/rom select prom */ /* currently a copy of the moon war one, I suspect the real frenzy one is either the same or more likely has the first byte the same as the second byte */
858
857   ROM_LOAD( "prom.6e",      0x0000, 0x0020, CRC(4471ca5d) SHA1(ba8dca2ec076818f8ad8c17b15c77965e36fa05e) ) /* address decoder/rom select prom (N82S123N) */
859858ROM_END
860859
861860
r778r779
881880
882881   ROM_REGION( 0x0020, REGION_PROMS, ROMREGION_DISPOSE )
883882   ROM_LOAD( "prom.6e",        0x0000, 0x0020, CRC(56bffba3) SHA1(c8e24f6361c50bcb4c9d3f39cdaf4172c2a2b318) ) /* address decoder/rom select prom */
884
885883ROM_END
886884
887885
src/mame/drivers/dynadice.c
r778r779
176176VIDEO_START( dynadice )
177177{
178178   /* pacman - style videoram layout */
179   bg_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,8,8,32,32);
180   top_tilemap = tilemap_create(get_tile_info,tilemap_scan_cols,TILEMAP_OPAQUE,8,8,2,32);
179   bg_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,8,8,32,32);
180   top_tilemap = tilemap_create(get_tile_info,tilemap_scan_cols,TILEMAP_TYPE_OPAQUE,8,8,2,32);
181181   tilemap_set_scrollx(bg_tilemap, 0, -16 );
182182}
183183
src/mame/drivers/dacholer.c
r778r779
185185
186186VIDEO_START( dacholer )
187187{
188   bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,     8,8,32,32);
189   fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,32,32);
188   bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,     8,8,32,32);
189   fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,32,32);
190190
191191   tilemap_set_transparent_pen(fg_tilemap,0);
192192}
src/mame/drivers/skyarmy.c
r778r779
9999
100100VIDEO_START( skyarmy )
101101{
102        skyarmy_tilemap = tilemap_create(get_skyarmy_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,8,8,32,32);
102        skyarmy_tilemap = tilemap_create(get_skyarmy_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,8,8,32,32);
103103        tilemap_set_scroll_cols(skyarmy_tilemap,32);
104104}
105105
src/mame/drivers/suprgolf.c
r778r779
6161
6262static VIDEO_START( suprgolf )
6363{
64   suprgolf_tilemap = tilemap_create( get_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,8,8,32,32 );
64   suprgolf_tilemap = tilemap_create( get_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,8,8,32,32 );
6565}
6666
6767static VIDEO_UPDATE( suprgolf )
src/mame/drivers/wallc.c
r778r779
127127
128128VIDEO_START( wallc )
129129{
130   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_cols_flip_y,   TILEMAP_OPAQUE, 8, 8, 32, 32);
130   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_cols_flip_y,   TILEMAP_TYPE_OPAQUE, 8, 8, 32, 32);
131131}
132132
133133VIDEO_UPDATE( wallc )
src/mame/drivers/marinedt.c
r778r779
452452
453453VIDEO_START( marinedt )
454454{
455   tx_tilemap = tilemap_create(get_tile_info, tilemap_scan_rows, TILEMAP_TRANSPARENT, 8, 8,32,32);
455   tx_tilemap = tilemap_create(get_tile_info, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 8, 8,32,32);
456456
457457   tilemap_set_transparent_pen(tx_tilemap, 0);
458458   tilemap_set_scrolldx(tx_tilemap, 0, 4*8);
src/mame/drivers/cps3.c
r778r779
27242724   cpunum_set_reg(0,SH2_VBR, 0x6000000);
27252725}
27262726
2727MACHINE_RESET(cps3_reset)
2727MACHINE_RESET( cps3 )
27282728{
27292729   scsi_init();
27302730
r778r779
29492949   MDRV_SCREEN_SIZE(512*2, 224*2)
29502950   MDRV_SCREEN_VISIBLE_AREA(0, (384*1)-1, 0, 223/*511*/)
29512951
2952   MDRV_MACHINE_RESET(cps3_reset)
2952   MDRV_MACHINE_RESET(cps3)
29532953   MDRV_NVRAM_HANDLER( cps3 )
29542954   MDRV_PALETTE_LENGTH(0x10000) // actually 0x20000 ...
29552955
src/mame/drivers/couple.c
r778r779
6565
6666VIDEO_START( couple )
6767{
68   bg_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,8,8,64,32);
68   bg_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,8,8,64,32);
6969}
7070
7171VIDEO_UPDATE( couple )
src/mame/drivers/lucky8.c
r778r779
9999VIDEO_START(lucky8)
100100{
101101   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows,
102      TILEMAP_OPAQUE, 8, 8, 64, 32);
102      TILEMAP_TYPE_OPAQUE, 8, 8, 64, 32);
103103}
104104
105105VIDEO_UPDATE(lucky8)
src/mame/drivers/magicfly.c
r778r779
364364VIDEO_START(magicfly)
365365{
366366   bg_tilemap = tilemap_create(get_magicfly_tile_info, tilemap_scan_rows,
367      TILEMAP_OPAQUE, 8, 8, 32, 29);
367      TILEMAP_TYPE_OPAQUE, 8, 8, 32, 29);
368368}
369369
370370static TILE_GET_INFO( get_7mezzo_tile_info )
r778r779
396396VIDEO_START( 7mezzo )
397397{
398398   bg_tilemap = tilemap_create(get_7mezzo_tile_info, tilemap_scan_rows,
399      TILEMAP_OPAQUE, 8, 8, 32, 29);
399      TILEMAP_TYPE_OPAQUE, 8, 8, 32, 29);
400400}
401401
402402VIDEO_UPDATE( magicfly )
src/mame/drivers/pturn.c
r778r779
119119
120120VIDEO_START(pturn)
121121{
122   pturn_fgmap = tilemap_create(get_pturn_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT, 8, 8,32,32);
122   pturn_fgmap = tilemap_create(get_pturn_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 8, 8,32,32);
123123   tilemap_set_transparent_pen(pturn_fgmap,0);
124   pturn_bgmap = tilemap_create(get_pturn_bg_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT, 8, 8,32,32*8);
124   pturn_bgmap = tilemap_create(get_pturn_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 8, 8,32,32*8);
125125   tilemap_set_transparent_pen(pturn_bgmap,0);
126126}
127127
src/mame/drivers/pmpoker.c
r778r779
415415VIDEO_START( pmpoker )
416416{
417417   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows,
418      TILEMAP_OPAQUE, 8, 8, 32, 29);
418      TILEMAP_TYPE_OPAQUE, 8, 8, 32, 29);
419419}
420420
421421VIDEO_UPDATE( pmpoker )
src/mame/drivers/shadfrce.c
r778r779
2323-- Read Me --
2424
2525Shadow Force (c)1993 Technos
26TA-0032-P1-23
26TA-0032-P1-23 (Japan version is TA-0032-P1-24)
2727
28CPU: 68000
28CPU: TMP68HC000P-16
2929Sound: Z80, YM2151, YM3012, OKI6295, MB3615 (x2)
3030Custom: Actel A1010A-1 (TJ32A 92.11.30), TJ-002, TJ-004, TJ-005
3131
r778r779
3535
3636ROMs:
3737
38Program
38Program:
393932A12-01.34 = 27C2001
4032A14-0.33 = 27C2001
4032A14-0.33 = 27C2001
414132A13-01.26 = 27C2001
4232A15-0.14 = 27C2001
4232A15-0.14 = 27C2001
4343
44Char(?)
44Char:
454532A11-0.55 = 27C010
4646
47Sprites(?)
47Backgrounds:
484832J1-0.4 = 8meg mask
494932J2-0.5 = 8meg mask
505032J3-0.6 = 8meg mask
5151
52Backgrounds(?)
52Sprites:
535332J4-0.12 = 16meg mask
545432J5-0.13 = 16meg mask
555532J6-0.24 = 16meg mask
565632J7-0.25 = 16meg mask
575732J8-0.32 = 16meg mask
5858
59Sound CPU
59Sound CPU:
606032J10.42 = 27C512
6161
62Samples(?)
62Samples:
636332J9-0.76 = 27C040
6464
6565*******************************************************************************/
r778r779
551551
552552
553553static MACHINE_DRIVER_START( shadfrce )
554   MDRV_CPU_ADD(M68000, 28000000/2) /* ? Guess */
554   MDRV_CPU_ADD(M68000, 28000000/2) /* ? Guess - CPU is rated for 16MHz */
555555   MDRV_CPU_PROGRAM_MAP(shadfrce_readmem,shadfrce_writemem)
556556   MDRV_CPU_VBLANK_INT(shadfrce_interrupt,2)
557557
r778r779
620620   ROM_LOAD( "32j9-0.76",  0x000000, 0x080000, CRC(16001e81) SHA1(67928d2024f963aee91f1498b6f4c76101d2f3b8) )
621621ROM_END
622622
623ROM_START( shadfrcj )
624   ROM_REGION( 0x100000, REGION_CPU1, 0 ) /* 68000 Code */
625   ROM_LOAD16_BYTE( "32j12-01.ic34", 0x00001, 0x40000, CRC(38fdbe1d) SHA1(476d8ef2c0d2a8c568ce44631f93f8c730f91b08) )
626   ROM_LOAD16_BYTE( "32j13-01.ic26", 0x00000, 0x40000, CRC(6e1df6f1) SHA1(c165553fe967b437413dd7ddc87a267548dd0ca9) )
627   ROM_LOAD16_BYTE( "32j14-01.ic33", 0x80001, 0x40000, CRC(89e3fb60) SHA1(90de38558d63215a0079079030e8b1097599c9e5) )
628   ROM_LOAD16_BYTE( "32j15-01.ic14", 0x80000, 0x40000, CRC(3dc3a84a) SHA1(166ad91b93192d94e3f6d2fe6dde02f59d334f75) )
623629
624GAME( 1993, shadfrce, 0, shadfrce, shadfrce, 0, ROT0, "Technos Japan", "Shadow Force (US Version 2)", GAME_NO_COCKTAIL )
630   ROM_REGION( 0x10000, REGION_CPU2, 0 ) /* Z80 Code */
631   ROM_LOAD( "32j10-0.42",  0x00000, 0x10000, CRC(65daf475) SHA1(7144332b2d17af8645e22e1926b33113db0d20e2) )
632
633   ROM_REGION( 0x020000, REGION_GFX1, ROMREGION_DISPOSE ) /* Chars */
634   ROM_LOAD( "32j11-0.ic55",  0x00000, 0x20000, CRC(7252d993) SHA1(43f7de381841039aa290486aafb98e2cf3b8579b) )
635
636   ROM_REGION( 0xa00000, REGION_GFX2, ROMREGION_DISPOSE ) /* Sprite Tiles */
637   ROM_LOAD( "32j4-0.12",  0x000000, 0x200000, CRC(1ebea5b6) SHA1(35bd49dda9ad75326d45ffb10c87d83fc4f1b7a8) )
638   ROM_LOAD( "32j5-0.13",  0x200000, 0x200000, CRC(600026b5) SHA1(5641246300d7e20dcff1eae004647faaee6cd1c6) )
639   ROM_LOAD( "32j6-0.24",  0x400000, 0x200000, CRC(6cde8ebe) SHA1(750933798235951fe24b2e667c33f692612c0aa0) )
640   ROM_LOAD( "32j7-0.25",  0x600000, 0x200000, CRC(bcb37922) SHA1(f3eee73c8b9f4873a7f1cc42e334e7502eaee3c8) )
641   ROM_LOAD( "32j8-0.32",  0x800000, 0x200000, CRC(201bebf6) SHA1(c89d2895ea5b19daea1f88542419f4e10f437c73) )
642
643   ROM_REGION( 0x300000, REGION_GFX3, ROMREGION_DISPOSE ) /* BG Tiles */
644   ROM_LOAD( "32j1-0.4",  0x000000, 0x100000, CRC(f1cca740) SHA1(339079b95ca137e66b4f032ad67a0adf58cca100) )
645   ROM_LOAD( "32j2-0.5",  0x100000, 0x100000, CRC(5fac3e01) SHA1(20c30f4c76e303285ae37e596afe86aa4812c3b9) )
646   ROM_LOAD( "32j3-0.6",  0x200000, 0x100000, CRC(d297925e) SHA1(5bc4d37bf0dc54114884c816b94a64ef1ccfeda5) )
647
648   ROM_REGION( 0x080000, REGION_SOUND1, 0 ) /* Samples */
649   ROM_LOAD( "32j9-0.76",  0x000000, 0x080000, CRC(16001e81) SHA1(67928d2024f963aee91f1498b6f4c76101d2f3b8) )
650ROM_END
651
652
653GAME( 1993, shadfrce, 0,        shadfrce, shadfrce, 0, ROT0, "Technos Japan", "Shadow Force (US Version 2)", GAME_NO_COCKTAIL )
654GAME( 1993, shadfrcj, shadfrce, shadfrce, shadfrce, 0, ROT0, "Technos Japan", "Shadow Force (Japan Version 2)", GAME_NO_COCKTAIL )
src/mame/drivers/yumefuda.c
r778r779
7373
7474VIDEO_START( yumefuda )
7575{
76   bg_tilemap = tilemap_create(y_get_bg_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,8,8,32,32);
76   bg_tilemap = tilemap_create(y_get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,8,8,32,32);
7777}
7878
7979VIDEO_UPDATE( yumefuda )
src/mame/drivers/namcos23.c
r778r779
369369
370370VIDEO_START( ss23 )
371371{
372   bgtilemap = tilemap_create( TextTilemapGetInfo,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,64,64 );
372   bgtilemap = tilemap_create( TextTilemapGetInfo,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,64,64 );
373373   tilemap_set_transparent_pen( bgtilemap, 0xf );
374374}
375375
src/mame/drivers/tattack.c
r778r779
4949
5050VIDEO_START( tattack )
5151{
52      tmap = tilemap_create( get_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,8,8,32,32 );
52      tmap = tilemap_create( get_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,8,8,32,32 );
5353}
5454
5555static ADDRESS_MAP_START( mem, ADDRESS_SPACE_PROGRAM, 8 )
src/mame/drivers/dunhuang.c
r778r779
9292VIDEO_START(dunhuang)
9393{
9494   tmap = tilemap_create(   get_tile_info, tilemap_scan_rows,
95                     TILEMAP_TRANSPARENT, 8,8, 0x40,0x20   );
95                     TILEMAP_TYPE_TRANSPARENT, 8,8, 0x40,0x20   );
9696
9797   tmap2 = tilemap_create(   get_tile_info2, tilemap_scan_rows,
98                     TILEMAP_TRANSPARENT, 8,32, 0x40,0x8   );
98                     TILEMAP_TYPE_TRANSPARENT, 8,32, 0x40,0x8   );
9999
100100   tilemap_set_transparent_pen(tmap,   0);
101101   tilemap_set_transparent_pen(tmap2,  0);
src/mame/drivers/onetwo.c
r778r779
243243
244244VIDEO_START( onetwo )
245245{
246   fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,8,8,64,32);
246   fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,8,8,64,32);
247247}
248248
249249VIDEO_UPDATE( onetwo )
src/mame/drivers/laserbat.c
r778r779
528528
529529VIDEO_START( laserbat )
530530{
531   bg_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,8,8,32,32);
531   bg_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,8,8,32,32);
532532
533533   videoram = (UINT8 *)auto_malloc(0x400);
534534   colorram = (UINT8 *)auto_malloc(0x400);
src/mame/drivers/plygonet.c
r778r779
5151#include "sound/k054539.h"
5252#include "machine/eeprom.h"
5353
54VIDEO_START(polygonet_vh_start);
55VIDEO_UPDATE(polygonet_vh_screenrefresh);
54VIDEO_START( polygonet );
55VIDEO_UPDATE( polygonet );
5656
5757READ32_HANDLER( polygonet_ttl_ram_r );
5858WRITE32_HANDLER( polygonet_ttl_ram_w );
r778r779
8080   "0100110000000" /* unlock command */
8181};
8282
83static NVRAM_HANDLER(nvram_handler)
83static NVRAM_HANDLER( polygonet )
8484{
8585   if (read_or_write)
8686      EEPROM_save(file);
r778r779
700700   MDRV_SCREEN_VBLANK_TIME(DEFAULT_60HZ_VBLANK_DURATION)
701701
702702   MDRV_GFXDECODE(gfxdecodeinfo)
703   MDRV_NVRAM_HANDLER(nvram_handler)
703   MDRV_NVRAM_HANDLER(polygonet)
704704
705705   /* video hardware */
706706   MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER)
r778r779
709709   MDRV_SCREEN_VISIBLE_AREA(0, 64*8-1, 0, 32*8-1 )
710710   MDRV_PALETTE_LENGTH(32768)
711711
712   MDRV_VIDEO_START(polygonet_vh_start)
713   MDRV_VIDEO_UPDATE(polygonet_vh_screenrefresh)
712   MDRV_VIDEO_START(polygonet)
713   MDRV_VIDEO_UPDATE(polygonet)
714714
715715   /* sound hardware */
716716   MDRV_SPEAKER_STANDARD_STEREO("left", "right")
src/mame/drivers/naomi.c
r778r779
436436*/
437437
438438#include "driver.h"
439#include "video/generic.h"
439440#include "cpu/sh4/sh4.h"
441#include "cpu/arm7/arm7core.h"
442#include "dc.h"
440443
441444#define CPU_CLOCK 200000000
442445                                 /* MD2 MD1 MD0 MD6 MD4 MD3 MD5 MD7 MD8 */
443446struct sh4_config sh4cpu_config = {  1,  0,  1,  0,  0,  0,  1,  1,  0, CPU_CLOCK };
444447
445static VIDEO_START(naomi)
446{
447}
448static UINT64 *dc_sound_ram;
448449
449static VIDEO_UPDATE(naomi)
450{
451   return 0;
452}
453
454450static ADDRESS_MAP_START( naomi_map, ADDRESS_SPACE_PROGRAM, 64 )
455   AM_RANGE(0x00000000, 0x001fffff) AM_ROM
456   AM_RANGE(0x0c000000, 0x0dffffff) AM_RAM
451   AM_RANGE(0x00000000, 0x001fffff) AM_ROM                  // BIOS
452   AM_RANGE(0x005f6800, 0x005f69ff) AM_READWRITE( dc_sysctrl_r, dc_sysctrl_w )
453   AM_RANGE(0x005f6c00, 0x005f6cff) AM_READWRITE( dc_maple_r, dc_maple_w )
454   AM_RANGE(0x005f7000, 0x005f70ff) AM_READWRITE( dc_gdrom_r, dc_gdrom_w )
455   AM_RANGE(0x005f7400, 0x005f74ff) AM_READWRITE( dc_g1_ctrl_r, dc_g1_ctrl_w )
456   AM_RANGE(0x005f7800, 0x005f78ff) AM_READWRITE( dc_g2_ctrl_r, dc_g2_ctrl_w )
457   AM_RANGE(0x005f7c00, 0x005f7cff) AM_READWRITE( pvr_ctrl_r, pvr_ctrl_w )
458   AM_RANGE(0x005f8000, 0x005f9fff) AM_READWRITE( pvr_ta_r, pvr_ta_w )
459   AM_RANGE(0x00600000, 0x006007ff) AM_READWRITE( dc_modem_r, dc_modem_w )
460   AM_RANGE(0x00700000, 0x00707fff) AM_READWRITE( dc_aica_reg_r, dc_aica_reg_w )
461   AM_RANGE(0x00710000, 0x0071000f) AM_READWRITE( dc_rtc_r, dc_rtc_w )
462   AM_RANGE(0x00800000, 0x009fffff) AM_RAM   AM_BASE( &dc_sound_ram )      // sound RAM
463   AM_RANGE(0x04000000, 0x04ffffff) AM_RAM   AM_SHARE(2)   // texture memory
464   AM_RANGE(0x05000000, 0x05ffffff) AM_RAM AM_SHARE(2)   // mirror of texture RAM
465   AM_RANGE(0x0c000000, 0x0cffffff) AM_RAM AM_SHARE(1)
466   AM_RANGE(0x0d000000, 0x0dffffff) AM_RAM AM_SHARE(1)   // mirror of main RAM
467   AM_RANGE(0x10000000, 0x107fffff) AM_WRITE( ta_fifo_poly_w )
468   AM_RANGE(0x10800000, 0x10ffffff) AM_WRITE( ta_fifo_yuv_w )
469   AM_RANGE(0x11000000, 0x11ffffff) AM_RAM AM_SHARE(2)   // another mirror of texture memory
457470   AM_RANGE(0xa0000000, 0xa01fffff) AM_ROM AM_REGION(REGION_CPU1, 0)
458471ADDRESS_MAP_END
459472
473static ADDRESS_MAP_START( dc_audio_map, ADDRESS_SPACE_PROGRAM, 32 )
474   AM_RANGE(0x00000000, 0x001fffff) AM_RAM      /* shared with SH-4 */
475ADDRESS_MAP_END
460476
461477INPUT_PORTS_START( naomi )
462478INPUT_PORTS_END
463479
464
465
466480static MACHINE_DRIVER_START( naomi )
467481   /* basic machine hardware */
468482   MDRV_CPU_ADD_TAG("main", SH4, CPU_CLOCK) // SH4!!!
469483   MDRV_CPU_CONFIG(sh4cpu_config);
470484   MDRV_CPU_PROGRAM_MAP(naomi_map,0)
471485
486   MDRV_CPU_ADD_TAG("sound", ARM7, 45000000)
487   MDRV_CPU_PROGRAM_MAP(dc_audio_map, 0)
488
489   MDRV_MACHINE_RESET( dc )
490
472491   MDRV_SCREEN_REFRESH_RATE(60)
473492   MDRV_SCREEN_VBLANK_TIME(DEFAULT_60HZ_VBLANK_DURATION)
474493
r778r779
479498   MDRV_SCREEN_VISIBLE_AREA(0, 16*8-1, 0, 16*8-1)
480499   MDRV_PALETTE_LENGTH(0x1000)
481500
482   MDRV_VIDEO_START(naomi)
483   MDRV_VIDEO_UPDATE(naomi)
501   MDRV_VIDEO_START(dc)
502   MDRV_VIDEO_UPDATE(dc)
484503MACHINE_DRIVER_END
485504
486505#define ROM_LOAD16_WORD_SWAP_BIOS(bios,name,offset,length,hash) \
src/mame/drivers/powerbal.c
r778r779
364364
365365VIDEO_START( powerbal )
366366{
367   bg_tilemap = tilemap_create(powerbal_get_bg_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE, 8, 8,64,32);
367   bg_tilemap = tilemap_create(powerbal_get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE, 8, 8,64,32);
368368
369369   xoffset = -20;
370370
src/mame/drivers/talbot.c
r778r779
156156
157157VIDEO_START( talbot )
158158{
159   bg_tilemap = tilemap_create(get_tile_info_bg, tilemap_scan_rows, TILEMAP_OPAQUE, 8, 8, 32, 32);
159   bg_tilemap = tilemap_create(get_tile_info_bg, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE, 8, 8, 32, 32);
160160}
161161
162162static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect)
src/mame/drivers/vmetal.c
r778r779
399399
400400VIDEO_START(varia)
401401{
402   vmetal_texttilemap = tilemap_create(get_vmetal_texttilemap_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,      8, 8, 256,256);
403   vmetal_mid1tilemap = tilemap_create(get_vmetal_mid1tilemap_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,      16,16, 256,256);
404   vmetal_mid2tilemap = tilemap_create(get_vmetal_mid2tilemap_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,      16,16, 256,256);
402   vmetal_texttilemap = tilemap_create(get_vmetal_texttilemap_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,      8, 8, 256,256);
403   vmetal_mid1tilemap = tilemap_create(get_vmetal_mid1tilemap_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,      16,16, 256,256);
404   vmetal_mid2tilemap = tilemap_create(get_vmetal_mid2tilemap_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,      16,16, 256,256);
405405   tilemap_set_transparent_pen(vmetal_texttilemap,0);
406406   tilemap_set_transparent_pen(vmetal_mid1tilemap,0);
407407   tilemap_set_transparent_pen(vmetal_mid2tilemap,0);
src/mame/drivers/dreamwld.c
r778r779
142142
143143VIDEO_START(dreamwld)
144144{
145   dreamwld_bg_tilemap = tilemap_create(get_dreamwld_bg_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,      16, 16, 64,32);
146   dreamwld_bg2_tilemap = tilemap_create(get_dreamwld_bg2_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,      16, 16, 64,32);
145   dreamwld_bg_tilemap = tilemap_create(get_dreamwld_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,      16, 16, 64,32);
146   dreamwld_bg2_tilemap = tilemap_create(get_dreamwld_bg2_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,      16, 16, 64,32);
147147   tilemap_set_transparent_pen(dreamwld_bg2_tilemap,0);
148148   dreamwld_tilebankold[0] = dreamwld_tilebankold[1] = -1;
149149   dreamwld_tilebank[0] = dreamwld_tilebank[1] = 0;
src/mame/drivers/galaga.c
r778r779
31843184   ROM_LOAD( "136007.109",   0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) )   /* timing - not used */
31853185ROM_END
31863186
3187/*
31873188
3189Year:  1982
3190Manufacturer:  Sidam
31883191
3192CPUs:
3193
3194on main PCB (Sidam 11500):
3195
31963x MK3880-4IRL-Z80CPU (main)
31971x LM324N (sound)
31981x TDA2003 (sound)
31991x custom 0640 (DIL28)(interface to custom 5303)
32001x custom 0748 (DIL28)(clock divider)
32013x custom 0883 (DIL28)(bus controller)
32021x custom 5156 (DIL42)(I/O)
32031x custom 5303 (DIL42)(I/O)
32041x oscillator 18432
3205
3206on bottom PCB (Sidam 11510):
3207
32081x custom 0037 (DIL28)(unknown)
32091x custom 0228 (DIL28)(gfx data shifter and mixer(16-bit in, 4-bit out))
32101x custom 0425 (DIL28)(sprite address generator)
32111x custom 0764 (DIL28)(clock divider)
32121x custom DD1-6 (DIL20 300mil)(unknown)
3213
3214ROMs:
3215
3216on main PCB (Sidam 11500):
3217
32187x TMS2531JL
32192x TBP24S10N (11220, 11221)
3220
3221on bottom PCB (Sidam 11510):
3222
32231x TMS2516JL (8)
32246x D2732A
32251x TBP24S10N (11523)
32261x SN74S288N (11524)
3227
3228Notes:
3229
3230on main PCB (Sidam 11500):
32311x 22x2 edge connector
32321x 3 legs power connector
32331x 50 pins flat cable connector to bottom
32341x trimmer (volume)
32352x 8x2 switches DIP
3236
3237on bottom PCB (Sidam 11510):
32381x 50 pins flat cable connector to main
32391x 6 legs connector
3240
3241*/
3242
3243ROM_START( digsid )
3244   ROM_REGION( 0x10000, REGION_CPU1, 0 )   /* 64k for code for the first CPU  */
3245   ROM_LOAD( "digdug0.0",   0x0000, 0x1000, CRC(602197f0) SHA1(bea3b98a3f0f89d3b9e87aa38550ddd6f7883921) )
3246   ROM_LOAD( "digdug1.1",   0x1000, 0x1000, CRC(c6c8306b) SHA1(53e63ccb7edfdeea75df961ac69ebe882d808920) )
3247   ROM_LOAD( "digdug2.2",   0x2000, 0x1000, CRC(b695ec17) SHA1(46811106dbb686df6dc73b29e9e7db97b8c0d412) )
3248   ROM_LOAD( "digdug3.3",   0x3000, 0x1000, CRC(17bbfa40) SHA1(d3c7bf986d1d2b1961cea0c5e548245e84d74924) )
3249
3250   ROM_REGION( 0x10000, REGION_CPU2, 0 )   /* 64k for the second CPU */
3251   ROM_LOAD( "digdug4.4",       0x0000, 0x1000, CRC(370ef9b4) SHA1(746b1fa15f5f2cfd69d8b5a7d6fb8c770abc3b4d) )
3252   ROM_LOAD( "digdug5.5",       0x1000, 0x1000, CRC(d751df5d) SHA1(b08becb0176849a0fd1a706d6fae862684ff00b9) )
3253
3254   ROM_REGION( 0x10000, REGION_CPU3, 0 )   /* 64k for the third CPU  */
3255   ROM_LOAD( "digdug6.6",   0x0000, 0x1000, CRC(a41bce72) SHA1(2b9b74f56aa7939d9d47cf29497ae11f10d78598) )
3256
3257   ROM_REGION( 0x1000, REGION_GFX1, ROMREGION_DISPOSE )
3258   ROM_LOAD( "digdug8.8",        0x0000, 0x0800, CRC(f14a6fe1) SHA1(0aa63300c2cb887196de590aceb98f3cf06fead4) )
3259
3260   ROM_REGION( 0x4000, REGION_GFX2, ROMREGION_DISPOSE )
3261   ROM_LOAD( "digdug14.14",   0x0000, 0x1000, CRC(e22957c8) SHA1(4700c63f4f680cb8ab8c44e6f3e1712aabd5daa4) )
3262   ROM_LOAD( "digdug13.13",   0x1000, 0x1000, CRC(2829ec99) SHA1(3e435c1afb2e44487cd7ba28a93ada2e5ccbb86d) )
3263   ROM_LOAD( "digdug12.12",   0x2000, 0x1000, CRC(458499e9) SHA1(578bd839f9218c3cf4feee1223a461144e455df8) )
3264   ROM_LOAD( "digdug11.11",   0x3000, 0x1000, CRC(c58252a0) SHA1(bd79e39e8a572d2b5c205e6de27ca23e43ec9f51) )
3265
3266   ROM_REGION( 0x1000, REGION_GFX3, ROMREGION_DISPOSE )
3267   ROM_LOAD( "digdug10.10",       0x0000, 0x1000, CRC(7b383983) SHA1(57f1e8f5171d13f9f76bd091d81b4423b59f6b42) )
3268
3269   ROM_REGION( 0x1000, REGION_GFX4, 0 ) /* 4k for the playfield graphics */
3270   ROM_LOAD( "digdug9.9",      0x0000, 0x1000, CRC(2cf399c2) SHA1(317c48818992f757b1bd0e3997fa99937f81b52c) )
3271
3272   /* Proms were not dumped with this set */
3273   ROM_REGION( 0x0220, REGION_PROMS, 0 )
3274   ROM_LOAD( "136007.113",   0x0000, 0x0020, CRC(4cb9da99) SHA1(91a5852a15d4672c29fdcbae75921794651f960c) )
3275   ROM_LOAD( "136007.111",   0x0020, 0x0100, CRC(00c7c419) SHA1(7ea149e8eb36920c3b84984b5ce623729d492fd3) )
3276   ROM_LOAD( "136007.112",   0x0120, 0x0100, CRC(e9b3e08e) SHA1(a294cc4da846eb702d61678396bfcbc87d30ea95) )
3277
3278   ROM_REGION( 0x0200, REGION_SOUND1, 0 )   /* sound prom */
3279   ROM_LOAD( "136007.110",   0x0000, 0x0100, CRC(7a2815b4) SHA1(085ada18c498fdb18ecedef0ea8fe9217edb7b46) )
3280   ROM_LOAD( "136007.109",   0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) )   /* timing - not used */
3281ROM_END
3282
31893283static DRIVER_INIT (galaga)
31903284{
31913285   /* swap bytes for flipped character so we can decode them together with normal characters */
r778r779
32873381GAME( 1982, digdugat, digdug,  digdug,  digdug,   0,       ROT90, "[Namco] (Atari license)", "Dig Dug (Atari, rev 2)", GAME_SUPPORTS_SAVE )
32883382GAME( 1982, digduga1, digdug,  digdug,  digdug,   0,       ROT90, "[Namco] (Atari license)", "Dig Dug (Atari, rev 1)", GAME_SUPPORTS_SAVE )
32893383GAME( 1982, dzigzag,  digdug,  dzigzag, digdug,   0,       ROT90, "bootleg", "Zig Zag (Dig Dug hardware)", GAME_SUPPORTS_SAVE )
3384GAME( 1982, digsid,   digdug,  digdug, digdug,    0,       ROT90, "bootleg", "Dig Dug (Sidam bootleg)", GAME_SUPPORTS_SAVE ) // still has Namco copyright intact
src/mame/drivers/panicr.c
r778r779
166166
167167VIDEO_START( panicr )
168168{
169   bgtilemap = tilemap_create( get_bgtile_info,tilemap_scan_rows,TILEMAP_OPAQUE,16,16,1024,16 );
170   txttilemap = tilemap_create( get_txttile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT_COLOR,8,8,32,32 );
169   bgtilemap = tilemap_create( get_bgtile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,16,16,1024,16 );
170   txttilemap = tilemap_create( get_txttile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT_COLOR,8,8,32,32 );
171171   tilemap_set_transparent_pen(txttilemap, 0);
172172}
173173
src/mame/drivers/sbowling.c
r778r779
102102VIDEO_START(sbowling)
103103{
104104   tmpbitmap = auto_bitmap_alloc(32*8,32*8,machine->screen[0].format);
105   sb_tilemap = tilemap_create(get_sb_tile_info, tilemap_scan_rows, TILEMAP_OPAQUE, 8, 8, 32, 32);
105   sb_tilemap = tilemap_create(get_sb_tile_info, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE, 8, 8, 32, 32);
106106}
107107
108108static WRITE8_HANDLER( pix_shift_w )
src/mame/drivers/good.c
r778r779
7272
7373VIDEO_START( good )
7474{
75   bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE, 16, 16, 32,32);
76   fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT, 16, 16, 32,32);
75   bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE, 16, 16, 32,32);
76   fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 16, 16, 32,32);
7777   tilemap_set_transparent_pen(fg_tilemap,0xf);
7878}
7979
src/mame/drivers/igs_m027.c
r778r779
132132
133133VIDEO_START(igs_majhong)
134134{
135   igs_tx_tilemap= tilemap_create(get_tx_tilemap_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT, 8, 8,64,32);
135   igs_tx_tilemap= tilemap_create(get_tx_tilemap_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 8, 8,64,32);
136136   tilemap_set_transparent_pen(igs_tx_tilemap,15);
137137   igs_bg_tilemap= tilemap_create(get_bg_tilemap_tile_info,tilemap_scan_rows,0, 8, 8,64,32);
138   //igs_bg_tilemap= tilemap_create(get_bg_tilemap_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT, 8, 8,64,32);
138   //igs_bg_tilemap= tilemap_create(get_bg_tilemap_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 8, 8,64,32);
139139   //tilemap_set_transparent_pen(igs_bg_tilemap,15);
140140   logerror("Video START OK!\n");
141141}
src/mame/drivers/ettrivia.c
r778r779
189189
190190VIDEO_START( ettrivia )
191191{
192   bg_tilemap = tilemap_create( get_tile_info_bg,tilemap_scan_rows,TILEMAP_OPAQUE,8,8,64,32 );
193   fg_tilemap = tilemap_create( get_tile_info_fg,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,64,32 );
192   bg_tilemap = tilemap_create( get_tile_info_bg,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,8,8,64,32 );
193   fg_tilemap = tilemap_create( get_tile_info_fg,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,64,32 );
194194
195195   tilemap_set_transparent_pen(fg_tilemap,0);
196196}
src/mame/drivers/jalmah.c
r778r779
180180
181181VIDEO_START( jalmah )
182182{
183   sc0_tilemap = tilemap_create(get_sc0_tile_info,bg_scan,TILEMAP_TRANSPARENT,16,16,256,32);
184   sc1_tilemap = tilemap_create(get_sc1_tile_info,bg_scan,TILEMAP_TRANSPARENT,16,16,256,32);
185   sc2_tilemap = tilemap_create(get_sc2_tile_info,bg_scan,TILEMAP_TRANSPARENT,16,16,256,32);
186   sc3_tilemap = tilemap_create(get_sc3_tile_info,tilemap_scan_cols,TILEMAP_TRANSPARENT,8,8,256,32);
183   sc0_tilemap = tilemap_create(get_sc0_tile_info,bg_scan,TILEMAP_TYPE_TRANSPARENT,16,16,256,32);
184   sc1_tilemap = tilemap_create(get_sc1_tile_info,bg_scan,TILEMAP_TYPE_TRANSPARENT,16,16,256,32);
185   sc2_tilemap = tilemap_create(get_sc2_tile_info,bg_scan,TILEMAP_TYPE_TRANSPARENT,16,16,256,32);
186   sc3_tilemap = tilemap_create(get_sc3_tile_info,tilemap_scan_cols,TILEMAP_TYPE_TRANSPARENT,8,8,256,32);
187187
188188   jm_scrollram = auto_malloc(0x80);
189189   jm_vregs = auto_malloc(0x40);
src/mame/drivers/supdrapo.c
r778r779
251251
252252VIDEO_START( supdrapo )
253253{
254   fg_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,8,8,32,32);
254   fg_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,8,8,32,32);
255255}
256256
257257VIDEO_UPDATE( supdrapo )
src/mame/drivers/tecmosys.c
r778r779
402402
403403VIDEO_START(deroon)
404404{
405   txt_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,32*2,32*2);
405   txt_tilemap = tilemap_create(get_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,32*2,32*2);
406406   tilemap_set_transparent_pen(txt_tilemap,0);
407407}
408408
src/mame/drivers/merit.c
r778r779
616616
617617VIDEO_START( merit )
618618{
619   bg_tilemap = tilemap_create(get_tile_info_bg,tilemap_scan_rows,TILEMAP_OPAQUE,8,8,64,32);
619   bg_tilemap = tilemap_create(get_tile_info_bg,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,8,8,64,32);
620620}
621621
622622VIDEO_UPDATE( merit )
src/mame/drivers/m72.c
r778r779
26642664
26652665   ROM_REGION( 0x80000, REGION_GFX1, ROMREGION_DISPOSE ) /* Roms located on the M72-ROM-C rom board */
26662666   ROM_LOAD( "rt_r-00.1h", 0x00000, 0x10000, CRC(dad53bc0) SHA1(1e3bc498861946278a0b1fe24259f5d224e265d7) )   /* sprites */
2667   ROM_LOAD( "rt_r-01.1j", 0x10000, 0x10000, CRC(b28d1a60) SHA1(26d0b5a381f5b462a223cb474067c7b5e67706df) )
2667   ROM_LOAD( "rt_r-01.1j", 0x10000, 0x08000, CRC(5e441e7f) SHA1(6741eb7f2d9d985b5a89eefc73ea44c3e38de6f7) )
2668    ROM_RELOAD(             0x08000, 0x08000 )
26682669   ROM_LOAD( "rt_r-10.1k", 0x20000, 0x10000, CRC(d6a66298) SHA1(d2873d05aa3b257e7699c188880ac3daad672fa5) )
2669   ROM_LOAD( "rt_r-11.1l", 0x30000, 0x10000, CRC(bb182f1a) SHA1(93b24bb0d6abd5c42c84a041c79b1dcea568e443) )
2670   ROM_LOAD( "rt_r-11.1l", 0x30000, 0x08000, CRC(791df4f8) SHA1(5239a97222212ac9c019177771cb2b5096b7bc17) )
2671    ROM_RELOAD(             0x08000, 0x08000 )
26702672   ROM_LOAD( "rt_r-20.3h", 0x40000, 0x10000, CRC(fc247c8a) SHA1(01cf0a60f47fa5e2ed430a3f075e69e6cb762a48) )
2671   ROM_LOAD( "rt_r-21.3j", 0x50000, 0x10000, CRC(5b41f5f3) SHA1(8f47a77fb6513b8f611671d34721e33d284dc035) )
2673   ROM_LOAD( "rt_r-21.3j", 0x50000, 0x08000, CRC(ed793841) SHA1(7e55a9a11fcd989db39bce6be48821b747c7d97f) )
2674    ROM_RELOAD(             0x08000, 0x08000 )
26722675   ROM_LOAD( "rt_r-30.3k", 0x60000, 0x10000, CRC(eb02a1cb) SHA1(60a394ab53afdcbbf9e88083b8dbe8c897170d77) )
2673   ROM_LOAD( "rt_r-31.3l", 0x70000, 0x10000, CRC(2bec510a) SHA1(3455e72095832135ac006944a1209e720ec5c8bf) )
2676   ROM_LOAD( "rt_r-31.3l", 0x70000, 0x08000, CRC(8558355d) SHA1(b5467d1f22f6e5f90c5d8a8ac2d55974f287d589) )
2677    ROM_RELOAD(             0x08000, 0x08000 )
26742678
26752679   ROM_REGION( 0x20000, REGION_GFX2, ROMREGION_DISPOSE ) /* Roms located on the M72-B-D rom board */
26762680   ROM_LOAD( "rt_b-a0.3c", 0x00000, 0x08000, CRC(4e212fb0) SHA1(687061ecade2ebd0bd1343c9c4a831791853f79c) )   /* tiles #1 */
r778r779
26832687   ROM_LOAD( "rt_b-b1.3k", 0x08000, 0x08000, CRC(b9709686) SHA1(700905a3e9661e0874939f54da2909e1396ce596) )
26842688   ROM_LOAD( "rt_b-b2.3h", 0x10000, 0x08000, CRC(433b229a) SHA1(14222eaa3e67e5a7f80eafcf22bac4eb2d485a9a) )
26852689   ROM_LOAD( "rt_b-b3.3f", 0x18000, 0x08000, CRC(ad89b072) SHA1(e2683d0e7415f3abd147e518bf6c87e44744cd4f) )
2690
2691   ROM_REGION( 0x0200, REGION_PROMS, 0 ) /* Located on M72-A-C CPU/Sound board */
2692   ROM_LOAD( "m72_a-8l-.ic66", 0x0000, 0x0100, CRC(b460c438) SHA1(00e20cf754b6fd5138ee4d2f6ec28dff9e292fe6) ) /* TBP24S10 */
2693    ROM_LOAD( "m72_a-9l-.ic75", 0x0000, 0x0100, CRC(a4f2c4bc) SHA1(f13b0a4b52dcc6704063b676f09d83dcba170133) ) /* TBP24S10 */
2694
2695    ROM_REGION( 0x0003, REGION_PLDS, 0 )
2696    /* Located on M72-ROM-C rom board */
2697    ROM_LOAD( "m72_r-3a-.bin",  0x0000, 0x0001, NO_DUMP ) /* PAL16L8 at 3A */
2698    /* Located on M72-A-C CPU/Sound board */
2699   ROM_LOAD( "m72_a-3d-.bin",  0x0000, 0x0001, NO_DUMP ) /* PAL16L8 at IC11 */
2700   ROM_LOAD( "m72_a-4d-.bin",  0x0000, 0x0001, NO_DUMP ) /* PAL16L8 at IC19 */
26862701ROM_END
26872702
26882703ROM_START( bchopper )
src/mame/drivers/madalien.c
r778r779
225225   const UINT8 *headlight_rom;
226226
227227   fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_cols_flip_x,
228      TILEMAP_TRANSPARENT, 8, 8, 32, 32);
228      TILEMAP_TYPE_TRANSPARENT, 8, 8, 32, 32);
229229
230230   bg_tilemap_l = tilemap_create(get_bg_tile_info_l, tilemap_scan_cols_flip_x,
231      TILEMAP_OPAQUE, 16, 16, 16, 16);
231      TILEMAP_TYPE_OPAQUE, 16, 16, 16, 16);
232232
233233   bg_tilemap_r = tilemap_create(get_bg_tile_info_r, tilemap_scan_cols_flip_x,
234      TILEMAP_OPAQUE, 16, 16, 16, 16);
234      TILEMAP_TYPE_OPAQUE, 16, 16, 16, 16);
235235
236236   tilemap_set_transparent_pen( fg_tilemap, 0 );
237237
src/mame/drivers/rmhaihai.c
r778r779
5959VIDEO_START( rmhaihai )
6060{
6161   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows,
62      TILEMAP_OPAQUE, 8, 8, 64, 32);
62      TILEMAP_TYPE_OPAQUE, 8, 8, 64, 32);
6363}
6464
6565VIDEO_UPDATE( rmhaihai )
src/mame/drivers/ksys573.c
r778r779
249249static int pccard2_flash_start;
250250static int pccard3_flash_start;
251251static int pccard4_flash_start;
252static int security_cart_number = 0;
252253
253254static int chiptype[ 2 ];
254255static int has_ds2401[ 2 ];
r778r779
296297   return data;
297298}
298299
299static int get_security_cart_number( void )
300{
301   if( chiptype[ 1 ] != 0 )
302   {
303      return readinputportbytag( "SECURITY_CART" );
304   }
305
306   return 0;
307}
308
309300static READ32_HANDLER( jamma_r )
310301{
311302   UINT32 data = 0;
r778r779
317308      break;
318309   case 1:
319310   {
320      int security_cart_number = get_security_cart_number();
321
322311      data = readinputport(1);
323312      data |= 0x000000c0;
324313
r778r779
397386
398387static WRITE32_HANDLER( control_w )
399388{
400   int security_cart_number = get_security_cart_number();
401389//  int old_bank = flash_bank;
402390   COMBINE_DATA(&control);
403391
r778r779
467455
468456static UINT8 *atapi_regs;
469457static mame_timer *atapi_timer;
470static pSCSIDispatch atapi_device;
471static void *atapi_device_data;
458static pSCSIDispatch cdrom_drive;
459static void *inserted_cdrom;
460static void *available_cdroms[ 2 ];
472461static UINT16 *atapi_data;
473462static int atapi_data_ptr, atapi_data_len, atapi_xferlen, atapi_xferbase, atapi_cdata_wait, atapi_xfermod;
474463
r778r779
488477   while (atapi_xferlen > 0 )
489478   {
490479      // get a sector from the SCSI device
491      atapi_device(SCSIOP_READ_DATA, atapi_device_data, 2048, sector_buffer);
480      cdrom_drive(SCSIOP_READ_DATA, inserted_cdrom, 2048, sector_buffer);
492481
493482      atapi_xferlen -= 2048;
494483
r778r779
560549            }
561550
562551            // get the data from the device
563            atapi_device(SCSIOP_READ_DATA, atapi_device_data, transfer, sector_buffer);
552            cdrom_drive(SCSIOP_READ_DATA, inserted_cdrom, transfer, sector_buffer);
564553
565554            // fix it up in an endian-safe way
566555            for (i = 0; i < transfer; i += 2)
r778r779
701690            }
702691
703692            // send it to the device
704            atapi_device(SCSIOP_WRITE_DATA, atapi_device_data, atapi_cdata_wait, atapi_scsi_packet);
693            cdrom_drive(SCSIOP_WRITE_DATA, inserted_cdrom, atapi_cdata_wait, atapi_scsi_packet);
705694
706695            // assert IRQ
707696            psx_irq_set(0x400);
r778r779
727716         }
728717
729718         // send it to the SCSI device
730         atapi_xferlen = atapi_device(SCSIOP_EXEC_COMMAND, atapi_device_data, 0, atapi_scsi_packet);
719         atapi_xferlen = cdrom_drive(SCSIOP_EXEC_COMMAND, inserted_cdrom, 0, atapi_scsi_packet);
731720
732721         if (atapi_xferlen != -1)
733722         {
r778r779
893882
894883static void atapi_init(void)
895884{
885   int i;
886
896887   atapi_regs = auto_malloc( ATAPI_REG_MAX );
897888   memset(atapi_regs, 0, sizeof(atapi_regs));
898889
r778r779
909900   mame_timer_adjust(atapi_timer, time_never, 0, time_never);
910901
911902   // allocate a SCSI CD-ROM device
912   atapi_device = SCSI_DEVICE_CDROM;
913   atapi_device(SCSIOP_ALLOC_INSTANCE, &atapi_device_data, 0, (UINT8 *)NULL);
903   cdrom_drive = SCSI_DEVICE_CDROM;
914904
905   for( i = 0; i < 2; i++ )
906   {
907      if( get_disk_handle( i ) != NULL )
908      {
909         cdrom_drive(SCSIOP_ALLOC_INSTANCE, &available_cdroms[ i ], i, (UINT8 *)NULL);
910      }
911      else
912      {
913         available_cdroms[ i ] = NULL;
914      }
915   }
916
915917   atapi_data = auto_malloc( ATAPI_DATA_SIZE );
916918
917919   state_save_register_global_pointer( atapi_regs, ATAPI_REG_MAX );
r778r779
980982
981983   if( ACCESSING_LSW32 )
982984   {
983      int security_cart_number = get_security_cart_number();
984
985985      switch( chiptype[ security_cart_number ] )
986986      {
987987      case 1:
r778r779
13961396static void *atapi_get_device(void)
13971397{
13981398   void *ret;
1399   atapi_device(SCSIOP_GET_DEVICE, atapi_device_data, 0, (UINT8 *)&ret);
1399   cdrom_drive(SCSIOP_GET_DEVICE, inserted_cdrom, 0, (UINT8 *)&ret);
14001400   return ret;
14011401}
14021402
r778r779
15071507
15081508   adc083x_init( 0, ADC0834, analogue_inputs_callback );
15091509   flash_init();
1510
15111510}
15121511
15131512static MACHINE_RESET( konami573 )
r778r779
15201519      psx_sio_input( 1, PSX_SIO_IN_DSR, PSX_SIO_IN_DSR );
15211520   }
15221521
1523   cdda_set_cdrom(0, atapi_get_device());
1524
15251522   flash_bank = -1;
15261523}
15271524
r778r779
15331530   psx_dma_install_write_handler
15341531};
15351532
1533static void update_mode( void )
1534{
1535   int mode = readinputportbytag( "MODE" );
1536   static void *new_cdrom;
1537
1538   if( chiptype[ 1 ] != 0 )
1539   {
1540      security_cart_number = mode;
1541   }
1542   else
1543   {
1544      security_cart_number = 0;
1545   }
1546
1547   if( available_cdroms[ 1 ] != NULL )
1548   {
1549      new_cdrom = available_cdroms[ mode ];
1550   }
1551   else
1552   {
1553      new_cdrom = available_cdroms[ 0 ];
1554   }
1555
1556   if( inserted_cdrom != new_cdrom )
1557   {
1558      inserted_cdrom = new_cdrom;
1559      cdda_set_cdrom(0, atapi_get_device());
1560   }
1561}
1562
15361563static INTERRUPT_GEN( sys573_vblank )
15371564{
1565   update_mode();
1566
15381567   if( strcmp( Machine->gamedrv->name, "ddr2ml" ) == 0 )
15391568   {
15401569      /* patch out security-plate error */
r778r779
26552684         {
26562685            if( ( salarymc_lamp_shift & ~0xe38 ) != 0 )
26572686            {
2658               verboselog( 0, "%08x\n", salarymc_lamp_shift & ~0xe38 );
2687               verboselog( 0, "unknown bits in salarymc_lamp_shift %08x\n", salarymc_lamp_shift & ~0xe38 );
26592688            }
26602689
26612690            output_set_value( "player 1 red", ( salarymc_lamp_shift >> 11 ) & 1 );
r778r779
27282757   PORT_BIT( 0xffffffff, IP_ACTIVE_LOW, IPT_UNKNOWN )
27292758
27302759   PORT_START_TAG("IN1")
2731   PORT_DIPNAME( 0x00000001, 0x00000001, "Unused 2" )
2760   PORT_DIPNAME( 0x00000001, 0x00000001, "Unused 1" ) PORT_DIPLOCATION( "DIP SW:1" )
27322761   PORT_DIPSETTING(          0x00000001, DEF_STR( Off ) )
27332762   PORT_DIPSETTING(          0x00000000, DEF_STR( On ) )
2734   PORT_DIPNAME( 0x00000002, 0x00000002, "Screen Flip" )
2763   PORT_DIPNAME( 0x00000002, 0x00000002, "Screen Flip" ) PORT_DIPLOCATION( "DIP SW:2" )
27352764   PORT_DIPSETTING(          0x00000002, DEF_STR( Normal ) )
27362765   PORT_DIPSETTING(          0x00000000, "V-Flip" )
2737   PORT_DIPNAME( 0x00000004, 0x00000004, "Unused 1")
2766   PORT_DIPNAME( 0x00000004, 0x00000004, "Unused 2") PORT_DIPLOCATION( "DIP SW:3" )
27382767   PORT_DIPSETTING(          0x00000004, DEF_STR( Off ) )
27392768   PORT_DIPSETTING(          0x00000000, DEF_STR( On ) )
2740   PORT_DIPNAME( 0x00000008, 0x00000008, "Start Up Device" )
2769   PORT_DIPNAME( 0x00000008, 0x00000000, "Start Up Device" ) PORT_DIPLOCATION( "DIP SW:4" )
27412770   PORT_DIPSETTING(          0x00000008, "CD-ROM Drive" )
27422771   PORT_DIPSETTING(          0x00000000, "Flash ROM" )
27432772   PORT_BIT( 0x000000f0, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* 0xc0 */
r778r779
27452774   PORT_BIT( 0x00000200, IP_ACTIVE_HIGH, IPT_SPECIAL )
27462775//  PORT_BIT( 0x00000400, IP_ACTIVE_LOW, IPT_UNKNOWN )
27472776//  PORT_BIT( 0x00000800, IP_ACTIVE_LOW, IPT_UNKNOWN )
2748   PORT_DIPNAME( 0x00001000, 0x00001000, "Network?" )
2749   PORT_DIPSETTING(          0x00001000, DEF_STR( Off ) )
2750   PORT_DIPSETTING(          0x00000000, DEF_STR( On ) )
2777   PORT_CONFNAME( 0x00001000, 0x00001000, "Network?" )
2778   PORT_CONFSETTING(          0x00001000, DEF_STR( Off ) )
2779   PORT_CONFSETTING(          0x00000000, DEF_STR( On ) )
27512780//  PORT_BIT( 0x00002000, IP_ACTIVE_LOW, IPT_UNKNOWN )
27522781//  PORT_BIT( 0x00004000, IP_ACTIVE_LOW, IPT_UNKNOWN )
27532782//  PORT_BIT( 0x00008000, IP_ACTIVE_LOW, IPT_UNKNOWN )
r778r779
27982827   PORT_BIT( 0x08000000, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(2)
27992828//  PORT_BIT( 0xf0fff0ff, IP_ACTIVE_LOW, IPT_UNKNOWN )
28002829
2801   PORT_START_TAG("SECURITY_CART")
2802   PORT_DIPNAME( 0x00000001, 0x00000000, "Security Cart" )
2803   PORT_DIPSETTING(          0x00000000, "Install" )
2804   PORT_DIPSETTING(          0x00000001, "Game" )
2830   PORT_START_TAG("MODE")
2831   PORT_CONFNAME( 1, 0, "Mode" )
2832   PORT_CONFSETTING( 0, "Install" )
2833   PORT_CONFSETTING( 1, "Game" )
28052834INPUT_PORTS_END
28062835
28072836INPUT_PORTS_START( fbaitbc )
r778r779
30543083
30553084   DISK_REGION( REGION_DISKS )
30563085   DISK_IMAGE_READONLY( "845jab02", 0, MD5(2ef6cbc2289f9a6b23afa59129a1ac04) SHA1(6ee7f1c576a6248d3bb6833bd3bb500e538d3ade) )
3057   DISK_IMAGE_READONLY( "install", 0, NO_DUMP ) // if this even exists
3086   DISK_IMAGE_READONLY( "845jaa01", 1, NO_DUMP ) // if this even exists
30583087ROM_END
30593088
30603089ROM_START( ddra )
r778r779
30963125   ROM_FILL( 0x0000000, 0x1000000, 0xff )
30973126
30983127   DISK_REGION( REGION_DISKS )
3099   DISK_IMAGE_READONLY( "896jaa01", 0, MD5(3cab3bc6d9459360da8f6784dd861067) SHA1(cb99e52eac5223509e914648d9b5dec59ed242f8) ) // upgrade or bootleg?
3100   DISK_IMAGE_READONLY( "game", 1, NO_DUMP ) // don't know how the club versions are supposed to work.
3128   DISK_IMAGE_READONLY( "896jaa01", 0, MD5(3cab3bc6d9459360da8f6784dd861067) SHA1(cb99e52eac5223509e914648d9b5dec59ed242f8) )
3129   DISK_IMAGE_READONLY( "895ja",    1, BAD_DUMP MD5(2013c3aac0d7fdbae10eadf1aaa8a174) SHA1(03e64fc507d42d3fd6fec288893ec065e4313b00) )
31013130ROM_END
31023131
31033132ROM_START( ddr2mc2 )
r778r779
31113140   ROM_FILL( 0x0000000, 0x1000000, 0xff )
31123141
31133142   DISK_REGION( REGION_DISKS )
3114   DISK_IMAGE_READONLY( "984jaa01", 0, MD5(945de47f526007f7c607c398b9b6275a) SHA1(da257e5a553a75439970393bdafc581f6971f946) ) // upgrade or bootleg?
3115   DISK_IMAGE_READONLY( "game", 1, NO_DUMP ) // don't know how the club versions are supposed to work.
3143   DISK_IMAGE_READONLY( "984jaa01", 0, MD5(945de47f526007f7c607c398b9b6275a) SHA1(da257e5a553a75439970393bdafc581f6971f946) )
3144   DISK_IMAGE_READONLY( "895ja",    1, BAD_DUMP MD5(2013c3aac0d7fdbae10eadf1aaa8a174) SHA1(03e64fc507d42d3fd6fec288893ec065e4313b00) )
31163145ROM_END
31173146
31183147ROM_START( ddr2ml )
r778r779
34443473   DISK_IMAGE_READONLY( "a27jaa02", 0, MD5(502ecebf4d2e931f6b75b6a22b7d620c) SHA1(2edb3a0160c2783db6b0ddfce0f7c9ebb35b481f) )
34453474ROM_END
34463475
3476ROM_START( ddrbocd )
3477   ROM_REGION32_LE( 0x080000, REGION_USER1, 0 )
3478   SYS573_BIOS_A
3479
3480   ROM_REGION( 0x0000224, REGION_USER2, 0 ) /* security cart eeprom */
3481   ROM_LOAD( "gn895jaa.u1",  0x000000, 0x000224, BAD_DUMP CRC(363f427e) SHA1(adec886a07b9bd91f142f286b04fc6582205f037) )
3482
3483   ROM_REGION( 0x1000000, REGION_USER3, 0 ) /* onboard flash */
3484   ROM_FILL( 0x0000000, 0x1000000, 0xff )
3485
3486   ROM_REGION( 0x2000000, REGION_USER4, 0 ) /* PCCARD1 */
3487   ROM_FILL( 0x0000000, 0x2000000, 0xff )
3488
3489   DISK_REGION( REGION_DISKS )
3490   DISK_IMAGE_READONLY( "892jaa01", 0, MD5(b29b63bafdd35f38662ff8daf5fc59f7) SHA1(c929c488d206e055e756ca506c3b1ff430a46aaa) )
3491   DISK_IMAGE_READONLY( "895ja",    1, BAD_DUMP MD5(2013c3aac0d7fdbae10eadf1aaa8a174) SHA1(03e64fc507d42d3fd6fec288893ec065e4313b00) )
3492ROM_END
3493
34473494ROM_START( ddrs2k )
34483495   ROM_REGION32_LE( 0x080000, REGION_USER1, 0 )
34493496   SYS573_BIOS_A
r778r779
41564203GAME( 1999, fbaitmcu, fbaitmc,  konami573, fbaitmc,   ge765pwbba, ROT0, "Konami", "Fisherman's Bait - Marlin Challenge (GX889 VER. UA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
41574204GAME( 1999, fbaitmcj, fbaitmc,  konami573, fbaitmc,   ge765pwbba, ROT0, "Konami", "Fisherman's Bait - Marlin Challenge (GX889 VER. JA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
41584205GAME( 1999, fbaitmca, fbaitmc,  konami573, fbaitmc,   ge765pwbba, ROT0, "Konami", "Fisherman's Bait - Marlin Challenge (GX889 VER. AA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
4159GAME( 1999, ddr2m,    ddr2ml,   konami573, ddr,       ddr,        ROT0, "Konami", "Dance Dance Revolution 2nd Mix (GN895 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING )
4160GAME( 1999, ddr2ml,   sys573,   konami573, ddr,       ddr,        ROT0, "Konami", "Dance Dance Revolution 2nd Mix - Link Ver (GE885 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
4161GAME( 1999, ddr2mc,   ddr2ml,   konami573, ddr,       ddr,        ROT0, "Konami", "Dance Dance Revolution 2nd Mix with beatmaniaIIDX CLUB VERSiON (GE896 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING )
4162GAME( 1999, ddr2mc2,  ddr2ml,   konami573, ddr,       ddr,        ROT0, "Konami", "Dance Dance Revolution 2nd Mix with beatmaniaIIDX substream CLUB VERSiON 2 (GE984 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING )
4206GAME( 1999, ddr2m,    sys573,   konami573, ddr,       ddr,        ROT0, "Konami", "Dance Dance Revolution 2nd Mix (GN895 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
4207GAME( 1999, ddrbocd,  ddr2m,    konami573, ddr,       ddr,        ROT0, "Konami", "Dance Dance Revolution Best of Cool Dancers (GE892 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
4208GAME( 1999, ddr2ml,   ddr2m,    konami573, ddr,       ddr,        ROT0, "Konami", "Dance Dance Revolution 2nd Mix - Link Ver (GE885 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
4209GAME( 1999, ddr2mc,   ddr2m,    konami573, ddr,       ddr,        ROT0, "Konami", "Dance Dance Revolution 2nd Mix with beatmaniaIIDX CLUB VERSiON (GE896 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
4210GAME( 1999, ddr2mc2,  ddr2m,    konami573, ddr,       ddr,        ROT0, "Konami", "Dance Dance Revolution 2nd Mix with beatmaniaIIDX substream CLUB VERSiON 2 (GE984 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
41634211GAME( 1999, gtrfrk2m, sys573,   konami573, gtrfrks,   gtrfrks,    ROT0, "Konami", "Guitar Freaks 2nd Mix Ver 1.01 (GQ883 VER. JAD)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
41644212GAME( 1999, dsftkd,   sys573,   konami573, ddr,       ddr,        ROT0, "Konami", "Dancing Stage featuring TRUE KiSS DESTiNATiON (G*884 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
41654213GAME( 1999, ddrsbm,   sys573,   konami573, ddrsolo,   ddrsolo,    ROT0, "Konami", "Dance Dance Revolution Solo Bass Mix (GQ894 VER. JAA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING )
src/mame/drivers/midas.c
r778r779
6565VIDEO_START( livequiz )
6666{
6767   tmap = tilemap_create(   get_tile_info, tilemap_scan_cols,
68                     TILEMAP_TRANSPARENT, 8,8, 0x80,0x20   );
68                     TILEMAP_TYPE_TRANSPARENT, 8,8, 0x80,0x20   );
6969
7070   tilemap_set_transparent_pen(tmap, 0);
7171}
src/mame/drivers/ampoker.c
r778r779
5959VIDEO_START(ampoker2)
6060{
6161   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows,
62      TILEMAP_OPAQUE, 8, 8, 64, 32);
62      TILEMAP_TYPE_OPAQUE, 8, 8, 64, 32);
6363}
6464
6565VIDEO_UPDATE(ampoker2)
src/mame/drivers/jackpool.c
r778r779
140140
141141VIDEO_START(jackpool)
142142{
143   jackpool_layer0_tilemap = tilemap_create(get_jackpool_layer0_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT, 8, 8,64,32);
144   jackpool_layer1_tilemap = tilemap_create(get_jackpool_layer1_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT, 8, 8,64,32);
145   jackpool_layer2_tilemap = tilemap_create(get_jackpool_layer2_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT, 8, 8,64,32);
143   jackpool_layer0_tilemap = tilemap_create(get_jackpool_layer0_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 8, 8,64,32);
144   jackpool_layer1_tilemap = tilemap_create(get_jackpool_layer1_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 8, 8,64,32);
145   jackpool_layer2_tilemap = tilemap_create(get_jackpool_layer2_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 8, 8,64,32);
146146
147147   tilemap_set_transparent_pen(jackpool_layer0_tilemap,0);
148148   tilemap_set_transparent_pen(jackpool_layer2_tilemap,0);
src/mame/drivers/nmg5.c
r778r779
798798
799799VIDEO_START( nmg5 )
800800{
801   bg_tilemap = tilemap_create(bg_get_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,     8,8,64,64);
802   fg_tilemap = tilemap_create(fg_get_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,64,64);
801   bg_tilemap = tilemap_create(bg_get_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,     8,8,64,64);
802   fg_tilemap = tilemap_create(fg_get_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,64,64);
803803
804804   tilemap_set_transparent_pen(fg_tilemap,0);
805805}
src/mame/drivers/wink.c
r778r779
269269
270270VIDEO_START( wink )
271271{
272   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, TILEMAP_OPAQUE, 8, 8, 32, 32);
272   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE, 8, 8, 32, 32);
273273}
274274
275275VIDEO_UPDATE( wink )
src/mame/drivers/2mindril.c
r778r779
11/*
2 Two Minute Drill - Taito 1993
3 -----------------------------
4 Half Video, Half Mechanical?
5(video hw + motion/acceleration sensor ?)
26
3 Two Minute Drill
7 preliminary driver by
8  David Haywood
9  Tomasz Slanina
410
5 Taito
11TODO:
12 - simulate the sensors (and remove rom hack)
13 - controls/dips
14 - find video control regs (layer enable, scroll)
615
7 Half Video, Half Mechanical?
16BG scroll:
17BG maps are 2048x256 (128x16 16x16 tiles).
18There's some kind of double buffering - odd/even screens are at
19x offsets 0 and 512 (it's visible during distance count after throw (odd/even numbers))
820
21looks like regs @460000 are used,  pairs at N, and N+8, so
22460000, 460008
23460002, 46000a
24460004, 46000c
25460006, 46000e
26
927*/
1028
1129/*
1230
1331TWO MINUTE DRILL - Taito 1993?
1432
15
1633No idea what this game is... I do not have the pinout
17
18
19
20
2134See pic for more details
2235
23
24
25
26
2736 Brief hardware overview:
2837 ------------------------
2938
r778r779
3140
3241 Sound            - Yamaha YM2610B
3342
34
35
3643 Taito custom ICs - TC0400YSC
3744                  - TC0260DAR
3845                  - TC0630FDP
3946                  - TC0510NI0
4047
4148DAC               -26.6860Mhz
42          -32.0000Mhz
49                        -32.0000Mhz
4350
51*/
4452
53#include "driver.h"
54#include "sound/2610intf.h"
4555
46See pic for more details
56static UINT16 *unkram;
4757
58static UINT16 *map1ram;
59static UINT16 *map2ram;
60static UINT16 *map3ram;
61static UINT16 *map4ram;
62static UINT16 *charram;
63static UINT16 *textram;
4864
49*/
65#define DRAW_MAP(map,num)    {    int x,y; \
66              for(y=0;y<16;y++) \
67                for(x=0;x<128;x++) \
68                { \
69                   UINT16 data0=map[y*128+x*2]; \
70                   UINT16 data1=map[y*128+x*2+1]; \
71                   drawgfx(bitmap,machine->gfx[0], data1, \
72                      data0&0xff, \
73                     data0&0x4000, data0&0x8000, \
74                     x*16-512/*+(((INT16)(unkram[0x60000/2+num]))/32)*/, y*16/*+(((INT16)(unkram[0x60008/2+num]))/32)*/, \
75                     cliprect,TRANSPARENCY_PEN,0); \
76                }   \
77         }
5078
51#include "driver.h"
79VIDEO_UPDATE( drill )
80{
81   int i;
82   fillbitmap(bitmap,0,NULL);
5283
53VIDEO_START( drill )
54{
84   for (i=0; i<256; i++)
85   {
86      decodechar(Machine->gfx[1],i,(UINT8*)&charram[0],Machine->drv->gfxdecodeinfo[1].gfxlayout);
87   }
88
89   DRAW_MAP(map1ram,0)
90   DRAW_MAP(map2ram,1)
91   DRAW_MAP(map3ram,2)
92   DRAW_MAP(map4ram,3)
93
94
95   {
96      int x,y;
97      for(y=0;y<64;y++)
98          for(x=0;x<64;x++)
99          {
100             drawgfx(   bitmap,
101                  machine->gfx[1],
102                  textram[y*64+x]&0xff, //1ff ??
103                  ((textram[y*64+x]>>9)&0xf),
104                  0, 0,
105                  x*8,y*8,
106                  cliprect,
107                  TRANSPARENCY_PEN,0);
108          }
109   }
110   //printf("%.4X %.4X %.4X %.4X %.4X %.4X\n", unkram[0x60000/2],unkram[0x60000/2+1],unkram[0x60000/2+2],unkram[0x60000/2+3],unkram[0x60000/2+4],unkram[0x60000/2+5]);
111   return 0;
55112}
56113
57VIDEO_UPDATE( drill )
114VIDEO_START( drill )
58115{
59   return 0;
116   machine->gfx[0]->color_granularity=16;
60117}
61118
62119READ16_HANDLER( drill_unk_r )
63120{
64   return mame_rand(Machine);
121   return 0xffff;
65122}
66123
67124static ADDRESS_MAP_START( drill_map, ADDRESS_SPACE_PROGRAM, 16 )
68125   AM_RANGE(0x000000, 0x07ffff) AM_ROM
69126   AM_RANGE(0x200000, 0x20ffff) AM_RAM
70   AM_RANGE(0x400000, 0x43ffff) AM_RAM // video stuff
71
127   AM_RANGE(0x300000, 0x3000ff) AM_RAM
128   AM_RANGE(0x410000, 0x411fff) AM_RAM AM_BASE(&map1ram)
129   AM_RANGE(0x412000, 0x413fff) AM_RAM AM_BASE(&map2ram)
130   AM_RANGE(0x414000, 0x415fff) AM_RAM AM_BASE(&map3ram)
131   AM_RANGE(0x416000, 0x417fff) AM_RAM AM_BASE(&map4ram)
132   AM_RANGE(0x41c000, 0x41dfff) AM_RAM AM_BASE(&textram)
133   AM_RANGE(0x41e000, 0x41ffff) AM_RAM AM_BASE(&charram)
134   AM_RANGE(0x400000, 0x4fffff) AM_RAM AM_BASE(&unkram)// video stuff, 460000 - video regs ?
72135   AM_RANGE(0x500000, 0x501fff) AM_RAM AM_WRITE(paletteram16_RRRRGGGGBBBBRGBx_word_w) AM_BASE(&paletteram16)
73
74   AM_RANGE(0x700000, 0x70000f) AM_READ(drill_unk_r) AM_WRITE(MWA16_NOP)
75
136   AM_RANGE(0x502000, 0x503fff) AM_RAM
137   AM_RANGE(0x700000, 0x70000f) AM_READ(drill_unk_r) AM_WRITE(MWA16_NOP) // i/o
138   AM_RANGE(0x600000, 0x600001) AM_READ(YM2610_status_port_0_A_lsb_r) AM_WRITE(YM2610_control_port_0_A_lsb_w)
139   AM_RANGE(0x600002, 0x600003) AM_READ(YM2610_read_port_0_lsb_r) AM_WRITE(YM2610_data_port_0_A_lsb_w)
140   AM_RANGE(0x600004, 0x600005) AM_READ(YM2610_status_port_0_B_lsb_r) AM_WRITE(YM2610_control_port_0_B_lsb_w)
141   AM_RANGE(0x600006, 0x600007) AM_WRITE(YM2610_data_port_0_B_lsb_w)
142   AM_RANGE(0x60000c, 0x60000d) AM_READ(MRA16_NOP) AM_WRITE(MWA16_NOP)
143   AM_RANGE(0x60000e, 0x60000f) AM_READ(MRA16_NOP) AM_WRITE(MWA16_NOP)
76144ADDRESS_MAP_END
77145
78
79
80146INPUT_PORTS_START( drill )
81147INPUT_PORTS_END
82148
83
84149static const gfx_layout drill_layout =
85150{
86151   16,16,
87152   RGN_FRAC(1,2),
88153   6,
89   { 0,1,2,3 , RGN_FRAC(1,2)+0, RGN_FRAC(1,2)+1 }, // order may be wrong
90   { 20, 16, 28, 24, 4, 0, 12, 8,        52, 48, 60, 56, 36, 32, 40, 44 },
154   { RGN_FRAC(1,2)+1, RGN_FRAC(1,2)+0 ,0,1,2,3 },
155   { 20, 16, 28, 24, 4, 0, 12, 8,        52, 48, 60, 56, 36, 32, 44, 40 },
91156   { 0*64, 1*64, 2*64, 3*64, 4*64, 5*64, 6*64, 7*64, 8*64, 9*64, 10*64, 11*64, 12*64, 13*64, 14*64, 15*64 },
92157   16*64
93158};
94159
160static const gfx_layout vramlayout=
161{
162    8,8,
163    256,
164    4,
165    { 0, 1, 2, 3 },
166    {20,16,28,24,4,0,12,8},
167     { 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32 },
168    32*8
169};
95170
96
97171static const gfx_decode gfxdecodeinfo[] =
98172{
99   { REGION_GFX1, 0, &drill_layout,  0x0, 256  },
173   { REGION_GFX1, 0, &drill_layout,  0, 256  },
174   { 0,            0, &vramlayout,   0, 256 },
100175   { -1 }
101176};
102177
103static TIMER_CALLBACK( drill_interrupt5 )
104{
105   cpunum_set_input_line(0,5,HOLD_LINE);
106}
107178
108179static INTERRUPT_GEN( drill_interrupt )
109180{
110   mame_timer_set(MAME_TIME_IN_CYCLES(5000,0),0,drill_interrupt5);
111181   cpunum_set_input_line(0, 4, HOLD_LINE);
112182}
113183
184static void irqhandler(int irq)
185{
186   cpunum_set_input_line(0,5,irq ? ASSERT_LINE : CLEAR_LINE);
187}
114188
189static struct YM2610interface ym2610_interface =
190{
191   irqhandler,
192   0,
193   REGION_SOUND1
194};
195
115196static MACHINE_DRIVER_START( drill )
116   MDRV_CPU_ADD_TAG("main", M68000, 16000000 ) // ?
197   MDRV_CPU_ADD_TAG("main", M68000, 16000000 )
117198   MDRV_CPU_PROGRAM_MAP(drill_map,0)
118199   MDRV_CPU_VBLANK_INT(drill_interrupt,1)
119
120200   MDRV_SCREEN_REFRESH_RATE(60)
121201   MDRV_SCREEN_VBLANK_TIME(DEFAULT_60HZ_VBLANK_DURATION)
122
123202   MDRV_GFXDECODE(gfxdecodeinfo)
124
125203   MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER)
126204   MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
127   MDRV_SCREEN_SIZE(64*8, 32*8)
128   MDRV_SCREEN_VISIBLE_AREA(8*8, 48*8-1, 2*8, 30*8-1)
205   MDRV_SCREEN_SIZE(128*16, 64*8)
206   MDRV_SCREEN_VISIBLE_AREA(0, 319, 0, 239-16)
129207   MDRV_PALETTE_LENGTH(0x1000)
130208
131209   MDRV_VIDEO_START(drill)
132210   MDRV_VIDEO_UPDATE(drill)
211
212   MDRV_SPEAKER_STANDARD_STEREO("left", "right")
213
214   MDRV_SOUND_ADD(YM2610, 16000000/2)
215   MDRV_SOUND_CONFIG(ym2610_interface)
216   MDRV_SOUND_ROUTE(0, "left",  0.25)
217   MDRV_SOUND_ROUTE(0, "right", 0.25)
218   MDRV_SOUND_ROUTE(1, "left",  1.0)
219   MDRV_SOUND_ROUTE(2, "right", 1.0)
133220MACHINE_DRIVER_END
134221
135222
r778r779
156243   UINT32 *dst    = (UINT32*)memory_region       ( REGION_GFX1 );// + 0x400000;
157244   int i;
158245
159
160246   for (i=0; i< 0x400000/4; i++)
161247   {
162248      UINT32 dat1 = src[i];
163249       dat1 = BITSWAP32(dat1, 3, 11, 19, 27, 2, 10, 18, 26, 1, 9, 17, 25, 0, 8, 16, 24, 7, 15, 23, 31, 6, 14, 22, 30, 5, 13, 21, 29, 4, 12, 20, 28 );
164250      dst[(0x400000/4)+i] = dat1;
165251   }
252
253   //enable some kind of debug mode (ignore errors)
254   memory_region( REGION_CPU1)[0x7fffb]=0;
255   memory_region( REGION_CPU1)[0x7fffc]=0;
256   memory_region( REGION_CPU1)[0x7fffd]=0;
257   memory_region( REGION_CPU1)[0x7fffe]=0;
166258}
167259
168GAME( 1993, 2mindril,    0,        drill,    drill,    drill, ROT0,  "Taito", "Two Minute Drill", GAME_NO_SOUND|GAME_NOT_WORKING )
260GAME( 1993, 2mindril,    0,        drill,    drill,    drill, ROT0,  "Taito", "Two Minute Drill", GAME_NOT_WORKING | GAME_IMPERFECT_GRAPHICS )
src/mame/drivers/olibochu.c
r778r779
9494VIDEO_START( olibochu )
9595{
9696   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows,
97      TILEMAP_OPAQUE, 8, 8, 32, 32);
97      TILEMAP_TYPE_OPAQUE, 8, 8, 32, 32);
9898}
9999
100100static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect)
src/mame/drivers/lockon.c
r778r779
200200
201201VIDEO_START( lockon )
202202{
203   lockon_tilemap0 = tilemap_create(get_lockon_tile_info0,tilemap_scan_rows,TILEMAP_TRANSPARENT, 8,8,64,32);
204   lockon_tilemap1 = tilemap_create(get_lockon_tile_info1,tilemap_scan_rows,TILEMAP_TRANSPARENT, 8,8,64,32);
205   lockon_tilemap2 = tilemap_create(get_lockon_tile_info2,tilemap_scan_rows,TILEMAP_TRANSPARENT, 8,8,16,16); // HUD -> wrong
203   lockon_tilemap0 = tilemap_create(get_lockon_tile_info0,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 8,8,64,32);
204   lockon_tilemap1 = tilemap_create(get_lockon_tile_info1,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 8,8,64,32);
205   lockon_tilemap2 = tilemap_create(get_lockon_tile_info2,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT, 8,8,16,16); // HUD -> wrong
206206   tilemap_set_transparent_pen(lockon_tilemap0,0x00);
207207}
208208
src/mame/drivers/safarir.c
r778r779
158158
159159static VIDEO_START( safarir )
160160{
161   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, TILEMAP_OPAQUE, 8, 8, 32, 32);
162   fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows, TILEMAP_TRANSPARENT, 8, 8, 32, 32);
161   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE, 8, 8, 32, 32);
162   fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 8, 8, 32, 32);
163163
164164   tilemap_set_transparent_pen(fg_tilemap, 0);
165165}
src/mame/drivers/wilytowr.c
r778r779
154154VIDEO_START( wilytowr )
155155{
156156   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows,
157      TILEMAP_OPAQUE, 8, 8, 32, 32);
157      TILEMAP_TYPE_OPAQUE, 8, 8, 32, 32);
158158
159159   fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows,
160      TILEMAP_TRANSPARENT, 8, 8, 32, 32);
160      TILEMAP_TYPE_TRANSPARENT, 8, 8, 32, 32);
161161
162162   tilemap_set_scroll_cols(bg_tilemap, 32);
163163   tilemap_set_transparent_pen(fg_tilemap, 0);
src/mame/drivers/looping.c
r778r779
174174{
175175   looping_state *state = machine->driver_data;
176176
177   state->bg_tilemap = tilemap_create(get_tile_info, tilemap_scan_rows, TILEMAP_OPAQUE, 8,8, 32,32);
177   state->bg_tilemap = tilemap_create(get_tile_info, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE, 8,8, 32,32);
178178
179179   tilemap_set_scroll_cols(state->bg_tilemap, 0x20);
180180}
src/mame/drivers/1945kiii.c
r778r779
7676
7777VIDEO_START(k3)
7878{
79   k3_bg_tilemap = tilemap_create(get_k3_bg_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,      16, 16, 32,64);
79   k3_bg_tilemap = tilemap_create(get_k3_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,      16, 16, 32,64);
8080}
8181
8282static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect)
src/mame/drivers/darkhors.c
r778r779
136136VIDEO_START( darkhors )
137137{
138138   darkhors_tmap         =   tilemap_create(   get_tile_info_0, tilemap_scan_rows,
139                                    TILEMAP_TRANSPARENT, 16,16, 0x40,0x40   );
139                                    TILEMAP_TYPE_TRANSPARENT, 16,16, 0x40,0x40   );
140140
141141   darkhors_tmap2         =   tilemap_create(   get_tile_info_1, tilemap_scan_rows,
142                                    TILEMAP_TRANSPARENT, 16,16, 0x40,0x40   );
142                                    TILEMAP_TYPE_TRANSPARENT, 16,16, 0x40,0x40   );
143143
144144   tilemap_set_transparent_pen(darkhors_tmap, 0);
145145   tilemap_set_transparent_pen(darkhors_tmap2, 0);
src/mame/drivers/jollyjgr.c
r778r779
273273
274274VIDEO_START( jollyjgr )
275275{
276   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, TILEMAP_TRANSPARENT, 8, 8, 32, 32);
276   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 8, 8, 32, 32);
277277
278278   tilemap_set_transparent_pen(bg_tilemap, 0);
279279   tilemap_set_scroll_cols(bg_tilemap, 32);
src/mame/drivers/namcoic.c
r778r779
6161   mTilemapInfo.videoram = auto_malloc( 0x10000*2 );
6262
6363      /* four scrolling tilemaps */
64      mTilemapInfo.tmap[0] = tilemap_create(get_tile_info0,tilemap_scan_rows,TILEMAP_BITMASK,8,8,64,64);
65      mTilemapInfo.tmap[1] = tilemap_create(get_tile_info1,tilemap_scan_rows,TILEMAP_BITMASK,8,8,64,64);
66      mTilemapInfo.tmap[2] = tilemap_create(get_tile_info2,tilemap_scan_rows,TILEMAP_BITMASK,8,8,64,64);
67      mTilemapInfo.tmap[3] = tilemap_create(get_tile_info3,tilemap_scan_rows,TILEMAP_BITMASK,8,8,64,64);
64      mTilemapInfo.tmap[0] = tilemap_create(get_tile_info0,tilemap_scan_rows,TILEMAP_TYPE_BITMASK,8,8,64,64);
65      mTilemapInfo.tmap[1] = tilemap_create(get_tile_info1,tilemap_scan_rows,TILEMAP_TYPE_BITMASK,8,8,64,64);
66      mTilemapInfo.tmap[2] = tilemap_create(get_tile_info2,tilemap_scan_rows,TILEMAP_TYPE_BITMASK,8,8,64,64);
67      mTilemapInfo.tmap[3] = tilemap_create(get_tile_info3,tilemap_scan_rows,TILEMAP_TYPE_BITMASK,8,8,64,64);
6868
6969      /* two non-scrolling tilemaps */
70      mTilemapInfo.tmap[4] = tilemap_create(get_tile_info4,tilemap_scan_rows,TILEMAP_BITMASK,8,8,36,28);
71      mTilemapInfo.tmap[5] = tilemap_create(get_tile_info5,tilemap_scan_rows,TILEMAP_BITMASK,8,8,36,28);
70      mTilemapInfo.tmap[4] = tilemap_create(get_tile_info4,tilemap_scan_rows,TILEMAP_TYPE_BITMASK,8,8,36,28);
71      mTilemapInfo.tmap[5] = tilemap_create(get_tile_info5,tilemap_scan_rows,TILEMAP_TYPE_BITMASK,8,8,36,28);
7272
7373      /* define offsets for scrolling */
7474      for( i=0; i<4; i++ )
r778r779
10911091         mRozTilemap[i] = tilemap_create(
10921092            roz_info[i],
10931093            namco_roz_scan,
1094            TILEMAP_BITMASK,
1094            TILEMAP_TYPE_BITMASK,
10951095            16,16,
10961096            256,256 );
10971097      }
r778r779
15831583            machine->gfx[gfxbank] = pGfx;
15841584            mpRoadTilemap = tilemap_create(
15851585               get_road_info,tilemap_scan_rows,
1586               TILEMAP_OPAQUE,
1586               TILEMAP_TYPE_OPAQUE,
15871587               ROAD_TILE_SIZE,ROAD_TILE_SIZE,
15881588               ROAD_COLS,ROAD_ROWS);
15891589
src/mame/drivers/ddayjlc.c
r778r779
343343
344344VIDEO_START( ddayjlc )
345345{
346   bg_tilemap = tilemap_create(get_tile_info_bg,tilemap_scan_rows,TILEMAP_OPAQUE,8,8,32,32);
346   bg_tilemap = tilemap_create(get_tile_info_bg,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,8,8,32,32);
347347}
348348
349349VIDEO_UPDATE( ddayjlc )
src/mame/drivers/konamigx.c
r778r779
21502150#define GX_BIOS ROM_LOAD("300a01.34k", 0x000000, 128*1024, CRC(d5fa95f5) SHA1(c483aa98ff8ef40cdac359c19ad23fea5ecc1906) )
21512151
21522152ROM_START(konamigx)
2153   ROM_REGION( 0x800000, REGION_CPU1, 0)
2153   ROM_REGION( 0x800000, REGION_CPU1, ROMREGION_ERASEFF )
21542154   GX_BIOS
21552155
21562156   /* sound program */
src/mame/drivers/statriv2.c
r778r779
115115
116116VIDEO_START (statriv2)
117117{
118   statriv2_tilemap = tilemap_create(get_statriv2_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,8,16,64, 16);
118   statriv2_tilemap = tilemap_create(get_statriv2_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,8,16,64, 16);
119119}
120120
121121VIDEO_UPDATE (statriv2)
src/mame/drivers/egghunt.c
r778r779
144144
145145VIDEO_START(egghunt)
146146{
147   bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,8,8,64, 32);
147   bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,8,8,64, 32);
148148   egghunt_bgram = auto_malloc(0x1000);
149149   egghunt_spram = auto_malloc(0x1000);
150150}
src/mame/drivers/acommand.c
r778r779
147147
148148VIDEO_START( acommand )
149149{
150   tx_tilemap = tilemap_create(ac_get_tx_tile_info,tilemap_scan_cols,TILEMAP_TRANSPARENT,8,8,512,32);
151   bg_tilemap = tilemap_create(ac_get_bg_tile_info,bg_scan,TILEMAP_OPAQUE,16,16,256,16);
150   tx_tilemap = tilemap_create(ac_get_tx_tile_info,tilemap_scan_cols,TILEMAP_TYPE_TRANSPARENT,8,8,512,32);
151   bg_tilemap = tilemap_create(ac_get_bg_tile_info,bg_scan,TILEMAP_TYPE_OPAQUE,16,16,256,16);
152152
153153   ac_vregs = auto_malloc(0x80);
154154
src/mame/drivers/tubep.c
r778r779
764764
765765   MDRV_PALETTE_INIT(tubep)
766766   MDRV_VIDEO_START(tubep)
767   MDRV_VIDEO_EOF(tubep_eof)
767   MDRV_VIDEO_EOF(tubep)
768768   MDRV_VIDEO_UPDATE(tubep)
769769
770770   /* sound hardware */
r778r779
823823
824824   MDRV_PALETTE_INIT(rjammer)
825825   MDRV_VIDEO_START(tubep)
826   MDRV_VIDEO_EOF(tubep_eof)
826   MDRV_VIDEO_EOF(tubep)
827827   MDRV_VIDEO_UPDATE(rjammer)
828828
829829   /* sound hardware */
src/mame/drivers/ppmast93.c
r778r779
331331
332332VIDEO_START( ppmast93 )
333333{
334   ppmast93_bg_tilemap = tilemap_create(get_ppmast93_bg_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE,8,8,32, 32);
335   ppmast93_fg_tilemap = tilemap_create(get_ppmast93_fg_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,32, 32);
334   ppmast93_bg_tilemap = tilemap_create(get_ppmast93_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE,8,8,32, 32);
335   ppmast93_fg_tilemap = tilemap_create(get_ppmast93_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,32, 32);
336336
337337   tilemap_set_transparent_pen(ppmast93_fg_tilemap,0);
338338}
src/mame/drivers/exidy.c
r778r779
897897   MDRV_IMPORT_FROM(venture)
898898
899899   MDRV_CPU_ADD(Z80, 3579545/2)
900   /* audio CPU */
901900   MDRV_CPU_PROGRAM_MAP(cvsd_map,0)
902901   MDRV_CPU_IO_MAP(cvsd_iomap,0)
903902
src/mame/drivers/segald.c
r0r779
1/*
2Sega LaserDisc Hardware
3Driver by Andrew Gardner from schematics with help from Daphne Source
4
5Todo:
6    -Get LDV1000 games past the strange, pseudo-attract mode!
7    -Implement ldv1000's unknown/undocumented command 0xf2.
8    -Confirm DIPs do what's expected.  Also, is Joystick_down really Joystick_up?
9    -Correct IC names/positions for the ROMs - Astron Belt schematics have conflicting data.
10    -Add SEGA/Hitachi VIP9500SG laserdisc player to MAME core & fix all non ldv1000 games to use it.
11    -Write Sprite drawing code.
12    -Hook up character map color PROM.
13    -Confirm palette code (inferred from Daphne source) once its actually used.
14    -Hook up OUT writes.
15    -Add samples.
16    -Confirm banking works.
17    -Character decoding may combine the lower 0x0800 with the upper 0x0800.
18*/
19
20#include "driver.h"
21#include "render.h"
22#include "machine/laserdsc.h"
23
24#define SCHEMATIC_CLOCK (20000000)
25
26static UINT8 nmi_enable = 0;
27
28static UINT8* obj_RAM;
29static UINT8* color_RAM;
30static UINT8* fix_RAM;
31static UINT8* out_RAM;
32
33static laserdisc_info *discinfo;
34static UINT8 ldv1000_input_latch;
35static UINT8 ldv1000_output_latch;
36
37/* VIDEO GOODS */
38void astron_draw_characters(running_machine *machine, mame_bitmap *bitmap,const rectangle *cliprect)
39{
40   UINT8 characterX, characterY;
41
42   for (characterX = 0; characterX < 32; characterX++)
43   {
44      for (characterY = 0; characterY < 32; characterY++)
45      {
46         int current_screen_character = (characterY*32) + characterX;
47         drawgfx(bitmap, machine->gfx[0], fix_RAM[current_screen_character],
48               1, 0, 0, characterX*8, characterY*8, cliprect, TRANSPARENCY_PEN, 0);
49      }
50   }
51}
52
53void astron_draw_sprites(mame_bitmap *bitmap, const rectangle *cliprect)
54{
55   /* Heisted from Daphne */
56   const UINT8 SPR_Y_TOP     = 0;
57/*  const UINT8 SPR_Y_BOTTOM  = 1;*/
58   const UINT8 SPR_X_LO      = 2;
59/*  const UINT8 SPR_X_HI      = 3;*/
60/*  const UINT8 SPR_SKIP_LO   = 4;*/
61/*  const UINT8 SPR_SKIP_HI   = 5;*/
62/*  const UINT8 SPR_GFXOFS_LO = 6;*/
63/*  const UINT8 SPR_GFXOFS_HI = 7;*/
64
65   int sx,sy;
66   int spr_number;
67   int spr_base;
68
69   for (spr_number = 0; spr_number < 32; spr_number++)
70   {
71      spr_base = 0x10 * spr_number;
72      sy = obj_RAM[spr_base + SPR_Y_TOP];
73      sx = obj_RAM[spr_base + SPR_X_LO];
74
75      if (sx != 0 || sy != 0)
76         logerror("Hey!  A sprite's not at 0,0 : %d %d", sx, sy);
77   }
78}
79
80
81VIDEO_UPDATE( astron )
82{
83   fillbitmap(bitmap, 0, cliprect);
84
85   astron_draw_characters(machine, bitmap, cliprect);
86   astron_draw_sprites(bitmap, cliprect);
87
88   /* display disc information */
89   if (discinfo != NULL)
90      popmessage("%s", laserdisc_describe_state(discinfo));
91
92   return 0;
93}
94
95
96
97/* MEMORY HANDLERS */
98/* READS */
99static READ8_HANDLER( astron_DISC_read )
100{
101   if (nmi_enable)
102      ldv1000_input_latch = laserdisc_data_r(discinfo);
103
104   logerror("DISC read   (0x%04x) @ 0x%04x [0x%x]\n", ldv1000_input_latch, offset, activecpu_get_pc());
105
106   return ldv1000_input_latch;
107}
108
109static READ8_HANDLER( astron_OUT_read )
110{
111   logerror("OUT read   (0x%04x) @ 0x%04x [0x%x]\n", out_RAM[offset], offset, activecpu_get_pc());
112   return out_RAM[offset];
113}
114
115static READ8_HANDLER( astron_OBJ_read )
116{
117   logerror("OBJ read   (0x%04x) @ 0x%04x [0x%x]\n", obj_RAM[offset], offset, activecpu_get_pc());
118   return obj_RAM[offset];
119}
120
121static READ8_HANDLER( astron_COLOR_read )
122{
123   logerror("COLOR read   (0x%04x) @ 0x%04x [0x%x]\n", color_RAM[offset], offset, activecpu_get_pc());
124   return color_RAM[offset];
125}
126
127
128/* WRITES */
129static WRITE8_HANDLER( astron_DISC_write )
130{
131   logerror("DISC write : 0x%04x @  0x%04x [0x%x]\n", data, offset, activecpu_get_pc());
132
133   ldv1000_output_latch = data;
134
135   if (nmi_enable)
136      laserdisc_data_w(discinfo, ldv1000_output_latch);
137}
138
139static WRITE8_HANDLER( astron_OUT_write )
140{
141   logerror("OUT write : 0x%04x @  0x%04x [0x%x]\n", data, offset, activecpu_get_pc());
142
143   switch(offset)
144   {
145      case 0x00:
146         /* PCB CN2 -> Audio board */
147         /* (plays samples) */
148         break;
149
150      case 0x01:
151         /* PCB CN1 -> JAMMA */
152         /* data & 0x01 = Coin Meter 1  */
153         /* data & 0x02 = Coin Meter 2  */
154         /* data & 0x04 = Start Lamp 1p */
155         /* data & 0x08 = Start Lamp 2p */
156         /* data & 0x10 = Continue Lamp */
157
158         /* data & 0x20 = CHC           */
159         nmi_enable = data & 0x40;      /* NMIE */
160         /* data & 0x80 = CN0 Pin 19    */
161         break;
162
163      case 0x02:
164         /* PCB CN2 -> Audio board */
165         break;
166
167      case 0x03:
168         /* ??? */
169         break;
170   }
171
172   out_RAM[offset] = data;
173}
174
175static WRITE8_HANDLER( astron_OBJ_write )
176{
177   obj_RAM[offset] = data;
178   logerror("OBJ write : 0x%04x @ 0x%04x [0x%x]\n", data, offset, activecpu_get_pc());
179}
180
181static WRITE8_HANDLER( astron_COLOR_write )
182{
183   UINT8 r, g, b;
184   UINT8 highBits, lowBits;
185   const UINT8 palIndex = offset >> 1;
186
187   /* Combine */
188   color_RAM[offset] = data;
189
190   /* Easy access */
191   highBits = color_RAM[(palIndex<<1)+1] & 0x0f;
192   lowBits  = color_RAM[(palIndex<<1)];
193
194   /* 4-bit RGB */
195   r = (lowBits  & 0x0f);
196   g = (lowBits  & 0xf0) >> 4;
197   b = (highBits & 0x0f);
198
199   /* palette_set_color(Machine, palIndex, r, g, b); */
200   logerror("COLOR write : 0x%04x @   0x%04x [0x%x]\n", data, offset, activecpu_get_pc());
201}
202
203static WRITE8_HANDLER( astron_FIX_write )
204{
205   fix_RAM[offset] = data;
206   /* logerror("FIX write : 0x%04x @ 0x%04x [0x%x]\n", data, offset, activecpu_get_pc()); */
207}
208
209static WRITE8_HANDLER( astron_io_bankswitch_w )
210{
211   logerror("Banking 0x%x\n", data);
212   memory_set_bank(1, data & 0xff);
213}
214
215
216
217
218/* PROGRAM MAP */
219static ADDRESS_MAP_START( mainmem, ADDRESS_SPACE_PROGRAM, 8 )
220   AM_RANGE(0x0000, 0x7fff) AM_ROM
221   AM_RANGE(0x8000, 0xbfff) AM_ROMBANK(1)
222
223   AM_RANGE(0xc000, 0xc7ff) AM_READWRITE(astron_OBJ_read,astron_OBJ_write) AM_BASE(&obj_RAM)   /* OBJ according to the schematics (sprite) */
224   AM_RANGE(0xc800, 0xcfff) AM_READWRITE(astron_DISC_read,astron_DISC_write)               /* DISC interface according to schematics */
225   AM_RANGE(0xd000, 0xd000) AM_READ(port_tag_to_handler8("DSWA"))                        /* SW bank 2 (DIPs) */
226   AM_RANGE(0xd001, 0xd001) AM_READ(port_tag_to_handler8("DSWB"))                        /* SW bank 3 (DIPs) */
227   AM_RANGE(0xd002, 0xd002) AM_READ(port_tag_to_handler8("IN0"))                        /* SW bank 0 (IO) */
228   AM_RANGE(0xd003, 0xd003) AM_READ(port_tag_to_handler8("IN1"))                        /* SW bank 1 (IO) */
229   AM_RANGE(0xd800, 0xd803) AM_READWRITE(astron_OUT_read, astron_OUT_write) AM_BASE(&out_RAM)   /* OUT according to schematics (output port) */
230   AM_RANGE(0xe000, 0xe1ff) AM_READWRITE(astron_COLOR_read, astron_COLOR_write) AM_BASE(&color_RAM) /* COLOR according to the schematics */
231   AM_RANGE(0xf000, 0xf7ff) AM_WRITE(astron_FIX_write)   AM_BASE(&fix_RAM)                  /* FIX according to schematics (characters) */
232   AM_RANGE(0xf800, 0xffff) AM_RAM                                                /* RAM according to schematics */
233ADDRESS_MAP_END
234
235
236/* I/O MAP */
237static ADDRESS_MAP_START( mainport, ADDRESS_SPACE_IO, 8 )
238   ADDRESS_MAP_FLAGS( AMEF_ABITS(8) )
239   AM_RANGE(0x00, 0x01) AM_WRITE(astron_io_bankswitch_w)
240ADDRESS_MAP_END
241
242
243/* PORTS */
244INPUT_PORTS_START( astron )
245   PORT_START_TAG("DSWA")
246   PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:4,3,2,1")
247   PORT_DIPSETTING(    0xe0, DEF_STR( 4C_1C ) )
248   PORT_DIPSETTING(    0x10, DEF_STR( 3C_1C ) )
249   PORT_DIPSETTING(    0x90, DEF_STR( 2C_1C ) )
250   PORT_DIPSETTING(    0xa0, "2C/1C 4C/2C 5C/3C 6C/4C" )
251   PORT_DIPSETTING(    0x20, "2C/1C 4C/3C" )
252   PORT_DIPSETTING(    0xf0, DEF_STR( 1C_1C ) )
253   PORT_DIPSETTING(    0xc0, "1C/1C 2C/1C 3C/3C 4C/4C 5C/6C" )
254   PORT_DIPSETTING(    0x40, "1C/1C 2C/1C 3C/3C 4C/5C" )
255   PORT_DIPSETTING(    0x60, DEF_STR( 2C_3C ) )
256   PORT_DIPSETTING(    0x80, "1C/1C 2C/3C" )
257   PORT_DIPSETTING(    0x70, DEF_STR( 1C_2C ) )
258   PORT_DIPSETTING(    0x00, "1C/2C 2C/4C 3C/6C 4C/8C 5C/11C" )
259   PORT_DIPSETTING(    0xb0, DEF_STR( 1C_3C ) )
260   PORT_DIPSETTING(    0x30, DEF_STR( 1C_4C ) )
261   PORT_DIPSETTING(    0xd0, DEF_STR( 1C_5C ) )
262   PORT_DIPSETTING(    0x50, DEF_STR( 1C_6C ) )
263   PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:8,7,6,5")
264   PORT_DIPSETTING(    0x0e, DEF_STR( 4C_1C ) )
265   PORT_DIPSETTING(    0x01, DEF_STR( 3C_1C ) )
266   PORT_DIPSETTING(    0x09, DEF_STR( 2C_1C ) )
267   PORT_DIPSETTING(    0x0a, "2C/1C 4C/2C 5C/3C 6C/4C" )
268   PORT_DIPSETTING(    0x02, "2C/1C 4C/3C" )
269   PORT_DIPSETTING(    0x0f, DEF_STR( 1C_1C ) )
270   PORT_DIPSETTING(    0x0c, "1C/1C 2C/1C 3C/3C 4C/4C 5C/6C" )
271   PORT_DIPSETTING(    0x04, "1C/1C 2C/1C 3C/3C 4C/5C" )
272   PORT_DIPSETTING(    0x06, DEF_STR( 2C_3C ) )
273   PORT_DIPSETTING(    0x08, "1C/1C 2C/3C" )
274   PORT_DIPSETTING(    0x07, DEF_STR( 1C_2C ) )
275   PORT_DIPSETTING(    0x00, "1C/2C 2C/4C 3C/6C 4C/8C 5C/11C" )
276   PORT_DIPSETTING(    0x0b, DEF_STR( 1C_3C ) )
277   PORT_DIPSETTING(    0x03, DEF_STR( 1C_4C ) )
278   PORT_DIPSETTING(    0x0d, DEF_STR( 1C_5C ) )
279   PORT_DIPSETTING(    0x05, DEF_STR( 1C_6C ) )
280
281   PORT_START_TAG("DSWB")
282   PORT_DIPNAME( 0x80, 0x80, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW2:1")
283   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
284   PORT_DIPSETTING(    0x80, DEF_STR( On ) )
285   PORT_DIPNAME( 0x60, 0x60, "Play Timer" ) PORT_DIPLOCATION("SW2:3,2")
286   PORT_DIPSETTING(    0x60, "60 SEC" )
287   PORT_DIPSETTING(    0x20, "50 SEC" )
288   PORT_DIPSETTING(    0x40, "40 SEC" )
289   PORT_DIPSETTING(    0x00, "Infinite SEC" )
290   PORT_DIPNAME( 0x10, 0x10, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:4")
291   PORT_DIPSETTING(    0x10, DEF_STR( Normal ) )
292   PORT_DIPSETTING(    0x00, DEF_STR( Hard ) )
293   PORT_DIPNAME( 0x0c, 0x0c, "Reserve Ships Score" ) PORT_DIPLOCATION("SW2:6,5")
294   PORT_DIPSETTING(    0x0c, "5000, 10000, 20000" )
295   PORT_DIPSETTING(    0x04, "5000, 20000, 40000" )
296   PORT_DIPSETTING(    0x08, "10000, 20000, 30000" )
297   PORT_DIPSETTING(    0x00, "10000, 20000, 40000" )
298   PORT_DIPNAME( 0x02, 0x02, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("SW2:7")
299   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
300   PORT_DIPSETTING(    0x02, DEF_STR( On ) )
301   PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW2:8")
302   PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
303   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
304
305   PORT_START_TAG("IN0")
306   PORT_BIT ( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )                                           /* SW0 = nonJAMMA pin 15 = coin1 & coin2 (?) */
307   PORT_BIT ( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )                                          /* SW1 = nonJAMMA pin S  = unused (maybe coin2?) */
308   PORT_BIT ( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("TEST") PORT_CODE(KEYCODE_F1) /* SW2 = nonJAMMA pin T  = test switch */
309   PORT_BIT ( 0x08, IP_ACTIVE_LOW, IPT_SERVICE )                                         /* SW3 = nonJAMMA pin 16 = service switch */
310   PORT_BIT ( 0x10, IP_ACTIVE_LOW, IPT_START1 )                                          /* SW4 = nonJAMMA pin 8  = start */
311   PORT_BIT ( 0x20, IP_ACTIVE_LOW, IPT_UNUSED )                                          /* SW5 = nonJAMMA pin J  = unused? */
312   PORT_BIT ( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("CONTINUE")                   /* SW6 = nonJAMMA pin 18 = continue */
313   PORT_BIT ( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )                                          /* SW7 = nonJAMMA pin 19 = unused? */
314
315   PORT_START_TAG("IN1")
316   PORT_BIT ( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT )                          /* SW8  = nonJAMMA pin 9  = right */
317   PORT_BIT ( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT )                            /* SW9  = nonJAMMA pin 10 = left */
318   PORT_BIT ( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP )                              /* SW10 = nonJAMMA pin 11 = up */
319   PORT_BIT ( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN )                            /* SW11 = nonJAMMA pin 12 = down */
320   PORT_BIT ( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )                                  /* SW12 = nonJAMMA pin 13 = fire */
321   PORT_BIT ( 0x20, IP_ACTIVE_LOW, IPT_UNUSED )                                   /* SW13 = nonJAMMA pin 14 = unused? */
322   PORT_BIT ( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )                                   /* SW14 = nonJAMMA pin V  = unused? */
323   PORT_BIT ( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )                                   /* SW15 = nonJAMMA pin W  = unused? */
324INPUT_PORTS_END
325
326static MACHINE_START( astron )
327{
328   discinfo = laserdisc_init(LASERDISC_TYPE_LDV1000, get_disk_handle(0), 0);
329   return;
330}
331
332static INTERRUPT_GEN( vblank_callback_astron )
333{
334   laserdisc_vsync(discinfo);
335}
336
337static const gfx_decode gfxdecodeinfo[] =
338{
339    { REGION_GFX1, 0, &gfx_8x8x1,  0, 1 },      /* CHARACTERS */
340   /* SPRITES are apparently non-uniform in width - not straightforward to decode */
341   { -1 }
342};
343
344
345/* DRIVER */
346static MACHINE_DRIVER_START( astron )
347/*  main cpu */
348   MDRV_CPU_ADD(Z80, SCHEMATIC_CLOCK/4)
349   MDRV_CPU_PROGRAM_MAP(mainmem,0)
350   MDRV_CPU_IO_MAP(mainport,0)
351   MDRV_CPU_VBLANK_INT(vblank_callback_astron, 1)
352   MDRV_CPU_PERIODIC_INT(nmi_line_pulse, 1000.0/59.94)
353
354   MDRV_MACHINE_START(astron)
355
356/*  video */
357   MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER)
358
359   MDRV_SCREEN_FORMAT(BITMAP_FORMAT_RGB32)
360   MDRV_SCREEN_REFRESH_RATE(60)
361   MDRV_SCREEN_VBLANK_TIME(DEFAULT_60HZ_VBLANK_DURATION)
362   MDRV_SCREEN_SIZE(32*8, 32*8)
363   MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 32*8-1)
364
365   MDRV_GFXDECODE(gfxdecodeinfo)
366   MDRV_PALETTE_LENGTH(256)
367   MDRV_VIDEO_UPDATE(astron)
368
369MACHINE_DRIVER_END
370
371
372ROM_START( astron )
373   /* Last two ROMs are banked at 0x8000 */
374   ROM_REGION( 0x10000, REGION_CPU1, 0 )
375   ROM_LOAD( "5473c", 0x0000, 0x4000, CRC(0f24baaa) SHA1(54fa344ad86c469f976ce469e39b2a4286da5f50) )
376   ROM_LOAD( "5474a", 0x4000, 0x4000, CRC(5d44603d) SHA1(e229ff14255a5a0d1e156745664d31418b36893c) )
377   ROM_LOAD( "5284",  0x8000, 0x4000, CRC(eec6db27) SHA1(f4c72d9d4137244c0a0b7a1b8f7fb0e7b032b1c4) )
378   ROM_LOAD( "5285",  0xc000, 0x4000, CRC(820e154e) SHA1(574c69a7ef07c31396e9b5669a093a1db6f7cc6f) )
379
380   /* Characters */
381   ROM_REGION( 0x1000, REGION_GFX1, ROMREGION_DISPOSE )
382   ROM_LOAD( "5280", 0x0000, 0x0800, CRC(583af1ff) SHA1(64259e955a04ee44d716870864f86011a709f2db) )
383   ROM_LOAD( "5281", 0x0800, 0x0800, CRC(7b5c820c) SHA1(ddac82cea4d795011bd48d15bc6e2a0ee864429f) )
384
385   /* Sprites */
386   ROM_REGION( 0x10000, REGION_GFX2, 0 )
387   ROM_LOAD( "5286", 0x0000, 0x4000, CRC(8eb1c28e) SHA1(2867d62c9844c3ad2676f9a0ad1597baa54762fa) )
388   ROM_LOAD( "5338", 0x8000, 0x4000, CRC(94ca5f9a) SHA1(4ab4ed06b70611739f45e207e9f1c7714b9a34e8) )
389
390   /* Color lookup PROM */
391   ROM_REGION( 0x0200, REGION_PROMS, 0 )
392   ROM_LOAD( "5279", 0x000,  0x200,  CRC(8716aeb5) SHA1(9a8bf599d025d039b12bc616850386f280b4df11) )
393
394   /* Currently unused PROMs */
395    ROM_REGION( 0x1000, REGION_USER1, 0 )
396   ROM_LOAD( "pr-5278.bin", 0x000, 0x100, CRC(e81613da) SHA1(fc32141f7c0c8c0c1ed623636af3862a4ef0e940) )
397   ROM_LOAD( "pr-5277.bin", 0x100, 0x100, CRC(bf2c33ab) SHA1(4a83b3e9b74b900621e8f42edf94cc04b791cdd0) )
398   ROM_LOAD( "pr-5276.bin", 0x200, 0x20,  CRC(91267e8a) SHA1(ae5bd8efea5322c4d9986d06680a781392f9a642) )
399   ROM_LOAD( "pr-5275.bin", 0x220, 0x20,  CRC(0c872a9b) SHA1(eaabce5d867a4e896bd356abc94429f9a4eec372) )
400ROM_END
401
402ROM_START( astronp )
403   /* Last two ROMs are banked at 0x8000 */
404   ROM_REGION( 0x10000, REGION_CPU1, 0 )
405   ROM_LOAD( "5282", 0x0000, 0x4000, CRC(fd0dcfc9) SHA1(d797269f53f8a9e30b4d59d4f4f6e9858c133bbe) )
406   ROM_LOAD( "5283", 0x4000, 0x4000, CRC(a3746393) SHA1(97864967073f0425555748535d1aa68459bacfb2) )
407   ROM_LOAD( "5284", 0x8000, 0x4000, CRC(eec6db27) SHA1(f4c72d9d4137244c0a0b7a1b8f7fb0e7b032b1c4) )
408   ROM_LOAD( "5285", 0xc000, 0x4000, CRC(820e154e) SHA1(574c69a7ef07c31396e9b5669a093a1db6f7cc6f) )
409
410   /* Characters */
411   ROM_REGION( 0x1000, REGION_GFX1, ROMREGION_DISPOSE )
412   ROM_LOAD( "5280", 0x0000, 0x0800, CRC(583af1ff) SHA1(64259e955a04ee44d716870864f86011a709f2db) )
413   ROM_LOAD( "5281", 0x0800, 0x0800, CRC(7b5c820c) SHA1(ddac82cea4d795011bd48d15bc6e2a0ee864429f) )
414
415   /* Sprites */
416   ROM_REGION( 0x10000, REGION_GFX2, 0 )
417   ROM_LOAD( "5286", 0x0000, 0x4000, CRC(8eb1c28e) SHA1(2867d62c9844c3ad2676f9a0ad1597baa54762fa) )
418   ROM_LOAD( "5338", 0x8000, 0x4000, CRC(94ca5f9a) SHA1(4ab4ed06b70611739f45e207e9f1c7714b9a34e8) )
419
420   /* Color lookup PROM */
421   ROM_REGION( 0x0200, REGION_PROMS, 0 )
422   ROM_LOAD( "5279", 0x000,  0x200,  CRC(8716aeb5) SHA1(9a8bf599d025d039b12bc616850386f280b4df11) )
423
424   /* Currently unused PROMs */
425    ROM_REGION( 0x1000, REGION_USER1, 0 )
426   ROM_LOAD( "pr-5278.bin", 0x000, 0x100, CRC(e81613da) SHA1(fc32141f7c0c8c0c1ed623636af3862a4ef0e940) )
427   ROM_LOAD( "pr-5277.bin", 0x100, 0x100, CRC(bf2c33ab) SHA1(4a83b3e9b74b900621e8f42edf94cc04b791cdd0) )
428   ROM_LOAD( "pr-5276.bin", 0x200, 0x20,  CRC(91267e8a) SHA1(ae5bd8efea5322c4d9986d06680a781392f9a642) )
429   ROM_LOAD( "pr-5275.bin", 0x220, 0x20,  CRC(0c872a9b) SHA1(eaabce5d867a4e896bd356abc94429f9a4eec372) )
430ROM_END
431
432ROM_START( galaxyr )
433   /* Last two ROMs are banked at 0x8000 */
434   ROM_REGION( 0x10000, REGION_CPU1, 0 )
435   ROM_LOAD( "gr5633.bin", 0x0000, 0x4000, CRC(398f6b23) SHA1(10f4bac2face29c2fb2422b70ba1b100acd0e968) )
436   ROM_LOAD( "gr5634.bin", 0x4000, 0x4000, CRC(2c5be1b7) SHA1(03375729aa00fece8b938fd1672a700157a7f710) )
437   ROM_LOAD( "gr5592.bin", 0x8000, 0x4000, CRC(d13715f8) SHA1(72e2570a1fa437faac0c52e24f801020b6e5a110) )
438   ROM_LOAD( "gr5593.bin", 0xc000, 0x4000, CRC(b0a557aa) SHA1(5baacbaa25cdc0ee414bafe24d50a256631601aa) )
439
440   /* Characters */
441   ROM_REGION( 0x1000, REGION_GFX1, ROMREGION_DISPOSE )
442   ROM_LOAD( "5280", 0x0000, 0x0800, CRC(583af1ff) SHA1(64259e955a04ee44d716870864f86011a709f2db) )
443   ROM_LOAD( "5281", 0x0800, 0x0800, CRC(7b5c820c) SHA1(ddac82cea4d795011bd48d15bc6e2a0ee864429f) )
444
445   /* Sprites */
446   ROM_REGION( 0x10000, REGION_GFX2, 0 )
447   ROM_LOAD( "gr5594.bin", 0x0000, 0x4000, CRC(4403ef5a) SHA1(f8c879ea22cc48bc06608ff7bad3408378ef5162) )
448   ROM_LOAD( "gr5611.bin", 0x4000, 0x4000, CRC(b16bdfe4) SHA1(565725189d0b124f8de148f343e67a177ca056f6) )
449   ROM_LOAD( "gr5595.bin", 0x8000, 0x4000, CRC(ccbaec4f) SHA1(b6750543a0875e7cdc71ecb06575783b7e0ba457) )
450   ROM_LOAD( "gr5612.bin", 0xc000, 0x4000, CRC(e312d080) SHA1(24eea718aa1914b87145da9990cb833b9621576c) )
451
452   /* Color lookup PROM */
453   ROM_REGION( 0x0200, REGION_PROMS, 0 )
454   ROM_LOAD( "5279", 0x000,  0x200,  CRC(8716aeb5) SHA1(9a8bf599d025d039b12bc616850386f280b4df11) )
455
456   /* Currently unused PROMs */
457    ROM_REGION( 0x1000, REGION_USER1, 0 )
458   ROM_LOAD( "pr-5278.bin", 0x000, 0x100, CRC(e81613da) SHA1(fc32141f7c0c8c0c1ed623636af3862a4ef0e940) )
459   ROM_LOAD( "pr-5277.bin", 0x100, 0x100, CRC(bf2c33ab) SHA1(4a83b3e9b74b900621e8f42edf94cc04b791cdd0) )
460   ROM_LOAD( "pr-5276.bin", 0x200, 0x20,  CRC(91267e8a) SHA1(ae5bd8efea5322c4d9986d06680a781392f9a642) )
461   ROM_LOAD( "pr-5275.bin", 0x220, 0x20,  CRC(0c872a9b) SHA1(eaabce5d867a4e896bd356abc94429f9a4eec372) )
462ROM_END
463
464ROM_START( galaxyrp )
465   /* Last two ROMs are banked at 0x8000 */
466   ROM_REGION( 0x10000, REGION_CPU1, 0 )
467   ROM_LOAD( "epr-5613.bin", 0x0000, 0x4000, CRC(6617e702) SHA1(9de760d0e5a654a6abaa1a8cd7b038638d61f523) )
468   ROM_LOAD( "epr-5614.bin", 0x4000, 0x4000, CRC(73ad8932) SHA1(ab0ff5e14bb58aa1f874fd135f1a8bd96de3f25e) )
469   ROM_LOAD( "gr5592.bin",   0x8000, 0x4000, CRC(d13715f8) SHA1(72e2570a1fa437faac0c52e24f801020b6e5a110) )
470   ROM_LOAD( "gr5593.bin",   0xc000, 0x4000, CRC(b0a557aa) SHA1(5baacbaa25cdc0ee414bafe24d50a256631601aa) )
471
472   /* Characters */
473   ROM_REGION( 0x1000, REGION_GFX1, ROMREGION_DISPOSE )
474   ROM_LOAD( "5280", 0x0000, 0x0800, CRC(583af1ff) SHA1(64259e955a04ee44d716870864f86011a709f2db) )
475   ROM_LOAD( "5281", 0x0800, 0x0800, CRC(7b5c820c) SHA1(ddac82cea4d795011bd48d15bc6e2a0ee864429f) )
476
477   /* Sprites */
478   ROM_REGION( 0x10000, REGION_GFX2, 0 )
479   ROM_LOAD( "gr5594.bin", 0x0000, 0x4000, CRC(4403ef5a) SHA1(f8c879ea22cc48bc06608ff7bad3408378ef5162) )
480   ROM_LOAD( "gr5611.bin", 0x4000, 0x4000, CRC(b16bdfe4) SHA1(565725189d0b124f8de148f343e67a177ca056f6) )
481   ROM_LOAD( "gr5595.bin", 0x8000, 0x4000, CRC(ccbaec4f) SHA1(b6750543a0875e7cdc71ecb06575783b7e0ba457) )
482   ROM_LOAD( "gr5612.bin", 0xc000, 0x4000, CRC(e312d080) SHA1(24eea718aa1914b87145da9990cb833b9621576c) )
483
484   /* Color lookup PROM */
485   ROM_REGION( 0x0200, REGION_PROMS, 0 )
486   ROM_LOAD( "5279", 0x000,  0x200,  CRC(8716aeb5) SHA1(9a8bf599d025d039b12bc616850386f280b4df11) )
487
488   /* Currently unused PROMs */
489    ROM_REGION( 0x1000, REGION_USER1, 0 )
490   ROM_LOAD( "pr-5278.bin", 0x000, 0x100, CRC(e81613da) SHA1(fc32141f7c0c8c0c1ed623636af3862a4ef0e940) )
491   ROM_LOAD( "pr-5277.bin", 0x100, 0x100, CRC(bf2c33ab) SHA1(4a83b3e9b74b900621e8f42edf94cc04b791cdd0) )
492   ROM_LOAD( "pr-5276.bin", 0x200, 0x20,  CRC(91267e8a) SHA1(ae5bd8efea5322c4d9986d06680a781392f9a642) )
493   ROM_LOAD( "pr-5275.bin", 0x220, 0x20,  CRC(0c872a9b) SHA1(eaabce5d867a4e896bd356abc94429f9a4eec372) )
494ROM_END
495
496ROM_START( sblazerp )
497   /* Last two ROMs are banked at 0x8000 */
498   ROM_REGION( 0x10000, REGION_CPU1, 0 )
499   ROM_LOAD( "epr-5590.bin", 0x0000, 0x4000, CRC(c06e41bb) SHA1(b2d47f04fe1a81040bbb07bdcb8930107d350e38) )
500   ROM_LOAD( "epr-5591.bin", 0x4000, 0x4000, CRC(b179d18c) SHA1(eccad49cfbff1101677b66c19c5d79d41b11b72e) )
501   ROM_LOAD( "gr5592.bin",   0x8000, 0x4000, CRC(d13715f8) SHA1(72e2570a1fa437faac0c52e24f801020b6e5a110) )
502   ROM_LOAD( "gr5593.bin",   0xc000, 0x4000, CRC(b0a557aa) SHA1(5baacbaa25cdc0ee414bafe24d50a256631601aa) )
503
504   /* Characters */
505   ROM_REGION( 0x1000, REGION_GFX1, ROMREGION_DISPOSE )
506   ROM_LOAD( "5280", 0x0000, 0x0800, CRC(583af1ff) SHA1(64259e955a04ee44d716870864f86011a709f2db) )
507   ROM_LOAD( "5281", 0x0800, 0x0800, CRC(7b5c820c) SHA1(ddac82cea4d795011bd48d15bc6e2a0ee864429f) )
508
509   /* Sprites */
510   ROM_REGION( 0x10000, REGION_GFX2, 0 )
511   ROM_LOAD( "gr5594.bin", 0x0000, 0x4000, CRC(4403ef5a) SHA1(f8c879ea22cc48bc06608ff7bad3408378ef5162) )
512   ROM_LOAD( "gr5611.bin", 0x4000, 0x4000, CRC(b16bdfe4) SHA1(565725189d0b124f8de148f343e67a177ca056f6) )
513   ROM_LOAD( "gr5595.bin", 0x8000, 0x4000, CRC(ccbaec4f) SHA1(b6750543a0875e7cdc71ecb06575783b7e0ba457) )
514   ROM_LOAD( "gr5612.bin", 0xc000, 0x4000, CRC(e312d080) SHA1(24eea718aa1914b87145da9990cb833b9621576c) )
515
516   /* Color lookup PROM */
517   ROM_REGION( 0x0200, REGION_PROMS, 0 )
518   ROM_LOAD( "5279", 0x000,  0x200,  CRC(8716aeb5) SHA1(9a8bf599d025d039b12bc616850386f280b4df11) )
519
520   /* Currently unused PROMs */
521    ROM_REGION( 0x1000, REGION_USER1, 0 )
522   ROM_LOAD( "pr-5278.bin", 0x000, 0x100, CRC(e81613da) SHA1(fc32141f7c0c8c0c1ed623636af3862a4ef0e940) )
523   ROM_LOAD( "pr-5277.bin", 0x100, 0x100, CRC(bf2c33ab) SHA1(4a83b3e9b74b900621e8f42edf94cc04b791cdd0) )
524   ROM_LOAD( "pr-5276.bin", 0x200, 0x20,  CRC(91267e8a) SHA1(ae5bd8efea5322c4d9986d06680a781392f9a642) )
525   ROM_LOAD( "pr-5275.bin", 0x220, 0x20,  CRC(0c872a9b) SHA1(eaabce5d867a4e896bd356abc94429f9a4eec372) )
526ROM_END
527
528ROM_START( cobraseg )
529   /* Banked ROMs aren't present */
530   ROM_REGION( 0x10000, REGION_CPU1, 0 )
531   ROM_LOAD( "ic-1.bin", 0x0000, 0x4000, CRC(079783c7) SHA1(69f7821d94d62c8981a3879d8718d984c960ed25) )
532   ROM_LOAD( "ic-2.bin", 0x4000, 0x2000, CRC(40c0b825) SHA1(1bac33b90b5a9d4ea528c2e69ded2009f9d69285) )
533
534   /* Characters */
535   ROM_REGION( 0x1000, REGION_GFX1, ROMREGION_DISPOSE )
536   ROM_LOAD( "ic-11.bin", 0x0000, 0x0800, CRC(5a2e8f4e) SHA1(839d7cbb7dac1d5bca388ff8e9e2f4f6e1a5ce43) )
537   ROM_LOAD( "ic-12.bin", 0x0800, 0x0800, CRC(4b89d7ed) SHA1(33894bc3d3f9817a018288e750d02e0f9deeeda3) )
538
539   /* Sprites */
540   ROM_REGION( 0x10000, REGION_GFX2, 0 )
541   ROM_LOAD( "ic-7.bin", 0x0000, 0x2000, CRC(9e12b19c) SHA1(a05accb44981288f62ff7da0c75dc972bb6d0754) )
542   ROM_LOAD( "ic-8.bin", 0x8000, 0x2000, CRC(201041c0) SHA1(d7eb1da02184d2330211eb1f2114dffc39dc6ffe) )
543
544   /* Color lookup PROM */
545   ROM_REGION( 0x0200, REGION_PROMS, 0 )
546   ROM_LOAD( "ic-13.bin", 0x000,  0x200,  CRC(3547a14c) SHA1(5b8e3ddac0f6fda940b69343fdce7d5caead7a35) )
547
548   /* Currently unused PROMs */
549    ROM_REGION( 0x1000, REGION_USER1, 0 )
550   ROM_LOAD( "pr-5278.bin", 0x000, 0x100, CRC(e81613da) SHA1(fc32141f7c0c8c0c1ed623636af3862a4ef0e940) )
551   ROM_LOAD( "pr-5277.bin", 0x100, 0x100, CRC(bf2c33ab) SHA1(4a83b3e9b74b900621e8f42edf94cc04b791cdd0) )
552   ROM_LOAD( "pr-5276.bin", 0x200, 0x20,  CRC(91267e8a) SHA1(ae5bd8efea5322c4d9986d06680a781392f9a642) )
553   ROM_LOAD( "pr-5275.bin", 0x220, 0x20,  CRC(0c872a9b) SHA1(eaabce5d867a4e896bd356abc94429f9a4eec372) )
554ROM_END
555
556
557static DRIVER_INIT( astron )
558{
559   UINT8 *ROM = memory_region(REGION_CPU1);
560   memory_configure_bank(1, 0, 2, &ROM[0x8000], 0x4000);
561}
562
563
564/*    YEAR  NAME      PARENT   MACHINE  INPUT   INIT    MONITOR COMPANY FULLNAME                                   FLAGS) */
565GAME( 1983, astron,   0,       astron,  astron, astron, ROT0,   "SEGA", "Astron Belt",                        GAME_NOT_WORKING|GAME_NO_SOUND)
566GAME( 1983, astronp,  astron,  astron,  astron, astron, ROT0,   "SEGA", "Astron Belt (Pioneer LDV1000)",         GAME_NOT_WORKING|GAME_NO_SOUND)
567GAME( 1983, cobraseg, astron,  astron,  astron, astron, ROT0,   "SEGA", "Cobra Command (Sega LaserDisc Hardware)", GAME_NOT_WORKING|GAME_NO_SOUND)
568GAME( 1983, galaxyr,  0,       astron,  astron, astron, ROT0,   "SEGA", "Galaxy Ranger",                     GAME_NOT_WORKING|GAME_NO_SOUND)
569GAME( 1983, galaxyrp, galaxyr, astron,  astron, astron, ROT0,   "SEGA", "Galaxy Ranger (Pioneer LDV1000)",         GAME_NOT_WORKING|GAME_NO_SOUND)
570GAME( 1983, sblazerp, galaxyr, astron,  astron, astron, ROT0,   "SEGA", "Star Blazer (Pioneer LDV1000)",         GAME_NOT_WORKING|GAME_NO_SOUND)
src/mame/drivers/m92.c
r778r779
55    Gunforce (World)                M92-A   (c) 1991 Irem Corp
66    Gunforce (USA)                  M92-A   (c) 1991 Irem America Corp
77    Gunforce (Japan)                M92-A   (c) 1991 Irem Corp
8    Blademaster (World)                     (c) 1991 Irem Corp
8    Blade Master (World)                    (c) 1991 Irem Corp
9    Cross Blades! (Japan)                   (c) 1991 Irem Corp
910    Lethal Thunder (World)                  (c) 1991 Irem Corp
1011    Thunder Blaster (Japan)                 (c) 1991 Irem Corp
1112    Undercover Cops (World)                 (c) 1992 Irem Corp
r778r779
13281329   ROM_LOAD( "bm_da.rom", 0x000000, 0x80000, CRC(62ce5798) SHA1(f7bf7706f71ce36d85c99e531d4789c4d7a095a0) )
13291330ROM_END
13301331
1332ROM_START( crossbld )
1333   ROM_REGION( 0x100000, REGION_CPU1, 0 )
1334   ROM_LOAD16_BYTE( "bm_d-h0.3h", 0x000001, 0x40000, CRC(a28a5821) SHA1(2e79ec82dd79697f4a6b4082d49400d39cc3bad9) )
1335   ROM_LOAD16_BYTE( "bm_d-l0.5h", 0x000000, 0x40000, CRC(a504f1a0) SHA1(33ccc944b08b89e6a975a164c72b36aa79b99392) )
1336   ROM_LOAD16_BYTE( "bm_d-h1.3e", 0x080001, 0x10000, CRC(18da6c47) SHA1(7b8cf82cf0c94d1ec64e77e15b877b5ffd307bc3) )
1337   ROM_LOAD16_BYTE( "bm_d-l1.5e", 0x080000, 0x10000, CRC(a65c1b42) SHA1(beb4131d045158231ba999b72f21c97c014672d0) )
1338
1339   ROM_REGION( 0x100000, REGION_CPU2, 0 )
1340   ROM_LOAD16_BYTE( "bm_d-sh0.rom", 0x000001, 0x10000, CRC(9f7c075b) SHA1(1dd3fb4dc41d3adea9ca8d1b4363dadebea49bda) )
1341   ROM_LOAD16_BYTE( "bm_d-sl0.rom", 0x000000, 0x10000, CRC(1fa87c89) SHA1(971eae7dd2591191ed7a948a444387896735e149) )
1342
1343   ROM_REGION( 0x100000, REGION_GFX1, ROMREGION_DISPOSE ) /* Tiles */
1344   ROM_LOAD( "bm_c0.rom", 0x000000, 0x40000, CRC(2cc966b8) SHA1(4d55954813efe975b7e644448effc61b22896e0b) )
1345   ROM_LOAD( "bm_c1.rom", 0x040000, 0x40000, CRC(46df773e) SHA1(6f075492c06768f7d2315906ec1349fe09def22f) )
1346   ROM_LOAD( "bm_c2.rom", 0x080000, 0x40000, CRC(05b867bd) SHA1(d44667f3f4908bacb6e10becc431b0f213c20407) )
1347   ROM_LOAD( "bm_c3.rom", 0x0c0000, 0x40000, CRC(0a2227a4) SHA1(30499e99f3731993607e04c77637f6bbe641c05c) )
1348
1349   ROM_REGION( 0x200000, REGION_GFX2, ROMREGION_DISPOSE ) /* Sprites */
1350   ROM_LOAD( "bm_000.rom", 0x000000, 0x80000, CRC(339fc9f3) SHA1(36be0f3b5add2ecf3f602933f5456091daaeb1f6) )
1351   ROM_LOAD( "bm_010.rom", 0x080000, 0x80000, CRC(6a14377d) SHA1(699e5b1984810ee9e504f9ddaec604671c0cb0b7) )
1352   ROM_LOAD( "bm_020.rom", 0x100000, 0x80000, CRC(31532198) SHA1(7a285e003a7c359f5b1afe4da3b44069f716f7b5) )
1353   ROM_LOAD( "bm_030.rom", 0x180000, 0x80000, CRC(d1a041d3) SHA1(84a8cf5911426ed785cb678395f52da0a9199546) )
1354
1355   ROM_REGION( 0x80000, REGION_SOUND1, 0 )
1356   ROM_LOAD( "bm_da.rom", 0x000000, 0x80000, CRC(62ce5798) SHA1(f7bf7706f71ce36d85c99e531d4789c4d7a095a0) )
1357ROM_END
1358
13311359ROM_START( skingame )
13321360   ROM_REGION( 0x180000, REGION_CPU1, 0 )
13331361   ROM_LOAD16_BYTE( "is-h0-d.5m", 0x000001, 0x40000, CRC(80940abb) SHA1(7af5b667383f40987cc8190d81937410ea2c0301) )
r778r779
22852313GAME( 1991, gunforcj, gunforce, raster,    gunforce, gunforce, ROT0,   "Irem",         "Gunforce - Battle Fire Engulfed Terror Island (Japan)", 0 )
22862314GAME( 1991, gunforcu, gunforce, raster,    gunforce, gunforce, ROT0,   "Irem America", "Gunforce - Battle Fire Engulfed Terror Island (US)", 0 )
22872315GAME( 1991, bmaster,  0,        nonraster, bmaster,  bmaster,  ROT0,   "Irem",         "Blade Master (World)", 0 )
2316GAME( 1991, crossbld, bmaster,  nonraster, bmaster,  bmaster,  ROT0,   "Irem",         "Cross Blades! (Japan)", 0 )
22882317GAME( 1991, lethalth, 0,        lethalth,  lethalth, lethalth, ROT270, "Irem",         "Lethal Thunder (World)", 0 )
22892318GAME( 1991, thndblst, lethalth, lethalth,  lethalth, lethalth, ROT270, "Irem",         "Thunder Blaster (Japan)", 0 )
22902319GAME( 1992, uccops,   0,        raster,    uccops,   uccops,   ROT0,   "Irem",         "Undercover Cops (World)", 0 )
src/mame/drivers/nwk-tr.c
r778r779
246246   {
247247      int roz_tile_size = K001604_roz_size[chip] ? 16 : 8;
248248      int roz_width = K001604_layer_size ? 64 : 128;
249      K001604_layer_8x8[chip][0] = tilemap_create(K001604_0_tile_info_layer_8x8, K001604_scan_layer_8x8_0, TILEMAP_TRANSPARENT, 8, 8, 64, 64);
250      K001604_layer_8x8[chip][1] = tilemap_create(K001604_0_tile_info_layer_8x8, K001604_scan_layer_8x8_1, TILEMAP_TRANSPARENT, 8, 8, 64, 64);
249      K001604_layer_8x8[chip][0] = tilemap_create(K001604_0_tile_info_layer_8x8, K001604_scan_layer_8x8_0, TILEMAP_TYPE_TRANSPARENT, 8, 8, 64, 64);
250      K001604_layer_8x8[chip][1] = tilemap_create(K001604_0_tile_info_layer_8x8, K001604_scan_layer_8x8_1, TILEMAP_TYPE_TRANSPARENT, 8, 8, 64, 64);
251251
252      K001604_layer_roz[chip][0] = tilemap_create(K001604_0_tile_info_layer_roz, K001604_scan_layer_roz_0, TILEMAP_OPAQUE, roz_tile_size, roz_tile_size, roz_width, 64);
253      K001604_layer_roz[chip][1] = tilemap_create(K001604_0_tile_info_layer_roz, K001604_scan_layer_roz_1, TILEMAP_OPAQUE, roz_tile_size, roz_tile_size, 64, 64);
252      K001604_layer_roz[chip][0] = tilemap_create(K001604_0_tile_info_layer_roz, K001604_scan_layer_roz_0, TILEMAP_TYPE_OPAQUE, roz_tile_size, roz_tile_size, roz_width, 64);
253      K001604_layer_roz[chip][1] = tilemap_create(K001604_0_tile_info_layer_roz, K001604_scan_layer_roz_1, TILEMAP_TYPE_OPAQUE, roz_tile_size, roz_tile_size, 64, 64);
254254   }
255255   else
256256   {
257257      int roz_tile_size = K001604_roz_size[chip] ? 16 : 8;
258258      int roz_width = K001604_layer_size ? 64 : 128;
259      K001604_layer_8x8[chip][0] = tilemap_create(K001604_1_tile_info_layer_8x8, K001604_scan_layer_8x8_0, TILEMAP_TRANSPARENT, 8, 8, 64, 64);
260      K001604_layer_8x8[chip][1] = tilemap_create(K001604_1_tile_info_layer_8x8, K001604_scan_layer_8x8_1, TILEMAP_TRANSPARENT, 8, 8, 64, 64);
259      K001604_layer_8x8[chip][0] = tilemap_create(K001604_1_tile_info_layer_8x8, K001604_scan_layer_8x8_0, TILEMAP_TYPE_TRANSPARENT, 8, 8, 64, 64);
260      K001604_layer_8x8[chip][1] = tilemap_create(K001604_1_tile_info_layer_8x8, K001604_scan_layer_8x8_1, TILEMAP_TYPE_TRANSPARENT, 8, 8, 64, 64);
261261
262      K001604_layer_roz[chip][0] = tilemap_create(K001604_1_tile_info_layer_roz, K001604_scan_layer_roz_0, TILEMAP_OPAQUE, roz_tile_size, roz_tile_size, roz_width, 64);
263      K001604_layer_roz[chip][1] = tilemap_create(K001604_1_tile_info_layer_roz, K001604_scan_layer_roz_1, TILEMAP_OPAQUE, roz_tile_size, roz_tile_size, 64, 64);
262      K001604_layer_roz[chip][0] = tilemap_create(K001604_1_tile_info_layer_roz, K001604_scan_layer_roz_0, TILEMAP_TYPE_OPAQUE, roz_tile_size, roz_tile_size, roz_width, 64);
263      K001604_layer_roz[chip][1] = tilemap_create(K001604_1_tile_info_layer_roz, K001604_scan_layer_roz_1, TILEMAP_TYPE_OPAQUE, roz_tile_size, roz_tile_size, 64, 64);
264264   }
265265
266266   tilemap_set_transparent_pen(K001604_layer_8x8[chip][0], 0);
src/mame/drivers/pkscram.c
r778r779
226226
227227VIDEO_START( pkscramble )
228228{
229   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, TILEMAP_OPAQUE,      8, 8,32,32);
230   md_tilemap = tilemap_create(get_md_tile_info, tilemap_scan_rows, TILEMAP_TRANSPARENT, 8, 8,32,32);
231   fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows, TILEMAP_TRANSPARENT, 8, 8,32,32);
229   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE,      8, 8,32,32);
230   md_tilemap = tilemap_create(get_md_tile_info, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 8, 8,32,32);
231   fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 8, 8,32,32);
232232
233233   tilemap_set_transparent_pen(md_tilemap,15);
234234   tilemap_set_transparent_pen(fg_tilemap,15);
src/mame/drivers/cball.c
r778r779
2828
2929static VIDEO_START( cball )
3030{
31   bg_tilemap = tilemap_create(get_tile_info, tilemap_scan_rows, TILEMAP_OPAQUE, 8, 8, 32, 32);
31   bg_tilemap = tilemap_create(get_tile_info, tilemap_scan_rows, TILEMAP_TYPE_OPAQUE, 8, 8, 32, 32);
3232}
3333
3434
src/mame/drivers/cherrym2.c
r778r779
5454VIDEO_START(cm2)
5555{
5656   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows,
57      TILEMAP_OPAQUE, 8, 8, 32, 32);
57      TILEMAP_TYPE_OPAQUE, 8, 8, 32, 32);
5858}
5959
6060VIDEO_UPDATE(cm2)
src/mame/drivers/bigfghtr.c
r778r779
161161
162162static VIDEO_START( bigfghtr )
163163{
164   bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_cols,TILEMAP_OPAQUE,16,16,64,32);
165   fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_cols,TILEMAP_TRANSPARENT,16,16,64,32);
166   tx_tilemap = tilemap_create(get_tx_tile_info,tilemap_scan_cols,TILEMAP_TRANSPARENT,8,8,64,32);
164   bg_tilemap = tilemap_create(get_bg_tile_info,tilemap_scan_cols,TILEMAP_TYPE_OPAQUE,16,16,64,32);
165   fg_tilemap = tilemap_create(get_fg_tile_info,tilemap_scan_cols,TILEMAP_TYPE_TRANSPARENT,16,16,64,32);
166   tx_tilemap = tilemap_create(get_tx_tile_info,tilemap_scan_cols,TILEMAP_TYPE_TRANSPARENT,8,8,64,32);
167167
168168   tilemap_set_transparent_pen(fg_tilemap,0xf);
169169   tilemap_set_transparent_pen(tx_tilemap,0xf);
src/mame/drivers/tourtabl.c
r778r779
112112static const struct tia_interface tourtabl_tia_interface =
113113{
114114   tourtabl_read_input_port,
115   tourtabl_get_databus_contents
115   tourtabl_get_databus_contents,
116   NULL
116117};
117118
118119
src/mame/drivers/trvmadns.c
r778r779
263263
264264VIDEO_START( trvmadns )
265265{
266   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, TILEMAP_TRANSPARENT, 8, 8, 32, 32);
266   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows, TILEMAP_TYPE_TRANSPARENT, 8, 8, 32, 32);
267267
268268   tilemap_set_transparent_pen(bg_tilemap,1);
269269}
src/mame/drivers/rabbit.c
r778r779
344344   memset(rabbit_tilemap_ram[2], 0, 0x20000);
345345   memset(rabbit_tilemap_ram[3], 0, 0x20000);
346346
347   rabbit_tilemap[0] = tilemap_create(get_rabbit_tilemap0_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT ,     16, 16, 128,32);
348   rabbit_tilemap[1] = tilemap_create(get_rabbit_tilemap1_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT ,     16, 16, 128,32);
349   rabbit_tilemap[2] = tilemap_create(get_rabbit_tilemap2_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT ,     16, 16, 128,32);
350   rabbit_tilemap[3] = tilemap_create(get_rabbit_tilemap3_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT ,     8, 8, 128,32);
347   rabbit_tilemap[0] = tilemap_create(get_rabbit_tilemap0_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT ,     16, 16, 128,32);
348   rabbit_tilemap[1] = tilemap_create(get_rabbit_tilemap1_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT ,     16, 16, 128,32);
349   rabbit_tilemap[2] = tilemap_create(get_rabbit_tilemap2_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT ,     16, 16, 128,32);
350   rabbit_tilemap[3] = tilemap_create(get_rabbit_tilemap3_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT ,     8, 8, 128,32);
351351   tilemap_set_transparent_pen(rabbit_tilemap[0],0x0);
352352   tilemap_set_transparent_pen(rabbit_tilemap[1],0x0);
353353   tilemap_set_transparent_pen(rabbit_tilemap[2],0x0);
r778r779
11361136   memset(rabbit_tilemap_ram[2], 0, 0x20000);
11371137   memset(rabbit_tilemap_ram[3], 0, 0x20000);
11381138
1139   rabbit_tilemap[0] = tilemap_create(get_tmmjprd_tilemap0_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT ,     8, 8, 64, 64);
1140   rabbit_tilemap[1] = tilemap_create(get_tmmjprd_tilemap1_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT ,     16, 16, 64, 64);
1141   rabbit_tilemap[2] = tilemap_create(get_tmmjprd_tilemap2_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT ,     16, 16, 64, 64);
1142   rabbit_tilemap[3] = tilemap_create(get_tmmjprd_tilemap3_tile_info,tilemap_scan_rows,TILEMAP_TRANSPARENT ,     16, 16, 64, 64);
1139   rabbit_tilemap[0] = tilemap_create(get_tmmjprd_tilemap0_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT ,     8, 8, 64, 64);
1140   rabbit_tilemap[1] = tilemap_create(get_tmmjprd_tilemap1_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT ,     16, 16, 64, 64);
1141   rabbit_tilemap[2] = tilemap_create(get_tmmjprd_tilemap2_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT ,     16, 16, 64, 64);
1142   rabbit_tilemap[3] = tilemap_create(get_tmmjprd_tilemap3_tile_info,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT ,     16, 16, 64, 64);
11431143   tilemap_set_transparent_pen(rabbit_tilemap[0],0x0);
11441144   tilemap_set_transparent_pen(rabbit_tilemap[1],0x0);
11451145   tilemap_set_transparent_pen(rabbit_tilemap[2],0x0);
src/mame/drivers/cherrym.c
r778r779
9999VIDEO_START(cm)
100100{
101101   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows,
102      TILEMAP_OPAQUE, 8, 8, 64, 32);
102      TILEMAP_TYPE_OPAQUE, 8, 8, 64, 32);
103103}
104104
105105VIDEO_UPDATE(cm)
src/mame/drivers/ltcasino.c
r778r779
3636
3737VIDEO_START(ltcasino)
3838{
39   ltcasino_tilemap = tilemap_create(get_ltcasino_tile_info,tilemap_scan_rows,TILEMAP_OPAQUE, 8, 8,64,32);
39   ltcasino_tilemap = tilemap_create(get_ltcasino_tile_info,tilemap_scan_rows,TILEMAP_TYPE_OPAQUE, 8, 8,64,32);
4040}
4141
4242
src/mame/drivers/miniboy7.c
r778r779
168168VIDEO_START( miniboy7 )
169169{
170170   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows,
171      TILEMAP_OPAQUE, 8, 8, 37, 37);
171      TILEMAP_TYPE_OPAQUE, 8, 8, 37, 37);
172172}
173173
174174VIDEO_UPDATE( miniboy7 )
src/tools/src2html.c
r0r779
1/***************************************************************************
2
3    MAME source code to HTML converter
4
5    Copyright (c) 1996-2007, Nicola Salmoria and the MAME Team.
6    Visit http://mamedev.org for licensing and usage restrictions.
7
8***************************************************************************/
9
10#include <stdio.h>
11#include <stdlib.h>
12#include <string.h>
13#include <ctype.h>
14#include "osdcore.h"
15#include "astring.h"
16#include "corefile.h"
17
18
19/***************************************************************************
20    CONSTANTS & DEFINES
21***************************************************************************/
22
23#define COMMENT_STYLE      "color:#b30000"
24#define STRING_STYLE      "color:#666"
25#define PREPROCESSOR_STYLE   "color:#0000b3"
26#define KEYWORD_STYLE      "color:#0000b3"
27#define MAMEWORD_STYLE      "color:#7f007f"
28
29
30
31/***************************************************************************
32    TYPE DEFINITIONS
33***************************************************************************/
34
35enum _file_type
36{
37   FILE_TYPE_INVALID,
38   FILE_TYPE_C,
39   FILE_TYPE_MAKE,
40   FILE_TYPE_XML,
41   FILE_TYPE_TEXT
42};
43typedef enum _file_type file_type;
44
45
46typedef struct _ext_to_type ext_to_type;
47struct _ext_to_type
48{
49   const char *   extension;
50   file_type      type;
51};
52
53
54typedef struct _token_entry token_entry;
55struct _token_entry
56{
57   const char *   token;
58   const char *   color;
59};
60
61
62typedef struct _include_path include_path;
63struct _include_path
64{
65   include_path *   next;
66   const astring *   path;
67};
68
69
70
71/***************************************************************************
72    GLOBAL VARIABLES
73***************************************************************************/
74
75static include_path *incpaths;
76static include_path **incpathhead = &incpaths;
77
78static const ext_to_type extension_lookup[] =
79{
80   { ".c", FILE_TYPE_C },
81   { ".h", FILE_TYPE_C },
82   { ".mak", FILE_TYPE_MAKE },
83   { "makefile", FILE_TYPE_MAKE },
84   { ".lay", FILE_TYPE_XML },
85   { ".txt", FILE_TYPE_TEXT },
86};
87
88
89static const token_entry dummy_token_table[] =
90{
91   { NULL, KEYWORD_STYLE }
92};
93
94
95static const token_entry c_token_table[] =
96{
97   { "#define", PREPROCESSOR_STYLE },
98   { "#elif", PREPROCESSOR_STYLE },
99   { "#else", PREPROCESSOR_STYLE },
100   { "#endif", PREPROCESSOR_STYLE },
101   { "#error", PREPROCESSOR_STYLE },
102   { "#if", PREPROCESSOR_STYLE },
103   { "#ifdef", PREPROCESSOR_STYLE },
104   { "#ifndef", PREPROCESSOR_STYLE },
105   { "#include", PREPROCESSOR_STYLE },
106   { "#line", PREPROCESSOR_STYLE },
107   { "#pragma", PREPROCESSOR_STYLE },
108   { "#undef", PREPROCESSOR_STYLE },
109
110   { "auto", KEYWORD_STYLE },
111   { "break", KEYWORD_STYLE },
112   { "case", KEYWORD_STYLE },
113   { "char", KEYWORD_STYLE },
114   { "const", KEYWORD_STYLE },
115   { "continue", KEYWORD_STYLE },
116   { "default", KEYWORD_STYLE },
117   { "do", KEYWORD_STYLE },
118   { "double", KEYWORD_STYLE },
119   { "else", KEYWORD_STYLE },
120   { "enum", KEYWORD_STYLE },
121   { "extern", KEYWORD_STYLE },
122   { "float", KEYWORD_STYLE },
123   { "for", KEYWORD_STYLE },
124   { "goto", KEYWORD_STYLE },
125   { "if", KEYWORD_STYLE },
126   { "int", KEYWORD_STYLE },
127   { "long", KEYWORD_STYLE },
128   { "register", KEYWORD_STYLE },
129   { "return", KEYWORD_STYLE },
130   { "short", KEYWORD_STYLE },
131   { "signed", KEYWORD_STYLE },
132   { "sizeof", KEYWORD_STYLE },
133   { "static", KEYWORD_STYLE },
134   { "struct", KEYWORD_STYLE },
135   { "switch", KEYWORD_STYLE },
136   { "typedef", KEYWORD_STYLE },
137   { "union", KEYWORD_STYLE },
138   { "unsigned", KEYWORD_STYLE },
139   { "void", KEYWORD_STYLE },
140   { "volatile", KEYWORD_STYLE },
141   { "while", KEYWORD_STYLE },
142
143/*
144    { "INLINE", MAMEWORD_STYLE },
145    { "INT8", MAMEWORD_STYLE },
146    { "UINT8", MAMEWORD_STYLE },
147    { "INT16", MAMEWORD_STYLE },
148    { "UINT16", MAMEWORD_STYLE },
149    { "INT32", MAMEWORD_STYLE },
150    { "UINT32", MAMEWORD_STYLE },
151    { "INT64", MAMEWORD_STYLE },
152    { "UINT64", MAMEWORD_STYLE },
153    { "ARRAY_LENGTH", MAMEWORD_STYLE },
154*/
155   { NULL, KEYWORD_STYLE }
156};
157
158
159
160/***************************************************************************
161    PROTOTYPES
162***************************************************************************/
163
164/* core output functions */
165static int recurse_dir(int srcrootlen, int dstrootlen, const astring *srcdir, const astring *dstdir);
166static int output_file(file_type type, int srcrootlen, int dstrootlen, const astring *srcfile, const astring *dstfile);
167
168/* HTML helpers */
169static core_file *create_file_and_output_header(const astring *filename, const char *title, const char *subtitle);
170static void output_footer_and_close_file(core_file *file);
171
172/* path helpers */
173static const astring *normalized_subpath(const astring *path, int start);
174static void output_path_as_links(core_file *file, const astring *path, int end_is_directory);
175static astring *find_include_file(int srcrootlen, int dstrootlen, const astring *srcfile, const astring *dstfile, const astring *filename);
176
177
178
179/***************************************************************************
180    MAIN
181***************************************************************************/
182
183/*-------------------------------------------------
184    main - main entry point
185-------------------------------------------------*/
186
187int main(int argc, char *argv[])
188{
189   astring *srcdir = NULL, *dstdir = NULL;
190   int unadorned = 0;
191   int result;
192   int argnum;
193
194   /* loop over arguments */
195   for (argnum = 1; argnum < argc; argnum++)
196   {
197      char *arg = argv[argnum];
198
199      /* include path? */
200      if (arg[0] == '-' && arg[1] == 'I')
201      {
202         *incpathhead = malloc(sizeof(**incpathhead));
203         if (*incpathhead != NULL)
204         {
205            (*incpathhead)->next = NULL;
206            (*incpathhead)->path = astring_replacechr(astring_dupc(&arg[2]), '/', PATH_SEPARATOR[0]);
207            incpathhead = &(*incpathhead)->next;
208         }
209      }
210
211      /* other parameter */
212      else if (arg[0] != '-' && unadorned == 0)
213      {
214         srcdir = astring_dupc(arg);
215         unadorned++;
216      }
217      else if (arg[0] != '-' && unadorned == 1)
218      {
219         dstdir = astring_dupc(arg);
220         unadorned++;
221      }
222      else
223         goto usage;
224   }
225
226   /* make sure we got 2 parameters */
227   if (srcdir == NULL || dstdir == NULL)
228      goto usage;
229
230   /* recurse over subdirectories */
231   result = recurse_dir(astring_len(srcdir), astring_len(dstdir), srcdir, dstdir);
232
233   /* free source and destination directories */
234   astring_free(srcdir);
235   astring_free(dstdir);
236   return result;
237
238usage:
239   fprintf(stderr, "Usage:\n%s <srcroot> <destroot> [-Iincpath [-Iincpath [...]]]\n", argv[0]);
240   return 1;
241}
242
243
244
245/***************************************************************************
246    CORE OUTPUT FUNCTIONS
247***************************************************************************/
248
249/*-------------------------------------------------
250    recurse_dir - recurse through a directory
251-------------------------------------------------*/
252
253static int recurse_dir(int srcrootlen, int dstrootlen, const astring *srcdir, const astring *dstdir)
254{
255   static const osd_dir_entry_type typelist[] = { ENTTYPE_DIR, ENTTYPE_FILE };
256   const astring *srcdir_subpath;
257   core_file *indexfile = NULL;
258   astring *indexname;
259   int result = 0;
260   int entindex;
261
262   /* extract a normalized subpath */
263   srcdir_subpath = normalized_subpath(srcdir, srcrootlen + 1);
264   if (srcdir_subpath == NULL)
265      return 1;
266
267   /* create an index file */
268   indexname = astring_alloc();
269   astring_printf(indexname, "%s%c%s", astring_c(dstdir), PATH_SEPARATOR[0], "index.html");
270   indexfile = create_file_and_output_header(indexname, "MAME Source Code", astring_c(srcdir_subpath));
271   astring_free(indexname);
272
273   /* output the directory navigation */
274   core_fprintf(indexfile, "<h3>Viewing Directory: ");
275   output_path_as_links(indexfile, srcdir_subpath, TRUE);
276   core_fprintf(indexfile, "</h3>");
277   astring_free((astring *)srcdir_subpath);
278
279   /* iterate first over directories, then over files */
280   for (entindex = 0; entindex < ARRAY_LENGTH(typelist) && result == 0; entindex++)
281   {
282      osd_dir_entry_type entry_type = typelist[entindex];
283      const osd_directory_entry *entry;
284      osd_directory *dir;
285      int found = 0;
286
287      /* open the directory and iterate through it */
288      dir = osd_opendir(astring_c(srcdir));
289      if (dir == NULL)
290      {
291         result = 1;
292         goto error;
293      }
294
295      /* iterate through each file */
296      while ((entry = osd_readdir(dir)) != NULL && result == 0)
297         if (entry->type == entry_type && entry->name[0] != '.')
298         {
299            astring *srcfile, *dstfile;
300
301            /* add a header */
302            if (++found == 1)
303               core_fprintf(indexfile, "\t<h2>%s</h2>\n\t<ul>\n", (entry_type == ENTTYPE_DIR) ? "Directories" : "Files");
304
305            /* build the source filename */
306            srcfile = astring_alloc();
307            astring_printf(srcfile, "%s%c%s", astring_c(srcdir), PATH_SEPARATOR[0], entry->name);
308
309            /* if we have a file, output it */
310            dstfile = astring_alloc();
311            if (entry->type == ENTTYPE_FILE)
312            {
313               file_type type = FILE_TYPE_INVALID;
314               int extnum;
315
316               /* make sure we care, first */
317               for (extnum = 0; extnum < ARRAY_LENGTH(extension_lookup); extnum++)
318                  if (core_filename_ends_with(entry->name, extension_lookup[extnum].extension))
319                  {
320                     type = extension_lookup[extnum].type;
321                     break;
322                  }
323
324               /* if we got a valid file, process it */
325               if (type != FILE_TYPE_INVALID)
326               {
327                  astring_printf(dstfile, "%s%c%s.html", astring_c(dstdir), PATH_SEPARATOR[0], entry->name);
328                  if (indexfile != NULL)
329                     core_fprintf(indexfile, "\t<li><a href=\"%s.html\">%s</a></li>\n", entry->name, entry->name);
330                  result = output_file(type, srcrootlen, dstrootlen, srcfile, dstfile);
331               }
332            }
333
334            /* if we have a directory, recurse */
335            else
336            {
337               astring_printf(dstfile, "%s%c%s", astring_c(dstdir), PATH_SEPARATOR[0], entry->name);
338               if (indexfile != NULL)
339                  core_fprintf(indexfile, "\t<li><a href=\"%s/index.html\">%s/</a></li>\n", entry->name, entry->name);
340               result = recurse_dir(srcrootlen, dstrootlen, srcfile, dstfile);
341            }
342
343            /* free memory for the names */
344            astring_free(srcfile);
345            astring_free(dstfile);
346         }
347
348      /* close the list if we found some stuff */
349      if (found > 0)
350         core_fprintf(indexfile, "\t</ul>\n");
351
352      /* close the directory */
353      osd_closedir(dir);
354   }
355
356error:
357   if (indexfile != NULL)
358      output_footer_and_close_file(indexfile);
359   return result;
360}
361
362
363/*-------------------------------------------------
364    output_file - output a file, converting to
365    HTML
366-------------------------------------------------*/
367
368static int output_file(file_type type, int srcrootlen, int dstrootlen, const astring *srcfile, const astring *dstfile)
369{
370   const char *comment_start, *comment_end, *comment_inline, *token_chars;
371   const char *comment_start_esc, *comment_end_esc, *comment_inline_esc;
372   const token_entry *token_table;
373   const astring *srcfile_subpath;
374   char srcline[4096], *srcptr;
375   int in_comment = FALSE;
376   UINT8 is_token[256];
377   int color_quotes;
378   core_file *src;
379   core_file *dst;
380   int toknum;
381
382   /* extract a normalized subpath */
383   srcfile_subpath = normalized_subpath(srcfile, srcrootlen + 1);
384   if (srcfile_subpath == NULL)
385      return 1;
386
387   fprintf(stderr, "Processing %s\n", astring_c(srcfile_subpath));
388
389   /* set some defaults */
390   color_quotes = FALSE;
391   comment_start = comment_start_esc = "";
392   comment_end = comment_end_esc = "";
393   comment_inline = comment_inline_esc = "";
394   token_chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_#";
395   token_table = dummy_token_table;
396
397   /* based on the file type, set the comment info */
398   switch (type)
399   {
400      case FILE_TYPE_C:
401         color_quotes = TRUE;
402         comment_start = comment_start_esc = "/*";
403            comment_end = comment_end_esc = "*/";
404         comment_inline = comment_inline_esc = "//";
405         token_table = c_token_table;
406         break;
407
408      case FILE_TYPE_MAKE:
409         color_quotes = TRUE;
410         comment_inline = comment_inline_esc = "#";
411         break;
412
413      case FILE_TYPE_XML:
414         color_quotes = TRUE;
415         comment_start = "<!--";
416         comment_start_esc = "&lt;!--";
417         comment_end = "-->";
418         comment_end_esc = "--&gt;";
419         break;
420
421      default:
422      case FILE_TYPE_TEXT:
423         break;
424   }
425
426   /* make the token lookup table */
427   memset(is_token, 0, sizeof(is_token));
428   for (toknum = 0; token_chars[toknum] != 0; toknum++)
429      is_token[(UINT8)token_chars[toknum]] = TRUE;
430
431   /* open the source file */
432   if (core_fopen(astring_c(srcfile), OPEN_FLAG_READ, &src) != FILERR_NONE)
433   {
434      fprintf(stderr, "Unable to read file '%s'\n", astring_c(srcfile));
435      return 1;
436   }
437
438   /* open the output file */
439   dst = create_file_and_output_header(dstfile, "MAME Source Code", astring_c(srcfile_subpath));
440   if (dst == NULL)
441   {
442      fprintf(stderr, "Unable to write file '%s'\n", astring_c(dstfile));
443      core_fclose(src);
444      return 1;
445   }
446
447   /* output the directory navigation */
448   core_fprintf(dst, "<h3>Viewing File: ");
449   output_path_as_links(dst, srcfile_subpath, FALSE);
450   core_fprintf(dst, "</h3>");
451   astring_free((astring *)srcfile_subpath);
452
453   /* start with some tags */
454   core_fprintf(dst, "\t<pre style=\"font-family:'Courier New','Courier',monospace; font-size:12px;\">\n");
455
456   /* iterate over lines in the source file */
457   while (core_fgets(srcline, ARRAY_LENGTH(srcline), src) != NULL)
458   {
459      char dstline[4096], *dstptr = dstline;
460      int in_inline_comment = FALSE;
461      int last_token_was_include = FALSE;
462      int last_was_token = FALSE;
463      int quotes_are_linked = FALSE;
464      char in_quotes = 0;
465      int curcol = 0;
466
467      /* iterate over characters in the source line */
468      for (srcptr = srcline; *srcptr != 0; )
469      {
470         UINT8 ch = *srcptr++;
471
472         /* track whether or not we are within an extended (C-style) comment */
473         if (!in_quotes && !in_inline_comment)
474         {
475            if (!in_comment && ch == comment_start[0] && strncmp(srcptr - 1, comment_start, strlen(comment_start)) == 0)
476            {
477               dstptr += sprintf(dstptr, "<span style=\"" COMMENT_STYLE "\">%s", comment_start_esc);
478               curcol += strlen(comment_start);
479               srcptr += strlen(comment_start) - 1;
480               ch = 0;
481               in_comment = TRUE;
482            }
483            else if (in_comment && ch == comment_end[0] && strncmp(srcptr - 1, comment_end, strlen(comment_end)) == 0)
484            {
485               dstptr += sprintf(dstptr, "%s</span>", comment_end_esc);
486               curcol += strlen(comment_end);
487               srcptr += strlen(comment_end) - 1;
488               ch = 0;
489               in_comment = FALSE;
490            }
491         }
492
493         /* track whether or not we are within an inline (C++-style) comment */
494         if (!in_quotes && !in_comment && !in_inline_comment && ch == comment_inline[0] && strncmp(srcptr - 1, comment_inline, strlen(comment_inline)) == 0)
495         {
496            dstptr += sprintf(dstptr, "<span style=\"" COMMENT_STYLE "\">%s", comment_inline_esc);
497            curcol += strlen(comment_inline);
498            srcptr += strlen(comment_inline) - 1;
499            ch = 0;
500            in_inline_comment = TRUE;
501         }
502
503         /* if this is the start of a new token, see if we want to color it */
504         if (!in_quotes && !in_comment && !in_inline_comment && !last_was_token && is_token[ch])
505         {
506            const token_entry *curtoken;
507            char *temp = srcptr;
508            int toklength;
509
510            /* find the end of the token */
511            while (*temp != 0 && is_token[(UINT8)*temp])
512               temp++;
513            toklength = temp - (srcptr - 1);
514
515            /* scan the token table */
516            last_token_was_include = FALSE;
517            for (curtoken = token_table; curtoken->token != NULL; curtoken++)
518               if (strncmp(srcptr - 1, curtoken->token, toklength) == 0 && strlen(curtoken->token) == toklength)
519               {
520                  dstptr += sprintf(dstptr, "<span style=\"%s\">%s</span>", curtoken->color, curtoken->token);
521                  curcol += strlen(curtoken->token);
522                  srcptr += strlen(curtoken->token) - 1;
523                  ch = 0;
524
525                  /* look for include tokens specially */
526                  if (type == FILE_TYPE_C && strcmp(curtoken->token, "#include") == 0)
527                     last_token_was_include = TRUE;
528                  break;
529               }
530         }
531         last_was_token = is_token[ch];
532
533         /* if we hit a tab, expand it */
534         if (ch == 0x09)
535         {
536            /* compute how many spaces */
537            int spaces = 4 - curcol % 4;
538            while (spaces--)
539            {
540               *dstptr++ = ' ';
541               curcol++;
542            }
543         }
544
545         /* otherwise, copy the source character */
546         else if (ch != 0x0a && ch != 0x0d && ch != 0)
547         {
548            /* track opening quotes */
549            if (!in_comment && !in_inline_comment && !in_quotes && (ch == '"' || ch == '\''))
550            {
551               if (color_quotes)
552                  dstptr += sprintf(dstptr, "<span style=\"" STRING_STYLE "\">%c", ch);
553               else
554                  *dstptr++ = ch;
555               in_quotes = ch;
556
557               /* handle includes */
558               if (last_token_was_include)
559               {
560                  char *endquote = strchr(srcptr, ch);
561                  if (endquote != NULL)
562                  {
563                     astring *filename = astring_dupch(srcptr, endquote - srcptr);
564                     astring *target = find_include_file(srcrootlen, dstrootlen, srcfile, dstfile, filename);
565                     if (target != NULL)
566                     {
567                        dstptr += sprintf(dstptr, "<a href=\"%s\">", astring_c(target));
568                        quotes_are_linked = TRUE;
569                        astring_free(target);
570                     }
571                     astring_free(filename);
572                  }
573               }
574            }
575
576            /* track closing quotes */
577            else if (!in_comment && !in_inline_comment && in_quotes && ch == in_quotes && (type != FILE_TYPE_C || srcptr[-2] != '\\' || srcptr[-3] == '\\'))
578            {
579               if (quotes_are_linked)
580                  dstptr += sprintf(dstptr, "</a>");
581               if (color_quotes)
582                  dstptr += sprintf(dstptr, "%c</span>", ch);
583               else
584                  *dstptr++ = ch;
585               in_quotes = 0;
586               quotes_are_linked = FALSE;
587            }
588
589            /* else just output the current character */
590            else if (ch == '&')
591               dstptr += sprintf(dstptr, "&amp;");
592            else if (ch == '<')
593               dstptr += sprintf(dstptr, "&lt;");
594            else if (ch == '>')
595               dstptr += sprintf(dstptr, "&gt;");
596            else
597               *dstptr++ = ch;
598            curcol++;
599         }
600      }
601
602      /* finish inline comments */
603      if (in_inline_comment)
604      {
605         dstptr += sprintf(dstptr, "</span>");
606         in_inline_comment = FALSE;
607      }
608
609      /* append a break and move on */
610      dstptr += sprintf(dstptr, "\n");
611      core_fputs(dst, dstline);
612   }
613
614   /* close tags */
615   core_fprintf(dst, "\t</pre>\n");
616
617   /* close the file */
618   output_footer_and_close_file(dst);
619   core_fclose(src);
620   return 0;
621}
622
623
624
625/***************************************************************************
626    HTML OUTPUT HELPERS
627***************************************************************************/
628
629/*-------------------------------------------------
630    create_file_and_output_header - create a new
631    HTML file with a standard header
632-------------------------------------------------*/
633
634static core_file *create_file_and_output_header(const astring *filename, const char *title, const char *subtitle)
635{
636   core_file *file;
637
638   /* create the indexfile */
639   if (core_fopen(astring_c(filename), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS | OPEN_FLAG_NO_BOM, &file) != FILERR_NONE)
640      return NULL;
641
642   /* print a header */
643   core_fprintf(file,
644      "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n"
645      "\n"
646      "<html xmlns=\"http://www.w3.org/1999/xhtml\">\n"
647      "<head>\n"
648      "\t<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n"
649      "\t<title>%s</title>\n"
650      "\t<link rel=\"stylesheet\" href=\"http://mamedev.org/styles-site.css\" type=\"text/css\" />\n"
651      "</head>\n"
652      "\n"
653      "<body>\n"
654      "\t<div id=\"outer\">\n"
655      "\n"
656      "\t<div id=\"banner\">\n"
657      "\t<h1>%s</h1>\n"
658      "\t<h2>%s</h2>\n"
659      "\t</div>\n"
660      "\n"
661      "\t<div id=\"left\">\n"
662      "\t<div class=\"sidebar\">\n"
663      "\t<!--#include virtual=\"/links.txt\" -->\n"
664      "\t</div>\n"
665      "\t</div>\n"
666      "\n"
667      "\t<div id=\"center\">\n"
668      "\t<div class=\"content\">\n"
669      "\n",
670      title, title, (subtitle == NULL) ? "&nbsp;" : subtitle
671   );
672
673   /* return the file */
674   return file;
675}
676
677
678/*-------------------------------------------------
679    output_footer_and_close_file - write a
680    standard footer to an HTML file and close it
681-------------------------------------------------*/
682
683static void output_footer_and_close_file(core_file *file)
684{
685   core_fprintf(file,
686      "\n"
687      "\t</div>\n"
688      "\t</div>\n"
689      "\t</div>\n"
690      "</body>"
691      "\n"
692      "</html>\n"
693   );
694   core_fclose(file);
695}
696
697
698
699/***************************************************************************
700    HTML OUTPUT HELPERS
701***************************************************************************/
702
703/*-------------------------------------------------
704    normalized_subpath - normalize a path to
705    forward slashes and extract a subpath
706-------------------------------------------------*/
707
708static const astring *normalized_subpath(const astring *path, int start)
709{
710   astring *result = astring_dupsubstr(path, start, -1);
711   if (result != NULL)
712      astring_replacechr(result, PATH_SEPARATOR[0], '/');
713   return result;
714}
715
716
717/*-------------------------------------------------
718    output_path_as_links - output a path as a
719    series of links
720-------------------------------------------------*/
721
722static void output_path_as_links(core_file *file, const astring *path, int end_is_directory)
723{
724   astring *substr = astring_alloc();
725   int srcdepth, curdepth, depth;
726   int slashindex, lastslash;
727
728   /* first count how deep we are */
729   srcdepth = 0;
730   for (slashindex = astring_chr(path, 0, '/'); slashindex != -1; slashindex = astring_chr(path, slashindex + 1, '/'))
731      srcdepth++;
732   if (end_is_directory)
733      srcdepth++;
734
735   /* output a link to the root */
736   core_fprintf(file, "<a href=\"");
737   for (depth = 0; depth < srcdepth; depth++)
738      core_fprintf(file, "../");
739   core_fprintf(file, "index.html\">&lt;root&gt;</a>/");
740
741   /* now output links to each path up the chain */
742   curdepth = 0;
743   lastslash = 0;
744   for (slashindex = astring_chr(path, lastslash, '/'); slashindex != -1; slashindex = astring_chr(path, lastslash, '/'))
745   {
746      astring_cpysubstr(substr, path, lastslash, slashindex - lastslash);
747
748      curdepth++;
749      core_fprintf(file, "<a href=\"");
750      for (depth = curdepth; depth < srcdepth; depth++)
751         core_fprintf(file, "../");
752      core_fprintf(file, "index.html\">%s</a>/", astring_c(substr));
753
754      lastslash = slashindex + 1;
755   }
756
757   /* and a final link to the current directory */
758   astring_cpysubstr(substr, path, lastslash, -1);
759   if (end_is_directory)
760      core_fprintf(file, "<a href=\"index.html\">%s</a>", astring_c(substr));
761   else
762      core_fprintf(file, "<a href=\"%s.html\">%s</a>", astring_c(substr), astring_c(substr));
763
764   astring_free(substr);
765}
766
767
768/*-------------------------------------------------
769    find_include_file - find an include file
770-------------------------------------------------*/
771
772static astring *find_include_file(int srcrootlen, int dstrootlen, const astring *srcfile, const astring *dstfile, const astring *filename)
773{
774   include_path *curpath;
775
776   /* iterate over include paths and find the file */
777   for (curpath = incpaths; curpath != NULL; curpath = curpath->next)
778   {
779      astring *srcincpath = astring_cat(astring_dupsubstr(srcfile, 0, srcrootlen + 1), curpath->path);
780      core_file *testfile;
781      int lastsepindex = 0;
782      int sepindex;
783
784      /* a '.' include path is specially treated */
785      if (astring_cmpc(curpath->path, ".") == 0)
786         astring_cpysubstr(srcincpath, srcfile, 0, astring_rchr(srcfile, 0, PATH_SEPARATOR[0]));
787
788      /* append the filename piecemeal to account for directories */
789      while ((sepindex = astring_chr(filename, lastsepindex, '/')) != -1)
790      {
791         astring *pathpart = astring_dupsubstr(filename, lastsepindex, sepindex - lastsepindex);
792
793         /* handle .. by removing a chunk from the incpath */
794         if (astring_cmpc(pathpart, "..") == 0)
795         {
796            sepindex = astring_rchr(srcincpath, 0, PATH_SEPARATOR[0]);
797            if (sepindex != -1)
798               astring_substr(srcincpath, 0, sepindex);
799         }
800
801         /* otherwise, append a path separator and the pathpart */
802         else
803            astring_cat(astring_catc(srcincpath, PATH_SEPARATOR), pathpart);
804
805         /* advance past the previous index */
806         lastsepindex = sepindex + 1;
807
808         /* free the path part we extracted */
809         astring_free(pathpart);
810      }
811
812      /* now append the filename */
813      astring_catsubstr(astring_catc(srcincpath, PATH_SEPARATOR), filename, lastsepindex, -1);
814
815      /* see if we can open it */
816      if (core_fopen(astring_c(srcincpath), OPEN_FLAG_READ, &testfile) == FILERR_NONE)
817      {
818         astring *tempfile = astring_alloc();
819         astring *tempinc = astring_alloc();
820
821         /* close the file */
822         core_fclose(testfile);
823
824         /* find the longest matching directory substring between the include and source file */
825         lastsepindex = 0;
826         while ((sepindex = astring_chr(srcincpath, lastsepindex, PATH_SEPARATOR[0])) != -1)
827         {
828            /* get substrings up to the current directory */
829            astring_cpysubstr(tempfile, srcfile, 0, sepindex);
830            astring_cpysubstr(tempinc, srcincpath, 0, sepindex);
831
832            /* if we don't match, stop */
833            if (astring_cmp(tempfile, tempinc) != 0)
834               break;
835            lastsepindex = sepindex + 1;
836         }
837
838         /* chop off the common parts of the paths */
839         astring_cpysubstr(tempfile, srcfile, lastsepindex, -1);
840         astring_replacechr(astring_substr(srcincpath, lastsepindex, -1), PATH_SEPARATOR[0], '/');
841
842         /* for each directory left in the filename, we need to prepend a "../" */
843         while ((sepindex = astring_chr(tempfile, 0, PATH_SEPARATOR[0])) != -1)
844         {
845            astring_substr(tempfile, sepindex + 1, -1);
846            astring_insc(srcincpath, 0, "../");
847         }
848         astring_catc(srcincpath, ".html");
849
850         /* free the strings and return the include path */
851         astring_free(tempfile);
852         astring_free(tempinc);
853         return srcincpath;
854      }
855
856      /* free our include path */
857      astring_free(srcincpath);
858   }
859   return NULL;
860}
src/tools/tools.mak
r778r779
1414TOOLSOBJ = $(OBJ)/tools
1515
1616OBJDIRS += \
17   $(OBJ)/tools \
17   $(TOOLSOBJ) \
1818
1919
2020
r778r779
2222# set of tool targets
2323#-------------------------------------------------
2424
25# file2str and png2bdc are build tools, so they are built into the
26# $(OBJ) directory; all other tools are output tools and get built
27# into the root
28FILE2STR = $(OBJ)/file2str$(EXE)
29PNG2BDC = $(OBJ)/png2bdc$(EXE)
30
3125TOOLS += \
32   $(FILE2STR) \
33   $(PNG2BDC) \
3426   romcmp$(EXE) \
3527   chdman$(EXE) \
3628   jedutil$(EXE) \
3729   makemeta$(EXE) \
3830   regrep$(EXE) \
3931   srcclean$(EXE) \
32   src2html$(EXE) \
4033
4134
4235
4336#-------------------------------------------------
44# file2str
45#-------------------------------------------------
46
47FILE2STROBJS = \
48   $(TOOLSOBJ)/file2str.o \
49
50$(FILE2STR): $(FILE2STROBJS) $(LIBOCORE)
51   @echo Linking $@...
52   $(LD) $(LDFLAGS) $^ $(LIBS) -o $@
53
54
55
56#-------------------------------------------------
57# png2bdc
58#-------------------------------------------------
59
60PNG2BDCOBJS = \
61   $(TOOLSOBJ)/png2bdc.o \
62
63$(PNG2BDC): $(PNG2BDCOBJS) $(LIBUTIL) $(LIBOCORE) $(ZLIB) $(EXPAT)
64   @echo Linking $@...
65   $(LD) $(LDFLAGS) $^ $(LIBS) -o $@
66
67
68
69#-------------------------------------------------
7037# romcmp
7138#-------------------------------------------------
7239
r778r779
142109srcclean$(EXE): $(SRCCLEANOBJS) $(LIBUTIL) $(LIBOCORE) $(ZLIB) $(EXPAT)
143110   @echo Linking $@...
144111   $(LD) $(LDFLAGS) $^ $(LIBS) -o $@
112
113
114
115#-------------------------------------------------
116# src2html
117#-------------------------------------------------
118
119SRC2HTMLOBJS = \
120   $(TOOLSOBJ)/src2html.o \
121
122src2html$(EXE): $(SRC2HTMLOBJS) $(LIBUTIL) $(LIBOCORE) $(ZLIB) $(EXPAT)
123   @echo Linking $@...
124   $(LD) $(LDFLAGS) $^ $(LIBS) -o $@
src/tools/srcclean.c
r778r779
1313#include <string.h>
1414
1515#include "corestr.h"
16#include "osdcore.h"
1617
1718
1819/***************************************************************************
r778r779
3940int main(int argc, char *argv[])
4041{
4142   int removed_tabs = 0, removed_spaces = 0, fixed_mac_style = 0, fixed_nix_style = 0;
42   int src = 0, dst = 0, in_c_comment = 0, in_cpp_comment = 0;
43   int src = 0, dst = 0, in_c_comment = FALSE, in_cpp_comment = FALSE;
4344   int hichars = 0;
4445   int is_c_file;
4546   const char *ext;
r778r779
8283      /* track whether or not we are within a C-style comment */
8384      if (is_c_file && !in_cpp_comment)
8485      {
85         if (ch == '/' && original[src] == '*')
86            in_c_comment = 1;
87         else if (ch == '*' && original[src] == '/')
88            in_c_comment = 0;
86         if (!in_c_comment && ch == '/' && original[src] == '*')
87            in_c_comment = TRUE;
88         else if (in_c_comment && ch == '*' && original[src] == '/')
89            in_c_comment = FALSE;
8990      }
9091
9192      /* track whether or not we are within a C++-style comment */
9293      if (is_c_file && !in_c_comment && ch == '/' && original[src] == '/')
93         in_cpp_comment = 1;
94         in_cpp_comment = TRUE;
9495
9596      /* if we hit a LF without a CR, back up and act like we hit a CR */
9697      if (ch == 0x0a)
r778r779
121122            fixed_mac_style = 1;
122123
123124         /* we are no longer in a C++-style comment */
124         in_cpp_comment = 0;
125         in_cpp_comment = FALSE;
125126      }
126127
127128      /* if we hit a tab within a comment, expand it */
src/osd/windows/windows.mak
r778r779
8181
8282ifdef MSVC_BUILD
8383
84VCONV = $(WINOBJ)/vconv$(EXE)
85
8486# replace the various compilers with vconv.exe prefixes
85CC = @$(OBJ)/vconv.exe gcc -I.
86LD = @$(OBJ)/vconv.exe ld /profile
87AR = @$(OBJ)/vconv.exe ar
88RC = @$(OBJ)/vconv.exe windres
87CC = @$(VCONV) gcc -I.
88LD = @$(VCONV) ld /profile
89AR = @$(VCONV) ar
90RC = @$(VCONV) windres
8991
9092# make sure we use the multithreaded runtime
9193CC += /MT
r778r779
104106DEFS += -D_CRT_SECURE_NO_DEPRECATE -DXML_STATIC -D__inline__=__inline -Dsnprintf=_snprintf -Dvsnprintf=_vsnprintf
105107
106108# make msvcprep into a pre-build step
107OSPREBUILD = $(OBJ)/vconv.exe
109# OSPREBUILD = $(VCONV)
108110
109$(OBJ)/vconv.exe: $(WINOBJ)/vconv.o
111# add VCONV to the build tools
112BUILD += $(VCONV)
113
114$(VCONV): $(WINOBJ)/vconv.o
110115   @echo Linking $@...
111116ifdef PTR64
112117   @link.exe /nologo $^ version.lib bufferoverflowu.lib /out:$@
src/osd/windows/input.c
r778r779
883883   // joystick case
884884   else if (devinfo->head == &joystick_list)
885885   {
886      int axisnum, povnum;
886      int povnum;
887887
888888      memset(&devinfo->joystick.state, 0, sizeof(devinfo->joystick.state));
889      for (axisnum = 0; axisnum < 8; axisnum++)
890         (&devinfo->joystick.state.lX)[axisnum] = (devinfo->joystick.rangemin[axisnum] + devinfo->joystick.rangemax[axisnum]) / 2;
891889      for (povnum = 0; povnum < ARRAY_LENGTH(devinfo->joystick.state.rgdwPOV); povnum++)
892890         devinfo->joystick.state.rgdwPOV[povnum] = 0xffff;
893891   }
r778r779
16441642   // get the number of devices, allocate a device list, and fetch it
16451643   if ((*get_rawinput_device_list)(NULL, &device_count, sizeof(*devlist)) != 0)
16461644      goto error;
1645   if (device_count == 0)
1646      goto error;
16471647   devlist = malloc_or_die(device_count * sizeof(*devlist));
16481648   if ((*get_rawinput_device_list)(devlist, &device_count, sizeof(*devlist)) == -1)
16491649      goto error;
src/osd/windows/winutf8.c
r778r779
229229
230230
231231//============================================================
232//  win_create_window_utf8
233//============================================================
234
235HWND win_create_window_utf8(const char* classname, const char* windowname, DWORD style,
236                     int x, int y, int width, int height, HWND parent, HMENU menu,
237                     HINSTANCE instance, void* param)
238{
239   TCHAR* t_classname;
240   TCHAR* t_windowname;
241   HWND result = 0;
242
243   t_classname = tstring_from_utf8(classname);
244   if( !t_classname )
245      return result;
246
247   t_windowname = tstring_from_utf8(windowname);
248   if( !t_windowname ) {
249      free(t_classname);
250      return result;
251   }
252
253   result = CreateWindow(t_classname, t_windowname, style, x, y, width, height, parent,
254                    menu, instance, param);
255
256   free(t_windowname);
257   free(t_classname);
258
259   return result;
260}
261
262//============================================================
263232//  win_create_window_ex_utf8
264233//============================================================
265234
src/osd/windows/window.c
r778r779
3636#include "debugwin.h"
3737#include "strconv.h"
3838#include "config.h"
39#include "winutf8.h"
3940
4041#ifdef MESS
4142#include "menu.h"
r778r779
11381139
11391140static int complete_create(win_window_info *window)
11401141{
1141   TCHAR *t_title;
11421142   RECT monitorbounds, client;
11431143   int tempwidth, tempheight;
11441144   HMENU menu = NULL;
r778r779
11561156#endif
11571157
11581158   // create the window, but don't show it yet
1159   t_title = tstring_from_utf8(window->title);
1160   if (t_title == NULL)
1161      return 1;
1162   window->hwnd = CreateWindowEx(
1159   window->hwnd = win_create_window_ex_utf8(
11631160                  window->fullscreen ? FULLSCREEN_STYLE_EX : WINDOW_STYLE_EX,
1164                  TEXT("MAME"),
1165                  t_title,
1161                  "MAME",
1162                  window->title,
11661163                  window->fullscreen ? FULLSCREEN_STYLE : WINDOW_STYLE,
11671164                  monitorbounds.left + 20, monitorbounds.top + 20,
11681165                  monitorbounds.left + 100, monitorbounds.top + 100,
r778r779
11701167                  menu,
11711168                  GetModuleHandle(NULL),
11721169                  NULL);
1173   free(t_title);
11741170   if (window->hwnd == NULL)
11751171      return 1;
11761172
src/osd/windows/winalloc.c
r778r779
299299         {
300300            if (winalloc_in_main_code)
301301            {
302               fprintf(stderr, "Error: realloc a non-existant block\n");
303               osd_break_into_debugger("Error: realloc a non-existant block");
302               fprintf(stderr, "Error: realloc a non-existant block (%s:%d)\n", file, line);
303               osd_break_into_debugger("Error: realloc a non-existant block\n");
304304            }
305305         }
306306         else
src/osd/windows/winutf8.h
r778r779
2323int win_message_box_utf8(HWND window, const char *text, const char *caption, UINT type);
2424BOOL win_set_window_text_utf8(HWND window, const char *text);
2525int win_get_window_text_utf8(HWND window, char *buffer, size_t buffer_size);
26HWND win_create_window_utf8(const char* classname, const char* windowname, DWORD style,
27                     int x, int y, int width, int height, HWND parent, HMENU menu,
28                     HINSTANCE instance, void* param);
2926HWND win_create_window_ex_utf8(DWORD exstyle, const char* classname, const char* windowname, DWORD style,
3027                        int x, int y, int width, int height, HWND wndparent, HMENU menu,
3128                        HINSTANCE instance, void* param);
src/osd/windows/ui/win32ui.c
r778r779
481481/* idle work at startup */
482482static BOOL idle_work;
483483
484/* memory pool in use */
485static memory_pool *mame32_pool;
484/* object pool in use */
485static object_pool *mame32_pool;
486486
487487static int  game_index;
488488static int  progBarStep;
r778r779
10191019   return hSmall;
10201020}
10211021
1022memory_pool *GetMame32MemoryPool(void)
1022object_pool *GetMame32MemoryPool(void)
10231023{
10241024   return mame32_pool;
10251025}
r778r779
16991699   mame_set_output_channel(OUTPUT_CHANNEL_ERROR, winui_output_error, NULL, NULL, NULL);
17001700
17011701   // create the memory pool
1702   mame32_pool = pool_create(memory_error);
1702   mame32_pool = pool_alloc(memory_error);
17031703
17041704   // custom per-game icons
17051705   icon_index = pool_malloc(mame32_pool, sizeof(int) * driver_list_get_count(drivers));
src/osd/windows/ui/win32ui.h
r778r779
6363int FindIconIndex(int nIconResource);
6464int FindIconIndexByName(const char *icon_name);
6565int GetSelectedPick(void);
66memory_pool *GetMame32MemoryPool(void);
66object_pool *GetMame32MemoryPool(void);
6767
6868void UpdateListView(void);
6969
src/osd/windows/ui/screenshot.c
r778r779
216216   zip_error ziperr;
217217   zip_file *zip;
218218   const zip_file_header *zip_header;
219   char *fname;
219   astring *fname;
220220
221221   // clear out result
222222   *file = NULL;
223223
224224   // look for the raw file
225   fname = assemble_3_strings(dir_name, PATH_SEPARATOR, filename);
226   filerr = core_fopen(fname, OPEN_FLAG_READ, file);
227   free(fname);
225   fname = astring_assemble_3(astring_alloc(), dir_name, PATH_SEPARATOR, filename);
226   filerr = core_fopen(astring_c(fname), OPEN_FLAG_READ, file);
227   astring_free(fname);
228228
229229   // did the raw file not exist?
230230   if (filerr != FILERR_NONE)
231231   {
232232      // look into zip file
233      fname = assemble_4_strings(dir_name, PATH_SEPARATOR, zip_name, ".zip");
234      ziperr = zip_file_open(fname, &zip);
235      free(fname);
233      fname = astring_assemble_4(astring_alloc(), dir_name, PATH_SEPARATOR, zip_name, ".zip");
234      ziperr = zip_file_open(astring_c(fname), &zip);
235      astring_free(fname);
236236      if (ziperr == ZIPERR_NONE)
237237      {
238238         zip_header = zip_file_seek_file(zip, filename);
r778r779
258258   BOOL success = FALSE;
259259   const char *dir_name;
260260   const char *zip_name;
261   char *fname;
261   astring *fname;
262262   void *buffer = NULL;
263263
264264   switch (pic_type)
r778r779
296296         return FALSE;
297297   }
298298
299   fname = assemble_2_strings(filename, ".png");
300   filerr = OpenDIBFile(dir_name, zip_name, fname, &file, &buffer);
301   free(fname);
299   fname = astring_assemble_2(astring_alloc(), filename, ".png");
300   filerr = OpenDIBFile(dir_name, zip_name, astring_c(fname), &file, &buffer);
301   astring_free(fname);
302302
303303   if (filerr != FILERR_NONE)
304304   {
305      fname = assemble_3_strings(filename, PATH_SEPARATOR, "0000.png");
306      filerr = OpenDIBFile(dir_name, zip_name, fname, &file, &buffer);
307      free(fname);
305      fname = astring_assemble_3(astring_alloc(), filename, PATH_SEPARATOR, "0000.png");
306      filerr = OpenDIBFile(dir_name, zip_name, astring_c(fname), &file, &buffer);
307      astring_free(fname);
308308   }
309309
310310   if (filerr == FILERR_NONE)
src/osd/windows/ui/m32opts.c
r778r779
214214    Internal variables
215215 ***************************************************************************/
216216
217static memory_pool *options_memory_pool;
217static object_pool *options_memory_pool;
218218
219219static core_options *settings;
220220
r778r779
502502BOOL OptionsInit()
503503{
504504   // create a memory pool for our data
505   options_memory_pool = pool_create(memory_error);
505   options_memory_pool = pool_alloc(memory_error);
506506   if (!options_memory_pool)
507507      return FALSE;
508508
src/emu/config.c
r778r779
118118   config_type *type;
119119   mame_file *file;
120120   int loaded = 0;
121   char *fname;
121   astring *fname;
122122
123123   /* loop over all registrants and call their init function */
124124   for (type = typelist; type; type = type->next)
r778r779
128128   if (controller[0] != 0)
129129   {
130130      /* open the config file */
131      fname = assemble_2_strings(controller, ".cfg");
132      filerr = mame_fopen(SEARCHPATH_CTRLR, fname, OPEN_FLAG_READ, &file);
133      free(fname);
131      fname = astring_assemble_2(astring_alloc(), controller, ".cfg");
132      filerr = mame_fopen(SEARCHPATH_CTRLR, astring_c(fname), OPEN_FLAG_READ, &file);
133      astring_free(fname);
134134
135135      if (filerr != FILERR_NONE)
136136         fatalerror("Could not load controller file %s.cfg", controller);
r778r779
150150   }
151151
152152   /* finally, load the game-specific file */
153   fname = assemble_2_strings(Machine->basename, ".cfg");
154   filerr = mame_fopen(SEARCHPATH_CONFIG, fname, OPEN_FLAG_READ, &file);
155   free(fname);
153   fname = astring_assemble_2(astring_alloc(), Machine->basename, ".cfg");
154   filerr = mame_fopen(SEARCHPATH_CONFIG, astring_c(fname), OPEN_FLAG_READ, &file);
155   astring_free(fname);
156156
157157   if (filerr == FILERR_NONE)
158158   {
r778r779
175175   file_error filerr;
176176   config_type *type;
177177   mame_file *file;
178   char *fname;
178   astring *fname;
179179
180180   /* loop over all registrants and call their init function */
181181   for (type = typelist; type; type = type->next)
r778r779
190190   }
191191
192192   /* finally, save the game-specific file */
193   fname = assemble_2_strings(Machine->basename, ".cfg");
194   filerr = mame_fopen(SEARCHPATH_CONFIG, fname, OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS, &file);
195   free(fname);
193   fname = astring_assemble_2(astring_alloc(), Machine->basename, ".cfg");
194   filerr = mame_fopen(SEARCHPATH_CONFIG, astring_c(fname), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS, &file);
195   astring_free(fname);
196196
197197   if (filerr == FILERR_NONE)
198198   {
src/emu/debug/debugcmd.c
r778r779
9999static void execute_map(int ref, int params, const char **param);
100100static void execute_memdump(int ref, int params, const char **param);
101101static void execute_symlist(int ref, int params, const char **param);
102static void execute_softreset(int ref, int params, const char **param);
103static void execute_hardreset(int ref, int params, const char **param);
102104
103105
104106
r778r779
231233
232234   debug_console_register_command("symlist",   CMDFLAG_NONE, 0, 0, 1, execute_symlist);
233235
236   debug_console_register_command("softreset",   CMDFLAG_NONE, 0, 0, 1, execute_softreset);
237   debug_console_register_command("hardreset",   CMDFLAG_NONE, 0, 0, 1, execute_hardreset);
238
234239   /* ask all the CPUs if they would like to register functions or symbols */
235240   for (cpunum = 0; cpunum < cpu_gettotalcpu(); cpunum++)
236241   {
r778r779
20032008      const char *filename = param[0];
20042009      int scrnum = (params > 1) ? atoi(param[1]) : 0;
20052010      UINT32 mask = render_get_live_screens_mask();
2006      const char *fname;
2011      astring *fname;
20072012
20082013      if (scrnum < 0 || scrnum >= MAX_SCREENS || !(mask & (1 << scrnum)))
20092014      {
r778r779
20112016         return;
20122017      }
20132018
2014      fname = (strstr(filename, ".png") != NULL) ? filename : assemble_2_strings(filename, ".png");
2015      filerr = mame_fopen(SEARCHPATH_SCREENSHOT, fname, OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS, &fp);
2016      if (fname != filename)
2017         free((void *)fname);
2019      fname = astring_dupc(filename);
2020      if (astring_findc(fname, 0, ".png") == -1)
2021         astring_catc(fname, ".png");
2022      filerr = mame_fopen(SEARCHPATH_SCREENSHOT, astring_c(fname), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS, &fp);
2023      astring_free(fname);
20182024
20192025      if (filerr != FILERR_NONE)
20202026      {
r778r779
21732179   }
21742180}
21752181
2182
2183/*-------------------------------------------------
2184    execute_softreset - execute the softreset command
2185-------------------------------------------------*/
2186
2187static void execute_softreset(int ref, int params, const char **param)
2188{
2189   mame_schedule_soft_reset(Machine);
2190}
2191
2192
2193/*-------------------------------------------------
2194    execute_hardreset - execute the hardreset command
2195-------------------------------------------------*/
2196
2197static void execute_hardreset(int ref, int params, const char **param)
2198{
2199   mame_schedule_hard_reset(Machine);
2200}
src/emu/debug/debughlp.c
r778r779
228228      "  Displays the symbols specific to CPU #2.\n"
229229   },
230230   {
231      "softreset",
232      "\n"
233      "  softreset\n"
234      "\n"
235      "Executes a soft reset.\n"
236      "\n"
237      "Examples:\n"
238      "\n"
239      "softreset\n"
240      "  Executes a soft reset.\n"
241   },
242   {
243      "hardreset",
244      "\n"
245      "  hardreset\n"
246      "\n"
247      "Executes a hard reset.\n"
248      "\n"
249      "Examples:\n"
250      "\n"
251      "hardreset\n"
252      "  Executes a hard reset.\n"
253   },
254   {
231255      "print",
232256      "\n"
233257      "  print <item>[,...]\n"
src/emu/debug/debugcmt.c
r778r779
429429   if (total_comments > 0)
430430   {
431431      file_error filerr;
432      char *fname;
432      astring *fname;
433433       mame_file *fp;
434434
435       fname = assemble_2_strings(Machine->basename, ".cmt");
436       filerr = mame_fopen(SEARCHPATH_COMMENT, fname, OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS, &fp);
437       free(fname);
435       fname = astring_assemble_2(astring_alloc(), Machine->basename, ".cmt");
436       filerr = mame_fopen(SEARCHPATH_COMMENT, astring_c(fname), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS, &fp);
437       astring_free(fname);
438438
439439       if (filerr == FILERR_NONE)
440440       {
r778r779
461461{
462462   file_error filerr;
463463   mame_file *fp;
464   char *fname;
464   astring *fname;
465465
466   fname = assemble_2_strings(Machine->basename, ".cmt");
467   filerr = mame_fopen(SEARCHPATH_COMMENT, fname, OPEN_FLAG_READ, &fp);
468   free(fname);
466   fname = astring_assemble_2(astring_alloc(), Machine->basename, ".cmt");
467   filerr = mame_fopen(SEARCHPATH_COMMENT, astring_c(fname), OPEN_FLAG_READ, &fp);
468   astring_free(fname);
469469
470470   if (filerr != FILERR_NONE) return 0;
471471   debug_comment_load_xml(fp);
src/emu/info.c
r778r779
513513               case REGION_USER7: fprintf(out, " region=\"user7\""); break;
514514               case REGION_USER8: fprintf(out, " region=\"user8\""); break;
515515               case REGION_DISKS: fprintf(out, " region=\"disks\""); break;
516               default: fprintf(out, " region=\"0x%x\"", ROMREGION_GETTYPE(region));
516               default: fprintf(out, " region=\"0x%x\"", (int)ROMREGION_GETTYPE(region)); break;
517517         }
518518
519519         if (hash_data_has_info(ROM_GETHASHDATA(rom), HASH_INFO_NO_DUMP))
src/emu/tilemap.c
r778r779
7070   INT32 enable;
7171   INT32 attributes;
7272
73   int type;
73   tilemap_type type;
7474   INT32 transparent_pen;
75   UINT32 fgmask[4], bgmask[4]; /* for TILEMAP_SPLIT */
75   UINT32 fgmask[4], bgmask[4]; /* for TILEMAP_TYPE_SPLIT */
7676
7777   UINT32 *pPenToPixel[4];
7878
r778r779
691691
692692static void install_draw_handlers( tilemap *tmap )
693693{
694   if( Machine->game_colortable )
694   switch (tmap->type)
695695   {
696      if( tmap->type & TILEMAP_BITMASK )
697         tmap->draw_tile = HandleTransparencyBitmask_ind;
698      else if( tmap->type & TILEMAP_SPLIT_PENBIT )
699         tmap->draw_tile = HandleTransparencyPenBit_ind;
700      else if( tmap->type & TILEMAP_SPLIT )
701         tmap->draw_tile = HandleTransparencyPens_ind;
702      else if( tmap->type==TILEMAP_TRANSPARENT )
703         tmap->draw_tile = HandleTransparencyPen_ind;
704      else if( tmap->type==TILEMAP_TRANSPARENT_COLOR )
705         tmap->draw_tile = HandleTransparencyColor_ind;
706      else
707         tmap->draw_tile = HandleTransparencyNone_ind;
696      default:
697      case TILEMAP_TYPE_OPAQUE:
698         tmap->draw_tile = (Machine->game_colortable != NULL) ? HandleTransparencyNone_ind : HandleTransparencyNone_raw;
699         break;
700
701      case TILEMAP_TYPE_TRANSPARENT:
702         tmap->draw_tile = (Machine->game_colortable != NULL) ? HandleTransparencyPen_ind : HandleTransparencyPen_raw;
703         break;
704
705      case TILEMAP_TYPE_SPLIT:
706         tmap->draw_tile = (Machine->game_colortable != NULL) ? HandleTransparencyPens_ind : HandleTransparencyPens_raw;
707         break;
708
709      case TILEMAP_TYPE_BITMASK:
710         tmap->draw_tile = (Machine->game_colortable != NULL) ? HandleTransparencyBitmask_ind : HandleTransparencyBitmask_raw;
711         break;
712
713      case TILEMAP_TYPE_TRANSPARENT_COLOR:
714         tmap->draw_tile = (Machine->game_colortable != NULL) ? HandleTransparencyColor_ind : HandleTransparencyColor_raw;
715         break;
716
717      case TILEMAP_TYPE_SPLIT_PENBIT:
718         tmap->draw_tile = (Machine->game_colortable != NULL) ? HandleTransparencyPenBit_ind : HandleTransparencyPenBit_raw;
719         break;
708720   }
709   else
710   {
711      if( tmap->type & TILEMAP_BITMASK )
712         tmap->draw_tile = HandleTransparencyBitmask_raw;
713      else if( tmap->type & TILEMAP_SPLIT_PENBIT )
714         tmap->draw_tile = HandleTransparencyPenBit_raw;
715      else if( tmap->type & TILEMAP_SPLIT )
716         tmap->draw_tile = HandleTransparencyPens_raw;
717      else if( tmap->type==TILEMAP_TRANSPARENT )
718         tmap->draw_tile = HandleTransparencyPen_raw;
719      else if( tmap->type==TILEMAP_TRANSPARENT_COLOR )
720         tmap->draw_tile = HandleTransparencyColor_raw;
721      else
722         tmap->draw_tile = HandleTransparencyNone_raw;
723   }
724721}
725722
726723INLINE tilemap_draw_func pick_draw_func( mame_bitmap *dest )
r778r779
777774tilemap *tilemap_create(
778775   tile_get_info_fn tile_get_info,
779776   UINT32 (*get_memory_offset)( UINT32 col, UINT32 row, UINT32 num_cols, UINT32 num_rows ),
780   int type,
777   tilemap_type type,
781778   int tile_width, int tile_height,
782779   int num_cols, int num_rows )
783780{
r778r779
13071304         blit.screen_bitmap_pitch_row = blit.screen_bitmap_pitch_line*tmap->cached_tile_height;
13081305      } /* dest == bitmap */
13091306
1310      if( !(tmap->type==TILEMAP_OPAQUE || (flags&TILEMAP_IGNORE_TRANSPARENCY)) )
1307      if( !(tmap->type==TILEMAP_TYPE_OPAQUE || (flags&TILEMAP_IGNORE_TRANSPARENCY)) )
13111308      {
13121309         if( flags&TILEMAP_BACK )
13131310         {
r778r779
15281525
15291526         tilemap_get_pixmap( tmap ); /* force update */
15301527
1531         if( !(tmap->type==TILEMAP_OPAQUE || (flags&TILEMAP_IGNORE_TRANSPARENCY)) )
1528         if( !(tmap->type==TILEMAP_TYPE_OPAQUE || (flags&TILEMAP_IGNORE_TRANSPARENCY)) )
15321529         {
15331530            if( flags&TILEMAP_BACK )
15341531            {
r778r779
21532150   UINT32 tile_height = tmap->cached_tile_height;
21542151   mame_bitmap *pixmap = tmap->pixmap;
21552152   mame_bitmap *transparency_bitmap = tmap->transparency_bitmap;
2156   int pitch = tile_width + tile_info.skip;
2153   int pitch = tile_width;
21572154   PAL_INIT;
21582155   UINT32 *pPenToPixel;
21592156   const UINT8 *pPenData = tile_info.pen_data;
r778r779
22512248   UINT32 tile_height = tmap->cached_tile_height;
22522249   mame_bitmap *pixmap = tmap->pixmap;
22532250   mame_bitmap *transparency_bitmap = tmap->transparency_bitmap;
2254   int pitch = tile_width + tile_info.skip;
2251   int pitch = tile_width;
22552252   PAL_INIT;
22562253   UINT32 *pPenToPixel = tmap->pPenToPixel[flags&(TILE_FLIPY|TILE_FLIPX)];
22572254   const UINT8 *pPenData = tile_info.pen_data;
r778r779
23512348   UINT32 tile_height = tmap->cached_tile_height;
23522349   mame_bitmap *pixmap = tmap->pixmap;
23532350   mame_bitmap *transparency_bitmap = tmap->transparency_bitmap;
2354   int pitch = tile_width + tile_info.skip;
2351   int pitch = tile_width;
23552352   PAL_INIT;
23562353   UINT32 *pPenToPixel = tmap->pPenToPixel[flags&(TILE_FLIPY|TILE_FLIPX)];
23572354   const UINT8 *pPenData = tile_info.pen_data;
r778r779
24492446   UINT32 tile_height = tmap->cached_tile_height;
24502447   mame_bitmap *pixmap = tmap->pixmap;
24512448   mame_bitmap *transparency_bitmap = tmap->transparency_bitmap;
2452   int pitch = tile_width + tile_info.skip;
2449   int pitch = tile_width;
24532450   PAL_INIT;
24542451   UINT32 *pPenToPixel = tmap->pPenToPixel[flags&(TILE_FLIPY|TILE_FLIPX)];
24552452   const UINT8 *pPenData = tile_info.pen_data;
r778r779
25292526   UINT32 tile_height = tmap->cached_tile_height;
25302527   mame_bitmap *pixmap = tmap->pixmap;
25312528   mame_bitmap *transparency_bitmap = tmap->transparency_bitmap;
2532   int pitch = tile_width + tile_info.skip;
2529   int pitch = tile_width;
25332530   PAL_INIT;
25342531   UINT32 *pPenToPixel = tmap->pPenToPixel[flags&(TILE_FLIPY|TILE_FLIPX)];
25352532   const UINT8 *pPenData = tile_info.pen_data;
r778r779
26152612   UINT32 tile_height = tmap->cached_tile_height;
26162613   mame_bitmap *pixmap = tmap->pixmap;
26172614   mame_bitmap *transparency_bitmap = tmap->transparency_bitmap;
2618   int pitch = tile_width + tile_info.skip;
2615   int pitch = tile_width;
26192616   PAL_INIT;
26202617   UINT32 *pPenToPixel = tmap->pPenToPixel[flags&(TILE_FLIPY|TILE_FLIPX)];
26212618   const UINT8 *pPenData = tile_info.pen_data;
src/emu/tilemap.h
r778r779
2323    tilemap_set_flip, tilemap_mark_all_tiles_dirty
2424*/
2525
26#define TILEMAP_OPAQUE               0x00
27#define TILEMAP_TRANSPARENT            0x01
28#define TILEMAP_SPLIT               0x02
29#define TILEMAP_BITMASK               0x04
30#define TILEMAP_TRANSPARENT_COLOR      0x08
26/* tilemap types */
27enum _tilemap_type
28{
29   TILEMAP_TYPE_OPAQUE,
30   TILEMAP_TYPE_TRANSPARENT,
31   TILEMAP_TYPE_SPLIT,
32   TILEMAP_TYPE_BITMASK,
33   TILEMAP_TYPE_TRANSPARENT_COLOR,
34   TILEMAP_TYPE_SPLIT_PENBIT
35};
36typedef enum _tilemap_type tilemap_type;
3137
38
3239/* Set transparency_pen to a mask.  pen&mask determines whether each pixel is in front or back half */
33#define TILEMAP_SPLIT_PENBIT         0x10
3440/*
35    TILEMAP_SPLIT should be used if the pixels from a single tile
41    TILEMAP_TYPE_SPLIT should be used if the pixels from a single tile
3642    can appear in more than one plane.
3743
38    TILEMAP_BITMASK is used by Namco System1, Namco System2, NamcoNA1/2, Namco NB1
44    TILEMAP_TYPE_BITMASK is used by Namco System1, Namco System2, NamcoNA1/2, Namco NB1
3945*/
4046
4147#define TILEMAP_IGNORE_TRANSPARENCY      0x10
r778r779
6470   const UINT8 *pen_data;
6571   const pen_t *pal_data;
6672   UINT32 flags;
67   int skip;
68   UINT32 tile_number;      /* needed for tilemap_mark_gfxdata_dirty */
69   UINT32 pen_usage;      /* TBR */
7073   UINT32 priority;      /* tile priority */
71   UINT8 *mask_data;      /* for TILEMAP_BITMASK */
74   UINT32 transpens;      /* additional per-tile transparent pens for TILEMAP_TYPE_SPLIT */
75   UINT8 *mask_data;      /* for TILEMAP_TYPE_BITMASK */
7276   void *user_data;      /* user-supplied tilemap-wide pointer */
7377};
7478
r778r779
7983#define SET_TILE_INFO(GFX,CODE,COLOR,FLAGS) { \
8084   const gfx_element *gfx = machine->gfx[(GFX)]; \
8185   int _code = (CODE) % gfx->total_elements; \
82   tileinfo->tile_number = _code; \
8386   tileinfo->pen_data = gfx->gfxdata + _code*gfx->char_modulo; \
8487   tileinfo->pal_data = &gfx->colortable[gfx->color_granularity * (COLOR)]; \
85   tileinfo->pen_usage = gfx->pen_usage?gfx->pen_usage[_code]:0; \
8688   tileinfo->flags = FLAGS; \
8789   if (gfx->flags & GFX_PACKED) tileinfo->flags |= TILE_4BPP; \
8890}
r778r779
9597#define TILE_4BPP               0x10
9698/*      TILE_SPLIT                  0x60 */
9799
98/* TILE_SPLIT is for use with TILEMAP_SPLIT layers.  It selects transparency type. */
100/* TILE_SPLIT is for use with TILEMAP_TYPE_SPLIT layers.  It selects transparency type. */
99101#define TILE_SPLIT_OFFSET         5
100102#define TILE_SPLIT(T)            ((T)<<TILE_SPLIT_OFFSET)
101103
r778r779
117119tilemap *tilemap_create(
118120   tile_get_info_fn tile_get_info,
119121   UINT32 (*get_memory_offset)( UINT32 col, UINT32 row, UINT32 num_cols, UINT32 num_rows ),
120   int type,
122   tilemap_type type,
121123   int tile_width, int tile_height,
122124   int num_cols, int num_rows );
123125
src/emu/uimenu.c
r778r779
16101610      const game_driver *driver = select_game_list[curitem];
16111611      if (driver != NULL)
16121612      {
1613         const game_driver *cloneof = driver_get_clone(driver);
16131614         item_list[menu_items].text = menu_string_pool_add("%s", driver->name);
16141615         item_list[menu_items].subtext = menu_string_pool_add("%s", driver->description);
1615         item_list[menu_items++].flags = (driver_get_clone(driver) == NULL) ? 0 : MENU_FLAG_INVERT;
1616         item_list[menu_items++].flags = (cloneof == NULL || (cloneof->flags & GAME_IS_BIOS_ROOT)) ? 0 : MENU_FLAG_INVERT;
16161617      }
16171618   }
16181619
r778r779
18241825   input_item_data *item = itemlist;
18251826   const input_port_default_entry *indef;
18261827   input_port_default_entry *in;
1827   char temp[100];
1828   astring *seqstring;
18281829
18291830   /* an out of range group is special; it just means the game-specific inputs */
18301831   if (group > IPG_TOTAL_GROUPS)
18311832      return input_menu_get_game_items(itemlist);
18321833
18331834   /* iterate over the input ports and add menu items */
1835   seqstring = astring_alloc();
18341836   for (in = get_input_port_list(), indef = get_input_port_list_defaults(); in->type != IPT_END; in++, indef++)
18351837
18361838      /* add if we match the group and we have a valid name */
r778r779
18421844         item->sortorder = item - itemlist;
18431845         item->type = port_type_is_analog(in->type) ? INPUT_TYPE_ANALOG : INPUT_TYPE_DIGITAL;
18441846         item->name = menu_string_pool_add(input_format[item->type], in->name);
1845         input_seq_name(item->seq, temp, sizeof(temp));
1846         item->seqname = menu_string_pool_add("%s", temp);
1847         item->seqname = menu_string_pool_add("%s", astring_c(input_seq_name(seqstring, item->seq)));
18471848         item->invert = input_seq_cmp(item->seq, item->defseq);
18481849         item++;
18491850
r778r779
18561857            item->sortorder = item - itemlist;
18571858            item->type = INPUT_TYPE_ANALOG_DEC;
18581859            item->name = menu_string_pool_add(input_format[item->type], in->name);
1859            input_seq_name(item->seq, temp, sizeof(temp));
1860            item->seqname = menu_string_pool_add("%s", temp);
1860            item->seqname = menu_string_pool_add("%s", astring_c(input_seq_name(seqstring, item->seq)));
18611861            item->invert = input_seq_cmp(item->seq, item->defseq);
18621862            item++;
18631863
r778r779
18671867            item->sortorder = item - itemlist;
18681868            item->type = INPUT_TYPE_ANALOG_INC;
18691869            item->name = menu_string_pool_add(input_format[item->type], in->name);
1870            input_seq_name(item->seq, temp, sizeof(temp));
1871            item->seqname = menu_string_pool_add("%s", temp);
1870            item->seqname = menu_string_pool_add("%s", astring_c(input_seq_name(seqstring, item->seq)));
18721871            item->invert = input_seq_cmp(item->seq, item->defseq);
18731872            item++;
18741873         }
18751874      }
18761875
18771876   /* return the number of items */
1877   astring_free(seqstring);
18781878   return item - itemlist;
18791879}
18801880
r778r779
18871887static int input_menu_get_game_items(input_item_data *itemlist)
18881888{
18891889   static const input_seq default_seq = SEQ_DEF_1(SEQCODE_DEFAULT);
1890   astring *seqstring = astring_alloc();
18901891   input_item_data *item = itemlist;
18911892   input_port_entry *in;
1892   char temp[100];
18931893
18941894   /* iterate over the input ports and add menu items */
18951895   for (in = Machine->input_ports; in->type != IPT_END; in++)
r778r779
19221922         item->sortorder = sortorder;
19231923         item->type = port_type_is_analog(in->type) ? INPUT_TYPE_ANALOG : INPUT_TYPE_DIGITAL;
19241924         item->name = menu_string_pool_add(input_format[item->type], name);
1925         input_seq_name(curseq, temp, sizeof(temp));
1926         item->seqname = menu_string_pool_add("%s", temp);
1925         item->seqname = menu_string_pool_add("%s", astring_c(input_seq_name(seqstring, curseq)));
19271926         item->invert = input_seq_cmp(curseq, defseq);
19281927         item++;
19291928
r778r779
19401939            item->sortorder = sortorder;
19411940            item->type = INPUT_TYPE_ANALOG_DEC;
19421941            item->name = menu_string_pool_add(input_format[item->type], name);
1943            input_seq_name(curseq, temp, sizeof(temp));
1944            item->seqname = menu_string_pool_add("%s", temp);
1942            item->seqname = menu_string_pool_add("%s", astring_c(input_seq_name(seqstring, curseq)));
19451943            item->invert = input_seq_cmp(curseq, defseq);
19461944            item++;
19471945
r778r779
19551953            item->sortorder = sortorder;
19561954            item->type = INPUT_TYPE_ANALOG_INC;
19571955            item->name = menu_string_pool_add(input_format[item->type], name);
1958            input_seq_name(curseq, temp, sizeof(temp));
1959            item->seqname = menu_string_pool_add("%s", temp);
1956            item->seqname = menu_string_pool_add("%s", astring_c(input_seq_name(seqstring, curseq)));
19601957            item->invert = input_seq_cmp(curseq, defseq);
19611958            item++;
19621959         }
r778r779
19641961   }
19651962
19661963   /* return the number of items */
1964   astring_free(seqstring);
19671965   return item - itemlist;
19681966}
19691967
src/emu/audit.c
r778r779
198198               {
199199                  file_error filerr;
200200                  mame_file *file;
201                  char *fname;
201                  astring *fname;
202202
203203                  /* attempt to access the file from the game driver name */
204                  fname = assemble_3_strings(gamedrv->name, PATH_SEPARATOR, intf->samplenames[sampnum]);
205                  filerr = mame_fopen(SEARCHPATH_SAMPLE, fname, OPEN_FLAG_READ, &file);
206                  free(fname);
204                  fname = astring_assemble_3(astring_alloc(), gamedrv->name, PATH_SEPARATOR, intf->samplenames[sampnum]);
205                  filerr = mame_fopen(SEARCHPATH_SAMPLE, astring_c(fname), OPEN_FLAG_READ, &file);
207206
208207                  /* attempt to access the file from the shared driver name */
209208                  if (filerr != FILERR_NONE && sharedname != NULL)
210209                  {
211                     fname = assemble_3_strings(sharedname, PATH_SEPARATOR, intf->samplenames[sampnum]);
212                     filerr = mame_fopen(SEARCHPATH_SAMPLE, fname, OPEN_FLAG_READ, &file);
213                     free(fname);
210                     astring_assemble_3(fname, sharedname, PATH_SEPARATOR, intf->samplenames[sampnum]);
211                     filerr = mame_fopen(SEARCHPATH_SAMPLE, astring_c(fname), OPEN_FLAG_READ, &file);
214212                  }
213                  astring_free(fname);
215214
216215                  /* fill in the record */
217216                  record->type = AUDIT_FILE_SAMPLE;
r778r779
366365   {
367366      file_error filerr;
368367      mame_file *file;
369      char *fname;
368      astring *fname;
370369
371370      /* open the file if we can */
372      fname = assemble_3_strings(drv->name, PATH_SEPARATOR, ROM_GETNAME(rom));
371      fname = astring_assemble_3(astring_alloc(), drv->name, PATH_SEPARATOR, ROM_GETNAME(rom));
373372       if (has_crc)
374         filerr = mame_fopen_crc(SEARCHPATH_ROM, fname, crc, OPEN_FLAG_READ, &file);
373         filerr = mame_fopen_crc(SEARCHPATH_ROM, astring_c(fname), crc, OPEN_FLAG_READ, &file);
375374      else
376         filerr = mame_fopen(SEARCHPATH_ROM, fname, OPEN_FLAG_READ, &file);
377      free(fname);
375         filerr = mame_fopen(SEARCHPATH_ROM, astring_c(fname), OPEN_FLAG_READ, &file);
376      astring_free(fname);
378377
379378      /* if we got it, extract the hash and length */
380379      if (filerr == FILERR_NONE)
r778r779
554553   {
555554      file_error filerr;
556555      mame_file *file;
557      char *fname;
556      astring *fname;
558557
559      fname = assemble_3_strings(drv->name, PATH_SEPARATOR, filename);
560      filerr = mame_fopen(SEARCHPATH_IMAGE, fname, OPEN_FLAG_READ, &file);
561      free(fname);
558      fname = astring_assemble_3(astring_alloc(), drv->name, PATH_SEPARATOR, filename);
559      filerr = mame_fopen(SEARCHPATH_IMAGE, astring_c(fname), OPEN_FLAG_READ, &file);
560      astring_free(fname);
562561
563562      if (filerr == FILERR_NONE)
564563         return (chd_interface_file *)file;
src/emu/video.c
r778r779
15561556   /* if we're past the "time-to-execute" requested, signal an exit */
15571557   if (global.seconds_to_run != 0 && emutime.seconds >= global.seconds_to_run)
15581558   {
1559      const char *fname = assemble_2_strings(Machine->basename, PATH_SEPARATOR "final.png");
1559      astring *fname = astring_assemble_2(astring_alloc(), Machine->basename, PATH_SEPARATOR "final.png");
15601560      file_error filerr;
15611561      mame_file *file;
15621562
15631563      /* create a final screenshot */
1564      filerr = mame_fopen(SEARCHPATH_SCREENSHOT, fname, OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS, &file);
1564      filerr = mame_fopen(SEARCHPATH_SCREENSHOT, astring_c(fname), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS, &file);
15651565      if (filerr == FILERR_NONE)
15661566      {
15671567         video_screen_save_snapshot(Machine, file, 0);
15681568         mame_fclose(file);
15691569      }
1570      free((void *)fname);
1570      astring_free(fname);
15711571
15721572      /* schedule our demise */
15731573      mame_schedule_exit(Machine);
src/emu/memory.c
r778r779
928928    read handler for X-bit case
929929-------------------------------------------------*/
930930
931void *_memory_install_read_handler(int cpunum, int spacenum, offs_t start, offs_t end, offs_t mask, offs_t mirror, int handler, const char *handler_name)
931void *_memory_install_read_handler(int cpunum, int spacenum, offs_t start, offs_t end, offs_t mask, offs_t mirror, FPTR handler, const char *handler_name)
932932{
933933   addrspace_data *space = &cpudata[cpunum].space[spacenum];
934934   if ((handler < 0) || (handler >= STATIC_COUNT))
935935      fatalerror("fatal: can only use static banks with memory_install_read_handler()");
936   install_mem_handler(space, 0, space->dbits, 0, start, end, mask, mirror, (genf *)handler, 0, handler_name);
936   install_mem_handler(space, 0, space->dbits, 0, start, end, mask, mirror, (genf *)(FPTR)handler, 0, handler_name);
937937   mem_dump();
938938   return memory_find_base(cpunum, spacenum, 0, SPACE_SHIFT(space, start));
939939}
r778r779
976976    write handler for X-bit case
977977-------------------------------------------------*/
978978
979void *_memory_install_write_handler(int cpunum, int spacenum, offs_t start, offs_t end, offs_t mask, offs_t mirror, int handler, const char *handler_name)
979void *_memory_install_write_handler(int cpunum, int spacenum, offs_t start, offs_t end, offs_t mask, offs_t mirror, FPTR handler, const char *handler_name)
980980{
981981   addrspace_data *space = &cpudata[cpunum].space[spacenum];
982982   if ((handler < 0) || (handler >= STATIC_COUNT))
r778r779
10251025    X-bit case
10261026-------------------------------------------------*/
10271027
1028void *_memory_install_read_matchmask_handler(int cpunum, int spacenum, offs_t matchval, offs_t maskval, offs_t mask, offs_t mirror, int handler, const char *handler_name)
1028void *_memory_install_read_matchmask_handler(int cpunum, int spacenum, offs_t matchval, offs_t maskval, offs_t mask, offs_t mirror, FPTR handler, const char *handler_name)
10291029{
10301030   addrspace_data *space = &cpudata[cpunum].space[spacenum];
10311031   if ((handler < 0) || (handler >= STATIC_COUNT))
r778r779
10741074    X-bit case
10751075-------------------------------------------------*/
10761076
1077void *_memory_install_write_matchmask_handler(int cpunum, int spacenum, offs_t matchval, offs_t maskval, offs_t mask, offs_t mirror, int handler, const char *handler_name)
1077void *_memory_install_write_matchmask_handler(int cpunum, int spacenum, offs_t matchval, offs_t maskval, offs_t mask, offs_t mirror, FPTR handler, const char *handler_name)
10781078{
10791079   addrspace_data *space = &cpudata[cpunum].space[spacenum];
10801080   if ((handler < 0) || (handler >= STATIC_COUNT))
src/emu/memory.h
r778r779
924924int         memory_get_log_unmap(int spacenum);
925925
926926/* ----- dynamic address space mapping ----- */
927void *      _memory_install_read_handler   (int cpunum, int spacenum, offs_t start, offs_t end, offs_t mask, offs_t mirror, int handler, const char *handler_name);
927void *      _memory_install_read_handler   (int cpunum, int spacenum, offs_t start, offs_t end, offs_t mask, offs_t mirror, FPTR handler, const char *handler_name);
928928UINT8 *      _memory_install_read8_handler  (int cpunum, int spacenum, offs_t start, offs_t end, offs_t mask, offs_t mirror, read8_handler handler, const char *handler_name);
929929UINT16 *   _memory_install_read16_handler (int cpunum, int spacenum, offs_t start, offs_t end, offs_t mask, offs_t mirror, read16_handler handler, const char *handler_name);
930930UINT32 *   _memory_install_read32_handler (int cpunum, int spacenum, offs_t start, offs_t end, offs_t mask, offs_t mirror, read32_handler handler, const char *handler_name);
931931UINT64 *   _memory_install_read64_handler (int cpunum, int spacenum, offs_t start, offs_t end, offs_t mask, offs_t mirror, read64_handler handler, const char *handler_name);
932void *      _memory_install_write_handler  (int cpunum, int spacenum, offs_t start, offs_t end, offs_t mask, offs_t mirror, int handler, const char *handler_name);
932void *      _memory_install_write_handler  (int cpunum, int spacenum, offs_t start, offs_t end, offs_t mask, offs_t mirror, FPTR handler, const char *handler_name);
933933UINT8 *      _memory_install_write8_handler (int cpunum, int spacenum, offs_t start, offs_t end, offs_t mask, offs_t mirror, write8_handler handler, const char *handler_name);
934934UINT16 *   _memory_install_write16_handler(int cpunum, int spacenum, offs_t start, offs_t end, offs_t mask, offs_t mirror, write16_handler handler, const char *handler_name);
935935UINT32 *   _memory_install_write32_handler(int cpunum, int spacenum, offs_t start, offs_t end, offs_t mask, offs_t mirror, write32_handler handler, const char *handler_name);
936936UINT64 *   _memory_install_write64_handler(int cpunum, int spacenum, offs_t start, offs_t end, offs_t mask, offs_t mirror, write64_handler handler, const char *handler_name);
937937
938void *      _memory_install_read_matchmask_handler   (int cpunum, int spacenum, offs_t matchval, offs_t maskval, offs_t mask, offs_t mirror, int handler, const char *handler_name);
938void *      _memory_install_read_matchmask_handler   (int cpunum, int spacenum, offs_t matchval, offs_t maskval, offs_t mask, offs_t mirror, FPTR handler, const char *handler_name);
939939UINT8 *      _memory_install_read8_matchmask_handler  (int cpunum, int spacenum, offs_t matchval, offs_t maskval, offs_t mask, offs_t mirror, read8_handler handler, const char *handler_name);
940940UINT16 *   _memory_install_read16_matchmask_handler (int cpunum, int spacenum, offs_t matchval, offs_t maskval, offs_t mask, offs_t mirror, read16_handler handler, const char *handler_name);
941941UINT32 *   _memory_install_read32_matchmask_handler (int cpunum, int spacenum, offs_t matchval, offs_t maskval, offs_t mask, offs_t mirror, read32_handler handler, const char *handler_name);
942942UINT64 *   _memory_install_read64_matchmask_handler (int cpunum, int spacenum, offs_t matchval, offs_t maskval, offs_t mask, offs_t mirror, read64_handler handler, const char *handler_name);
943void *      _memory_install_write_matchmask_handler  (int cpunum, int spacenum, offs_t matchval, offs_t maskval, offs_t mask, offs_t mirror, int handler, const char *handler_name);
943void *      _memory_install_write_matchmask_handler  (int cpunum, int spacenum, offs_t matchval, offs_t maskval, offs_t mask, offs_t mirror, FPTR handler, const char *handler_name);
944944UINT8 *      _memory_install_write8_matchmask_handler (int cpunum, int spacenum, offs_t matchval, offs_t maskval, offs_t mask, offs_t mirror, write8_handler handler, const char *handler_name);
945945UINT16 *   _memory_install_write16_matchmask_handler(int cpunum, int spacenum, offs_t matchval, offs_t maskval, offs_t mask, offs_t mirror, write16_handler handler, const char *handler_name);
946946UINT32 *   _memory_install_write32_matchmask_handler(int cpunum, int spacenum, offs_t matchval, offs_t maskval, offs_t mask, offs_t mirror, write32_handler handler, const char *handler_name);
src/emu/restrack.c
r778r779
1111
1212#include "restrack.h"
1313#include "pool.h"
14#include "timer.h"
15#include "state.h"
1416
1517
1618
r778r779
1820    TYPE DEFINITIONS
1921***************************************************************************/
2022
21typedef struct _callback_item callback_item;
22struct _callback_item
23typedef enum _memory_block_overlap memory_block_overlap;
24enum _memory_block_overlap
2325{
24   callback_item *   next;
25   void         (*free_resources)(void);
26   OVERLAP_NONE,
27   OVERLAP_PARTIAL,
28   OVERLAP_FULL
2629};
2730
2831
29typedef struct _bitmap_item bitmap_item;
30struct _bitmap_item
31{
32   bitmap_item *   next;
33   mame_bitmap *   bitmap;
34   int            tag;
35};
3632
37
38
3933/***************************************************************************
4034    GLOBAL VARIABLES
4135***************************************************************************/
4236
4337/* pool list */
44static memory_pool *pools[64];
45static bitmap_item *bitmaps[64];
38static object_pool *pools[64];
4639
4740/* resource tracking */
4841int resource_tracking_tag = 0;
4942
50/* free resource callbacks */
51static callback_item *free_resources_callback_list;
5243
5344
54
5545/***************************************************************************
5646    PROTOTYPES
5747***************************************************************************/
5848
59static void auto_bitmap_free(void);
49static void astring_destructor(void *object, size_t size);
50static void bitmap_destructor(void *object, size_t size);
51static memory_block_overlap pool_contains_block(object_pool *pool, void *ptr, size_t size, void **found_block, size_t *found_block_size);
6052
6153
6254
r778r779
6557***************************************************************************/
6658
6759/*-------------------------------------------------
68    _malloc_or_die - allocate memory or die
60    malloc_or_die_file_line - allocate memory or die
6961    trying
7062-------------------------------------------------*/
7163
72void *_malloc_or_die(size_t size, const char *file, int line)
64void *malloc_or_die_file_line(size_t size, const char *file, int line)
7365{
7466   void *result;
7567
r778r779
9789
9890
9991/*-------------------------------------------------
100    add_free_resources_callback - add a callback to
101    be invoked on end_resource_tracking()
102-------------------------------------------------*/
103
104void add_free_resources_callback(void (*callback)(void))
105{
106   callback_item *cb, **cur;
107
108   cb = malloc_or_die(sizeof(*cb));
109   cb->free_resources = callback;
110   cb->next = NULL;
111
112   for (cur = &free_resources_callback_list; *cur != NULL; cur = &(*cur)->next) ;
113   *cur = cb;
114}
115
116
117/*-------------------------------------------------
118    free_callback_list - free a list of callbacks
119-------------------------------------------------*/
120
121static void free_callback_list(callback_item **cb)
122{
123   while (*cb != NULL)
124   {
125      callback_item *temp = *cb;
126      *cb = (*cb)->next;
127      free(temp);
128   }
129}
130
131
132/*-------------------------------------------------
13392    init_resource_tracking - initialize the
13493    resource tracking system
13594-------------------------------------------------*/
r778r779
13796void init_resource_tracking(void)
13897{
13998   resource_tracking_tag = 0;
140   add_free_resources_callback(auto_bitmap_free);
14199}
142100
143101
r778r779
150108{
151109   while (resource_tracking_tag != 0)
152110      end_resource_tracking();
153   free_callback_list(&free_resources_callback_list);
154111}
155112
156113
r778r779
164121}
165122
166123
167
168124/*-------------------------------------------------
169125    begin_resource_tracking - start tracking
170126    resources
r778r779
172128
173129void begin_resource_tracking(void)
174130{
175   memory_pool *new_pool;
131   object_pool *new_pool;
176132
177133   /* sanity check */
178134   assert_always(resource_tracking_tag < ARRAY_LENGTH(pools), "Too many memory pools");
179135
180136   /* create a new pool */
181   new_pool = pool_create(memory_error);
137   new_pool = pool_alloc(memory_error);
182138   if (!new_pool)
183139      fatalerror("Failed to allocate new memory pool");
184140   pools[resource_tracking_tag] = new_pool;
185141
142   /* add resource types */
143   pool_type_register(new_pool, OBJTYPE_ASTRING, "String", astring_destructor);
144   pool_type_register(new_pool, OBJTYPE_BITMAP, "Bitmap", bitmap_destructor);
145   pool_type_register(new_pool, OBJTYPE_TIMER, "Timer", timer_destructor);
146   pool_type_register(new_pool, OBJTYPE_STATEREG, "Save State Registration", state_destructor);
147
186148   /* increment the tag counter */
187149   resource_tracking_tag++;
188150}
r778r779
195157
196158void end_resource_tracking(void)
197159{
198   callback_item *cb;
199
200   /* call everyone who tracks resources to let them know */
201   for (cb = free_resources_callback_list; cb; cb = cb->next)
202      (*cb->free_resources)();
203
204160   /* decrement the tag counter */
205161   resource_tracking_tag--;
206162
r778r779
215171    pool
216172-------------------------------------------------*/
217173
218static memory_pool *current_pool(void)
174static object_pool *current_pool(void)
219175{
220   memory_pool *pool;
176   object_pool *pool;
221177   assert_always((resource_tracking_tag > 0) && (resource_tracking_tag <= ARRAY_LENGTH(pools)), "Invalid resource_tracking_tag");
222178   pool = pools[resource_tracking_tag - 1];
223179   assert_always(pool != NULL, "current_pool() is NULL");
r778r779
226182
227183
228184/*-------------------------------------------------
229    auto_malloc - allocate auto-freeing memory
185    restrack_register_object - registers an
186    object with the current pool
230187-------------------------------------------------*/
231188
232void *_auto_malloc(size_t size, const char *file, int line)
189void *restrack_register_object(object_type type, void *ptr, size_t size, const char *file, int line)
233190{
191   return pool_object_add_file_line(current_pool(), type, ptr, size, file, line);
192}
193
194
195/*-------------------------------------------------
196    auto_malloc_file_line - allocate auto-
197    freeing memory
198-------------------------------------------------*/
199
200void *auto_malloc_file_line(size_t size, const char *file, int line)
201{
234202   return pool_malloc_file_line(current_pool(), size, file, line);
235203}
236204
237205
238206/*-------------------------------------------------
239    auto_realloc - reallocate auto-freeing memory
207    auto_realloc_file_line - reallocate auto-
208    freeing memory
240209-------------------------------------------------*/
241210
242void *_auto_realloc(void *ptr, size_t size, const char *file, int line)
211void *auto_realloc_file_line(void *ptr, size_t size, const char *file, int line)
243212{
244213   return pool_realloc_file_line(current_pool(), ptr, size, file, line);
245214}
246215
247216
248217/*-------------------------------------------------
249    auto_strdup - allocate auto-freeing string
218    auto_strdup_file_line - allocate auto-freeing
219    string
250220-------------------------------------------------*/
251221
252char *_auto_strdup(const char *str, const char *file, int line)
222char *auto_strdup_file_line(const char *str, const char *file, int line)
253223{
254224   return pool_strdup_file_line(current_pool(), str, file, line);
255225}
256226
257227
258228/*-------------------------------------------------
259    auto_strdup_allow_null - allocate auto-freeing
260    string if str is null
229    auto_strdup_allow_null_file_line - allocate
230    auto-freeing string if str is null
261231-------------------------------------------------*/
262232
263char *_auto_strdup_allow_null(const char *str, const char *file, int line)
233char *auto_strdup_allow_null_file_line(const char *str, const char *file, int line)
264234{
265   return (str != NULL) ? _auto_strdup(str, file, line) : NULL;
235   return (str != NULL) ? auto_strdup_file_line(str, file, line) : NULL;
266236}
267237
268238
269239/*-------------------------------------------------
270    auto_bitmap_alloc - allocate auto-freeing
271    bitmap
240    auto_astring_alloc_file_line - allocate
241    auto-freeing astring
272242-------------------------------------------------*/
273243
274bitmap_t *auto_bitmap_alloc(int width, int height, bitmap_format format)
244astring *auto_astring_alloc_file_line(const char *file, int line)
275245{
276   bitmap_item *item = malloc_or_die(sizeof(*item));
277
278   assert_always(resource_tracking_tag > 0 && resource_tracking_tag <= ARRAY_LENGTH(bitmaps), "Invalid resource_tracking_tag");
279
280   /* fill in the data */
281   item->bitmap = bitmap_alloc(width, height, format);
282   if (item->bitmap == NULL)
283      memory_error("Unable to allocate bitmap");
284   item->tag = resource_tracking_tag;
285
286   /* link us in */
287   item->next = bitmaps[item->tag - 1];
288   bitmaps[item->tag - 1] = item;
289
290   /* return a pointer to the bitmap */
291   return item->bitmap;
246   return restrack_register_object(OBJTYPE_ASTRING, astring_alloc(), 0, file, line);
292247}
293248
294249
295250/*-------------------------------------------------
296    auto_bitmap_free - automatically free bitmaps
251    auto_bitmap_alloc_file_line - allocate
252    auto-freeing bitmap
297253-------------------------------------------------*/
298254
299static void auto_bitmap_free(void)
255bitmap_t *auto_bitmap_alloc_file_line(int width, int height, bitmap_format format, const char *file, int line)
300256{
301   bitmap_item *item, *next;
302
303   assert_always(resource_tracking_tag > 0 && resource_tracking_tag <= ARRAY_LENGTH(bitmaps), "Invalid resource_tracking_tag");
304
305   /* loop over items */
306   for (item = bitmaps[resource_tracking_tag - 1]; item != NULL; item = next)
307   {
308      next = item->next;
309      bitmap_free(item->bitmap);
310      free(item);
311   }
312   bitmaps[resource_tracking_tag - 1] = NULL;
257   return restrack_register_object(OBJTYPE_BITMAP, bitmap_alloc(width, height, format), width * height, file, line);
313258}
314259
315260
r778r779
320265
321266void validate_auto_malloc_memory(void *memory, size_t memory_size)
322267{
323   int i;
324268   memory_block_overlap overlap = OVERLAP_NONE;
325269   void *block_base = NULL;
326270   size_t block_size = 0;
271   int i;
327272
328   for (i = 0; (overlap == OVERLAP_NONE) && (i < resource_tracking_tag); i++)
329   {
330      overlap = pool_contains_block(pools[i], memory, memory_size,
331         &block_base, &block_size);
332   }
273   /* scan all pools for an overlapping block */
274   for (i = 0; overlap == OVERLAP_NONE && i < resource_tracking_tag; i++)
275      overlap = pool_contains_block(pools[i], memory, memory_size, &block_base, &block_size);
333276
334   switch(overlap)
277   /* fatal error if not a full overlap */
278   switch (overlap)
335279   {
336280      case OVERLAP_NONE:
337         fatalerror("Memory block [0x%p-0x%p] not found",
338            memory,
339            ((UINT8 *) memory) + memory_size - 1);
281         fatalerror("Memory block [0x%p-0x%p] not found", memory, (UINT8 *)memory + memory_size - 1);
340282         break;
341283
342284      case OVERLAP_PARTIAL:
343         fatalerror("Memory block [0x%p-0x%p] partially overlaps with allocated block [0x%p-0x%p]",
344            memory,
345            ((UINT8 *) memory) + memory_size - 1,
346            block_base,
347            ((UINT8 *) block_base) + block_size - 1);
285         fatalerror("Memory block [0x%p-0x%p] partially overlaps with allocated block [0x%p-0x%p]", memory, (UINT8 *)memory + memory_size - 1, block_base, (UINT8 *)block_base + block_size - 1);
348286         break;
349287
350288      case OVERLAP_FULL:
r778r779
352290         break;
353291   }
354292}
293
294
295/*-------------------------------------------------
296    astring_destructor - destructor for astring
297    objects
298-------------------------------------------------*/
299
300static void astring_destructor(void *object, size_t size)
301{
302   astring_free(object);
303}
304
305
306/*-------------------------------------------------
307    bitmap_destructor - destructor for bitmap
308    objects
309-------------------------------------------------*/
310
311static void bitmap_destructor(void *object, size_t size)
312{
313   bitmap_free(object);
314}
315
316
317/*-------------------------------------------------
318    pool_contains_block - determines if a pool
319    contains a memory block
320-------------------------------------------------*/
321
322static memory_block_overlap pool_contains_block(object_pool *pool, void *ptr, size_t size, void **found_block, size_t *found_block_size)
323{
324   memory_block_overlap overlap = OVERLAP_NONE;
325   object_pool_iterator *iter;
326   UINT8 *ptrstart = ptr;
327   UINT8 *ptrend = ptrstart + size - 1;
328   void *blockptr = NULL;
329   size_t blocksize = 0;
330
331   /* iterate over memory objects in the pool */
332   for (iter = pool_iterate_begin(pool, OBJTYPE_MEMORY); iter != NULL && pool_iterate_next(iter, &blockptr, &blocksize,  NULL); )
333   {
334      int startwithin = (ptrstart >= (UINT8 *)blockptr && ptrstart < (UINT8 *)blockptr + blocksize);
335      int endwithin = (ptrend >= (UINT8 *)blockptr && ptrend < (UINT8 *)blockptr + blocksize);
336
337      /* if the start of the incoming pointer lies within the block... */
338      if (startwithin || endwithin)
339      {
340         overlap = (startwithin && endwithin) ? OVERLAP_FULL : OVERLAP_PARTIAL;
341         break;
342      }
343   }
344   pool_iterate_end(iter);
345
346   /* store the results */
347   if (overlap != OVERLAP_NONE)
348   {
349      if (found_block != NULL)
350         *found_block = blockptr;
351      if (found_block_size != NULL)
352         *found_block_size = blocksize;
353   }
354   return overlap;
355}
src/emu/mame.c
r778r779
140140   UINT8         hard_reset_pending;
141141   UINT8         exit_pending;
142142   const game_driver *new_driver_pending;
143   char *         saveload_pending_file;
143   astring *      saveload_pending_file;
144144   mame_timer *   soft_reset_timer;
145145   mame_file *      logfile;
146146
r778r779
244244
245245extern int mame_validitychecks(const game_driver *driver);
246246
247static void parse_ini_files(core_options *options, const game_driver *driver);
248247static void parse_ini_file(const char *name);
249248
250249static running_machine *create_machine(const game_driver *driver);
r778r779
282281   {
283282      const game_driver *driver;
284283      running_machine *machine;
285      const char *gamename;
286284      mame_private *mame;
287285      callback_item *cb;
286      astring *gamename;
288287
289288      /* convert the specified gamename to a driver */
290      gamename = core_filename_extract_base(options_get_string(mame_options(), OPTION_GAMENAME), TRUE);
291      driver = driver_get_name(gamename);
292      free((void *)gamename);
289      gamename = core_filename_extract_base(astring_alloc(), options_get_string(mame_options(), OPTION_GAMENAME), TRUE);
290      driver = driver_get_name(astring_c(gamename));
291      astring_free(gamename);
293292
294293      /* if no driver, use the internal empty driver */
295294      if (driver == NULL)
r778r779
306305
307306      /* parse any INI files as the first thing */
308307      options_revert(mame_options(), OPTION_PRIORITY_INI);
309      parse_ini_files(mame_options(), driver);
308      mame_parse_ini_files(mame_options(), driver);
310309
311310      /* create the machine structure and driver */
312311      machine = create_machine(driver);
r778r779
320319      Machine = machine;
321320
322321      init_resource_tracking();
323      add_free_resources_callback(timer_free);
324      add_free_resources_callback(state_save_free);
325322
326323      /* use setjmp/longjmp for deep error recovery */
327324      mame->fatal_error_jmpbuf_valid = TRUE;
r778r779
631628
632629   /* free any existing request and allocate a copy of the requested name */
633630   if (mame->saveload_pending_file != NULL)
634      free(mame->saveload_pending_file);
635   mame->saveload_pending_file = assemble_4_strings(machine->basename, PATH_SEPARATOR, filename, ".sta");
631      astring_free(mame->saveload_pending_file);
632   mame->saveload_pending_file = astring_assemble_4(astring_alloc(), machine->basename, PATH_SEPARATOR, filename, ".sta");
636633
637634   /* note the start time and set a timer for the next timeslice to actually schedule it */
638635   mame->saveload_schedule_callback = handle_save;
r778r779
654651
655652   /* free any existing request and allocate a copy of the requested name */
656653   if (mame->saveload_pending_file != NULL)
657      free(mame->saveload_pending_file);
658   mame->saveload_pending_file = assemble_4_strings(machine->basename, PATH_SEPARATOR, filename, ".sta");
654      astring_free(mame->saveload_pending_file);
655   mame->saveload_pending_file = astring_assemble_4(astring_alloc(), machine->basename, PATH_SEPARATOR, filename, ".sta");
659656
660657   /* note the start time and set a timer for the next timeslice to actually schedule it */
661658   mame->saveload_schedule_callback = handle_load;
r778r779
12271224***************************************************************************/
12281225
12291226/*-------------------------------------------------
1230    parse_ini_files - parse the relevant INI files
1231    and apply their options
1227    mame_parse_ini_files - parse the relevant INI
1228    files and apply their options
12321229-------------------------------------------------*/
12331230
1234static void parse_ini_files(core_options *options, const game_driver *driver)
1231void mame_parse_ini_files(core_options *options, const game_driver *driver)
12351232{
12361233   /* parse the INI file defined by the platform (e.g., "mame.ini") */
12371234   parse_ini_file(CONFIGNAME);
r778r779
12461243   {
12471244      const game_driver *parent = driver_get_clone(driver);
12481245      const game_driver *gparent = (parent != NULL) ? driver_get_clone(parent) : NULL;
1249      const char *sourcename;
1246      astring *sourcename;
12501247      machine_config drv;
12511248
12521249      /* expand the machine driver to look at the info */
r778r779
12571254         parse_ini_file("vector");
12581255
12591256      /* then parse "<sourcefile>.ini" */
1260      sourcename = core_filename_extract_base(driver->source_file, TRUE);
1261      parse_ini_file(sourcename);
1262      free((void *)sourcename);
1257      sourcename = core_filename_extract_base(astring_alloc(), driver->source_file, TRUE);
1258      parse_ini_file(astring_c(sourcename));
1259      astring_free(sourcename);
12631260
12641261      /* then parent the grandparent, parent, and game-specific INIs */
12651262      if (gparent != NULL)
r778r779
12791276{
12801277   file_error filerr;
12811278   mame_file *file;
1282   char *fname;
1279   astring *fname;
12831280
12841281   /* don't parse if it has been disabled */
12851282   if (!options_get_bool(mame_options(), OPTION_READCONFIG))
12861283      return;
12871284
12881285   /* open the file; if we fail, that's ok */
1289   fname = assemble_2_strings(name, ".ini");
1290   filerr = mame_fopen(SEARCHPATH_INI, fname, OPEN_FLAG_READ, &file);
1291   free(fname);
1286   fname = astring_assemble_2(astring_alloc(), name, ".ini");
1287   filerr = mame_fopen(SEARCHPATH_INI, astring_c(fname), OPEN_FLAG_READ, &file);
1288   astring_free(fname);
12921289   if (filerr != FILERR_NONE)
12931290      return;
12941291
r778r779
16261623   }
16271624
16281625   /* open the file */
1629   filerr = mame_fopen(SEARCHPATH_STATE, mame->saveload_pending_file, OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS, &file);
1626   filerr = mame_fopen(SEARCHPATH_STATE, astring_c(mame->saveload_pending_file), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS, &file);
16301627   if (filerr == FILERR_NONE)
16311628   {
16321629      int cpunum;
r778r779
16751672
16761673cancel:
16771674   /* unschedule the save */
1678   free(mame->saveload_pending_file);
1675   astring_free(mame->saveload_pending_file);
16791676   mame->saveload_pending_file = NULL;
16801677   mame->saveload_schedule_callback = NULL;
16811678}
r778r779
17121709   }
17131710
17141711   /* open the file */
1715   filerr = mame_fopen(SEARCHPATH_STATE, mame->saveload_pending_file, OPEN_FLAG_READ, &file);
1712   filerr = mame_fopen(SEARCHPATH_STATE, astring_c(mame->saveload_pending_file), OPEN_FLAG_READ, &file);
17161713   if (filerr == FILERR_NONE)
17171714   {
17181715      /* start loading */
r778r779
17571754
17581755cancel:
17591756   /* unschedule the load */
1760   free(mame->saveload_pending_file);
1757   astring_free(mame->saveload_pending_file);
17611758   mame->saveload_pending_file = NULL;
17621759   mame->saveload_schedule_callback = NULL;
17631760}
src/emu/inptport.c
r778r779
17801780
17811781static void add_sequence(xml_data_node *parentnode, int type, int porttype, const input_seq *seq)
17821782{
1783   astring *seqstring = astring_alloc();
17831784   xml_data_node *seqnode;
1784   char seqbuffer[256];
17851785
17861786   /* get the string for the sequence */
17871787   if (input_seq_get_1(seq) == SEQCODE_END)
1788      strcpy(seqbuffer, "NONE");
1788      astring_cpyc(seqstring, "NONE");
17891789   else
1790      input_seq_to_tokens(seq, seqbuffer, sizeof(seqbuffer));
1790      input_seq_to_tokens(seqstring, seq);
17911791
17921792   /* add the new node */
1793   seqnode = xml_add_child(parentnode, "newseq", seqbuffer);
1793   seqnode = xml_add_child(parentnode, "newseq", astring_c(seqstring));
17941794   if (seqnode)
17951795      xml_set_attribute(seqnode, "type", seqtypestrings[type]);
1796   astring_free(seqstring);
17961797}
17971798
17981799
src/emu/restrack.h
r778r779
1313#define __RESTRACK_H__
1414
1515#include "mamecore.h"
16#include "pool.h"
17#include "astring.h"
1618
1719
1820/***************************************************************************
21    MACROS
22***************************************************************************/
23
24#define OBJTYPE_ASTRING               OBJECT_TYPE('a','s','t','r')
25#define OBJTYPE_BITMAP               OBJECT_TYPE('b','i','t','m')
26#define OBJTYPE_TIMER               OBJECT_TYPE('t','i','m','r')
27#define OBJTYPE_STATEREG            OBJECT_TYPE('s','t','a','t')
28
29
30
31/***************************************************************************
1932    FUNCTION PROTOTYPES
2033***************************************************************************/
2134
22/* add a callback to be invoked on end_resource_tracking() */
23void add_free_resources_callback(void (*callback)(void));
24
2535/* initialize the resource tracking system */
2636void init_resource_tracking(void);
2737
r778r779
3444/* stop tracking resources and free everything since the last begin */
3545void end_resource_tracking(void);
3646
47/* register an object with the current pool */
48void *restrack_register_object(object_type type, void *ptr, size_t size, const char *file, int line);
49
3750/* validate that a block of memory has been allocated by auto_malloc() */
3851void validate_auto_malloc_memory(void *memory, size_t memory_size);
3952
r778r779
4659
4760
4861/* allocate memory and fatalerror if there's a problem */
49#define malloc_or_die(s)   _malloc_or_die(s, __FILE__, __LINE__)
50void *_malloc_or_die(size_t size, const char *file, int line) ATTR_MALLOC;
62#define malloc_or_die(s)         malloc_or_die_file_line(s, __FILE__, __LINE__)
63void *malloc_or_die_file_line(size_t size, const char *file, int line) ATTR_MALLOC;
5164
5265/* allocate memory that will be freed at the next end_resource_tracking */
53#define auto_malloc(s)      _auto_malloc(s, __FILE__, __LINE__)
54void *_auto_malloc(size_t size, const char *file, int line) ATTR_MALLOC;
66#define auto_malloc(s)            auto_malloc_file_line(s, __FILE__, __LINE__)
67void *auto_malloc_file_line(size_t size, const char *file, int line) ATTR_MALLOC;
5568
5669/* allocate memory that will be freed at the next end_resource_tracking */
57#define auto_realloc(p, s)   _auto_realloc(p, s, __FILE__, __LINE__)
58void *_auto_realloc(void *ptr, size_t size, const char *file, int line) ATTR_MALLOC;
70#define auto_realloc(p, s)         auto_realloc_file_line(p, s, __FILE__, __LINE__)
71void *auto_realloc_file_line(void *ptr, size_t size, const char *file, int line) ATTR_MALLOC;
5972
6073/* allocate memory and duplicate a string that will be freed at the next end_resource_tracking */
61#define auto_strdup(s)      _auto_strdup(s, __FILE__, __LINE__)
62char *_auto_strdup(const char *str, const char *file, int line) ATTR_MALLOC;
74#define auto_strdup(s)            auto_strdup_file_line(s, __FILE__, __LINE__)
75char *auto_strdup_file_line(const char *str, const char *file, int line) ATTR_MALLOC;
6376
6477/* auto_strdup() variant that tolerates NULL */
65#define auto_strdup_allow_null(s)   _auto_strdup_allow_null(s, __FILE__, __LINE__)
66char *_auto_strdup_allow_null(const char *str, const char *file, int line) ATTR_MALLOC;
78#define auto_strdup_allow_null(s)   auto_strdup_allow_null_file_line(s, __FILE__, __LINE__)
79char *auto_strdup_allow_null_file_line(const char *str, const char *file, int line) ATTR_MALLOC;
6780
68/* allocate a bitmap that will be f reed at the next end_resource_tracking */
69bitmap_t *auto_bitmap_alloc(int width, int height, bitmap_format format);
81/* allocate a bitmap that will be freed at the next end_resource_tracking */
82#define auto_astring_alloc()      auto_astring_alloc_file_line(__FILE__, __LINE__)
83astring *auto_astring_alloc_file_line(const char *file, int line);
7084
85/* allocate a bitmap that will be freed at the next end_resource_tracking */
86#define auto_bitmap_alloc(w,h,f)   auto_bitmap_alloc_file_line(w, h, f, __FILE__, __LINE__)
87bitmap_t *auto_bitmap_alloc_file_line(int width, int height, bitmap_format format, const char *file, int line);
7188
89
7290#endif /* __RESTRACK_H__ */
src/emu/machine/generic.c
r778r779
265265{
266266   file_error filerr;
267267   mame_file *file;
268   char *fname;
268   astring *fname;
269269
270   fname = assemble_2_strings(machine->basename, ".nv");
271   filerr = mame_fopen(SEARCHPATH_NVRAM, fname, openflags, &file);
272   free(fname);
270   fname = astring_assemble_2(astring_alloc(), machine->basename, ".nv");
271   filerr = mame_fopen(SEARCHPATH_NVRAM, astring_c(fname), openflags, &file);
272   astring_free(fname);
273273
274274   return (filerr == FILERR_NONE) ? file : NULL;
275275}
r778r779
388388{
389389   file_error filerr;
390390   mame_file *file;
391   char *fname;
391   astring *fname;
392392   char name[16];
393393
394394   /* create a name */
395395   memcard_name(index, name);
396396
397397   /* if we can't overwrite, fail if the file already exists */
398   fname = assemble_3_strings(Machine->basename, PATH_SEPARATOR, name);
398   fname = astring_assemble_3(astring_alloc(), Machine->basename, PATH_SEPARATOR, name);
399399   if (!overwrite)
400400   {
401      filerr = mame_fopen(SEARCHPATH_MEMCARD, fname, OPEN_FLAG_READ, &file);
401      filerr = mame_fopen(SEARCHPATH_MEMCARD, astring_c(fname), OPEN_FLAG_READ, &file);
402402      if (filerr == FILERR_NONE)
403403      {
404404         mame_fclose(file);
405         free(fname);
405         astring_free(fname);
406406         return 1;
407407      }
408408   }
409409
410410   /* create a new file */
411   filerr = mame_fopen(SEARCHPATH_MEMCARD, fname, OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS, &file);
412   free(fname);
411   filerr = mame_fopen(SEARCHPATH_MEMCARD, astring_c(fname), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS, &file);
412   astring_free(fname);
413413   if (filerr != FILERR_NONE)
414414      return 1;
415415
r778r779
433433   file_error filerr;
434434   mame_file *file;
435435   char name[16];
436   char *fname;
436   astring *fname;
437437
438438   /* if a card is already inserted, eject it first */
439439   if (memcard_inserted != -1)
r778r779
442442
443443   /* create a name */
444444   memcard_name(index, name);
445   fname = assemble_3_strings(Machine->basename, PATH_SEPARATOR, name);
445   fname = astring_assemble_3(astring_alloc(), Machine->basename, PATH_SEPARATOR, name);
446446
447447   /* open the file; if we can't, it's an error */
448   filerr = mame_fopen(SEARCHPATH_MEMCARD, fname, OPEN_FLAG_READ, &file);
449   free(fname);
448   filerr = mame_fopen(SEARCHPATH_MEMCARD, astring_c(fname), OPEN_FLAG_READ, &file);
449   astring_free(fname);
450450   if (filerr != FILERR_NONE)
451451      return 1;
452452
r778r779
471471   file_error filerr;
472472   mame_file *file;
473473   char name[16];
474   char *fname;
474   astring *fname;
475475
476476   /* if no card is preset, just ignore */
477477   if (memcard_inserted == -1)
r778r779
479479
480480   /* create a name */
481481   memcard_name(memcard_inserted, name);
482   fname = assemble_3_strings(Machine->basename, PATH_SEPARATOR, name);
482   fname = astring_assemble_3(astring_alloc(), Machine->basename, PATH_SEPARATOR, name);
483483
484484   /* open the file; if we can't, it's an error */
485   filerr = mame_fopen(SEARCHPATH_MEMCARD, fname, OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS, &file);
486   free(fname);
485   filerr = mame_fopen(SEARCHPATH_MEMCARD, astring_c(fname), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS, &file);
486   astring_free(fname);
487487   if (filerr != FILERR_NONE)
488488   {
489489      mame_fclose(file);
src/emu/mame.h
r778r779
358358/* adds a callback to be called on logerror() */
359359void add_logerror_callback(running_machine *machine, void (*callback)(running_machine *, const char *));
360360
361/* parse the configured INI files */
362void mame_parse_ini_files(core_options *options, const game_driver *driver);
363
361364/* standardized random number generator */
362365UINT32 mame_rand(running_machine *machine);
363366
src/emu/inptport.h
r778r779
615615
616616/* single pointers and UINT32s are just encoded straight */
617617#define INPUT_PORT_PTR(x)            ((input_port_token)(x))
618#define INPUT_PORT_UINT32(x)         ((input_port_token)(UINT32)(x))
618#define INPUT_PORT_UINT32(x)         ((input_port_token)(UINT32)(FPTR)(x))
619619
620620#ifdef PTR64
621621/* on 64-bit platforms, pairs of UINT32s are encoded into a single 64-bit pointer */
src/emu/rendutil.c
r778r779
562562   file_error filerr;
563563   mame_file *file;
564564   png_info png;
565   const char *fname;
565   astring *fname;
566566   png_error result;
567567
568568   /* open the file */
569   fname = (dirname == NULL) ? filename : assemble_3_strings(dirname, PATH_SEPARATOR, filename);
570   filerr = mame_fopen(SEARCHPATH_ARTWORK, fname, OPEN_FLAG_READ, &file);
571   if (fname != filename)
572      free((void *)fname);
569   if (dirname == NULL)
570      fname = astring_dupc(filename);
571   else
572      fname = astring_assemble_3(astring_alloc(), dirname, PATH_SEPARATOR, filename);
573   filerr = mame_fopen(SEARCHPATH_ARTWORK, astring_c(fname), OPEN_FLAG_READ, &file);
574   astring_free(fname);
573575   if (filerr != FILERR_NONE)
574576      return NULL;
575577
src/emu/rendlay.c
r778r779
111111   COMPONENT_TYPE_LED7SEG,
112112   COMPONENT_TYPE_LED14SEG,
113113   COMPONENT_TYPE_LED16SEG,
114   COMPONENT_TYPE_LED14SEGSC,
115   COMPONENT_TYPE_LED16SEGSC,
114116   COMPONENT_TYPE_MAX
115117};
116118
r778r779
149151static void layout_element_draw_led7seg(mame_bitmap *dest, const rectangle *bounds, const render_color *color, int state);
150152static void layout_element_draw_led14seg(mame_bitmap *dest, const rectangle *bounds, const render_color *color, int state);
151153static void layout_element_draw_led16seg(mame_bitmap *dest, const rectangle *bounds, const render_color *color, int state);
154static void layout_element_draw_led14segsc(mame_bitmap *dest, const rectangle *bounds, const render_color *color, int state);
155static void layout_element_draw_led16segsc(mame_bitmap *dest, const rectangle *bounds, const render_color *color, int state);
152156
153157/* layout file parsing */
154158static layout_element *load_layout_element(xml_data_node *elemnode, const char *dirname);
r778r779
410414               layout_element_draw_led16seg(dest, &bounds, &component->color, elemtex->state);
411415               break;
412416
417            case COMPONENT_TYPE_LED14SEGSC:
418               layout_element_draw_led14segsc(dest, &bounds, &component->color, elemtex->state);
419               break;
420
421            case COMPONENT_TYPE_LED16SEGSC:
422               layout_element_draw_led16segsc(dest, &bounds, &component->color, elemtex->state);
423               break;
413424         }
414425      }
415426}
r778r779
752763   }
753764}
754765
766/*-------------------------------------------------
767    draw_segment_comma - draw a comma tail
768-------------------------------------------------*/
769#if 0
770static void draw_segment_comma(mame_bitmap *dest, int minx, int maxx, int miny, int maxy, int width, rgb_t color)
771{
772   int x, y;
773   float ratio;
755774
775   /* compute parameters */
776   width *= 1.5;
777   ratio = (maxy - miny - width) / (float)(maxx - minx);
778
779   /* draw line */
780   for (x = minx; x < maxx; x++)
781   {
782      UINT32 *d = BITMAP_ADDR32(dest, 0, x);
783      int step = (x - minx) * ratio;
784
785      for (y = maxy; y < maxy  - width - step; y--)
786      {
787         d[y * dest->rowpixels] = color;
788      }
789   }
790}
791#endif
792
793
756794/*-------------------------------------------------
757795    apply_skew - apply skew to a mame_bitmap
758796-------------------------------------------------*/
r778r779
831869
832870/*-------------------------------------------------
833871    layout_element_draw_led14seg - draw a
834    16-segment LCD
872    14-segment LCD
835873-------------------------------------------------*/
836874
837875static void layout_element_draw_led14seg(mame_bitmap *dest, const rectangle *bounds, const render_color *color, int pattern)
r778r779
934972   bitmap_free(tempbitmap);
935973}
936974
975/*-------------------------------------------------
976    layout_element_draw_led14segsc - draw a
977    14-segment LCD with semicolon (2 extra segments)
978-------------------------------------------------*/
937979
980static void layout_element_draw_led14segsc(mame_bitmap *dest, const rectangle *bounds, const render_color *color, int pattern)
981{
982   const rgb_t onpen = MAKE_ARGB(0xff, 0xff, 0xff, 0xff);
983   const rgb_t offpen = MAKE_ARGB(0xff, 0x20, 0x20, 0x20);
984   int bmwidth, bmheight, segwidth, skewwidth;
985   mame_bitmap *tempbitmap;
986
987   /* sizes for computation */
988   bmwidth = 250;
989   bmheight = 400;
990   segwidth = 40;
991   skewwidth = 40;
992
993   /* allocate a temporary bitmap for drawing, adding some extra space for the tail */
994   tempbitmap = bitmap_alloc(bmwidth + skewwidth, bmheight + segwidth, BITMAP_FORMAT_ARGB32);
995   fillbitmap(tempbitmap, MAKE_ARGB(0xff, 0x00, 0x00, 0x00), NULL);
996
997   /* top bar */
998   draw_segment_horizontal(tempbitmap,
999      0 + 2*segwidth/3, bmwidth - 2*segwidth/3, 0 + segwidth/2,
1000      segwidth, (pattern & (1 << 0)) ? onpen : offpen);
1001
1002   /* right-top bar */
1003   draw_segment_vertical(tempbitmap,
1004      0 + 2*segwidth/3, bmheight/2 - segwidth/3, bmwidth - segwidth/2,
1005      segwidth, (pattern & (1 << 1)) ? onpen : offpen);
1006
1007   /* right-bottom bar */
1008   draw_segment_vertical(tempbitmap,
1009      bmheight/2 + segwidth/3, bmheight - 2*segwidth/3, bmwidth - segwidth/2,
1010      segwidth, (pattern & (1 << 2)) ? onpen : offpen);
1011
1012   /* bottom bar */
1013   draw_segment_horizontal(tempbitmap,
1014      0 + 2*segwidth/3, bmwidth - 2*segwidth/3, bmheight - segwidth/2,
1015      segwidth, (pattern & (1 << 3)) ? onpen : offpen);
1016
1017   /* left-bottom bar */
1018   draw_segment_vertical(tempbitmap,
1019      bmheight/2 + segwidth/3, bmheight - 2*segwidth/3, 0 + segwidth/2,
1020      segwidth, (pattern & (1 << 4)) ? onpen : offpen);
1021
1022   /* left-top bar */
1023   draw_segment_vertical(tempbitmap,
1024      0 + 2*segwidth/3, bmheight/2 - segwidth/3, 0 + segwidth/2,
1025      segwidth, (pattern & (1 << 5)) ? onpen : offpen);
1026
1027   /* horizontal-middle-left bar */
1028   draw_segment_horizontal_caps(tempbitmap,
1029      0 + 2*segwidth/3, bmwidth/2 - segwidth/10, bmheight/2,
1030      segwidth, LINE_CAP_START, (pattern & (1 << 6)) ? onpen : offpen);
1031
1032   /* horizontal-middle-right bar */
1033   draw_segment_horizontal_caps(tempbitmap,
1034      0 + bmwidth/2 + segwidth/10, bmwidth - 2*segwidth/3, bmheight/2,
1035      segwidth, LINE_CAP_END, (pattern & (1 << 7)) ? onpen : offpen);
1036
1037   /* vertical-middle-top bar */
1038   draw_segment_vertical_caps(tempbitmap,
1039      0 + segwidth + segwidth/3, bmheight/2 - segwidth/2 - segwidth/3, bmwidth/2,
1040      segwidth, LINE_CAP_NONE, (pattern & (1 << 8)) ? onpen : offpen);
1041
1042   /* vertical-middle-bottom bar */
1043   draw_segment_vertical_caps(tempbitmap,
1044      bmheight/2 + segwidth/2 + segwidth/3, bmheight - segwidth - segwidth/3, bmwidth/2,
1045      segwidth, LINE_CAP_NONE, (pattern & (1 << 9)) ? onpen : offpen);
1046
1047   /* diagonal-left-bottom bar */
1048   draw_segment_diagonal_1(tempbitmap,
1049      0 + segwidth + segwidth/5, bmwidth/2 - segwidth/2 - segwidth/5,
1050      bmheight/2 + segwidth/2 + segwidth/3, bmheight - segwidth - segwidth/3,
1051      segwidth, (pattern & (1 << 10)) ? onpen : offpen);
1052
1053   /* diagonal-left-top bar */
1054   draw_segment_diagonal_2(tempbitmap,
1055      0 + segwidth + segwidth/5, bmwidth/2 - segwidth/2 - segwidth/5,
1056      0 + segwidth + segwidth/3, bmheight/2 - segwidth/2 - segwidth/3,
1057      segwidth, (pattern & (1 << 11)) ? onpen : offpen);
1058
1059   /* diagonal-right-top bar */
1060   draw_segment_diagonal_1(tempbitmap,
1061      bmwidth/2 + segwidth/2 + segwidth/5, bmwidth - segwidth - segwidth/5,
1062      0 + segwidth + segwidth/3, bmheight/2 - segwidth/2 - segwidth/3,
1063      segwidth, (pattern & (1 << 12)) ? onpen : offpen);
1064
1065   /* diagonal-right-bottom bar */
1066   draw_segment_diagonal_2(tempbitmap,
1067      bmwidth/2 + segwidth/2 + segwidth/5, bmwidth - segwidth - segwidth/5,
1068      bmheight/2 + segwidth/2 + segwidth/3, bmheight - segwidth - segwidth/3,
1069      segwidth, (pattern & (1 << 13)) ? onpen : offpen);
1070
1071   /* apply skew */
1072   apply_skew(tempbitmap, 40);
1073
1074   /* decimal point */
1075   draw_segment_decimal(tempbitmap, bmwidth + segwidth/2, bmheight - segwidth/2, segwidth, (pattern & (1 << 14)) ? onpen : offpen);
1076
1077   /* comma tail */
1078   draw_segment_diagonal_1(tempbitmap,
1079      bmwidth - (segwidth/2), bmwidth + segwidth,
1080      bmheight - (segwidth), bmheight + segwidth*1.5,
1081      segwidth/2, (pattern & (1 << 15)) ? onpen : offpen);
1082
1083   /* resample to the target size */
1084   render_resample_argb_bitmap_hq(dest->base, dest->rowpixels, dest->width, dest->height, tempbitmap, NULL, color);
1085
1086   bitmap_free(tempbitmap);
1087}
1088
1089
9381090/*-------------------------------------------------
9391091    layout_element_draw_led16seg - draw a
9401092    16-segment LCD
r778r779
10501202   bitmap_free(tempbitmap);
10511203}
10521204
1205/*-------------------------------------------------
1206    layout_element_draw_led16segsc - draw a
1207    16-segment LCD with semicolon (2 extra segments)
1208-------------------------------------------------*/
1209static void layout_element_draw_led16segsc(mame_bitmap *dest, const rectangle *bounds, const render_color *color, int pattern)
1210{
1211   const rgb_t onpen = MAKE_ARGB(0xff, 0xff, 0xff, 0xff);
1212   const rgb_t offpen = MAKE_ARGB(0xff, 0x20, 0x20, 0x20);
1213   int bmwidth, bmheight, segwidth, skewwidth;
1214   mame_bitmap *tempbitmap;
10531215
1216   /* sizes for computation */
1217   bmwidth = 250;
1218   bmheight = 400;
1219   segwidth = 40;
1220   skewwidth = 40;
10541221
1222   /* allocate a temporary bitmap for drawing */
1223   tempbitmap = bitmap_alloc(bmwidth + skewwidth, bmheight + segwidth, BITMAP_FORMAT_ARGB32);
1224   fillbitmap(tempbitmap, MAKE_ARGB(0xff, 0x00, 0x00, 0x00), NULL);
1225
1226   /* top-left bar */
1227   draw_segment_horizontal_caps(tempbitmap,
1228      0 + 2*segwidth/3, bmwidth/2 - segwidth/10, 0 + segwidth/2,
1229      segwidth, LINE_CAP_START, (pattern & (1 << 0)) ? onpen : offpen);
1230
1231   /* top-right bar */
1232   draw_segment_horizontal_caps(tempbitmap,
1233      0 + bmwidth/2 + segwidth/10, bmwidth - 2*segwidth/3, 0 + segwidth/2,
1234      segwidth, LINE_CAP_END, (pattern & (1 << 1)) ? onpen : offpen);
1235
1236   /* right-top bar */
1237   draw_segment_vertical(tempbitmap,
1238      0 + 2*segwidth/3, bmheight/2 - segwidth/3, bmwidth - segwidth/2,
1239      segwidth, (pattern & (1 << 2)) ? onpen : offpen);
1240
1241   /* right-bottom bar */
1242   draw_segment_vertical(tempbitmap,
1243      bmheight/2 + segwidth/3, bmheight - 2*segwidth/3, bmwidth - segwidth/2,
1244      segwidth, (pattern & (1 << 3)) ? onpen : offpen);
1245
1246   /* bottom-right bar */
1247   draw_segment_horizontal_caps(tempbitmap,
1248      0 + bmwidth/2 + segwidth/10, bmwidth - 2*segwidth/3, bmheight - segwidth/2,
1249      segwidth, LINE_CAP_END, (pattern & (1 << 4)) ? onpen : offpen);
1250
1251   /* bottom-left bar */
1252   draw_segment_horizontal_caps(tempbitmap,
1253      0 + 2*segwidth/3, bmwidth/2 - segwidth/10, bmheight - segwidth/2,
1254      segwidth, LINE_CAP_START, (pattern & (1 << 5)) ? onpen : offpen);
1255
1256   /* left-bottom bar */
1257   draw_segment_vertical(tempbitmap,
1258      bmheight/2 + segwidth/3, bmheight - 2*segwidth/3, 0 + segwidth/2,
1259      segwidth, (pattern & (1 << 6)) ? onpen : offpen);
1260
1261   /* left-top bar */
1262   draw_segment_vertical(tempbitmap,
1263      0 + 2*segwidth/3, bmheight/2 - segwidth/3, 0 + segwidth/2,
1264      segwidth, (pattern & (1 << 7)) ? onpen : offpen);
1265
1266   /* horizontal-middle-left bar */
1267   draw_segment_horizontal_caps(tempbitmap,
1268      0 + 2*segwidth/3, bmwidth/2 - segwidth/10, bmheight/2,
1269      segwidth, LINE_CAP_START, (pattern & (1 << 8)) ? onpen : offpen);
1270
1271   /* horizontal-middle-right bar */
1272   draw_segment_horizontal_caps(tempbitmap,
1273      0 + bmwidth/2 + segwidth/10, bmwidth - 2*segwidth/3, bmheight/2,
1274      segwidth, LINE_CAP_END, (pattern & (1 << 9)) ? onpen : offpen);
1275
1276   /* vertical-middle-top bar */
1277   draw_segment_vertical_caps(tempbitmap,
1278      0 + segwidth + segwidth/3, bmheight/2 - segwidth/2 - segwidth/3, bmwidth/2,
1279      segwidth, LINE_CAP_NONE, (pattern & (1 << 10)) ? onpen : offpen);
1280
1281   /* vertical-middle-bottom bar */
1282   draw_segment_vertical_caps(tempbitmap,
1283      bmheight/2 + segwidth/2 + segwidth/3, bmheight - segwidth - segwidth/3, bmwidth/2,
1284      segwidth, LINE_CAP_NONE, (pattern & (1 << 11)) ? onpen : offpen);
1285
1286   /* diagonal-left-bottom bar */
1287   draw_segment_diagonal_1(tempbitmap,
1288      0 + segwidth + segwidth/5, bmwidth/2 - segwidth/2 - segwidth/5,
1289      bmheight/2 + segwidth/2 + segwidth/3, bmheight - segwidth - segwidth/3,
1290      segwidth, (pattern & (1 << 12)) ? onpen : offpen);
1291
1292   /* diagonal-left-top bar */
1293   draw_segment_diagonal_2(tempbitmap,
1294      0 + segwidth + segwidth/5, bmwidth/2 - segwidth/2 - segwidth/5,
1295      0 + segwidth + segwidth/3, bmheight/2 - segwidth/2 - segwidth/3,
1296      segwidth, (pattern & (1 << 13)) ? onpen : offpen);
1297
1298   /* diagonal-right-top bar */
1299   draw_segment_diagonal_1(tempbitmap,
1300      bmwidth/2 + segwidth/2 + segwidth/5, bmwidth - segwidth - segwidth/5,
1301      0 + segwidth + segwidth/3, bmheight/2 - segwidth/2 - segwidth/3,
1302      segwidth, (pattern & (1 << 14)) ? onpen : offpen);
1303
1304   /* diagonal-right-bottom bar */
1305   draw_segment_diagonal_2(tempbitmap,
1306      bmwidth/2 + segwidth/2 + segwidth/5, bmwidth - segwidth - segwidth/5,
1307      bmheight/2 + segwidth/2 + segwidth/3, bmheight - segwidth - segwidth/3,
1308      segwidth, (pattern & (1 << 15)) ? onpen : offpen);
1309
1310   /* decimal point */
1311   draw_segment_decimal(tempbitmap, bmwidth + segwidth/2, bmheight - segwidth/2, segwidth, (pattern & (1 << 16)) ? onpen : offpen);
1312
1313   /* comma tail */
1314   draw_segment_diagonal_1(tempbitmap,
1315      bmwidth - (segwidth/2), bmwidth + segwidth,
1316      bmheight - (segwidth), bmheight + segwidth*1.5,
1317      segwidth/2, (pattern & (1 << 17)) ? onpen : offpen);
1318
1319   /* apply skew */
1320   apply_skew(tempbitmap, 40);
1321
1322   /* resample to the target size */
1323   render_resample_argb_bitmap_hq(dest->base, dest->rowpixels, dest->width, dest->height, tempbitmap, NULL, color);
1324
1325   bitmap_free(tempbitmap);
1326}
1327
10551328/***************************************************************************
10561329    LAYOUT FILE PARSING
10571330***************************************************************************/
r778r779
12081481   {
12091482      file_error filerr;
12101483      mame_file *layoutfile;
1211      char *fname;
1484      astring *fname;
12121485
1486      fname = astring_assemble_2(astring_alloc(), filename, ".lay");
12131487      if (dirname != NULL)
1214         fname = assemble_4_strings(dirname, PATH_SEPARATOR, filename, ".lay");
1215      else
1216         fname = assemble_2_strings(filename, ".lay");
1217      filerr = mame_fopen(SEARCHPATH_ARTWORK, fname, OPEN_FLAG_READ, &layoutfile);
1218      free(fname);
1488      {
1489         astring_insc(fname, 0, PATH_SEPARATOR);
1490         astring_insc(fname, 0, dirname);
1491      }
1492      filerr = mame_fopen(SEARCHPATH_ARTWORK, astring_c(fname), OPEN_FLAG_READ, &layoutfile);
1493      astring_free(fname);
12191494
12201495      if (filerr != FILERR_NONE)
12211496         return NULL;
r778r779
13381613         element->maxstate = 255;
13391614      if (component->type == COMPONENT_TYPE_LED14SEG)
13401615         element->maxstate = 16383;
1341      if (component->type == COMPONENT_TYPE_LED16SEG)
1616      if (component->type == COMPONENT_TYPE_LED14SEGSC || component->type == COMPONENT_TYPE_LED16SEG)
13421617         element->maxstate = 65535;
1618      if (component->type == COMPONENT_TYPE_LED16SEGSC)
1619         element->maxstate = 262143;
13431620   }
13441621
13451622   /* determine the scale/offset for normalization */
r778r779
14281705   else if (strcmp(compnode->name, "led14seg") == 0)
14291706      component->type = COMPONENT_TYPE_LED14SEG;
14301707
1708   /* led14segsc nodes */
1709   else if (strcmp(compnode->name, "led14segsc") == 0)
1710      component->type = COMPONENT_TYPE_LED14SEGSC;
1711
14311712   /* led16seg nodes */
14321713   else if (strcmp(compnode->name, "led16seg") == 0)
14331714      component->type = COMPONENT_TYPE_LED16SEG;
14341715
1716   /* led16segsc nodes */
1717   else if (strcmp(compnode->name, "led16segsc") == 0)
1718      component->type = COMPONENT_TYPE_LED16SEGSC;
1719
14351720   /* rect nodes */
14361721   else if (strcmp(compnode->name, "rect") == 0)
14371722      component->type = COMPONENT_TYPE_RECT;
src/emu/sound/samples.c
r778r779
206206      {
207207         file_error filerr;
208208         mame_file *f;
209         char *fname;
209         astring *fname;
210210
211         fname = assemble_3_strings(basename, PATH_SEPARATOR, samplenames[i+skipfirst]);
212         filerr = mame_fopen(SEARCHPATH_SAMPLE, fname, OPEN_FLAG_READ, &f);
213         free(fname);
211         fname = astring_assemble_3(astring_alloc(), basename, PATH_SEPARATOR, samplenames[i+skipfirst]);
212         filerr = mame_fopen(SEARCHPATH_SAMPLE, astring_c(fname), OPEN_FLAG_READ, &f);
214213
215214         if (filerr != FILERR_NONE && skipfirst)
216215         {
217            fname = assemble_3_strings(samplenames[0] + 1, PATH_SEPARATOR, samplenames[i+skipfirst]);
218            filerr = mame_fopen(SEARCHPATH_SAMPLE, fname, OPEN_FLAG_READ, &f);
219            free(fname);
216            astring_assemble_3(fname, samplenames[0] + 1, PATH_SEPARATOR, samplenames[i+skipfirst]);
217            filerr = mame_fopen(SEARCHPATH_SAMPLE, astring_c(fname), OPEN_FLAG_READ, &f);
220218         }
221219         if (filerr == FILERR_NONE)
222220         {
223221            read_wav_sample(f, &samples->sample[i]);
224222            mame_fclose(f);
225223         }
224
225         astring_free(fname);
226226      }
227227
228228   return samples;
src/emu/inputseq.c
r778r779
112112}
113113
114114
115/*-------------------------------------------------
116    safe_append_buffer - safe strcat for buffers
117-------------------------------------------------*/
118115
119INLINE int safe_append_buffer(char *buffer, const char *string, int buflen)
120{
121   if (buffer != NULL)
122   {
123      strncat(buffer, string, buflen);
124      buffer[buflen - 1] = 0;
125   }
126   return strlen(string);
127}
128
129
130
131116/***************************************************************************
132117    STATE QUERIES
133118***************************************************************************/
r778r779
401386    of a sequence
402387-------------------------------------------------*/
403388
404int input_seq_name(const input_seq *seq, char *buffer, size_t buflen)
389astring *input_seq_name(astring *string, const input_seq *seq)
405390{
391   astring *codestr = astring_alloc();
406392   int codenum, copycodenum;
407393   input_seq seqcopy;
408   int totallen = 0;
409394
410395   /* walk the sequence first, removing any pieces that are invalid */
411396   for (codenum = copycodenum = 0; codenum < ARRAY_LENGTH(seq->code) && seq->code[codenum] != SEQCODE_END; codenum++)
r778r779
413398      input_code code = seq->code[codenum];
414399
415400      /* if this is a code item which is not valid, don't copy it and remove any preceding ORs/NOTs */
416      if (!INPUT_CODE_IS_INTERNAL(code) && input_code_name(code, NULL, 0) == 0)
401      if (!INPUT_CODE_IS_INTERNAL(code) && astring_len(input_code_name(codestr, code)) == 0)
417402      {
418403         while (copycodenum > 0 && INPUT_CODE_IS_INTERNAL(seqcopy.code[copycodenum - 1]))
419404            copycodenum--;
r778r779
423408   }
424409   seqcopy.code[copycodenum] = SEQCODE_END;
425410
426   /* start with an empty buffer */
427   if (buffer != NULL)
428      buffer[0] = 0;
429
430411   /* special case: empty */
431412   if (copycodenum == 0)
432      return safe_append_buffer(buffer, (seq->code[0] == SEQCODE_END) ? "None" : "n/a", buflen);
413   {
414      astring_free(codestr);
415      return astring_cpyc(string, (seq->code[0] == SEQCODE_END) ? "None" : "n/a");
416   }
433417
418   /* start with an empty buffer */
419   astring_reset(string);
420
434421   /* loop until we hit the end */
435422   for (codenum = 0; codenum < ARRAY_LENGTH(seqcopy.code) && seqcopy.code[codenum] != SEQCODE_END; codenum++)
436423   {
r778r779
438425
439426      /* append a space if not the first code */
440427      if (codenum != 0)
441         totallen += safe_append_buffer(buffer, " ", buflen);
428         astring_catc(string, " ");
442429
443430      /* handle OR/NOT codes here */
444431      if (code == SEQCODE_OR)
445         totallen += safe_append_buffer(buffer, "or", buflen);
432         astring_catc(string, "or");
446433      else if (code == SEQCODE_NOT)
447         totallen += safe_append_buffer(buffer, "not", buflen);
434         astring_catc(string, "not");
448435
449436      /* otherwise, assume it is an input code and ask the input system to generate it */
450437      else
451      {
452         if (buffer != NULL)
453         {
454            int curlen = strlen(buffer);
455            totallen += input_code_name(code, buffer + curlen, buflen - curlen);
456            buffer[buflen - 1] = 0;
457         }
458         else
459            totallen += input_code_name(code, NULL, 0);
460      }
438         astring_cat(string, input_code_name(codestr, code));
461439   }
462440
463   return totallen;
441   astring_free(codestr);
442   return string;
464443}
465444
466445
r778r779
469448    form of a sequence
470449-------------------------------------------------*/
471450
472int input_seq_to_tokens(const input_seq *seq, char *buffer, size_t buflen)
451astring *input_seq_to_tokens(astring *string, const input_seq *seq)
473452{
474   int totallen = 0;
453   astring *codestr = astring_alloc();
475454   int codenum;
476455
477456   /* start with an empty buffer */
478   if (buffer != NULL)
479      buffer[0] = 0;
457   astring_reset(string);
480458
481459   /* loop until we hit the end */
482460   for (codenum = 0; codenum < ARRAY_LENGTH(seq->code) && seq->code[codenum] != SEQCODE_END; codenum++)
r778r779
485463
486464      /* append a space if not the first code */
487465      if (codenum != 0)
488         totallen += safe_append_buffer(buffer, " ", buflen);
466         astring_catc(string, " ");
489467
490468      /* handle OR/NOT codes here */
491469      if (code == SEQCODE_OR)
492         totallen += safe_append_buffer(buffer, "OR", buflen);
470         astring_catc(string, "OR");
493471      else if (code == SEQCODE_NOT)
494         totallen += safe_append_buffer(buffer, "NOT", buflen);
472         astring_catc(string, "NOT");
495473      else if (code == SEQCODE_DEFAULT)
496         totallen += safe_append_buffer(buffer, "DEFAULT", buflen);
474         astring_catc(string, "DEFAULT");
497475
498476      /* otherwise, assume it is an input code and ask the input system to generate it */
499477      else
500      {
501         if (buffer != NULL)
502         {
503            int curlen = strlen(buffer);
504            totallen += input_code_to_token(code, buffer + curlen, buflen - curlen);
505            buffer[buflen - 1] = 0;
506         }
507         else
508            totallen += input_code_to_token(code, NULL, 0);
509      }
478         astring_cat(string, input_code_to_token(codestr, code));
510479   }
511480
512   return totallen;
481   astring_free(codestr);
482   return string;
513483}
514484
515485
src/emu/inputseq.h
r778r779
8888
8989/* ----- strings and tokenization ----- */
9090
91/* generate the friendly name of an input sequence, returning the length (buffer can be NULL) */
92int input_seq_name(const input_seq *seq, char *buffer, size_t buflen);
91/* generate the friendly name of an input sequence */
92astring *input_seq_name(astring *string, const input_seq *seq);
9393
94/* convert an input sequence to tokens, returning the length (buffer can be NULL) */
95int input_seq_to_tokens(const input_seq *seq, char *buffer, size_t buflen);
94/* convert an input sequence to tokens, returning the length */
95astring *input_seq_to_tokens(astring *string, const input_seq *seq);
9696
9797/* convert a set of tokens back to an input sequence */
9898int input_seq_from_tokens(const char *string, input_seq *seq);
src/emu/ui.c
r778r779
426426   if (mame_get_phase(Machine) >= MAME_PHASE_RESET && (single_step || mame_is_paused(Machine)))
427427   {
428428      int alpha = (1.0f - options_get_float(mame_options(), OPTION_PAUSE_BRIGHTNESS)) * 255.0f;
429      if (ui_menu_is_force_game_select())
430         alpha = 255;
429431      if (alpha > 255)
430432         alpha = 255;
431433      if (alpha >= 0)
src/emu/input.c
r778r779
1212    To do:
1313        * auto-selecting joystick configs
1414        * per-joystick configs?
15        * test backwards compatibility with old configs
1615        * test half-axis selections
1716        * add input test menu
1817        * get rid of osd_customize_inputport_list
r778r779
5756{
5857   input_device_class      devclass;            /* device class of parent item */
5958   int                  devindex;            /* device index of parent item */
60   const char *         name;               /* string name of item */
61   const char *         token;               /* tokenized name for non-standard items */
59   astring *            name;               /* string name of item */
60   astring *            token;               /* tokenized name for non-standard items */
6261   void *               internal;            /* internal callback pointer */
6362   input_item_class      itemclass;            /* class of the item */
6463   input_item_id         itemid;               /* originally specified item id */
r778r779
8483/* a single input device */
8584struct _input_device
8685{
87   const char *         name;               /* string name of device */
86   astring *            name;               /* string name of device */
8887   input_device_class      devclass;            /* class of this device */
8988   int                  devindex;            /* device index of this device */
9089   input_device_item *      item[ITEM_ID_ABSOLUTE_MAXIMUM];   /* array of pointers to items */
r778r779
257256   { ITEM_ID_RIGHT,         "RIGHT" },
258257   { ITEM_ID_UP,            "UP" },
259258   { ITEM_ID_DOWN,          "DOWN" },
260   { ITEM_ID_0_PAD,         "0_PAD" },
261   { ITEM_ID_1_PAD,         "1_PAD" },
262   { ITEM_ID_2_PAD,         "2_PAD" },
263   { ITEM_ID_3_PAD,         "3_PAD" },
264   { ITEM_ID_4_PAD,         "4_PAD" },
265   { ITEM_ID_5_PAD,         "5_PAD" },
266   { ITEM_ID_6_PAD,         "6_PAD" },
267   { ITEM_ID_7_PAD,         "7_PAD" },
268   { ITEM_ID_8_PAD,         "8_PAD" },
269   { ITEM_ID_9_PAD,         "9_PAD" },
270   { ITEM_ID_SLASH_PAD,     "SLASH_PAD" },
259   { ITEM_ID_0_PAD,         "0PAD" },
260   { ITEM_ID_1_PAD,         "1PAD" },
261   { ITEM_ID_2_PAD,         "2PAD" },
262   { ITEM_ID_3_PAD,         "3PAD" },
263   { ITEM_ID_4_PAD,         "4PAD" },
264   { ITEM_ID_5_PAD,         "5PAD" },
265   { ITEM_ID_6_PAD,         "6PAD" },
266   { ITEM_ID_7_PAD,         "7PAD" },
267   { ITEM_ID_8_PAD,         "8PAD" },
268   { ITEM_ID_9_PAD,         "9PAD" },
269   { ITEM_ID_SLASH_PAD,     "SLASHPAD" },
271270   { ITEM_ID_ASTERISK,      "ASTERISK" },
272   { ITEM_ID_MINUS_PAD,     "MINUS_PAD" },
273   { ITEM_ID_PLUS_PAD,      "PLUS_PAD" },
274   { ITEM_ID_DEL_PAD,       "DEL_PAD" },
275   { ITEM_ID_ENTER_PAD,     "ENTER_PAD" },
271   { ITEM_ID_MINUS_PAD,     "MINUSPAD" },
272   { ITEM_ID_PLUS_PAD,      "PLUSPAD" },
273   { ITEM_ID_DEL_PAD,       "DELPAD" },
274   { ITEM_ID_ENTER_PAD,     "ENTERPAD" },
276275   { ITEM_ID_PRTSCR,        "PRTSCR" },
277276   { ITEM_ID_PAUSE,         "PAUSE" },
278277   { ITEM_ID_LSHIFT,        "LSHIFT" },
r778r779
448447
449448
450449/*-------------------------------------------------
451    safe_append_buffer - safe strcat for buffers
452-------------------------------------------------*/
453
454INLINE int safe_append_buffer(char *buffer, const char *string, int buflen)
455{
456   if (buffer != NULL)
457   {
458      strncat(buffer, string, buflen);
459      buffer[buflen - 1] = 0;
460   }
461   return strlen(string);
462}
463
464
465/*-------------------------------------------------
466450    string_to_code - convert a string to a code
467451    via table lookup
468452-------------------------------------------------*/
r778r779
683667   memset(device, 0, sizeof(*device));
684668
685669   /* fill in the data */
686   device->name = auto_strdup(name);
670   device->name = astring_cpyc(auto_astring_alloc(), name);
687671   device->devclass = devclass;
688672   device->devindex = devlist->count - 1;
689673   device->internal = internal;
r778r779
695679      device->lastmap = JOYSTICK_MAP_NEUTRAL;
696680   }
697681
698   mame_printf_verbose("Input: Adding %s #%d: %s\n", code_to_string(devclass_string_table, devclass), devlist->count, device->name);
682   mame_printf_verbose("Input: Adding %s #%d: %s\n", code_to_string(devclass_string_table, devclass), devlist->count, astring_c(device->name));
699683   return device;
700684}
701685
r778r779
733717   /* copy in the data passed in from the item list */
734718   item->devclass = device->devclass;
735719   item->devindex = device->devindex;
736   item->name = auto_strdup(name);
720   item->name = astring_cpyc(auto_astring_alloc(), name);
737721   item->token = NULL;
738722   item->internal = internal;
739723   item->itemclass = input_item_standard_class(device->devclass, itemid);
r778r779
743727   /* if we're custom, create a tokenized name */
744728   if (itemid > ITEM_ID_MAXIMUM)
745729   {
746      const char *src = name;
747      char *dst = auto_malloc(strlen(src) + 1);
748
749      /* copy the item name, converting spaces to underscores and making all caps */
750      item->token = dst;
751      for ( ; *src != 0; src++)
752         *dst++ = (*src == ' ') ? '_' : toupper(*src);
753      *dst = 0;
730      /* copy the item name, removing spaces/underscores and making all caps */
731      item->token = astring_toupper(astring_cpyc(auto_astring_alloc(), name));
732      astring_delchr(item->token, ' ');
733      astring_delchr(item->token, '_');
754734   }
755735
756736   /* otherwise, make sure we have a valid standard token */
r778r779
10551035    a friendly name
10561036-------------------------------------------------*/
10571037
1058int input_code_name(input_code code, char *buffer, size_t buflen)
1038astring *input_code_name(astring *string, input_code code)
10591039{
10601040   input_device_item *item = input_code_item(code);
1061   char devindex[2] = "0";
10621041   const char *devclass;
10631042   const char *devcode;
10641043   const char *modifier;
1065   int totallen = 0;
1044   char devindex[10];
10661045
1067   /* start with an empty string */
1068   if (buffer != NULL)
1069      buffer[0] = 0;
1070
10711046   /* if nothing there, return an empty string */
10721047   if (item == NULL)
1073      return totallen;
1048      return astring_reset(string);
10741049
10751050   /* determine the devclass part */
10761051   devclass = code_to_string(devclass_string_table, INPUT_CODE_DEVCLASS(code));
10771052
10781053   /* determine the devindex part */
1079   devindex[0] = '1' + INPUT_CODE_DEVINDEX(code);
1054   sprintf(devindex, "%d", INPUT_CODE_DEVINDEX(code) + 1);
10801055
10811056   /* if we're unifying all devices, don't display a number */
10821057   if (!device_list[INPUT_CODE_DEVCLASS(code)].multi)
r778r779
10901065   }
10911066
10921067   /* devcode part comes from the item name */
1093   devcode = item->name;
1068   devcode = astring_c(item->name);
10941069
10951070   /* determine the modifier part */
10961071   modifier = code_to_string(modifier_string_table, INPUT_CODE_MODIFIER(code));
r778r779
11011076         devcode = "";
11021077
11031078   /* concatenate the strings */
1104   totallen += safe_append_buffer(buffer, devclass, buflen);
1079   astring_cpyc(string, devclass);
11051080   if (devindex[0] != 0)
1106   {
1107      if (totallen > 0) totallen += safe_append_buffer(buffer, " ", buflen);
1108      totallen += safe_append_buffer(buffer, devindex, buflen);
1109   }
1081      astring_catc(astring_catc(string, " "), devindex);
11101082   if (devcode[0] != 0)
1111   {
1112      if (totallen > 0) totallen += safe_append_buffer(buffer, " ", buflen);
1113      totallen += safe_append_buffer(buffer, devcode, buflen);
1114   }
1083      astring_catc(astring_catc(string, " "), devcode);
11151084   if (modifier[0] != 0)
1116   {
1117      if (totallen > 0) totallen += safe_append_buffer(buffer, " ", buflen);
1118      totallen += safe_append_buffer(buffer, modifier, buflen);
1119   }
1120   return totallen;
1085      astring_catc(astring_catc(string, " "), modifier);
1086
1087   /* delete any leading spaces */
1088   return astring_trimspace(string);
11211089}
11221090
11231091
r778r779
11261094    a given code
11271095-------------------------------------------------*/
11281096
1129int input_code_to_token(input_code code, char *buffer, size_t buflen)
1097astring *input_code_to_token(astring *string, input_code code)
11301098{
11311099   input_device_item *item = input_code_item(code);
1132   char devindex[2] = "0";
11331100   const char *devclass;
11341101   const char *devcode;
11351102   const char *itemclass;
11361103   const char *modifier;
1137   int totallen = 0;
1104   char devindex[10];
11381105
1139   /* start with an empty string */
1140   if (buffer != NULL)
1141      buffer[0] = 0;
1142
11431106   /* determine the devclass part */
11441107   devclass = code_to_string(devclass_token_table, INPUT_CODE_DEVCLASS(code));
11451108
11461109   /* determine the devindex part; keyboard 0 doesn't show an index */
1147   devindex[0] = '1' + INPUT_CODE_DEVINDEX(code);
1110   sprintf(devindex, "%d", INPUT_CODE_DEVINDEX(code) + 1);
11481111   if (INPUT_CODE_DEVCLASS(code) == DEVICE_CLASS_KEYBOARD && INPUT_CODE_DEVINDEX(code) == 0)
11491112      devindex[0] = 0;
11501113
11511114   /* determine the itemid part; look up in the table if we don't have a token */
1152   devcode = (item != NULL) ? item->token : NULL;
1153   if (devcode == NULL)
1115   if (item != NULL && item->token != NULL)
1116      devcode = astring_c(item->token);
1117   else
11541118      devcode = code_to_string(itemid_token_table, INPUT_CODE_ITEMID(code));
11551119   assert(devcode != NULL);
11561120
r778r779
11641128      itemclass = code_to_string(itemclass_token_table, INPUT_CODE_ITEMCLASS(code));
11651129
11661130   /* concatenate the strings */
1167   totallen += safe_append_buffer(buffer, devclass, buflen);
1131   astring_cpyc(string, devclass);
11681132   if (devindex[0] != 0)
1169   {
1170      totallen += safe_append_buffer(buffer, "_", buflen);
1171      totallen += safe_append_buffer(buffer, devindex, buflen);
1172   }
1133      astring_catc(astring_catc(string, "_"), devindex);
11731134   if (devcode[0] != 0)
1174   {
1175      totallen += safe_append_buffer(buffer, "_", buflen);
1176      totallen += safe_append_buffer(buffer, devcode, buflen);
1177   }
1135      astring_catc(astring_catc(string, "_"), devcode);
11781136   if (modifier[0] != 0)
1179   {
1180      totallen += safe_append_buffer(buffer, "_", buflen);
1181      totallen += safe_append_buffer(buffer, modifier, buflen);
1182   }
1137      astring_catc(astring_catc(string, "_"), modifier);
11831138   if (itemclass[0] != 0)
1184   {
1185      totallen += safe_append_buffer(buffer, "_", buflen);
1186      totallen += safe_append_buffer(buffer, itemclass, buflen);
1187   }
1188   return totallen;
1139      astring_catc(astring_catc(string, "_"), itemclass);
1140   return string;
11891141}
11901142
11911143
r778r779
11991151   UINT32 devclass, itemid, devindex, modifier, standard;
12001152   UINT32 itemclass = ITEM_CLASS_INVALID;
12011153   input_code code = INPUT_CODE_INVALID;
1202   char *token[6] = { NULL };
1154   astring *token[6] = { NULL };
12031155   int numtokens, curtok;
1204   char tempaxis[10];
12051156
12061157   /* copy the token and break it into pieces */
1207   token[0] = malloc_or_die(strlen(_token) + 1);
1208   strcpy(token[0], _token);
12091158   for (numtokens = 0; numtokens < ARRAY_LENGTH(token); )
12101159   {
1211      /* look for an underscore; if not present, we're done */
1212      char *score = strchr(token[numtokens], '_');
1160      /* make a token up to the next underscore */
1161      char *score = strchr(_token, '_');
1162      token[numtokens++] = astring_dupch(_token, (score == NULL) ? strlen(_token) : (score - _token));
1163
1164      /* if we hit the end, we're done, else advance our pointer */
12131165      if (score == NULL)
12141166         break;
1215
1216      /* terminate the string and advance */
1217      *score = 0;
1218      if (++numtokens < ARRAY_LENGTH(token))
1219         token[numtokens] = score + 1;
1167      _token = score + 1;
12201168   }
1221   numtokens++;
12221169
12231170   /* first token should be the devclass */
12241171   curtok = 0;
1225   devclass = string_to_code(devclass_token_table, token[curtok++]);
1172   devclass = string_to_code(devclass_token_table, astring_c(token[curtok++]));
12261173   if (devclass == ~0)
12271174      goto exit;
12281175
12291176   /* second token might be index; look for number */
12301177   devindex = 0;
1231   if (numtokens > 2 && isdigit(token[curtok][0]))
1232      devindex = token[curtok++][0] - '1';
1178   if (numtokens > 2 && sscanf(astring_c(token[curtok]), "%d", &devindex) == 1)
1179   {
1180      curtok++;
1181      devindex--;
1182   }
12331183   if (curtok >= numtokens)
12341184      goto exit;
12351185
1236   /* backwards compatibility: ignore the ANALOG in JOYCODE/MOUSECODE_n_ANALOG_X */
1237   if (strcmp(token[curtok], "ANALOG") == 0)
1238      curtok++;
1239
1240   /* backwards compatibility: map JOYCODE_n_LEFT to JOYCODE_n_X_SWITCH_LEFT */
1241   if (numtokens == curtok + 1 && devclass == DEVICE_CLASS_JOYSTICK)
1242   {
1243      modifier = string_to_code(modifier_token_table, token[curtok]);
1244      if (modifier >= ITEM_MODIFIER_LEFT && modifier <= ITEM_MODIFIER_DOWN)
1245      {
1246         itemid = (modifier == ITEM_MODIFIER_LEFT || ITEM_MODIFIER_RIGHT) ? ITEM_ID_XAXIS : ITEM_ID_YAXIS;
1247         itemclass = ITEM_CLASS_SWITCH;
1248         standard = TRUE;
1249         goto makecode;
1250      }
1251   }
1252
1253   /* backwards compatibility: convert X/Y/Z to XAXIS/YAXIS/ZAXIS for non-keyboards */
1254   if (devclass != DEVICE_CLASS_KEYBOARD && strlen(token[curtok]) == 1 && token[curtok][0] >= 'X' && token[curtok][0] <= 'Z')
1255   {
1256      sprintf(tempaxis, "%cAXIS", token[curtok][0]);
1257      token[curtok] = tempaxis;
1258   }
1259
12601186   /* next token is the item ID */
1261   itemid = string_to_code(itemid_token_table, token[curtok]);
1187   itemid = string_to_code(itemid_token_table, astring_c(token[curtok]));
12621188   standard = (itemid != ~0);
12631189
12641190   /* if we're a standard code, default the itemclass based on it */
r778r779
12791205      for (itemid = ITEM_ID_INVALID + 1; itemid <= device->maxitem; itemid++)
12801206      {
12811207         input_device_item *item = device->item[itemid];
1282         if (item != NULL && item->token != NULL && strcmp(token[curtok], item->token) == 0)
1208         if (item != NULL && item->token != NULL && astring_cmp(token[curtok], item->token) == 0)
12831209         {
12841210            /* take the itemclass from the item */
12851211            itemclass = item->itemclass;
r778r779
12971223   modifier = ITEM_MODIFIER_NONE;
12981224   if (curtok < numtokens)
12991225   {
1300      modifier = string_to_code(modifier_token_table, token[curtok]);
1226      modifier = string_to_code(modifier_token_table, astring_c(token[curtok]));
13011227      if (modifier != ~0)
13021228         curtok++;
13031229      else
r778r779
13071233   /* if we have another token, it is the item class */
13081234   if (curtok < numtokens)
13091235   {
1310      UINT32 temp = string_to_code(itemclass_token_table, token[curtok]);
1236      UINT32 temp = string_to_code(itemclass_token_table, astring_c(token[curtok]));
13111237      if (temp != ~0)
13121238      {
13131239         curtok++;
r778r779
13191245   if (curtok != numtokens)
13201246      goto exit;
13211247
1322makecode:
13231248   /* assemble the final code */
13241249   code = INPUT_CODE(devclass, devindex, itemclass, modifier, itemid);
13251250
13261251exit:
1327   free(token[0]);
1252   for (curtok = 0; curtok < ARRAY_LENGTH(token); curtok++)
1253      if (token[curtok] != NULL)
1254         astring_free(token[curtok]);
13281255   return code;
13291256}
13301257
src/emu/input.h
r778r779
1515#define __INPUT_H__
1616
1717#include "mamecore.h"
18#include "astring.h"
1819
1920
2021/***************************************************************************
r778r779
542543/* ----- strings and tokenization ----- */
543544
544545/* generate the friendly name of an input code, returning the length (buffer can be NULL) */
545int input_code_name(input_code code, char *buffer, size_t buflen);
546astring *input_code_name(astring *buffer, input_code code);
546547
547548/* convert an input code to a token, returning the length (buffer can be NULL) */
548int input_code_to_token(input_code code, char *buffer, size_t buflen);
549astring *input_code_to_token(astring *buffer, input_code code);
549550
550551/* convert a token back to an input code */
551552input_code input_code_from_token(const char *_token);
src/emu/fileio.c
r778r779
1111
1212#include "osdepend.h"
1313#include "corefile.h"
14#include "astring.h"
1415#include "driver.h"
1516#include "chd.h"
1617#include "hash.h"
r778r779
6667{
6768   path_iterator   iterator;
6869   osd_directory *   curdir;
69   char *         pathbuffer;
70   astring *      pathbuffer;
7071   int            buflen;
7172};
7273
r778r779
8182
8283/* file open/close */
8384static file_error fopen_internal(core_options *opts, const char *searchpath, const char *filename, UINT32 crc, UINT32 flags, mame_file **file);
84static file_error fopen_attempt_zipped(char *fullname, const char *filename, UINT32 crc, UINT32 openflags, mame_file *file);
85static file_error fopen_attempt_zipped(astring *fullname, UINT32 crc, UINT32 openflags, mame_file *file);
8586
8687/* CHD callbacks */
8788static chd_interface_file *chd_open_cb(const char *filename, const char *mode);
r778r779
9192static UINT64 chd_length_cb(chd_interface_file *file);
9293
9394/* path iteration */
94static int path_iterator_init(path_iterator *iterator, core_options *opts, const char *searchpath);
95static int path_iterator_get_next(path_iterator *iterator, char *buffer, int buflen);
95static void path_iterator_init(path_iterator *iterator, core_options *opts, const char *searchpath);
96static int path_iterator_get_next(path_iterator *iterator, astring *buffer);
9697
9798/* misc helpers */
9899static file_error load_zipped_file(mame_file *file);
99static int zip_filename_match(const zip_file_header *header, const char *filename, int filenamelen);
100static int zip_filename_match(const zip_file_header *header, const astring *afilename);
100101
101102
102103
r778r779
225226{
226227   file_error filerr = FILERR_NOT_FOUND;
227228   path_iterator iterator;
228   int maxlen, pathlen;
229   char *fullname;
229   astring *fullname;
230230
231231   /* can either have a hash or open for write, but not both */
232232   if ((openflags & OPEN_FLAG_HAS_CRC) && (openflags & OPEN_FLAG_WRITE))
r778r779
249249      searchpath = NULL;
250250
251251   /* determine the maximum length of a composed filename, plus some extra space for .zip extensions */
252   maxlen = (UINT32)strlen(filename) + 5 + path_iterator_init(&iterator, opts, searchpath) + 1;
252   path_iterator_init(&iterator, opts, searchpath);
253253
254   /* allocate a temporary buffer to hold it */
255   fullname = malloc(maxlen);
256   if (fullname == NULL)
257   {
258      filerr = FILERR_OUT_OF_MEMORY;
259      goto error;
260   }
261
262254   /* loop over paths */
263   while ((pathlen = path_iterator_get_next(&iterator, fullname, maxlen)) != -1)
255   fullname = astring_alloc();
256   while (path_iterator_get_next(&iterator, fullname))
264257   {
265      char *dest;
266
267258      /* compute the full pathname */
268      dest = &fullname[pathlen];
269      if (pathlen > 0)
270         *dest++ = PATH_SEPARATOR[0];
271      strncpy(dest, filename, &fullname[maxlen] - dest);
259      if (astring_len(fullname) > 0)
260         astring_catc(fullname, PATH_SEPARATOR);
261      astring_catc(fullname, filename);
272262
273263      /* attempt to open the file directly */
274      filerr = core_fopen(fullname, openflags, &(*file)->file);
264      filerr = core_fopen(astring_c(fullname), openflags, &(*file)->file);
275265      if (filerr == FILERR_NONE)
276266         break;
277267
278268      /* if we're opening for read-only we have other options */
279269      if ((openflags & (OPEN_FLAG_READ | OPEN_FLAG_WRITE)) == OPEN_FLAG_READ)
280270      {
281         filerr = fopen_attempt_zipped(fullname, dest, crc, openflags, *file);
271         filerr = fopen_attempt_zipped(fullname, crc, openflags, *file);
282272         if (filerr == FILERR_NONE)
283273            break;
284274      }
285275   }
286   free(fullname);
276   astring_free(fullname);
287277
288278   /* handle errors and return */
289error:
290279   if (filerr != FILERR_NONE)
291280   {
292281      mame_fclose(*file);
r778r779
301290    ZIPped file
302291-------------------------------------------------*/
303292
304static file_error fopen_attempt_zipped(char *fullname, const char *filename, UINT32 crc, UINT32 openflags, mame_file *file)
293static file_error fopen_attempt_zipped(astring *fullname, UINT32 crc, UINT32 openflags, mame_file *file)
305294{
306   char *dirsep = fullname + strlen(fullname);
295   astring *filename = astring_alloc();
307296   zip_error ziperr;
308297   zip_file *zip;
309   char saved[5];
310298
311   assert(filename >= fullname && filename < fullname + strlen(fullname));
312
313299   /* loop over directory parts up to the start of filename */
314300   while (1)
315301   {
316302      const zip_file_header *header;
317      int filenamelen;
303      int dirsep;
318304
319      /* find the previous path separator */
320      for (dirsep--; dirsep >= filename && *dirsep != PATH_SEPARATOR[0]; dirsep--) ;
321
322      /* if none, we're done */
323      if (*dirsep != PATH_SEPARATOR[0])
305      /* find the final path separator */
306      dirsep = astring_rchr(fullname, 0, PATH_SEPARATOR[0]);
307      if (dirsep == -1)
308      {
309         astring_free(filename);
324310         return FILERR_NOT_FOUND;
311      }
325312
326      /* truncate here and replace with .zip */
327      dirsep[0] = '.';
328      saved[1] = dirsep[1]; dirsep[1] = 'z';
329      saved[2] = dirsep[2]; dirsep[2] = 'i';
330      saved[3] = dirsep[3]; dirsep[3] = 'p';
331      saved[4] = dirsep[4]; dirsep[4] = 0;
313      /* insert the part from the right of the separator into the head of the filename */
314      if (astring_len(filename) > 0)
315         astring_insc(filename, 0, "/");
316      astring_inssubstr(filename, 0, fullname, dirsep + 1, -1);
332317
318      /* remove this part of the filename and append a .zip extension */
319      astring_substr(fullname, 0, dirsep);
320      astring_catc(fullname, ".zip");
321
333322      /* attempt to open the ZIP file */
334      ziperr = zip_file_open(fullname, &zip);
323      ziperr = zip_file_open(astring_c(fullname), &zip);
335324
336      /* fix the original buffer */
337      dirsep[0] = PATH_SEPARATOR[0];
338      dirsep[1] = saved[1];
339      dirsep[2] = saved[2];
340      dirsep[3] = saved[3];
341      dirsep[4] = saved[4];
325      /* chop the .zip back off the filename before continuing */
326      astring_substr(fullname, 0, dirsep);
342327
343      /* if we didn't open this file, continue scanning */
328      /* if we failed to open this file, continue scanning */
344329      if (ziperr != ZIPERR_NONE)
345330         continue;
346331
347      /* precompute the filename length */
348      filenamelen = (UINT32)strlen(dirsep + 1);
349
350332      /* see if we can find a file with the right name and (if available) crc */
351333      for (header = zip_file_first_file(zip); header != NULL; header = zip_file_next_file(zip))
352      {
353         if (zip_filename_match(header, dirsep + 1, filenamelen) &&
354            (!(openflags & OPEN_FLAG_HAS_CRC) || header->crc == crc))
334         if (zip_filename_match(header, filename) && (!(openflags & OPEN_FLAG_HAS_CRC) || header->crc == crc))
355335            break;
356      }
357336
358337      /* if that failed, look for a file with the right crc, but the wrong filename */
359      if (header == NULL && (openflags & OPEN_FLAG_HAS_CRC)) {
338      if (header == NULL && (openflags & OPEN_FLAG_HAS_CRC))
360339         for (header = zip_file_first_file(zip); header != NULL; header = zip_file_next_file(zip))
361         {
362340            if (header->crc == crc)
363341               break;
364         }
365      }
366342
367343      /* if that failed, look for a file with the right name; reporting a bad checksum */
368344      /* is more helpful and less confusing than reporting "rom not found" */
369      if (header == NULL) {
345      if (header == NULL)
370346         for (header = zip_file_first_file(zip); header != NULL; header = zip_file_next_file(zip))
371         {
372            if (zip_filename_match(header, dirsep + 1, filenamelen))
347            if (zip_filename_match(header, filename))
373348               break;
374         }
375      }
376349
377350      /* if we got it, read the data */
378351      if (header != NULL)
r778r779
389362         crcs[2] = header->crc >> 8;
390363         crcs[3] = header->crc >> 0;
391364         hash_data_insert_binary_checksum(file->hash, HASH_CRC, crcs);
365
366         astring_free(filename);
392367         return FILERR_NONE;
393368      }
394369
r778r779
655630mame_path *mame_openpath(core_options *opts, const char *searchpath)
656631{
657632   mame_path *path;
658   int maxlen;
659633
660634   /* allocate a new mame_path */
661635   path = malloc(sizeof(*path));
r778r779
664638   memset(path, 0, sizeof(*path));
665639
666640   /* initialize the iterator */
667   maxlen = path_iterator_init(&path->iterator, opts, searchpath);
641   path_iterator_init(&path->iterator, opts, searchpath);
668642
669643   /* allocate a buffer to hold the current path */
670   path->buflen = maxlen + 10;
671   path->pathbuffer = malloc(path->buflen);
672   if (path->pathbuffer == NULL)
673   {
674      free(path);
675      return NULL;
676   }
677
644   path->pathbuffer = astring_alloc();
678645   return path;
679646}
680647
r778r779
695662      while (path->curdir == NULL)
696663      {
697664         /* if we fail to get anything more, we're done */
698         if (path_iterator_get_next(&path->iterator, path->pathbuffer, path->buflen) == -1)
665         if (!path_iterator_get_next(&path->iterator, path->pathbuffer))
699666            return NULL;
700667
701668         /* open the path */
702         path->curdir = osd_opendir(path->pathbuffer);
669         path->curdir = osd_opendir(astring_c(path->pathbuffer));
703670      }
704671
705672      /* get the next entry from the current directory */
r778r779
726693
727694   /* free memory */
728695   if (path->pathbuffer != NULL)
729      free(path->pathbuffer);
696      astring_free(path->pathbuffer);
730697   free(path);
731698}
732699
r778r779
801768   /* look for read-only drives first in the ROM path */
802769   if (mode[0] == 'r' && !strchr(mode, '+'))
803770   {
771      astring *path = astring_alloc();
804772      const game_driver *drv;
805      char *path;
806773
807      /* allocate a temporary buffer to hold the path */
808      path = malloc_or_die(strlen(filename) + 1 + MAX_DRIVER_NAME_CHARS + 1);
809
810774      /* attempt reading up the chain through the parents */
811775      for (drv = Machine->gamedrv; drv != NULL; drv = driver_get_clone(drv))
812776      {
813         sprintf(path, "%s" PATH_SEPARATOR "%s", drv->name, filename);
814         filerr = mame_fopen(SEARCHPATH_IMAGE, path, OPEN_FLAG_READ, &file);
777         /* build up drv->name/filename in the path */
778         astring_cpyc(path, drv->name);
779         astring_catc(path, PATH_SEPARATOR);
780         astring_catc(path, filename);
781
782         /* attempt to open */
783         filerr = mame_fopen(SEARCHPATH_IMAGE, astring_c(path), OPEN_FLAG_READ, &file);
815784         if (filerr == FILERR_NONE)
816785         {
817            free(path);
786            astring_free(path);
818787            return (chd_interface_file *)file;
819788         }
820789      }
821      free(path);
790      astring_free(path);
822791      return NULL;
823792   }
824793
r778r779
886855    a given path type
887856-------------------------------------------------*/
888857
889static int path_iterator_init(path_iterator *iterator, core_options *opts, const char *searchpath)
858static void path_iterator_init(path_iterator *iterator, core_options *opts, const char *searchpath)
890859{
891   const char *cur, *base;
892   int maxlen = 0;
893
894860   /* reset the structure */
895861   memset(iterator, 0, sizeof(*iterator));
896862   iterator->base = (searchpath != NULL) ? options_get_string(opts, searchpath) : "";
897863   iterator->cur = iterator->base;
898
899   /* determine the maximum path embedded here */
900   base = iterator->base;
901   for (cur = iterator->base; *cur != 0; cur++)
902      if (*cur == ';')
903      {
904         maxlen = MAX(maxlen, cur - base);
905         base = cur + 1;
906      }
907
908   /* account for the last path */
909   maxlen = MAX(maxlen, cur - base);
910   return maxlen + 1;
911864}
912865
913866
r778r779
916869    in a multipath sequence
917870-------------------------------------------------*/
918871
919static int path_iterator_get_next(path_iterator *iterator, char *buffer, int buflen)
872static int path_iterator_get_next(path_iterator *iterator, astring *buffer)
920873{
921   char *dest = buffer;
922   const char *cur;
874   const char *semi;
923875
924   /* if none left, return -1 to indicate we are done */
876   /* if none left, return FALSE to indicate we are done */
925877   if (iterator->index != 0 && *iterator->cur == 0)
926      return -1;
878      return FALSE;
927879
928880   /* copy up to the next semicolon */
929   cur = iterator->cur;
930   while (*cur != 0 && *cur != ';' && buflen > 1)
931   {
932      *dest++ = *cur++;
933      buflen--;
934   }
935   *dest = 0;
881   semi = strchr(iterator->cur, ';');
882   if (semi == NULL)
883      semi = iterator->cur + strlen(iterator->cur);
884   astring_cpych(buffer, iterator->cur, semi - iterator->cur);
885   iterator->cur = (*semi == 0) ? semi : semi + 1;
936886
937   /* if we ran out of buffer space, skip forward to the semicolon */
938   while (*cur != 0 && *cur != ';')
939      cur++;
940   iterator->cur = (*cur == ';') ? (cur + 1) : cur;
941
942   /* bump the index and return the length */
887   /* bump the index and return TRUE */
943888   iterator->index++;
944   return dest - buffer;
889   return TRUE;
945890}
946891
947892
r778r779
998943    to expected filename, ignoring any directory
999944-------------------------------------------------*/
1000945
1001static int zip_filename_match(const zip_file_header *header, const char *filename, int filenamelen)
946static int zip_filename_match(const zip_file_header *header, const astring *filename)
1002947{
1003   const char *zipfile = header->filename + header->filename_length - filenamelen;
948   const char *zipfile = header->filename + header->filename_length - astring_len(filename);
1004949
1005   return (zipfile >= header->filename && mame_stricmp(zipfile, filename) == 0 &&
950   return (zipfile >= header->filename && astring_icmpc(filename, zipfile) == 0 &&
1006951      (zipfile == header->filename || zipfile[-1] == '/'));
1007952}
src/emu/fileio.h
r778r779
164164const char *mame_fhash(mame_file *file, UINT32 functions);
165165
166166
167
168/***************************************************************************
169    INLINE FUNCTIONS
170***************************************************************************/
171
172/*-------------------------------------------------
173    assemble_2_strings - allocate space for two
174    strings and concatenate them into the new
175    buffer
176-------------------------------------------------*/
177
178INLINE char *assemble_2_strings(const char *s1, const char *s2)
179{
180   char *tempbuf = (char *) malloc_or_die(strlen(s1) + strlen(s2) + 1);
181   strcpy(tempbuf, s1);
182   strcat(tempbuf, s2);
183   return tempbuf;
184}
185
186
187/*-------------------------------------------------
188    assemble_3_strings - allocate space for three
189    strings and concatenate them into the new
190    buffer
191-------------------------------------------------*/
192
193INLINE char *assemble_3_strings(const char *s1, const char *s2, const char *s3)
194{
195   char *tempbuf = (char *) malloc_or_die(strlen(s1) + strlen(s2) + strlen(s3) + 1);
196   strcpy(tempbuf, s1);
197   strcat(tempbuf, s2);
198   strcat(tempbuf, s3);
199   return tempbuf;
200}
201
202
203/*-------------------------------------------------
204    assemble_4_strings - allocate space for four
205    strings and concatenate them into the new
206    buffer
207-------------------------------------------------*/
208
209INLINE char *assemble_4_strings(const char *s1, const char *s2, const char *s3, const char *s4)
210{
211   char *tempbuf = (char *) malloc_or_die(strlen(s1) + strlen(s2) + strlen(s3) + strlen(s4) + 1);
212   strcpy(tempbuf, s1);
213   strcat(tempbuf, s2);
214   strcat(tempbuf, s3);
215   strcat(tempbuf, s4);
216   return tempbuf;
217}
218
219
220/*-------------------------------------------------
221    assemble_5_strings - allocate space for four
222    strings and concatenate them into the new
223    buffer
224-------------------------------------------------*/
225
226INLINE char *assemble_5_strings(const char *s1, const char *s2, const char *s3, const char *s4, const char *s5)
227{
228   char *tempbuf = (char *) malloc_or_die(strlen(s1) + strlen(s2) + strlen(s3) + strlen(s4) + strlen(s5) + 1);
229   strcpy(tempbuf, s1);
230   strcat(tempbuf, s2);
231   strcat(tempbuf, s3);
232   strcat(tempbuf, s4);
233   strcat(tempbuf, s5);
234   return tempbuf;
235}
236
237
238167#endif   /* __FILEIO_H__ */
src/emu/clifront.c
r778r779
113113
114114int cli_execute(int argc, char **argv, const options_entry *osd_options)
115115{
116   const char *exename = core_filename_extract_base(argv[0], TRUE);
117   const char *sourcename = NULL;
118   const char *gamename = NULL;
116   astring *gamename = astring_alloc();
117   astring *exename = astring_alloc();
118   const game_driver *driver;
119119   int result;
120120
121121   /* initialize the options manager and add the CLI-specific options */
r778r779
130130   }
131131
132132   /* parse the simple commmands before we go any further */
133   result = execute_simple_commands(exename);
133   core_filename_extract_base(exename, argv[0], TRUE);
134   result = execute_simple_commands(astring_c(exename));
134135   if (result != -1)
135136      goto error;
136137
137138   /* find out what game we might be referring to */
138   gamename = core_filename_extract_base(options_get_string(mame_options(), OPTION_GAMENAME), TRUE);
139   core_filename_extract_base(gamename, options_get_string(mame_options(), OPTION_GAMENAME), TRUE);
140   driver = driver_get_name(astring_c(gamename));
139141
142   /* parse any relevant INI files */
143   mame_parse_ini_files(mame_options(), driver);
144
140145   /* execute any commands specified */
141   result = execute_commands(exename);
146   result = execute_commands(astring_c(exename));
142147   if (result != -1)
143148      goto error;
144149
145150   /* if we don't have a valid driver selected, offer some suggestions */
146   if (gamename[0] != 0 && driver_get_name(gamename) == NULL)
151   if (astring_len(gamename) > 0 && driver == NULL)
147152   {
148153      const game_driver *matches[10];
149154      int drvnum;
150155
151156      /* get the top 10 approximate matches */
152      driver_list_get_approx_matches(drivers, gamename, ARRAY_LENGTH(matches), matches);
157      driver_list_get_approx_matches(drivers, astring_c(gamename), ARRAY_LENGTH(matches), matches);
153158
154159      /* print them out */
155160      fprintf(stderr, "\n\"%s\" approximately matches the following\n"
156            "supported " GAMESNOUN " (best match first):\n\n", gamename);
161            "supported " GAMESNOUN " (best match first):\n\n", astring_c(gamename));
157162      for (drvnum = 0; drvnum < ARRAY_LENGTH(matches); drvnum++)
158163         if (matches[drvnum] != NULL)
159164            fprintf(stderr, "%-10s%s\n", matches[drvnum]->name, matches[drvnum]->description);
r778r779
169174error:
170175   /* free our options and exit */
171176   mame_options_exit();
172   if (exename != NULL)
173      free((void *)exename);
174   if (sourcename != NULL)
175      free((void *)sourcename);
176   if (gamename != NULL)
177      free((void *)gamename);
177   astring_free(gamename);
178   astring_free(exename);
178179   return result;
179180}
180181
r778r779
374375
375376int cli_info_listsource(const char *gamename)
376377{
378   astring *filename = astring_alloc();
377379   int drvindex, count = 0;
378380
379381   /* iterate over drivers */
r778r779
381383      if (mame_strwildcmp(gamename, drivers[drvindex]->name) == 0)
382384      {
383385         /* output the remaining information */
384         mame_printf_info("%-8s %s\n", drivers[drvindex]->name, drivers[drvindex]->source_file);
386         mame_printf_info("%-8s %s\n", drivers[drvindex]->name, astring_c(core_filename_extract_base(filename, drivers[drvindex]->source_file, FALSE)));
385387         count++;
386388      }
387389
388390   /* return an error if none found */
391   astring_free(filename);
389392   return (count > 0) ? MAMERR_NONE : MAMERR_NO_SUCH_GAME;
390393}
391394
r778r779
798801      while ((entry = osd_readdir(directory)) != NULL)
799802         if (entry->type == ENTTYPE_FILE)
800803         {
801            const char *curfile = assemble_3_strings(filename, PATH_SEPARATOR, entry->name);
802            identify_file(curfile, status);
803            free((void *)curfile);
804            astring *curfile = astring_assemble_3(astring_alloc(), filename, PATH_SEPARATOR, entry->name);
805            identify_file(astring_c(curfile), status);
806            astring_free(curfile);
804807         }
805808      osd_closedir(directory);
806809   }
r778r779
883886{
884887   char hash[HASH_BUF_SIZE];
885888   UINT8 *tempjed = NULL;
886   const char *basename;
889   astring *basename;
887890   int found = 0;
888891   jed_data jed;
889892
r778r779
907910
908911   /* output the name */
909912   status->total++;
910   basename = core_filename_extract_base(name, FALSE);
911   mame_printf_info("%-20s", (basename != NULL) ? basename : name);
912   if (basename != NULL)
913      free((void *)basename);
913   basename = core_filename_extract_base(astring_alloc(), name, FALSE);
914   mame_printf_info("%-20s", astring_c(basename));
915   astring_free(basename);
914916
915917   /* see if we can find a match in the ROMs */
916918   match_roms(hash, length, &found);
src/emu/state.c
r778r779
2121***************************************************************************/
2222
2323#include "driver.h"
24#include "astring.h"
2425#include <zlib.h>
2526
2627
r778r779
7172{
7273   ss_entry *      next;            /* pointer to next entry */
7374   void *         data;            /* pointer to the memory to save/restore */
74   char *         name;            /* full name */
75   astring *      name;            /* full name */
7576   UINT8         typesize;         /* size of the raw data type */
7677   UINT32         typecount;         /* number of items */
7778   int            tag;            /* saving tag */
78   int            restag;            /* resource tag */
7979   UINT32         offset;            /* offset within the final structure */
8080};
8181
r778r779
9797      void *ptrp;
9898   } param;                     /* parameters */
9999   int            tag;            /* saving tag */
100   int            restag;            /* resource tag */
101100};
102101
103102
r778r779
245244void state_save_register_memory(const char *module, UINT32 instance, const char *name, void *val, UINT32 valsize, UINT32 valcount)
246245{
247246   ss_entry **entry, *next;
248   char *totalname;
247   astring *totalname;
249248
250249   assert(valsize == 1 || valsize == 2 || valsize == 4 || valsize == 8);
251250
r778r779
258257   }
259258
260259   /* create the full name */
261   totalname = malloc_or_die(8 + 1 + strlen(module) + 1 + 8 + 1 + strlen(name) + 1);
262   sprintf(totalname, "%X/%s/%X/%s", ss_current_tag, module, instance, name);
260   totalname = astring_alloc();
261   astring_printf(totalname, "%X/%s/%X/%s", ss_current_tag, module, instance, name);
263262
264263   /* look for duplicates and an entry to insert in front of */
265264   for (entry = &ss_registry; *entry; entry = &(*entry)->next)
266265   {
267266      /* stop if the next guy's string is greater than ours */
268      int cmpval = strcmp((*entry)->name, totalname);
267      int cmpval = astring_cmp((*entry)->name, totalname);
269268      if (cmpval > 0)
270269         break;
271270
272271      /* error if we are equal */
273272      if ((*entry)->tag == ss_current_tag && cmpval == 0)
274         fatalerror("Duplicate save state registration entry (%d, %s)", ss_current_tag, totalname);
273         fatalerror("Duplicate save state registration entry (%d, %s)", ss_current_tag, astring_c(totalname));
275274   }
276275
277276   /* didn't find one; allocate a new one */
r778r779
286285   (*entry)->typesize  = valsize;
287286   (*entry)->typecount = valcount;
288287   (*entry)->tag       = ss_current_tag;
289   (*entry)->restag    = get_resource_tag();
288   restrack_register_object(OBJTYPE_STATEREG, *entry, 0, __FILE__, __LINE__);
290289}
291290
292291
r778r779
336335   (*cur)->type       = FUNC_NOPARAM;
337336   (*cur)->func.voidf = func;
338337   (*cur)->tag        = ss_current_tag;
339   (*cur)->restag   = get_resource_tag();
338   restrack_register_object(OBJTYPE_STATEREG, *cur, (root == &ss_prefunc_reg) ? 1 : 2, __FILE__, __LINE__);
340339}
341340
342341void state_save_register_func_presave(void (*func)(void))
r778r779
377376   (*cur)->func.intf  = func;
378377   (*cur)->param.intp = param;
379378   (*cur)->tag        = ss_current_tag;
380   (*cur)->restag   = get_resource_tag();
379   restrack_register_object(OBJTYPE_STATEREG, *cur, (root == &ss_prefunc_reg) ? 1 : 2, __FILE__, __LINE__);
381380}
382381
383382void state_save_register_func_presave_int(void (*func)(int), int param)
r778r779
418417   (*cur)->func.ptrf  = func;
419418   (*cur)->param.ptrp = param;
420419   (*cur)->tag        = ss_current_tag;
421   (*cur)->restag   = get_resource_tag();
420   restrack_register_object(OBJTYPE_STATEREG, *cur, (root == &ss_prefunc_reg) ? 1 : 2, __FILE__, __LINE__);
422421}
423422
424423void state_save_register_func_presave_ptr(void (*func)(void *), void * param)
r778r779
442441    to the current resource tag
443442-------------------------------------------------*/
444443
445static void func_free(ss_func **root)
444static void func_free(ss_func **root, void *ptr)
446445{
447   int restag = get_resource_tag();
448446   ss_func **func;
449447
450448   /* iterate over the function list */
451449   for (func = root; *func; )
452450   {
453451      /* if this entry matches, free it */
454      if ((*func)->restag == restag)
452      if (*func == ptr)
455453      {
456454         ss_func *func_to_free = *func;
457455
458456         /* de-link us from the list and free our memory */
459457         *func = (*func)->next;
460458         free(func_to_free);
459         break;
461460      }
462461
463462      /* otherwise, advance */
r778r779
473472    tag
474473-------------------------------------------------*/
475474
476void state_save_free(void)
475void state_destructor(void *ptr, size_t size)
477476{
478   int restag = get_resource_tag();
479   ss_entry **entry;
477   /* size of 0 means an entry */
478   if (size == 0)
479   {
480      ss_entry **entry;
480481
481   /* iterate over entries */
482   for (entry = &ss_registry; *entry; )
483   {
484      /* if this entry matches, free it */
485      if ((*entry)->restag == restag)
482      /* iterate over entries */
483      for (entry = &ss_registry; *entry; )
486484      {
487         ss_entry *entry_to_free = *entry;
485         /* if this entry matches, free it */
486         if (*entry == ptr)
487         {
488            ss_entry *entry_to_free = *entry;
488489
489         /* de-link us from the list and free our memory */
490         *entry = (*entry)->next;
491         free(entry_to_free->name);
492         free(entry_to_free);
490            /* de-link us from the list and free our memory */
491            *entry = (*entry)->next;
492            astring_free(entry_to_free->name);
493            free(entry_to_free);
494            break;
495         }
496
497         /* if not a match, move on */
498         else
499            entry = &(*entry)->next;
493500      }
494
495      /* if not a match, move on */
496      else
497         entry = &(*entry)->next;
498501   }
499502
500   /* now do the same with the function lists */
501   func_free(&ss_prefunc_reg);
502   func_free(&ss_postfunc_reg);
503   /* size of 1 means a pre function */
504   else if (size == 1)
505      func_free(&ss_prefunc_reg, ptr);
503506
507   /* size of 2 means a post function */
508   else if (size == 2)
509      func_free(&ss_postfunc_reg, ptr);
510
504511   /* if we're clear of all registrations, reset the invalid counter */
505512   if (ss_registry == NULL && ss_prefunc_reg == NULL && ss_postfunc_reg == NULL)
506513      ss_illegal_regs = 0;
r778r779
630637      UINT32 temp[2];
631638
632639      /* add the entry name to the CRC */
633      crc = crc32(crc, (UINT8 *)entry->name, (UINT32)strlen(entry->name));
640      crc = crc32(crc, (UINT8 *)astring_c(entry->name), astring_len(entry->name));
634641
635642      /* add the type and size to the CRC */
636643      temp[0] = LITTLE_ENDIANIZE_INT32(entry->typecount);
r778r779
777784      if (entry->tag == ss_current_tag)
778785      {
779786         memcpy(ss_dump_array + entry->offset, entry->data, entry->typesize * entry->typecount);
780         TRACE(logerror("    %s: %x..%x\n", entry->name, entry->offset, entry->offset + entry->typesize * entry->typecount - 1));
787         TRACE(logerror("    %s: %x..%x\n", astring_c(entry->name), entry->offset, entry->offset + entry->typesize * entry->typecount - 1));
781788      }
782789}
783790
r778r779
885892         memcpy(entry->data, ss_dump_array + entry->offset, entry->typesize * entry->typecount);
886893         if (need_convert && ss_conv[entry->typesize])
887894            (*ss_conv[entry->typesize])(entry->data, entry->typecount);
888         TRACE(logerror("    %s: %x..%x\n", entry->name, entry->offset, entry->offset + entry->typesize * entry->typecount - 1));
895         TRACE(logerror("    %s: %x..%x\n", astring_c(entry->name), entry->offset, entry->offset + entry->typesize * entry->typecount - 1));
889896      }
890897
891898   /* call the post-load functions */
r778r779
935942            *valsize = ss->typesize;
936943         if (valcount != NULL)
937944            *valcount = ss->typecount;
938         return ss->name;
945         return astring_c(ss->name);
939946      }
940947
941948   return NULL;
r778r779
953960   ss_entry *entry;
954961
955962   for (entry = ss_registry; entry; entry=entry->next)
956      logerror("%s: %d x %d\n", entry->name, entry->typesize, entry->typecount);
963      logerror("%s: %d x %d\n", astring_c(entry->name), entry->typesize, entry->typecount);
957964#endif
958965}
959966
src/emu/timer.c
r778r779
1212
1313#include "driver.h"
1414#include "profiler.h"
15#include "pool.h"
1516#include <math.h>
1617
1718
r778r779
5051   void         (*callback_ptr)(running_machine *, void *);
5152   int          callback_param;
5253   void *         callback_ptr_param;
53   int          tag;
5454   const char *   file;
5555   int          line;
5656   const char *   func;
r778r779
270270   timer_head = NULL;
271271   timer_free_head = &timers[0];
272272   for (i = 0; i < MAX_TIMERS-1; i++)
273   {
274      timers[i].tag = -1;
275273      timers[i].next = &timers[i+1];
276   }
277274   timers[MAX_TIMERS-1].next = NULL;
278275   timer_free_tail = &timers[MAX_TIMERS-1];
279276}
280277
281278
282279/*-------------------------------------------------
283    timer_free - remove all timers on the current
284    resource tag
280    timer_destructor - destruct a timer from a
281    pool callback
285282-------------------------------------------------*/
286283
287void timer_free(void)
284void timer_destructor(void *ptr, size_t size)
288285{
289   int tag = get_resource_tag();
290   mame_timer *timer, *next;
291
292   /* scan the list */
293   for (timer = timer_head; timer != NULL; timer = next)
294   {
295      /* prefetch the next timer in case we remove this one */
296      next = timer->next;
297
298      /* if this tag matches, remove it */
299      if (timer->tag == tag)
300         timer_remove(timer);
301   }
286   timer_remove(ptr);
302287}
303288
304289
r778r779
511496   timer->enabled = FALSE;
512497   timer->temporary = temp;
513498   timer->ptr = (callback_ptr != NULL);
514   timer->tag = get_resource_tag();
515499   timer->period = time_zero;
516500   timer->file = file;
517501   timer->line = line;
r778r779
524508
525509   /* if we're not temporary, register ourselve with the save state system */
526510   if (!temp)
511   {
527512      timer_register_save(timer);
513      restrack_register_object(OBJTYPE_TIMER, timer, 0, file, line);
514   }
528515
529516   /* return a handle */
530517   return timer;
r778r779
548535
549536static void timer_remove(mame_timer *which)
550537{
551   /* error if this is an inactive timer */
552   if (which->tag == -1)
553      fatalerror("timer_remove: removing an inactive timer! (%s from %s:%d)\n", which->func, which->file, which->line);
554
555538   /* if this is a callback timer, note that */
556539   if (which == callback_timer)
557540      callback_timer_modified = TRUE;
r778r779
559542   /* remove it from the list */
560543   timer_list_remove(which);
561544
562   /* mark it as dead */
563   which->tag = -1;
564
565545   /* free it up by adding it back to the free list */
566546   if (timer_free_tail)
567547      timer_free_tail->next = which;
r778r779
587567{
588568   mame_time time = get_current_time();
589569
590   /* error if this is an inactive timer */
591   if (which->tag == -1)
592      fatalerror("mame_timer_adjust: adjusting an inactive timer!\n");
593
594570   /* if this is the callback timer, mark it modified */
595571   if (which == callback_timer)
596572      callback_timer_modified = TRUE;
r778r779
694670
695671void mame_timer_reset(mame_timer *which, mame_time duration)
696672{
697   /* error if this is an inactive timer */
698   if (which->tag == -1)
699      fatalerror("mame_timer_reset: resetting an inactive timer!\n");
700
701673   /* adjust the timer */
702674   if (!which->ptr)
703675      mame_timer_adjust(which, duration, which->callback_param, which->period);
src/emu/cheat.c
r778r779
30533053   UINT8            dirty = 0;
30543054   static INT32      currentNameTemplate = 0;
30553055
3056   astring *         temp_string_1 = astring_alloc();
3057   astring *         temp_string_2 = astring_alloc();
3058
30563059   if(!entry)
30573060      return 0;
30583061
r778r779
31433146            menuItem[total] = "Activation Key (1st)";
31443147
31453148            if((entry->flags & kCheatFlag_HasActivationKey1))
3146            {
3147               static char name[100];
3148               input_code_name(entry->activationKey1, name, ARRAY_LENGTH(name));
3149               menuSubItem[total++] = name;
3150            }
3149               menuSubItem[total++] = astring_c(input_code_name(temp_string_1, entry->activationKey1));
31513150            else
31523151               menuSubItem[total++] = "(none)";
31533152         }
r778r779
31593158            menuItem[total] = "Activation Key (2nd)";
31603159
31613160            if((entry->flags & kCheatFlag_HasActivationKey2))
3162            {
3163               static char name[100];
3164               input_code_name(entry->activationKey2, name, ARRAY_LENGTH(name));
3165               menuSubItem[total++] = name;
3166            }
3161               menuSubItem[total++] = astring_c(input_code_name(temp_string_2, entry->activationKey2));
31673162            else
31683163               menuSubItem[total++] = "(none)";
31693164         }
r778r779
46834678      entry->flags |= kCheatFlag_Dirty;
46844679   }
46854680
4681   astring_free(temp_string_1);
4682   astring_free(temp_string_2);
4683
46864684   return sel + 1;
46874685}
46884686
r778r779
90229020            FPTR            handlerAddress = (FPTR)handler;
90239021
90249022            if(   (handlerAddress >= ((FPTR)MWA8_BANK1)) && (handlerAddress <= ((FPTR)MWA8_BANK24)))
9025               sprintf(desc, "BANK%.2d", (handlerAddress - ((FPTR)MWA8_BANK1)) + 1);
9023               sprintf(desc, "BANK%.2d", (int)(handlerAddress - (FPTR)MWA8_BANK1) + 1);
90269024            else
90279025            {
90289026               switch(handlerAddress)
r778r779
98529850      case activationKey:
98539851         for(i = 0; i < 2; i++)
98549852         {
9855            char      name[100];
98569853            char      * bufTraverse = buf;
98579854            int         addressLength;
98589855
r778r779
98849881            if(!i)
98859882            {
98869883               /* ----- 1st key ----- */
9887               input_code_name(entry->activationKey1, name, ARRAY_LENGTH(name));
9888               if(entry->name)
9889                  bufTraverse += sprintf(bufTraverse, ":1st Activation Key for %s (%s)\n", entry->name, name);
9884               astring *name = input_code_name(astring_alloc(), entry->activationKey1);
9885               if (entry->name)
9886                  bufTraverse += sprintf(bufTraverse, ":1st Activation Key for %s (%s)\n", entry->name, astring_c(name));
98909887               else
9891                  bufTraverse += sprintf(bufTraverse, ":1st Activation Key (%s)\n", name);
9888                  bufTraverse += sprintf(bufTraverse, ":1st Activation Key (%s)\n", astring_c(name));
9889               astring_free(name);
98929890            }
98939891            else
98949892            {
98959893               /* ----- 2nd key ----- */
9896               input_code_name(entry->activationKey2, name, ARRAY_LENGTH(name));
9897               if(entry->name)
9898                  bufTraverse += sprintf(bufTraverse, ":2nd Activation Key for %s (%s)\n", entry->name, name);
9894               astring *name = input_code_name(astring_alloc(), entry->activationKey2);
9895               if (entry->name)
9896                  bufTraverse += sprintf(bufTraverse, ":2nd Activation Key for %s (%s)\n", entry->name, astring_c(name));
98999897               else
9900                  bufTraverse += sprintf(bufTraverse, ":2nd Activation Key (%s)\n", name);
9898                  bufTraverse += sprintf(bufTraverse, ":2nd Activation Key (%s)\n", astring_c(name));
9899               astring_free(name);
99019900            }
99029901
99039902            /* ----- write the activation key code ----- */
src/emu/state.h
r778r779
7575void state_init(running_machine *machine);
7676
7777/* Initializes the save state registrations */
78void state_save_free(void);
78void state_destructor(void *ptr, size_t size);
7979void state_save_allow_registration(int allowed);
8080int state_save_registration_allowed(void);
8181
src/emu/timer.h
r778r779
118118***************************************************************************/
119119
120120void timer_init(running_machine *machine);
121void timer_free(void);
121void timer_destructor(void *ptr, size_t size);
122122int timer_count_anonymous(void);
123123
124124mame_time mame_timer_next_fire_time(void);
src/emu/validity.c
r778r779
776776
777777   /* now display the proper coin entry list */
778778   mame_printf_error( "%s: %s proper coin sort order should be:\n", driver->source_file, driver->name );
779   for( i = INPUT_STRING_9C_1C; i <= INPUT_STRING_1C_9C; i++ )
780   {
781      for( j = 0; j < coin_len; j++ )
782      {
779   for (i = INPUT_STRING_9C_1C; i <= INPUT_STRING_1C_9C; i++)
780      for (j = 0; j < coin_len; j++)
783781         /* if it's on our list, display it */
784         if ( coin_list[j] == i )
785         {
786            mame_printf_error( "%s\n", input_port_string_from_token(INPUT_PORT_UINT32(i)) );
787         }
788      }
789   }
782         if (coin_list[j] == i)
783            mame_printf_error("%s\n", input_port_string_from_token(INPUT_PORT_UINT32(i)));
790784}
791785
792786
src/emu/romload.c
r778r779
481481      if (drv->name && *drv->name)
482482      {
483483         UINT8 crcs[4];
484         char *fname;
484         astring *fname;
485485
486         fname = assemble_3_strings(drv->name, PATH_SEPARATOR, ROM_GETNAME(romp));
486         fname = astring_assemble_3(astring_alloc(), drv->name, PATH_SEPARATOR, ROM_GETNAME(romp));
487487         if (hash_data_extract_binary_checksum(ROM_GETHASHDATA(romp), HASH_CRC, crcs))
488488         {
489489            UINT32 crc = (crcs[0] << 24) | (crcs[1] << 16) | (crcs[2] << 8) | crcs[3];
490            filerr = mame_fopen_crc(SEARCHPATH_ROM, fname, crc, OPEN_FLAG_READ, &romdata->file);
490            filerr = mame_fopen_crc(SEARCHPATH_ROM, astring_c(fname), crc, OPEN_FLAG_READ, &romdata->file);
491491         }
492492         else
493            filerr = mame_fopen(SEARCHPATH_ROM, fname, OPEN_FLAG_READ, &romdata->file);
494         free(fname);
493            filerr = mame_fopen(SEARCHPATH_ROM, astring_c(fname), OPEN_FLAG_READ, &romdata->file);
494         astring_free(fname);
495495      }
496496
497497   /* return the result */
r778r779
799799{
800800   const game_driver *drv;
801801   const rom_entry *region, *rom;
802   const char *fname;
802   astring *fname;
803803   chd_error err;
804804
805805   /* attempt to open the properly named file */
806   fname = assemble_2_strings(ROM_GETNAME(romp), ".chd");
807   err = chd_open(fname, CHD_OPEN_READ, NULL, image);
808   free((void *)fname);
806   fname = astring_assemble_2(astring_alloc(), ROM_GETNAME(romp), ".chd");
807   err = chd_open(astring_c(fname), CHD_OPEN_READ, NULL, image);
808   astring_free(fname);
809809
810810   /* if that worked, we're done */
811811   if (err == CHDERR_NONE)
r778r779
822822               if (strcmp(ROM_GETNAME(romp), ROM_GETNAME(rom)) != 0 &&
823823                  hash_data_is_equal(ROM_GETHASHDATA(romp), ROM_GETHASHDATA(rom), 0))
824824               {
825                  fname = assemble_2_strings(ROM_GETNAME(rom), ".chd");
826                  err = chd_open(fname, CHD_OPEN_READ, NULL, image);
827                  free((void *)fname);
825                  fname = astring_assemble_2(astring_alloc(), ROM_GETNAME(rom), ".chd");
826                  err = chd_open(astring_c(fname), CHD_OPEN_READ, NULL, image);
827                  astring_free(fname);
828828
829829                  /* if that worked, we're done */
830830                  if (err == CHDERR_NONE)
src/lib/lib.mak
r778r779
2424#-------------------------------------------------
2525
2626UTILOBJS = \
27   $(LIBOBJ)/util/astring.o \
2728   $(LIBOBJ)/util/avcomp.o \
2829   $(LIBOBJ)/util/aviio.o \
2930   $(LIBOBJ)/util/bitmap.o \
src/lib/util/corestr.c
r778r779
1111
1212#include "corestr.h"
1313#include <ctype.h>
14#include <stdlib.h>
1415
1516
1617/*-------------------------------------------------
src/lib/util/corestr.h
r778r779
1515#define __CORESTR_H__
1616
1717#include <string.h>
18#include "osdcomm.h"
1918
2019
2120/***************************************************************************
src/lib/util/astring.c
r0r779
1/***************************************************************************
2
3    astring.c
4
5    Allocated string manipulation functions.
6
7    Copyright (c) 1996-2007, Nicola Salmoria and the MAME Team.
8    Visit http://mamedev.org for licensing and usage restrictions.
9
10****************************************************************************/
11
12#include "astring.h"
13#include "osdcore.h"
14
15#include <string.h>
16#include <stdarg.h>
17#include <stdlib.h>
18#include <ctype.h>
19
20
21
22/***************************************************************************
23    TYPE DEFINITIONS
24***************************************************************************/
25
26struct _astring
27{
28   char *         text;
29   int            alloclen;
30   char         smallbuf[256 - sizeof(int) - sizeof(char *)];
31};
32
33
34
35/***************************************************************************
36    GLOBAL VARIABLES
37***************************************************************************/
38
39static char dummy_text[2] = { 0 };
40static astring dummy_astring = { dummy_text, 1, { 0 } };
41
42
43
44/***************************************************************************
45    INLINE FUNCTIONS
46***************************************************************************/
47
48/*-------------------------------------------------
49    ensure_room - ensure we have room for a
50    given string, or else reallocate our buffer
51-------------------------------------------------*/
52
53INLINE int ensure_room(astring *str, int length)
54{
55   char *newbuf, *oldbuf;
56   int alloclen;
57
58   /* always fail to expand the dummy */
59   if (str == &dummy_astring)
60      return FALSE;
61
62   /* if we have the room, do nothing */
63   if (str->alloclen >= length + 1)
64      return TRUE;
65
66   /* allocate a new buffer with some slop */
67   alloclen = length + 256;
68   newbuf = malloc(alloclen);
69   if (newbuf == NULL)
70      return FALSE;
71
72   /* swap in the new buffer and free the old one */
73   oldbuf = (str->text == str->smallbuf) ? NULL : str->text;
74   str->text = strcpy(newbuf, str->text);
75   str->alloclen = alloclen;
76   if (oldbuf != NULL)
77      free(oldbuf);
78
79   return TRUE;
80}
81
82
83/*-------------------------------------------------
84    safe_string_base - return a "safe" string
85    base for a given start index
86-------------------------------------------------*/
87
88INLINE char *safe_string_base(char *base, int start)
89{
90   int max = strlen(base);
91   return (start >= 0 && start < max) ? base + start : base + max;
92}
93
94
95/*-------------------------------------------------
96    normalize_substr - normalize substr parameters
97-------------------------------------------------*/
98
99INLINE void normalize_substr(int *start, int *count, int length)
100{
101   /* limit start */
102   if (*start < 0)
103      *start = 0;
104   else if (*start > length)
105      *start = length;
106
107   /* update count */
108   if (*count == -1 || *start + *count > length)
109      *count = length - *start;
110}
111
112
113
114/***************************************************************************
115    ASTRING ALLOCATION
116***************************************************************************/
117
118/*-------------------------------------------------
119    astring_alloc - allocate a new astring
120-------------------------------------------------*/
121
122astring *astring_alloc(void)
123{
124   astring *str;
125
126   /* allocate memory; if we fail, return the dummy */
127   str = malloc(sizeof(*str));
128   if (str == NULL)
129      return &dummy_astring;
130   memset(str, 0, sizeof(*str));
131
132   /*  initialize the small buffer */
133   str->text = str->smallbuf;
134   str->alloclen = ARRAY_LENGTH(str->smallbuf);
135   return str;
136}
137
138
139/*-------------------------------------------------
140    astring_free - free an astring
141-------------------------------------------------*/
142
143void astring_free(astring *str)
144{
145   /* ignore attempts to free the dummy */
146   if (str == &dummy_astring)
147      return;
148
149   /* if we allocated additional memory, free that */
150   if (str->text != str->smallbuf)
151      free(str->text);
152   free(str);
153}
154
155
156
157/***************************************************************************
158    INLINE ASTRING CHANGES
159***************************************************************************/
160
161/*-------------------------------------------------
162    astring_cpy - copy one astring into another
163-------------------------------------------------*/
164
165astring *astring_cpy(astring *dst, const astring *src)
166{
167   return astring_cpyc(dst, src->text);
168}
169
170
171/*-------------------------------------------------
172    astring_cpyc - copy a C string into an astring
173-------------------------------------------------*/
174
175astring *astring_cpyc(astring *dst, const char *src)
176{
177   return astring_cpych(dst, src, strlen(src));
178}
179
180
181/*-------------------------------------------------
182    astring_cpych - copy a character array into
183    an astring
184-------------------------------------------------*/
185
186astring *astring_cpych(astring *dst, const char *src, int count)
187{
188   /* make room; if we fail or if dst is the dummy, do nothing */
189   if (!ensure_room(dst, count))
190      return dst;
191
192   /* copy the raw data and NULL-terminate */
193   if (count > 0)
194      memcpy(dst->text, src, count);
195   dst->text[count] = 0;
196   return dst;
197}
198
199
200/*-------------------------------------------------
201    astring_cpysubstr - copy a substring of one
202    string to another
203-------------------------------------------------*/
204
205astring *astring_cpysubstr(astring *dst, const astring *src, int start, int count)
206{
207   normalize_substr(&start, &count, strlen(src->text));
208   return astring_cpych(dst, src->text + start, count);
209}
210
211
212/*-------------------------------------------------
213    astring_ins - insert one astring into another
214-------------------------------------------------*/
215
216astring *astring_ins(astring *dst, int insbefore, const astring *src)
217{
218   return astring_insc(dst, insbefore, src->text);
219}
220
221
222/*-------------------------------------------------
223    astring_insc - insert a C string into an
224    astring
225-------------------------------------------------*/
226
227astring *astring_insc(astring *dst, int insbefore, const char *src)
228{
229   return astring_insch(dst, insbefore, src, strlen(src));
230}
231
232
233/*-------------------------------------------------
234    astring_insch - insert a character array
235    into an astring
236-------------------------------------------------*/
237
238astring *astring_insch(astring *dst, int insbefore, const char *src, int count)
239{
240   int dstlength = strlen(dst->text);
241
242   /* make room; if we fail or if dst is the dummy, do nothing */
243   if (!ensure_room(dst, dstlength + count))
244      return dst;
245
246   /* adjust insbefore to be logical */
247   if (insbefore < 0 || insbefore > dstlength)
248      insbefore = dstlength;
249
250   /* copy the data an NULL-terminate */
251   if (insbefore < dstlength)
252      memmove(dst->text + insbefore + count, dst->text + insbefore, dstlength - insbefore);
253   memcpy(dst->text + insbefore, src, count);
254   dst->text[dstlength + count] = 0;
255   return dst;
256}
257
258
259/*-------------------------------------------------
260    astring_inssubstr - insert a substring of
261    one string to another
262-------------------------------------------------*/
263
264astring *astring_inssubstr(astring *dst, int insbefore, const astring *src, int start, int count)
265{
266   normalize_substr(&start, &count, strlen(src->text));
267   return astring_insch(dst, insbefore, src->text + start, count);
268}
269
270
271/*-------------------------------------------------
272    astring_substr - extract a substring of
273    ourself, removing everything else
274-------------------------------------------------*/
275
276astring *astring_substr(astring *str, int start, int count)
277{
278   /* ignore attempts to do this on the dummy */
279   if (str == &dummy_astring)
280      return str;
281
282   /* normalize parameters */
283   normalize_substr(&start, &count, strlen(str->text));
284
285   /* move the data and NULL-terminate */
286   if (count > 0 && start > 0)
287      memmove(str->text, str->text + start, count);
288   str->text[count] = 0;
289   return str;
290}
291
292
293/*-------------------------------------------------
294    astring_printf - printf text into an astring
295-------------------------------------------------*/
296
297int astring_printf(astring *dst, const char *format, ...)
298{
299   char tempbuf[4096];
300   va_list args;
301   int result;
302
303   /* sprintf into the temporary buffer */
304   va_start(args, format);
305   result = vsprintf(tempbuf, format, args);
306   va_end(args);
307
308   /* set the result */
309   astring_cpyc(dst, tempbuf);
310   return result;
311}
312
313
314
315/***************************************************************************
316    ASTRING QUERIES
317***************************************************************************/
318
319/*-------------------------------------------------
320    astring_c - return a pointer to a C string
321    from an astring
322-------------------------------------------------*/
323
324const char *astring_c(const astring *str)
325{
326   return str->text;
327}
328
329
330/*-------------------------------------------------
331    astring_len - return the length of an astring
332-------------------------------------------------*/
333
334int astring_len(const astring *str)
335{
336   return strlen(str->text);
337}
338
339
340/*-------------------------------------------------
341    astring_cmp - compare one astring to another
342-------------------------------------------------*/
343
344int astring_cmp(const astring *str1, const astring *str2)
345{
346   return astring_cmpc(str1, str2->text);
347}
348
349
350/*-------------------------------------------------
351    astring_cmpc - compare a C string to an astring
352-------------------------------------------------*/
353
354int astring_cmpc(const astring *str1, const char *str2)
355{
356   const char *s1 = str1->text;
357
358   /* loop while equal until we hit the end of strings */
359   while (*s1 != 0 && *str2 != 0 && *s1 == *str2)
360      s1++, str2++;
361   return *s1 - *str2;
362}
363
364
365/*-------------------------------------------------
366    astring_cmpch - compare a character array to
367    an astring
368-------------------------------------------------*/
369
370int astring_cmpch(const astring *str1, const char *str2, int count)
371{
372   const char *s1 = str1->text;
373   int result;
374
375   /* loop while equal until we hit the end of strings */
376   while (count-- > 0 && *s1 != 0 && *str2 != 0 && *s1 == *str2)
377      s1++, str2++;
378   result = (count == -1) ? 0 : *s1 - *str2;
379   if (result == 0 && *s1 != 0)
380      result = 1;
381   return result;
382}
383
384
385/*-------------------------------------------------
386    astring_cmpsubstr - compare a substring to
387    an astring
388-------------------------------------------------*/
389
390int astring_cmpsubstr(const astring *str1, const astring *str2, int start, int count)
391{
392   normalize_substr(&start, &count, strlen(str2->text));
393   return astring_cmpch(str1, str2->text + start, count);
394}
395
396
397/*-------------------------------------------------
398    astring_icmp - case-insenstive compare one
399    astring to another
400-------------------------------------------------*/
401
402int astring_icmp(const astring *str1, const astring *str2)
403{
404   return astring_icmpc(str1, str2->text);
405}
406
407
408/*-------------------------------------------------
409    astring_icmpc - case-insenstive compare a C
410    string to an astring
411-------------------------------------------------*/
412
413int astring_icmpc(const astring *str1, const char *str2)
414{
415   const char *s1 = str1->text;
416
417   /* loop while equal until we hit the end of strings */
418   while (*s1 != 0 && *str2 != 0 && tolower(*s1) == tolower(*str2))
419      s1++, str2++;
420   return tolower(*s1) - tolower(*str2);
421}
422
423
424/*-------------------------------------------------
425    astring_icmpch - case-insenstive compare a
426    character array to an astring
427-------------------------------------------------*/
428
429int astring_icmpch(const astring *str1, const char *str2, int count)
430{
431   const char *s1 = str1->text;
432   int result;
433
434   /* loop while equal until we hit the end of strings */
435   while (count-- > 0 && *s1 != 0 && *str2 != 0 && tolower(*s1) == tolower(*str2))
436      s1++, str2++;
437   result = (count == -1) ? 0 : tolower(*s1) - tolower(*str2);
438   if (result == 0 && *s1 != 0)
439      result = 1;
440   return result;
441}
442
443
444/*-------------------------------------------------
445    astring_icmpsubstr - case-insenstive compare a
446    substring to an astring
447-------------------------------------------------*/
448
449int astring_icmpsubstr(const astring *str1, const astring *str2, int start, int count)
450{
451   normalize_substr(&start, &count, strlen(str2->text));
452   return astring_icmpch(str1, str2->text + start, count);
453}
454
455
456/*-------------------------------------------------
457    astring_chr - return the index of a character
458    in an astring
459-------------------------------------------------*/
460
461int astring_chr(const astring *str, int start, int ch)
462{
463   char *result = strchr(safe_string_base(str->text, start), ch);
464   return (result != NULL) ? (result - str->text) : -1;
465}
466
467
468/*-------------------------------------------------
469    astring_rchr - return the index of a character
470    in an astring, searching from the end
471-------------------------------------------------*/
472
473int astring_rchr(const astring *str, int start, int ch)
474{
475   char *result = strrchr(safe_string_base(str->text, start), ch);
476   return (result != NULL) ? (result - str->text) : -1;
477}
478
479
480/*-------------------------------------------------
481    astring_find - find one astring in another
482-------------------------------------------------*/
483
484int astring_find(const astring *str, int start, const astring *search)
485{
486   return astring_findc(str, start, search->text);
487}
488
489
490/*-------------------------------------------------
491    astring_findc - find a C string in an astring
492-------------------------------------------------*/
493
494int astring_findc(const astring *str, int start, const char *search)
495{
496   char *result = strstr(safe_string_base(str->text, start), search);
497   return (result != NULL) ? (result - str->text) : -1;
498}
499
500
501
502/***************************************************************************
503    ASTRING UTILITIES
504***************************************************************************/
505
506/*-------------------------------------------------
507    astring_delchr - delete all instances of
508    'ch'
509-------------------------------------------------*/
510
511astring *astring_delchr(astring *str, int ch)
512{
513   char *src, *dst;
514
515   /* simple deletion */
516   for (src = dst = str->text; *src != 0; src++)
517      if (*src != ch)
518         *dst++ = *src;
519   *dst = 0;
520
521   return str;
522}
523
524
525/*-------------------------------------------------
526    astring_replacechr - replace all instances of
527    'ch' with 'newch'
528-------------------------------------------------*/
529
530astring *astring_replacechr(astring *str, int ch, int newch)
531{
532   char *text;
533
534   /* simple replacement */
535   for (text = str->text; *text != 0; text++)
536      if (*text == ch)
537         *text = newch;
538
539   return str;
540}
541
542
543/*-------------------------------------------------
544    astring_toupper - convert string to all
545    upper-case
546-------------------------------------------------*/
547
548astring *astring_toupper(astring *str)
549{
550   char *text;
551
552   /* just toupper() on all characters */
553   for (text = str->text; *text != 0; text++)
554      *text = toupper(*text);
555
556   return str;
557}
558
559
560/*-------------------------------------------------
561    astring_tolower - convert string to all
562    lower-case
563-------------------------------------------------*/
564
565astring *astring_tolower(astring *str)
566{
567   char *text;
568
569   /* just toupper() on all characters */
570   for (text = str->text; *text != 0; text++)
571      *text = tolower(*text);
572
573   return str;
574}
575
576
577/*-------------------------------------------------
578    astring_trimspace - remove all space
579    characters from beginning/end
580-------------------------------------------------*/
581
582astring *astring_trimspace(astring *str)
583{
584   char *ptr;
585
586   /* first remove stuff from the end */
587   for (ptr = str->text + strlen(str->text) - 1; ptr >= str->text && isspace(*ptr); ptr--)
588      *ptr = 0;
589
590   /* then count how much to remove from the beginning */
591   for (ptr = str->text; *ptr != 0 && isspace(*ptr); ptr++) ;
592   if (ptr > str->text)
593      astring_substr(str, ptr - str->text, -1);
594
595   return str;
596}
src/lib/util/pool.c
r778r779
22
33    pool.c
44
5    Memory pool code
5    Resource pool code
66
77    Copyright (c) 1996-2006, Nicola Salmoria and the MAME Team.
88    Visit http://mamedev.org for licensing and usage restrictions.
r778r779
1919    CONSTANTS
2020***************************************************************************/
2121
22#define MAGIC_COOKIE   ((size_t)0x12345678)
22#define OBJECT_ENTRY_BLOCK   256
23#define POOL_HASH_SIZE      3797
2324
2425
2526
r778r779
2728    TYPE DEFINITIONS
2829***************************************************************************/
2930
30typedef struct _pool_entry pool_entry;
31struct _pool_entry
31/* an object type entry */
32typedef struct _objtype_entry objtype_entry;
33struct _objtype_entry
3234{
33   memory_pool *   pool;
34   pool_entry *   next;
35   size_t          size;
36   size_t         cookie;
37   char          buffer[1];
35   objtype_entry *      next;
36   UINT32            type;
37   const char *      friendly;
38   void            (*destructor)(void *, size_t);
3839};
3940
4041
41typedef struct _pool_hash_entry pool_hash_entry;
42struct _pool_hash_entry
42/* an entry in a pool */
43typedef struct _object_entry object_entry;
44struct _object_entry
4345{
44   pool_entry *   first;
45   pool_entry **   lastptr;
46   object_entry *      next;
47   objtype_entry *      type;
48   void *            object;
49   size_t             size;
50   const char *      file;
51   int               line;
4652};
4753
4854
49struct _memory_pool
55/* a block of entry items */
56typedef struct _object_entry_block object_entry_block;
57struct _object_entry_block
5058{
51   pool_hash_entry hashtable[3797];
52   void (*fail)(const char *message);
59   object_entry_block *next;
60   object_entry      entry[OBJECT_ENTRY_BLOCK];
5361};
5462
5563
64/* the object pool itself */
65struct _object_pool
66{
67   object_entry *      hashtable[POOL_HASH_SIZE];
68   object_entry *      freelist;
69   object_entry_block *blocklist;
70   objtype_entry *      typelist;
71   void             (*fail)(const char *message);
72};
5673
74
75/* an iterator over objects in a pool */
76struct _object_pool_iterator
77{
78   object_pool *      pool;
79   object_type         type;
80   int               hashnum;
81   object_entry *      last;
82};
83
84
85
5786/***************************************************************************
5887    FUNCTION PROTOTYPES
5988***************************************************************************/
6089
61static void report_failure(memory_pool *pool, const char *format, ...);
62static int hash_value(memory_pool *pool, void *ptr);
90static void memory_destruct(void *object, size_t size);
91static void report_failure(object_pool *pool, const char *format, ...);
6392
6493
6594
6695/***************************************************************************
67    IMPLEMENTATION
96    INLINE FUNCTIONS
6897***************************************************************************/
6998
7099/*-------------------------------------------------
71    pool_create - creates a new memory pool
100    hash_object - compute the hash for a given
101    object
72102-------------------------------------------------*/
73103
74memory_pool *pool_create(void (*fail)(const char *message))
104INLINE int hash_object(void *object)
75105{
76   memory_pool *pool;
77   int i;
106   return ((size_t)object >> 4) % POOL_HASH_SIZE;
107}
78108
109
110/*-------------------------------------------------
111    hash_object - compute the hash for a given
112    object
113-------------------------------------------------*/
114
115INLINE objtype_entry *get_object_type(object_pool *pool, object_type type)
116{
117   objtype_entry *entry;
118
119   for (entry = pool->typelist; entry != NULL; entry = entry->next)
120      if (entry->type == type)
121         return entry;
122
123   return NULL;
124}
125
126
127
128/***************************************************************************
129    RESOURCE POOL MANAGEMENT
130***************************************************************************/
131
132/*-------------------------------------------------
133    pool_alloc - allocates a new memory pool
134-------------------------------------------------*/
135
136object_pool *pool_alloc(void (*fail)(const char *message))
137{
138   object_pool *pool;
139
79140   /* allocate memory for the pool itself */
80141   pool = malloc(sizeof(*pool));
81142   if (pool == NULL)
82143      return NULL;
144   memset(pool, 0, sizeof(*pool));
83145
84   /* initialize the data structures */
85   pool->fail = fail;
86   for (i = 0; i < ARRAY_LENGTH(pool->hashtable); i++)
146   /* register the built-in types */
147   pool_type_register(pool, OBJTYPE_MEMORY, "Memory", memory_destruct);
148
149   return pool;
150}
151
152
153/*-------------------------------------------------
154    pool_type_register - register a new pool
155    type
156-------------------------------------------------*/
157
158void pool_type_register(object_pool *pool, object_type type, const char *friendly, void (*destructor)(void *, size_t))
159{
160   objtype_entry *newtype = get_object_type(pool, type);
161
162   /* if the type doesn't already exist... */
163   if (newtype == NULL)
87164   {
88      pool->hashtable[i].first = NULL;
89      pool->hashtable[i].lastptr = &pool->hashtable[i].first;
165      /* allocate a new entry */
166      newtype = malloc(sizeof(*newtype));
167      if (newtype == NULL)
168      {
169         report_failure(pool, "Error adding new type %s\n", friendly);
170         return;
171      }
172      memset(newtype, 0, sizeof(*newtype));
173
174      /* link us in */
175      newtype->next = pool->typelist;
176      pool->typelist = newtype;
90177   }
91178
92   return pool;
179   /* fill in the type information */
180   newtype->type = type;
181   newtype->friendly = friendly;
182   newtype->destructor = destructor;
93183}
94184
95185
r778r779
98188    in a pool
99189-------------------------------------------------*/
100190
101void pool_clear(memory_pool *pool)
191void pool_clear(object_pool *pool)
102192{
103   pool_entry *next_entry;
104   pool_entry *entry;
105   int i;
193   int hashnum;
106194
107   /* free all data in the pool */
108   for (i = 0; i < ARRAY_LENGTH(pool->hashtable); i++)
195   /* iterate over hash buckets */
196   for (hashnum = 0; hashnum < ARRAY_LENGTH(pool->hashtable); hashnum++)
109197   {
110      for (entry = pool->hashtable[i].first; entry != NULL; entry = next_entry)
198      object_entry *entry, *next;
199
200      /* iterate over entries in this hash bucket and free them */
201      for (entry = pool->hashtable[hashnum]; entry != NULL; entry = next)
111202      {
112         next_entry = entry->next;
113         free(entry);
203         /* remember the next entry */
204         next = entry->next;
205
206         /* call the destructor */
207         (*entry->type->destructor)(entry->object, entry->size);
208
209         /* add ourself to the free list */
210         entry->next = pool->freelist;
211         pool->freelist = entry;
114212      }
115213
116      /* reinitialize the data structures */
117      pool->hashtable[i].first = NULL;
118      pool->hashtable[i].lastptr = &pool->hashtable[i].first;
214      /* reset the list we just walked */
215      pool->hashtable[hashnum] = NULL;
119216   }
120217}
121218
r778r779
125222    contained memory blocks
126223-------------------------------------------------*/
127224
128void pool_free(memory_pool *pool)
225void pool_free(object_pool *pool)
129226{
227   object_entry_block *block, *nextblock;
228   objtype_entry *type, *nexttype;
229
230   /* clear the pool */
130231   pool_clear(pool);
232
233   /* free all entry blocks */
234   for (block = pool->blocklist; block != NULL; block = nextblock)
235   {
236      nextblock = block->next;
237      free(block);
238   }
239
240   /* free all types */
241   for (type = pool->typelist; type != NULL; type = nexttype)
242   {
243      nexttype = type->next;
244      free(type);
245   }
246
247   /* free the pool itself */
131248   free(pool);
132249}
133250
134251
135/*-------------------------------------------------
136    pool_malloc_file_line - allocates memory in a
137    memory pool
138-------------------------------------------------*/
139252
140void *pool_malloc_file_line(memory_pool *pool, size_t size, const char *file, int line)
141{
142   return pool_realloc_file_line(pool, NULL, size, file, line);
143}
253/***************************************************************************
254    OBJECT MANAGEMENT
255***************************************************************************/
144256
145
146257/*-------------------------------------------------
147    pool_realloc_file_line - reallocates memory in
148    a memory pool
258    pool_object_add_file_line - add an object to
259    the resource pool
149260-------------------------------------------------*/
150261
151void *pool_realloc_file_line(memory_pool *pool, void *ptr, size_t size, const char *file, int line)
262void *pool_object_add_file_line(object_pool *pool, object_type _type, void *object, size_t size, const char *file, int line)
152263{
153   pool_entry *new_entry = NULL;
154   pool_entry **entry = NULL;
155   pool_hash_entry *hash_entry = NULL;
156   pool_entry *old_entry;
264   objtype_entry *type = get_object_type(pool, _type);
265   int hashnum = hash_object(object);
266   object_entry *entry;
157267
158   /* if we're resizing or freeing a pointer, find the existing entry */
159   if (ptr != NULL)
268   /* if we have an invalid type, fail */
269   if (type == NULL)
160270   {
161      pool_entry *orig_entry;
271      report_failure(pool, "pool_object_add (via %s:%d): Attempted to add object of unknown type", file, line, (int)size);
272      return object;
273   }
162274
163      /* recover the pool from the pointer (ignoring the specified pool) */
164      orig_entry = (pool_entry *)((UINT8 *)ptr - offsetof(pool_entry, buffer));
165      if (orig_entry->cookie != MAGIC_COOKIE)
166      {
167         report_failure(pool, "pool_realloc: Non-pool pointer 0x%p", ptr);
168         return NULL;
169      }
170      pool = orig_entry->pool;
275   /* if we get a NULL object, fail */
276   if (object == NULL)
277   {
278      report_failure(pool, "pool_object_add (via %s:%d): Attempted to add a NULL object of size %d", file, line, (int)size);
279      return object;
280   }
171281
172      /* find the entry that this block is referring to */
173      hash_entry = &pool->hashtable[hash_value(pool, ptr)];
174      for (entry = &hash_entry->first; *entry != NULL; entry = &(*entry)->next)
175         if ((*entry)->buffer == ptr)
176            break;
282   /* allocate a new entry */
283   if (pool->freelist == NULL)
284   {
285      object_entry_block *block;
286      int entrynum;
177287
178      /* not found? */
179      if (*entry == NULL)
180      {
181         report_failure(pool, "pool_realloc: Unknown pointer 0x%p", ptr);
288      /* if we need a new block, allocate that now */
289      block = malloc(sizeof(*block));
290      if (block == NULL)
182291         return NULL;
183      }
292      memset(block, 0, sizeof(*block));
184293
185      if (size != 0)
186      {
187         /* reallocate the entry */
188         new_entry = realloc(*entry, offsetof(pool_entry, buffer) + size);
189         if (new_entry == NULL)
190         {
191            report_failure(pool, "pool_realloc: Failure to realloc %u bytes", size);
192            return NULL;
193         }
294      /* hook us into the blocklist */
295      block->next = pool->blocklist;
296      pool->blocklist = block;
194297
195         /* keep the newly reallocated entry in the linked list */
196         *entry = new_entry;
197         if (new_entry->next == NULL)
198            hash_entry->lastptr = &new_entry->next;
199      }
200   }
201   else if (size != 0)
202   {
203      /* allocate new entry */
204      new_entry = malloc(offsetof(pool_entry, buffer) + size);
205      if (new_entry == NULL)
298      /* add all entries to the free list */
299      for (entrynum = 0; entrynum < ARRAY_LENGTH(block->entry); entrynum++)
206300      {
207         report_failure(pool, "pool_realloc: Failure to malloc %u bytes", size);
208         return NULL;
301         block->entry[entrynum].next = pool->freelist;
302         pool->freelist = &block->entry[entrynum];
209303      }
210
211      /* a new entry, set up magic values */
212      new_entry->pool = pool;
213      new_entry->cookie = MAGIC_COOKIE;
214304   }
215305
216   /* track the old entry, if any, because we're about to mess with the chain */
217   old_entry = (entry && *entry) ? *entry : NULL;
306   /* remove the head of the freelist */
307   entry = pool->freelist;
308   pool->freelist = entry->next;
218309
219   /* if we have a new entry, perform activities done when allocating and reallocating */
220   if (new_entry != NULL)
221   {
222      size_t old_size;
310   /* fill in the entry */
311   entry->type = type;
312   entry->object = object;
313   entry->size = size;
314   entry->file = file;
315   entry->line = line;
223316
224      /* specify the new entry's size */
225      new_entry->size = size;
317   /* hook us into the list */
318   entry->next = pool->hashtable[hashnum];
319   pool->hashtable[hashnum] = entry;
320   return object;
321}
226322
227      /* did the memory block grow? */
228      old_size = (old_entry != NULL) ? old_entry->size : 0;
229      if (size > old_size)
323
324/*-------------------------------------------------
325    pool_object_remove - remove an entry from a
326    pool, optionally calling its destructor
327-------------------------------------------------*/
328
329void *pool_object_remove(object_pool *pool, void *object, int destruct)
330{
331   int hashnum = hash_object(object);
332   object_entry **entryptr;
333
334   /* find the object in question and remove it */
335   for (entryptr = &pool->hashtable[hashnum]; *entryptr != NULL; entryptr = &(*entryptr)->next)
336      if ((*entryptr)->object == object)
230337      {
231#ifdef MAME_DEBUG
232         /* randomize memory for debugging */
233         rand_memory(new_entry->buffer + old_size, size - old_size);
234#endif
338         object_entry *entry = *entryptr;
339
340         /* call the destructor */
341         if (destruct)
342            (*entry->type->destructor)(entry->object, entry->size);
343
344         /* remove us from the list */
345         *entryptr = entry->next;
346
347         /* add us to the free list */
348         entry->next = pool->freelist;
349         pool->freelist = entry;
350         break;
235351      }
236   }
237352
238   /* the memory allocation (if any) has succeeded, now we need to relink
239     * under the (presumably) new hash value */
240   if (entry != NULL)
241   {
242      /* unlink this entry from the link list with the old hash value */
243      *entry = (*entry)->next;
244      if (*entry == NULL)
245         hash_entry->lastptr = entry;
246   }
353   return NULL;
354}
247355
248   /* if we allocated memory, we now have to add this entry to the new chain */
249   if (new_entry != NULL)
356
357/*-------------------------------------------------
358    pool_object_exists - return TRUE if an
359    object exists in the pool
360-------------------------------------------------*/
361
362int pool_object_exists(object_pool *pool, object_type type, void *object)
363{
364   int hashnum = hash_object(object);
365   object_entry *entry;
366
367   /* find the object in question */
368   for (entry = pool->hashtable[hashnum]; entry != NULL; entry = entry->next)
369      if (entry->object == object && (type == OBJTYPE_WILDCARD || entry->type->type == type))
370         return TRUE;
371
372   return FALSE;
373}
374
375
376
377/***************************************************************************
378    OBJECT ITERATORS
379***************************************************************************/
380
381/*-------------------------------------------------
382    pool_iterate_begin - begin iterating over
383    objects in an object pool
384-------------------------------------------------*/
385
386object_pool_iterator *pool_iterate_begin(object_pool *pool, object_type type)
387{
388   object_pool_iterator *iter;
389
390   /* allocate the iterator */
391   iter = malloc(sizeof(*iter));
392   if (iter == NULL)
393      return NULL;
394   memset(iter, 0, sizeof(*iter));
395
396   /* fill it in */
397   iter->pool = pool;
398   iter->type = type;
399   iter->hashnum = 0;
400   iter->last = NULL;
401   return iter;
402}
403
404
405/*-------------------------------------------------
406    pool_iterate_next - get the next object in the
407    object pool
408-------------------------------------------------*/
409
410int pool_iterate_next(object_pool_iterator *iter, void **objectptr, size_t *sizeptr, object_type *typeptr)
411{
412   /* advance from the last one */
413   while (iter->hashnum < ARRAY_LENGTH(iter->pool->hashtable))
250414   {
251      /* identify the new hash entry */
252      hash_entry = &pool->hashtable[hash_value(pool, new_entry->buffer)];
415      /* if the last entry is non-NULL, advance */
416      if (iter->last == NULL)
417         iter->last = iter->pool->hashtable[iter->hashnum++];
418      else
419         iter->last = iter->last->next;
253420
254      /* add this entry to the new hash entry's linked list */
255      *hash_entry->lastptr = new_entry;
256      hash_entry->lastptr = &new_entry->next;
257      new_entry->next = NULL;
421      /* stop when we get one */
422      if (iter->last != NULL)
423      {
424         if (objectptr != NULL)
425            *objectptr = iter->last;
426         if (sizeptr != NULL)
427            *sizeptr = iter->last->size;
428         if (typeptr != NULL)
429            *typeptr = iter->last->type->type;
430         return TRUE;
431      }
258432   }
259   else if (old_entry != NULL)
260   {
261      /* looks like we're freeing the entry */
262      free(old_entry);
263   }
264433
265   return (new_entry != NULL) ? new_entry->buffer : NULL;
434   /* nothing left */
435   return FALSE;
266436}
267437
268438
269439/*-------------------------------------------------
270    pool_strdup_file_line - copies a string into a
271    pool
440    pool_iterate_end - finish iterating over
441    objects in an object pool
272442-------------------------------------------------*/
273443
274char *pool_strdup_file_line(memory_pool *pool, const char *str, const char *file, int line)
444void pool_iterate_end(object_pool_iterator *iter)
275445{
276   char *new_str = (char *)pool_malloc_file_line(pool, strlen(str) + 1, file, line);
277   if (new_str != NULL)
278      strcpy(new_str, str);
279   return new_str;
446   free(iter);
280447}
281448
282449
450
451/***************************************************************************
452    MEMORY HELPERS
453***************************************************************************/
454
283455/*-------------------------------------------------
284    pointer_in_block - returns whether a pointer
285    is within a memory block
456    pool_malloc_file_line - allocates memory in a
457    memory pool
286458-------------------------------------------------*/
287459
288static int pointer_in_block(const UINT8 *ptr, const UINT8 *block, size_t block_size)
460void *pool_malloc_file_line(object_pool *pool, size_t size, const char *file, int line)
289461{
290   return (ptr >= block) && (ptr < (block + block_size));
462#ifdef MALLOC_DEBUG
463   void *ptr = malloc_file_line(size, file, line);
464#else
465   void *ptr = malloc(size);
466#endif
467   return pool_object_add_file_line(pool, OBJTYPE_MEMORY, ptr, size, file, line);
291468}
292469
293470
294471/*-------------------------------------------------
295    pool_owns_pointer - is the given pointer
296    owned by the pool?
472    pool_realloc_file_line - reallocs memory in a
473    memory pool
297474-------------------------------------------------*/
298475
299int pool_owns_pointer(memory_pool *pool, void *ptr)
476void *pool_realloc_file_line(object_pool *pool, void *ptr, size_t size, const char *file, int line)
300477{
301   pool_hash_entry *hash_entry;
302   pool_entry *entry;
478   if (ptr != NULL)
479      pool_object_remove(pool, ptr, FALSE);
480#ifdef MALLOC_DEBUG
481   ptr = realloc_file_line(ptr, size, file, line);
482#else
483   ptr = realloc(ptr, size);
484#endif
485   if (size != 0)
486      pool_object_add_file_line(pool, OBJTYPE_MEMORY, ptr, size, file, line);
487   return ptr;
488}
303489
304   /* identify the hash header */
305   hash_entry = &pool->hashtable[hash_value(pool, ptr)];
306490
307   /* find the entry that this block is referring to */
308   for (entry = hash_entry->first; entry != NULL; entry = entry->next)
309      if (entry->buffer == ptr)
310         return TRUE;
491/*-------------------------------------------------
492    pool_strdup_file_line - strdup in a memory
493    pool
494-------------------------------------------------*/
311495
312   return FALSE;
496char *pool_strdup_file_line(object_pool *pool, const char *str, const char *file, int line)
497{
498   char *ptr = pool_malloc_file_line(pool, strlen(str) + 1, file, line);
499   if (ptr != NULL)
500      strcpy(ptr, str);
501   return ptr;
313502}
314503
315504
505
506/***************************************************************************
507    GENERIC DESTRUCTORS
508***************************************************************************/
509
316510/*-------------------------------------------------
317    pool_contains_block - determines if a pool
318    contains a memory block
511    memory_destruct - generic destructor
512    that just does a free() on the object
319513-------------------------------------------------*/
320514
321memory_block_overlap pool_contains_block(memory_pool *pool, void *ptr, size_t size,
322   void **found_block, size_t *found_block_size)
515static void memory_destruct(void *object, size_t size)
323516{
324   int i;
325   memory_block_overlap overlap = OVERLAP_NONE;
326   const UINT8 *this_memory = (const UINT8 *) ptr;
327   size_t this_memory_size = size;
328   pool_entry *entry;
329   const UINT8 *that_memory = NULL;
330   size_t that_memory_size = 0;
517   free(object);
518}
331519
332   /* loop through the memory blocks in this pool */
333   for (i = 0; i < ARRAY_LENGTH(pool->hashtable); i++)
334   {
335      for (entry = pool->hashtable[i].first; entry != NULL; entry = entry->next)
336      {
337         that_memory = (const UINT8 *) entry->buffer;
338         that_memory_size = entry->size;
339520
340         /* check for overlap */
341         if (pointer_in_block(this_memory, that_memory, that_memory_size))
342         {
343            if (pointer_in_block(this_memory + this_memory_size - 1, that_memory, that_memory_size))
344               overlap = OVERLAP_FULL;
345            else
346               overlap = OVERLAP_PARTIAL;
347            break;
348         }
349         else if (pointer_in_block(that_memory, this_memory, this_memory_size))
350         {
351            if (pointer_in_block(that_memory + that_memory_size - 1, this_memory, this_memory_size))
352               overlap = OVERLAP_FULL;
353            else
354               overlap = OVERLAP_PARTIAL;
355            break;
356         }
357521
358         that_memory = NULL;
359         that_memory_size = 0;
360      }
361   }
362522
363   if (found_block != NULL)
364      *found_block = (void *) that_memory;
365   if (found_block_size != NULL)
366      *found_block_size = that_memory_size;
367   return overlap;
523/*-------------------------------------------------
524    pointer_in_block - returns whether a pointer
525    is within a memory block
526-------------------------------------------------*/
527
528static int pointer_in_block(const UINT8 *ptr, const UINT8 *block, size_t block_size)
529{
530   return (ptr >= block && ptr < block + block_size);
368531}
369532
370533
r778r779
378541    failure callback
379542-------------------------------------------------*/
380543
381static void report_failure(memory_pool *pool, const char *format, ...)
544static void report_failure(object_pool *pool, const char *format, ...)
382545{
383546   /* only do the work if we have a callback */
384547   if (pool->fail != NULL)
r778r779
398561
399562
400563
401/*-------------------------------------------------
402    hash_value - returns the hash value for a
403    pointer
404-------------------------------------------------*/
405
406static int hash_value(memory_pool *pool, void *ptr)
407{
408   UINT64 ptr_int = (UINT64) (size_t) ptr;
409   return (int) ((ptr_int ^ (ptr_int >> 3)) % ARRAY_LENGTH(pool->hashtable));
410}
411
412
413
414564/***************************************************************************
415565    TESTING FUNCTIONS
416566***************************************************************************/
r778r779
436586
437587int test_memory_pools(void)
438588{
439   memory_pool *pool;
589   object_pool *pool;
440590   void *ptrs[16];
441591   int i;
442592
443593   has_memory_error = FALSE;
444   pool = pool_create(memory_error);
594   pool = pool_alloc(memory_error);
445595   memset(ptrs, 0, sizeof(ptrs));
446596
447597   ptrs[0] = pool_malloc(pool, 50);
src/lib/util/astring.h
r0r779
1/***************************************************************************
2
3    astring.h
4
5    Allocated string manipulation functions.
6
7    Copyright (c) 1996-2007, Nicola Salmoria and the MAME Team.
8    Visit http://mamedev.org for licensing and usage restrictions.
9
10***************************************************************************/
11
12#pragma once
13
14#ifndef __ASTRING_H__
15#define __ASTRING_H__
16
17#include "pool.h"
18
19
20/***************************************************************************
21    TYPE DEFINITIONS
22***************************************************************************/
23
24typedef struct _astring astring;
25
26
27
28/***************************************************************************
29    FUNCTION PROTOTYPES
30***************************************************************************/
31
32
33/* ----- astring allocation ----- */
34
35/* allocate a new astring */
36astring *astring_alloc(void);
37
38/* free an astring */
39void astring_free(astring *str);
40
41
42
43/* ----- inline astring changes ----- */
44
45/* copy one astring into another */
46astring *astring_cpy(astring *dst, const astring *src);
47
48/* copy a C string into an astring */
49astring *astring_cpyc(astring *dst, const char *src);
50
51/* copy a character array into an astring */
52astring *astring_cpych(astring *dst, const char *src, int count);
53
54/* copy a substring of one string into another */
55astring *astring_cpysubstr(astring *dst, const astring *src, int start, int count);
56
57/* insert one astring into another */
58astring *astring_ins(astring *dst, int insbefore, const astring *src);
59
60/* insert a C string into an astring */
61astring *astring_insc(astring *dst, int insbefore, const char *src);
62
63/* insert a character array into an astring */
64astring *astring_insch(astring *dst, int insbefore, const char *src, int count);
65
66/* insert a substring of one string into another */
67astring *astring_inssubstr(astring *dst, int insbefore, const astring *src, int start, int count);
68
69/* extract a substring of ourself, removing everything else */
70astring *astring_substr(astring *str, int start, int count);
71
72/* formatted printf to an astring */
73int astring_printf(astring *dst, const char *format, ...);
74
75
76
77/* ----- astring queries ----- */
78
79/* return a pointer to a C string from an astring */
80const char *astring_c(const astring *str);
81
82/* return the length of an astring */
83int astring_len(const astring *str);
84
85/* compare two astrings */
86int astring_cmp(const astring *str1, const astring *str2);
87
88/* compare an astring to a C string */
89int astring_cmpc(const astring *str1, const char *str2);
90
91/* compare an astring to a character buffer */
92int astring_cmpch(const astring *str1, const char *str2, int count);
93
94/* compare an astring to a character buffer */
95int astring_cmpsubstr(const astring *str1, const astring *str2, int start, int count);
96
97/* case-insenstive compare two astrings */
98int astring_icmp(const astring *str1, const astring *str2);
99
100/* case-insenstive compare an astring to a C string */
101int astring_icmpc(const astring *str1, const char *str2);
102
103/* case-insenstive compare an astring to a character buffer */
104int astring_icmpch(const astring *str1, const char *str2, int count);
105
106/* case-insenstive compare an astring to a character buffer */
107int astring_icmpsubstr(const astring *str1, const astring *str2, int start, int count);
108
109/* search an astring for a character, returning offset or -1 if not found */
110int astring_chr(const astring *str, int start, int ch);
111
112/* reverse search an astring for a character, returning offset or -1 if not found */
113int astring_rchr(const astring *str, int start, int ch);
114
115/* search in an astring for another astring, returning offset or -1 if not found */
116int astring_find(const astring *str, int start, const astring *search);
117
118/* search in an astring for a C string, returning offset or -1 if not found */
119int astring_findc(const astring *str, int start, const char *search);
120
121
122
123/* ----- astring utilties ----- */
124
125/* delete all instances of 'ch' */
126astring *astring_delchr(astring *str, int ch);
127
128/* replace all instances of 'ch' with 'newch' */
129astring *astring_replacechr(astring *str, int ch, int newch);
130
131/* convert string to all upper-case */
132astring *astring_toupper(astring *str);
133
134/* convert string to all lower-case */
135astring *astring_tolower(astring *str);
136
137/* remove all space characters from beginning/end */
138astring *astring_trimspace(astring *str);
139
140
141
142/***************************************************************************
143    INLINE FUNCTIONS
144***************************************************************************/
145
146/* allocate a new duplicate of an astring */
147INLINE astring *astring_dup(const astring *str)
148{
149   return astring_cpy(astring_alloc(), str);
150}
151
152/* allocate a new duplicate of an astring */
153INLINE astring *astring_dupc(const char *str)
154{
155   return astring_cpyc(astring_alloc(), str);
156}
157
158/* allocate a new duplicate of an astring */
159INLINE astring *astring_dupch(const char *str, int count)
160{
161   return astring_cpych(astring_alloc(), str, count);
162}
163
164/* allocate a duplicate of a substring */
165INLINE astring *astring_dupsubstr(const astring *str, int start, int count)
166{
167   return astring_cpysubstr(astring_alloc(), str, start, count);
168}
169
170
171/* reset an astring to an empty string */
172INLINE astring *astring_reset(astring *dst)
173{
174   return astring_cpyc(dst, "");
175}
176
177
178/* concatenate one astring to the end of another */
179INLINE astring *astring_cat(astring *dst, const astring *src)
180{
181   return astring_ins(dst, -1, src);
182}
183
184/* concatenate a C string to the end of an astring */
185INLINE astring *astring_catc(astring *dst, const char *src)
186{
187   return astring_insc(dst, -1, src);
188}
189
190/* concatenate a character array to the end of an astring */
191INLINE astring *astring_catch(astring *dst, const char *src, int count)
192{
193   return astring_insch(dst, -1, src, count);
194}
195
196/* concatenate a substring of one string into another */
197INLINE astring *astring_catsubstr(astring *dst, const astring *src, int start, int count)
198{
199   return astring_inssubstr(dst, -1, src, start, count);
200}
201
202
203/* assemble an astring from 2 C strings */
204INLINE astring *astring_assemble_2(astring *dst, const char *src1, const char *src2)
205{
206   return astring_catc(astring_cpyc(dst, src1), src2);
207}
208
209/* assemble an astring from 3 C strings */
210INLINE astring *astring_assemble_3(astring *dst, const char *src1, const char *src2, const char *src3)
211{
212   return astring_catc(astring_assemble_2(dst, src1, src2), src3);
213}
214
215/* assemble an astring from 4 C strings */
216INLINE astring *astring_assemble_4(astring *dst, const char *src1, const char *src2, const char *src3, const char *src4)
217{
218   return astring_catc(astring_assemble_3(dst, src1, src2, src3), src4);
219}
220
221/* assemble an astring from 5 C strings */
222INLINE astring *astring_assemble_5(astring *dst, const char *src1, const char *src2, const char *src3, const char *src4, const char *src5)
223{
224   return astring_catc(astring_assemble_4(dst, src1, src2, src3, src4), src5);
225}
226
227
228#endif /* __ASTRING_H__ */
src/lib/util/pool.h
r778r779
22
33    pool.h
44
5    Memory pool code
5    Abstract object pool management
66
77    Copyright (c) 1996-2006, Nicola Salmoria and the MAME Team.
88    Visit http://mamedev.org for licensing and usage restrictions.
r778r779
1616
1717
1818/***************************************************************************
19    MACROS
20***************************************************************************/
21
22/* helper macros for memory pools that pass file/line number */
23#define pool_malloc(pool, size)         pool_malloc_file_line((pool), (size), __FILE__, __LINE__)
24#define pool_realloc(pool, ptr, size)   pool_realloc_file_line((pool), (ptr), (size), __FILE__, __LINE__)
25#define pool_strdup(pool, size)         pool_strdup_file_line((pool), (size), __FILE__, __LINE__)
26
27/* macro to define a 4-character type for a pool */
28#define OBJECT_TYPE(a,b,c,d)         (((a) << 24) | ((b) << 16) | ((c) << 8) | (d))
29
30/* built-in pool types */
31#define OBJTYPE_WILDCARD            (0)
32#define OBJTYPE_MEMORY               OBJECT_TYPE('m','e','m','o')
33
34
35
36/***************************************************************************
1937    TYPE DEFINITIONS
2038***************************************************************************/
2139
22typedef struct _memory_pool memory_pool;
40/* pool types are UINT32s */
41typedef UINT32 object_type;
2342
24typedef enum _memory_block_overlap memory_block_overlap;
25enum _memory_block_overlap
26{
27   OVERLAP_NONE,
28   OVERLAP_PARTIAL,
29   OVERLAP_FULL
30};
43/* opaque type representing a pool of objects */
44typedef struct _object_pool object_pool;
3145
46/* opaque type representing an iterator over pool objects */
47typedef struct _object_pool_iterator object_pool_iterator;
3248
3349
50
3451/***************************************************************************
3552    PROTOTYPES
3653***************************************************************************/
3754
38memory_pool *pool_create(void (*fail)(const char *message));
39void pool_clear(memory_pool *pool);
40void pool_free(memory_pool *pool);
4155
42void *pool_malloc_file_line(memory_pool *pool, size_t size, const char *file, int line) ATTR_MALLOC;
43void *pool_realloc_file_line(memory_pool *pool, void *ptr, size_t size, const char *file, int line);
44char *pool_strdup_file_line(memory_pool *pool, const char *str, const char *file, int line);
56/* ----- object pool management ----- */
4557
46#define pool_malloc(pool, size)            pool_malloc_file_line((pool), (size), __FILE__, __LINE__)
47#define pool_realloc(pool, ptr, size)      pool_realloc_file_line((pool), (ptr), (size), __FILE__, __LINE__)
48#define pool_strdup(pool, size)            pool_strdup_file_line((pool), (size), __FILE__, __LINE__)
58/* allocate a new object pool */
59object_pool *pool_alloc(void (*fail)(const char *message));
4960
50memory_block_overlap pool_contains_block(memory_pool *pool, void *ptr, size_t size,
51   void **found_block, size_t *found_block_size);
61/* register a new object type; returns TRUE if the type already existed and was overridden */
62void pool_type_register(object_pool *pool, object_type type, const char *friendly, void (*destructor)(void *, size_t));
5263
64/* free all allocated objects in a pool */
65void pool_clear(object_pool *pool);
66
67/* free an object pool, including all allocated objects */
68void pool_free(object_pool *pool);
69
70
71
72/* ----- object management ----- */
73
74/* add an object to the pool, along with its filename/line number */
75void *pool_object_add_file_line(object_pool *pool, object_type type, void *object, size_t size, const char *file, int line);
76
77/* remove an object from the pool (optionally calling destructor) */
78void *pool_object_remove(object_pool *pool, void *object, int destruct);
79
80/* does an object exist in the pool? */
81int pool_object_exists(object_pool *pool, object_type type, void *object);
82
83
84
85/* ----- object iterators ----- */
86
87/* begin iterating over objects in an object pool */
88object_pool_iterator *pool_iterate_begin(object_pool *pool, object_type type);
89
90/* get the next object in the object pool */
91int pool_iterate_next(object_pool_iterator *iter, void **objectptr, size_t *sizeptr, object_type *typeptr);
92
93/* finish iterating over objects in an object pool */
94void pool_iterate_end(object_pool_iterator *iter);
95
96
97
98/* ----- memory helpers ----- */
99
100/* malloc memory and register it with the given pool */
101void *pool_malloc_file_line(object_pool *pool, size_t size, const char *file, int line);
102
103/* realloc memory and register it with the given pool */
104void *pool_realloc_file_line(object_pool *pool, void *ptr, size_t size, const char *file, int line);
105
106/* strdup memory and register it with the given pool */
107char *pool_strdup_file_line(object_pool *pool, const char *str, const char *file, int line);
108
109
110
111/* ----- miscellaneous ----- */
112
113/* internal unit tests */
53114int test_memory_pools(void);
54115
116
55117#endif /* __POOL_H__ */
src/lib/util/corefile.c
r778r779
582582{
583583   char convbuf[1024];
584584   char *pconvbuf = convbuf;
585   int count = 0;
585586
586587   /* is this the beginning of the file?  if so, write a byte order mark */
587   if (f->offset == 0)
588   if (f->offset == 0 && !(f->openflags & OPEN_FLAG_NO_BOM))
588589   {
589590      *pconvbuf++ = 0xef;
590591      *pconvbuf++ = 0xbb;
r778r779
609610      else
610611         *pconvbuf++ = *s;
611612      s++;
613
614      /* if we overflow, break into chunks */
615      if (pconvbuf >= convbuf + ARRAY_LENGTH(convbuf) - 10)
616      {
617         count += core_fwrite(f, convbuf, pconvbuf - convbuf);
618         pconvbuf = convbuf;
619      }
612620   }
613   *pconvbuf++ = 0;
614621
615   return core_fwrite(f, convbuf, (UINT32)strlen(convbuf));
622   /* final flush */
623   if (pconvbuf != convbuf)
624      count += core_fwrite(f, convbuf, pconvbuf - convbuf);
625
626   return count;
616627}
617628
618629
r778r779
654665    assumptions about path separators
655666-------------------------------------------------*/
656667
657const char *core_filename_extract_base(const char *name, int strip_extension)
668astring *core_filename_extract_base(astring *result, const char *name, int strip_extension)
658669{
659   char *result, *dest;
660   const char *start;
661
662670   /* find the start of the name */
663   start = name + strlen(name);
671   const char *start = name + strlen(name);
664672   while (start > name && !is_directory_separator(start[-1]))
665673      start--;
666674
667   /* allocate memory for the new string */
668   result = malloc(strlen(start) + 1);
669   if (result == NULL)
670      return NULL;
675   /* copy the rest into an astring */
676   astring_cpyc(result, start);
671677
672   /* copy in the base name up to the extension */
673   dest = result;
674   while (*start != 0 && (!strip_extension || *start != '.'))
675      *dest++ = *start++;
676   *dest = 0;
677
678   /* chop the extension if present */
679   if (strip_extension)
680      astring_substr(result, 0, astring_rchr(result, 0, '.'));
678681   return result;
679682}
680683
src/lib/util/options.c
r778r779
1212#include <stdarg.h>
1313#include <ctype.h>
1414#include "options.h"
15#include "pool.h"
15#include "astring.h"
1616
1717
1818
r778r779
4646struct _options_hash_entry
4747{
4848   options_hash_entry *   next;            /* link to the next entry */
49   const char *         name;            /* name under the current link */
49   astring *            name;            /* name under the current link */
5050   options_data *         data;            /* link to associated options_data */
5151};
5252
r778r779
6060   UINT32               seqid;            /* sequence ID; bumped on each change */
6161   int                  error_reported;      /* have we reported an error on this option yet? */
6262   int                  priority;         /* priority of the data set */
63   const char *         data;            /* data for this item */
64   const char *         defdata;         /* default data for this item */
63   astring *            data;            /* data for this item */
64   astring *            defdata;         /* default data for this item */
6565   const char *         description;      /* description for this item */
6666   options_range_type      range_type;         /* the type of range to apply to this item */
6767   options_range_parameter   range_minimum;      /* the minimum of the range */
r778r779
7373/* structure holding information about a collection of options */
7474struct _core_options
7575{
76   memory_pool *         pool;            /* memory pool holding options */
7776   void (*output[OPTMSG_COUNT])(const char *s);/* output callbacks */
7877
7978   /* linked list, for sequential iteration */
r778r779
8584};
8685
8786
88
87/* information about an in-progress options enumeration */
8988struct _options_enumerator
9089{
91   options_data *current;
90   options_data *         current;
9291};
9392
9493
r778r779
104103static void message(core_options *opts, options_message msgtype, const char *format, ...);
105104static UINT32 hash_value(core_options *opts, const char *str);
106105static void output_printf(void (*output)(const char *s), const char *format, ...);
107static const char *copy_string(core_options *opts, const char *start, const char *end, const char *original);
108106
109107
110108
r778r779
145143
146144core_options *options_create(void (*fail)(const char *message))
147145{
148   core_options *opts;
149   memory_pool *pool;
150
151   /* create a pool for this option block */
152   pool = pool_create(fail);
153   if (pool == NULL)
154      goto error;
155
156146   /* allocate memory for the option block */
157   opts = (core_options *)pool_malloc(pool, sizeof(*opts));
147   core_options *opts = (core_options *)malloc(sizeof(*opts));
158148   if (opts == NULL)
159149      goto error;
160150
161151   /* and set up the structure */
162152   memset(opts, 0, sizeof(*opts));
163   opts->pool = pool;
164153   opts->datalist_nextptr = &opts->datalist;
165154   return opts;
166155
167156error:
168   if (pool != NULL)
169      pool_free(pool);
170157   return NULL;
171158}
172159
r778r779
177164
178165void options_free(core_options *opts)
179166{
180   memory_pool *pool = opts->pool;
181   opts->pool = NULL;
182   pool_free(pool);
167   options_data *data, *next;
168
169   /* loop over data items and free them */
170   for (data = opts->datalist; data != NULL; data = next)
171   {
172      int linknum;
173
174      next = data->next;
175
176      /* free names */
177      for (linknum = 0; linknum < ARRAY_LENGTH(data->links); linknum++)
178         if (data->links[linknum].name != NULL)
179            astring_free(data->links[linknum].name);
180
181      /* free strings */
182      astring_free(data->data);
183      astring_free(data->defdata);
184
185      /* free the data itself */
186      free(data);
187   }
188
189   /* free the options itself */
190   free(opts);
183191}
184192
185193
r778r779
208216   for (data = opts->datalist; data != NULL; data = data->next)
209217      if (data->priority <= priority)
210218      {
211         data->data = copy_string(opts, data->defdata, NULL, data->data);
219         astring_cpy(data->data, data->defdata);
212220         data->priority = OPTION_PRIORITY_DEFAULT;
213221      }
214222}
r778r779
227235   for (data = dest_opts->datalist; data != NULL; data = data->next)
228236      if (!(data->flags & OPTION_HEADER))
229237      {
230         options_data *srcdata = find_entry_data(src_opts, data->links[0].name, FALSE);
238         options_data *srcdata = find_entry_data(src_opts, astring_c(data->links[0].name), FALSE);
231239
232240         /* if the option exists in the source, set it in the destination */
233241         if (srcdata != NULL)
234            options_set_string(dest_opts, srcdata->links[0].name, srcdata->data, srcdata->priority);
242            options_set_string(dest_opts, astring_c(srcdata->links[0].name), astring_c(srcdata->data), srcdata->priority);
235243      }
236244
237245   return TRUE;
r778r779
250258   for (data = opts1->datalist; data != NULL; data = data->next)
251259      if (!(data->flags & OPTION_HEADER))
252260      {
253         const char *value1 = options_get_string(opts1, data->links[0].name);
254         const char *value2 = options_get_string(opts2, data->links[0].name);
261         const char *value1 = options_get_string(opts1, astring_c(data->links[0].name));
262         const char *value2 = options_get_string(opts2, astring_c(data->links[0].name));
255263
256264         /* if the values differ, return false */
257265         if (strcmp(value1, value2) != 0)
r778r779
281289      int i;
282290
283291      /* allocate a new item */
284      options_data *data = pool_malloc(opts->pool, sizeof(*data));
292      options_data *data = malloc(sizeof(*data));
285293      if (data == NULL)
286294         return FALSE;
287295      memset(data, 0, sizeof(*data));
r778r779
293301      /* do we match an existing entry? */
294302      for (i = 0; i < ARRAY_LENGTH(data->links) && match == NULL; i++)
295303         if (data->links[i].name != NULL)
296            match = find_entry_data(opts, data->links[i].name, FALSE);
304            match = find_entry_data(opts, astring_c(data->links[i].name), FALSE);
297305
298306      /* if so, throw away this entry and replace the data */
299307      if (match != NULL)
r778r779
301309         /* free what we've allocated so far */
302310         for (i = 0; i < ARRAY_LENGTH(data->links); i++)
303311            if (data->links[i].name != NULL)
304               pool_realloc(opts->pool, (void *)data->links[i].name, 0);
305         pool_realloc(opts->pool, data, 0);
312               astring_free(data->links[i].name);
313         free(data);
306314
307315         /* use the matching entry as our data */
308316         data = match;
r778r779
311319      /* otherwise, finish making the new entry */
312320      else
313321      {
322         /* allocate strings */
323         data->data = astring_alloc();
324         data->defdata = astring_alloc();
325
314326         /* copy the flags, and set the value equal to the default */
315327         data->flags = entrylist->flags;
316328         data->description = entrylist->description;
r778r779
323335         for (i = 0; i < ARRAY_LENGTH(data->links); i++)
324336            if (data->links[i].name != NULL)
325337            {
326               int hash_entry = hash_value(opts, data->links[i].name);
338               int hash_entry = hash_value(opts, astring_c(data->links[i].name));
327339
328340               /* set up link */
329341               data->links[i].data = data;
r778r779
333345      }
334346
335347      /* copy in the data and default data values */
336      data->data = copy_string(opts, entrylist->defvalue, NULL, data->data);
337      data->defdata = copy_string(opts, entrylist->defvalue, NULL, data->defdata);
348      if (entrylist->defvalue != NULL)
349      {
350         astring_cpyc(data->data, entrylist->defvalue);
351         astring_cpyc(data->defdata, entrylist->defvalue);
352      }
338353      data->priority = OPTION_PRIORITY_DEFAULT;
339354   }
340355   return TRUE;
r778r779
355370      return FALSE;
356371
357372   /* update the data and default data; note that we assume that data == defdata */
358   data->data = copy_string(opts, defvalue, NULL, data->data);
359   data->defdata = copy_string(opts, defvalue, NULL, data->defdata);
373   astring_cpyc(data->data, defvalue);
374   astring_cpyc(data->defdata, defvalue);
360375   data->priority = OPTION_PRIORITY_DEFAULT;
361376   return TRUE;
362377}
r778r779
540555         core_fprintf(inifile, "\n#\n# %s\n#\n", data->description);
541556
542557      /* otherwise, output entries for all non-deprecated and non-command items */
543      else if ((data->flags & (OPTION_DEPRECATED | OPTION_INTERNAL | OPTION_COMMAND)) == 0 && data->links[0].name[0] != 0)
558      else if ((data->flags & (OPTION_DEPRECATED | OPTION_INTERNAL | OPTION_COMMAND)) == 0)
544559      {
545         if (data->data == NULL)
546            core_fprintf(inifile, "# %-23s <NULL> (not set)\n", data->links[0].name);
547         else if (strchr(data->data, ' ') != NULL)
548            core_fprintf(inifile, "%-25s \"%s\"\n", data->links[0].name, data->data);
560         if (astring_chr(data->data, 0, ' ') != -1)
561            core_fprintf(inifile, "%-25s \"%s\"\n", astring_c(data->links[0].name), astring_c(data->data));
549562         else
550            core_fprintf(inifile, "%-25s %s\n", data->links[0].name, data->data);
563            core_fprintf(inifile, "%-25s %s\n", astring_c(data->links[0].name), astring_c(data->data));
551564      }
552565   }
553566}
r778r779
570583         fprintf(inifile, "\n#\n# %s\n#\n", data->description);
571584
572585      /* otherwise, output entries for all non-deprecated and non-command items */
573      else if ((data->flags & (OPTION_DEPRECATED | OPTION_INTERNAL | OPTION_COMMAND)) == 0 && data->links[0].name[0] != 0)
586      else if ((data->flags & (OPTION_DEPRECATED | OPTION_INTERNAL | OPTION_COMMAND)) == 0)
574587      {
575         if (data->data == NULL)
576            fprintf(inifile, "# %-23s <NULL> (not set)\n", data->links[0].name);
577         else if (strchr(data->data, ' ') != NULL)
578            fprintf(inifile, "%-25s \"%s\"\n", data->links[0].name, data->data);
588         if (astring_chr(data->data, 0, ' ') != -1)
589            fprintf(inifile, "%-25s \"%s\"\n", astring_c(data->links[0].name), astring_c(data->data));
579590         else
580            fprintf(inifile, "%-25s %s\n", data->links[0].name, data->data);
591            fprintf(inifile, "%-25s %s\n", astring_c(data->links[0].name), astring_c(data->data));
581592      }
582593   }
583594}
r778r779
601612
602613      /* otherwise, output entries for all non-deprecated items */
603614      else if ((data->flags & (OPTION_DEPRECATED | OPTION_INTERNAL)) == 0 && data->description != NULL)
604         output_printf(output, "-%-20s%s\n", data->links[0].name, data->description);
615         output_printf(output, "-%-20s%s\n", astring_c(data->links[0].name), data->description);
605616   }
606617}
607618
r778r779
626637      message(opts, OPTMSG_ERROR, "Unexpected option %s queried\n", name);
627638
628639   /* copy if non-NULL */
629   else if (data->data != NULL)
630      value = data->data;
640   else
641      value = astring_c(data->data);
631642
632643   return value;
633644}
r778r779
648659      message(opts, OPTMSG_ERROR, "Unexpected boolean option %s queried\n", name);
649660
650661   /* also error if we don't have a valid boolean value */
651   else if (data->data == NULL || sscanf(data->data, "%d", &value) != 1 || value < 0 || value > 1)
662   else if (sscanf(astring_c(data->data), "%d", &value) != 1 || value < 0 || value > 1)
652663   {
653      if (data->defdata != NULL)
654      {
655         options_set_string(opts, name, data->defdata, 0);
656         sscanf(data->data, "%d", &value);
657      }
664      options_set_string(opts, name, astring_c(data->defdata), 0);
665      sscanf(astring_c(data->data), "%d", &value);
658666      if (!data->error_reported)
659667      {
660668         message(opts, OPTMSG_ERROR, "Illegal boolean value for %s; reverting to %d\n", data->links[0].name, value);
r778r779
680688      message(opts, OPTMSG_ERROR, "Unexpected integer option %s queried\n", name);
681689
682690   /* also error if we don't have a valid integer value */
683   else if (data->data == NULL || sscanf(data->data, "%d", &value) != 1)
691   else if (sscanf(astring_c(data->data), "%d", &value) != 1)
684692   {
685      if (data->defdata != NULL)
686      {
687         options_set_string(opts, name, data->defdata, 0);
688         sscanf(data->data, "%d", &value);
689      }
693      options_set_string(opts, name, astring_c(data->defdata), 0);
694      sscanf(astring_c(data->data), "%d", &value);
690695      if (!data->error_reported)
691696      {
692697         message(opts, OPTMSG_ERROR, "Illegal integer value for %s; reverting to %d\n", data->links[0].name, value);
r778r779
712717      message(opts, OPTMSG_ERROR, "Unexpected float option %s queried\n", name);
713718
714719   /* also error if we don't have a valid floating point value */
715   else if (data->data == NULL || sscanf(data->data, "%f", &value) != 1)
720   else if (sscanf(astring_c(data->data), "%f", &value) != 1)
716721   {
717      if (data->defdata != NULL)
718      {
719         options_set_string(opts, name, data->defdata, 0);
720         sscanf(data->data, "%f", &value);
721      }
722      options_set_string(opts, name, astring_c(data->defdata), 0);
723      sscanf(astring_c(data->data), "%f", &value);
722724      if (!data->error_reported)
723725      {
724726         message(opts, OPTMSG_ERROR, "Illegal float value for %s; reverting to %f\n", data->links[0].name, (double)value);
r778r779
832834   while (option_name == NULL && enumerator->current != NULL)
833835   {
834836      /* retrieve the current option name and advance the enumerator */
835      option_name = enumerator->current->links[0].name;
837      option_name = astring_c(enumerator->current->links[0].name);
836838      enumerator->current = enumerator->current->next;
837839   }
838840   return option_name;
r778r779
907909
908910   /* scan all entries */
909911   for (link = opts->hashtable[hash_entry]; link != NULL; link = link->next)
910      if (!(link->data->flags & OPTION_HEADER) && link->name != NULL && strcmp(string, link->name) == 0)
912      if (!(link->data->flags & OPTION_HEADER) && link->name != NULL && astring_cmpc(link->name, string) == 0)
911913         return link->data;
912914
913915   /* haven't found it?  if we are prefixed with "no", then try to search for that */
r778r779
930932
931933static void update_data(core_options *opts, options_data *data, const char *newdata, int priority)
932934{
933   const char *dataend = NULL;
934   const char *datastart = NULL;
935   const char *dataend = newdata + strlen(newdata) - 1;
936   const char *datastart = newdata;
935937   float f;
936938   int i;
937939
938   if (newdata != NULL)
939   {
940      dataend = newdata + strlen(newdata) - 1;
941      datastart = newdata;
940   /* strip off leading/trailing spaces */
941   while (isspace(*datastart) && datastart <= dataend)
942      datastart++;
943   while (isspace(*dataend) && datastart <= dataend)
944      dataend--;
942945
943      /* strip off leading/trailing spaces */
944      while (isspace(*datastart) && datastart <= dataend)
945         datastart++;
946      while (isspace(*dataend) && datastart <= dataend)
947         dataend--;
946   /* strip off quotes */
947   if (datastart != dataend && *datastart == '"' && *dataend == '"')
948      datastart++, dataend--;
948949
949      /* strip off quotes */
950      if (datastart != dataend && *datastart == '"' && *dataend == '"')
951         datastart++, dataend--;
952   }
953
954950   /* check against range */
955951   switch (data->range_type)
956952   {
r778r779
963959         i = 0;
964960         if (sscanf(datastart, "%d", &i) != 1)
965961         {
966            message(opts, OPTMSG_ERROR, "Illegal integer value for %s; keeping value of %s\n", data->links[0].name, data->data);
962            message(opts, OPTMSG_ERROR, "Illegal integer value for %s; keeping value of %s\n", data->links[0].name, astring_c(data->data));
967963            data->error_reported = TRUE;
968964            return;
969965         }
970966         if (i < data->range_minimum.i || i > data->range_maximum.i)
971967         {
972968            message(opts, OPTMSG_ERROR, "Invalid %s value (must be between %i and %i); keeping value of %s\n",
973               data->links[0].name, data->range_minimum.i, data->range_maximum.i, data->data);
969               data->links[0].name, data->range_minimum.i, data->range_maximum.i, astring_c(data->data));
974970            data->error_reported = TRUE;
975971            return;
976972         }
r778r779
981977         f = 0;
982978         if (sscanf(datastart, "%f", &f) != 1)
983979         {
984            message(opts, OPTMSG_ERROR, "Illegal float value for %s; keeping value of %s\n", data->links[0].name, data->data);
980            message(opts, OPTMSG_ERROR, "Illegal float value for %s; keeping value of %s\n", data->links[0].name, astring_c(data->data));
985981            data->error_reported = TRUE;
986982            return;
987983         }
988984         if (f < data->range_minimum.f || f > data->range_maximum.f)
989985         {
990986            message(opts, OPTMSG_ERROR, "Invalid %s value (must be between %f and %f); keeping value of %s\n",
991               data->links[0].name, data->range_minimum.f, data->range_maximum.f, data->data);
987               data->links[0].name, data->range_minimum.f, data->range_maximum.f, astring_c(data->data));
992988            data->error_reported = TRUE;
993989            return;
994990         }
r778r779
1000996      return;
1001997
1002998   /* allocate a copy of the data */
1003   data->data = copy_string(opts, datastart, dataend + 1, data->data);
999   astring_cpych(data->data, datastart, dataend + 1 - datastart);
10041000   data->priority = priority;
10051001
10061002   /* bump the seqid and clear the error reporting */
r778r779
10271023      /* find the end of this entry and copy the string */
10281024      for (end = start; *end != 0 && *end != ';' && *end != '('; end++)
10291025         ;
1030      data->links[curentry].name = copy_string(opts, start, end, NULL);
1026      data->links[curentry].name = astring_dupch(start, end - start);
10311027
10321028      /* if we hit the end of the source, stop */
10331029      if (*end != ';')
r778r779
11001096
11011097   output(buf);
11021098}
1103
1104
1105/*-------------------------------------------------
1106    copy_string - allocate a copy of a string
1107-------------------------------------------------*/
1108
1109static const char *copy_string(core_options *opts, const char *start, const char *end, const char *original)
1110{
1111   char *result;
1112
1113   /* copy of a NULL is NULL */
1114   if (start == NULL)
1115   {
1116      if (original != NULL)
1117         pool_realloc(opts->pool, (void *)original, 0);
1118      return NULL;
1119   }
1120
1121   /* if no end, figure it out */
1122   if (end == NULL)
1123      end = start + strlen(start);
1124
1125   /* allocate, copy, and NULL-terminate */
1126   result = pool_realloc(opts->pool, (void *)original, (end - start) + 1);
1127   if (result == NULL)
1128      return NULL;
1129   memcpy(result, start, end - start);
1130   result[end - start] = 0;
1131
1132   return result;
1133}
src/lib/util/corefile.h
r778r779
1515#define __COREFILE_H__
1616
1717#include "osdcore.h"
18#include "astring.h"
1819
1920
2021
2122/***************************************************************************
23    ADDITIONAL OPEN FLAGS
24***************************************************************************/
25
26#define OPEN_FLAG_NO_BOM      0x0100      /* don't output BOM */
27
28
29
30/***************************************************************************
2231    TYPE DEFINITIONS
2332***************************************************************************/
2433
r778r779
96105/* ----- filename utilities ----- */
97106
98107/* extract the base part of a filename (remove extensions and paths) */
99const char *core_filename_extract_base(const char *name, int strip_extension);
108astring *core_filename_extract_base(astring *result, const char *name, int strip_extension);
100109
101110/* true if the given filename ends with a particular extension */
102111int core_filename_ends_with(const char *filename, const char *extension);
src/mess/tagpool.c
r778r779
2727
2828void tagpool_init(tag_pool *tpool)
2929{
30   tpool->mempool = pool_create(NULL);
30   tpool->mempool = pool_alloc(NULL);
3131   tpool->header = NULL;
3232}
3333
src/mess/opresolv.c
r778r779
3434
3535struct _option_resolution
3636{
37   memory_pool *pool;
37   object_pool *pool;
3838   const char *specification;
3939   size_t option_count;
4040   struct option_resolution_entry *entries;
r778r779
206206   const struct OptionGuide *guide_entry;
207207   int option_count;
208208   int opt = -1;
209   memory_pool *pool;
209   object_pool *pool;
210210
211211   assert(guide);
212212
r778r779
214214   option_count = option_resolution_countoptions(guide, specification);
215215
216216   /* create a memory pool for this structure */
217   pool = pool_create(NULL);
217   pool = pool_alloc(NULL);
218218   if (!pool)
219219      goto outofmemory;
220220
src/mess/tagpool.h
r778r779
2121
2222typedef struct
2323{
24   memory_pool *mempool;
24   object_pool *mempool;
2525   struct tag_pool_header *header;
2626} tag_pool;
2727
src/mess/tools/messdocs/messdocs.c
r778r779
1616   const char *title;
1717   const char *default_topic;
1818
19   memory_pool *pool;
19   object_pool *pool;
2020   XML_Parser parser;
2121   int depth;
2222   int error;
r778r779
466466   char *s;
467467
468468   memset(&state, 0, sizeof(state));
469   state.pool = pool_create(NULL);
469   state.pool = pool_alloc(NULL);
470470
471471   /* open the DOC */
472472   in = fopen(toc_filename, "r");
src/mess/tools/messtest/testmess.c
r778r779
141141
142142/* command list */
143143static mess_pile command_pile;
144static memory_pool *command_pool;
144static object_pool *command_pool;
145145static int command_count;
146146static struct messtest_command new_command;
147147
r778r779
157157
158158
159159
160static char *assemble_software_path(const game_driver *gamedrv, const char *filename)
160static astring *assemble_software_path(astring *str, const game_driver *gamedrv, const char *filename)
161161{
162   char *result;
163162   if (osd_is_absolute_path(filename))
164      result = mame_strdup(filename);
163      astring_cpyc(str, filename);
165164   else
166      result = assemble_5_strings("software", PATH_SEPARATOR, gamedrv->name, PATH_SEPARATOR, filename);
167   return result;
165      astring_assemble_5(str, "software", PATH_SEPARATOR, gamedrv->name, PATH_SEPARATOR, filename);
166   return str;
168167}
169168
170169
r778r779
274273   messtest_result_t rc;
275274   clock_t begin_time;
276275   double real_run_time;
277   char *fullpath = NULL;
276   astring *fullpath = NULL;
278277   const char *device_opt;
279278   const char *fake_argv[2];
280279
r778r779
320319   while(current_command->command_type == MESSTEST_COMMAND_IMAGE_PRELOAD)
321320   {
322321      /* get the path */
323      fullpath = assemble_software_path(driver, current_command->u.image_args.filename);
322      fullpath = assemble_software_path(astring_alloc(), driver, current_command->u.image_args.filename);
324323
325324      /* get the option name */
326325      device_opt = device_typename(current_command->u.image_args.device_type);
327326
328327      /* set the option */
329      options_set_string(mame_options(), device_opt, fullpath, OPTION_PRIORITY_CMDLINE);
328      options_set_string(mame_options(), device_opt, astring_c(fullpath), OPTION_PRIORITY_CMDLINE);
330329
331330      /* cleanup */
332      free(fullpath);
331      astring_free(fullpath);
333332      fullpath = NULL;
334333
335334      /* next command */
r778r779
659658   char buf[128];
660659   const struct IODevice *dev;
661660   const char *file_extensions;
662   char *filepath;
661   astring *filepath;
663662   int success;
664663   const game_driver *gamedrv;
665664
r778r779
729728   for (gamedrv = Machine->gamedrv; !success && gamedrv; gamedrv = mess_next_compatible_driver(gamedrv))
730729   {
731730      /* assemble the full path */
732      filepath = assemble_software_path(gamedrv, filename);
731      filepath = assemble_software_path(astring_alloc(), gamedrv, filename);
733732
734733      /* actually create or load the image */
735734      switch(current_command->command_type)
736735      {
737736         case MESSTEST_COMMAND_IMAGE_CREATE:
738            success = (image_create(image, filepath, format_index, NULL) == INIT_PASS);
737            success = (image_create(image, astring_c(filepath), format_index, NULL) == INIT_PASS);
739738            break;
740739         
741740         case MESSTEST_COMMAND_IMAGE_LOAD:
742            success = (image_load(image, filepath) == INIT_PASS);
741            success = (image_load(image, astring_c(filepath)) == INIT_PASS);
743742            break;
744743
745744         default:
746745            fatalerror("Unexpected error");
747746            break;
748747      }
749      free(filepath);
748      astring_free(filepath);
750749   }
751750   if (!success)
752751   {
r778r779
14951494   int result;
14961495
14971496   pile_init(&command_pile);
1498   command_pool = pool_create(NULL);
1497   command_pool = pool_alloc(NULL);
14991498
15001499   memset(&new_command, 0, sizeof(new_command));
15011500   command_count = 0;
src/mess/tools/imgtool/imgtool.mak
r778r779
11IMGTOOL_LIB_OBJS =                     \
2   $(OBJ)/emu/restrack.o               \
32   $(OBJ)/emu/mamecore.o               \
43   $(OBJ)/version.o                  \
54   $(OBJ)/mess/tagpool.o               \
src/mess/tools/imgtool/windows/wimgtool.c
r778r779
752752
753753
754754
755static imgtoolerr_t setup_openfilename_struct(win_open_file_name *ofn, memory_pool *pool,
755static imgtoolerr_t setup_openfilename_struct(win_open_file_name *ofn, object_pool *pool,
756756   HWND window, BOOL creating_file)
757757{
758758   imgtoolerr_t err = IMGTOOLERR_SUCCESS;
r778r779
10771077static void menu_new(HWND window)
10781078{
10791079   imgtoolerr_t err = IMGTOOLERR_SUCCESS;
1080   memory_pool *pool;
1080   object_pool *pool;
10811081   win_open_file_name ofn;
10821082   const imgtool_module *module;
10831083   option_resolution *resolution = NULL;
10841084
1085   pool = pool_create(NULL);
1085   pool = pool_alloc(NULL);
10861086
10871087   err = setup_openfilename_struct(&ofn, pool, window, TRUE);
10881088   if (err)
r778r779
11201120static void menu_open(HWND window)
11211121{
11221122   imgtoolerr_t err = IMGTOOLERR_SUCCESS;
1123   memory_pool *pool;
1123   object_pool *pool;
11241124   win_open_file_name ofn;
11251125   const imgtool_module *module;
11261126   wimgtool_info *info;
11271127   int read_or_write;
11281128
1129   pool = pool_create(NULL);
1129   pool = pool_alloc(NULL);
11301130   if (!pool)
11311131   {
11321132      err = IMGTOOLERR_OUTOFMEMORY;
src/mess/tools/imgtool/imgtool.c
r778r779
2626struct _imgtool_image
2727{
2828   const imgtool_module *module;
29   memory_pool *pool;
29   object_pool *pool;
3030};
3131
3232struct _imgtool_partition
3333{
3434   imgtool_image *image;
35   memory_pool *pool;
35   object_pool *pool;
3636   int partition_index;
3737   UINT64 base_block;
3838   UINT64 block_count;
r778r779
624624
625625***************************************************************************/
626626
627static char *pool_strdup_allow_null(memory_pool *pool, char *s)
627static char *pool_strdup_allow_null(object_pool *pool, char *s)
628628{
629629   return s ? pool_strdup(pool, s) : NULL;
630630}
r778r779
639639   imgtool_partition_info partition_info[32];
640640   UINT64 base_block, block_count;
641641   size_t partition_extra_bytes;
642   memory_pool *pool;
642   object_pool *pool;
643643   imgtoolerr_t (*open_partition)(imgtool_partition *partition, UINT64 first_block, UINT64 block_count);
644644
645645   if (image->module->list_partitions)
r778r779
680680   partition_extra_bytes = imgtool_get_info_int(&imgclass, IMGTOOLINFO_INT_PARTITION_EXTRA_BYTES);
681681
682682   /* allocate the new memory pool */
683   pool = pool_create(NULL);
683   pool = pool_alloc(NULL);
684684   if (!pool)
685685   {
686686      err = IMGTOOLERR_OUTOFMEMORY;
r778r779
10201020   imgtoolerr_t err;
10211021   imgtool_stream *f = NULL;
10221022   imgtool_image *image = NULL;
1023   memory_pool *pool = NULL;
1023   object_pool *pool = NULL;
10241024   size_t size;
10251025
10261026   if (outimg)
r778r779
10341034   }
10351035
10361036   /* create a memory pool */
1037   pool = pool_create(NULL);
1037   pool = pool_alloc(NULL);
10381038   if (!pool)
10391039   {
10401040      err = IMGTOOLERR_OUTOFMEMORY;
src/mess/tools/imgtool/library.c
r778r779
1717
1818struct _imgtool_library
1919{
20   memory_pool *pool;
20   object_pool *pool;
2121   imgtool_module *first;
2222   imgtool_module *last;
2323};
r778r779
2727imgtool_library *imgtool_library_create(void)
2828{
2929   imgtool_library *library;
30   memory_pool *pool;
30   object_pool *pool;
3131
3232   /* create a memory pool */
33   pool = pool_create(NULL);
33   pool = pool_alloc(NULL);
3434   if (!pool)
3535      goto error;
3636
src/mess/image.c
r778r779
3232{
3333   /* variables that persist across image mounts */
3434   tag_pool tagpool;
35   memory_pool *mempool;
35   object_pool *mempool;
3636   const struct IODevice *dev;
3737
3838   /* error related info */
r778r779
145145   {
146146      for (j = 0; j < Machine->devices[i].count; j++)
147147      {
148         images[indx + j].mempool = pool_create(memory_error);
148         images[indx + j].mempool = pool_alloc(memory_error);
149149
150150         /* setup the device */
151151         tagpool_init(&images[indx + j].tagpool);
r778r779
229229static image_error_t set_image_filename(mess_image *image, const char *filename, const char *zippath)
230230{
231231   image_error_t err = IMAGE_ERROR_SUCCESS;
232   char *alloc_filename = NULL;
232   astring *alloc_filename = NULL;
233233   char *new_name;
234234   char *new_dir;
235235   char *new_working_directory;
r778r779
249249   /* do we have to concatenate the names? */
250250   if (zippath)
251251   {
252      alloc_filename = assemble_3_strings(filename, PATH_SEPARATOR, zippath);
253      filename = alloc_filename;
252      alloc_filename = astring_assemble_3(astring_alloc(), filename, PATH_SEPARATOR, zippath);
253      filename = astring_c(alloc_filename);
254254   }
255255
256256   /* copy the string */
r778r779
281281   image->working_directory = new_working_directory;
282282
283283done:
284   if (alloc_filename)
285      free(alloc_filename);
284   if (alloc_filename != NULL)
285      astring_free(alloc_filename);
286286   return err;
287287}
288288
r778r779
427427{
428428   file_error filerr = FILERR_NOT_FOUND;
429429   image_error_t err = IMAGE_ERROR_FILENOTFOUND;
430   char *full_path = NULL;
430   astring *full_path = NULL;
431431   const char *file_extension;
432432
433433   /* assemble the path */
434434   if (software_path)
435435   {
436      full_path = assemble_5_strings(software_path, PATH_SEPARATOR, gamedrv->name, PATH_SEPARATOR, path);
437      path = full_path;
436      full_path = astring_assemble_5(astring_alloc(), software_path, PATH_SEPARATOR, gamedrv->name, PATH_SEPARATOR, path);
437      path = astring_c(full_path);
438438   }
439439
440440   /* quick check to see if the file is a ZIP file */
r778r779
490490      assert(is_loaded(image));
491491
492492   /* free up memory, and exit */
493   if (full_path)
494      free(full_path);
493   if (full_path != NULL)
494      astring_free(full_path);
495495   return err;
496496}
497497
r778r779
15621562{
15631563   file_error filerr;
15641564   char *basename_noext;
1565   char *fname;
1565   astring *fname;
15661566
15671567   basename_noext = strip_extension(image_basename(image));
15681568   if (!basename_noext)
15691569      return FILERR_OUT_OF_MEMORY;
1570   fname = assemble_4_strings(Machine->gamedrv->name, PATH_SEPARATOR, basename_noext, ".nv");
1571   filerr = mame_fopen(SEARCHPATH_NVRAM, fname, openflags, file);
1572   free(fname);
1570   fname = astring_assemble_4(astring_alloc(), Machine->gamedrv->name, PATH_SEPARATOR, basename_noext, ".nv");
1571   filerr = mame_fopen(SEARCHPATH_NVRAM, astring_c(fname), openflags, file);
1572   astring_free(fname);
15731573   free(basename_noext);
15741574   return filerr;
15751575}
src/mess/video/aquarius.c
r778r779
2828   aquarius_tilemap = tilemap_create(
2929      aquarius_gettileinfo,
3030      tilemap_scan_rows,
31      TILEMAP_OPAQUE,
31      TILEMAP_TYPE_OPAQUE,
3232      8, 8,
3333      40, 24);
3434}
src/mess/video/abc80.c
r778r779
6565   mame_timer_adjust(abc80_blink_timer, time_zero, 0, MAME_TIME_IN_HZ(ABC80_XTAL/2/6/64/312/16));
6666
6767   tx_tilemap = tilemap_create(abc80_get_tile_info, abc80_tilemap_scan,
68      TILEMAP_OPAQUE, 6, 10, 40, 24);
68      TILEMAP_TYPE_OPAQUE, 6, 10, 40, 24);
6969
7070   tilemap_set_scrolldx(tx_tilemap, ABC80_HDSTART, ABC80_HDSTART);
7171   tilemap_set_scrolldy(tx_tilemap, ABC80_VDSTART, ABC80_VDSTART);
src/mess/video/x68k.c
r778r779
891891   Machine->gfx[gfx_index]->total_colors = 16;
892892
893893   /* Tilemaps */
894   x68k_bg0_8 = tilemap_create(x68k_get_bg0_tile,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,64,64);
895   x68k_bg1_8 = tilemap_create(x68k_get_bg1_tile,tilemap_scan_rows,TILEMAP_TRANSPARENT,8,8,64,64);
896   x68k_bg0_16 = tilemap_create(x68k_get_bg0_tile_16,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,64,64);
897   x68k_bg1_16 = tilemap_create(x68k_get_bg1_tile_16,tilemap_scan_rows,TILEMAP_TRANSPARENT,16,16,64,64);
894   x68k_bg0_8 = tilemap_create(x68k_get_bg0_tile,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,64,64);
895   x68k_bg1_8 = tilemap_create(x68k_get_bg1_tile,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,8,8,64,64);
896   x68k_bg0_16 = tilemap_create(x68k_get_bg0_tile_16,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,64,64);
897   x68k_bg1_16 = tilemap_create(x68k_get_bg1_tile_16,tilemap_scan_rows,TILEMAP_TYPE_TRANSPARENT,16,16,64,64);
898898
899899   tilemap_set_transparent_pen(x68k_bg0_8,0);
900900   tilemap_set_transparent_pen(x68k_bg1_8,0);
src/mess/video/osi.c
r778r779
2222VIDEO_START( sb2m600 )
2323{
2424   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows,
25      TILEMAP_OPAQUE, 8, 8, 32, 32);
25      TILEMAP_TYPE_OPAQUE, 8, 8, 32, 32);
2626}
2727
2828VIDEO_START( uk101 )
2929{
3030   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows,
31      TILEMAP_OPAQUE, 8, 16, 32, 32);
31      TILEMAP_TYPE_OPAQUE, 8, 16, 32, 32);
3232}
3333
3434VIDEO_UPDATE( sb2m600 )
src/mess/video/abc80x.c
r778r779
5252VIDEO_START( abc800m )
5353{
5454   tx_tilemap = tilemap_create(abc800_get_tile_info, tilemap_scan_rows,
55      TILEMAP_OPAQUE, 6, 10, 80, 24);
55      TILEMAP_TYPE_OPAQUE, 6, 10, 80, 24);
5656}
5757
5858static TILE_GET_INFO(abc800c_get_tile_info)
r778r779
6666VIDEO_START( abc800c )
6767{
6868   tx_tilemap = tilemap_create(abc800c_get_tile_info, tilemap_scan_rows,
69      TILEMAP_OPAQUE, 6, 10, 40, 24);
69      TILEMAP_TYPE_OPAQUE, 6, 10, 40, 24);
7070}
7171
7272VIDEO_UPDATE( abc800 )
r778r779
100100VIDEO_START( abc802 )
101101{
102102   tx_tilemap_40 = tilemap_create(abc802_get_tile_info_40, tilemap_scan_rows,
103      TILEMAP_OPAQUE, 12, 10, 40, 24);
103      TILEMAP_TYPE_OPAQUE, 12, 10, 40, 24);
104104
105105   tx_tilemap = tilemap_create(abc802_get_tile_info_80, tilemap_scan_rows,
106      TILEMAP_OPAQUE, 6, 10, 80, 24);
106      TILEMAP_TYPE_OPAQUE, 6, 10, 80, 24);
107107
108108   abc802_columns = 80;
109109}
src/mess/video/microtan.c
r778r779
4040VIDEO_START( microtan )
4141{
4242   bg_tilemap = tilemap_create(get_bg_tile_info, tilemap_scan_rows,
43      TILEMAP_OPAQUE, 8, 16, 32, 16);
43      TILEMAP_TYPE_OPAQUE, 8, 16, 32, 16);
4444
4545   microtan_chunky_buffer = auto_malloc(videoram_size);
4646   memset(microtan_chunky_buffer, 0, videoram_size);
src/mess/video/trs80.c
r778r779
4949   dblwidth_tilemap = tilemap_create(
5050      dblwidth_gettileinfo,
5151      tilemap_scan_rows,
52      TILEMAP_OPAQUE,
52      TILEMAP_TYPE_OPAQUE,
5353      FW * 2, FH,
5454      64, videoram_size / 64);
5555
5656   normwidth_tilemap = tilemap_create(
5757      normwidth_gettileinfo,
5858      tilemap_scan_rows,
59      TILEMAP_OPAQUE,
59      TILEMAP_TYPE_OPAQUE,
6060      FW, FH,
6161      64, videoram_size / 64);
6262
src/mess/video/apple2.c
r778r779
185185   static pen_t pal_data[2];   /* HACK */
186186   int ch;
187187
188   tileinfo->tile_number = 0;
189188   tileinfo->pen_data = lores_tiledata;
190189   tileinfo->pal_data = pal_data;
191   tileinfo->pen_usage = 0;
192190   tileinfo->flags = 0;
193191
194192   ch = a2_videoram[lores_videobase + tile_index];
r778r779
355353   text_tilemap = tilemap_create(
356354      apple2_text_gettileinfo,
357355      apple2_text_getmemoryoffset,
358      TILEMAP_OPAQUE,
356      TILEMAP_TYPE_OPAQUE,
359357      7*2, 8,
360358      40, 24);
361359
362360   dbltext_tilemap = tilemap_create(
363361      apple2_dbltext_gettileinfo,
364362      apple2_dbltext_getmemoryoffset,
365      TILEMAP_OPAQUE,
363      TILEMAP_TYPE_OPAQUE,
366364      7, 8,
367365      80, 24);
368366
369367   lores_tilemap = tilemap_create(
370368      apple2_lores_gettileinfo,
371369      apple2_text_getmemoryoffset,
372      TILEMAP_OPAQUE,
370      TILEMAP_TYPE_OPAQUE,
373371      14, 8,
374372      40, 24);
375373
src/mess/inputx.c
r778r779
360360         }
361361         else if ((ch >= UCHAR_MAMEKEY_BEGIN) && (ch < UCHAR_MAMEKEY_BEGIN + 1024))
362362         {
363            input_code_name((input_code) ch - UCHAR_MAMEKEY_BEGIN, buf, ARRAY_LENGTH(buf));
363            astring *astr = astring_alloc();
364            input_code_name(astr, (input_code) ch - UCHAR_MAMEKEY_BEGIN);
365            snprintf(buf, ARRAY_LENGTH(buf), "%s", astring_c(astr));
366            astring_free(astr);
364367         }
365368         else
366369         {
src/mess/device.c
r778r779
5151typedef struct _device_list device_list;
5252struct _device_list
5353{
54   memory_pool *pool;
54   object_pool *pool;
5555   struct IODevice devices[1];
5656};
5757
r778r779
204204   int createimage_optcount, count, i, j, position;
205205   const char *file_extensions, *info_string;
206206   char *converted_file_extensions;
207   memory_pool *pool;
207   object_pool *pool;
208208   device_list *devlist;
209209   struct IODevice *devices;
210210
r778r779
226226   count++; /* for our purposes, include the tailing empty device */
227227
228228   /* allocate a memory pool to use for these devices */
229   pool = pool_create(NULL);
229   pool = pool_alloc(NULL);
230230   if (!pool)
231231      goto error;
232232
src/mess/osd/windows/dialog.c
r778r779
9494   DWORD style;
9595   int combo_string_count;
9696   int combo_default_value;
97   memory_pool *mempool;
97   object_pool *mempool;
9898   struct dialog_object_pool *objpool;
9999   const struct dialog_layout *layout;
100100
r778r779
681681   memset(di, 0, sizeof(*di));
682682
683683   di->layout = layout;
684   di->mempool = pool_create(NULL);
684   di->mempool = pool_alloc(NULL);
685685
686686   memset(&dlg_template, 0, sizeof(dlg_template));
687687   dlg_template.style = di->style = DIALOG_STYLE;
r778r779
10791079static void seqselect_settext(HWND editwnd)
10801080{
10811081   seqselect_info *stuff;
1082   char buf[512];
1082   astring *seqstring;
10831083
1084   seqstring = astring_alloc();
1085
10841086   stuff = get_seqselect_info(editwnd);
1085   input_seq_name(&stuff->newcode, buf, sizeof(buf) / sizeof(buf[0]));
1086   win_set_window_text_utf8(editwnd, buf);
1087   input_seq_name(seqstring, &stuff->newcode);
1088   win_set_window_text_utf8(editwnd, astring_c(seqstring));
10871089
10881090   if (GetFocus() == editwnd)
10891091      SendMessage(editwnd, EM_SETSEL, 0, -1);
1092
1093   astring_free(seqstring);
10901094}
10911095
10921096
src/mess/machine/sms.c
r778r779
113113}
114114
115115static void sms_get_inputs(void) {
116   UINT8 data;
116   UINT8 data = 0x00;
117117   UINT32 cpu_cycles = activecpu_gettotalcycles();
118118
119119   sms_input_port0 = 0xFF;
src/mess/hashfile.c
r778r779
2020struct _hash_file
2121{
2222   mame_file *file;
23   memory_pool *pool;
23   object_pool *pool;
2424   unsigned int functions[IO_COUNT];
2525
2626   struct hash_info **preloaded_hashes;
r778r779
356356   void (*error_proc)(const char *message))
357357{
358358   file_error filerr;
359   char *fname;
359   astring *fname;
360360   hash_file *hashfile = NULL;
361   memory_pool *pool = NULL;
361   object_pool *pool = NULL;
362362
363363   /* create a pool for this hash file */
364   pool = pool_create(error_proc);
364   pool = pool_alloc(error_proc);
365365   if (!pool)
366366      goto error;
367367
r778r779
376376   hashfile->error_proc = error_proc;
377377
378378   /* open a file */
379   fname = assemble_2_strings(sysname, ".hsi");
380   filerr = mame_fopen_options(opts, SEARCHPATH_HASH, fname, OPEN_FLAG_READ, &hashfile->file);
381   free(fname);
379   fname = astring_assemble_2(astring_alloc(), sysname, ".hsi");
380   filerr = mame_fopen_options(opts, SEARCHPATH_HASH, astring_c(fname), OPEN_FLAG_READ, &hashfile->file);
381   astring_free(fname);
382382
383383   if (filerr != FILERR_NONE)
384384      goto error;
r778r779
389389   return hashfile;
390390
391391error:
392   if (hashfile)
392   if (hashfile != NULL)
393393      hashfile_close(hashfile);
394394   return NULL;
395395}
src/mess/mscommon.c
r778r779
6767      + (num_cols * num_rows * sizeof(termchar_t)));
6868
6969   term->tm = tilemap_create(terminal_gettileinfo, tilemap_scan_rows,
70      TILEMAP_OPAQUE, char_width, char_height, num_cols, num_rows);
70      TILEMAP_TYPE_OPAQUE, char_width, char_height, num_cols, num_rows);
7171
7272   term->gfx = gfx;
7373   term->blank_char = blank_char;
src/mess/formats/cassimg.c
r778r779
3232{
3333   const struct CassetteFormat *format;
3434   struct io_generic io;
35   memory_pool *pool;
35   object_pool *pool;
3636
3737   int channels;
3838   int flags;
r778r779
115115   cassette->io.file = file;
116116   cassette->io.procs = procs;
117117   cassette->flags = flags;
118   cassette->pool = pool_create(NULL);
118   cassette->pool = pool_alloc(NULL);
119119   return cassette;
120120}
121121
docs/messnew.txt
r778r779
9292
9393Source Changes:
9494----------------
95- The core is based on MAME 0.117u2.  This incorporates all features of the
95- The core is based on MAME 0.117u3.  This incorporates all features of the
9696  update to this core.  [MAME team]
9797
9898- Removed use of helper macros to declare input ports.  [Nate Woods]
makefile
r778r779
470470include $(SRC)/$(TARGET)/$(SUBTARGET).mak
471471include $(SRC)/emu/emu.mak
472472include $(SRC)/lib/lib.mak
473include $(SRC)/build/build.mak
473474include $(SRC)/tools/tools.mak
474475
475476# combine the various definitions to one
r778r779
481482# primary targets
482483#-------------------------------------------------
483484
484emulator: maketree $(EMULATOR)
485emulator: maketree $(BUILD) $(EMULATOR)
485486
486487tools: maketree $(TOOLS)
487488

Previous 15994 Revisions Next


© 1998-2018 The MESS Team