Previous 15994 Revisions Next

r2087 Monday 24th March, 2008 at 11:29:31 UTC by Nathan Woods
Updated to MAME 0.124 core
[ROOT]whatsnew.txt
[src/emu]drawgfx.c mconfig.c memory.c ui.c ui.h uimenu.c validity.c video.c
[src/emu/cpu/ssp1601]ssp1601.c
[src/emu/drivers]xtal.h
[src/emu/machine]scsi.c
[src/emu/sound]aica.c aica.h msm5232.c
[src/emu/video]cdp1869.c cdp1869.h generic.c generic.h v9938.c
[src/lib/util]xmlfile.c
[src/mame]mamedriv.c
[src/mame/audio]qix.c tx1.c
[src/mame/drivers]aerofgt.c amidar.c astrof.c bbusters.c blockhl.c blockout.c cabal.c cidelsa.c crospang.c crystal.c ddz.c dgpix.c dkong.c dooyong.c eolith.c equites.c f-32.c firetrk.c fitfight.c gamecstl.c gng.c gticlub.c homedata.c hyhoo.c hyperspt.c kinst.c kncljoe.c lethalj.c malzak.c marvins.c meritm.c mermaid.c metro.c mpu4.c mpu4drvr.c namcos22.c orbit.c rallyx.c segas18.c seta.c system16.c taitowlf.c ultrsprt.c viper.c wilytowr.c xtheball.c zr107.c
[src/mame/includes]equites.h orbit.h stactics.h
[src/mame/video]aerofgt.c astrocde.c bbusters.c btoads.c cps1.c dc.c dooyong.c eolith.c exerion.c gticlub.c gticlub.h ladybug.c malzak.c marvins.c mermaid.c orbit.c rallyx.c skullxbo.c
[src/mess/osd/windows]winutils.c
[src/osd/windows]drawdd.c input.c ledutil.c main.c video.c winalloc.c window.c windows.mak winmain.c winmisc.c winprefix.h winsync.c winutf8.c winutil.c winwork.c

src/mame/audio/qix.c
r2086r2087
5050   {RES_K(22)+250, RES_K(10)+250, RES_K(5.6)+250, RES_K(3.3)+250}
5151};
5252
53DISCRETE_SOUND_START(qix)
53static DISCRETE_SOUND_START(qix)
5454   /*                    NODE                      */
5555   DISCRETE_INPUTX_DATA(QIX_DAC_DATA, 128, -128*128, 128)
5656   DISCRETE_INPUT_DATA (QIX_VOL_DATA)
src/mame/audio/tx1.c
r2086r2087
122122static UINT8 ay_outputa;
123123static UINT8 ay_outputb;
124124
125static double weights0[3], weights1[3], weights2[4];
125static double weights0[4], weights1[3], weights2[3];
126126static int eng0[4];
127127static int eng1[4];
128128static int eng2[4];
src/mame/mamedriv.c
r2086r2087
836836
837837   /* Namco System 22 games */
838838   DRIVER( ridgerac )   /* (c) 1993 */
839   DRIVER( ridgerab )   /* (c) 1993 */
839840   DRIVER( ridgeraj )   /* (c) 1993 */
840841   DRIVER( acedrvrw )   /* (c) 1994 */
841842   DRIVER( alpinerd )   /* (c) 1994 */
src/mame/includes/stactics.h
r2086r2087
4040
4141MACHINE_DRIVER_EXTERN( stactics_video );
4242
43WRITE8_HANDLER( stactics_palette_w );
4443WRITE8_HANDLER( stactics_scroll_ram_w );
4544WRITE8_HANDLER( stactics_speed_latch_w );
4645WRITE8_HANDLER( stactics_shot_trigger_w );
src/mame/includes/equites.h
r2086r2087
1/*----------- defined in video/equites.c -----------*/
2
13extern UINT16 *equites_bg_videoram;
24
35extern READ16_HANDLER(equites_fg_videoram_r);
r2086r2087
79extern WRITE16_HANDLER(equites_bgcolor_w);
810extern WRITE16_HANDLER(splndrbt_selchar0_w);
911extern WRITE16_HANDLER(splndrbt_selchar1_w);
10extern WRITE16_HANDLER(splndrbt_bgcolor_w);
1112extern WRITE16_HANDLER(equites_flip0_w);
1213extern WRITE16_HANDLER(equites_flip1_w);
1314extern WRITE16_HANDLER(splndrbt_flip0_w);
src/mame/includes/orbit.h
r2086r2087
3434extern UINT8* orbit_sprite_ram;
3535
3636extern WRITE8_HANDLER( orbit_playfield_w );
37extern WRITE8_HANDLER( orbit_sprite_w );
src/mame/video/aerofgt.c
r2086r2087
549549static void wbbc97_draw_bitmap(bitmap_t *bitmap)
550550{
551551   int x,y,count;
552   int color;
553552
554553   count = 16; // weird, the bitmap doesn't start at 0?
555554   for (y=0;y<256;y++)
556   {
557555      for (x=0;x<512;x++)
558556      {
559         color = wbbc97_bitmapram[count] >> 1;
557         int color = wbbc97_bitmapram[count] >> 1;
560558
561559         /* data is GRB; convert to RGB */
562         color = (color & 0x1f) | ((color & 0x3e0) << 5) | ((color & 0x7c00) >> 5);
563         *BITMAP_ADDR16(bitmap, y, (10+x-aerofgt_rasterram[(y & 0x7f)])&0x1ff) = color;
560         rgb_t pen = MAKE_RGB(pal5bit((color & 0x3e0) >> 5), pal5bit((color & 0x7c00) >> 10), pal5bit(color & 0x1f));
561         *BITMAP_ADDR32(bitmap, y, (10+x-aerofgt_rasterram[(y & 0x7f)])&0x1ff) = pen;
564562
565563         count++;
566564         count &= 0x1ffff;
567565      }
568   }
569566}
570567
571568
src/mame/video/orbit.c
r2086r2087
2222}
2323
2424
25WRITE8_HANDLER( orbit_sprite_w )
26{
27   orbit_sprite_ram[offset] = data;
28}
29
30
3125static TILE_GET_INFO( get_tile_info )
3226{
3327   UINT8 code = orbit_playfield_ram[tile_index];
r2086r2087
3529   int flags = 0;
3630
3731   if (code & 0x40)
38   {
3932      flags |= TILE_FLIPX;
40   }
4133   if (orbit_flip_screen)
42   {
4334      flags |= TILE_FLIPY;
44   }
4535
4636   SET_TILE_INFO(3, code & 0x3f, 0, flags);
4737}
r2086r2087
7969      code &= 0x3f;
8070
8171      if (flag & 1)
82      {
8372         code |= 0x40;
84      }
8573      if (flag & 2)
86      {
8774         zoom_x *= 2;
88      }
8975
9076      vpos = 240 - vpos;
9177
src/mame/video/malzak.c
r2086r2087
5959   int width = video_screen_get_width(machine->primary_screen);
6060   int height = video_screen_get_height(machine->primary_screen);
6161
62   saa5050_vidram = auto_malloc(0x800);
63
6462   /* configure the S2636 chips */
6563//  s2636_0 = s2636_config(malzak_s2636_0_ram, height, width, -8, -16);
6664//  s2636_1 = s2636_config(malzak_s2636_1_ram, height, width, -9, -16);
r2086r2087
248246   return 0;
249247}
250248
251WRITE8_HANDLER( playfield_w )
249WRITE8_HANDLER( malzak_playfield_w )
252250{
253251   int tile = ((malzak_x / 16) * 16) + (offset / 16);
254252
src/mame/video/gticlub.c
r2086r2087
178178
179179void K001005_swap_buffers(void);
180180
181void K001005_init(void)
181static void K001005_exit(running_machine *machine)
182182{
183   poly_free(poly);
184}
185
186void K001005_init(running_machine *machine)
187{
183188   int i;
184189
185   int width = video_screen_get_width(Machine->primary_screen);
186   int height = video_screen_get_height(Machine->primary_screen);
190   int width = video_screen_get_width(machine->primary_screen);
191   int height = video_screen_get_height(machine->primary_screen);
187192   K001005_zbuffer = auto_bitmap_alloc(width, height, BITMAP_FORMAT_INDEXED32);
188193
189   K001005_bitmap[0] = video_screen_auto_bitmap_alloc(Machine->primary_screen);
190   K001005_bitmap[1] = video_screen_auto_bitmap_alloc(Machine->primary_screen);
194   K001005_bitmap[0] = video_screen_auto_bitmap_alloc(machine->primary_screen);
195   K001005_bitmap[1] = video_screen_auto_bitmap_alloc(machine->primary_screen);
191196
192197   K001005_texture = auto_malloc(0x800000);
193198
r2086r2087
198203
199204   K001005_3d_fifo = auto_malloc(0x10000 * sizeof(UINT32));
200205
206   poly = poly_alloc(4000, sizeof(poly_extra_data), POLYFLAG_ALLOW_QUADS);
207   add_exit_callback(machine, K001005_exit);
208
201209   for (i=0; i < 128; i++)
202210   {
203211      tex_mirror_table[0][i] = i & 0x3f;
r2086r2087
947955   }
948956}
949957
950
951
952static void gticlub_exit(running_machine *machine)
953{
954   poly_free(poly);
955}
956
957958VIDEO_START( gticlub )
958959{
959   poly = poly_alloc(4000, sizeof(poly_extra_data), POLYFLAG_ALLOW_QUADS);
960   add_exit_callback(machine, gticlub_exit);
961
962   K001005_init();
960   K001005_init(machine);
963961   K001604_vh_start(machine, 0);
964962}
965963
src/mame/video/gticlub.h
r2086r2087
11void K001005_draw(bitmap_t *bitmap, const rectangle *cliprect);
22void K001005_swap_buffers(void);
3void K001005_init(void);
3void K001005_init(running_machine *machine);
44void K001005_preprocess_texture_data(UINT8 *rom, int length, int gticlub);
55
66READ32_HANDLER(K001005_r);
src/mame/video/marvins.c
r2086r2087
66static tilemap *fg_tilemap, *bg_tilemap, *tx_tilemap;
77static UINT8 bg_color, fg_color, old_bg_color, old_fg_color;
88static rectangle tilemap_clip;
9static int video_bank = 0;
910
1011/***************************************************************************
1112**
r2086r2087
99100WRITE8_HANDLER( marvins_foreground_ram_w )
100101{
101102   spriteram_2[offset] = data;
102   if (offset < 0x800) tilemap_mark_tile_dirty(fg_tilemap,offset);
103   if (offset < 0x800 && !video_bank) tilemap_mark_tile_dirty(fg_tilemap,offset);
104   else if (offset >= 0x800 && video_bank) tilemap_mark_tile_dirty(fg_tilemap,offset - 0x800);
103105}
104106
105107WRITE8_HANDLER( marvins_background_ram_w )
106108{
107109   spriteram_3[offset] = data;
108   if (offset < 0x800) tilemap_mark_tile_dirty(bg_tilemap,offset);
110   if (offset < 0x800 && !video_bank) tilemap_mark_tile_dirty(bg_tilemap,offset);
111   else if (offset >= 0x800 && video_bank) tilemap_mark_tile_dirty(bg_tilemap,offset - 0x800);
109112}
110113
111114WRITE8_HANDLER( marvins_text_ram_w )
r2086r2087
124127{
125128   SET_TILE_INFO(
126129         2,
127         spriteram_3[tile_index],
130         spriteram_3[tile_index + video_bank * 0x800],
128131         0,
129132         0);
130133}
r2086r2087
133136{
134137   SET_TILE_INFO(
135138         1,
136         spriteram_2[tile_index],
139         spriteram_2[tile_index + video_bank * 0x800],
137140         0,
138141         0);
139142}
r2086r2087
339342      rectangle finalclip = tilemap_clip;
340343      sect_rect(&finalclip, cliprect);
341344
345      if(video_bank != ((attributes & 8) >> 3))
346      {
347         video_bank = ((attributes & 8) >> 3);
348
349         tilemap_mark_all_tiles_dirty(bg_tilemap);
350         tilemap_mark_all_tiles_dirty(fg_tilemap);
351      }
352
342353      if( (scroll_attributes & 4)==0 ) bg_scrollx += 256;
343354      if( scroll_attributes & 1 ) sprite_scrollx += 256;
344355      if( scroll_attributes & 2 ) fg_scrollx += 256;
r2086r2087
402413      rectangle finalclip = tilemap_clip;
403414      sect_rect(&finalclip, cliprect);
404415
416      if(video_bank != ((attributes & 8) >> 3))
417      {
418         video_bank = ((attributes & 8) >> 3);
419
420         tilemap_mark_all_tiles_dirty(bg_tilemap);
421         tilemap_mark_all_tiles_dirty(fg_tilemap);
422      }
423
405424      if( (scroll_attributes & 4)==0 ) bg_scrollx += 256;
406425      if( scroll_attributes & 1 ) sprite_scrollx += 256;
407426      if( scroll_attributes & 2 ) fg_scrollx += 256;
src/mame/video/cps1.c
r2086r2087
13841384                        sy = (y+nys*16) & 0x1ff;
13851385
13861386                        DRAWSPRITE(
1387                              code+(nx-1)-nxs+0x10*(ny-1-nys),
1387//                                      code+(nx-1)-nxs+0x10*(ny-1-nys),
1388                              (code & ~0xf) + ((code + (nx-1) - nxs) & 0xf) + 0x10*(ny-1-nys),
13881389                              (col&0x1f) + palette_basecolor[0],
13891390                              1,1,
13901391                              sx,sy);
r2086r2087
14011402                        sy = (y+nys*16) & 0x1ff;
14021403
14031404                        DRAWSPRITE(
1404                              code+nxs+0x10*(ny-1-nys),
1405//                                      code+nxs+0x10*(ny-1-nys),
1406                              (code & ~0xf) + ((code + nxs) & 0xf) + 0x10*(ny-1-nys),
14051407                              (col&0x1f) + palette_basecolor[0],
14061408                              0,1,
14071409                              sx,sy);
r2086r2087
14211423                        sy = (y+nys*16) & 0x1ff;
14221424
14231425                        DRAWSPRITE(
1424                              code+(nx-1)-nxs+0x10*nys,
1426//                                      code+(nx-1)-nxs+0x10*nys,
1427                              (code & ~0xf) + ((code + (nx-1) - nxs) & 0xf) + 0x10*nys,
14251428                              (col&0x1f) + palette_basecolor[0],
14261429                              1,0,
14271430                              sx,sy);
r2086r2087
14381441                        sy = (y+nys*16) & 0x1ff;
14391442
14401443                        DRAWSPRITE(
1441                              code+nxs+0x10*nys,
1444//                                      code+nxs+0x10*nys,
1445                              (code & ~0xf) + ((code + nxs) & 0xf) + 0x10*nys,   // fix 00406: qadj: When playing as the ninja, there is one broekn frame in his animation loop when walking.
14421446                              (col&0x1f) + palette_basecolor[0],
14431447                              0,0,
14441448                              sx,sy);
src/mame/video/mermaid.c
r2086r2087
66UINT8* mermaid_bg_scrollram;
77UINT8* mermaid_fg_scrollram;
88
9static bitmap_t* helper;
10static bitmap_t* helper2;
11static int collision_sprite_background,collision_sprite_foreground,collision_sprite_sprite_boat,collision_sprite_sprite_wind;
12
913static int rougien_gfxbank1, rougien_gfxbank2;
1014
1115static const rectangle spritevisiblearea =
r2086r2087
107111        Bit 0
108112        Bit 1 - Sprite - Foreground
109113        Bit 2 - Sprite - Stream
110        Bit 3
114        Bit 3 - Sprite (Wind) - Sprite
111115        Bit 4
112116        Bit 5
113        Bit 6
117        Bit 6 - Sprite (Boat) - Sprite
114118        Bit 7
115119    */
116120
117   return 0;   // not implemented
121   int collision = 0xff;
122
123   if(collision_sprite_foreground) collision  &= 0xfd;
124   if(collision_sprite_background) collision  &= 0xfb;
125
126   if(collision_sprite_sprite_wind) collision &= 0xf7;
127   if(collision_sprite_sprite_boat) collision &= 0xbf;
128
129   return collision;
118130}
119131
120132static TILE_GET_INFO( get_bg_tile_info )
r2086r2087
147159   fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows, 8, 8, 32, 32);
148160   tilemap_set_scroll_cols(fg_tilemap, 32);
149161   tilemap_set_transparent_pen(fg_tilemap, 0);
162
163   helper = video_screen_auto_bitmap_alloc(machine->primary_screen);
164   helper2 = video_screen_auto_bitmap_alloc(machine->primary_screen);
150165}
151166
152167static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect)
r2086r2087
192207   draw_sprites(screen->machine, bitmap, cliprect);
193208   return 0;
194209}
210
211static UINT8 collision_check(colortable_t *colortable, rectangle* rect)
212{
213   UINT8 data = 0;
214
215   int x;
216   int y;
217
218   for (y = rect->min_y; y <= rect->max_y; y++)
219      for (x = rect->min_x; x <= rect->max_x; x++)
220      {
221         UINT16 a = colortable_entry_get_value(colortable, *BITMAP_ADDR16(helper, y, x));
222         UINT16 b = colortable_entry_get_value(colortable, *BITMAP_ADDR16(helper2, y, x));
223         if (b != 0)
224            if (a != 0)
225               data |= 0x01;
226      }
227
228   return data;
229}
230
231VIDEO_EOF( mermaid )
232{
233   const rectangle *visarea = video_screen_get_visible_area(machine->primary_screen);
234
235   int offs,offs2;
236
237   collision_sprite_foreground = 0;
238   collision_sprite_sprite_boat = 0;
239   collision_sprite_sprite_wind = 0;
240
241   // check for "boat" sprite
242
243   for (offs = spriteram_size - 4; offs >= spriteram_size - (4*2); offs -= 4)
244   {
245      int attr = spriteram[offs + 2];
246      int bank = (attr & 0x30) >> 4;
247      int code = (spriteram[offs] & 0x3f) | (bank << 6);
248//      int color = attr & 0x0f;
249      int flipx = spriteram[offs] & 0x40;
250      int flipy = spriteram[offs] & 0x80;
251      int sx = spriteram[offs + 3] + 1;
252      int sy = 240 - spriteram[offs + 1];
253
254      rectangle rect;
255
256      code |= rougien_gfxbank1 * 0x2800;
257      code |= rougien_gfxbank2 * 0x2400;
258
259      if (flip_screen_x_get())
260      {
261         flipx = !flipx;
262         sx = 240 - sx;
263      }
264
265      if (flip_screen_y_get())
266      {
267         flipy = !flipy;
268         sy = 240 - sy;
269      }
270
271      rect.min_x = sx;
272      rect.min_y = sy;
273      rect.max_x = sx + machine->gfx[1]->width - 1;
274      rect.max_y = sy + machine->gfx[1]->height - 1;
275
276      if (rect.min_x < visarea->min_x)
277         rect.min_x = visarea->min_x;
278      if (rect.min_y < visarea->min_y)
279         rect.min_y = visarea->min_y;
280      if (rect.max_x > visarea->max_x)
281         rect.max_x = visarea->max_x;
282      if (rect.max_y > visarea->max_y)
283         rect.max_y = visarea->max_y;
284
285      // check collision sprite-background (stream)
286
287      fillbitmap(helper,0,&rect);
288      fillbitmap(helper2,0,&rect);
289
290      tilemap_draw(helper, &rect, bg_tilemap, 0, 0);
291
292      drawgfx(helper2, machine->gfx[1], code, 0, flipx, flipy, sx, sy,
293         &rect,TRANSPARENCY_PEN, 0);
294
295      collision_sprite_background |= collision_check(machine->colortable, &rect);
296
297      // check collision sprite-foreground
298
299      fillbitmap(helper,0,&rect);
300      fillbitmap(helper2,0,&rect);
301
302      tilemap_draw(helper, &rect, fg_tilemap, 0, 0);
303
304      drawgfx(helper2, machine->gfx[1], code, 0, flipx, flipy, sx, sy,
305         &rect,TRANSPARENCY_PEN, 0);
306
307      collision_sprite_foreground |= collision_check(machine->colortable, &rect);
308
309      // check collision sprite "boat" - sprite
310
311      fillbitmap(helper,0,&rect);
312      fillbitmap(helper2,0,&rect);
313
314      for (offs2 = spriteram_size - (4*6) - 4; offs2 >= 0; offs2 -= 4)
315         if (offs != offs2)
316         {
317            int attr2 = spriteram[offs2 + 2];
318            int bank2 = (attr2 & 0x30) >> 4;
319            int code2 = (spriteram[offs2] & 0x3f) | (bank2 << 6);
320//              int color2 = attr2 & 0x0f;
321            int flipx2 = spriteram[offs2] & 0x40;
322            int flipy2 = spriteram[offs2] & 0x80;
323            int sx2 = spriteram[offs2 + 3] + 1;
324            int sy2 = 240 - spriteram[offs2 + 1];
325
326            code2 |= rougien_gfxbank1 * 0x2800;
327            code2 |= rougien_gfxbank2 * 0x2400;
328
329            if (flip_screen_x_get())
330            {
331               flipx2 = !flipx2;
332               sx2 = 240 - sx2;
333            }
334
335            if (flip_screen_y_get())
336            {
337               flipy2 = !flipy2;
338               sy2 = 240 - sy2;
339            }
340
341            drawgfx(helper, machine->gfx[1], code2, 0, flipx2, flipy2, sx2, sy2,
342               &rect,TRANSPARENCY_PEN, 0);
343         }
344
345         drawgfx(helper2, machine->gfx[1], code, 0, flipx, flipy, sx, sy,
346            &rect,TRANSPARENCY_PEN, 0);
347
348         collision_sprite_sprite_boat |= collision_check(machine->colortable, &rect);
349      }
350
351   // check for "sail" sprite
352
353   for (offs = spriteram_size - 4*3; offs >= spriteram_size - (4*4); offs -= 4)
354   {
355      int attr = spriteram[offs + 2];
356      int bank = (attr & 0x30) >> 4;
357      int code = (spriteram[offs] & 0x3f) | (bank << 6);
358//      int color = attr & 0x0f;
359      int flipx = spriteram[offs] & 0x40;
360      int flipy = spriteram[offs] & 0x80;
361      int sx = spriteram[offs + 3] + 1;
362      int sy = 240 - spriteram[offs + 1];
363
364      rectangle rect;
365
366      code |= rougien_gfxbank1 * 0x2800;
367      code |= rougien_gfxbank2 * 0x2400;
368
369      if (flip_screen_x_get())
370      {
371         flipx = !flipx;
372         sx = 240 - sx;
373      }
374
375      if (flip_screen_y_get())
376      {
377         flipy = !flipy;
378         sy = 240 - sy;
379      }
380
381      rect.min_x = sx;
382      rect.min_y = sy;
383      rect.max_x = sx + machine->gfx[1]->width - 1;
384      rect.max_y = sy + machine->gfx[1]->height - 1;
385
386      if (rect.min_x < visarea->min_x)
387         rect.min_x = visarea->min_x;
388      if (rect.min_y < visarea->min_y)
389         rect.min_y = visarea->min_y;
390      if (rect.max_x > visarea->max_x)
391         rect.max_x = visarea->max_x;
392      if (rect.max_y > visarea->max_y)
393         rect.max_y = visarea->max_y;
394
395      // check collision sprite "sail" - sprite
396
397      fillbitmap(helper,0,&rect);
398      fillbitmap(helper2,0,&rect);
399
400      for (offs2 = spriteram_size - (4*6) - 4; offs2 >= 0; offs2 -= 4)
401         if (offs != offs2)
402         {
403            int attr2 = spriteram[offs2 + 2];
404            int bank2 = (attr2 & 0x30) >> 4;
405            int code2 = (spriteram[offs2] & 0x3f) | (bank2 << 6);
406//              int color2 = attr2 & 0x0f;
407            int flipx2 = spriteram[offs2] & 0x40;
408            int flipy2 = spriteram[offs2] & 0x80;
409            int sx2 = spriteram[offs2 + 3] + 1;
410            int sy2 = 240 - spriteram[offs2 + 1];
411
412            code2 |= rougien_gfxbank1 * 0x2800;
413            code2 |= rougien_gfxbank2 * 0x2400;
414
415            if (flip_screen_x_get())
416            {
417               flipx2 = !flipx2;
418               sx2 = 240 - sx2;
419            }
420
421            if (flip_screen_y_get())
422            {
423               flipy2 = !flipy2;
424               sy2 = 240 - sy2;
425            }
426
427            drawgfx(helper, machine->gfx[1], code2, 1, flipx2, flipy2, sx2, sy2,
428               &rect,TRANSPARENCY_PEN, 0);
429         }
430
431         drawgfx(helper2, machine->gfx[1], code, 0, flipx, flipy, sx, sy,
432            &rect,TRANSPARENCY_PEN, 0);
433
434         collision_sprite_sprite_wind |= collision_check(machine->colortable, &rect);
435      }
436}
src/mame/video/bbusters.c
r2086r2087
106106      else if (dy&0x40) code+=32;            \
107107      else if (dx&0x40) code+=16
108108
109INLINE const UINT8 *get_source_ptr(running_machine *machine, UINT32 sprite, int dx, int dy, int bank, int block)
109INLINE const UINT8 *get_source_ptr(gfx_element *gfx, UINT32 sprite, int dx, int dy, int block)
110110{
111   const gfx_element *gfx=machine->gfx[bank];
112111   int source_base,code=0;
113112
114113   /* Get a tile index from the x,y position in the block */
r2086r2087
148147
149148static void bbusters_draw_block(running_machine *machine, bitmap_t *dest,int x,int y,int size,int flipx,int flipy,UINT32 sprite,int color,int bank,int block)
150149{
151   pen_t pen_base = machine->gfx[bank]->color_base + machine->gfx[bank]->color_granularity * (color % machine->gfx[bank]->total_colors);
150   gfx_element *gfx = machine->gfx[bank];
151   pen_t pen_base = gfx->color_base + gfx->color_granularity * (color % gfx->total_colors);
152152   UINT32 xinc=(scale_line_count * 0x10000 ) / size;
153153   UINT8 pixel;
154154   int x_index;
r2086r2087
172172
173173         for (sx=0; sx<size; sx++) {
174174            if ((sx%16)==0)
175               srcptr=get_source_ptr(machine,sprite,sx,srcline,bank,block);
175               srcptr=get_source_ptr(gfx,sprite,sx,srcline,block);
176176
177177            pixel=*srcptr++;
178            if (x+(x_index>>16)>=0 && x+(x_index>>16)<256 && pixel!=15)
179               destline[x+(x_index>>16)]= pen_base + pixel;
178            if (pixel!=15)
179               destline[(x+(x_index>>16)) & 0x1ff]= pen_base + pixel;
180180
181181            if (flipx)
182182               x_index-=xinc;
r2086r2087
207207         continue;
208208
209209       y=source[offs+3];
210      if (y>254) continue; /* Speedup */
211210       x=source[offs+2];
212211      if (x&0x200) x=-(0x100-(x&0xff));
213      if (x>256) continue; /* Speedup */
214212
215213      /*
216214            Source[0]:
src/mame/video/dc.c
r2086r2087
610610         pvr_parameterconfig[a] = pvr_parameterconfig[a-1];
611611}
612612
613TIMER_CALLBACK(vbout)
613static TIMER_CALLBACK(vbout)
614614{
615615   dc_sysctrl_regs[SB_ISTNRM] |= IST_VBL_OUT; // V Blank-out interrupt
616616   update_interrupt_status();
src/mame/video/skullxbo.c
r2086r2087
213213         int newscroll = ((data >> 7) - scanline) & 0x1ff;
214214
215215         /* force a partial update with the previous scroll */
216         video_screen_update_partial(Machine->primary_screen, scanline - 1);
216         if (scanline > 0)
217            video_screen_update_partial(Machine->primary_screen, scanline - 1);
217218
218219         /* update the new scroll */
219220         tilemap_set_scrolly(atarigen_playfield_tilemap, 0, newscroll);
src/mame/video/btoads.c
r2086r2087
77**************************************************************************/
88
99#include "driver.h"
10#include "deprecat.h"
1110#include "cpu/tms34010/tms34010.h"
1211#include "video/tlc34076.h"
1312#include "btoads.h"
r2086r2087
7877   COMBINE_DATA(&misc_control);
7978
8079   /* bit 3 controls sound reset line */
81   cpunum_set_input_line(Machine, 1, INPUT_LINE_RESET, (misc_control & 8) ? CLEAR_LINE : ASSERT_LINE);
80   cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, (misc_control & 8) ? CLEAR_LINE : ASSERT_LINE);
8281}
8382
8483
r2086r2087
119118WRITE16_HANDLER( btoads_scroll0_w )
120119{
121120   /* allow multiple changes during display */
122   video_screen_update_partial(machine->primary_screen, video_screen_get_vpos(machine->primary_screen) - 1);
121   video_screen_update_now(machine->primary_screen);
123122
124123   /* upper bits are Y scroll, lower bits are X scroll */
125124   if (ACCESSING_MSB)
r2086r2087
132131WRITE16_HANDLER( btoads_scroll1_w )
133132{
134133   /* allow multiple changes during display */
135   video_screen_update_partial(machine->primary_screen, video_screen_get_vpos(machine->primary_screen) - 1);
134   video_screen_update_now(machine->primary_screen);
136135
137136   /* upper bits are Y scroll, lower bits are X scroll */
138137   if (ACCESSING_MSB)
src/mame/video/eolith.c
r2086r2087
11#include "driver.h"
22
33int eolith_buffer = 0;
4static bitmap_t *bitmaps[2];
5static UINT32 *eo_vram;
4static UINT32 *vram;
65
7static void plot_pixel_rgb(int x, int y, int color)
8{
9   if (bitmaps[eolith_buffer]->bpp == 32)
10   {
11      UINT32 r = (color & 0x001f) << 3;
12      UINT32 g = (color & 0x03e0) >> 2;
13      UINT32 b = (color & 0x7c00) >> 7;
14      *BITMAP_ADDR32(bitmaps[eolith_buffer], y, x) = b | (g<<8) | (r<<16);
15   }
16   else
17   {
18      *BITMAP_ADDR16(bitmaps[eolith_buffer], y, x) = color;
19   }
20}
216
7
228WRITE32_HANDLER( eolith_vram_w )
239{
24   int x,y;
25   switch(mem_mask)
26   {
27      case 0:
28         eolith_vram_w(machine,offset,data,0x0000ffff);
29         eolith_vram_w(machine,offset,data,0xffff0000);
30         return;
10   UINT32 *dest = &vram[offset+(0x40000/4)*eolith_buffer];
3111
32      case 0xffff:
33         if(data & 0x80000000)
34            return;
35      break;
36
37      case 0xffff0000:
38         if(data & 0x8000)
39            return;
40      break;
41   }
42
43   COMBINE_DATA(&eo_vram[offset+(0x40000/4)*eolith_buffer]);
44
45   //logical line width = 336;
46   x = offset % (336/2);
47   y = offset / (336/2);
48
49   if(x < 320/2 && y < 240)
12   if (mem_mask == 0)
5013   {
51      plot_pixel_rgb(x*2,  y,(eo_vram[offset+(0x40000/4)*eolith_buffer]>>16) & 0x7fff);
52      plot_pixel_rgb(x*2+1,y, eo_vram[offset+(0x40000/4)*eolith_buffer] & 0x7fff);
14      if (~data & 0x80000000)
15         *dest = (*dest & 0x0000ffff) | (data & 0xffff0000);
5316
17      if (~data & 0x00008000)
18         *dest = (*dest & 0xffff0000) | (data & 0x0000ffff);
5419   }
20   else if (((mem_mask == 0x0000ffff) && (~data & 0x80000000)) ||
21           ((mem_mask == 0xffff0000) && (~data & 0x00008000)))
22      COMBINE_DATA(dest);
5523}
5624
5725
5826READ32_HANDLER( eolith_vram_r )
5927{
60   return eo_vram[offset+(0x40000/4)*eolith_buffer];
28   return vram[offset+(0x40000/4)*eolith_buffer];
6129}
6230
6331VIDEO_START( eolith )
6432{
65   eo_vram = auto_malloc(0x40000*2);
66   bitmaps[0] = video_screen_auto_bitmap_alloc(machine->primary_screen);
67   bitmaps[1] = video_screen_auto_bitmap_alloc(machine->primary_screen);
33   vram = auto_malloc(0x40000*2);
6834}
6935
7036VIDEO_UPDATE( eolith )
7137{
72   copybitmap(bitmap,bitmaps[eolith_buffer ^ 1],0,0,0,0,cliprect);
38   int y;
39
40   for (y = 0; y < 240; y++)
41   {
42      int x;
43      UINT32 *src = &vram[(eolith_buffer ? 0 : 0x10000) | (y * (336 / 2))];
44      UINT16 *dest = BITMAP_ADDR16(bitmap, y, 0);
45
46      for (x = 0; x < 320; x += 2)
47      {
48         dest[0] = (*src >> 16) & 0x7fff;
49         dest[1] = (*src >>  0) & 0x7fff;
50
51         src++;
52         dest += 2;
53      }
54   }
55
7356   return 0;
7457}
src/mame/video/rallyx.c
r2086r2087
398398   bg_tilemap = tilemap_create(locomotn_bg_get_tile_info,tilemap_scan_rows,8,8,32,32);
399399   fg_tilemap = tilemap_create(locomotn_fg_get_tile_info,fg_tilemap_scan,  8,8, 8,32);
400400
401   /* handle reduced visible area in some games */
402   if (video_screen_get_visible_area(machine->primary_screen)->max_x == 32*8-1)
403   {
404      tilemap_set_scrolldx(bg_tilemap,0,32);
405      tilemap_set_scrolldx(fg_tilemap,0,32);
406   }
407
401408   spriteram_base = 0x14;
402409
403410   spriteram = rallyx_videoram + 0x00;
r2086r2087
427434   bg_tilemap = tilemap_create(locomotn_bg_get_tile_info,tilemap_scan_rows,8,8,32,32);
428435   fg_tilemap = tilemap_create(locomotn_fg_get_tile_info,fg_tilemap_scan,  8,8, 8,32);
429436
437   /* handle reduced visible area in some games */
438   if (video_screen_get_visible_area(machine->primary_screen)->max_x == 32*8-1)
439   {
440      tilemap_set_scrolldx(bg_tilemap,0,32);
441      tilemap_set_scrolldx(fg_tilemap,0,32);
442   }
443
430444   /* commsega has more sprites and bullets than the other games */
431445   spriteram_base = 0x00;
432446
r2086r2087
550564      int color = spriteram_2[offs + 1] & 0x3f;
551565      int flip = spriteram[offs] & 2;
552566
553      /* handle reduced visible area in some games */
554      if (flip_screen_get() && (video_screen_get_visible_area(machine->primary_screen)->max_x == 32*8-1)) sx += 32;
555
556567      pdrawgfx(bitmap,machine->gfx[1],
557568            ((spriteram[offs] & 0x7c) >> 2) + 0x20*(spriteram[offs] & 0x01) + ((spriteram[offs] & 0x80) >> 1),
558569            color,
r2086r2087
624635      x = rallyx_radarx[offs] + ((~rallyx_radarattr[offs & 0x0f] & 0x08) << 5);
625636      y = 252 - rallyx_radary[offs];
626637
627      /* handle reduced visible area in some games */
628      if (flip_screen_get() && (video_screen_get_visible_area(machine->primary_screen)->max_x == 32*8-1)) x += 32;
629
630638      drawgfx(bitmap,machine->gfx[2],
631639            (rallyx_radarattr[offs & 0x0f] & 0x07) ^ 0x07,
632640            0,
r2086r2087
713721   rectangle bg_clip = *cliprect;
714722   if (flip_screen_get())
715723   {
716      bg_clip.min_x = 8*8;
717      fg_clip.max_x = 8*8-1;
724      /* handle reduced visible area in some games */
725      if (video_screen_get_visible_area(screen)->max_x == 32*8-1)
726      {
727         bg_clip.min_x = 4*8;
728         fg_clip.max_x = 4*8-1;
729      }
730      else
731      {
732         bg_clip.min_x = 8*8;
733         fg_clip.max_x = 8*8-1;
734      }
718735   }
719736   else
720737   {
src/mame/video/astrocde.c
r2086r2087
452452      vertical_feedback = vfeedback;
453453      horizontal_feedback = hfeedback;
454454   }
455
456   /* nothing to do, clear the interrupt */   
457   else
458      cpunum_set_input_line(machine, 0, 0, CLEAR_LINE);   
459455}
460456
461457
r2086r2087
494490   else if (astrocade_video_config & AC_LIGHTPEN_INTS)
495491      astrocade_trigger_lightpen(machine, astrocade_scanline, 8);
496492
497   /* nothing to do, clear the interrupt */   
498   else
499      cpunum_set_input_line(machine, 0, 0, CLEAR_LINE);
500
501493   /* advance to the next scanline */
502494   scanline++;
503495   if (scanline >= video_screen_get_height(machine->primary_screen))
r2086r2087
564556      case 0x17:   /* keypad column 3 */
565557         result = readinputportbytag_safe("KEYPAD3", 0xff);
566558         break;
567
568      case 0x1c:   /* player 1 knob */
569         result = readinputportbytag_safe("P1_KNOB", 0xff);
570         break;
571
572      case 0x1d:   /* player 2 knob */
573         result = readinputportbytag_safe("P2_KNOB", 0xff);
574         break;
575
576      case 0x1e:   /* player 3 knob */
577         result = readinputportbytag_safe("P3_KNOB", 0xff);
578         break;
579
580      case 0x1f:   /* player 4 knob */
581         result = readinputportbytag_safe("P4_KNOB", 0xff);
582         break;
583559   }
584560
585561   return result;
src/mame/video/ladybug.c
r2086r2087
1111
1212
1313UINT8 *sraider_grid_data;
14UINT8 sraider_grid_color;
14static UINT8 sraider_grid_color;
1515
1616/* Use the Zero Hour star generator board */
1717void redclash_set_stars_enable( UINT8 on );
src/mame/video/dooyong.c
r2086r2087
643643   /* Text layer is offset on this machine */
644644   tilemap_set_scrolly(tx_tilemap, 0, 8);
645645
646   memset(bgscroll8, 0, 0x10);
647   memset(bg2scroll8, 0, 0x10);
648   memset(fgscroll8, 0, 0x10);
649   memset(fg2scroll8, 0, 0x10);
650
646651   /* Register for save/restore */
647652   state_save_register_global_array(bgscroll8);
648653   state_save_register_global_array(fgscroll8);
r2086r2087
675680   /* Text layer is offset on this machine */
676681   tilemap_set_scrolly(tx_tilemap, 0, 8);
677682
683   memset(bgscroll8, 0, 0x10);
684   memset(bg2scroll8, 0, 0x10);
685   memset(fgscroll8, 0, 0x10);
686   memset(fg2scroll8, 0, 0x10);
687
678688   /* Register for save/restore */
679689   state_save_register_global_array(bgscroll8);
680690   state_save_register_global_array(fgscroll8);
r2086r2087
703713   tilemap_set_transparent_pen(fg_tilemap, 15);
704714   tilemap_set_transparent_pen(tx_tilemap, 15);
705715
716   memset(bgscroll8, 0, 0x10);
717   memset(bg2scroll8, 0, 0x10);
718   memset(fgscroll8, 0, 0x10);
719   memset(fg2scroll8, 0, 0x10);
720
706721   /* Register for save/restore */
707722   state_save_register_global_array(bgscroll8);
708723   state_save_register_global_array(fgscroll8);
r2086r2087
737752   tilemap_set_transparent_pen(fg2_tilemap, 15);
738753   tilemap_set_transparent_pen(tx_tilemap, 15);
739754
755   memset(bgscroll8, 0, 0x10);
756   memset(bg2scroll8, 0, 0x10);
757   memset(fgscroll8, 0, 0x10);
758   memset(fg2scroll8, 0, 0x10);
759
740760   /* Register for save/restore */
741761   state_save_register_global_array(bgscroll8);
742762   state_save_register_global_array(fgscroll8);
r2086r2087
767787   tilemap_set_transparent_pen(fg_tilemap, 15);
768788   tilemap_set_transparent_pen(tx_tilemap, 15);
769789
790   memset(bgscroll8, 0, 0x10);
791   memset(bg2scroll8, 0, 0x10);
792   memset(fgscroll8, 0, 0x10);
793   memset(fg2scroll8, 0, 0x10);
794
770795   /* Register for save/restore */
771796   state_save_register_global_array(bgscroll8);
772797   state_save_register_global_array(fgscroll8);
r2086r2087
775800
776801VIDEO_START( primella )
777802{
778   /* Configure memory banking */
779   memory_configure_bank(1, 0, 8, memory_region(REGION_CPU1) + 0x10000, 0x4000);
780
781803   /* Configure tilemap callbacks */
782804   bg_tilerom = memory_region(REGION_GFX2) + memory_region_length(REGION_GFX2) - 0x8000;
783805   fg_tilerom = memory_region(REGION_GFX3) + memory_region_length(REGION_GFX3) - 0x8000;
r2086r2087
799821   tilemap_set_transparent_pen(fg_tilemap, 15);
800822   tilemap_set_transparent_pen(tx_tilemap, 15);
801823
824   memset(bgscroll8, 0, 0x10);
825   memset(bg2scroll8, 0, 0x10);
826   memset(fgscroll8, 0, 0x10);
827   memset(fg2scroll8, 0, 0x10);
828
802829   /* Register for save/restore */
803830   state_save_register_global_array(bgscroll8);
804831   state_save_register_global_array(fgscroll8);
r2086r2087
836863   tilemap_set_transparent_pen(fg_tilemap, 15);
837864   tilemap_set_transparent_pen(fg2_tilemap, 15);
838865
866   memset(bgscroll8, 0, 0x10);
867   memset(bg2scroll8, 0, 0x10);
868   memset(fgscroll8, 0, 0x10);
869   memset(fg2scroll8, 0, 0x10);
870
839871   /* Register for save/restore */
840872   state_save_register_global_array(bgscroll8);
841873   state_save_register_global_array(bg2scroll8);
r2086r2087
855887       32, 32, 32, 8);
856888   bg2_tilemap = fg_tilemap = fg2_tilemap = NULL;   /* Stop scroll handler from crashing on these */
857889
890   memset(bgscroll8, 0, 0x10);
891   memset(bg2scroll8, 0, 0x10);
892   memset(fgscroll8, 0, 0x10);
893   memset(fg2scroll8, 0, 0x10);
894
858895   /* Register for save/restore */
859896   state_save_register_global_array(bgscroll8);
860897   state_save_register_global_array(bg2scroll8);   // Not used atm
src/mame/video/exerion.c
r2086r2087
209209
210210WRITE8_HANDLER( exerion_video_latch_w )
211211{
212   video_screen_update_partial(machine->primary_screen, video_screen_get_vpos(machine->primary_screen) - 1);
212   int scanline = video_screen_get_vpos(machine->primary_screen);
213   if (scanline > 0)
214      video_screen_update_partial(machine->primary_screen, scanline - 1);
213215   background_latches[offset] = data;
214216}
215217
src/mame/drivers/crystal.c
r2086r2087
117117*/
118118
119119#include "driver.h"
120#include "deprecat.h"
121120#include "cpu/se3208/se3208.h"
122121#include "video/vrender0.h"
123122#include "machine/ds1302.h"
r2086r2087
140139static UINT8 OldPort4;
141140static UINT32 *ResetPatch;
142141
143static void IntReq(int num)
142static void IntReq(running_machine *machine, int num)
144143{
145144   UINT32 IntEn=program_read_dword_32le(0x01800c08);
146145   UINT32 IntPend=program_read_dword_32le(0x01800c0c);
r2086r2087
148147   {
149148      IntPend|=(1<<num);
150149      program_write_dword_32le(0x01800c0c,IntPend);
151      cpunum_set_input_line(Machine, 0,SE3208_INT,ASSERT_LINE);
150      cpunum_set_input_line(machine, 0,SE3208_INT,ASSERT_LINE);
152151   }
153152#ifdef IDLE_LOOP_SPEEDUP
154153   FlipCntRead=0;
r2086r2087
189188   {
190189      UINT8 Port4=readinputport(4);
191190      if(!(Port4&0x10) && ((OldPort4^Port4)&0x10))   //coin buttons trigger IRQs
192         IntReq(12);
191         IntReq(machine, 12);
193192      if(!(Port4&0x20) && ((OldPort4^Port4)&0x20))
194         IntReq(19);
193         IntReq(machine, 19);
195194      OldPort4=Port4;
196195      return /*dips*/readinputport(5)|(Port4<<16);
197196   }
r2086r2087
206205      IntPend&=~(1<<(data&0x1f));
207206      program_write_dword_32le(0x01800c0c,IntPend);
208207      if(!IntPend)
209         cpunum_set_input_line(Machine, 0,SE3208_INT,CLEAR_LINE);
208         cpunum_set_input_line(machine, 0,SE3208_INT,CLEAR_LINE);
210209   }
211210   if((~mem_mask)&0xff00)
212211      IntHigh=(data>>8)&7;
r2086r2087
240239{
241240   if(!(Timer0ctrl&2))
242241      Timer0ctrl&=~1;
243   IntReq(0);
242   IntReq(machine, 0);
244243}
245244
246245static WRITE32_HANDLER(Timer0_w)
r2086r2087
268267{
269268   if(!(Timer1ctrl&2))
270269      Timer1ctrl&=~1;
271   IntReq(1);
270   IntReq(machine, 1);
272271}
273272
274273static WRITE32_HANDLER(Timer1_w)
r2086r2087
296295{
297296   if(!(Timer2ctrl&2))
298297      Timer2ctrl&=~1;
299   IntReq(9);
298   IntReq(machine, 9);
300299}
301300
302301static WRITE32_HANDLER(Timer2_w)
r2086r2087
324323{
325324   if(!(Timer3ctrl&2))
326325      Timer3ctrl&=~1;
327   IntReq(10);
326   IntReq(machine, 10);
328327}
329328
330329static WRITE32_HANDLER(Timer3_w)
r2086r2087
439438      }
440439      data&=~(1<<10);
441440      program_write_dword_32le(0x0180080C,0);
442      IntReq(7);
441      IntReq(machine, 7);
443442   }
444443   COMBINE_DATA(&DMA0ctrl);
445444}
r2086r2087
485484      }
486485      data&=~(1<<10);
487486      program_write_dword_32le(0x0180081C,0);
488      IntReq(8);
487      IntReq(machine, 8);
489488   }
490489   COMBINE_DATA(&DMA1ctrl);
491490}
r2086r2087
617616{
618617}
619618
620static void plot_pixel_rgb(bitmap_t *bitmap, int x, int y , int color)
621{
622   //565 to 555
623   color=(color&0x1f)|((color>>1)&0x7fe0);
624   if (bitmap->bpp == 32)
625   {
626      UINT32 cb=(color&0x1f)<<3;
627      UINT32 cg=(color&0x3e0)>>2;
628      UINT32 cr=(color&0x7c00)>>7;
629      *BITMAP_ADDR32(bitmap, y, x) = cb | (cg<<8) | (cr<<16);
630   }
631   else
632   {
633      *BITMAP_ADDR16(bitmap, y, x) = color;
634   }
635}
636
637619static UINT16 GetVidReg(UINT16 reg)
638620{
639621   return program_read_word_32le(0x03000000+reg);
r2086r2087
655637   UINT16 *Front,*Back;
656638   UINT16 *Visible,*DrawDest;
657639   UINT16 *srcline;
658   int x,y;
640   int y;
659641   UINT16 head,tail;
660642
661643   if(GetVidReg(0x8e)&1)
r2086r2087
699681
700682   srcline=(UINT16 *) Visible;
701683   for(y=0;y<240;y++)
702      for(x=0;x<320;x++)
703         plot_pixel_rgb(bitmap,x,y,srcline[y*512+x]);
684      memcpy(BITMAP_ADDR16(bitmap, y, 0), &srcline[y*512], 320*2);
685
704686   return 0;
705687}
706688
r2086r2087
732714
733715static INTERRUPT_GEN(crystal_interrupt)
734716{
735   IntReq(24);      //VRender0 VBlank
717   IntReq(machine, 24);      //VRender0 VBlank
736718}
737719
738720static INPUT_PORTS_START(crystal)
r2086r2087
832814   MDRV_SCREEN_ADD("main", RASTER)
833815   MDRV_SCREEN_REFRESH_RATE(60)
834816   MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
835   MDRV_SCREEN_FORMAT(BITMAP_FORMAT_RGB15)
817   MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
836818   MDRV_SCREEN_SIZE(320, 240)
837819   MDRV_SCREEN_VISIBLE_AREA(0, 319, 0, 239)
838820
839   MDRV_PALETTE_LENGTH(8192)
840
841821   MDRV_VIDEO_START(crystal)
842822   MDRV_VIDEO_UPDATE(crystal)
843823   MDRV_VIDEO_EOF(crystal)
844824
825   MDRV_PALETTE_INIT(RRRRR_GGGGGG_BBBBB)
826   MDRV_PALETTE_LENGTH(65536)
827
845828   MDRV_SPEAKER_STANDARD_STEREO("left", "right")
846829
847830   MDRV_SOUND_ADD(VRENDER0, 0)
r2086r2087
921904   Rom[WORD_XOR_LE(0x974ED2/2)]=0x9001;   //PUSH R0
922905}
923906
924GAME( 2001, crysbios,         0,  crystal, crystal,        0, ROT0, "Brezzasoft", "Crystal System BIOS", GAME_IS_BIOS_ROOT )
925GAME( 2001, crysking,   crysbios,  crystal, crystal, crysking, ROT0, "Brezzasoft", "The Crystal of Kings", 0 )
926GAME( 2001, evosocc,   crysbios,  crystal, crystal,  evosocc, ROT0, "Evoga", "Evolution Soccer", 0 )
907GAME( 2001, crysbios,        0, crystal, crystal,        0, ROT0, "Brezzasoft", "Crystal System BIOS", GAME_IS_BIOS_ROOT )
908GAME( 2001, crysking, crysbios, crystal, crystal, crysking, ROT0, "Brezzasoft", "The Crystal of Kings", 0 )
909GAME( 2001, evosocc,  crysbios, crystal, crystal,  evosocc, ROT0, "Evoga", "Evolution Soccer", 0 )
src/mame/drivers/aerofgt.c
r2086r2087
16241624   MDRV_SCREEN_ADD("main", RASTER)
16251625   MDRV_SCREEN_REFRESH_RATE(60)
16261626   MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
1627   MDRV_SCREEN_FORMAT(BITMAP_FORMAT_RGB15)
1627   MDRV_SCREEN_FORMAT(BITMAP_FORMAT_RGB32)
16281628   MDRV_SCREEN_SIZE(64*8, 64*8)
16291629   MDRV_SCREEN_VISIBLE_AREA(0*8+14, 44*8-1+4, 0*8, 30*8-1)
16301630
src/mame/drivers/ultrsprt.c
r2086r2087
1414
1515static UINT32 *vram;
1616
17static VIDEO_START( ultrsprt )
18{
19}
20
2117static VIDEO_UPDATE( ultrsprt )
2218{
2319   int i, j;
24   UINT8 *ram = (UINT8*)vram;
2520
26   if (ram != NULL)
21   UINT8 *ram = (UINT8 *)vram;
22
23   for (j=0; j < 400; j++)
2724   {
28      for (j=0; j < 400; j++)
29      {
30         UINT16 *bmp = BITMAP_ADDR16(bitmap, j, 0);
31         int fb_index = j * 1024;
25      UINT16 *dest = BITMAP_ADDR16(bitmap, j, 0);
26      int fb_index = j * 1024;
3227
33         for (i=0; i < 512; i++)
34         {
35            UINT8 p1 = ram[BYTE4_XOR_BE(fb_index + i + 512)];
36            if (p1 == 0)
37            {
38               UINT8 p2 = ram[BYTE4_XOR_BE(fb_index + i)];
39               bmp[i] = screen->machine->pens[0x000 + p2];
40            }
41            else
42            {
43               bmp[i] = screen->machine->pens[0x100 + p1];
44            }
45         }
28      for (i=0; i < 512; i++)
29      {
30         UINT8 p1 = ram[BYTE4_XOR_BE(fb_index + i + 512)];
31         if (p1 == 0)
32            dest[i] = ram[BYTE4_XOR_BE(fb_index + i)];
33         else
34            dest[i] = 0x100 + p1;
4635      }
4736   }
4837
4938   return 0;
5039}
5140
52static WRITE32_HANDLER(palette_w)
41static WRITE32_HANDLER( palette_w )
5342{
54   int r1, g1, b1, r2, g2, b2;
55
5643   COMBINE_DATA(&paletteram32[offset]);
5744   data = paletteram32[offset];
5845
59   b1 = ((data >> 16) & 0x1f);
60   g1 = ((data >> 21) & 0x1f);
61   r1 = ((data >> 26) & 0x1f);
62   r1 = (r1 << 3) | (r1 >> 2);
63   g1 = (g1 << 3) | (g1 >> 2);
64   b1 = (b1 << 3) | (b1 >> 2);
65
66   b2 = ((data >> 0) & 0x1f);
67   g2 = ((data >> 5) & 0x1f);
68   r2 = ((data >> 10) & 0x1f);
69   r2 = (r2 << 3) | (r2 >> 2);
70   g2 = (g2 << 3) | (g2 >> 2);
71   b2 = (b2 << 3) | (b2 >> 2);
72
73   palette_set_color(Machine, (offset*2)+0, MAKE_RGB(r1, g1, b1));
74   palette_set_color(Machine, (offset*2)+1, MAKE_RGB(r2, g2, b2));
46   palette_set_color(machine, (offset*2)+0, MAKE_RGB(pal5bit(data >> 26), pal5bit(data >> 21), pal5bit(data >> 16)));
47   palette_set_color(machine, (offset*2)+1, MAKE_RGB(pal5bit(data >> 10), pal5bit(data >>  5), pal5bit(data >>  0)));
7548}
7649
77static READ32_HANDLER(eeprom_r)
50static READ32_HANDLER( eeprom_r )
7851{
7952   UINT32 r = 0;
8053
8154   if (!(mem_mask & 0xff000000))
82   {
8355      r |= (((EEPROM_read_bit()) << 1) | (readinputport(6) << 3)) << 24;
84   }
8556
8657   return r;
8758}
8859
89static WRITE32_HANDLER(eeprom_w)
60static WRITE32_HANDLER( eeprom_w )
9061{
9162   if (!(mem_mask & 0xff000000))
9263   {
r2086r2087
9667   }
9768}
9869
99static READ32_HANDLER(control1_r)
70static READ32_HANDLER( control1_r )
10071{
10172   return (readinputport(0) << 28) | ((readinputport(1) & 0xfff) << 16) | (readinputport(2) & 0xfff);
10273}
10374
104static READ32_HANDLER(control2_r)
75static READ32_HANDLER( control2_r )
10576{
10677   return (readinputport(3) << 28) | ((readinputport(4) & 0xfff) << 16) | (readinputport(5) & 0xfff);
10778}
10879
109static WRITE32_HANDLER(int_ack_w)
80static WRITE32_HANDLER( int_ack_w )
11081{
111   cpunum_set_input_line(Machine, 0, INPUT_LINE_IRQ1, CLEAR_LINE);
82   cpunum_set_input_line(machine, 0, INPUT_LINE_IRQ1, CLEAR_LINE);
11283}
11384
11485static ADDRESS_MAP_START( ultrsprt_map, ADDRESS_SPACE_PROGRAM, 32 )
115   AM_RANGE(0x00000000, 0x0007ffff) AM_MIRROR(0x80000000) AM_RAM AM_BASE(&vram)
116   AM_RANGE(0x70000000, 0x70000003) AM_MIRROR(0x80000000) AM_READWRITE(eeprom_r, eeprom_w)
117   AM_RANGE(0x70000020, 0x70000023) AM_MIRROR(0x80000000) AM_READ(control1_r)
118   AM_RANGE(0x70000040, 0x70000043) AM_MIRROR(0x80000000) AM_READ(control2_r)
119   AM_RANGE(0x70000080, 0x70000087) AM_MIRROR(0x80000000) AM_WRITE(K056800_host_w)
120   AM_RANGE(0x70000088, 0x7000008f) AM_MIRROR(0x80000000) AM_READ(K056800_host_r)
121   AM_RANGE(0x700000e0, 0x700000e3) AM_MIRROR(0x80000000) AM_WRITE(int_ack_w)
122   AM_RANGE(0x7f000000, 0x7f01ffff) AM_MIRROR(0x80000000) AM_RAM
123   AM_RANGE(0x7f700000, 0x7f703fff) AM_MIRROR(0x80000000) AM_READWRITE(SMH_RAM, palette_w) AM_BASE(&paletteram32)
124   AM_RANGE(0x7fa00000, 0x7fbfffff) AM_MIRROR(0x80000000) AM_ROM AM_SHARE(1)
125   AM_RANGE(0x7fc00000, 0x7fdfffff) AM_MIRROR(0x80000000) AM_ROM AM_SHARE(1)
126   AM_RANGE(0x7fe00000, 0x7fffffff) AM_MIRROR(0x80000000) AM_ROM AM_REGION(REGION_USER1, 0) AM_SHARE(1)
86   ADDRESS_MAP_GLOBAL_MASK(0x7fffffff)
87   AM_RANGE(0x00000000, 0x0007ffff) AM_RAM AM_BASE(&vram)
88   AM_RANGE(0x70000000, 0x70000003) AM_READWRITE(eeprom_r, eeprom_w)
89   AM_RANGE(0x70000020, 0x70000023) AM_READ(control1_r)
90   AM_RANGE(0x70000040, 0x70000043) AM_READ(control2_r)
91   AM_RANGE(0x70000080, 0x70000087) AM_WRITE(K056800_host_w)
92   AM_RANGE(0x70000088, 0x7000008f) AM_READ(K056800_host_r)
93   AM_RANGE(0x700000e0, 0x700000e3) AM_WRITE(int_ack_w)
94   AM_RANGE(0x7f000000, 0x7f01ffff) AM_RAM
95   AM_RANGE(0x7f700000, 0x7f703fff) AM_READWRITE(SMH_RAM, palette_w) AM_BASE(&paletteram32)
96   AM_RANGE(0x7fa00000, 0x7fbfffff) AM_ROM AM_SHARE(1)
97   AM_RANGE(0x7fc00000, 0x7fdfffff) AM_ROM AM_SHARE(1)
98   AM_RANGE(0x7fe00000, 0x7fffffff) AM_ROM AM_REGION(REGION_USER1, 0) AM_SHARE(1)
12799ADDRESS_MAP_END
128100
129101
130102/*****************************************************************************/
131103
132104
133static READ16_HANDLER(sound_r)
105static READ16_HANDLER( sound_r )
134106{
135107   UINT16 r = 0;
136108   int reg = offset * 2;
137109
138110   if (ACCESSING_MSB16)
139   {
140111      r |= K054539_0_r(machine, reg+0) << 8;
141   }
112
142113   if (ACCESSING_LSB16)
143   {
144114      r |= K054539_0_r(machine, reg+1) << 0;
145   }
146115
147116   return r;
148117}
149118
150static WRITE16_HANDLER(sound_w)
119static WRITE16_HANDLER( sound_w )
151120{
152121   int reg = offset * 2;
153122
154123   if (ACCESSING_MSB16)
155   {
156124      K054539_0_w(machine, reg+0, (data >> 8) & 0xff);
157   }
125
158126   if (ACCESSING_LSB16)
159   {
160127      K054539_0_w(machine, reg+1, (data >> 0) & 0xff);
161   }
162128}
163129
164static READ16_HANDLER(K056800_68k_r)
130static READ16_HANDLER( K056800_68k_r )
165131{
166132   UINT16 r = 0;
167133
168134   if (!(mem_mask & 0xff00))
169   {
170135      r |= K056800_sound_r(machine, (offset*2)+0, 0xffff) << 8;
171   }
136
172137   if (!(mem_mask & 0x00ff))
173   {
174138      r |= K056800_sound_r(machine, (offset*2)+1, 0xffff) << 0;
175   }
176139
177140   return r;
178141}
179142
180static WRITE16_HANDLER(K056800_68k_w)
143static WRITE16_HANDLER( K056800_68k_w )
181144{
182145   if (!(mem_mask & 0xff00))
183   {
184146      K056800_sound_w(machine, (offset*2)+0, (data >> 8) & 0xff, 0xffff);
185   }
147
186148   if (!(mem_mask & 0x00ff))
187   {
188149      K056800_sound_w(machine, (offset*2)+1, (data >> 0) & 0xff, 0xffff);
189   }
190150}
191151
192152static ADDRESS_MAP_START( sound_map, ADDRESS_SPACE_PROGRAM, 16 )
r2086r2087
263223   cpunum_set_input_line(machine, 0, INPUT_LINE_IRQ1, ASSERT_LINE);
264224}
265225
266static MACHINE_RESET( ultrsprt )
267{
268226
269}
270
271227static MACHINE_DRIVER_START( ultrsprt )
272228   /* basic machine hardware */
273229   MDRV_CPU_ADD(PPC403, 25000000)      /* PowerPC 403GA 25MHz */
r2086r2087
282238   MDRV_INTERLEAVE(200)
283239
284240   MDRV_NVRAM_HANDLER(ultrsprt)
285   MDRV_MACHINE_RESET(ultrsprt)
286241
287242    /* video hardware */
288243   MDRV_SCREEN_ADD("main", RASTER)
289244   MDRV_SCREEN_REFRESH_RATE(60)
290245   MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
291   MDRV_SCREEN_FORMAT(BITMAP_FORMAT_RGB15)
246   MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
292247   MDRV_SCREEN_SIZE(512, 400)
293248   MDRV_SCREEN_VISIBLE_AREA(0, 511, 0, 399)
294249
295250   MDRV_PALETTE_LENGTH(8192)
296251
297   MDRV_VIDEO_START(ultrsprt)
298252   MDRV_VIDEO_UPDATE(ultrsprt)
299253
300254   /* sound hardware */
r2086r2087
309263static void sound_irq_callback(int irq)
310264{
311265   if (irq == 0)
312   {
313      //cpunum_set_input_line(Machine, 1, INPUT_LINE_IRQ5, PULSE_LINE);
314   }
266      /*cpunum_set_input_line(Machine, 1, INPUT_LINE_IRQ5, PULSE_LINE)*/;
315267   else
316   {
317268      cpunum_set_input_line(Machine, 1, INPUT_LINE_IRQ6, PULSE_LINE);
318   }
319269}
320270
321271static DRIVER_INIT( ultrsprt )
r2086r2087
327277
328278/*****************************************************************************/
329279
330ROM_START(fiveside)
280ROM_START( fiveside )
331281   ROM_REGION(0x200000, REGION_USER1, 0)   /* PowerPC program roms */
332      ROM_LOAD32_BYTE("479uaa01.bin", 0x000003, 0x80000, CRC(1bc4893d) SHA1(2c9df38ecb7efa7b686221ee98fa3aad9a63e152))
333      ROM_LOAD32_BYTE("479uaa02.bin", 0x000002, 0x80000, CRC(ae74a6d0) SHA1(6113c2eea1628b22737c7b87af0e673d94984e88))
334      ROM_LOAD32_BYTE("479uaa03.bin", 0x000001, 0x80000, CRC(5c0b176f) SHA1(9560259bc081d4cfd72eb485c3fdcecf484ba7a8))
335      ROM_LOAD32_BYTE("479uaa04.bin", 0x000000, 0x80000, CRC(01a3e4cb) SHA1(819df79909d57fa12481698ffdb32b00586131d8))
282   ROM_LOAD32_BYTE("479uaa01.bin", 0x000003, 0x80000, CRC(1bc4893d) SHA1(2c9df38ecb7efa7b686221ee98fa3aad9a63e152))
283   ROM_LOAD32_BYTE("479uaa02.bin", 0x000002, 0x80000, CRC(ae74a6d0) SHA1(6113c2eea1628b22737c7b87af0e673d94984e88))
284   ROM_LOAD32_BYTE("479uaa03.bin", 0x000001, 0x80000, CRC(5c0b176f) SHA1(9560259bc081d4cfd72eb485c3fdcecf484ba7a8))
285   ROM_LOAD32_BYTE("479uaa04.bin", 0x000000, 0x80000, CRC(01a3e4cb) SHA1(819df79909d57fa12481698ffdb32b00586131d8))
336286
337287   ROM_REGION(0x20000, REGION_CPU2, 0)      /* M68K program */
338      ROM_LOAD("479_a05.bin", 0x000000, 0x20000, CRC(251ae299) SHA1(5ffd74357e3c6ddb3a208c39a3b32b53fea90282))
288   ROM_LOAD("479_a05.bin", 0x000000, 0x20000, CRC(251ae299) SHA1(5ffd74357e3c6ddb3a208c39a3b32b53fea90282))
339289
340290   ROM_REGION(0x100000, REGION_SOUND1, 0)   /* Sound roms */
341      ROM_LOAD("479_a06.bin", 0x000000, 0x80000, CRC(8d6ac8a2) SHA1(7c4b8bd47cddc766cbdb6a486acc9221be55b579))
342      ROM_LOAD("479_a07.bin", 0x080000, 0x80000, CRC(75835df8) SHA1(105b95c16f2ce6902c2e4c9c2fd9f2f7a848c546))
291   ROM_LOAD("479_a06.bin", 0x000000, 0x80000, CRC(8d6ac8a2) SHA1(7c4b8bd47cddc766cbdb6a486acc9221be55b579))
292   ROM_LOAD("479_a07.bin", 0x080000, 0x80000, CRC(75835df8) SHA1(105b95c16f2ce6902c2e4c9c2fd9f2f7a848c546))
343293ROM_END
344294
345GAME(1995, fiveside, 0,       ultrsprt, ultrsprt, ultrsprt, ROT90,  "Konami", "Five a Side Soccer (ver UAA)", GAME_IMPERFECT_SOUND)
295GAME(1995, fiveside, 0, ultrsprt, ultrsprt, ultrsprt, ROT90, "Konami", "Five a Side Soccer (ver UAA)", GAME_IMPERFECT_SOUND)
src/mame/drivers/orbit.c
r2086r2087
2222#include "sound/discrete.h"
2323
2424
25static int orbit_nmi_enable;
25#define MASTER_CLOCK      XTAL_12_096MHz
2626
27
2728static UINT8 orbit_misc_flags;
2829
2930
31
32/*************************************
33 *
34 *  Interrupts and timing
35 *
36 *************************************/
37
38static TIMER_CALLBACK( nmi_32v )
39{
40   int scanline = param;
41   int nmistate = (scanline & 32) && (orbit_misc_flags & 4);
42   cpunum_set_input_line(machine, 0, INPUT_LINE_NMI, nmistate ? ASSERT_LINE : CLEAR_LINE);
43}
44
45
46static TIMER_CALLBACK( irq_off )
47{
48   cpunum_set_input_line(machine, 0, 0, CLEAR_LINE);
49}
50
51
3052static INTERRUPT_GEN( orbit_interrupt )
3153{
32   if (orbit_nmi_enable)
33      cpunum_set_input_line(machine, 0, INPUT_LINE_NMI, PULSE_LINE);
54   cpunum_set_input_line(machine, 0, 0, ASSERT_LINE);
55   timer_set(video_screen_get_time_until_vblank_end(machine->primary_screen), NULL, 0, irq_off);
3456}
3557
3658
59
60/*************************************
61 *
62 *  Bit flags
63 *
64 *************************************/
65
3766static void update_misc_flags(running_machine *machine, UINT8 val)
3867{
3968   orbit_misc_flags = val;
r2086r2087
4776   /* BIT6 => HYPER LED    */
4877   /* BIT7 => WARNING SND  */
4978
50   orbit_nmi_enable = (orbit_misc_flags >> 2) & 1;
5179   discrete_sound_w(machine, ORBIT_WARNING_EN, orbit_misc_flags & 0x80);
5280
5381   set_led_status(0, orbit_misc_flags & 0x08);
r2086r2087
5886}
5987
6088
61static MACHINE_RESET( orbit )
62{
63   update_misc_flags(machine, 0);
64}
65
66
6789static WRITE8_HANDLER( orbit_misc_w )
6890{
6991   UINT8 bit = offset >> 1;
7092
7193   if (offset & 1)
72   {
7394      update_misc_flags(machine, orbit_misc_flags | (1 << bit));
74   }
7595   else
76   {
7796      update_misc_flags(machine, orbit_misc_flags & ~(1 << bit));
78   }
7997}
8098
8199
100
101/*************************************
102 *
103 *  Machine setup
104 *
105 *************************************/
106
107static MACHINE_RESET( orbit )
108{
109   update_misc_flags(machine, 0);
110}
111
112
113
114/*************************************
115 *
116 *  Address maps
117 *
118 *************************************/
119
82120static ADDRESS_MAP_START( orbit_map, ADDRESS_SPACE_PROGRAM, 8 )
83   AM_RANGE(0x0000, 0x00ff) AM_RAM AM_MIRROR(0x700)
84   AM_RANGE(0x0800, 0x0800) AM_READ(input_port_0_r)
85   AM_RANGE(0x1000, 0x1000) AM_READ(input_port_1_r)
86   AM_RANGE(0x1800, 0x1800) AM_READ(input_port_2_r)
87   AM_RANGE(0x2000, 0x2000) AM_READ(input_port_3_r)
88   AM_RANGE(0x2800, 0x2800) AM_READ(input_port_4_r)
89   AM_RANGE(0x3000, 0x33bf) AM_READWRITE(SMH_RAM, orbit_playfield_w) AM_BASE(&orbit_playfield_ram)
90   AM_RANGE(0x33c0, 0x33ff) AM_READWRITE(SMH_RAM, orbit_sprite_w) AM_BASE(&orbit_sprite_ram)
91   AM_RANGE(0x3400, 0x37bf) AM_WRITE(orbit_playfield_w)
92   AM_RANGE(0x37c0, 0x37ff) AM_WRITE(orbit_sprite_w)
93   AM_RANGE(0x3800, 0x3800) AM_WRITE(orbit_note_w)
94   AM_RANGE(0x3900, 0x3900) AM_WRITE(orbit_noise_amp_w)
95   AM_RANGE(0x3a00, 0x3a00) AM_WRITE(orbit_note_amp_w)
96   AM_RANGE(0x3c00, 0x3c0f) AM_WRITE(orbit_misc_w)
97   AM_RANGE(0x3e00, 0x3e00) AM_WRITE(orbit_noise_rst_w)
98   AM_RANGE(0x3f00, 0x3f00) AM_WRITE(watchdog_reset_w)
99   AM_RANGE(0x6800, 0x7fff) AM_ROM AM_MIRROR(0x8000)      /* program */
121   ADDRESS_MAP_GLOBAL_MASK(0x7fff)
122   AM_RANGE(0x0000, 0x00ff) AM_MIRROR(0x0700) AM_RAM
123   AM_RANGE(0x0800, 0x0800) AM_MIRROR(0x07ff) AM_READ(input_port_0_r)
124   AM_RANGE(0x1000, 0x1000) AM_MIRROR(0x07ff) AM_READ(input_port_1_r)
125   AM_RANGE(0x1800, 0x1800) AM_MIRROR(0x07ff) AM_READ(input_port_2_r)
126   AM_RANGE(0x2000, 0x2000) AM_MIRROR(0x07ff) AM_READ(input_port_3_r)
127   AM_RANGE(0x2800, 0x2800) AM_MIRROR(0x07ff) AM_READ(input_port_4_r)
128   AM_RANGE(0x3000, 0x33bf) AM_MIRROR(0x0400) AM_READWRITE(SMH_RAM, orbit_playfield_w) AM_BASE(&orbit_playfield_ram)
129   AM_RANGE(0x33c0, 0x33ff) AM_MIRROR(0x0400) AM_RAM AM_BASE(&orbit_sprite_ram)
130   AM_RANGE(0x3800, 0x3800) AM_MIRROR(0x00ff) AM_WRITE(orbit_note_w)
131   AM_RANGE(0x3900, 0x3900) AM_MIRROR(0x00ff) AM_WRITE(orbit_noise_amp_w)
132   AM_RANGE(0x3a00, 0x3a00) AM_MIRROR(0x00ff) AM_WRITE(orbit_note_amp_w)
133   AM_RANGE(0x3c00, 0x3c0f) AM_MIRROR(0x00f0) AM_WRITE(orbit_misc_w)
134   AM_RANGE(0x3e00, 0x3e00) AM_MIRROR(0x00ff) AM_WRITE(orbit_noise_rst_w)
135   AM_RANGE(0x3f00, 0x3f00) AM_MIRROR(0x00ff) AM_WRITE(watchdog_reset_w)
136   AM_RANGE(0x6000, 0x7fff) AM_ROM
100137ADDRESS_MAP_END
101138
102139
140
141/*************************************
142 *
143 *  Port definitions
144 *
145 *************************************/
146
103147static INPUT_PORTS_START( orbit )
104148   PORT_START /* 0800 */
105149   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
r2086r2087
174218INPUT_PORTS_END
175219
176220
221
222/*************************************
223 *
224 *  Graphics layouts
225 *
226 *************************************/
227
177228static const gfx_layout orbit_full_sprite_layout =
178229{
179   8, 32,    /* width, height */
180   128,      /* total         */
181   1,        /* planes        */
182   { 0 },    /* plane offsets */
183   {
184      0, 1, 2, 3, 4, 5, 6, 7
185   },
186   {
187      0x00, 0x08, 0x10, 0x18, 0x20, 0x28, 0x30, 0x38,
188      0x40, 0x48, 0x50, 0x58, 0x60, 0x68, 0x70, 0x78,
189      0x80, 0x88, 0x90, 0x98, 0xA0, 0xA8, 0xB0, 0xB8,
190      0xC0, 0xC8, 0xD0, 0xD8, 0xE0, 0xE8, 0xF0, 0xF8
191   },
192   0x100     /* increment */
230   8, 32,
231   RGN_FRAC(1,1),
232   1,
233   { 0 },
234   { STEP8(0,1) },
235   { STEP32(0,8) },
236   0x100
193237};
194238
195239
196240static const gfx_layout orbit_upper_sprite_layout =
197241{
198   8, 16,    /* width, height */
199   128,      /* total         */
200   1,        /* planes        */
201   { 0 },    /* plane offsets */
202   {
203      0, 1, 2, 3, 4, 5, 6, 7
204   },
205   {
206      0x00, 0x08, 0x10, 0x18, 0x20, 0x28, 0x30, 0x38,
207      0x40, 0x48, 0x50, 0x58, 0x60, 0x68, 0x70, 0x78
208   },
209   0x100     /* increment */
242   8, 16,
243   RGN_FRAC(1,1),
244   1,
245   { 0 },
246   { STEP8(0,1) },
247   { STEP16(0,8) },
248   0x100
210249};
211250
212251
213252static const gfx_layout orbit_lower_sprite_layout =
214253{
215   8, 16,    /* width, height */
216   128,      /* total         */
217   1,        /* planes        */
218   { 0 },    /* plane offsets */
219   {
220      0, 1, 2, 3, 4, 5, 6, 7
221   },
222   {
223      0x80, 0x88, 0x90, 0x98, 0xA0, 0xA8, 0xB0, 0xB8,
224      0xC0, 0xC8, 0xD0, 0xD8, 0xE0, 0xE8, 0xF0, 0xF8
225   },
226   0x100     /* increment */
254   8, 16,
255   RGN_FRAC(1,1),
256   1,
257   { 0 },
258   { STEP8(0,1) },
259   { STEP16(0x80,8) },
260   0x100
227261};
228262
229263
230264static const gfx_layout orbit_tile_layout =
231265{
232   16, 16,   /* width, height */
233   64,       /* total         */
234   1,        /* planes        */
235   { 0 },    /* plane offsets */
236   {
237      0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7
238   },
239   {
240      0x00, 0x00, 0x08, 0x08, 0x10, 0x10, 0x18, 0x18,
241      0x20, 0x20, 0x28, 0x28, 0x30, 0x30, 0x38, 0x38
242   },
243   0x40      /* increment */
266   8, 8,
267   RGN_FRAC(1,1),
268   1,
269   { 0 },
270   { STEP8(0,1) },
271   { STEP8(0,8) },
272   0x40
244273};
245274
246275
r2086r2087
248277   GFXDECODE_ENTRY( REGION_GFX1, 0, orbit_full_sprite_layout, 0, 1 )
249278   GFXDECODE_ENTRY( REGION_GFX1, 0, orbit_upper_sprite_layout, 0, 1 )
250279   GFXDECODE_ENTRY( REGION_GFX1, 0, orbit_lower_sprite_layout, 0, 1 )
251   GFXDECODE_ENTRY( REGION_GFX2, 0, orbit_tile_layout, 0, 1 )
280   GFXDECODE_SCALE( REGION_GFX2, 0, orbit_tile_layout, 0, 1, 2, 2 )
252281GFXDECODE_END
253282
254283
255static PALETTE_INIT( orbit )
256{
257   palette_set_color(machine, 0, MAKE_RGB(0x00, 0x00, 0x00));
258   palette_set_color(machine, 1, MAKE_RGB(0xFF, 0xFF, 0xFF));
259}
260284
285/*************************************
286 *
287 *  Machine drivers
288 *
289 *************************************/
261290
262291static MACHINE_DRIVER_START( orbit )
263292
264293   /* basic machine hardware */
265   MDRV_CPU_ADD(M6800, 12096000 / 16)
294   MDRV_CPU_ADD(M6800, MASTER_CLOCK / 16)
266295   MDRV_CPU_PROGRAM_MAP(orbit_map, 0)
267   MDRV_CPU_VBLANK_INT("main", irq0_line_pulse)
268   MDRV_CPU_PERIODIC_INT(orbit_interrupt, 240)
296   MDRV_CPU_VBLANK_INT("main", orbit_interrupt)
269297
298   MDRV_TIMER_ADD_SCANLINE("32V", nmi_32v, "main", 0, 32)
299
270300   MDRV_MACHINE_RESET(orbit)
271301
272302   /* video hardware */
273303   MDRV_SCREEN_ADD("main", RASTER)
274   MDRV_SCREEN_REFRESH_RATE(60) /* interlaced */
275   MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC((int) ((22. * 1000000) / (262. * 60) + 0.5)))
276304   MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
277   MDRV_SCREEN_SIZE(512, 524)
278   MDRV_SCREEN_VISIBLE_AREA(0, 511, 0, 479)
305   MDRV_SCREEN_RAW_PARAMS(MASTER_CLOCK*2, 384*2, 0, 256*2, 261*2, 0, 240*2)
279306
280307   MDRV_GFXDECODE(orbit)
281308   MDRV_PALETTE_LENGTH(2)
282   MDRV_PALETTE_INIT(orbit)
309   MDRV_PALETTE_INIT(black_and_white)
283310   MDRV_VIDEO_START(orbit)
284311   MDRV_VIDEO_UPDATE(orbit)
285312
r2086r2087
293320MACHINE_DRIVER_END
294321
295322
323
324/*************************************
325 *
326 *  ROM definitions
327 *
328 *************************************/
329
296330ROM_START( orbit )
297331   ROM_REGION( 0x10000, REGION_CPU1, 0 )
298332   ROM_LOAD_NIB_LOW ( "033701.h2", 0x6800, 0x400, CRC(6de43b85) SHA1(1643972f45d3a0dd6540158c575cd84cee2b0c9a) )
r2086r2087
322356ROM_END
323357
324358
359
360/*************************************
361 *
362 *  Game drivers
363 *
364 *************************************/
365
325366GAME( 1978, orbit, 0, orbit, orbit, 0, 0, "Atari", "Orbit", 0 )
src/mame/drivers/fitfight.c
r2086r2087
275275   cpunum_set_input_line(machine, 1,UPD7810_INTF2,HOLD_LINE);
276276}
277277
278static UPD7810_CONFIG sound_cpu_config =
278static const UPD7810_CONFIG sound_cpu_config =
279279{
280280    TYPE_7810,
281281    0
src/mame/drivers/malzak.c
r2086r2087
4848extern int malzak_x;
4949extern int malzak_y;
5050
51extern UINT8* saa5050_vidram;  /* Video RAM for SAA 5050 */
51extern UINT8 *saa5050_vidram;  /* Video RAM for SAA 5050 */
5252extern UINT8 *malzak_s2636_0_ram;
5353extern UINT8 *malzak_s2636_1_ram;
5454
5555// in video/malzak.c
5656VIDEO_START( malzak );
5757VIDEO_UPDATE( malzak );
58WRITE8_HANDLER( playfield_w );
58WRITE8_HANDLER( malzak_playfield_w );
5959
6060
61static READ8_HANDLER( saa5050_r )
62{
63   return saa5050_vidram[offset];
64}
65
66static WRITE8_HANDLER( saa5050_w )
67{
68   saa5050_vidram[offset] = data;
69}
70
7161static READ8_HANDLER( fake_VRLE_r )
7262{
7363   return (malzak_s2636_0_ram[0xcb] & 0x3f) + (video_screen_get_vblank(machine->primary_screen)*0x40);
7464}
7565
76static READ8_HANDLER( ram_mirror_r )
77{
78   return program_read_byte(0x1000+offset);
79}
80
81static WRITE8_HANDLER( ram_mirror_w )
82{
83   program_write_byte(0x1000+offset,data);
84}
85
8666static READ8_HANDLER( bank_r )
8767{
8868   UINT8* bank = memory_region(REGION_USER2);
r2086r2087
11090   }
11191}
11292
113/*
114static READ8_HANDLER( bank2_r )
115{  // probably very wrong :)
116    UINT8* bank = memory_region(REGION_USER1);
117
118    return bank[offset + (malzak_bank1 * 0x0400)];
119}
120*/
121static ADDRESS_MAP_START( readmem, ADDRESS_SPACE_PROGRAM, 8 )
122   AM_RANGE(0x0000, 0x0bff) AM_READ(SMH_ROM)
93static ADDRESS_MAP_START( malzak_map, ADDRESS_SPACE_PROGRAM, 8 )
94   ADDRESS_MAP_GLOBAL_MASK(0x7fff)
95   AM_RANGE(0x0000, 0x0bff) AM_ROM
12396   AM_RANGE(0x0c00, 0x0fff) AM_READ(bank_r)
124   AM_RANGE(0x1000, 0x10ff) AM_READ(SMH_RAM)
125   AM_RANGE(0x1100, 0x11ff) AM_READ(SMH_RAM)
126   AM_RANGE(0x1200, 0x12ff) AM_READ(SMH_RAM)
127   AM_RANGE(0x1300, 0x13ff) AM_READ(SMH_RAM)
128   AM_RANGE(0x14cb, 0x14cb) AM_READ(fake_VRLE_r)
129   AM_RANGE(0x1400, 0x14ff) AM_READ(SMH_RAM)
130   AM_RANGE(0x1500, 0x15ff) AM_READ(SMH_RAM)
131   AM_RANGE(0x1600, 0x16ff) AM_READ(SMH_RAM)
132   AM_RANGE(0x1700, 0x17ff) AM_READ(SMH_RAM)
133   AM_RANGE(0x1800, 0x1fff) AM_READ(saa5050_r)  // SAA 5050 video RAM
134   AM_RANGE(0x2000, 0x2fff) AM_READ(SMH_ROM)
135   AM_RANGE(0x3000, 0x3fff) AM_READ(ram_mirror_r)
136   AM_RANGE(0x4000, 0x4fff) AM_READ(SMH_ROM)
137   AM_RANGE(0x5000, 0x5fff) AM_READ(ram_mirror_r)
138   AM_RANGE(0x6000, 0x6fff) AM_READ(SMH_ROM)
139   AM_RANGE(0x7000, 0x7fff) AM_READ(ram_mirror_r)
97   AM_RANGE(0x1000, 0x10ff) AM_MIRROR(0x6000) AM_RAM
98   AM_RANGE(0x1100, 0x11ff) AM_MIRROR(0x6000) AM_RAM
99   AM_RANGE(0x1200, 0x12ff) AM_MIRROR(0x6000) AM_RAM
100   AM_RANGE(0x1300, 0x13ff) AM_MIRROR(0x6000) AM_RAM
101   AM_RANGE(0x14cb, 0x14cb) AM_MIRROR(0x6000) AM_READ(fake_VRLE_r)
102   AM_RANGE(0x1400, 0x14ff) AM_MIRROR(0x6000) AM_RAM AM_BASE(&malzak_s2636_0_ram)
103   AM_RANGE(0x1500, 0x15ff) AM_MIRROR(0x6000) AM_RAM AM_BASE(&malzak_s2636_1_ram)
104   AM_RANGE(0x1600, 0x16ff) AM_MIRROR(0x6000) AM_READWRITE(SMH_RAM, malzak_playfield_w)
105   AM_RANGE(0x1700, 0x17ff) AM_MIRROR(0x6000) AM_RAM
106   AM_RANGE(0x1800, 0x1fff) AM_MIRROR(0x6000) AM_RAM AM_BASE(&saa5050_vidram)
107   AM_RANGE(0x2000, 0x2fff) AM_ROM
108   AM_RANGE(0x4000, 0x4fff) AM_ROM
109   AM_RANGE(0x6000, 0x6fff) AM_ROM
140110ADDRESS_MAP_END
141111
142112
143static ADDRESS_MAP_START( writemem, ADDRESS_SPACE_PROGRAM, 8 )
144   AM_RANGE(0x0000, 0x0fff) AM_WRITE(SMH_ROM)
145   AM_RANGE(0x1000, 0x10ff) AM_WRITE(SMH_RAM)
146   AM_RANGE(0x1100, 0x11ff) AM_WRITE(SMH_RAM)
147   AM_RANGE(0x1200, 0x12ff) AM_WRITE(SMH_RAM)
148   AM_RANGE(0x1300, 0x13ff) AM_WRITE(SMH_RAM)
149   AM_RANGE(0x1400, 0x14ff) AM_WRITE(SMH_RAM) AM_BASE(&malzak_s2636_0_ram)
150   AM_RANGE(0x1500, 0x15ff) AM_WRITE(SMH_RAM) AM_BASE(&malzak_s2636_1_ram)
151   AM_RANGE(0x1600, 0x16ff) AM_WRITE(playfield_w)
152   AM_RANGE(0x1600, 0x16ff) AM_WRITE(SMH_RAM)
153   AM_RANGE(0x1700, 0x17ff) AM_WRITE(SMH_RAM)
154   AM_RANGE(0x1800, 0x1fff) AM_WRITE(saa5050_w)  // SAA 5050 video RAM
155   AM_RANGE(0x2000, 0x2fff) AM_WRITE(SMH_ROM)
156   AM_RANGE(0x3000, 0x3fff) AM_WRITE(ram_mirror_w)
157   AM_RANGE(0x4000, 0x4fff) AM_WRITE(SMH_ROM)
158   AM_RANGE(0x5000, 0x5fff) AM_WRITE(ram_mirror_w)
159   AM_RANGE(0x6000, 0x6fff) AM_WRITE(SMH_ROM)
160   AM_RANGE(0x7000, 0x7fff) AM_WRITE(ram_mirror_w)
161ADDRESS_MAP_END
162
163static ADDRESS_MAP_START( malzak2_readmem, ADDRESS_SPACE_PROGRAM, 8 )
164   AM_RANGE(0x0000, 0x0bff) AM_READ(SMH_ROM)
113static ADDRESS_MAP_START( malzak2_map, ADDRESS_SPACE_PROGRAM, 8 )
114   ADDRESS_MAP_GLOBAL_MASK(0x7fff)
115   AM_RANGE(0x0000, 0x0bff) AM_ROM
165116   AM_RANGE(0x0c00, 0x0fff) AM_READ(bank_r)
166   AM_RANGE(0x1000, 0x10ff) AM_READ(SMH_RAM)
167   AM_RANGE(0x1100, 0x11ff) AM_READ(SMH_RAM)
168   AM_RANGE(0x1200, 0x12ff) AM_READ(SMH_RAM)
169   AM_RANGE(0x1300, 0x13ff) AM_READ(SMH_RAM)
170   AM_RANGE(0x14cb, 0x14cb) AM_READ(fake_VRLE_r)
171   AM_RANGE(0x14cc, 0x14cc) AM_READ(s2636_portA_r)
172   AM_RANGE(0x1400, 0x14ff) AM_READ(SMH_RAM)
173   AM_RANGE(0x1500, 0x15ff) AM_READ(SMH_RAM)
174   AM_RANGE(0x1600, 0x16ff) AM_READ(SMH_RAM)
175   AM_RANGE(0x1700, 0x17ff) AM_READ(SMH_RAM) AM_BASE(&generic_nvram) AM_SIZE(&generic_nvram_size)
176   AM_RANGE(0x1800, 0x1fff) AM_READ(saa5050_r)  // SAA 5050 video RAM
177   AM_RANGE(0x2000, 0x2fff) AM_READ(SMH_ROM)
178   AM_RANGE(0x3000, 0x3fff) AM_READ(ram_mirror_r)
179   AM_RANGE(0x4000, 0x4fff) AM_READ(SMH_ROM)
180   AM_RANGE(0x5000, 0x5fff) AM_READ(ram_mirror_r)
181   AM_RANGE(0x6000, 0x6fff) AM_READ(SMH_ROM)
182   AM_RANGE(0x7000, 0x7fff) AM_READ(ram_mirror_r)
117   AM_RANGE(0x1000, 0x10ff) AM_MIRROR(0x6000) AM_RAM
118   AM_RANGE(0x1100, 0x11ff) AM_MIRROR(0x6000) AM_RAM
119   AM_RANGE(0x1200, 0x12ff) AM_MIRROR(0x6000) AM_RAM
120   AM_RANGE(0x1300, 0x13ff) AM_MIRROR(0x6000) AM_RAM
121   AM_RANGE(0x14cb, 0x14cb) AM_MIRROR(0x6000) AM_READ(fake_VRLE_r)
122   AM_RANGE(0x14cc, 0x14cc) AM_MIRROR(0x6000) AM_READ(s2636_portA_r)
123   AM_RANGE(0x1400, 0x14ff) AM_MIRROR(0x6000) AM_RAM AM_BASE(&malzak_s2636_0_ram)
124   AM_RANGE(0x1500, 0x15ff) AM_MIRROR(0x6000) AM_RAM AM_BASE(&malzak_s2636_1_ram)
125   AM_RANGE(0x1600, 0x16ff) AM_MIRROR(0x6000) AM_READWRITE(SMH_RAM, malzak_playfield_w)
126   AM_RANGE(0x1700, 0x17ff) AM_MIRROR(0x6000) AM_RAM AM_BASE(&generic_nvram) AM_SIZE(&generic_nvram_size)
127   AM_RANGE(0x1800, 0x1fff) AM_MIRROR(0x6000) AM_RAM AM_BASE(&saa5050_vidram)
128   AM_RANGE(0x2000, 0x2fff) AM_ROM
129   AM_RANGE(0x4000, 0x4fff) AM_ROM
130   AM_RANGE(0x6000, 0x6fff) AM_ROM
183131ADDRESS_MAP_END
184132
185133
186static ADDRESS_MAP_START( malzak2_writemem, ADDRESS_SPACE_PROGRAM, 8 )
187   AM_RANGE(0x0000, 0x0fff) AM_WRITE(SMH_ROM)
188   AM_RANGE(0x1000, 0x10ff) AM_WRITE(SMH_RAM)
189   AM_RANGE(0x1100, 0x11ff) AM_WRITE(SMH_RAM)
190   AM_RANGE(0x1200, 0x12ff) AM_WRITE(SMH_RAM)
191   AM_RANGE(0x1300, 0x13ff) AM_WRITE(SMH_RAM)
192   AM_RANGE(0x1400, 0x14ff) AM_WRITE(SMH_RAM)
193   AM_RANGE(0x1500, 0x15ff) AM_WRITE(SMH_RAM)
194   AM_RANGE(0x1600, 0x16ff) AM_WRITE(playfield_w)
195   AM_RANGE(0x1600, 0x16ff) AM_WRITE(SMH_RAM)
196   AM_RANGE(0x1700, 0x17ff) AM_WRITE(SMH_RAM) AM_BASE(&generic_nvram) AM_SIZE(&generic_nvram_size)
197   AM_RANGE(0x1800, 0x1fff) AM_WRITE(saa5050_w)  // SAA 5050 video RAM
198   AM_RANGE(0x2000, 0x2fff) AM_WRITE(SMH_ROM)
199   AM_RANGE(0x3000, 0x3fff) AM_WRITE(ram_mirror_w)
200   AM_RANGE(0x4000, 0x4fff) AM_WRITE(SMH_ROM)
201   AM_RANGE(0x5000, 0x5fff) AM_WRITE(ram_mirror_w)
202   AM_RANGE(0x6000, 0x6fff) AM_WRITE(SMH_ROM)
203   AM_RANGE(0x7000, 0x7fff) AM_WRITE(ram_mirror_w)
204ADDRESS_MAP_END
205
206134static READ8_HANDLER( s2650_data_r )
207135{
208136   popmessage("S2650 data port read");
r2086r2087
247175   return 0xd0 + counter;
248176}
249177
250static ADDRESS_MAP_START( readport, ADDRESS_SPACE_IO, 8 )
178static ADDRESS_MAP_START( malzak_io_map, ADDRESS_SPACE_IO, 8 )
251179   AM_RANGE(0x00, 0x00) AM_READ(collision_r) // returns where a collision can occur.
252    AM_RANGE(0x80, 0x80) AM_READ(input_port_0_r)  //controls
253   AM_RANGE(S2650_DATA_PORT, S2650_DATA_PORT) AM_READ(s2650_data_r)  // read upon death
254    AM_RANGE(S2650_SENSE_PORT, S2650_SENSE_PORT) AM_READ(input_port_2_r)
255ADDRESS_MAP_END
256
257static ADDRESS_MAP_START( writeport, ADDRESS_SPACE_IO, 8 )
258180   AM_RANGE(0x40, 0x40) AM_WRITE(port40_w)  // possibly sound codes for dual SN76477s
259181   AM_RANGE(0x60, 0x60) AM_WRITE(port60_w)  // possibly playfield scroll X offset
182    AM_RANGE(0x80, 0x80) AM_READ(input_port_0_r)  //controls
260183   AM_RANGE(0xa0, 0xa0) AM_WRITE(SMH_NOP)  // echoes I/O port read from port 0x80
261184   AM_RANGE(0xc0, 0xc0) AM_WRITE(portc0_w)  // possibly playfield row selection for writing and/or collisions
185   AM_RANGE(S2650_DATA_PORT, S2650_DATA_PORT) AM_READ(s2650_data_r)  // read upon death
186    AM_RANGE(S2650_SENSE_PORT, S2650_SENSE_PORT) AM_READ(input_port_2_r)
262187ADDRESS_MAP_END
263188
189
264190static INPUT_PORTS_START( malzak )
265191
266192   /* Malzak has an 8-way stick
r2086r2087
415341
416342   /* basic machine hardware */
417343   MDRV_CPU_ADD_TAG("main", S2650, 3800000/4)
418   MDRV_CPU_PROGRAM_MAP(readmem,writemem)
419   MDRV_CPU_IO_MAP(readport,writeport)
344   MDRV_CPU_PROGRAM_MAP(malzak_map,0)
345   MDRV_CPU_IO_MAP(malzak_io_map,0)
420346
421347   /* video hardware */
422348   MDRV_SCREEN_ADD("main", RASTER)
r2086r2087
451377   MDRV_IMPORT_FROM( malzak )
452378
453379   MDRV_CPU_MODIFY( "main" )
454   MDRV_CPU_PROGRAM_MAP( malzak2_readmem, malzak2_writemem )
380   MDRV_CPU_PROGRAM_MAP(malzak2_map,0)
455381
456382   MDRV_NVRAM_HANDLER( generic_0fill )
457383MACHINE_DRIVER_END
src/mame/drivers/astrof.c
r2086r2087
4949
5050
5151#include "driver.h"
52#include "deprecat.h"
5352#include "astrof.h"
5453
5554
r2086r2087
7069static UINT8 *astrof_colorram;
7170static UINT8 *tomahawk_protection;
7271
73static emu_timer *irq_timer;
74
7572static UINT8 *astrof_color;
7673static UINT8 astrof_palette_bank;
7774static UINT8 red_on;
r2086r2087
8885 *
8986 *************************************/
9087
91static READ8_HANDLER( irq_ack_r )
88static READ8_HANDLER( irq_clear_r )
9289{
93   cpunum_set_input_line(Machine, 0, 0, CLEAR_LINE);
90   cpunum_set_input_line(machine, 0, 0, CLEAR_LINE);
9491
9592   return 0;
9693}
9794
9895
99static TIMER_CALLBACK( irq_callback )
96static TIMER_DEVICE_CALLBACK( irq_callback )
10097{
101   cpunum_set_input_line(machine, 0, 0, ASSERT_LINE);
102
103   timer_adjust_oneshot(irq_timer, video_screen_get_time_until_pos(machine->primary_screen, VBSTART, 0), 0);
98   cpunum_set_input_line(timer->machine, 0, 0, ASSERT_LINE);
10499}
105100
106101
107static void create_irq_timer(void)
108{
109   irq_timer = timer_alloc(irq_callback, NULL);
110}
111102
112
113static void start_irq_timer(running_machine *machine)
114{
115   timer_adjust_oneshot(irq_timer, video_screen_get_time_until_pos(machine->primary_screen, VBSTART, 0), 0);
116}
117
118
119
120103/*************************************
121104 *
122105 *  Input handling
r2086r2087
386369static READ8_HANDLER( shoot_r )
387370{
388371   /* not really sure about this */
389   return mame_rand(Machine) & 8;
372   return mame_rand(machine) & 8;
390373}
391374
392375
r2086r2087
422405
423406static MACHINE_START( astrof )
424407{
425   create_irq_timer();
426
427408   /* the 74175 outputs all HI's if not otherwise set */
428409   astrof_set_video_control_2(0xff);
429410
r2086r2087
448429
449430static MACHINE_START( spfghmk2 )
450431{
451   create_irq_timer();
452
453432   /* the 74175 outputs all HI's if not otherwise set */
454433   spfghmk2_set_video_control_2(0xff);
455434
r2086r2087
465444
466445static MACHINE_START( tomahawk )
467446{
468   create_irq_timer();
469
470447   /* the 74175 outputs all HI's if not otherwise set */
471448   tomahawk_set_video_control_2(0xff);
472449
r2086r2087
484461 *
485462 *************************************/
486463
487static MACHINE_RESET( astrof )
488{
489   start_irq_timer(machine);
490}
491
492
493464static MACHINE_RESET( abattle )
494465{
495   MACHINE_RESET_CALL(astrof);
496
497466   abattle_count = 0;
498467}
499468
r2086r2087
518487   AM_RANGE(0x8007, 0x8007) AM_MIRROR(0x1ff8) AM_READWRITE(SMH_NOP, astrof_audio_2_w)
519488   AM_RANGE(0xa000, 0xa000) AM_MIRROR(0x1ff8) AM_READ_PORT("IN") AM_WRITENOP
520489   AM_RANGE(0xa001, 0xa001) AM_MIRROR(0x1ff8) AM_READ_PORT("DSW") AM_WRITENOP
521   AM_RANGE(0xa002, 0xa002) AM_MIRROR(0x1ff8) AM_READWRITE(irq_ack_r, SMH_NOP)
490   AM_RANGE(0xa002, 0xa002) AM_MIRROR(0x1ff8) AM_READWRITE(irq_clear_r, SMH_NOP)
522491   AM_RANGE(0xa003, 0xa007) AM_MIRROR(0x1ff8) AM_NOP
523492   AM_RANGE(0xc000, 0xffff) AM_ROM
524493ADDRESS_MAP_END
r2086r2087
537506   AM_RANGE(0x8007, 0x8007) AM_MIRROR(0x1ff8) AM_NOP
538507   AM_RANGE(0xa000, 0xa000) AM_MIRROR(0x1ff8) AM_READ_PORT("IN") AM_WRITENOP
539508   AM_RANGE(0xa001, 0xa001) AM_MIRROR(0x1ff8) AM_READ_PORT("DSW") AM_WRITENOP
540   AM_RANGE(0xa002, 0xa002) AM_MIRROR(0x1ff8) AM_READWRITE(irq_ack_r, SMH_NOP)
509   AM_RANGE(0xa002, 0xa002) AM_MIRROR(0x1ff8) AM_READWRITE(irq_clear_r, SMH_NOP)
541510   AM_RANGE(0xa003, 0xa007) AM_MIRROR(0x1ff8) AM_NOP
542511   AM_RANGE(0xc000, 0xffff) AM_ROM
543512ADDRESS_MAP_END
r2086r2087
556525   AM_RANGE(0x8007, 0x8007) AM_MIRROR(0x1ff8) AM_READWRITE(SMH_NOP, SMH_RAM) AM_BASE(&tomahawk_protection)
557526   AM_RANGE(0xa000, 0xa000) AM_MIRROR(0x1ff8) AM_READ_PORT("IN") AM_WRITE(SMH_NOP)
558527   AM_RANGE(0xa001, 0xa001) AM_MIRROR(0x1ff8) AM_READ_PORT("DSW") AM_WRITE(SMH_NOP)
559   AM_RANGE(0xa002, 0xa002) AM_MIRROR(0x1ff8) AM_READWRITE(irq_ack_r, SMH_NOP)
528   AM_RANGE(0xa002, 0xa002) AM_MIRROR(0x1ff8) AM_READWRITE(irq_clear_r, SMH_NOP)
560529   AM_RANGE(0xa003, 0xa003) AM_MIRROR(0x1ff8) AM_READWRITE(tomahawk_protection_r, SMH_NOP)
561530   AM_RANGE(0xa004, 0xa007) AM_MIRROR(0x1ff8) AM_NOP
562531   AM_RANGE(0xc000, 0xffff) AM_ROM
r2086r2087
651620   PORT_DIPSETTING(    0x00, "5000" )
652621   PORT_DIPSETTING(    0x10, "7000" )
653622   PORT_DIPSETTING(    0x20, "10000" )
654   PORT_DIPSETTING(    0x30, DEF_STR( None ) )\
623   PORT_DIPSETTING(    0x30, DEF_STR( None ) )
655624   PORT_DIPNAME( 0x40, 0x00, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW:7")
656625   PORT_DIPSETTING(    0x00, DEF_STR( Easy ) )
657626   PORT_DIPSETTING(    0x40, DEF_STR( Hard ) )
r2086r2087
864833
865834   /* basic machine hardware */
866835   MDRV_CPU_ADD_TAG("main", M6502, MAIN_CPU_CLOCK)
836   MDRV_TIMER_ADD_SCANLINE("VBLANK", irq_callback, "main", VBSTART, 0)
867837
868   MDRV_MACHINE_RESET(astrof)
869
870838   /* video hardware */
871839   MDRV_VIDEO_START(astrof)
872840
src/mame/drivers/xtheball.c
r2086r2087
338338{
339339   FALSE,                     /* halt on reset */
340340   "main",                     /* the screen operated on */
341   5000000,                  /* pixel clock */
342   2,                        /* pixels per clock */
341   10000000,                  /* pixel clock */
342   1,                        /* pixels per clock */
343343   xtheball_scanline_update,      /* scanline callback */
344344   NULL,                     /* generate interrupt */
345345   xtheball_to_shiftreg,         /* write to shiftreg function */
r2086r2087
369369
370370   MDRV_SCREEN_ADD("main", RASTER)
371371   MDRV_SCREEN_FORMAT(BITMAP_FORMAT_RGB32)
372   MDRV_SCREEN_SIZE(512,256)
373   MDRV_SCREEN_VISIBLE_AREA(0,511, 24,247)
374   MDRV_SCREEN_REFRESH_RATE(60)
372   MDRV_SCREEN_RAW_PARAMS(10000000, 640, 114, 626, 257, 24, 248)
375373
376374   /* sound hardware */
377375   MDRV_SPEAKER_STANDARD_MONO("mono")
src/mame/drivers/gticlub.c
r2086r2087
5353UINT8 gticlub_led_reg1 = 0x7f;
5454
5555int K001604_vh_start(running_machine *machine, int chip);
56void K001604_tile_update(int chip);
56void K001604_tile_update(running_machine *machine, int chip);
5757void K001604_draw_front_layer(int chip, bitmap_t *bitmap, const rectangle *cliprect);
5858void K001604_draw_back_layer(int chip, bitmap_t *bitmap, const rectangle *cliprect);
5959READ32_HANDLER(K001604_tile_r);
r2086r2087
112112
113113   if (screen == left_screen)
114114   {
115      K001604_tile_update(0);
115      K001604_tile_update(screen->machine, 0);
116116   //  K001604_draw_back_layer(bitmap, cliprect);
117117
118118      voodoo_update(0, bitmap, cliprect);
r2086r2087
121121   }
122122   else if (screen == right_screen)
123123   {
124      K001604_tile_update(1);
124      K001604_tile_update(screen->machine, 1);
125125   //  K001604_draw_back_layer(bitmap, cliprect);
126126
127127      voodoo_update(1, bitmap, cliprect);
src/mame/drivers/dkong.c
r2086r2087
337337 *
338338 *************************************/
339339
340static z80dma_interface dk3_dma =
340static const z80dma_interface dk3_dma =
341341{
342342   0,
343343   CLOCK_1H,
src/mame/drivers/mpu4.c
r2086r2087
13131313}
13141314
13151315// generate a 50 Hz signal (based on an RC time) //////////////////////////
1316static INTERRUPT_GEN( gen_50hz )
1316static TIMER_DEVICE_CALLBACK( gen_50hz )
13171317{
13181318   // Although reported as a '50Hz' signal, the fact that both rising and
13191319   // falling edges of the pulse are used, the timer actually gives a 100Hz
r2086r2087
13521352   MDRV_CPU_ADD_TAG("main", M6809, MPU4_MASTER_CLOCK/4)
13531353   MDRV_CPU_PROGRAM_MAP(mod2_memmap,0)
13541354
1355   MDRV_CPU_PERIODIC_INT(gen_50hz, 100)
1355   MDRV_TIMER_ADD_PERIODIC("50HZ",gen_50hz, HZ(100))
13561356
13571357   MDRV_SPEAKER_STANDARD_MONO("mono")
13581358   MDRV_SOUND_ADD_TAG("AY8913",AY8913, MPU4_MASTER_CLOCK/4)
src/mame/drivers/system16.c
r2086r2087
10931093   PORT_START_TAG("IN1")
10941094   PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN )
10951095
1096   PORT_START_TAG("IN2")
1096   PORT_START_TAG("IN3")
10971097   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL
10981098   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_COCKTAIL
10991099   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL
src/mame/drivers/marvins.c
r2086r2087
99Known Issues:
1010    Mad Crasher fails the ROM test, but ROMs are verified to be good (reason's unknown)
1111    Mad Crasher sound effects aren't being played (fixed)
12    Vanguard II crashes under dos with sound enabled (cannot verify)
13    Marvin's maze crashes under dos with sound enabled, hangs with sound disabled (cannot verify)
1412
1513
1614Change Log
r2086r2087
122120
123121static READ8_HANDLER( sound_nmi_ack_r )
124122{
125   cpunum_set_input_line(Machine, 2, INPUT_LINE_NMI, CLEAR_LINE);
123   cpunum_set_input_line(machine, 2, INPUT_LINE_NMI, CLEAR_LINE);
126124   return 0;
127125}
128126
r2086r2087
170168   AM_RANGE(0x8300, 0x8300) AM_WRITE(sound_command_w)
171169   AM_RANGE(0x8400, 0x8400) AM_READ(input_port_3_r)      /* dipswitch#1 */
172170   AM_RANGE(0x8500, 0x8500) AM_READ(input_port_4_r)      /* dipswitch#2 */
173   AM_RANGE(0x8600, 0x8600) AM_WRITE(SMH_RAM)   // video attribute
171   AM_RANGE(0x8600, 0x8600) AM_RAM   // video attribute
174172   AM_RANGE(0x8700, 0x8700) AM_READWRITE(snk_cpuB_nmi_trigger_r, snk_cpuA_nmi_ack_w)
175173   AM_RANGE(0xc000, 0xcfff) AM_RAM AM_BASE(&spriteram) AM_SHARE(1)
176174   AM_RANGE(0xd000, 0xdfff) AM_READWRITE(SMH_RAM, marvins_background_ram_w) AM_SHARE(2) AM_BASE(&spriteram_3)
r2086r2087
196194   AM_RANGE(0x8300, 0x8300) AM_WRITE(sound_command_w)
197195   AM_RANGE(0x8400, 0x8400) AM_READ(input_port_3_r)      /* dipswitch#1 */
198196   AM_RANGE(0x8500, 0x8500) AM_READ(input_port_4_r)      /* dipswitch#2 */
199   AM_RANGE(0x8600, 0x86ff) AM_WRITE(SMH_RAM)   // video attribute
197   AM_RANGE(0x8600, 0x86ff) AM_RAM   // video attribute
200198   AM_RANGE(0x8700, 0x8700) AM_READWRITE(snk_cpuB_nmi_trigger_r, snk_cpuA_nmi_ack_w)
201199//  AM_RANGE(0xc800, 0xc800) AM_WRITE(marvins_palette_bank_w)   // palette bank switch (c8f1 for Vanguard)
202200   AM_RANGE(0xc800, 0xc8ff) AM_RAM
r2086r2087
413411   PORT_DIPNAME( 0x01, 0x01, "Unused SW 1-0" )
414412   PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
415413   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
416   PORT_DIPNAME( 0x02, 0x02, DEF_STR( Cabinet ) )
417   PORT_DIPSETTING(    0x02, DEF_STR( Upright ) )
418   PORT_DIPSETTING(    0x00, DEF_STR( Cocktail ) )
414   PORT_DIPNAME( 0x02, 0x00, DEF_STR( Cabinet ) )
415   PORT_DIPSETTING(    0x00, DEF_STR( Upright ) )
416   PORT_DIPSETTING(    0x02, DEF_STR( Cocktail ) )
419417   PORT_DIPNAME( 0x04, 0x04, DEF_STR( Lives ) )
420418   PORT_DIPSETTING(    0x04, "3" )
421419   PORT_DIPSETTING(    0x00, "5" )
src/mame/drivers/viper.c
r2086r2087
751751
752752ROM_START(kviper)
753753   VIPER_BIOS
754
755   ROM_REGION(0x2000, REGION_USER2, ROMREGION_ERASE00)      /* M48T58 Timekeeper NVRAM */
754756ROM_END
755757
756758
src/mame/drivers/mermaid.c
r2086r2087
104104PALETTE_INIT( mermaid );
105105VIDEO_START( mermaid );
106106VIDEO_UPDATE( mermaid );
107VIDEO_EOF( mermaid );
107108
108109/* Read/Write Handlers */
109110
r2086r2087
272273   MDRV_PALETTE_INIT(mermaid)
273274   MDRV_VIDEO_START(mermaid)
274275   MDRV_VIDEO_UPDATE(mermaid)
276   MDRV_VIDEO_EOF(mermaid)
275277
276278   // sound hardware
277279   MDRV_SPEAKER_STANDARD_MONO("mono")
r2086r2087
388390
389391/* Game Drivers */
390392
391GAME( 1982, mermaid, 0,       mermaid, mermaid, 0, ROT0, "[Sanritsu] Rock-Ola", "Mermaid", GAME_NOT_WORKING )
392GAME( 1982, yachtmn, mermaid, mermaid, mermaid, 0, ROT0, "[Sanritsu] Esco", "Yachtsman", GAME_NOT_WORKING )
393GAME( 1982, mermaid, 0,       mermaid, mermaid, 0, ROT0, "[Sanritsu] Rock-Ola", "Mermaid", 0 )
394GAME( 1982, yachtmn, mermaid, mermaid, mermaid, 0, ROT0, "[Sanritsu] Esco", "Yachtsman", 0 )
393395GAME( 1982, rougien, 0,       mermaid, mermaid, 0, ROT0, "Sanritsu", "Rougien", 0 )
src/mame/drivers/lethalj.c
r2086r2087
525525   MDRV_CPU_PROGRAM_MAP(lethalj_map,0)
526526
527527   /* video hardware */
528   MDRV_PALETTE_LENGTH(32768)
529
530528   MDRV_SCREEN_ADD("main", RASTER)
531   MDRV_SCREEN_FORMAT(BITMAP_FORMAT_RGB15)
529   MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
532530   MDRV_SCREEN_RAW_PARAMS(VIDEO_CLOCK, 701, 0, 512, 263, 0, 236)
533531
534532   MDRV_VIDEO_START(lethalj)
535533   MDRV_VIDEO_UPDATE(tms340x0)
536534
535   MDRV_PALETTE_INIT(RRRRR_GGGGG_BBBBB)
536   MDRV_PALETTE_LENGTH(32768)
537
537538   /* sound hardware */
538539   MDRV_SPEAKER_STANDARD_MONO("mono")
539540
src/mame/drivers/bbusters.c
r2086r2087
742742   MDRV_SCREEN_ADD("main", RASTER)
743743   MDRV_SCREEN_REFRESH_RATE(60)
744744   MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
745   MDRV_SCREEN_SIZE(32*8, 32*8)
745   MDRV_SCREEN_SIZE(64*8, 32*8)
746746   MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
747747   MDRV_GFXDECODE(bbusters)
748748   MDRV_PALETTE_LENGTH(2048)
r2086r2087
784784   MDRV_SCREEN_ADD("main", RASTER)
785785   MDRV_SCREEN_REFRESH_RATE(60)
786786   MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
787   MDRV_SCREEN_SIZE(32*8, 32*8)
787   MDRV_SCREEN_SIZE(64*8, 32*8)
788788   MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
789789   MDRV_GFXDECODE(mechatt)
790790   MDRV_PALETTE_LENGTH(1024)
src/mame/drivers/f-32.c
r2086r2087
160160   MDRV_SCREEN_ADD("main", RASTER)
161161   MDRV_SCREEN_REFRESH_RATE(60)
162162   MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
163   MDRV_SCREEN_FORMAT(BITMAP_FORMAT_RGB15)
163   MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
164164   MDRV_SCREEN_SIZE(512, 512)
165165   MDRV_SCREEN_VISIBLE_AREA(0, 319, 0, 223)
166166
167   MDRV_PALETTE_INIT(RRRRR_GGGGG_BBBBB)
168   MDRV_PALETTE_LENGTH(32768)
169
167170   MDRV_VIDEO_UPDATE(mosaicf2)
168171
169172   /* sound hardware */
src/mame/drivers/dgpix.c
r2086r2087
5454
5555static UINT32 *vram;
5656static int vbuffer = 0;
57static bitmap_t *bitmaps[2];
5857
5958static int flash_roms;
6059static UINT32 flash_cmd = 0;
r2086r2087
139138   }
140139}
141140
142static void plot_pixel_rgb(int x, int y, int color)
143{
144   if (bitmaps[vbuffer]->bpp == 32)
145   {
146      UINT32 b = (color & 0x001f) << 3;
147      UINT32 g = (color & 0x03e0) >> 2;
148      UINT32 r = (color & 0x7c00) >> 7;
149      *BITMAP_ADDR32(bitmaps[vbuffer], y, x) = b | (g<<8) | (r<<16);
150   }
151   else
152   {
153      /* color is BGR; convert to RGB */
154      color = ((color & 0x1f) << 10) | (color & 0x3e0) | ((color & 0x7c00) >> 10);
155      *BITMAP_ADDR16(bitmaps[vbuffer], y, x) = color;
156   }
157}
158
159141static WRITE32_HANDLER( vram_w )
160142{
161   int x,y;
143   UINT32 *dest = &vram[offset+(0x40000/4)*vbuffer];
162144
163   switch(mem_mask)
145   if (mem_mask == 0)
164146   {
165      case 0:
166         vram_w(machine,offset,data,0x0000ffff);
167         vram_w(machine,offset,data,0xffff0000);
168         return;
147      if (~data & 0x80000000)
148         *dest = (*dest & 0x0000ffff) | (data & 0xffff0000);
169149
170      case 0xffff:
171         if(data & 0x80000000)
172            return;
173      break;
174
175      case 0xffff0000:
176         if(data & 0x8000)
177            return;
178      break;
150      if (~data & 0x00008000)
151         *dest = (*dest & 0xffff0000) | (data & 0x0000ffff);
179152   }
180
181   COMBINE_DATA(&vram[offset+(0x40000/4)*vbuffer]);
182
183   y = offset >> 8;
184   x = offset & 0xff;
185
186   if(x < 320/2 && y < 240)
187   {
188      plot_pixel_rgb(x*2,  y,(vram[offset+(0x40000/4)*vbuffer]>>16) & 0x7fff);
189      plot_pixel_rgb(x*2+1,y, vram[offset+(0x40000/4)*vbuffer] & 0x7fff);
190   }
153   else if (((mem_mask == 0x0000ffff) && (~data & 0x80000000)) ||
154           ((mem_mask == 0xffff0000) && (~data & 0x00008000)))
155      COMBINE_DATA(dest);
191156}
192157
193158static READ32_HANDLER( vram_r )
r2086r2087
307272static VIDEO_START( dgpix )
308273{
309274   vram = auto_malloc(0x40000*2);
310   bitmaps[0] = video_screen_auto_bitmap_alloc(machine->primary_screen);
311   bitmaps[1] = video_screen_auto_bitmap_alloc(machine->primary_screen);
312275}
313276
314277static VIDEO_UPDATE( dgpix )
315278{
316   copybitmap(bitmap,bitmaps[vbuffer ^ 1],0,0,0,0,cliprect);
279   int y;
280
281   for (y = 0; y < 240; y++)
282   {
283      int x;
284      UINT32 *src = &vram[(vbuffer ? 0 : 0x10000) | (y << 8)];
285      UINT16 *dest = BITMAP_ADDR16(bitmap, y, 0);
286
287      for (x = 0; x < 320; x += 2)
288      {
289         dest[0] = (*src >> 16) & 0x7fff;
290         dest[1] = (*src >>  0) & 0x7fff;
291
292         src++;
293         dest += 2;
294      }
295   }
296
317297   return 0;
318298}
319299
r2086r2087
333313   MDRV_SCREEN_ADD("main", RASTER)
334314   MDRV_SCREEN_REFRESH_RATE(60)
335315   MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
336   MDRV_SCREEN_FORMAT(BITMAP_FORMAT_RGB15)
316   MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
337317   MDRV_SCREEN_SIZE(512, 256)
338318   MDRV_SCREEN_VISIBLE_AREA(0, 319, 0, 239)
339319
320   MDRV_PALETTE_INIT(BBBBB_GGGGG_RRRRR)
340321   MDRV_PALETTE_LENGTH(32768)
341322
342323   MDRV_VIDEO_START(dgpix)
src/mame/drivers/hyperspt.c
r2086r2087
362362/* 0x00 disables Coin 2. It still accepts coins and makes the sound, but
363363   it doesn't give you any credit */
364364
365   PORT_START_TAG("IN1")
365   PORT_START_TAG("DSW1")
366366   PORT_DIPNAME( 0x01, 0x00, DEF_STR( Allow_Continue ) )
367367   PORT_DIPSETTING(   0x01, DEF_STR( No ) )
368368   PORT_DIPSETTING(   0x00, DEF_STR( Yes ) )
src/mame/drivers/kinst.c
r2086r2087
221221      /* loop over columns */
222222      for (x = cliprect->min_x; x < cliprect->max_x; x += 2)
223223      {
224         /* data is BGR; convert to RGB */
225224         UINT32 data = *src++;
226         data = (data & 0x03e003e0) | ((data << 10) & 0x7c007c00) | ((data >> 10) & 0x001f001f);
227225
228226         /* store two pixels */
229         *dest++ = data & 0x7fff;
227         *dest++ = (data >>  0) & 0x7fff;
230228         *dest++ = (data >> 16) & 0x7fff;
231229      }
232230   }
r2086r2087
668666   MDRV_SCREEN_ADD("main", RASTER)
669667   MDRV_SCREEN_REFRESH_RATE(60)
670668   MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
671   MDRV_SCREEN_FORMAT(BITMAP_FORMAT_RGB15)
669   MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
672670   MDRV_SCREEN_SIZE(320, 240)
673671   MDRV_SCREEN_VISIBLE_AREA(0, 319, 0, 239)
674672
673   MDRV_PALETTE_INIT(BBBBB_GGGGG_RRRRR)
675674   MDRV_PALETTE_LENGTH(32768)
676675
677676   MDRV_VIDEO_UPDATE(kinst)
src/mame/drivers/ddz.c
r2086r2087
6363   MDRV_SCREEN_ADD("main", RASTER)
6464   MDRV_SCREEN_REFRESH_RATE(60)
6565   MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
66   MDRV_SCREEN_FORMAT(BITMAP_FORMAT_RGB15)
66   MDRV_SCREEN_FORMAT(BITMAP_FORMAT_RGB32)
6767   MDRV_SCREEN_SIZE(320, 240)
6868   MDRV_SCREEN_VISIBLE_AREA(0, 319, 0, 239)
6969
src/mame/drivers/namcos22.c
r2086r2087
32693269
32703270ROM_START( ridgerac )
32713271   ROM_REGION( 0x200000, REGION_CPU1, 0 ) /* main program */
3272   ROM_LOAD32_BYTE( "rr3prgll.4d", 0x00003, 0x80000, CRC(856fe5ec) SHA1(72d95b8bd5da551c3d358b8ab266373a89f8aa6a) )
3273   ROM_LOAD32_BYTE( "rr3prglm.2d", 0x00002, 0x80000, CRC(1e9ef0a9) SHA1(a4577bcdf13673568793d8a324945fca30b10f43) )
3274   ROM_LOAD32_BYTE( "rr3prgum.8d", 0x00001, 0x80000, CRC(e160f63f) SHA1(9b4b7a13eb4bc19fcb53daedb87e4945c20a1b8e) )
3275   ROM_LOAD32_BYTE( "rr3prguu.6d", 0x00000, 0x80000, CRC(f07c78c0) SHA1(dbed76d868b761711faf5b6e11f2c9affb91db5d) )
3276
3277   ROM_REGION( 0x10000*2, REGION_CPU2, 0 ) /* Master DSP */
3278   ROM_LOAD16_WORD( "c71.bin", 0,0x1000*2, CRC(47c623ab) SHA1(e363ac50f5556f83308d4cc191b455e9b62bcfc8) )
3279
3280   ROM_REGION( 0x10000*2, REGION_CPU3, 0 ) /* Slave DSP */
3281   ROM_LOAD16_WORD( "c71.bin", 0,0x1000*2, CRC(47c623ab) SHA1(e363ac50f5556f83308d4cc191b455e9b62bcfc8) )
3282
3283   ROM_REGION( 0x080000, REGION_CPU4, 0 ) /* BIOS */
3284   ROM_LOAD( "c74.bin", 0x0000, 0x4000, CRC(a3dce360) SHA1(8f3248b1890abb2e649927240ae46f73bb171e3b) )
3285
3286   ROM_REGION( 0x100000, REGION_USER4, 0 ) /* sound data */
3287   ROM_LOAD( "rr1data.6r", 0, 0x080000, CRC(18f5f748) SHA1(e0d149a66de36156edd9b55f604c9a9801aaefa8) )
3288
3289   ROM_REGION( 0x200000*8, REGION_TEXTURE_TILE, ROMREGION_DISPOSE) /* 16x16x8bpp texture tiles */
3290   ROM_LOAD( "rr1cg0.bin", 0x200000*0x4, 0x200000, CRC(b557a795) SHA1(f345486ffbe797246ad80a55d3c4a332ed6e2888) )//,CRC(d1b0eec6) SHA1(f66922c324dfc3ff408db7556c587ef90ca64c3b) )
3291   ROM_LOAD( "rr1cg1.bin", 0x200000*0x5, 0x200000, CRC(0fa212d9) SHA1(a1311de0a504e2d399044fa8ac32ec6c56ec965f) )//,CRC(bb695d89) SHA1(557bac9d2718519c1f69e374d0ef9a86a43fe86c) )
3292   ROM_LOAD( "rr1cg2.bin", 0x200000*0x6, 0x200000, CRC(18e2d2bd) SHA1(69c2ea62eeb255f27d3c69373f6716b0a34683cc) )//,CRC(8f374c0a) SHA1(94ff8581de11a03ef86525155f8433bf5858b980) )
3293   ROM_LOAD( "rr1cg3.bin", 0x200000*0x7, 0x200000, CRC(9564488b) SHA1(6b27d1aea75d6be747c62e165cfa49ecc5d9e767) )//,CRC(072a5c47) SHA1(86b8e973ae6b78197d685fe6d14722d8e2d0dfec) )
3294
3295   ROM_REGION16_LE( 0x280000, REGION_TEXTURE_TILEMAP, 0 ) /* texture tilemap */
3296   ROM_LOAD( "rr1ccrl.bin",0x000000, 0x200000, CRC(6092d181) SHA1(52c0e3ac20aa23059a87d1a985d24ae641577310) )//,CRC(c15cb257) SHA1(0cb8f231c62ea37955be5d452a436a6e815af8e8) )
3297   ROM_LOAD( "rr1ccrh.bin",0x200000, 0x080000, CRC(dd332fd5) SHA1(a7d9c1d6b5a8e3a937b525c1363880e404dcd147) )//,CRC(dd332fd5) SHA1(a7d9c1d6b5a8e3a937b525c1363880e404dcd147) )
3298
3299   ROM_REGION( 0x80000*6, REGION_POINTROM, 0 ) /* 3d model data */
3300   ROM_LOAD( "rr1potl0.5b", 0x80000*0, 0x80000,CRC(3ac193e3) SHA1(ff213766f15e34dc1b25187b57d94e17930090a3) )
3301   ROM_LOAD( "rr1potl1.4b", 0x80000*1, 0x80000,CRC(ac3ffba5) SHA1(4eb4dda5faeff237e0d35725b56d309948fba900) )
3302   ROM_LOAD( "rr1potm0.5c", 0x80000*2, 0x80000,CRC(42a3fa08) SHA1(15db0ae7ccf7f5a77b9dd9a9d82a488b67f8aaff) )
3303   ROM_LOAD( "rr1potm1.4c", 0x80000*3, 0x80000,CRC(1bc1ea7b) SHA1(52c21eef4989c45acc5fa4deda2d0b63214731c8) )
3304   ROM_LOAD( "rr1potu0.5d", 0x80000*4, 0x80000,CRC(5e367f72) SHA1(5887f011379dce865fef238b402678a3d2033de9) )
3305   ROM_LOAD( "rr1potu1.4d", 0x80000*5, 0x80000,CRC(31d92475) SHA1(51d3c0baa223e1bc16ea2950f2e085597528f870) )
3306
3307   ROM_REGION( 0x800000, REGION_SOUND1, 0 ) /* sound samples */
3308   ROM_LOAD( "rr1wav0.10r", 0x100000*0, 0x100000,CRC(a8e85bde) SHA1(b56677e9f6c98f7b600043f5dcfef3a482ca7455) )
3309   ROM_LOAD( "rr1wav1.10p", 0x100000*2, 0x100000,CRC(35f47c8e) SHA1(7c3f9e942f532af8008fbead2a96fee6084bcde6) )
3310   ROM_LOAD( "rr1wav2.10n", 0x100000*1, 0x100000,CRC(3244cb59) SHA1(b3283b30cfafbfdcbc6d482ecc4ed6a47a527ca4) )
3311   ROM_LOAD( "rr1wav3.10l", 0x100000*3, 0x100000,CRC(c4cda1a7) SHA1(60bc96880ec79efdff3cc70c09e848692a40bea4) )
3312
3313   ROM_REGION( 0x300, REGION_USER1, 0 )
3314   ROM_LOAD( "rr1gam.2d",   0x0000, 0x0100, CRC(b2161bce) SHA1(d2681cc0cf8e68df0d942d392b4eb4458c4bb356) )
3315   ROM_LOAD( "rr1gam.3d",   0x0100, 0x0100, CRC(b2161bce) SHA1(d2681cc0cf8e68df0d942d392b4eb4458c4bb356) )
3316   ROM_LOAD( "rr1gam.4d",   0x0200, 0x0100, CRC(b2161bce) SHA1(d2681cc0cf8e68df0d942d392b4eb4458c4bb356) )
3317
3318   ROM_REGION( 0x2000, REGION_USER2, ROMREGION_ERASE00 )
3319ROM_END
3320
3321ROM_START( ridgerab )
3322   ROM_REGION( 0x200000, REGION_CPU1, 0 ) /* main program */
32723323   ROM_LOAD32_BYTE( "rr1prll.4d", 0x00003, 0x80000, CRC(4bb7fc86) SHA1(8291375b8ec4d37e0d9e3bf38da2d5907b0f31bd) )
32733324   ROM_LOAD32_BYTE( "rr1prlm.2d", 0x00002, 0x80000, CRC(68e13830) SHA1(ddc447c7afbb5c4238969d7e78bfe9cf8fac6061) )
32743325   ROM_LOAD32_BYTE( "rr1prum.8d", 0x00001, 0x80000, CRC(705ef78a) SHA1(881903413e66d6fd83d46eb18c4e1230531832ae) )
r2086r2087
43704421GAME( 1995, raveracw, 0,        namcos22,  raveracw, raveracw, ROT0, "Namco", "Rave Racer (Rev. RV2, World)"              , GAME_IMPERFECT_SOUND|GAME_IMPERFECT_GRAPHICS )
43714422GAME( 1995, raveracj, raveracw, namcos22,  raveracw, raveracw, ROT0, "Namco", "Rave Racer (Rev. RV1 Ver.B, Japan)"        , GAME_IMPERFECT_SOUND|GAME_IMPERFECT_GRAPHICS )
43724423GAME( 1995, raveraja, raveracw, namcos22,  raveracw, raveracw, ROT0, "Namco", "Rave Racer (Rev. RV1, Japan)"              , GAME_IMPERFECT_SOUND|GAME_IMPERFECT_GRAPHICS )
4373GAME( 1993, ridgerac, 0,        namcos22,  ridgera,  ridgeraj, ROT0, "Namco", "Ridge Racer (Rev. RR2, World)"             , GAME_IMPERFECT_SOUND|GAME_IMPERFECT_GRAPHICS ) /* 1993-10-07 */
4424GAME( 1993, ridgerac, 0,        namcos22,  ridgera,  ridgeraj, ROT0, "Namco", "Ridge Racer (Rev. RR3, World)"             , GAME_IMPERFECT_SOUND|GAME_IMPERFECT_GRAPHICS ) /* 1993-10-07 */
4425GAME( 1993, ridgerab, ridgerac, namcos22,  ridgera,  ridgeraj, ROT0, "Namco", "Ridge Racer (Rev. RR2, World)"             , GAME_IMPERFECT_SOUND|GAME_IMPERFECT_GRAPHICS ) /* 1993-10-07 */
43744426GAME( 1993, ridgeraj, ridgerac, namcos22,  ridgera,  ridgeraj, ROT0, "Namco", "Ridge Racer (Rev. RR1, Japan)"             , GAME_IMPERFECT_SOUND|GAME_IMPERFECT_GRAPHICS ) /* 1993-10-07 */
43754427GAME( 1994, ridgera2, 0,        namcos22,  ridgera,  ridger2j, ROT0, "Namco", "Ridge Racer 2 (Rev. RRS2, US)"             , GAME_IMPERFECT_SOUND|GAME_IMPERFECT_GRAPHICS|GAME_NOT_WORKING ) /* POSTs but doesn's start */
43764428GAME( 1994, ridger2a, ridgera2, namcos22,  ridgera,  ridger2j, ROT0, "Namco", "Ridge Racer 2 (Rev. RRS1, Ver.B, Japan)"   , GAME_IMPERFECT_SOUND|GAME_IMPERFECT_GRAPHICS|GAME_NOT_WORKING )
src/mame/drivers/mpu4drvr.c
r2086r2087
15661566   return 0;
15671567}
15681568
1569MC6845_ON_VSYNC_CHANGED( dealem_vsync_changed )
1569static MC6845_ON_VSYNC_CHANGED( dealem_vsync_changed )
15701570{
15711571   cpunum_set_input_line(device->machine, 0, INPUT_LINE_NMI, vsync);
15721572}
r2086r2087
16191619
16201620   MDRV_CPU_ADD_TAG("main", M6809, MPU4_MASTER_CLOCK/4 )
16211621   MDRV_CPU_PROGRAM_MAP(mpu4_6809_map,0)
1622   MDRV_CPU_PERIODIC_INT(gen_50hz, 50 )
1622   MDRV_TIMER_ADD_PERIODIC("50HZ",gen_50hz, HZ(100))
16231623
16241624   MDRV_NVRAM_HANDLER(generic_0fill)            // confirm
16251625
r2086r2087
16711671   MDRV_CPU_ADD_TAG("main", M6809, MPU4_MASTER_CLOCK/4)
16721672   MDRV_CPU_PROGRAM_MAP(dealem_memmap,0)
16731673
1674   MDRV_CPU_PERIODIC_INT(gen_50hz, 100)               // generate 50 hz signal
1674   MDRV_TIMER_ADD_PERIODIC("50HZ",gen_50hz, HZ(100))
16751675
16761676   MDRV_SPEAKER_STANDARD_MONO("mono")
16771677   MDRV_SOUND_ADD_TAG("AY8913",AY8913, MPU4_MASTER_CLOCK/4)
src/mame/drivers/metro.c
r2086r2087
23282328***************************************************************************/
23292329
23302330static INPUT_PORTS_START( batlbubl )
2331   PORT_START_TAG("IN0")
2331   PORT_START_TAG("IN1")
23322332   JOY_LSB(1, BUTTON1, UNKNOWN, UNKNOWN, UNKNOWN)
23332333   JOY_MSB(2, BUTTON1, UNKNOWN, UNKNOWN, UNKNOWN)
23342334
src/mame/drivers/eolith.c
r2086r2087
268268   MDRV_SCREEN_ADD("main", RASTER)
269269   MDRV_SCREEN_REFRESH_RATE(60)
270270   MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
271   MDRV_SCREEN_FORMAT(BITMAP_FORMAT_RGB15)
271   MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
272272   MDRV_SCREEN_SIZE(512, 512)
273273   MDRV_SCREEN_VISIBLE_AREA(0, 319, 0, 239)
274274
275   MDRV_PALETTE_INIT(BBBBB_GGGGG_RRRRR)
276   MDRV_PALETTE_LENGTH(32768)
277
275278   MDRV_VIDEO_START(eolith)
276279   MDRV_VIDEO_UPDATE(eolith)
277280
src/mame/drivers/gng.c
r2086r2087
451451   ROM_LOAD( "gg6.bin",      0x14000, 0x4000, CRC(2d77e9b2) SHA1(944da1ce29a18bf0fc8deff78bceacba0bf23a07) ) /* tiles 2-3 Plane 3*/
452452
453453   ROM_REGION( 0x20000, REGION_GFX3, ROMREGION_DISPOSE | ROMREGION_ERASEFF )
454   ROM_LOAD( "gg17.bin",     0x00000, 0x4000, CRC(93e50a8f) SHA1(42d367f57bb2fdf60a0445ac1533da99cfeaa617) ) /* sprites 0 Plane 1-2 */
454   ROM_LOAD( "gng13.n4",     0x00000, 0x4000, CRC(4613afdc) SHA1(13e5a38a134bd7cfa16c63a18fa332c6d66b9345) ) /* sprites 0 Plane 1-2 */
455455   ROM_LOAD( "gg16.bin",     0x04000, 0x4000, CRC(06d7e5ca) SHA1(9e06012bcd82f98fad43de666ef9a75979d940ab) ) /* sprites 1 Plane 1-2 */
456456   ROM_LOAD( "gg15.bin",     0x08000, 0x4000, CRC(bc1fe02d) SHA1(e3a1421d465b87148ffa94f5673b2307f0246afe) ) /* sprites 2 Plane 1-2 */
457   ROM_LOAD( "gg14.bin",     0x10000, 0x4000, CRC(6aaf12f9) SHA1(207a7407288182a4f3eddaea634c6a6452131182) ) /* sprites 0 Plane 3-4 */
457   ROM_LOAD( "gng16.l4",     0x10000, 0x4000, CRC(608d68d5) SHA1(af207f9ee2f93a0cf9cf25cfe72b0fdfe55481b8) ) /* sprites 0 Plane 3-4 */
458458   ROM_LOAD( "gg13.bin",     0x14000, 0x4000, CRC(e80c3fca) SHA1(cb641c25bb04b970b2cbeca41adb792bbe142fb5) ) /* sprites 1 Plane 3-4 */
459459   ROM_LOAD( "gg12.bin",     0x18000, 0x4000, CRC(7780a925) SHA1(3f129ca6d695548b659955fe538584bd9ac2ff17) ) /* sprites 2 Plane 3-4 */
460460
src/mame/drivers/kncljoe.c
r2086r2087
4444static UINT8 port1, port2;
4545
4646
47WRITE8_HANDLER( sound_cmd_w )
47static WRITE8_HANDLER( sound_cmd_w )
4848{
4949   if ((data & 0x80) == 0)
5050      soundlatch_w(machine, 0, data & 0x7f);
r2086r2087
253253   unused_w
254254};
255255
256INTERRUPT_GEN (sound_nmi)
256static INTERRUPT_GEN (sound_nmi)
257257{
258258   cpunum_set_input_line(Machine, 1, INPUT_LINE_NMI, PULSE_LINE);
259259}
src/mame/drivers/seta.c
r2086r2087
41544154   PORT_DIPSETTING(      0x0000, DEF_STR( Yes ) )
41554155   PORT_DIPUNUSED_DIPLOC( 0x8000, 0x8000, "SW1:8" ) /* Listed as "Unused" */
41564156
4157   /* Gun on screen left=0xc0, right=0x40, top=0x48, bottom=0xa8 */
4158   PORT_START_TAG("IN5")   /* Player 1 Gun X       ($f00003) */
4159   PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_CROSSHAIR(X, -256.0/(256 - 0x40 - 0x40), -127.0/256, 0) PORT_SENSITIVITY(25) PORT_KEYDELTA(15) PORT_REVERSE PORT_PLAYER(1)
4160   PORT_START_TAG("IN6")   /* Player 1 Gun Y       ($f00003) */
4161   PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR(Y, 256.0/(256 - 0x48 - 0x58), -193.0/256, 0) PORT_SENSITIVITY(25) PORT_KEYDELTA(15) PORT_PLAYER(1)
4157   /* The gun calibration defaults to: left=0xc0, right=0x40, top=0x48, bottom=0xa8 */
4158   /* The user calibrated values are lost each time MAME starts, so the gun always needs to be re-calibrated. */
4159   /* Either NVRAM or battery backed up RAM is not emulated. */
4160   /* For now it is best to just use a Save State after calibration to remember the setting. */
4161   PORT_START_TAG("IN5")   /* Player 1 Gun X       ($f00003) */
4162   PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_CROSSHAIR(X, -1, 0, 0) PORT_SENSITIVITY(25) PORT_KEYDELTA(15) PORT_REVERSE PORT_PLAYER(1)
4163   PORT_START_TAG("IN6")   /* Player 1 Gun Y       ($f00003) */
4164   PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR(Y,  1, 0, 0) PORT_SENSITIVITY(25) PORT_KEYDELTA(15) PORT_PLAYER(1)
41624165
4163   PORT_START_TAG("IN7")   /* Player 2 Gun X       ($f00003) */
4164   PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_CROSSHAIR(X, -256.0/(256 - 0x40 - 0x40), -127.0/256, 0) PORT_SENSITIVITY(25) PORT_KEYDELTA(15) PORT_REVERSE PORT_PLAYER(2)
4165   PORT_START_TAG("IN0")   /* Player 2 Gun Y       ($f00003) */
4166   PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR(Y, 256.0/(256 - 0x48 - 0x58), -193.0/256, 0) PORT_SENSITIVITY(25) PORT_KEYDELTA(15) PORT_PLAYER(2)
4166   PORT_START_TAG("IN7")   /* Player 2 Gun X       ($f00003) */
4167   PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_CROSSHAIR(X, -1, 0, 0) PORT_SENSITIVITY(25) PORT_KEYDELTA(15) PORT_REVERSE PORT_PLAYER(2)
4168   PORT_START_TAG("IN8")   /* Player 2 Gun Y       ($f00003) */
4169   PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR(Y,  1, 0, 0) PORT_SENSITIVITY(25) PORT_KEYDELTA(15) PORT_PLAYER(2)
41674170INPUT_PORTS_END
41684171
41694172
src/mame/drivers/rallyx.c
r2086r2087
165165   At 0x0050 there is code to give infinite lives for player 1 when bit 3 of DSW0
166166   is ON. I can't tell however when it is supposed to be called.
167167
168- tactician has the score area at the bottom of the screen. While highly unusual,
169  this is the correct behaviour and has been verified with screenshots.
170
168171TODO:
169172- commsega: the first time you kill a soldier, the music stops. When you die,
170173  the music restarts and won't stop a second time.
src/mame/drivers/blockhl.c
r2086r2087
133133   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 )
134134
135135   PORT_START   /* DSW #1 */
136   PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) )
136   PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) )      PORT_DIPLOCATION("SW1:1,2,3,4")
137137   PORT_DIPSETTING(    0x02, DEF_STR( 4C_1C ) )
138138   PORT_DIPSETTING(    0x05, DEF_STR( 3C_1C ) )
139139   PORT_DIPSETTING(    0x08, DEF_STR( 2C_1C ) )
r2086r2087
150150   PORT_DIPSETTING(    0x0a, DEF_STR( 1C_6C ) )
151151   PORT_DIPSETTING(    0x09, DEF_STR( 1C_7C ) )
152152   PORT_DIPSETTING(    0x00, DEF_STR( Free_Play ) )
153   PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) )
153   PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) )      PORT_DIPLOCATION("SW1:5,6,7,8")
154154   PORT_DIPSETTING(    0x20, DEF_STR( 4C_1C ) )
155155   PORT_DIPSETTING(    0x50, DEF_STR( 3C_1C ) )
156156   PORT_DIPSETTING(    0x80, DEF_STR( 2C_1C ) )
r2086r2087
169169//  PORT_DIPSETTING(    0x00, "Invalid" )
170170
171171   PORT_START   /* DSW #2 */
172   PORT_DIPNAME( 0x01, 0x01, DEF_STR( Lives ) )
172   PORT_DIPNAME( 0x01, 0x01, DEF_STR( Lives ) )      PORT_DIPLOCATION("SW2:1")
173173   PORT_DIPSETTING(    0x01, "1" )
174174   PORT_DIPSETTING(    0x00, "2" )
175   PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
176   PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
177   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
178   PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
179   PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
180   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
181   PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
182   PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
183   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
184   PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
185   PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
186   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
187   PORT_DIPNAME( 0x60, 0x40, DEF_STR( Difficulty ) )
175   PORT_DIPUNUSED_DIPLOC( 0x02, 0x02, "SW2:2" )      /* Listed as "Unused" */
176   PORT_DIPUNUSED_DIPLOC( 0x04, 0x04, "SW2:3" )      /* Listed as "Unused" */
177   PORT_DIPUNUSED_DIPLOC( 0x08, 0x08, "SW2:4" )      /* Listed as "Unused" */
178   PORT_DIPUNUSED_DIPLOC( 0x10, 0x10, "SW2:5" )      /* Listed as "Unused" */
179   PORT_DIPNAME( 0x60, 0x40, DEF_STR( Difficulty ) )   PORT_DIPLOCATION("SW2:6,7")
188180   PORT_DIPSETTING(    0x60, DEF_STR( Easy ) )
189181   PORT_DIPSETTING(    0x40, DEF_STR( Normal ) )
190182   PORT_DIPSETTING(    0x20, "Difficult" )
191183   PORT_DIPSETTING(    0x00, "Very Difficult" )
192   PORT_DIPNAME( 0x80, 0x00, DEF_STR( Demo_Sounds ) )
184   PORT_DIPNAME( 0x80, 0x00, DEF_STR( Demo_Sounds ) )   PORT_DIPLOCATION("SW2:8")
193185   PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
194186   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
195187
r2086r2087
198190   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
199191   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 )
200192   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
201   PORT_DIPNAME( 0x10, 0x10, DEF_STR( Flip_Screen ) )
193   PORT_DIPNAME( 0x10, 0x10, DEF_STR( Flip_Screen ) )   PORT_DIPLOCATION("SW3:1")
202194   PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
203195   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
204   PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
205   PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
206   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
207   PORT_SERVICE( 0x40, IP_ACTIVE_LOW )
208   PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
209   PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
210   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
196   PORT_DIPUNUSED_DIPLOC( 0x20, 0x20, "SW3:2" )      /* Listed as "Unused" */
197   PORT_SERVICE_DIPLOC(0x40, IP_ACTIVE_LOW, "SW3:3" )
198   PORT_DIPUNUSED_DIPLOC( 0x80, 0x80, "SW3:4" )      /* Listed as "Unused" */
211199INPUT_PORTS_END
212200
213201
src/mame/drivers/meritm.c
r2086r2087
9999
100100} ds1204;
101101
102void ds1204_w( int rst, int clk, int dq )
102static void ds1204_w( int rst, int clk, int dq )
103103{
104104   //logerror("ds1204_w: rst = %d, clk = %d, dq = %d\n", rst, clk, dq );
105105   if ( rst == 0 )
r2086r2087
178178   }
179179};
180180
181int ds1204_r(void)
181static int ds1204_r(void)
182182{
183183   //logerror("ds1204_r\n");
184184   return ds1204.out_bit;
185185};
186186
187void ds1204_init(const UINT8* key, const UINT8* nvram)
187static void ds1204_init(const UINT8* key, const UINT8* nvram)
188188{
189189   memset(&ds1204, 0, sizeof(ds1204));
190190   if (key)
r2086r2087
350350   }
351351};
352352
353INPUT_PORTS_START(microtouch)
353static INPUT_PORTS_START(microtouch)
354354   PORT_START_TAG("TOUCH")
355355   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_IMPULSE(10) PORT_NAME( "Touch screen" )
356356   PORT_START_TAG("TOUCH_X")
r2086r2087
513513static int meritm_bank;
514514static int meritm_psd_a15;
515515
516void meritm_crt250_switch_banks( void )
516static void meritm_crt250_switch_banks( void )
517517{
518518   int rombank = (meritm_bank & 0x07) ^ 0x07;
519519
r2086r2087
526526   meritm_crt250_switch_banks();
527527};
528528
529void meritm_switch_banks( void )
529static void meritm_switch_banks( void )
530530{
531531   int rambank = (meritm_psd_a15 >> 2) & 0x3;
532532   int rombank = (((meritm_bank >> 3) & 0x3) << 5) |
r2086r2087
623623 *
624624 *************************************/
625625
626WRITE8_HANDLER(meritm_ds1644_w)
626static WRITE8_HANDLER(meritm_ds1644_w)
627627{
628628   int rambank = (meritm_psd_a15 >> 2) & 0x3;
629629   if (rambank < 3)
r2086r2087
647647   return ((data / 10) << 4) | (data %10);
648648}
649649
650READ8_HANDLER(meritm_ds1644_r)
650static READ8_HANDLER(meritm_ds1644_r)
651651{
652652   mame_system_time systime;
653653   int rambank = (meritm_psd_a15 >> 2) & 0x3;
r2086r2087
811811 *
812812 *************************************/
813813
814READ8_HANDLER(meritm_8255_port_c_r)
814static READ8_HANDLER(meritm_8255_port_c_r)
815815{
816816   //logerror( "8255 port C read\n" );
817817   return 0xff;
818818};
819819
820WRITE8_HANDLER(meritm_crt250_port_b_w)
820static WRITE8_HANDLER(meritm_crt250_port_b_w)
821821{
822822   //popmessage("Lamps: %d %d %d %d %d %d %d", BIT(data,0), BIT(data,1), BIT(data,2), BIT(data,3), BIT(data,4), BIT(data,5), BIT(data,6) );
823823   output_set_value("P1 DISC 1 LAMP", !BIT(data,0));
r2086r2087
862862 Port B: Bits 0,1 used
863863*/
864864
865READ8_HANDLER(meritm_ay8930_port_a_r)
865static READ8_HANDLER(meritm_ay8930_port_a_r)
866866{
867867   return readinputportbytag_safe("DSW", 0);
868868};
869869
870WRITE8_HANDLER(meritm_ay8930_port_b_w)
870static WRITE8_HANDLER(meritm_ay8930_port_b_w)
871871{
872872   // lamps
873873};
src/mame/drivers/blockout.c
r2086r2087
44
55driver by Nicola Salmoria
66
7DIP locations verified for:
8- blockout (manual)
9
710***************************************************************************/
811
912#include "driver.h"
r2086r2087
8891
8992
9093static INPUT_PORTS_START( blockout )
91   PORT_START      /* IN0 */
94   PORT_START_TAG("IN0")
9295   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY
9396   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY
9497   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY
r2086r2087
98101   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 )
99102   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 )
100103
101   PORT_START      /* IN1 */
104   PORT_START_TAG("IN1")
102105   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2)
103106   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2)
104107   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2)
r2086r2087
108111   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)
109112   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 )
110113
111   PORT_START
114   PORT_START_TAG("IN2")
112115   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN1 )
113116   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 )
114117   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN3 )
115118
116   PORT_START
117   PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coinage ) )
119   PORT_START_TAG("DSW1")
120   PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coinage ) )      PORT_DIPLOCATION("SW1:1,2")
118121   PORT_DIPSETTING(    0x00, DEF_STR( 3C_1C ) )
119122   PORT_DIPSETTING(    0x01, DEF_STR( 2C_1C ) )
120123   PORT_DIPSETTING(    0x03, DEF_STR( 1C_1C ) )
121124   PORT_DIPSETTING(    0x02, DEF_STR( 1C_2C ) )
122125   /* the following two are supposed to control Coin 2, but they don't work. */
123126   /* This happens on the original board too. */
124   PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )   /* unused? */
125   PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
126   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
127   PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )   /* unused? */
128   PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
129   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
130   PORT_DIPNAME( 0x10, 0x10, "1 Coin to Continue" )
131   PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
132   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
133   PORT_DIPNAME( 0x20, 0x20, DEF_STR( Demo_Sounds ) )
127   PORT_DIPUNUSED_DIPLOC( 0x04, 0x04, "SW1:3" )      /* According to the manual SW1:3,4 should be the same settings as SW1:1,2 */
128   PORT_DIPUNUSED_DIPLOC( 0x08, 0x08, "SW1:4" )
129   PORT_DIPNAME( 0x10, 0x10, "1 Coin to Continue" )   PORT_DIPLOCATION("SW1:5")
130   PORT_DIPSETTING(    0x10, DEF_STR( Off ) )         /* Same price as Coinage setting */
131   PORT_DIPSETTING(    0x00, DEF_STR( On ) )         /* Always 1 Coin */
132   PORT_DIPNAME( 0x20, 0x20, DEF_STR( Demo_Sounds ) )   PORT_DIPLOCATION("SW1:6")
134133   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
135134   PORT_DIPSETTING(    0x20, DEF_STR( On ) )
136   PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )   /* unused? */
137   PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
138   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
139   PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )   /* unused? */
140   PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
141   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
135   PORT_DIPUNUSED_DIPLOC( 0x40, 0x40, "SW1:7" )      /* Listed as "Unused" */
136   PORT_DIPUNUSED_DIPLOC( 0x80, 0x80, "SW1:8" )      /* Listed as "Unused" */
142137
143   PORT_START
144   PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) )
138   PORT_START_TAG("DSW2")
139   PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) )   PORT_DIPLOCATION("SW2:1,2")
145140   PORT_DIPSETTING(    0x02, DEF_STR( Easy ) )
146141   PORT_DIPSETTING(    0x03, DEF_STR( Normal ) )
147142   PORT_DIPSETTING(    0x01, DEF_STR( Hard ) )
148143   PORT_DIPSETTING(    0x00, DEF_STR( Very_Hard ) )
149   PORT_DIPNAME( 0x04, 0x04, "Rotate Buttons" )
144   PORT_DIPNAME( 0x04, 0x04, "Rotate Buttons" )      PORT_DIPLOCATION("SW2:3")
150145   PORT_DIPSETTING(    0x00, "2" )
151146   PORT_DIPSETTING(    0x04, "3" )
152   PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
153   PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
154   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
155   PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
156   PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
157   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
158   PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
159   PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
160   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
161   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 )
162   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
147   PORT_DIPUNUSED_DIPLOC( 0x08, 0x08, "SW2:4" )      /* Listed as "Unused" */
148   PORT_DIPUNUSED_DIPLOC( 0x10, 0x10, "SW2:5" )      /* Listed as "Unused" */
149   PORT_DIPUNUSED_DIPLOC( 0x20, 0x20, "SW2:6" )      /* Listed as "Unused" */
150   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 )      PORT_DIPLOCATION("SW2:7") /* Listed as "Unused" */
151   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_DIPLOCATION("SW2:8") /* Listed as "Unused" */
163152INPUT_PORTS_END
164153
165154static INPUT_PORTS_START( blckoutj )
166   PORT_START      /* IN0 */
167   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY
168   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY
169   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY
170   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY
155   PORT_INCLUDE( blockout )
156
157   PORT_MODIFY("IN0")
171158   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
172   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )
173   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 )
174   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 )
175159
176   PORT_START      /* IN1 */
177   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2)
178   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2)
179   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2)
180   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2)
160   PORT_MODIFY("IN1")
181161   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
182   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
183   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)
184   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 )
185162
186   PORT_START
187   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN1 )
188   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 )
189   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN3 )
190
191   PORT_START
192   PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coinage ) )
193   PORT_DIPSETTING(    0x00, DEF_STR( 3C_1C ) )
194   PORT_DIPSETTING(    0x01, DEF_STR( 2C_1C ) )
195   PORT_DIPSETTING(    0x03, DEF_STR( 1C_1C ) )
196   PORT_DIPSETTING(    0x02, DEF_STR( 1C_2C ) )
197   /* the following two are supposed to control Coin 2, but they don't work. */
198   /* This happens on the original board too. */
199   PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )   /* unused? */
200   PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
201   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
202   PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )   /* unused? */
203   PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
204   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
205   PORT_DIPNAME( 0x10, 0x10, "1 Coin to Continue" )
206   PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
207   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
208   PORT_DIPNAME( 0x20, 0x20, DEF_STR( Demo_Sounds ) )
209   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
210   PORT_DIPSETTING(    0x20, DEF_STR( On ) )
211   PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )   /* unused? */
212   PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
213   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
214   PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )   /* unused? */
215   PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
216   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
217
218   PORT_START
219   PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) )
220   PORT_DIPSETTING(    0x02, DEF_STR( Easy ) )
221   PORT_DIPSETTING(    0x03, DEF_STR( Normal ) )
222   PORT_DIPSETTING(    0x01, DEF_STR( Hard ) )
223   PORT_DIPSETTING(    0x00, DEF_STR( Very_Hard ) )
163   PORT_MODIFY("DSW2")
224164   /* The following switch is 2/3 rotate buttons on the other sets, option doesn't exist in the Japan version */
225   PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
226   PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
227   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
228   PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
229   PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
230   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
231   PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
232   PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
233   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
234   PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
235   PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
236   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
165   PORT_DIPUNKNOWN_DIPLOC( 0x04, 0x04, "SW2:3" )
237166   /* these can still be used on the difficutly select even if they can't be used for rotating pieces in this version */
238   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON4 )
239   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2)
167   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON4 )      PORT_DIPLOCATION("SW2:7")
168   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) PORT_DIPLOCATION("SW2:8")
240169INPUT_PORTS_END
241170
242171static INPUT_PORTS_START( agress )
243   PORT_START      /* IN0 */
244   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY
245   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY
246   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY
247   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY
248   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON4 )
249   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )
250   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 )
251   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 )
172   PORT_INCLUDE( blockout )
252173
253   PORT_START      /* IN1 */
254   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2)
255   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2)
256   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2)
257   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2)
258   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2)
259   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
260   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)
261   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 )
262
263   PORT_START
264   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN1 )
265   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 )
266   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN3 )
267
268174   /* factory shipment setting is all dips OFF */
269
270   PORT_START   /* DSW 1 */
271   PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coinage ) )
272   PORT_DIPSETTING(    0x00, DEF_STR( 3C_1C ) )
273   PORT_DIPSETTING(    0x01, DEF_STR( 2C_1C ) )
274   PORT_DIPSETTING(    0x03, DEF_STR( 1C_1C ) )
275   PORT_DIPSETTING(    0x02, DEF_STR( 1C_2C ) )
276   PORT_DIPNAME( 0x04, 0x04, "Opening Cut" )
175   PORT_MODIFY("DSW1")
176   PORT_DIPNAME( 0x04, 0x04, "Opening Cut" )         PORT_DIPLOCATION("SW1:3")
277177   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
278178   PORT_DIPSETTING(    0x04, DEF_STR( On ) )
279   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED )
280   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED )
281   PORT_DIPNAME( 0x20, 0x20, DEF_STR( Demo_Sounds ) )
282   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
283   PORT_DIPSETTING(    0x20, DEF_STR( On ) )
284   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
285   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
179   PORT_DIPUNUSED_DIPLOC( 0x10, 0x10, "SW1:5" )
286180
287   PORT_START   /* DSW 2 */
288   PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) )
289   PORT_DIPSETTING(    0x02, DEF_STR( Easiest ) )
290   PORT_DIPSETTING(    0x01, DEF_STR( Easy ) )
291   PORT_DIPSETTING(    0x03, DEF_STR( Normal ) )
292   PORT_DIPSETTING(    0x00, DEF_STR( Hard ) )
181   PORT_MODIFY("DSW2")
293182   /* Engrish here. The manual says "Number of Prayers". Maybe related to lives? */
294   PORT_DIPNAME( 0x04, 0x04, DEF_STR( Players ) )
183   PORT_DIPNAME( 0x04, 0x04, DEF_STR( Players ) )      PORT_DIPLOCATION("SW2:3")
295184   PORT_DIPSETTING(    0x04, "1" )
296185   PORT_DIPSETTING(    0x00, "2" )
297   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED )
298   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED )
299   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED )
300   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
301   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
302186INPUT_PORTS_END
303187
304188/* handler called by the 2151 emulator when the internal timers cause an IRQ */
src/mame/drivers/zr107.c
r2086r2087
8484
8585static VIDEO_START( jetwave )
8686{
87   K001005_init();
87   K001005_init(machine);
8888   K001604_vh_start(machine, 0);
8989}
9090
r2086r2087
133133   };
134134
135135   K056832_vh_start(machine, REGION_GFX2, K056832_BPP_8, 1, scrolld, game_tile_callback, 0);
136   K001005_init();
136   K001005_init(machine);
137137}
138138
139139static VIDEO_UPDATE( zr107 )
src/mame/drivers/taitowlf.c
r2086r2087
3737   }
3838}
3939
40static void draw_char(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect, const gfx_element *gfx, int ch, int att, int x, int y)
40static void draw_char(bitmap_t *bitmap, const rectangle *cliprect, const gfx_element *gfx, int ch, int att, int x, int y)
4141{
4242   int i,j;
4343   UINT8 *dp;
r2086r2087
5151      {
5252         UINT8 pen = dp[index++];
5353         if (pen)
54            p[i] = machine->pens[gfx->color_base + (att & 0xf)];
54            p[i] = gfx->color_base + (att & 0xf);
5555         else
56            p[i] = machine->pens[gfx->color_base  + ((att >> 4) & 0x7)];
56            p[i] = gfx->color_base  + ((att >> 4) & 0x7);
5757      }
5858   }
5959}
r2086r2087
7676         int att1 = (cga[index] >> 24) & 0xff;
7777         int ch1 = (cga[index] >> 16) & 0xff;
7878
79         draw_char(screen->machine, bitmap, cliprect, gfx, ch0, att0, i*8, j*8);
80         draw_char(screen->machine, bitmap, cliprect, gfx, ch1, att1, (i*8)+8, j*8);
79         draw_char(bitmap, cliprect, gfx, ch0, att0, i*8, j*8);
80         draw_char(bitmap, cliprect, gfx, ch1, att1, (i*8)+8, j*8);
8181         index++;
8282      }
8383   }
r2086r2087
422422   MDRV_SCREEN_ADD("main", RASTER)
423423   MDRV_SCREEN_REFRESH_RATE(60)
424424   MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
425   MDRV_SCREEN_FORMAT(BITMAP_FORMAT_RGB15)
425   MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
426426   MDRV_SCREEN_SIZE(640, 480)
427427   MDRV_SCREEN_VISIBLE_AREA(0, 639, 0, 199)
428428
src/mame/drivers/wilytowr.c
r2086r2087
279279   AM_RANGE(0xf003, 0xf003) AM_WRITE(wilytwr_palbank_w)
280280   AM_RANGE(0xf006, 0xf007) AM_WRITE(coin_w)
281281   AM_RANGE(0xf800, 0xf800) AM_WRITE(soundlatch_w)
282   AM_RANGE(0xf801, 0xf801) AM_WRITE(watchdog_reset_w)   /* unknown (cleared by NMI handler) */
282   AM_RANGE(0xf801, 0xf801) AM_WRITE(SMH_NOP)   /* continues game when in stop mode (cleared by NMI handler) */
283283   AM_RANGE(0xf803, 0xf803) AM_WRITE(snd_irq_w)
284284ADDRESS_MAP_END
285285
src/mame/drivers/equites.c
r2086r2087
9898- similarly, splndrbt hardware only appears to be capable of displaying 24 sprites.
9999  This time, they are consecutive in RAM.
100100
101- gekisou doesn't have dip switches, but battery backed RAM. To enter the Settings
102  menu, press F1. The settings menu is VERY spartan, with no indication of what the
103  settings do.
101104
102TODO:
103----
104
105- on startup, the CPU continuously writes 5555 to 100000 in a tight loop and expects
106  it to change to exit the loop. The value should obviously be modified by the
107  sprite hardware but it's difficult to guess what should happen. A kludge read
108  handler is used as a work around.
109
110- the second interrupt source for main CPU is unknown.
111
112- gekisou inputs. Looks like there should be an EEPROM. Note ROM patches in
113  DRIVER_INIT to make it boot past what I think is the EEPROM read.
114  Settings are changed by pressing the service button and then using joystick
115  to change options.
116
117105  Settings:                1   2   3   4   5   6   7   8
118106  COIN 1  1 Coin / 1 Play  ON  ON
119107          1 Coin / 2 Play  ON  OFF
r2086r2087
128116  CABINET     Cocktail                         ON
129117              Upright                          OFF
130118
119
120TODO:
121----
122
123- on startup, the CPU continuously writes 5555 to 100000 in a tight loop and expects
124  it to change to exit the loop. The value should obviously be modified by the
125  sprite hardware but it's difficult to guess what should happen. A kludge read
126  handler is used as a work around.
127
128- the second interrupt source for main CPU is unknown.
129
130- gekisou has some unknown device mapped to 580000/5a0000. The bit read from bit 7
131  of 180000 must match the last write, otherwise the game will report a BOARD ERROR
132  during boot.
133
131134- gekisou: there's a white line crossing the explosion sprite. This doesn't look
132135  like a bad ROM since the line is crossing several, not concecutive, explosion
133136  sprites, and no other sprites.
134137
135138- gekisou: wrong sprite when hitting helicopter with missile?
136139
140- gekisou: there is a small glitch during the text intro at the beginning of player
141  2 game in cocktail mode: a white line spills out from the text box as characters
142  in the last line are written. This might well be a bug in the original.
143
137144- splndrbt, hvoltage: the interpretation of the scaling PROMs might be wrong.
138145  The sprite x scaling is not used at all because I couldn't figure it out.
146  Sprite y scaling is slightly wrong and leaves gaps in tall objects.
139147  Note that sprites are 30x30 instead of 32x32.
140148
141149- Need to use different default volumes for various games, especially gekisou
r2086r2087
150158
151159- implement low-pass filters on the DAC output
152160
161- the purpose of the sound PROM is unclear. From the schematics, it seems it
162  should influence the MSM5232 clock. However, even removing it from the board
163  doesn't seem to affect the sound.
164
153165* Special Thanks to:
154166
155167  Jarek Burczynski for a superb MSM5232 emulation
r2086r2087
376388static UINT8 equites_dac_latch;
377389static UINT8 equites_8155_portb;
378390
379static UINT8 eq8155_port_a,eq8155_port_c,ay_port_a,ay_port_b,eq_unk1;
391static UINT8 eq8155_port_a,eq8155_port_c,ay_port_a,ay_port_b,eq_cymbal_ctrl;
380392
381393static MACHINE_RESET(equites)
382394{
r2086r2087
395407   cpunum_set_input_line(machine, 1, INPUT_LINE_NMI, ASSERT_LINE);
396408}
397409
410
411static float cymvol,hihatvol;
412
398413static TIMER_CALLBACK( equites_frq_adjuster_callback )
399414{
400415   UINT8 frq = readinputportbytag(FRQ_ADJUSTER_TAG);
401416
402417   msm5232_set_clock(sndti_token(SOUND_MSM5232, 0), MSM5232_MIN_CLOCK + frq * (MSM5232_MAX_CLOCK - MSM5232_MIN_CLOCK) / 100);
403//popmessage("8155: C %02x A %02x  AY: A %02x B %02x Unk:%x", eq8155_port_c,eq8155_port_a,ay_port_a,ay_port_b,eq_unk1&15);
418//popmessage("8155: C %02x A %02x  AY: A %02x B %02x Unk:%x", eq8155_port_c,eq8155_port_a,ay_port_a,ay_port_b,eq_cymbal_ctrl&15);
419
420   cymvol *= 0.94f;
421   hihatvol *= 0.94f;
422
423   sndti_set_output_gain(SOUND_MSM5232, 0, 10, hihatvol + cymvol * (ay_port_b & 3) * 0.33);   /* NO from msm5232 */
404424}
405425
406426static SOUND_START(equites)
r2086r2087
435455
436456      case 4: // c0fc: increment PROM address (written by NMI handler)
437457         equites_sound_prom_address = (equites_sound_prom_address + 1) & 0x1f;
438//          FIXME: at this point, the 5-bit value
439//          memory_region(REGION_SOUND1)[equites_sound_prom_address] & 0x1f
440//          should be used for something...
458//       at this point, the 5-bit value
459//       memory_region(REGION_SOUND1)[equites_sound_prom_address] & 0x1f
460//       goes to an op-amp and to the base of a transistor. The transistor is part
461//       of a resonator that is used to generate the M5232 clock. The PROM doesn't
462//       actually seem to be important, since even removing it the M5232 clock
463//       continues to come out normally.
441464         break;
442465
443466      case 5: // c0fd: n.c.
r2086r2087
492515   if (data & ~ay_port_b & 0x80)
493516      sample_start(2, 2, 0);
494517
518   // FIXME I'm just enabling the MSM5232 Noise Output for now. Proper emulation
519   // of the analog circuitry should be done instead.
520//  if (data & ~ay_port_b & 0x08)   cymbal hit trigger
521//  if (data & ~ay_port_b & 0x04)   hi-hat hit trigger
522//  data & 3   cymbal volume
523//  data & 0x40  hi-hat enable
524
525   if (data & ~ay_port_b & 0x08)
526      cymvol = 1.0f;
527
528   if (data & ~ay_port_b & 0x04)
529      hihatvol = 0.8f;
530
531   if (~data & 0x40)
532      hihatvol = 0.0f;
533
495534   ay_port_b = data;
496535
497536#if POPDRUMKIT
r2086r2087
499538#endif
500539}
501540
541static WRITE8_HANDLER(equites_cymbal_ctrl_w)
542{
543   eq_cymbal_ctrl++;
544}
502545
503546
547
504548static void equites_update_dac(void)
505549{
506550   // there is only one latch, which is used to drive two DAC channels.
r2086r2087
528572   equites_update_dac();
529573}
530574
531static WRITE8_HANDLER(equites_unk1_w)
532{
533   eq_unk1++;
534}
535
536575static void equites_msm5232_gate(int state)
537576{
538577}
r2086r2087
608647}
609648#endif
610649
650
651// Gekisou special handling
652static int unknown_bit;
653
654static CUSTOM_INPUT( gekisou_unknown_status )
655{
656   return unknown_bit;
657}
658
659static WRITE16_HANDLER( gekisou_unknown_0_w )
660{
661   unknown_bit = 0;
662}
663
664static WRITE16_HANDLER( gekisou_unknown_1_w )
665{
666   unknown_bit = 1;
667}
668
611669/******************************************************************************/
612670// Main CPU Memory Map
613671
r2086r2087
645703
646704static ADDRESS_MAP_START( equites_map, ADDRESS_SPACE_PROGRAM, 16 )
647705   AM_RANGE(0x000000, 0x00ffff) AM_ROM   // ROM area is written several times (dev system?)
648   AM_RANGE(0x040000, 0x040fff) AM_RAM AM_BASE(&equites_workram)
706   AM_RANGE(0x040000, 0x040fff) AM_RAM AM_BASE(&equites_workram) AM_BASE(&generic_nvram16) AM_SIZE(&generic_nvram_size)   // nvram is for gekisou only
649707   AM_RANGE(0x080000, 0x080fff) AM_READWRITE(equites_fg_videoram_r, equites_fg_videoram_w)   // 8-bit
650708   AM_RANGE(0x0c0000, 0x0c01ff) AM_RAM AM_WRITE(equites_bg_videoram_w) AM_BASE(&equites_bg_videoram)
651709   AM_RANGE(0x0c0200, 0x0c0fff) AM_RAM
r2086r2087
661719   AM_RANGE(0x1ac000, 0x1ac001) AM_WRITENOP // 8404 control port4
662720   AM_RANGE(0x1c0000, 0x1c0001) AM_READWRITE(input_port_0_word_r, equites_scrollreg_w) // scroll register[XXYY]
663721   AM_RANGE(0x380000, 0x380001) AM_WRITE(equites_bgcolor_w) // bg color register[CC--]
722   // 580000 unknown (protection?) (gekisou only, installed by DRIVER_INIT)
723   // 5a0000 unknown (protection?) (gekisou only, installed by DRIVER_INIT)
664724   AM_RANGE(0x780000, 0x780001) AM_WRITE(watchdog_reset16_w)
665725ADDRESS_MAP_END
666726
r2086r2087
694754   AM_RANGE(0xc0a0, 0xc0a0) AM_WRITE(AY8910_write_port_0_w)
695755   AM_RANGE(0xc0a1, 0xc0a1) AM_WRITE(AY8910_control_port_0_w)
696756   AM_RANGE(0xc0b0, 0xc0b0) AM_WRITENOP // n.c.
697   AM_RANGE(0xc0c0, 0xc0c0) AM_WRITE(equites_unk1_w)
757   AM_RANGE(0xc0c0, 0xc0c0) AM_WRITE(equites_cymbal_ctrl_w)
698758   AM_RANGE(0xc0d0, 0xc0d0) AM_WRITE(equites_dac_latch_w)   // followed by 1 (and usually 0) on 8155 port B
699759   AM_RANGE(0xc0e0, 0xc0e0) AM_WRITE(equites_dac_latch_w)   // followed by 2 (and usually 0) on 8155 port B
700760   AM_RANGE(0xc0f8, 0xc0ff) AM_WRITE(equites_c0f8_w)
r2086r2087
784844#if EASY_TEST_MODE
785845   PORT_SERVICE( 0x0300, IP_ACTIVE_HIGH )
786846#endif
787   PORT_DIPNAME( 0x0400, 0x0400, DEF_STR ( Unknown ) )
788   PORT_DIPSETTING(      0x0000, DEF_STR( Off ) )
789   PORT_DIPSETTING(      0x0400, DEF_STR( On ) )
790   PORT_DIPNAME( 0x0800, 0x0800, DEF_STR ( Unknown ) )
791   PORT_DIPSETTING(      0x0000, DEF_STR( Off ) )
792   PORT_DIPSETTING(      0x0800, DEF_STR( On ) )
793   PORT_DIPNAME( 0x1000, 0x1000, DEF_STR ( Unknown ) )
794   PORT_DIPSETTING(      0x0000, DEF_STR( Off ) )
795   PORT_DIPSETTING(      0x1000, DEF_STR( On ) )
796   PORT_DIPNAME( 0x2000, 0x2000, DEF_STR ( Unknown ) )
797   PORT_DIPSETTING(      0x0000, DEF_STR( Off ) )
798   PORT_DIPSETTING(      0x2000, DEF_STR( On ) )
799   PORT_DIPNAME( 0x4000, 0x4000, DEF_STR ( Unknown ) )
800   PORT_DIPSETTING(      0x0000, DEF_STR( Off ) )
801   PORT_DIPSETTING(      0x4000, DEF_STR( On ) )
802   PORT_DIPNAME( 0x8000, 0x8000, DEF_STR ( Unknown ) )
803   PORT_DIPSETTING(      0x0000, DEF_STR( Off ) )
804   PORT_DIPSETTING(      0x8000, DEF_STR( On ) )
847   PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_SERVICE) PORT_NAME("Settings") PORT_CODE(KEYCODE_F1)
848   PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_UNKNOWN )
849   PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_UNKNOWN )
850   PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_UNKNOWN )
851   PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_UNKNOWN )
852   PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(gekisou_unknown_status, 0)
805853
806854   /* this is actually a variable resistor */
807855   PORT_START_TAG(FRQ_ADJUSTER_TAG)
r2086r2087
10871135   0
10881136};
10891137
1090const struct Samplesinterface alphamc07_samples_interface =
1138static const struct Samplesinterface alphamc07_samples_interface =
10911139{
10921140   3,   /* 3 channels */
10931141   alphamc07_sample_names
r2086r2087
11181166   MDRV_SOUND_ROUTE(5, "mono", MSM5232_BASE_VOLUME/1.5)   // pin 35  4'-2 : 15k resistor
11191167   MDRV_SOUND_ROUTE(6, "mono", MSM5232_BASE_VOLUME)      // pin 34  8'-2 : 10k resistor
11201168   MDRV_SOUND_ROUTE(7, "mono", MSM5232_BASE_VOLUME)      // pin 33 16'-2 : 10k resistor
1121   MDRV_SOUND_ROUTE(8, "mono", 1.0)      // pin 1 SOLO  8'
1122   MDRV_SOUND_ROUTE(9, "mono", 1.0)      // pin 2 SOLO 16'
1123   // pin 22 Noise Output  not mapped
1169   MDRV_SOUND_ROUTE(8, "mono", 1.0)      // pin 1 SOLO  8' (this actually feeds an analog section)
1170   MDRV_SOUND_ROUTE(9, "mono", 1.0)      // pin 2 SOLO 16' (this actually feeds an analog section)
1171   MDRV_SOUND_ROUTE(10,"mono", 0.12)      // pin 22 Noise Output (this actually feeds an analog section)
11241172
11251173   MDRV_SOUND_ADD(AY8910, XTAL_6_144MHz/4) /* verified on pcb */
11261174   MDRV_SOUND_CONFIG(equites_8910intf)
r2086r2087
11671215   MDRV_MACHINE_RESET(equites)
11681216MACHINE_DRIVER_END
11691217
1218
1219static MACHINE_DRIVER_START( gekisou )
1220   MDRV_IMPORT_FROM(equites)
1221
1222   // gekisou has battery-backed RAM to store settings
1223   MDRV_NVRAM_HANDLER(generic_0fill)
1224
1225MACHINE_DRIVER_END
1226
1227
11701228static MACHINE_DRIVER_START( splndrbt )
11711229
11721230   /* basic machine hardware */
r2086r2087
17601818
17611819static DRIVER_INIT( gekisou )
17621820{
1763   UINT16 *rom = (UINT16 *)memory_region(REGION_CPU1);
1764
17651821   unpack_region(REGION_GFX2);
17661822   unpack_region(REGION_GFX3);
17671823
1768   // FIXME - patch input check
1769   rom[0x8b0>>1] = 0x4e71;
1770   rom[0x8d4>>1] = 0x4e71;
1771   rom[0xb3a>>1] = 0x4e71;
1772   rom[0xb3c>>1] = 0x4e71;
1773   // patch ROM checksum test too
1774   rom[0x4b4>>1] = 0x4e71;
1775   rom[0x4b6>>1] = 0x4e71;
1776   rom[0x4bc>>1] = 0x4e71;
1777   rom[0x4be>>1] = 0x4e71;
1824   // install special handlers for unknown device (protection?)
1825   memory_install_write16_handler(0, ADDRESS_SPACE_PROGRAM, 0x580000, 0x580001, 0, 0, gekisou_unknown_0_w);
1826   memory_install_write16_handler(0, ADDRESS_SPACE_PROGRAM, 0x5a0000, 0x5a0001, 0, 0, gekisou_unknown_1_w);
17781827}
17791828
17801829static DRIVER_INIT( splndrbt )
r2086r2087
17981847// Equites Hardware
17991848GAME( 1984, equites,  0,        equites,  equites,  equites,  ROT90, "Alpha Denshi Co.",                "Equites", GAME_IMPERFECT_SOUND )
18001849GAME( 1984, equitess, equites,  equites,  equites,  equites,  ROT90, "Alpha Denshi Co. (Sega license)", "Equites (Sega)", GAME_IMPERFECT_SOUND )
1801GAME( 1985, gekisou,  0,        equites,  gekisou,  gekisou,  ROT90, "Eastern Corp.",                   "Gekisou (Japan)", GAME_NO_COCKTAIL | GAME_NOT_WORKING | GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS )
1850GAME( 1985, gekisou,  0,        gekisou,  gekisou,  gekisou,  ROT90, "Eastern Corp.",                   "Gekisou (Japan)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS )
18021851GAME( 1984, bullfgtr, 0,        equites,  bullfgtr, bullfgtr, ROT90, "Alpha Denshi Co.",                "Bull Fighter", GAME_IMPERFECT_SOUND )
18031852GAME( 1984, bullfgts, bullfgtr, equites,  bullfgtr, bullfgtr, ROT90, "Alpha Denshi Co. (Sega license)", "Bull Fighter (Sega)", GAME_IMPERFECT_SOUND )
18041853GAME( 1985, kouyakyu, 0,        equites,  kouyakyu, kouyakyu, ROT0,  "Alpha Denshi Co.",                "The Koukouyakyuh", GAME_IMPERFECT_SOUND )
src/mame/drivers/firetrk.c
r2086r2087
1313#define FIRETRK_CPU_CLOCK_750KZ      (12096000 / 16)
1414
1515
16int firetrk_game;
17
1816static UINT8 in_service_mode;
1917static UINT32 dial[2];
2018static UINT8 steer_dir[2];
src/mame/drivers/homedata.c
r2086r2087
13071307};
13081308
13091309
1310static UPD7810_CONFIG upd_config =
1310static const UPD7810_CONFIG upd_config =
13111311{
13121312   TYPE_7810,
13131313   NULL   /* io_callback */
src/mame/drivers/hyhoo.c
r2086r2087
140140
141141   PORT_START   /* (2) PORT 0 */
142142   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )         // DRAW BUSY
143   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )         //
143   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )         // NOT USED
144144   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 )      // SERVICE
145   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE3 )      // MEMORY RESET
145   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_NAME("Memory Reset")      // MEMORY RESET
146146   PORT_SERVICE( 0x10, IP_ACTIVE_LOW )               // TEST
147147   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 )         // COIN1
148148   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )         // NOT USED
r2086r2087
215215
216216   PORT_START   /* (2) PORT 0 */
217217   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )         // DRAW BUSY
218   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )         //
218   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )         // NOT USED
219219   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 )      // SERVICE
220   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE3 )      // MEMORY RESET
220   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_NAME("Memory Reset")      // MEMORY RESET
221221   PORT_SERVICE( 0x10, IP_ACTIVE_LOW )               // TEST
222222   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 )         // COIN1
223223   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )         // NOT USED
src/mame/drivers/gamecstl.c
r2086r2087
7070      palette_set_color(machine, i, cga_palette[i]);
7171}
7272
73static void draw_char(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect, const gfx_element *gfx, int ch, int att, int x, int y)
73static void draw_char(bitmap_t *bitmap, const rectangle *cliprect, const gfx_element *gfx, int ch, int att, int x, int y)
7474{
7575   int i,j;
7676   UINT8 *dp;
r2086r2087
8585      {
8686         UINT8 pen = dp[index++];
8787         if (pen)
88            p[i] = machine->pens[gfx->color_base + (att & 0xf)];
88            p[i] = gfx->color_base + (att & 0xf);
8989         else
90            p[i] = machine->pens[gfx->color_base  + ((att >> 4) & 0x7)];
90            p[i] = gfx->color_base  + ((att >> 4) & 0x7);
9191      }
9292   }
9393}
r2086r2087
110110         int att1 = (cga[index] >> 24) & 0xff;
111111         int ch1 = (cga[index] >> 16) & 0xff;
112112
113         draw_char(screen->machine, bitmap, cliprect, gfx, ch0, att0, i*8, j*8);
114         draw_char(screen->machine, bitmap, cliprect, gfx, ch1, att1, (i*8)+8, j*8);
113         draw_char(bitmap, cliprect, gfx, ch0, att0, i*8, j*8);
114         draw_char(bitmap, cliprect, gfx, ch1, att1, (i*8)+8, j*8);
115115         index++;
116116      }
117117   }
r2086r2087
456456   MDRV_SCREEN_ADD("main", RASTER)
457457   MDRV_SCREEN_REFRESH_RATE(60)
458458   MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
459   MDRV_SCREEN_FORMAT(BITMAP_FORMAT_RGB15)
459   MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
460460   MDRV_SCREEN_SIZE(640, 480)
461461   MDRV_SCREEN_VISIBLE_AREA(0, 639, 0, 199)
462462
src/mame/drivers/cabal.c
r2086r2087
538538static MACHINE_DRIVER_START( cabal )
539539
540540   /* basic machine hardware */
541   MDRV_CPU_ADD(M68000, 20000000/2) /* verified on pcb */
541   MDRV_CPU_ADD(M68000, XTAL_20MHz/2) /* verified on pcb */
542542   MDRV_CPU_PROGRAM_MAP(readmem_cpu,writemem_cpu)
543543   MDRV_CPU_VBLANK_INT("main", irq1_line_hold)
544544
545   MDRV_CPU_ADD(Z80, 3579580) /* verified on pcb */
545   MDRV_CPU_ADD(Z80, XTAL_3_579545MHz) /* verified on pcb */
546546   /* audio CPU */
547547   MDRV_CPU_PROGRAM_MAP(readmem_sound,writemem_sound)
548548
r2086r2087
565565   /* sound hardware */
566566   MDRV_SPEAKER_STANDARD_MONO("mono")
567567
568   MDRV_SOUND_ADD(YM2151, 3579580) /* verified on pcb */
568   MDRV_SOUND_ADD(YM2151, XTAL_3_579545MHz) /* verified on pcb */
569569   MDRV_SOUND_CONFIG(seibu_ym2151_interface)
570570   MDRV_SOUND_ROUTE(ALL_OUTPUTS,"mono", 0.80)
571571
572   MDRV_SOUND_ADD(CUSTOM, 8000)
572   MDRV_SOUND_ADD(CUSTOM, 8000) /* it should use the msm5205 */
573573   MDRV_SOUND_CONFIG(seibu_adpcm_interface)
574574   MDRV_SOUND_ROUTE(ALL_OUTPUTS,"mono", 0.40)
575575
576   MDRV_SOUND_ADD(CUSTOM, 8000)
576   MDRV_SOUND_ADD(CUSTOM, 8000) /* it should use the msm5205 */
577577   MDRV_SOUND_CONFIG(seibu_adpcm_interface)
578578   MDRV_SOUND_ROUTE(ALL_OUTPUTS,"mono", 0.40)
579579MACHINE_DRIVER_END
r2086r2087
583583static MACHINE_DRIVER_START( cabalbl )
584584
585585   /* basic machine hardware */
586   MDRV_CPU_ADD(M68000, 12000000) /* 12 MHz */
586   MDRV_CPU_ADD(M68000, XTAL_20MHz/2) /* verified on pcb */
587587   MDRV_CPU_PROGRAM_MAP(cabalbl_readmem_cpu,cabalbl_writemem_cpu)
588588   MDRV_CPU_VBLANK_INT("main", irq1_line_hold)
589589
590   MDRV_CPU_ADD(Z80, 4000000)
590   MDRV_CPU_ADD(Z80, XTAL_3_579545MHz) /* verified on pcb */
591591   MDRV_CPU_PROGRAM_MAP(cabalbl_readmem_sound,cabalbl_writemem_sound)
592592
593593   /* there are 2x z80s for the ADPCM */
594   MDRV_CPU_ADD(Z80, 4000000)
594   MDRV_CPU_ADD(Z80, XTAL_3_579545MHz) /* verified on pcb */
595595   MDRV_CPU_PROGRAM_MAP(cabalbl_talk1_map,0)
596596   MDRV_CPU_IO_MAP(cabalbl_talk1_portmap,0)
597597   MDRV_CPU_PERIODIC_INT(irq0_line_hold,8000)
598598
599   MDRV_CPU_ADD(Z80, 4000000)
599   MDRV_CPU_ADD(Z80, XTAL_3_579545MHz) /* verified on pcb */
600600   MDRV_CPU_PROGRAM_MAP(cabalbl_talk2_map,0)
601601   MDRV_CPU_IO_MAP(cabalbl_talk2_portmap,0)
602602   MDRV_CPU_PERIODIC_INT(irq0_line_hold,8000)
r2086r2087
622622   /* sound hardware */
623623   MDRV_SPEAKER_STANDARD_MONO("mono")
624624
625   MDRV_SOUND_ADD(YM2151, 3579580)
625   MDRV_SOUND_ADD(YM2151, XTAL_3_579545MHz) /* verified on pcb */
626626   MDRV_SOUND_CONFIG(cabalbl_ym2151_interface)
627627   MDRV_SOUND_ROUTE(ALL_OUTPUTS,"mono", 0.80)
628628
629   MDRV_SOUND_ADD(MSM5205, 384000)
629   MDRV_SOUND_ADD(MSM5205, XTAL_12MHz/32) /* verified on pcb (no resonator) */
630630   MDRV_SOUND_CONFIG(msm5205_interface_1)
631631   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.60)
632632
633   MDRV_SOUND_ADD(MSM5205, 384000)
633   MDRV_SOUND_ADD(MSM5205, XTAL_12MHz/32) /* verified on pcb (no resonator)*/
634634   MDRV_SOUND_CONFIG(msm5205_interface_2)
635635   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.60)
636636MACHINE_DRIVER_END
src/mame/drivers/cidelsa.c
r2086r2087
1010
1111    TODO:
1212
13    - convert to use new video timing system when it is available
13    - auto_malloc cidelsa_pcb
14    - move set_cpu_mode timer call to MDRV
1415    - fix COP420 core to get sound in Draco
1516
1617*/
1718
1819#define DESTRYER_CHR1   3579000.0 // unverified
19#define DESTRYER_CHR2   5714300.0
20#define DESTRYER_CHR2   XTAL_5_7143MHz
2021#define ALTAIR_CHR1      3579000.0 // unverified
2122#define ALTAIR_CHR2      CDP1869_DOT_CLK_PAL // unverified
22#define DRACO_CHR1      4433610.0
23#define DRACO_CHR1      XTAL_4_43361MHz
2324#define DRACO_CHR2      CDP1869_DOT_CLK_PAL // unverified
24#define DRACO_SND_CHR1   2012160.0
25#define DRACO_SND_CHR1   XTAL_2_01216MHz
2526
2627/* CDP1802 Interface */
2728
r2086r2087
4546        EF4     Coin 1
4647    */
4748
48   return (cdp1869_prd & 0x01) + (readinputportbytag("EF") & 0xfe);
49   return readinputportbytag("EF");
4950}
5051
5152static const CDP1802_CONFIG cidelsa_cdp1802_config =
r2086r2087
5859   NULL
5960};
6061
61static READ8_HANDLER ( cidelsa_input_port_0_r )
62{
63   return (readinputportbytag("IN0") & 0x7f) + (cdp1869_pcb ? 0x80 : 0x00);
64}
65
6662/* Sound Interface */
6763
6864static int draco_sound;
r2086r2087
216212static WRITE8_HANDLER ( cidelsa_charram_w )
217213{
218214   int addr = cdp1869_get_cma(offset);
215
219216   cidelsa_pcb[addr] = activecpu_get_reg(CDP1802_Q);
217
220218   cdp1869_charram_w(machine, offset, data);
221219}
222220
223221static READ8_HANDLER ( cidelsa_charram_r )
224222{
225223   int addr = cdp1869_get_cma(offset);
224
226225   cdp1869_pcb = cidelsa_pcb[addr];
227   return cdp1869_charram_r(machine,offset);
226
227   return cdp1869_charram_r(machine, offset);
228228}
229229
230230/* Memory Maps */
r2086r2087
246246ADDRESS_MAP_END
247247
248248static ADDRESS_MAP_START( destryer_io_map, ADDRESS_SPACE_IO, 8 )
249   AM_RANGE(0x01, 0x01) AM_READWRITE(cidelsa_input_port_0_r, destryer_out1_w)
250   AM_RANGE(0x02, 0x02) AM_READ(input_port_1_r)
249   AM_RANGE(0x01, 0x01) AM_READ_PORT("IN0") AM_WRITE(destryer_out1_w)
250   AM_RANGE(0x02, 0x02) AM_READ_PORT("IN1")
251251   AM_RANGE(0x03, 0x03) AM_WRITE(cdp1869_out3_w)
252252   AM_RANGE(0x04, 0x04) AM_WRITE(cdp1869_out4_w)
253253   AM_RANGE(0x05, 0x05) AM_WRITE(cdp1869_out5_w)
r2086r2087
265265ADDRESS_MAP_END
266266
267267static ADDRESS_MAP_START( altair_io_map, ADDRESS_SPACE_IO, 8 )
268   AM_RANGE(0x01, 0x01) AM_READWRITE(cidelsa_input_port_0_r, altair_out1_w)
269   AM_RANGE(0x02, 0x02) AM_READ(input_port_1_r)
268   AM_RANGE(0x01, 0x01) AM_READ_PORT("IN0") AM_WRITE(altair_out1_w)
269   AM_RANGE(0x02, 0x02) AM_READ_PORT("IN1")
270270   AM_RANGE(0x03, 0x03) AM_WRITE(cdp1869_out3_w)
271   AM_RANGE(0x04, 0x04) AM_READWRITE(input_port_2_r, cdp1869_out4_w)
271   AM_RANGE(0x04, 0x04) AM_READ_PORT("IN2") AM_WRITE(cdp1869_out4_w)
272272   AM_RANGE(0x05, 0x05) AM_WRITE(cdp1869_out5_w)
273273   AM_RANGE(0x06, 0x06) AM_WRITE(cdp1869_out6_w)
274274   AM_RANGE(0x07, 0x07) AM_WRITE(cdp1869_out7_w)
r2086r2087
284284ADDRESS_MAP_END
285285
286286static ADDRESS_MAP_START( draco_io_map, ADDRESS_SPACE_IO, 8 )
287   AM_RANGE(0x01, 0x01) AM_READWRITE(cidelsa_input_port_0_r, draco_out1_w)
288   AM_RANGE(0x02, 0x02) AM_READ(input_port_1_r)
287   AM_RANGE(0x01, 0x01) AM_READ_PORT("IN0") AM_WRITE(draco_out1_w)
288   AM_RANGE(0x02, 0x02) AM_READ_PORT("IN1")
289289   AM_RANGE(0x03, 0x03) AM_WRITE(cdp1869_out3_w)
290   AM_RANGE(0x04, 0x04) AM_READWRITE(input_port_2_r, cdp1869_out4_w)
290   AM_RANGE(0x04, 0x04) AM_READ_PORT("IN2") AM_WRITE(cdp1869_out4_w)
291291   AM_RANGE(0x05, 0x05) AM_WRITE(cdp1869_out5_w)
292292   AM_RANGE(0x06, 0x06) AM_WRITE(cdp1869_out6_w)
293293   AM_RANGE(0x07, 0x07) AM_WRITE(cdp1869_out7_w)
r2086r2087
306306
307307/* Input Ports */
308308
309static CUSTOM_INPUT( cdp1869_pcb_r )
310{
311   return cdp1869_pcb;
312}
313
314static CUSTOM_INPUT( cdp1869_predisplay_r )
315{
316   return cdp1869_prd;
317}
318
309319static INPUT_PORTS_START( destryer )
310320   PORT_START_TAG("IN0")
311321   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) // CARTUCHO
r2086r2087
315325   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) // LF
316326   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) // FR
317327   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
318   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SPECIAL ) // PCB from CDP1869
328   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(cdp1869_pcb_r, 0)
319329
320330   PORT_START_TAG("IN1")
321331   PORT_DIPNAME( 0x03, 0x02, DEF_STR( Difficulty ) )
r2086r2087
340350   PORT_DIPSETTING(    0x00, "Slot A: 2.5  Slot B: 5" )
341351
342352   PORT_START_TAG("EF")
343   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SPECIAL ) // _PREDISPLAY from CDP1869
353   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(cdp1869_predisplay_r, 0)
344354   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE ) // ST
345355   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 ) // M2
346356   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 ) // M1
r2086r2087
355365   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) // LF
356366   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) // FR
357367   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
358   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SPECIAL ) // PCB from CDP1869
368   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(cdp1869_pcb_r, 0)
359369
360370   PORT_START_TAG("IN1")
361371   PORT_DIPNAME( 0x03, 0x02, DEF_STR( Difficulty ) )
r2086r2087
390400   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
391401
392402   PORT_START_TAG("EF")
393   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SPECIAL ) // _PREDISPLAY from CDP1869
403   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(cdp1869_predisplay_r, 0)
394404   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE ) // ST
395405   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 ) // M2
396406   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 ) // M1
r2086r2087
405415   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
406416   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
407417   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
408   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SPECIAL ) // PCB from CDP1869
418   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(cdp1869_pcb_r, 0)
409419
410420   PORT_START_TAG("IN1")
411421   PORT_DIPNAME( 0x03, 0x02, DEF_STR( Difficulty ) )
r2086r2087
442452   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_LEFT )
443453
444454   PORT_START_TAG("EF")
445   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SPECIAL ) // _PREDISPLAY from CDP1869
455   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(cdp1869_predisplay_r, 0)
446456   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE ) // ST
447457   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 ) // M2
448458   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 ) // M1
449459INPUT_PORTS_END
450460
451/* Interrupt Generators */
461/* Video Timer Callbacks */
452462
453static INTERRUPT_GEN( altair_interrupt )
463static TIMER_DEVICE_CALLBACK( altair_prd_start )
454464{
455   int scanline = (CDP1869_TOTAL_SCANLINES_PAL - 1) - cpu_getiloops();
465   cpunum_set_input_line(Machine, 0, INPUT_LINE_IRQ0, ASSERT_LINE);
466   cdp1869_prd = 1; // inverted
467}
456468
457   switch (scanline)
458   {
459   case CDP1869_SCANLINE_PREDISPLAY_START_PAL:
460      cpunum_set_input_line(machine, 0, INPUT_LINE_IRQ0, ASSERT_LINE);
461      cdp1869_prd = 1; // inverted
462      break;
469static TIMER_DEVICE_CALLBACK( altair_prd_end )
470{
471   cpunum_set_input_line(Machine, 0, INPUT_LINE_IRQ0, CLEAR_LINE);
472   cdp1869_prd = 0; // inverted
473}
463474
464   case CDP1869_SCANLINE_PREDISPLAY_END_PAL:
465      cpunum_set_input_line(machine, 0, INPUT_LINE_IRQ0, CLEAR_LINE);
466      cdp1869_prd = 0; // inverted
467      break;
468   }
475static TIMER_DEVICE_CALLBACK( draco_prd_start )
476{
477   cdp1869_prd = 0;
469478}
470479
471static INTERRUPT_GEN( draco_interrupt )
480static TIMER_DEVICE_CALLBACK( draco_prd_end )
472481{
473   int scanline = (CDP1869_TOTAL_SCANLINES_PAL - 1) - cpu_getiloops();
482   cdp1869_prd = 1;
483}
474484
475   switch (scanline)
476   {
477   case CDP1869_SCANLINE_PREDISPLAY_START_PAL:
478      cdp1869_prd = 0;
479      break;
485/* Machine Start */
480486
481   case CDP1869_SCANLINE_PREDISPLAY_END_PAL:
482      cdp1869_prd = 1;
483      break;
484   }
487static TIMER_CALLBACK( set_cpu_mode )
488{
489   cdp1802_mode = CDP1802_MODE_RUN;
485490}
486491
492static UINT8 cidelsa_get_color_bits(UINT8 cramdata, UINT16 cramaddr, UINT16 pramaddr)
493{
494   int ccb0 = (cramdata & 0x40) >> 4;
495   int ccb1 = (cramdata & 0x80) >> 6;
496   int pcb = cidelsa_pcb[cramaddr];
497
498   return ccb0 + ccb1 + pcb;
499}
500
501static const CDP1869_interface destryer_CDP1869_interface =
502{
503   CDP1869_PAL,
504   REGION_INVALID,
505   0x800,
506   0x400,
507   cidelsa_get_color_bits
508};
509
510static const CDP1869_interface draco_CDP1869_interface =
511{
512   CDP1869_PAL,
513   REGION_INVALID,
514   0x800,
515   0x800,
516   cidelsa_get_color_bits
517};
518
487519static MACHINE_START( destryer )
488520{
521   cdp1869_configure(&destryer_CDP1869_interface);
522
523   timer_set(ATTOTIME_IN_MSEC(200), NULL, 0, set_cpu_mode);
524
489525   state_save_register_global(cdp1802_mode);
490526   state_save_register_global_array(cidelsa_pcb);
491527   state_save_register_global(cdp1869_prd);
r2086r2087
494530
495531static MACHINE_START( draco )
496532{
533   UINT8 *ROM = memory_region(REGION_CPU2);
534   memory_configure_bank(1, 0, 2, &ROM[0x000], 0x400);
535
536   cdp1869_configure(&draco_CDP1869_interface);
537
538   timer_set(ATTOTIME_IN_MSEC(200), NULL, 0, set_cpu_mode);
539
497540   state_save_register_global(cdp1802_mode);
498541   state_save_register_global_array(cidelsa_pcb);
499542   state_save_register_global(cdp1869_prd);
r2086r2087
502545   state_save_register_global(draco_ay_latch);
503546}
504547
548/* Machine Reset */
549
505550static MACHINE_RESET( destryer )
506551{
507552   cpunum_set_input_line(machine, 0, INPUT_LINE_RESET, PULSE_LINE);
r2086r2087
510555/* Machine Drivers */
511556
512557static MACHINE_DRIVER_START( destryer )
513
514558   // basic system hardware
515559
516560   MDRV_CPU_ADD(CDP1802, DESTRYER_CHR1)
517561   MDRV_CPU_PROGRAM_MAP(destryer_map, 0)
518562   MDRV_CPU_IO_MAP(destryer_io_map, 0)
519563   MDRV_CPU_CONFIG(cidelsa_cdp1802_config)
520   MDRV_CPU_VBLANK_INT_HACK(altair_interrupt, CDP1869_TOTAL_SCANLINES_PAL)
521564   MDRV_NVRAM_HANDLER(generic_0fill)
522565   MDRV_MACHINE_START(destryer)
523566   MDRV_MACHINE_RESET(destryer)
r2086r2087
534577   MDRV_SCREEN_RAW_PARAMS(DESTRYER_CHR2, CDP1869_SCREEN_WIDTH, CDP1869_HBLANK_END, CDP1869_HBLANK_START, CDP1869_TOTAL_SCANLINES_PAL, CDP1869_SCANLINE_VBLANK_END_PAL, CDP1869_SCANLINE_VBLANK_START_PAL)
535578   MDRV_SCREEN_DEFAULT_POSITION(1.226, 0.012, 1.4, 0.044)
536579
580   MDRV_TIMER_ADD_SCANLINE("prd_start", altair_prd_start, "main", CDP1869_SCANLINE_PREDISPLAY_START_PAL, CDP1869_TOTAL_SCANLINES_PAL)
581   MDRV_TIMER_ADD_SCANLINE("prd_end", altair_prd_end, "main", CDP1869_SCANLINE_PREDISPLAY_END_PAL, CDP1869_TOTAL_SCANLINES_PAL)
582
537583   // sound hardware
538584
539585   MDRV_SPEAKER_STANDARD_MONO("mono")
r2086r2087
543589MACHINE_DRIVER_END
544590
545591static MACHINE_DRIVER_START( destryea )
546
547592   // basic system hardware
548593
549594   MDRV_CPU_ADD(CDP1802, DESTRYER_CHR1)
550595   MDRV_CPU_PROGRAM_MAP(destryea_map, 0)
551596   MDRV_CPU_IO_MAP(destryer_io_map, 0)
552597   MDRV_CPU_CONFIG(cidelsa_cdp1802_config)
553   MDRV_CPU_VBLANK_INT_HACK(altair_interrupt, CDP1869_TOTAL_SCANLINES_PAL)
554598   MDRV_NVRAM_HANDLER(generic_0fill)
555599   MDRV_MACHINE_START(destryer)
556600   MDRV_MACHINE_RESET(destryer)
r2086r2087
567611   MDRV_SCREEN_RAW_PARAMS(DESTRYER_CHR2, CDP1869_SCREEN_WIDTH, CDP1869_HBLANK_END, CDP1869_HBLANK_START, CDP1869_TOTAL_SCANLINES_PAL, CDP1869_SCANLINE_VBLANK_END_PAL, CDP1869_SCANLINE_VBLANK_START_PAL)
568612   MDRV_SCREEN_DEFAULT_POSITION(1.226, 0.012, 1.4, 0.044)
569613
614   MDRV_TIMER_ADD_SCANLINE("prd_start", altair_prd_start, "main", CDP1869_SCANLINE_PREDISPLAY_START_PAL, CDP1869_TOTAL_SCANLINES_PAL)
615   MDRV_TIMER_ADD_SCANLINE("prd_end", altair_prd_end, "main", CDP1869_SCANLINE_PREDISPLAY_END_PAL, CDP1869_TOTAL_SCANLINES_PAL)
616
570617   // sound hardware
571618
572619   MDRV_SPEAKER_STANDARD_MONO("mono")
r2086r2087
576623MACHINE_DRIVER_END
577624
578625static MACHINE_DRIVER_START( altair )
579
580626   // basic system hardware
581627
582628   MDRV_CPU_ADD(CDP1802, ALTAIR_CHR1)
583629   MDRV_CPU_PROGRAM_MAP(altair_map, 0)
584630   MDRV_CPU_IO_MAP(altair_io_map, 0)
585631   MDRV_CPU_CONFIG(cidelsa_cdp1802_config)
586   MDRV_CPU_VBLANK_INT_HACK(altair_interrupt, CDP1869_TOTAL_SCANLINES_PAL)
587632   MDRV_MACHINE_START(destryer)
588633   MDRV_MACHINE_RESET(destryer)
589634
r2086r2087
599644   MDRV_SCREEN_RAW_PARAMS(ALTAIR_CHR2, CDP1869_SCREEN_WIDTH, CDP1869_HBLANK_END, CDP1869_HBLANK_START, CDP1869_TOTAL_SCANLINES_PAL, CDP1869_SCANLINE_VBLANK_END_PAL, CDP1869_SCANLINE_VBLANK_START_PAL)
600645   MDRV_SCREEN_DEFAULT_POSITION(1.226, 0.012, 1.4, 0.044)
601646
647   MDRV_TIMER_ADD_SCANLINE("prd_start", altair_prd_start, "main", CDP1869_SCANLINE_PREDISPLAY_START_PAL, CDP1869_TOTAL_SCANLINES_PAL)
648   MDRV_TIMER_ADD_SCANLINE("prd_end", altair_prd_end, "main", CDP1869_SCANLINE_PREDISPLAY_END_PAL, CDP1869_TOTAL_SCANLINES_PAL)
649
602650   // sound hardware
603651
604652   MDRV_SPEAKER_STANDARD_MONO("mono")
r2086r2087
608656MACHINE_DRIVER_END
609657
610658static MACHINE_DRIVER_START( draco )
611
612659   // basic system hardware
613660
614661   MDRV_CPU_ADD(CDP1802, DRACO_CHR1)
615662   MDRV_CPU_PROGRAM_MAP(draco_map, 0)
616663   MDRV_CPU_IO_MAP(draco_io_map, 0)
617664   MDRV_CPU_CONFIG(cidelsa_cdp1802_config)
618   MDRV_CPU_VBLANK_INT_HACK(draco_interrupt, CDP1869_TOTAL_SCANLINES_PAL)
619665   MDRV_NVRAM_HANDLER(generic_0fill)
620666   MDRV_MACHINE_START(draco)
621667   MDRV_MACHINE_RESET(destryer)
r2086r2087
636682   MDRV_SCREEN_RAW_PARAMS(DRACO_CHR2, CDP1869_SCREEN_WIDTH, CDP1869_HBLANK_END, CDP1869_HBLANK_START, CDP1869_TOTAL_SCANLINES_PAL, CDP1869_SCANLINE_VBLANK_END_PAL, CDP1869_SCANLINE_VBLANK_START_PAL)
637683   MDRV_SCREEN_DEFAULT_POSITION(1.226, 0.012, 1.360, 0.024)
638684
685   MDRV_TIMER_ADD_SCANLINE("prd_start", draco_prd_start, "main", CDP1869_SCANLINE_PREDISPLAY_START_PAL, CDP1869_TOTAL_SCANLINES_PAL)
686   MDRV_TIMER_ADD_SCANLINE("prd_end", draco_prd_end, "main", CDP1869_SCANLINE_PREDISPLAY_END_PAL, CDP1869_TOTAL_SCANLINES_PAL)
687
639688   // sound hardware
640689
641690   MDRV_SPEAKER_STANDARD_MONO("mono")
r2086r2087
648697   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
649698MACHINE_DRIVER_END
650699
651/* Driver Initialization */
652
653static UINT8 cidelsa_get_color_bits(UINT8 cramdata, UINT16 cramaddr, UINT16 pramaddr)
654{
655   int ccb0 = (cramdata & 0x40) >> 4;
656   int ccb1 = (cramdata & 0x80) >> 6;
657   int pcb = cidelsa_pcb[cramaddr];
658
659   return ccb0 + ccb1 + pcb;
660}
661
662static const CDP1869_interface destryer_CDP1869_interface =
663{
664   CDP1869_PAL,
665   REGION_INVALID,
666   0x800,
667   0x400,
668   cidelsa_get_color_bits
669};
670
671static TIMER_CALLBACK( set_cpu_mode )
672{
673   cdp1802_mode = CDP1802_MODE_RUN;
674}
675
676static DRIVER_INIT( cidelsa )
677{
678   cdp1869_configure(&destryer_CDP1869_interface);
679
680   timer_set(ATTOTIME_IN_MSEC(200), NULL, 0, set_cpu_mode);
681}
682
683static const CDP1869_interface draco_CDP1869_interface =
684{
685   CDP1869_PAL,
686   REGION_INVALID,
687   0x800,
688   0x800,
689   cidelsa_get_color_bits
690};
691
692static DRIVER_INIT( draco )
693{
694   UINT8 *ROM = memory_region(REGION_CPU2);
695   memory_configure_bank(1, 0, 2, &ROM[0x000], 0x400);
696
697   cdp1869_configure(&draco_CDP1869_interface);
698
699   timer_set(ATTOTIME_IN_MSEC(200), NULL, 0, set_cpu_mode);
700}
701
702700/* ROMs */
703701
704702ROM_START( destryer )
r2086r2087
745743
746744/* Game Drivers */
747745
748GAME( 1980, destryer, 0,       destryer, destryer, cidelsa, ROT90, "Cidelsa", "Destroyer (Cidelsa) (set 1)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE )
749GAME( 1980, destryea, destryer, destryea, destryer, cidelsa, ROT90, "Cidelsa", "Destroyer (Cidelsa) (set 2)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE )
750GAME( 1981, altair,   0,       altair,   altair,   cidelsa, ROT90, "Cidelsa", "Altair", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE )
751GAME( 1981, draco,    0,       draco,    draco,    draco,     ROT90, "Cidelsa", "Draco", GAME_IMPERFECT_COLORS | GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE )
746GAME( 1980, destryer, 0,       destryer, destryer, 0, ROT90, "Cidelsa", "Destroyer (Cidelsa) (set 1)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE )
747GAME( 1980, destryea, destryer, destryea, destryer, 0, ROT90, "Cidelsa", "Destroyer (Cidelsa) (set 2)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE )
748GAME( 1981, altair,   0,       altair,   altair,   0, ROT90, "Cidelsa", "Altair", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE )
749GAME( 1981, draco,    0,       draco,    draco,    0, ROT90, "Cidelsa", "Draco", GAME_IMPERFECT_COLORS | GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE )
src/mame/drivers/dooyong.c
r2086r2087
11531153   /* audio CPU */   /* ??? */
11541154   MDRV_CPU_PROGRAM_MAP(bluehawk_sound_readmem,bluehawk_sound_writemem)
11551155
1156   MDRV_MACHINE_START(lastday)
1157
11561158   /* video hardware */
11571159   MDRV_SCREEN_ADD("main", RASTER)
11581160   MDRV_SCREEN_REFRESH_RATE(60)
src/mame/drivers/amidar.c
r2086r2087
305305
306306/* same as Turtles, but dip switches are different. */
307307static INPUT_PORTS_START( turpin )
308   PORT_START_TAG("IN0")
309308   PORT_INCLUDE( turtles )
310309
311310   PORT_MODIFY("IN1")
src/mame/drivers/segas18.c
r2086r2087
10431043   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN)
10441044   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN)
10451045   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN)
1046   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN)
1047   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED) /* P2 joystick inputs, unused in lghost */
1048   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED)
1049   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED)
1050   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED)
10461051
10471052   PORT_MODIFY("SERVICE")
10481053   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
src/mame/drivers/crospang.c
r2086r2087
417417   MDRV_SCREEN_ADD("main", RASTER)
418418   MDRV_SCREEN_REFRESH_RATE(60)
419419   MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
420   MDRV_SCREEN_FORMAT(BITMAP_FORMAT_RGB15)
420   MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
421421   MDRV_SCREEN_SIZE(64*8, 64*8)
422422   MDRV_SCREEN_VISIBLE_AREA(0, 40*8-1, 0, 30*8-1)
423423
r2086r2087
455455   MDRV_SCREEN_ADD("main", RASTER)
456456   MDRV_SCREEN_REFRESH_RATE(60)
457457   MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
458   MDRV_SCREEN_FORMAT(BITMAP_FORMAT_RGB15)
458   MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
459459   MDRV_SCREEN_SIZE(64*8, 64*8)
460460   MDRV_SCREEN_VISIBLE_AREA(0, 40*8-1, 0, 30*8-1)
461461
src/osd/windows/windows.mak
r2086r2087
7171
7272RC = @windres --use-temp-file
7373
74RCDEFS = -DNDEBUG -D_WIN32_IE=0x040
74RCDEFS = -DNDEBUG -D_WIN32_IE=0x0501
7575
7676RCFLAGS = -O coff -I $(WINSRC) -I $(WINOBJ)
7777
r2086r2087
198198LIBS += -luser32 -lgdi32 -lddraw -ldsound -ldinput -ldxguid -lwinmm -ladvapi32 -lcomctl32 -lshlwapi
199199
200200ifdef PTR64
201ifdef MSVC_BUILD
201202LIBS += -lbufferoverflowu
203else
204DEFS += -D_COM_interface=struct
202205endif
206endif
203207
204208
205209
src/osd/windows/winprefix.h
r2086r2087
77//
88//============================================================
99
10#define _WIN32_WINNT 0x0501
11
1012#ifdef MALLOC_DEBUG
1113#include <stdlib.h>
14#include <malloc.h>
1215
13// override malloc to track file/line
14void* malloc_file_line(size_t size, const char *file, int line);
15void* calloc_file_line(size_t size, size_t count, const char *FILE, int line);
16void * realloc_file_line(void *memory, size_t size, const char *file, int line);
16// override malloc/calloc/realloc/free to track file/line
17void *malloc_file_line(size_t size, const char *file, int line);
18void *calloc_file_line(size_t size, size_t count, const char *FILE, int line);
19void *realloc_file_line(void *memory, size_t size, const char *file, int line);
20void free_file_line(void *memory, const char *file, int line);
1721
1822#undef malloc
1923#define malloc(x) malloc_file_line(x, __FILE__, __LINE__)
r2086r2087
2125#define calloc(x,y) calloc_file_line(x, y, __FILE__, __LINE__)
2226#undef realloc
2327#define realloc(x,y) realloc_file_line(x, y, __FILE__, __LINE__)
28#undef free
29#define free(x) free_file_line(x, __FILE__, __LINE__)
2430#endif
2531
2632#ifdef _MSC_VER
r2086r2087
3238#endif
3339
3440#ifdef __GNUC__
41#ifndef alloca
3542#define alloca   __builtin_alloca
3643#endif
44#endif
3745
3846#define PATH_SEPARATOR      "\\"
src/osd/windows/winsync.c
r2086r2087
88//============================================================
99
1010// standard windows headers
11#ifndef _WIN32_WINNT
12#define _WIN32_WINNT 0x0400
13#endif
1411#define WIN32_LEAN_AND_MEAN
1512#include <windows.h>
1613
src/osd/windows/input.c
r2086r2087
1010// For testing purposes: force DirectInput
1111#define FORCE_DIRECTINPUT   0
1212
13// Needed for RAW Input
14#define _WIN32_WINNT 0x501
15
1613// standard windows headers
1714#define WIN32_LEAN_AND_MEAN
1815#include <windows.h>
src/osd/windows/winwork.c
r2086r2087
88//============================================================
99
1010// standard windows headers
11#define _WIN32_WINNT 0x0400
1211#define WIN32_LEAN_AND_MEAN
1312#include <windows.h>
1413#include <process.h>
src/osd/windows/ledutil.c
r2086r2087
2929//
3030//============================================================
3131
32// Needed for RAW Input
33#define _WIN32_WINNT 0x501
34
3532// standard windows headers
3633#define WIN32_LEAN_AND_MEAN
3734#include <windows.h>
src/osd/windows/winmain.c
r2086r2087
88//============================================================
99
1010// standard windows headers
11#define _WIN32_WINNT 0x0501
1211#define WIN32_LEAN_AND_MEAN
1312#include <windows.h>
1413#include <commctrl.h>
src/osd/windows/winutf8.c
r2086r2087
88//============================================================
99
1010// standard windows headers
11#define _WIN32_WINNT 0x0400
1211#define WIN32_LEAN_AND_MEAN
1312#include <windows.h>
1413#include <shellapi.h>
src/osd/windows/drawdd.c
r2086r2087
77//
88//============================================================
99
10// needed for multimonitor
11#define _WIN32_WINNT 0x501
12
1310// standard windows headers
1411#define WIN32_LEAN_AND_MEAN
1512#include <windows.h>
src/osd/windows/video.c
r2086r2087
77//
88//============================================================
99
10// needed for multimonitor
11#define _WIN32_WINNT 0x501
12
1310// standard windows headers
1411#define WIN32_LEAN_AND_MEAN
1512#include <windows.h>
src/osd/windows/window.c
r2086r2087
1111#define LOG_TEMP_PAUSE      0
1212
1313// Needed for RAW Input
14#define _WIN32_WINNT 0x501
1514#define WM_INPUT 0x00FF
1615
1716// standard windows headers
src/osd/windows/winalloc.c
r2086r2087
77//
88//============================================================
99
10#define _WIN32_WINNT 0x0400
11
1210// standard windows headers
1311#define WIN32_LEAN_AND_MEAN
1412#include <windows.h>
r2086r2087
2826//  CONSTANTS
2927//============================================================
3028
29#define OVERRIDE_STANDARD_CALLS      (0)
30
3131#define PAGE_SIZE      4096
3232#define COOKIE_VAL      0x11335577
3333
r2086r2087
193193//  malloc - override for the malloc() function
194194//============================================================
195195
196#if OVERRIDE_STANDARD_CALLS
196197void *CLIB_DECL malloc(size_t size)
197198{
198199   return malloc_file_line(size, NULL, 0);
199200}
201#endif
200202
201203
202204//============================================================
r2086r2087
221223//  calloc - override for the calloc() function
222224//============================================================
223225
226#if OVERRIDE_STANDARD_CALLS
224227void *CLIB_DECL calloc(size_t size, size_t count)
225228{
226229   return calloc_file_line(size, count, NULL, 0);
227230}
231#endif
228232
229233
230234//============================================================
r2086r2087
232236//  which is called by beginthreadex
233237//============================================================
234238
239#if OVERRIDE_STANDARD_CALLS
235240void *CLIB_DECL _calloc_crt(size_t size, size_t count)
236241{
237242   return calloc_file_line(size, count, NULL, 0);
238243}
244#endif
239245
240246
241247//============================================================
r2086r2087
298304//  realloc - override for the realloc() function
299305//============================================================
300306
307#if OVERRIDE_STANDARD_CALLS
301308void *CLIB_DECL realloc(void *memory, size_t size)
302309{
303310   return realloc_file_line(memory, size, NULL, 0);
304311}
312#endif
305313
306314
307315//============================================================
308//  free - override for the free() function
316//  free_file_line - debugging version of free which
317//  accepts filename and line number
309318//============================================================
310319
311void CLIB_DECL free(void *memory)
320void CLIB_DECL free_file_line(void *memory, const char *file, int line)
312321{
313322   memory_entry *entry;
314323
r2086r2087
347356
348357
349358//============================================================
359//  free - override for the free() function
360//============================================================
361
362#if OVERRIDE_STANDARD_CALLS
363void CLIB_DECL free(void *memory)
364{
365   free_file_line(memory, NULL, 0);
366}
367#endif
368
369
370//============================================================
350371//  _msize - internal MSVC routine that returns the size of
351372//  a memory block
352373//============================================================
353374
375#if OVERRIDE_STANDARD_CALLS
354376size_t CLIB_DECL _msize(void *memory)
355377{
356378   size_t result;
r2086r2087
376398   }
377399   return result;
378400}
401#endif
379402
380403
381404//============================================================
src/osd/windows/winmisc.c
r2086r2087
88//============================================================
99
1010// standard windows headers
11#define _WIN32_WINNT 0x0400
1211#define WIN32_LEAN_AND_MEAN
1312#include <windows.h>
1413#include <tchar.h>
src/osd/windows/main.c
r2086r2087
88//============================================================
99
1010// standard windows headers
11#define _WIN32_WINNT 0x0400
1211#define WIN32_LEAN_AND_MEAN
1312#include <windows.h>
1413#include <tchar.h>
src/osd/windows/winutil.c
r2086r2087
88//============================================================
99
1010// standard windows headers
11#define _WIN32_WINNT 0x0400
1211#define WIN32_LEAN_AND_MEAN
1312#include <windows.h>
1413
src/emu/cpu/ssp1601/ssp1601.c
r2086r2087
317317typedef UINT32 (*read_func_t)(int reg);
318318typedef void (*write_func_t)(int reg, UINT32 d);
319319
320static read_func_t reg_read_handlers[16] =
320static const read_func_t reg_read_handlers[16] =
321321{
322322   read_unknown, read_unknown, read_unknown, read_unknown, // -, X, Y, A
323323   read_unknown,   // 4 ST
r2086r2087
334334   read_AL
335335};
336336
337static write_func_t reg_write_handlers[16] =
337static const write_func_t reg_write_handlers[16] =
338338{
339339   write_unknown, write_unknown, write_unknown, write_unknown, // -, X, Y, A
340340   write_ST,
src/emu/video/cdp1869.c
r2086r2087
44#include "video/cdp1869.h"
55#include "sound/cdp1869.h"
66
7/*
8
9    TODO:
10
11    - convert CDP1869 into a device with video/sound
12    - add predisplay/display timers
13
14*/
15
716typedef struct
817{
918   int ntsc_pal;
r2086r2087
563572      memcpy(cdp1869.cram, memory, intf->charram_size);
564573   }
565574
566   cdp1869.ntsc_pal = intf->ntsc_pal;
575   cdp1869.ntsc_pal = intf->video_format;
567576   cdp1869.cramsize = intf->charram_size;
568577   cdp1869.pramsize = intf->pageram_size;
569578   cdp1869.color_callback = intf->get_color_bits;
src/emu/video/v9938.c
r2086r2087
352352      return vdp->vram[offset];
353353   }
354354
355void v9938_vram_w( UINT8 data )
355static void v9938_vram_w( UINT8 data )
356356   {
357357   int address;
358358
src/emu/video/cdp1869.h
r2086r2087
3434#ifndef __CDP1869_VIDEO__
3535#define __CDP1869_VIDEO__
3636
37enum {
37typedef enum _cdp1869_video_format cdp1869_video_format;
38
39enum _cdp1869_video_format {
3840   CDP1869_NTSC,
3941   CDP1869_PAL
4042};
r2086r2087
99101
100102typedef struct CDP1869_interface
101103{
102   int ntsc_pal;         // display format (NTSC/PAL)
103   int charrom_region;      // memory region to load CHARRAM from
104   UINT16 charram_size;   // CHARRAM size
105   UINT16 pageram_size;   // PAGERAM size
104   cdp1869_video_format video_format;   // display format (NTSC/PAL)
105   int charrom_region;               // memory region to load CHARRAM from
106   UINT16 charram_size;            // CHARRAM size
107   UINT16 pageram_size;            // PAGERAM size
106108   UINT8 (*get_color_bits)(UINT8 cramdata, UINT16 cramaddr, UINT16 pramaddr); // 0x01 = PCB, 0x02 = CCB0, 0x04 = CCB1
107109} CDP1869_interface;
108110
src/emu/video/generic.c
r2086r2087
625625
626626
627627
628/*-------------------------------------------------
629    RRRRR_GGGGG_BBBBB/BBBBB_GGGGG_RRRRR -
630    standard 5-5-5 palette for games using a
631    15-bit color space
632-------------------------------------------------*/
633
634PALETTE_INIT( RRRRR_GGGGG_BBBBB )
635{
636   int i;
637
638   for (i = 0; i < 0x8000; i++)
639      palette_set_color(machine, i, MAKE_RGB(pal5bit(i >> 10), pal5bit(i >> 5), pal5bit(i >> 0)));
640}
641
642
643PALETTE_INIT( BBBBB_GGGGG_RRRRR )
644{
645   int i;
646
647   for (i = 0; i < 0x8000; i++)
648      palette_set_color(machine, i, MAKE_RGB(pal5bit(i >> 0), pal5bit(i >> 5), pal5bit(i >> 10)));
649}
650
651
652
653/*-------------------------------------------------
654    RRRRR_GGGGGG_BBBBB -
655    standard 5-6-5 palette for games using a
656    16-bit color space
657-------------------------------------------------*/
658
659PALETTE_INIT( RRRRR_GGGGGG_BBBBB )
660{
661   int i;
662
663   for (i = 0; i < 0x10000; i++)
664      palette_set_color(machine, i, MAKE_RGB(pal5bit(i >> 11), pal6bit(i >> 5), pal5bit(i >> 0)));
665}
666
667
668
628669/***************************************************************************
629670    3-3-2 RGB PALETTE WRITE HANDLERS
630671***************************************************************************/
src/emu/video/generic.h
r2086r2087
133133
134134PALETTE_INIT( black_and_white );
135135PALETTE_INIT( RRRR_GGGG_BBBB );
136PALETTE_INIT( RRRRR_GGGGG_BBBBB );
137PALETTE_INIT( BBBBB_GGGGG_RRRRR );
138PALETTE_INIT( RRRRR_GGGGGG_BBBBB );
136139
137140
138141
src/emu/uimenu.c
r2086r2087
822822
823823#if HAS_WAVE
824824     /* add tape control menu */
825   if (device_find(Machine->devices, IO_CASSETTE))
825   if (device_find_from_machine(Machine, IO_CASSETTE))
826826      ADD_MENU("Tape Control", menu_tape_control, 1);
827827#endif /* HAS_WAVE */
828828#endif /* MESS */
r2086r2087
12481248   UINT32 selected = 0;
12491249
12501250   /* add the game info */
1251   bufptr += sprintf_game_info(bufptr);
1251   bufptr += sprintf_game_info(Machine, bufptr);
12521252
12531253   /* draw the text */
12541254   ui_menu_draw_text_box(buf);
src/emu/video.c
r2086r2087
288288   /* validate */
289289   assert(machine != NULL);
290290   assert(machine->config != NULL);
291   assert(machine->config->devicelist != NULL);
292291
293292   /* request a callback upon exiting */
294293   add_exit_callback(machine, video_exit);
src/emu/memory.c
r2086r2087
14601460            space->write.handlers[entrynum].handler.generic = get_static_handler(space->dbits, 1, spacenum, entrynum);
14611461         }
14621462
1463         /* make sure we fix up the mask for the unmap handler */
1464         space->read.handlers[STATIC_UNMAP].bytemask = ~0;
1465         space->write.handlers[STATIC_UNMAP].bytemask = ~0;
1466
14631467         /* allocate memory */
14641468         space->read.table = malloc_or_die(1 << LEVEL1_BITS);
14651469         space->write.table = malloc_or_die(1 << LEVEL1_BITS);
src/emu/machine/scsi.c
r2086r2087
77
88void SCSIDeleteInstance( SCSIInstance *instance )
99{
10   instance->scsiClass->dispatch( SCSIOP_DELETE_INSTANCE, instance, 0, NULL );
10   if (instance)
11   {
12      instance->scsiClass->dispatch( SCSIOP_DELETE_INSTANCE, instance, 0, NULL );
13   }
1114}
1215
1316void SCSISetDevice( SCSIInstance *instance, void *device )
1417{
15   instance->scsiClass->dispatch( SCSIOP_SET_DEVICE, instance, 0, device );
18   if (instance)
19   {
20      instance->scsiClass->dispatch( SCSIOP_SET_DEVICE, instance, 0, device );
21   }
1622}
1723
1824void SCSIGetDevice( SCSIInstance *instance, void **device )
1925{
20   instance->scsiClass->dispatch( SCSIOP_GET_DEVICE, instance, 0, device );
26   if (instance)
27   {
28      instance->scsiClass->dispatch( SCSIOP_GET_DEVICE, instance, 0, device );
29   }
2130}
2231
2332void SCSIReset( SCSIInstance *instance )
2433{
25   instance->scsiClass->dispatch( SCSIOP_RESET_DEVICE, instance, 0, NULL );
34   if (instance)
35   {
36      instance->scsiClass->dispatch( SCSIOP_RESET_DEVICE, instance, 0, NULL );
37   }
2638}
2739
2840void SCSIExecCommand( SCSIInstance *instance, int *resultLength )
2941{
30   *resultLength = instance->scsiClass->dispatch( SCSIOP_EXEC_COMMAND, instance, 0, NULL );
42   if (instance)
43   {
44      *resultLength = instance->scsiClass->dispatch( SCSIOP_EXEC_COMMAND, instance, 0, NULL );
45   }
3146}
3247
3348void SCSISetCommand( SCSIInstance *instance, UINT8 *command, int commandLength )
3449{
35   instance->scsiClass->dispatch( SCSIOP_SET_COMMAND, instance, commandLength, command );
50   if (instance)
51   {
52      instance->scsiClass->dispatch( SCSIOP_SET_COMMAND, instance, commandLength, command );
53   }
3654}
3755
3856void SCSIGetCommand( SCSIInstance *instance, UINT8 **command, int *commandLength )
3957{
40   *commandLength = instance->scsiClass->dispatch( SCSIOP_GET_COMMAND, instance, 0, command );
58   if (instance)
59   {
60      *commandLength = instance->scsiClass->dispatch( SCSIOP_GET_COMMAND, instance, 0, command );
61   }
4162}
4263
4364void SCSIWriteData( SCSIInstance *instance, void *data, int dataLength )
4465{
45   instance->scsiClass->dispatch( SCSIOP_WRITE_DATA, instance, dataLength, data );
66   if (instance)
67   {
68      instance->scsiClass->dispatch( SCSIOP_WRITE_DATA, instance, dataLength, data );
69   }
4670}
4771
4872void SCSIReadData( SCSIInstance *instance, void *data, int dataLength )
4973{
50   instance->scsiClass->dispatch( SCSIOP_READ_DATA, instance, dataLength, data );
74   if (instance)
75   {
76      instance->scsiClass->dispatch( SCSIOP_READ_DATA, instance, dataLength, data );
77   }
5178}
5279
5380void SCSISetPhase( SCSIInstance *instance, int phase )
5481{
55   instance->scsiClass->dispatch( SCSIOP_SET_PHASE, instance, phase, NULL );
82   if (instance)
83   {
84      instance->scsiClass->dispatch( SCSIOP_SET_PHASE, instance, phase, NULL );
85   }
5686}
5787
5888void SCSIGetPhase( SCSIInstance *instance, int *phase )
5989{
60   *phase = instance->scsiClass->dispatch( SCSIOP_GET_PHASE, instance, 0, NULL );
90   if (instance)
91   {
92      *phase = instance->scsiClass->dispatch( SCSIOP_GET_PHASE, instance, 0, NULL );
93   }
6194}
6295
6396int SCSIBase( const SCSIClass *scsiClass, int operation, void *file, INT64 intparm, UINT8 *ptrparm )
src/emu/sound/aica.c
r2086r2087
429429#define ADPCMSHIFT   8
430430#define ADFIX(f)   (int) ((float) f*(float) (1<<ADPCMSHIFT))
431431
432const int TableQuant[8]={ADFIX(0.8984375),ADFIX(0.8984375),ADFIX(0.8984375),ADFIX(0.8984375),ADFIX(1.19921875),ADFIX(1.59765625),ADFIX(2.0),ADFIX(2.3984375)};
433const int quant_mul[16]= { 1, 3, 5, 7, 9, 11, 13, 15, -1, -3, -5, -7, -9, -11, -13, -15};
432static const int TableQuant[8]={ADFIX(0.8984375),ADFIX(0.8984375),ADFIX(0.8984375),ADFIX(0.8984375),ADFIX(1.19921875),ADFIX(1.59765625),ADFIX(2.0),ADFIX(2.3984375)};
433static const int quant_mul[16]= { 1, 3, 5, 7, 9, 11, 13, 15, -1, -3, -5, -7, -9, -11, -13, -15};
434434
435435static void InitADPCM(int *PrevSignal, int *PrevQuant)
436436{
src/emu/sound/aica.h
r2086r2087
2020// AICA register access
2121READ16_HANDLER( AICA_0_r );
2222WRITE16_HANDLER( AICA_0_w );
23READ16_HANDLER( AICA_1_r );
24WRITE16_HANDLER( AICA_1_w );
2523
2624// MIDI I/O access
2725WRITE16_HANDLER( AICA_MidiIn );
src/emu/sound/msm5232.c
r2086r2087
712712   stream_sample_t *buf8 = buffer[7];
713713   stream_sample_t *bufsolo1 = buffer[8];
714714   stream_sample_t *bufsolo2 = buffer[9];
715   stream_sample_t *bufnoise = buffer[10];
715716   int i;
716717
717718   for (i=0; i<samples; i++)
r2086r2087
764765            cnt--;
765766         }
766767      }
768
769      bufnoise[i] = (chip->noise_rng & (1<<16)) ? 32767 : 0;
767770   }
768771}
769772
r2086r2087
782785
783786   msm5232_init(chip, intf, clock, rate);
784787
785   chip->stream = stream_create(0,10,rate,chip,MSM5232_update_one);
788   chip->stream = stream_create(0,11,rate,chip,MSM5232_update_one);
786789   return chip;
787790}
788791
src/emu/ui.c
r2086r2087
1919#include "ui.h"
2020#include "uimenu.h"
2121#include "uigfx.h"
22#include "deprecat.h"
2322
2423#ifdef MESS
2524#include "mess.h"
r2086r2087
125124static int rescale_notifier(running_machine *machine, int width, int height);
126125
127126/* text generators */
128static int sprintf_disclaimer(char *buffer);
129static int sprintf_warnings(char *buffer);
127static int sprintf_disclaimer(running_machine *machine, char *buffer);
128static int sprintf_warnings(running_machine *machine, char *buffer);
130129
131130/* UI handlers */
132131static UINT32 handler_messagebox(running_machine *machine, UINT32 state);
r2086r2087
137136static UINT32 handler_load_save(running_machine *machine, UINT32 state);
138137
139138/* slider controls */
140static void slider_init(void);
139static void slider_init(running_machine *machine);
141140static void slider_display(const char *text, int minval, int maxval, int defval, int curval);
142141static void slider_draw_bar(float leftx, float topy, float width, float height, float percentage, float default_percentage);
143142static INT32 slider_volume(running_machine *machine, INT32 newval, char *buffer, int arg);
r2086r2087
324323#endif /* MESS */
325324
326325   /* disable everything if we are using -str */
327   if (!first_time || (str > 0 && str < 60*5) || Machine->gamedrv == &driver_empty)
326   if (!first_time || (str > 0 && str < 60*5) || machine->gamedrv == &driver_empty)
328327      show_gameinfo = show_warnings = show_disclaimer = FALSE;
329328
330329   /* initialize the on-screen display system */
331   slider_init();
330   slider_init(machine);
332331
333332   /* loop over states */
334333   ui_set_handler(handler_ingame, 0);
335   for (state = 0; state < maxstate && !mame_is_scheduled_event_pending(Machine) && !ui_menu_is_force_game_select(); state++)
334   for (state = 0; state < maxstate && !mame_is_scheduled_event_pending(machine) && !ui_menu_is_force_game_select(); state++)
336335   {
337336      /* default to standard colors */
338337      messagebox_backcolor = UI_FILLCOLOR;
r2086r2087
341340      switch (state)
342341      {
343342         case 0:
344            if (show_disclaimer && sprintf_disclaimer(messagebox_text))
343            if (show_disclaimer && sprintf_disclaimer(machine, messagebox_text))
345344               ui_set_handler(handler_messagebox_ok, 0);
346345            break;
347346
348347         case 1:
349            if (show_warnings && sprintf_warnings(messagebox_text))
348            if (show_warnings && sprintf_warnings(machine, messagebox_text))
350349            {
351350               ui_set_handler(handler_messagebox_ok, 0);
352               if (Machine->gamedrv->flags & (GAME_NOT_WORKING | GAME_UNEMULATED_PROTECTION))
351               if (machine->gamedrv->flags & (GAME_NOT_WORKING | GAME_UNEMULATED_PROTECTION))
353352                  messagebox_backcolor = UI_REDCOLOR;
354353            }
355354            break;
356355
357356         case 2:
358            if (show_gameinfo && sprintf_game_info(messagebox_text))
357            if (show_gameinfo && sprintf_game_info(machine, messagebox_text))
359358               ui_set_handler(handler_messagebox_anykey, 0);
360359            break;
361360#ifdef MESS
r2086r2087
369368      while (input_code_poll_switches(FALSE) != INPUT_CODE_INVALID) ;
370369
371370      /* loop while we have a handler */
372      while (ui_handler_callback != handler_ingame && !mame_is_scheduled_event_pending(Machine) && !ui_menu_is_force_game_select())
371      while (ui_handler_callback != handler_ingame && !mame_is_scheduled_event_pending(machine) && !ui_menu_is_force_game_select())
373372         video_frame_update(machine, FALSE);
374373
375374      /* clear the handler and force an update */
r2086r2087
419418   render_container_empty(render_container_get_ui());
420419
421420   /* if we're paused, dim the whole screen */
422   if (mame_get_phase(Machine) >= MAME_PHASE_RESET && (single_step || mame_is_paused(Machine)))
421   if (mame_get_phase(machine) >= MAME_PHASE_RESET && (single_step || mame_is_paused(machine)))
423422   {
424423      int alpha = (1.0f - options_get_float(mame_options(), OPTION_PAUSE_BRIGHTNESS)) * 255.0f;
425424      if (ui_menu_is_force_game_select())
r2086r2087
939938    text to the given buffer
940939-------------------------------------------------*/
941940
942static int sprintf_disclaimer(char *buffer)
941static int sprintf_disclaimer(running_machine *machine, char *buffer)
943942{
944943   char *bufptr = buffer;
945944   bufptr += sprintf(bufptr, "Usage of emulators in conjunction with ROMs you don't own is forbidden by copyright law.\n\n");
946   bufptr += sprintf(bufptr, "IF YOU ARE NOT LEGALLY ENTITLED TO PLAY \"%s\" ON THIS EMULATOR, PRESS ESC.\n\n", Machine->gamedrv->description);
945   bufptr += sprintf(bufptr, "IF YOU ARE NOT LEGALLY ENTITLED TO PLAY \"%s\" ON THIS EMULATOR, PRESS ESC.\n\n", machine->gamedrv->description);
947946   bufptr += sprintf(bufptr, "Otherwise, type OK or move the joystick left then right to continue");
948947   return bufptr - buffer;
949948}
r2086r2087
954953    text to the given buffer
955954-------------------------------------------------*/
956955
957static int sprintf_warnings(char *buffer)
956static int sprintf_warnings(running_machine *machine, char *buffer)
958957{
959958#define WARNING_FLAGS (   GAME_NOT_WORKING | \
960959                  GAME_UNEMULATED_PROTECTION | \
r2086r2087
968967   int i;
969968
970969   /* if no warnings, nothing to return */
971   if (rom_load_warnings() == 0 && !(Machine->gamedrv->flags & WARNING_FLAGS))
970   if (rom_load_warnings() == 0 && !(machine->gamedrv->flags & WARNING_FLAGS))
972971      return 0;
973972
974973   /* add a warning if any ROMs were loaded with warnings */
975974   if (rom_load_warnings() > 0)
976975   {
977976      bufptr += sprintf(bufptr, "One or more ROMs/CHDs for this game are incorrect. The " GAMENOUN " may not run correctly.\n");
978      if (Machine->gamedrv->flags & WARNING_FLAGS)
977      if (machine->gamedrv->flags & WARNING_FLAGS)
979978         *bufptr++ = '\n';
980979   }
981980
982981   /* if we have at least one warning flag, print the general header */
983   if (Machine->gamedrv->flags & WARNING_FLAGS)
982   if (machine->gamedrv->flags & WARNING_FLAGS)
984983   {
985984      bufptr += sprintf(bufptr, "There are known problems with this " GAMENOUN "\n\n");
986985
987986      /* add one line per warning flag */
988987#ifdef MESS
989      if (Machine->gamedrv->flags & GAME_COMPUTER)
988      if (machine->gamedrv->flags & GAME_COMPUTER)
990989         bufptr += sprintf(bufptr, "%s\n\n%s\n", "The emulated system is a computer: ", "The keyboard emulation may not be 100% accurate.");
991990#endif
992      if (Machine->gamedrv->flags & GAME_IMPERFECT_COLORS)
991      if (machine->gamedrv->flags & GAME_IMPERFECT_COLORS)
993992         bufptr += sprintf(bufptr, "The colors aren't 100%% accurate.\n");
994      if (Machine->gamedrv->flags & GAME_WRONG_COLORS)
993      if (machine->gamedrv->flags & GAME_WRONG_COLORS)
995994         bufptr += sprintf(bufptr, "The colors are completely wrong.\n");
996      if (Machine->gamedrv->flags & GAME_IMPERFECT_GRAPHICS)
995      if (machine->gamedrv->flags & GAME_IMPERFECT_GRAPHICS)
997996         bufptr += sprintf(bufptr, "The video emulation isn't 100%% accurate.\n");
998      if (Machine->gamedrv->flags & GAME_IMPERFECT_SOUND)
997      if (machine->gamedrv->flags & GAME_IMPERFECT_SOUND)
999998         bufptr += sprintf(bufptr, "The sound emulation isn't 100%% accurate.\n");
1000      if (Machine->gamedrv->flags & GAME_NO_SOUND)
999      if (machine->gamedrv->flags & GAME_NO_SOUND)
10011000         bufptr += sprintf(bufptr, "The game lacks sound.\n");
1002      if (Machine->gamedrv->flags & GAME_NO_COCKTAIL)
1001      if (machine->gamedrv->flags & GAME_NO_COCKTAIL)
10031002         bufptr += sprintf(bufptr, "Screen flipping in cocktail mode is not supported.\n");
10041003
10051004      /* if there's a NOT WORKING or UNEMULATED PROTECTION warning, make it stronger */
1006      if (Machine->gamedrv->flags & (GAME_NOT_WORKING | GAME_UNEMULATED_PROTECTION))
1005      if (machine->gamedrv->flags & (GAME_NOT_WORKING | GAME_UNEMULATED_PROTECTION))
10071006      {
10081007         const game_driver *maindrv;
10091008         const game_driver *clone_of;
10101009         int foundworking;
10111010
10121011         /* add the strings for these warnings */
1013         if (Machine->gamedrv->flags & GAME_NOT_WORKING)
1012         if (machine->gamedrv->flags & GAME_NOT_WORKING)
10141013            bufptr += sprintf(bufptr, "THIS " CAPGAMENOUN " DOESN'T WORK. You won't be able to make it work correctly.  Don't bother.\n");
1015         if (Machine->gamedrv->flags & GAME_UNEMULATED_PROTECTION)
1014         if (machine->gamedrv->flags & GAME_UNEMULATED_PROTECTION)
10161015            bufptr += sprintf(bufptr, "The game has protection which isn't fully emulated.\n");
10171016
10181017         /* find the parent of this driver */
1019         clone_of = driver_get_clone(Machine->gamedrv);
1018         clone_of = driver_get_clone(machine->gamedrv);
10201019         if (clone_of != NULL && !(clone_of->flags & GAME_IS_BIOS_ROOT))
10211020             maindrv = clone_of;
10221021         else
1023            maindrv = Machine->gamedrv;
1022            maindrv = machine->gamedrv;
10241023
10251024         /* scan the driver list for any working clones and add them */
10261025         foundworking = 0;
r2086r2087
10481047    to the given buffer
10491048-------------------------------------------------*/
10501049
1051int sprintf_game_info(char *buffer)
1050int sprintf_game_info(running_machine *machine, char *buffer)
10521051{
1053   int scrcount = video_screen_count(Machine->config);
1052   int scrcount = video_screen_count(machine->config);
10541053   char *bufptr = buffer;
10551054   int cpunum, sndnum;
10561055   int count;
10571056
10581057   /* print description, manufacturer, and CPU: */
1059   bufptr += sprintf(bufptr, "%s\n%s %s\n\nCPU:\n", Machine->gamedrv->description, Machine->gamedrv->year, Machine->gamedrv->manufacturer);
1058   bufptr += sprintf(bufptr, "%s\n%s %s\n\nCPU:\n", machine->gamedrv->description, machine->gamedrv->year, machine->gamedrv->manufacturer);
10601059
10611060   /* loop over all CPUs */
1062   for (cpunum = 0; cpunum < MAX_CPU && Machine->config->cpu[cpunum].type != CPU_DUMMY; cpunum += count)
1061   for (cpunum = 0; cpunum < MAX_CPU && machine->config->cpu[cpunum].type != CPU_DUMMY; cpunum += count)
10631062   {
1064      cpu_type type = Machine->config->cpu[cpunum].type;
1065      int clock = Machine->config->cpu[cpunum].clock;
1063      cpu_type type = machine->config->cpu[cpunum].type;
1064      int clock = machine->config->cpu[cpunum].clock;
10661065
10671066      /* count how many identical CPUs we have */
10681067      for (count = 1; cpunum + count < MAX_CPU; count++)
1069         if (Machine->config->cpu[cpunum + count].type != type ||
1070              Machine->config->cpu[cpunum + count].clock != clock)
1068         if (machine->config->cpu[cpunum + count].type != type ||
1069              machine->config->cpu[cpunum + count].clock != clock)
10711070             break;
10721071
10731072      /* if more than one, prepend a #x in front of the CPU name */
r2086r2087
10831082   }
10841083
10851084   /* loop over all sound chips */
1086   for (sndnum = 0; sndnum < MAX_SOUND && Machine->config->sound[sndnum].type != SOUND_DUMMY; sndnum += count)
1085   for (sndnum = 0; sndnum < MAX_SOUND && machine->config->sound[sndnum].type != SOUND_DUMMY; sndnum += count)
10871086   {
1088      sound_type type = Machine->config->sound[sndnum].type;
1087      sound_type type = machine->config->sound[sndnum].type;
10891088      int clock = sndnum_clock(sndnum);
10901089
10911090      /* append the Sound: string */
r2086r2087
10941093
10951094      /* count how many identical sound chips we have */
10961095      for (count = 1; sndnum + count < MAX_SOUND; count++)
1097         if (Machine->config->sound[sndnum + count].type != type ||
1096         if (machine->config->sound[sndnum + count].type != type ||
10981097              sndnum_clock(sndnum + count) != clock)
10991098             break;
11001099
r2086r2087
11201119   {
11211120      const device_config *screen;
11221121
1123      for (screen = video_screen_first(Machine->config); screen != NULL; screen = video_screen_next(screen))
1122      for (screen = video_screen_first(machine->config); screen != NULL; screen = video_screen_next(screen))
11241123      {
11251124         const screen_config *scrconfig = screen->inline_config;
11261125
r2086r2087
11361135            bufptr += sprintf(bufptr, "%d " UTF8_MULTIPLY " %d (%s) %f" UTF8_NBSP "Hz\n",
11371136                  visarea->max_x - visarea->min_x + 1,
11381137                  visarea->max_y - visarea->min_y + 1,
1139                  (Machine->gamedrv->flags & ORIENTATION_SWAP_XY) ? "V" : "H",
1138                  (machine->gamedrv->flags & ORIENTATION_SWAP_XY) ? "V" : "H",
11401139                  ATTOSECONDS_TO_HZ(video_screen_get_frame_period(screen).attoseconds));
11411140         }
11421141      }
r2086r2087
11841183   /* if the user cancels, exit out completely */
11851184   else if (input_ui_pressed(IPT_UI_CANCEL))
11861185   {
1187      mame_schedule_exit(Machine);
1186      mame_schedule_exit(machine);
11881187      state = UI_HANDLER_CANCEL;
11891188   }
11901189
r2086r2087
12061205   /* if the user cancels, exit out completely */
12071206   if (input_ui_pressed(IPT_UI_CANCEL))
12081207   {
1209      mame_schedule_exit(Machine);
1208      mame_schedule_exit(machine);
12101209      state = UI_HANDLER_CANCEL;
12111210   }
12121211
r2086r2087
12251224
12261225static UINT32 handler_ingame(running_machine *machine, UINT32 state)
12271226{
1228   int is_paused = mame_is_paused(Machine);
1227   int is_paused = mame_is_paused(machine);
12291228
12301229   /* first draw the FPS counter */
12311230   if (showfps || osd_ticks() < showfps_end)
r2086r2087
12531252   /* if we're single-stepping, pause now */
12541253   if (single_step)
12551254   {
1256      mame_pause(Machine, TRUE);
1255      mame_pause(machine, TRUE);
12571256      single_step = FALSE;
12581257   }
12591258
r2086r2087
12641263
12651264   /* if the user pressed ESC, stop the emulation */
12661265   if (input_ui_pressed(IPT_UI_CANCEL))
1267      mame_schedule_exit(Machine);
1266      mame_schedule_exit(machine);
12681267
12691268   /* turn on menus if requested */
12701269   if (input_ui_pressed(IPT_UI_CONFIGURE))
12711270      return ui_set_handler(ui_menu_ui_handler, 0);
12721271
12731272   /* if the on-screen display isn't up and the user has toggled it, turn it on */
1274   if (!Machine->debug_mode && input_ui_pressed(IPT_UI_ON_SCREEN_DISPLAY))
1273   if (!machine->debug_mode && input_ui_pressed(IPT_UI_ON_SCREEN_DISPLAY))
12751274      return ui_set_handler(handler_slider, 0);
12761275
12771276   /* handle a reset request */
12781277   if (input_ui_pressed(IPT_UI_RESET_MACHINE))
1279      mame_schedule_hard_reset(Machine);
1278      mame_schedule_hard_reset(machine);
12801279   if (input_ui_pressed(IPT_UI_SOFT_RESET))
1281      mame_schedule_soft_reset(Machine);
1280      mame_schedule_soft_reset(machine);
12821281
12831282   /* handle a request to display graphics/palette */
12841283   if (input_ui_pressed(IPT_UI_SHOW_GFX))
12851284   {
12861285      if (!is_paused)
1287         mame_pause(Machine, TRUE);
1286         mame_pause(machine, TRUE);
12881287      return ui_set_handler(ui_gfx_ui_handler, is_paused);
12891288   }
12901289
12911290   /* handle a save state request */
12921291   if (input_ui_pressed(IPT_UI_SAVE_STATE))
12931292   {
1294      mame_pause(Machine, TRUE);
1293      mame_pause(machine, TRUE);
12951294      return ui_set_handler(handler_load_save, LOADSAVE_SAVE);
12961295   }
12971296
12981297   /* handle a load state request */
12991298   if (input_ui_pressed(IPT_UI_LOAD_STATE))
13001299   {
1301      mame_pause(Machine, TRUE);
1300      mame_pause(machine, TRUE);
13021301      return ui_set_handler(handler_load_save, LOADSAVE_LOAD);
13031302   }
13041303
13051304   /* handle a save snapshot request */
13061305   if (input_ui_pressed(IPT_UI_SNAPSHOT))
1307      video_save_active_screen_snapshots(Machine);
1306      video_save_active_screen_snapshots(machine);
13081307
13091308   /* toggle pause */
13101309   if (input_ui_pressed(IPT_UI_PAUSE))
r2086r2087
13131312      if (is_paused && (input_code_pressed(KEYCODE_LSHIFT) || input_code_pressed(KEYCODE_RSHIFT)))
13141313      {
13151314         single_step = TRUE;
1316         mame_pause(Machine, FALSE);
1315         mame_pause(machine, FALSE);
13171316      }
13181317      else
1319         mame_pause(Machine, !mame_is_paused(Machine));
1318         mame_pause(machine, !mame_is_paused(machine));
13201319   }
13211320
13221321   /* toggle movie recording */
13231322   if (input_ui_pressed(IPT_UI_RECORD_MOVIE))
13241323   {
1325      if (!video_is_movie_active(Machine->primary_screen))
1324      if (!video_is_movie_active(machine->primary_screen))
13261325      {
1327         video_movie_begin_recording(Machine->primary_screen, NULL);
1326         video_movie_begin_recording(machine->primary_screen, NULL);
13281327         popmessage("REC START");
13291328      }
13301329      else
13311330      {
1332         video_movie_end_recording(Machine->primary_screen);
1331         video_movie_end_recording(machine->primary_screen);
13331332         popmessage("REC STOP");
13341333      }
13351334   }
r2086r2087
14851484         popmessage("Load cancelled");
14861485
14871486      /* reset the state */
1488      mame_pause(Machine, FALSE);
1487      mame_pause(machine, FALSE);
14891488      return UI_HANDLER_CANCEL;
14901489   }
14911490
r2086r2087
15091508   if (state == LOADSAVE_SAVE)
15101509   {
15111510      popmessage("Save to position %c", file);
1512      mame_schedule_save(Machine, filename);
1511      mame_schedule_save(machine, filename);
15131512   }
15141513   else
15151514   {
15161515      popmessage("Load from position %c", file);
1517      mame_schedule_load(Machine, filename);
1516      mame_schedule_load(machine, filename);
15181517   }
15191518
15201519   /* remove the pause and reset the state */
1521   mame_pause(Machine, FALSE);
1520   mame_pause(machine, FALSE);
15221521   return UI_HANDLER_CANCEL;
15231522}
15241523
r2086r2087
15331532    controls
15341533-------------------------------------------------*/
15351534
1536static void slider_init(void)
1535static void slider_init(running_machine *machine)
15371536{
1538   int numscreens = video_screen_count(Machine->config);
1537   int numscreens = video_screen_count(machine->config);
15391538   const device_config *device;
15401539   int numitems, item;
15411540   input_port_entry *in;
r2086r2087
15511550      slider_config(&slider_list[slider_count++], 0, sound_get_default_gain(item) * 1000.0f + 0.5f, 2000, 20, slider_mixervol, item);
15521551
15531552   /* add analog adjusters */
1554   for (in = Machine->input_ports; in && in->type != IPT_END; in++)
1553   for (in = machine->input_ports; in && in->type != IPT_END; in++)
15551554      if ((in->type & 0xff) == IPT_ADJUSTER)
1556         slider_config(&slider_list[slider_count++], 0, in->default_value >> 8, 100, 1, slider_adjuster, in - Machine->input_ports);
1555         slider_config(&slider_list[slider_count++], 0, in->default_value >> 8, 100, 1, slider_adjuster, in - machine->input_ports);
15571556
15581557   if (options_get_bool(mame_options(), OPTION_CHEAT))
15591558   {
r2086r2087
15681567
15691568   for (item = 0; item < numscreens; item++)
15701569   {
1571      const screen_config *scrconfig = device_list_find_by_index(Machine->config->devicelist, VIDEO_SCREEN, item)->inline_config;
1570      const screen_config *scrconfig = device_list_find_by_index(machine->config->devicelist, VIDEO_SCREEN, item)->inline_config;
15721571      int defxscale = floor(scrconfig->xscale * 1000.0f + 0.5f);
15731572      int defyscale = floor(scrconfig->yscale * 1000.0f + 0.5f);
15741573      int defxoffset = floor(scrconfig->xoffset * 1000.0f + 0.5f);
r2086r2087
15861585      slider_config(&slider_list[slider_count++], -500, defyoffset, 500, 2, slider_yoffset, item);
15871586   }
15881587
1589   for (device = video_screen_first(Machine->config); device != NULL; device = video_screen_next(device))
1588   for (device = video_screen_first(machine->config); device != NULL; device = video_screen_next(device))
15901589   {
15911590      const screen_config *scrconfig = device->inline_config;
15921591      if (scrconfig->type == SCREEN_TYPE_VECTOR)
r2086r2087
16001599
16011600#ifdef MAME_DEBUG
16021601   /* add crosshair adjusters */
1603   for (in = Machine->input_ports; in && in->type != IPT_END; in++)
1602   for (in = machine->input_ports; in && in->type != IPT_END; in++)
16041603      if (in->analog.crossaxis != CROSSHAIR_AXIS_NONE && in->player == 0)
16051604      {
16061605         slider_config(&slider_list[slider_count++], -3000, 1000, 3000, 100, slider_crossscale, in->analog.crossaxis);
r2086r2087
17141713
17151714static INT32 slider_adjuster(running_machine *machine, INT32 newval, char *buffer, int arg)
17161715{
1717   input_port_entry *in = &Machine->input_ports[arg];
1716   input_port_entry *in = &machine->input_ports[arg];
17181717   if (buffer != NULL)
17191718   {
17201719      in->default_value = (in->default_value & ~0xff) | (newval & 0xff);
r2086r2087
17461745
17471746static INT32 slider_refresh(running_machine *machine, INT32 newval, char *buffer, int arg)
17481747{
1749   const screen_config *scrconfig = device_list_find_by_index(Machine->config->devicelist, VIDEO_SCREEN, arg)->inline_config;
1748   const screen_config *scrconfig = device_list_find_by_index(machine->config->devicelist, VIDEO_SCREEN, arg)->inline_config;
17501749   double defrefresh = ATTOSECONDS_TO_HZ(scrconfig->refresh);
17511750   double refresh;
17521751
r2086r2087
19531952
19541953   if (buffer != NULL)
19551954   {
1956      for (in = Machine->input_ports; in && in->type != IPT_END; in++)
1955      for (in = machine->input_ports; in && in->type != IPT_END; in++)
19571956         if (in->analog.crossaxis == arg)
19581957         {
19591958            in->analog.crossscale = (float)newval * 0.001f;
r2086r2087
19611960         }
19621961      sprintf(buffer, "%s %s %1.3f", "Crosshair Scale", (in->analog.crossaxis == CROSSHAIR_AXIS_X) ? "X" : "Y", (float)newval * 0.001f);
19631962   }
1964   for (in = Machine->input_ports; in && in->type != IPT_END; in++)
1963   for (in = machine->input_ports; in && in->type != IPT_END; in++)
19651964      if (in->analog.crossaxis == arg)
19661965         return floor(in->analog.crossscale * 1000.0f + 0.5f);
19671966   return 0;
r2086r2087
19811980
19821981   if (buffer != NULL)
19831982   {
1984      for (in = Machine->input_ports; in && in->type != IPT_END; in++)
1983      for (in = machine->input_ports; in && in->type != IPT_END; in++)
19851984         if (in->analog.crossaxis == arg)
19861985         {
19871986            in->analog.crossoffset = (float)newval * 0.001f;
r2086r2087
19891988         }
19901989      sprintf(buffer, "%s %s %1.3f", "Crosshair Offset", (in->analog.crossaxis == CROSSHAIR_AXIS_X) ? "X" : "Y", (float)newval * 0.001f);
19911990   }
1992   for (in = Machine->input_ports; in && in->type != IPT_END; in++)
1991   for (in = machine->input_ports; in && in->type != IPT_END; in++)
19931992      if (in->analog.crossaxis == arg)
19941993         return floor(in->analog.crossoffset * 1000.0f + 0.5f);
19951994   return 0;
src/emu/ui.h
r2086r2087
136136int ui_is_slider_active(void);
137137
138138/* print the game info string into a buffer */
139int sprintf_game_info(char *buffer);
139int sprintf_game_info(running_machine *machine, char *buffer);
140140
141141#endif   /* __USRINTRF_H__ */
src/emu/drawgfx.c
r2086r2087
506506
507507#define RAW 0
508508#define COLOR_ARG int colorbase,const pen_t *paldata,UINT8 *pridata,UINT32 pmask
509#define LOOKUP(n) (colorbase + (n))
509#define LOOKUP(n) (paldata[n])
510//#define LOOKUP(n) (colorbase + (n))
510511#define SETPIXELCOLOR(dest,n) { if (((1 << (pridata[dest] & 0x1f)) & pmask) == 0) { if (pridata[dest] & 0x80) { dstdata[dest] = palette_shadow_table[n];} else { dstdata[dest] = (n);} } pridata[dest] = (pridata[dest] & 0x7f) | afterdrawmask; }
511512#define DECLARE_SWAP_RAW_PRI(function,args,body) static void function##_pri16 args body
512513#include "drawgfx.c"
r2086r2087
532533
533534#define RAW 0
534535#define COLOR_ARG int colorbase, const pen_t *paldata
535#define LOOKUP(n) (colorbase + (n))
536#define LOOKUP(n) (paldata[n])
537//#define LOOKUP(n) (colorbase + (n))
536538#define SETPIXELCOLOR(dest,n) {dstdata[dest] = (n);}
537539#define DECLARE_SWAP_RAW_PRI(function,args,body) static void function##16 args body
538540#include "drawgfx.c"
r2086r2087
613615#undef RAW
614616
615617#define RAW 0
616#define COLOR_ARG int colorbase, const pen_t *paldata,UINT8 *pridata,UINT32 pmask
618#define COLOR_ARG int colorbase,const pen_t *paldata,UINT8 *pridata,UINT32 pmask
617619#define LOOKUP(n) (paldata[n])
620//#define LOOKUP(n) (colorbase + (n))
618621#define SETPIXELCOLOR(dest,n) { UINT8 r8=pridata[dest]; if(!(1<<(r8&0x1f)&pmask)){ if(afterdrawmask){ r8&=0x7f; r8|=0x1f; dstdata[dest]=(n); pridata[dest]=r8; } else if(!(r8&0x80)){ dstdata[dest]=SHADOW32(palette_shadow_table,n); pridata[dest]|=0x80; } } }
619622#define DECLARE_SWAP_RAW_PRI(function,args,body) static void function##_pri32 args body
620623#include "drawgfx.c"
r2086r2087
641644#define RAW 0
642645#define COLOR_ARG int colorbase, const pen_t *paldata
643646#define LOOKUP(n) (paldata[n])
647//#define LOOKUP(n) (colorbase + (n))
644648#define SETPIXELCOLOR(dest,n) {dstdata[dest] = (n);}
645649#define DECLARE_SWAP_RAW_PRI(function,args,body) static void function##32 args body
646650#include "drawgfx.c"
r2086r2087
11791183   if (dest_bmp->bpp == 16)
11801184   {
11811185      int colorbase = gfx->color_base + gfx->color_granularity * (color % gfx->total_colors);
1186      const pen_t *pal = &Machine->pens[colorbase];
11821187      UINT8 *source_base = gfx->gfxdata + (code % gfx->total_elements) * gfx->char_modulo;
11831188
11841189      int sprite_screen_height = (scaley*gfx->height+0x8000)>>16;
r2086r2087
12611266                        for (x = sx; x < ex; x++)
12621267                        {
12631268                           if (((1 << pri[x]) & pri_mask) == 0)
1264                              dest[x] = colorbase + ((source[x_index>>17] >> ((x_index & 0x10000) >> 14)) & 0x0f);
1269                              dest[x] = pal[(source[x_index>>17] >> ((x_index & 0x10000) >> 14)) & 0x0f];
1270//                                      dest[x] = colorbase + ((source[x_index>>17] >> ((x_index & 0x10000) >> 14)) & 0x0f);
12651271                           pri[x] = 31;
12661272                           x_index += dx;
12671273                        }
r2086r2087
12791285                        for (x = sx; x < ex; x++)
12801286                        {
12811287                           if (((1 << pri[x]) & pri_mask) == 0)
1282                              dest[x] = colorbase + source[x_index>>16];
1288                              dest[x] = pal[source[x_index>>16]];
1289//                                      dest[x] = colorbase + source[x_index>>16];
12831290                           pri[x] = 31;
12841291                           x_index += dx;
12851292                        }
r2086r2087
12981305                        int x, x_index = x_index_base;
12991306                        for (x = sx; x < ex; x++)
13001307                        {
1301                           dest[x] = colorbase + ((source[x_index>>17] >> ((x_index & 0x10000) >> 14)) & 0x0f);
1308                           dest[x] = pal[(source[x_index>>17] >> ((x_index & 0x10000) >> 14)) & 0x0f];
1309//                                  dest[x] = colorbase + ((source[x_index>>17] >> ((x_index & 0x10000) >> 14)) & 0x0f);
13021310                           x_index += dx;
13031311                        }
13041312
r2086r2087
13131321                        int x, x_index = x_index_base;
13141322                        for (x = sx; x < ex; x++)
13151323                        {
1316                           dest[x] = colorbase + source[x_index>>16];
1324                           dest[x] = pal[source[x_index>>16]];
1325//                                  dest[x] = colorbase + source[x_index>>16];
13171326                           x_index += dx;
13181327                        }
13191328
r2086r2087
13411350                           if (c != transparent_color)
13421351                           {
13431352                              if (((1 << pri[x]) & pri_mask) == 0)
1344                                 dest[x] = colorbase + c;
1353                                 dest[x] = pal[c];
1354//                                          dest[x] = colorbase + c;
13451355                              pri[x] = 31;
13461356                           }
13471357                           x_index += dx;
r2086r2087
13631373                           if (c != transparent_color)
13641374                           {
13651375                              if (((1 << pri[x]) & pri_mask) == 0)
1366                                 dest[x] = colorbase + c;
1376                                 dest[x] = pal[c];
1377//                                          dest[x] = colorbase + c;
13671378                              pri[x] = 31;
13681379                           }
13691380                           x_index += dx;
r2086r2087
13841395                        for (x = sx; x < ex; x++)
13851396                        {
13861397                           int c = (source[x_index>>17] >> ((x_index & 0x10000) >> 14)) & 0x0f;
1387                           if (c != transparent_color) dest[x] = colorbase + c;
1398                           if( c != transparent_color ) dest[x] = pal[c];
1399//                                  if (c != transparent_color) dest[x] = colorbase + c;
13881400                           x_index += dx;
13891401                        }
13901402
r2086r2087
14001412                        for (x = sx; x < ex; x++)
14011413                        {
14021414                           int c = source[x_index>>16];
1403                           if (c != transparent_color) dest[x] = colorbase + c;
1415                           if( c != transparent_color ) dest[x] = pal[c];
1416//                                  if (c != transparent_color) dest[x] = colorbase + c;
14041417                           x_index += dx;
14051418                        }
14061419
r2086r2087
14691482                        if (((1 << c) & transparent_color) == 0)
14701483                        {
14711484                           if (((1 << pri[x]) & pri_mask) == 0)
1472                              dest[x] = colorbase + c;
1485                              dest[x] = pal[c];
1486//                                      dest[x] = colorbase + c;
14731487                           pri[x] = 31;
14741488                        }
14751489                        x_index += dx;
r2086r2087
14881502                     {
14891503                        int c = source[x_index>>16];
14901504                        if (((1 << c) & transparent_color) == 0)
1491                           dest[x] = colorbase + c;
1505                           dest[x] = pal[c];
1506//                                  dest[x] = colorbase + c;
14921507                        x_index += dx;
14931508                     }
14941509
r2086r2087
15251540                              if (((1 << (ah & 0x1f)) & pri_mask) == 0)
15261541                              {
15271542                                 if (ah & 0x80)
1528                                    dest[x] = palette_shadow_table[colorbase + c];
1543                                    dest[x] = palette_shadow_table[pal[c]];
1544//                                              dest[x] = palette_shadow_table[colorbase + c];
15291545                                 else
1530                                    dest[x] = colorbase + c;
1546                                    dest[x] = pal[c];
1547//                                              dest[x] = colorbase + c;
15311548                              }
15321549                              pri[x] = (ah & 0x7f) | 31;
15331550                              break;
r2086r2087
15601577                           switch(gfx_drawmode_table[c])
15611578                           {
15621579                           case DRAWMODE_SOURCE:
1563                              dest[x] = colorbase + c;
1580                              dest[x] = pal[c];
1581//                                      dest[x] = colorbase + c;
15641582                              break;
15651583                           case DRAWMODE_SHADOW:
15661584                              dest[x] = palette_shadow_table[dest[x]];
r2086r2087
15921610                        if (c != transparent_color)
15931611                        {
15941612                           if (((1 << pri[x]) & pri_mask) == 0)
1595                              dest[x] = alpha_blend16(dest[x], colorbase + c);
1613                              dest[x] = alpha_blend16(dest[x], pal[c]);
1614//                                      dest[x] = alpha_blend16(dest[x], colorbase + c);
15961615                           pri[x] = 31;
15971616                        }
15981617                        x_index += dx;
r2086r2087
16101629                     for (x = sx; x < ex; x++)
16111630                     {
16121631                        int c = source[x_index>>16];
1613                        if (c != transparent_color) dest[x] = alpha_blend16(dest[x], colorbase + c);
1632                        if( c != transparent_color ) dest[x] = alpha_blend16(dest[x], pal[c]);
1633//                              if (c != transparent_color) dest[x] = alpha_blend16(dest[x], colorbase + c);
16141634                        x_index += dx;
16151635                     }
16161636
r2086r2087
16371657                           if (((1 << pri[x]) & pri_mask) == 0)
16381658                           {
16391659                              if (gfx_alpharange_table[c] == 0xff)
1640                                 dest[x] = colorbase + c;
1660                                 dest[x] = pal[c];
1661//                                          dest[x] = colorbase + c;
16411662                              else
1642                                 dest[x] = alpha_blend_r16(dest[x], colorbase + c, gfx_alpharange_table[c]);
1663                                 dest[x] = alpha_blend_r16(dest[x], pal[c], gfx_alpharange_table[c]);
1664//                                          dest[x] = alpha_blend_r16(dest[x], colorbase + c, gfx_alpharange_table[c]);
16431665                           }
16441666                           pri[x] = 31;
16451667                        }
r2086r2087
16611683                        if (c != transparent_color)
16621684                        {
16631685                           if (gfx_alpharange_table[c] == 0xff)
1664                              dest[x] = colorbase + c;
1686                              dest[x] = pal[c];
1687//                                      dest[x] = colorbase + c;
16651688                           else
1666                              dest[x] = alpha_blend_r16(dest[x], colorbase + c, gfx_alpharange_table[c]);
1689                              dest[x] = alpha_blend_r16(dest[x], pal[c], gfx_alpharange_table[c]);
1690//                                      dest[x] = alpha_blend_r16(dest[x], colorbase + c, gfx_alpharange_table[c]);
16671691                        }
16681692                        x_index += dx;
16691693                     }
src/emu/mconfig.c
r2086r2087
209209   {
210210      device_type devtype;
211211      const char *tag;
212      int size, offset, type, bits;
212      int size, offset, type, bits, in, out;
213213      UINT32 data32, clock, gain;
214214      UINT64 data64;
215215
r2086r2087
516516
517517         case MCONFIG_TOKEN_SOUND_ROUTE:
518518            assert(sound != NULL);
519            in = sound->route[sound->routes].input;
520            out = sound->route[sound->routes].output;
519521            TOKEN_UNGET_UINT32(tokens);
520            TOKEN_GET_UINT64_UNPACK4(tokens, entrytype, 8, sound->route[sound->routes].output, -12, sound->route[sound->routes].input, -12, gain, 32);
522            TOKEN_GET_UINT64_UNPACK4(tokens, entrytype, 8, out, -12, in, -12, gain, 32);
521523            sound->route[sound->routes].gain = (float)gain / 16777216.0f;
522524            sound->route[sound->routes].target = TOKEN_GET_STRING(tokens);
523525            sound->routes++;
src/emu/validity.c
r2086r2087
10161016   const char *flipscreen = input_port_string_from_index(INPUT_STRING_Flip_Screen);
10171017   const input_port_entry *inp, *last_dipname_entry = NULL;
10181018   const game_driver *driver = drivers[drivnum];
1019   const char *tag[MAX_INPUT_PORTS] = { 0 };
1020   int portnum = 0;
10191021   int empty_string_found = FALSE;
10201022   int last_strindex = 0;
10211023   quark_entry *entry;
r2086r2087
10441046   {
10451047      int strindex = 0;
10461048
1049      /* check for duplicate tags */
1050      if (inp->type == IPT_PORT)
1051      {
1052         if (inp->start.tag != NULL && portnum < ARRAY_LENGTH(tag))
1053         {
1054            int scanport;
1055
1056            for (scanport = 0; scanport < portnum - 1; scanport++)
1057               if (strcmp(inp->start.tag, tag[scanport]) == 0)
1058               {
1059                  mame_printf_error("%s: %s has a duplicate input port tag \"%s\"\n", driver->source_file, driver->name, inp->start.tag);
1060                  error = TRUE;
1061               }
1062            tag[portnum++] = inp->start.tag;
1063         }
1064         continue;
1065      }
1066
10471067      if (port_type_is_analog(inp->type))
10481068      {
10491069         INT32 analog_max = inp->analog.max;
r2086r2087
11481168      }
11491169
11501170      /* clear the DIP switch tracking when we hit the first non-DIP entry */
1151      if (last_dipname_entry && inp->type != IPT_DIPSWITCH_SETTING)
1171      if (last_dipname_entry != NULL && inp->type != IPT_DIPSWITCH_SETTING)
11521172         last_dipname_entry = NULL;
11531173
11541174      /* look for invalid (0) types which should be mapped to IPT_OTHER */
r2086r2087
11591179      }
11601180
11611181      /* if this entry doesn't have a name, we don't care about the rest of this stuff */
1162      if (!inp->name || inp->name == IP_NAME_DEFAULT)
1182      if (inp->name == NULL || inp->name == IP_NAME_DEFAULT)
11631183      {
11641184         /* not allowed for dipswitches */
11651185         if (inp->type == IPT_DIPSWITCH_NAME || inp->type == IPT_DIPSWITCH_SETTING)
r2086r2087
11721192      }
11731193
11741194      /* check for empty string */
1175      if (!inp->name[0] && !empty_string_found)
1195      if (inp->name[0] == 0 && !empty_string_found)
11761196      {
11771197         mame_printf_error("%s: %s has an input with an empty string\n", driver->source_file, driver->name);
11781198         error = TRUE;
r2086r2087
11801200      }
11811201
11821202      /* check for trailing spaces */
1183      if (inp->name[0] && inp->name[strlen(inp->name) - 1] == ' ')
1203      if (inp->name[0] != 0 && inp->name[strlen(inp->name) - 1] == ' ')
11841204      {
11851205         mame_printf_error("%s: %s input '%s' has trailing spaces\n", driver->source_file, driver->name, inp->name);
11861206         error = TRUE;
src/emu/drivers/xtal.h
r2086r2087
4545   XTAL_1MHz          = 1000000,      /* Used to drive OKI M6295 chips */
4646   XTAL_1_75MHz      = 1750000,      /* RCA CDP1861 */
4747   XTAL_2MHz          = 2000000,
48   XTAL_2_01216MHz      = 2012160,      /* Cidelsa Draco sound board */
4849   XTAL_2_4576MHz      = 2457600,      /* Atari ST MFP */
4950   XTAL_3MHz          = 3000000,      /* Probably only used to drive 68705 or similar MCUs on 80's Taito PCBs */
5051   XTAL_3_52128MHz      = 3521280,      /* RCA COSMAC VIP */
r2086r2087
5253   XTAL_3_6864MHz     = 3686400,      /* CPS3 */
5354   XTAL_4MHz          = 4000000,
5455   XTAL_4_224MHz      = 4224000,      /* Used to drive OKI M6295 chips, usually with /4 divider */
56   XTAL_4_43361MHz      = 4433610,      /* Cidelsa Draco */
5557   XTAL_4_433619MHz   = 4433619,      /* PAL color subcarrier */
5658   XTAL_4_9152MHz      = 4915200,
5759   XTAL_5MHz          = 5000000,      /* Mutant Night */
60   XTAL_5_7143MHz      = 5714300,      /* Cidelsa Destroyer */
5861   XTAL_6MHz          = 6000000,
5962   XTAL_6_144MHz      = 6144000,      /* Used on Alpha Denshi early 80's games sound board */
6063   XTAL_7MHz          = 7000000,      /* Jaleco Mega System PCBs */
src/lib/util/xmlfile.c
r2086r2087
534534***************************************************************************/
535535
536536/*-------------------------------------------------
537    expat_malloc/expat_realloc/expat_free -
538    wrappers for memory allocation functions so
539    that they pass through out memory tracking
540    systems
541-------------------------------------------------*/
542
543static void *expat_malloc(size_t size)
544{
545   return malloc(size);
546}
547
548static void *expat_realloc(void *ptr, size_t size)
549{
550   return realloc(ptr, size);
551}
552
553static void expat_free(void *ptr)
554{
555   free(ptr);
556}
557
558
559/*-------------------------------------------------
537560    expat_setup_parser - set up expat for parsing
538561-------------------------------------------------*/
539562
540563static int expat_setup_parser(xml_parse_info *parse_info, xml_parse_options *opts)
541564{
565   XML_Memory_Handling_Suite memcallbacks;
566
542567   /* setup parse_info structure */
543568   memset(parse_info, 0, sizeof(*parse_info));
544569   if (opts != NULL)
r2086r2087
559584   parse_info->curnode = parse_info->rootnode;
560585
561586   /* create the XML parser */
562   parse_info->parser = XML_ParserCreate(NULL);
587   memcallbacks.malloc_fcn = expat_malloc;
588   memcallbacks.realloc_fcn = expat_realloc;
589   memcallbacks.free_fcn = expat_free;
590   parse_info->parser = XML_ParserCreate_MM(NULL, &memcallbacks, NULL);
563591   if (parse_info->parser == NULL)
564592   {
565593      free(parse_info->rootnode);
src/mess/osd/windows/winutils.c
r2086r2087
55//============================================================
66
77// Needed for better file dialog
8#ifdef _WIN32_WINNT
9#undef _WIN32_WINNT
10#endif // _WIN32_WINNT
811#define _WIN32_WINNT 0x500
912
1013// standard windows headers
whatsnew.txt
r2086r2087
10.123
10.124
22-----
33
44
55MAMETesters Bugs Fixed
66----------------------
7taito_f3.c0122u8red [Aaron Giles]
8dubugchunklength0122u7gre [Aaron Giles]
9m62.c0122u7yel [Aaron Giles]
10qix.c0122u8red [Atari Ace]
11yard.c0122u7yel [Aaron Giles]
701586: [Multisession] bluehawk: Graphics corruption (Reip)
801433: [Graphics] marvins: If you play player 2, the maze remains
9       unchanged. (Reip)
1001601: [Misc.] orbit: Game doesn't start. Watchdog/reset problem?
11       (Aaron Giles)
1201584: [Misc.] exerion, exerionb, exeriont: Assertion (Aaron Giles)
1301560: [DIP/Input] turpin: Cannot coin up in either slot. (RansAckeR)
1401525: [Misc.] wilytowr, atomboy: watchdog resets (RansAckeR)
1501524: [Misc.] btoads: Assertion (Zsolt Vasvari)
1601557: [Misc.] dealem: Assertion (Zsolt Vasvari)
1700059: [Graphics] commsega, locomotn, tactcian: They exhibit a problem
18       with screen area. (Nicola Salmoria)
1900406: [Graphics] qadj: When playing as the ninja, there is one broken
20       frame in his animation loop when walking. (Nicola Salmoria)
1221
1322
1423
1524Source Changes
1625--------------
17Fixed crash in debugcmt with starting with no game on the command-line.
18[Andrew Gardner]
26bbusters: Fixed sprite wrapping -- this is used on the gun calibration
27screen, at least. The game still hangs on a black screen after service
28mode is turned off. Even exiting MAME and restarting doesn't fix it,
29so it's probably a EEPROM issue. [Zsolt Vasvari]
1930
20Fixed PSR transfers in the ARM7 core. [R. Belmont]
31Added Noise Output to the MSM5232 emulation. [Nicola Salmoria]
2132
22Fixed regression in cpu_spinuntil* calls that broke a number of games.
23[Aaron Giles]
33Added placeholder effects for cymbal and hihat to equites.c. These
34will need further work to properly emulate the discrete circuitry.
35[Nicola Salmoria]
2436
25Fixed ADPCM in m62 games. Did some additional cleanup. [Aaron Giles]
37Cleaned cidelsa driver up to the latest spec. [Curt Coder]
2638
27Fixed palette gradient for promutrv. [Pierpaolo Prazzoli]
39Added NVRAM to Gekisou. Fixed inputs and promoted to working.
40[Nicola Salmoria]
2841
29Fixed watchdog behavior when not explicitly specified. [Aaron Giles]
42Explicitly fixed unmapped handler masks so that we don't report all
43unmapped addresses as 0. [Aaron Giles]
3044
31Fixed sprite placement again in chinagat driver. [Aaron Giles]
45Centralized definitions of _WIN32_WINNT. Removed malloc/calloc/
46realloc/free link-time overrides; we now rely exclusively on compile-
47time overrides. Made a few tweaks toward getting mingw-w64 working,
48but there are still linker issues. [Aaron Giles]
3249
33Fixed incorrect default screen siz
50Fixed assertions in skullxbo and exerion. [Aaron Giles]
3451
52De-deprecat-ed ui.c. [Aaron Giles]
3553
54Changed xmlfile.c to pass in memory handlers to expat so that
55our memory overrides are properly managed. [Aaron Giles]
3656
37New clones added
38----------------
39Vs. Janshi Brandnew Stars (MegaSystem32 Version) [David Haywood]
57Fixed wbbc97 regression. [Zsolt Vasvari]
4058
59Fixed crospang.c regression. Not sure why this needed to be RGB15,
60works fine with INDEXED16. [Zsolt Vasvari]
4161
62[GTICLUB] Fixed crash. [R. Belmont]
4263
430.122u8
44-------
64[SCSI] Fixed case when no device exists (e.g. running the sys573 BIOS
65directly). [R. Belmont]
4566
67Got most of the Konami PPC games running again. [R. Belmont]
4668
47MAMETesters Bugs Fixed
48----------------------
49stadhero0122u3gra [RansAckeR]
50wboy3_0119u3gra [RansAckeR]
51zerohour0122u6gra [RansAckeR]
52strahl0122u6yel [Mamesick]
53cmv801_0116gra [RansAckeR]
69Fixed crash running "kviper" BIOS. [R. Belmont]
5470
71Changed crystal.c from RGB15 to RGB32. RGB15 is not enough bits to
72hold the 5-6-5 colorspace. [Zsolt Vasvari]
5573
74Updated astrof.c to use the timer device. [Zsolt Vasvari]
5675
57Source Changes
58--------------
59Added deprecat.h that contains some deprecated/discouraged contructs.
60The idea is to create extra work if a driver wants to use these and
61hopefully gives an incentive to look for an alternate solution. Added
62#include of deprecat.h that rely on these contructs. Removed a bunch
63of unneccassary #include's from these files. [Zsolt Vasvari]
76dgpix and eolith: Converted to INDEXED16. Removed temp bitmaps.
77Changed ugly recursive video RAM code. [Zsolt Vasvari]
6478
65Simplified Star Fire driver. [Zsolt Vasvari]
79ddz: Removed RGB15 -- it's a "skeleton" driver, so why have it?
80[Zsolt Vasvari]
6681
67drawgfx changes: [Zsolt Vasvari]
68 - Removed copybitmap_remap and copyscrollbitmap_remap, neither which
69    was used by anybody
70 - Removed some obsolete commented out code
71 - Fixed up some comments
72 - Removed TRANSPARENCY_NONE case from copybitmap_core, which can
73    never happen
74 - Removed TRANSPARENCY_BLEND completely and TRANSPARENCY_BLEND_RAW
75    as an option to copybitmap. Source tree needs to be recompiled
76    as the transparancy mode enum has changed.
77 - Removed TRANSPARENCY_NONE_RAW, TRANSPARENCY_PENS_RAW and
78    TRANSPARENCY_PEN_TABLE_RAW as they were no longer used.
79 - Changed copybitmap and copyscrollbitmap. There are now 2 versions
80    of each, one without and with transparency.
82video\generic.c: Added PALETTE_INIT functions for common 16-bit RGB
83patterns. [Zsolt Vasvari]
8184
82Fixed crash in masao. [couriersud]
85Converted f-32, kinst, lethalj, ultrsprt, gamecstl, taitowlf to use
86INDEXED16. [Zsolt Vasvari]
8387
84Corrected previous i0851 timer fix to use more accurate IE SFRs.
85[Jim Stolis]
88Added option in MC6845 to programatically set the clock pin. This is
89needed by at least one MESS driver. Added
90mc6845_set_hpixels_per_column() for the Hercules gfx adapter.
91[Zsolt Vasvari]
8692
87jedi.c updates: [Zsolt Vasvari]
88 - Changed video code to directly manipulate the game bitmap
89 - Background smoothing now happens at the same time as the background
90    is drawn
93Fixed video timing in xtheball. Still don't know why it changed
94recently, but the new parameters reproduce the old values.
95[Aaron Giles]
9196
92Fixed the CPS driver to at least display the correct clock in the
93driver info, by degrading the clock through alternate means.
94[David Haywood]
97Removed unnecessary assert in video.c that broke screenless games.
98[Dirk Best]
9599
96m62.c changes: [couriersud]
97 * fixed wrong resistor value (22K to 2.2K) - verified on spelunkr
98    and kidniki hires pcb pictures
99 * Changed resistor network calculation based on assumption that cs
100    line is active either on tiles or sprites color prom.
100Changed the zombraid gun input ports to work with the calibrated
101settings. [Derrick Renaud]
101102
102Simplified the video code for crgolf. [Zsolt Vasvari]
103Fixed malzak2 from crashing. [Zsolt Vasvari]
103104
104Added PCB layouts for Penguin Bros & Puzzle De Bowling based on
105Hi-res pics. Corrected the seta2.c 68301 base clock as 50MHz / 3
106(16.66666MHz) as all the Seta2 hardware has a 50MHz OSC. Secondary OSC
107are for other chips (28MHz and or 32.53047MHz). [Brian Troha]
105Fixed graphics ROMs in gnga. [Cesare Falco]
108106
109Simplified video code and adjusted some set names in the leland
110driver. [Zsolt Vasvari]
107Added validity check to ensure input port tags don't have duplicates.
108Fixed several drivers where there were duplicates. [Aaron Giles]
111109
112Replaced tables with equations in the Sega C2 driver.
113[Nicola Salmoria]
110Corrected clocks on Cabal bootleg. [Corrado Tomaselli]
114111
115Added checks for CROSS_BUILD=1 to omit building m68kmake.exe,
116verinfo.exe, png2bdc.exe and file2str. Enables building mame using
117mingw on linux. [couriersud]
112blockhl.c, blockout.c: Added dip locations, fixed unknown dip
113switches. [RansAckeR]
118114
119Various Irem driver updates: [Aaron Giles]
120 * Properly tagged m52 and m62 sound boards, plus variants.
121 * Updated all connected drivers.
122 * Merged memory maps.
123 * Proper video timing in 10 yard fight.
124 * Converted troangel to tilemaps.
125 * Moved definitions to header files.
126 * Updated mpatrol, yard to use resnet for colors.
127 * Renamed mpatrol -> m52
128 * Renamed troangel -> m57
129 * Renamed yard -> m58
115Removed improper use of PERIODIC_INT in mpu4, to use new timer
116devices. Also corrected 50Hz timer in MPU4 Video games.
117[James Wallace]
130118
131Cleaned up 20pacgal driver, including driver state. Tried improving
132on the ROM mirroring, without any success. [Zsolt Vasvari]
119Fixed bug in tx1.c spotted by new compiler warnings in gcc 4.3.0.
120[Atari Ace]
133121
134Removed colortables from a number of drivers, as part of a larger
135move to phase out old-style colortables: gotya, gyruss, ampoker,
136circusc, clshroad, champbas, 1943, lucky8, olibochu, yamato,
137appoooh, bking, bladestl, blueprnt, carpolo, centiped, cop01,
138cosmic, ddrible, irobot, ace, alpha68k, arabian, bfm_sc2, carjmbre,
139cclimber, cherrym2, combatsc, contra, fastlane, hcastle, labyrunr,
140cham24, multigam. [Zsolt Vasvari]
122Another batch of pedantic static/const/include fixes. [Atari Ace]
141123
142Removed non-existent, second M6295 from Hit the Ice. Fixes missing
143sounds (e.g. team select screen). Hit the Ice/Violence Fight now
144share the same sound CPU memory maps. [Philip Bennett]
124Redid video timing in orbit with raw parameters. Added full memory map
125and a few other cleanups. [Aaron Giles]
145126
146Improved DIP switches according to manuals for the following drivers:
147wboy, chplft, extdwnhl, zingzip, zaxxon, congo, vanguard, zarzon,
148nibbler, segag80r.c, yard, kaneko16.c. [RansAckeR]
149127
150Verified the sound roms for Rock'n 3 and added proper names. Added
151PCB layout for sound rom board only. [Brian Troha]
152128
153Cleaned up Time Pilot sound board implementation: [Aaron Giles]
154 * full memory maps
155 * partial machine driver removes need for replicating filtering logic
156 * updated all relevant drivers
129New games added or promoted from NOT_WORKING status
130---------------------------------------------------
131Gekisou [Nicola Salmoria]
132Mermaid [robiza]
157133
158Cleaned up Time Pilot and Tutankham drivers: [Aaron Giles]
159 * correct clocks where possible
160 * merged memory maps
161 * fully decoded memory maps
162 * replaced hacky sprite rendering in Time Pilot with partial updates
163 * save state support
164 * removed Power Surge kludge, replaced with unmapped handler control
165 * Tutankham runs at 60fps, with IRQs every other frame
166 * Proper IRQ ack in Tutankham
167 * Proper NMI generation in Time Pilot
168134
169Cleaned up pooyan driver. Save states, full memory maps, proper NMI
170generation, etc. Flipped video to align better with Time Pilot.
171[Aaron Giles]
172135
173Changed 6840 interrupt handling to work like the recent 6821 changes.
174Updated MPU4 driver accordingly. Updated Scorpion 2 driver to match
175MPU4 coding style. [James Wallace]
136New clones added
137----------------
138Ridge Racer (Rev. RR3, World) [Andrea Turci]
176139
177Resolved all unknown dips in the galpani2 driver according to kaneko's
178docs, unified memory maps of both CPUs and repositioned a pair of
179graphic ROMS. [Luis Faria]
180140
181Made some minor improvements to 1942.c & 1943.c DIPs. Improved
182segas16a.c, segas16b.c & system16.c DIPs and added DIP locations
183from manuals. [RansAckeR]
184141
185Removed distinction between *_gettotalcycles() and
186*_gettotalcycles64(). All functions now return 64-bit results. Updated
187all call sites appropriately. [Aaron Giles]
1420.123u6
143-------
188144
189Further improvements to SCSP FM. [kingshriek]
190145
191Moved cpu_getiloops() and cpu_scalebyfcount() to deprecat.h. Added
192#include "deprecat.h" where necessary to make this happen. Cleaned up
193cpuexec.c/.h to latest core style. Cleaned up implementation of
194extended INP header in inptport.c. Removed external access to
195cycles_currently_ran(). Replaced use of cycles_currently_ran() in
196v9938 code with mame_rand(), since that is effectively the same thing.
197[Aaron Giles]
146MAMETesters Bugs Fixed
147----------------------
148- 01520: [DIP/Input] wilytowr, atomboy: dipswitch info
149- 01236: [DIP/Input] psurge: Power Surge isn't coining up.
150- 01521: [Gameplay] ar_sdwr: Game hangs on title screen
151- 01477: [Gameplay] metamrph, metamrpj, metamrpu: Game doesn't start
152- 01452: [Misc.] boobhack: Crashes
153- 01474: [Sound] ninjakd2, ninjak2a, ninjak2b, rdaction: Ninja-Kid II
154         sound problem
155- 01461: [Misc.] mazinger: reset caused by the watchedog message
156- 01440: [Speed] mazingar, agallet: Terrible slow down in some scenes.
157- 01087: [Misc.] spbactn, spbactnj: Crash in debug build. Corrupted
158         graphics in normal build.
159- 00223: [Graphics] splndrbt: On the first level when you pass the
160         asteroid belt the star road should be light blue instead of
161         black like mam
162- 00220: [Graphics] splndrbt: Concerning the gfx, on the pcb the
163         background is not linear as shown in mame.
164- 00217: [Graphics] splndrbt: On boot the pcb displays a clean light
165         blu screen while in mame there is a black road.
166- 01531: [Misc.] polygon-based drivers: winwork.c memory leak
167- 00150: [Misc.] alpinr2b, alpinesa : Assertion with -debug
168- 01462: [Save/Restore] atarimo_render-based drivers: Crash when
169         loading an autosave save state
170- 01538: [Core] -verifysamples: Inconsistent handling of missing
171         sample sets
172- 01491: [Interface] switchres causes Exception at EIP=009413BF:
173         ACCESS VIOLATION
174- 01529: [Misc.] AICA memory leak
175- 01511: [Save/Restore] batman: Fails to load autosave state
176- 01536: [Misc.] uballoon: Access Violation with -debug
177- 01535: [Misc.] usclssic: Access Violation with -debug
178- 01465: [Misc.] topgunnr: Crashes
179- 01534: [Misc.] ajax, ajaxj, typhoon: Access Violation with -debug
180- 01019: [Sound] Various Drivers: List of drivers with sound clipping
181- 01499: [Multisession] Various Drivers: Launching games from in-game
182         [TAB] menu 2-3 times in a row throws access violation.
183- 01453: [Misc.] troangel, newtangl: Crashes
184- 01463: [Misc.] connect4, mpu4met0, mpu4tst2, mpu4utst, bctvidbs:
185         Assertion
186- 01475: [Misc.] Screenless systems are broken because of a vblank
187         callback
188- 01486: [Gameplay] meritm.c: access violation for all games
189- 01530: [Misc.] Various Drivers: bitmap memory leaks
190- 01508: [Misc.] most vector-based drivers: Assertions
191- 01527: [Misc.] all meritm.c drivers: Assertion
192- 01528: [Misc.] pzlestar, sexyboom: Assertion
193- 01522: [Misc.] all ddragon.c drivers: Assertion
194- 01523: [Misc.] nkdodge, nkdodgeb, spdodgeb: Assertion
195- 01524: [Misc.] btoads: Assertion
196- 01526: [Misc.] futflash, laserbas, laserbsa: Assertion
197- 01507: [Misc.] all naomi.c drivers: Assertion
198- 01503: [Misc.] sidearjp, sidearmr, sidearms: Assertion
199- 01509: [Misc.] backfire, backfira: Assertion
200- 01501: [Misc.] all m107.c drivers: assertion
201- 01504: [Misc.] all leland.c drivers: Assertion
202- 01506: [Misc.] all ataxx.c drivers: Assertion
203- 01500: [Misc.] all astrocde.c drivers: assertion
204- 01514: [Misc.] all cyberbal.c drivers: Assertion
205- 01515: [Misc.] all atarig42.c drivers: Assertion
206- 01516: [Misc.] all atarigx2.c drivers: Assertion
207- 01517: [Misc.] all atarigt.c drivers: Assertion
208- 01505: [Misc.] all vicdual.c drivers: Assertion
209- 01512: [Misc.] beathead: Assertion
210- 01496: [Misc.] all segae.c drivers: Crashing with Access Violation
211- 01498: [Gameplay] otwalls: Hangs before the game starts.
198212
199Added dip locations to about half the games in seta.c. [Brian Troha]
200213
201Removed champbas color PROM. Now uses TRANSPARENCY_PENS instead of
202TRANSPARENCY_COLOR. Hooked up palette bank selector from schematics,
203though I am not sure if it is actually used by the code. Changed set
204names to match title screen, which is why baseball is spelt as
205"Base Ball". [Zsolt Vasvari]
206214
207Some minor cleanup to the equites driver, including memory map
208merging. [Aaron Giles]
215Source Changes
216--------------
217Added a new device type for timers. Where applicable, added a parallel
218set of timer functions that take a device_config instead of an
219emu_timer. Added MDRV_TIMER_* macros to define the timers in the
220machine driver. Implemented both periodic and scanline-based timer
221variants. Modified Space Encounters and Centipede to make use of this
222feature. Going forward, this is the preferred way of creating periodic
223timers. [Zsolt Vasvari]
209224
210Added new option VIDEO_UPDATE_SCANLINE, which cases VIDEO_UPDATE to
211be called for every visible scanline. Removed manual implementation
212of this in timeplt, in favor of using the new flag. There are
213probably many more drivers that can leverage this. [Aaron Giles]
225Renamed *_vbl_cb to *_vblank_callback. [Aaron Giles]
214226
215Added stream_get_sample_rate(), stream_get_time(), and
216stream_get_sample_period(). These functions are not really tested yet
217-- make sure they give reasonable results when first used! Updated
218streams.h header to latest core style. [Aaron Giles]
227Magicfly updates: [Roberto Fresca]
228 - Completed the component list & PCB layout.
229 - Added technical references to register $63 (magicfly).
230 - Switched crystal to new predefined format.
219231
220Fixed reset crashes in all Z180 games. Removed the various busy loop
221and non-exact optimzations from the Z180 core. [Zsolt Vasvari]
232Funworld updates: [Roberto Fresca]
233 - Added proper inputs to jolyc980.
234 - Added temporary patch to allow bypass the "code" screen in jolyc980.
235 - Updated technical notes.
222236
223Correct colors in Birdie King 3 -- just needed a new dump. Fixed
224incorrect ROM names. Switched color decoding to use the resnet code.
237Changed exidy440_sound_command back to "UINT8." Since it's used by
238both 8-bit and 16-bit systems, the automatic allocation is not worth
239it if you need an ugly UINT16 ** cast. Removed deprecat.h from some of
240the exidy files. [Zsolt Vasvari]
241
242Fixed Air Buster bootleg from reseting because of the watchdog.
225243[Zsolt Vasvari]
226244
227Cleaned up the rockola.c driver. Fixed dip switches for all games.
228Added notes about the games. [stephh]
245The on-screen "Reset by watchdog" message only appears in debug
246builds now. [Zsolt Vasvari]
229247
230Reorganized exidy440 audio code to make it easier to eventually use
231the MC3417/18 emulation directly. Added MC3418 variant support to the
232HC55516 audio code. [Zsolt Vasvari]
248Fixed the top screen in the megatech games. [Zsolt Vasvari]
233249
234Updated williams driver to use VIDEO_UPDATE_SCANLINE (most bitmap-
235based drivers should.) Converted to 32bpp to catch mid-screen palette
236tweaks. Removed some unnecessary read/write handlers. [Aaron Giles]
250Added internal artwork for Gorf. [Mr. Do!]
237251
238Improved colors in circusc, gyruss, gotya with the resnet code.
239[Zsolt Vasvari]
252Fixed memory leak in clifront.c. [Zsolt Vasvari]
240253
241Significant improvements to Lock-On. Added POLL input handling to the
242NEC V20/V30 core. [Philip Bennett]
254Added a crosshair_set_screen() to allow drivers to control which
255screen(s) on which crosshairs are displayed. [Nathan Woods]
243256
244Changed debugger-related code to be based off a new makefile define
245(DEBUGGER) which sets a new compile-time define (ENABLE_DEBUGGER).
246This means that MAME_DEBUG no longer means "enable debugger", it
247simply enables debugging features such as assertions and debug code
248in drivers. Also removed the various levels of opbase protection in
249memory.h and always just turned on full bounds checking. [Aaron Giles]
257Made it a fatalerror to registr save state callbacks at the wrong time
258if the current driver claims to support save states. [Aaron Giles]
250259
251Added some instructions to the H8/30xx CPU: [Luca Elia]
252  or.l ERs, ERd
253  rotl/shal.l ERd
254  not.l/neg.l ERd
255  exts.w Rd
256  sub/or/xor.l #Imm:32, ERd
257  bset/bnot/bclr.b Rn, @ERd
258  bst/bist.b #Imm:3, @ERd
259  bnot.b #Imm:3, @ERd
260Fixed chicken and egg problem with device_start callbacks:
261[Aaron Giles]
262 
263 - Added DEVINFO_INT_TOKEN_BYTES, which is queried before device
264   startup. It should return the size of the structure that will
265   be hung off of device->token. It must not return 0.
260266
261Added H8/3007 & H8/3044 variants with their memory maps. Preliminary
262implementation of the H8/3007 timers. [Luca Elia]
267 - Changed the core device interface to allocate and zero a block
268   of memory the size of DEVINFO_INT_TOKEN_BYTES before calling
269   device_start. The pointer to this memory is already attached
270   to device->token at the time device_start is called.
263271
264Added AM_WRITEONLY as a shortcut for AM_WRITE(MWAx_RAM). [Aaron Giles]
272 - The primary motivation for this is to allow the device_start
273   function to make internal calls and pass the device_config *
274   around as if the object were fully constructed. Since the token
275   is used to indicate whether or not a device is live, this makes
276   the device "live" at the time device_start is called rather
277   than after it completes.
265278
266Cleaned up Kangaroo driver: [Aaron Giles]
267 * documented MB8841 (needs to be decapped to get code)
268 * proper video timing
269 * full memory maps
270 * simplified and more accurate video logic
271 
272More opcode improvements to Risky Challenge. [robiza]
279Moved per-screen initialization into DEVICE_START and per-screen
280cleanup into DEVICE_STOP in the core video implementation.
281[Aaron Giles]
273282
274Added DIP locations to bking.c [RansAckeR]
283Fixed render_target_get_minimum_size() to return nominal values
284if no screens are found. [Aaron Giles]
275285
286Alpha Denshi major update: [Nicola Salmoria]
287 - Fixed Alpha 8201/830x MCU simulation.
288   - all hacks from the equites driver removed
289   - fixed equites restart position after going underground
290   - fixed hvolume, splndrbt 2 players
291   - removed hacks from exctsccr2
292   - fixed CPU gameplay in shougi
293 - added dump of Alpha 8201 MCU to games that use it
294   (the ROM isn't used yet, HMCS44 CPU core needs to be written first)
295 - major cleanup of the mess in equites.c:
296   - many thanks to Corrado Tomaselli for precious hardware info.
297   - implemented bg perspective scrolling using PROMs
298   - fixed sprite flip & disable
299   - fixed bg color
300   - converted bg to tilemaps
301   - fixed fg banking
302   - fixed screen flip
303   - removed meaningless banking of player inputs
304   - added UI adjuster for MSM5232 frequency
305   - MSM5232 volume control
306 - fixed MSM5232 noise LFSR formula (done by Jarek Burczynski;
307    thanks to Corrado Tomaselli for samples)
308 - changed MSM5232 emulator to output channels separately
309 - added output of SOLO channels to MSM5232 emulator.
310 - fixed champbas inputs
311 - merged talbot with champbas, some driver clenaup
312 - fixed shougi inputs
313 - switched exctsccb to use the correct gfx ROMs (matches screenshot
314    found in 01058 exctsccb: Exciting soccer bootleg should be placed
315    in champbas.c.)
316 - fixed sprite bpp in exctscrr, removed the horrible hacks that were
317    used to fix colors and transparency.
318 - fixed sound clipping in exctsccr
319 - added percussions to the equites.c games using samples; sound board
320    emulation is still not complete. Cymbal hit and hi-hat are
321    missing; bassline is incorrect, and DAC output should be filtered
276322
323Fixed crash in spbactn. [Zsolt Vasvari]
277324
278New games added or promoted from NOT_WORKING status
279---------------------------------------------------
280Wheels Runner [Luca Elia]
325In drawgfx, removed unneeded pen lookups. Did some code formatting
326clean-up. [Zsolt Vasvari]
281327
328Fixed ninjakd2 PCM sample rate to match pcb measurement.
329[Nicola Salmoria]
282330
331Fixed chdman -extract to a physical drive on Windows. [Aaron Giles]
283332
284New clones added
285----------------
286Lock-On (rev. C) [Philip Bennett]
287Progressive Music Trivia (Question set 4) [Andrew Gardner]
333Added return value to video_screen_update_partial() indicating whether
334or not the VIDEO_UPDATE was called as a result. [Aaron Giles]
288335
336Fixed typo in pitnrun frequency. [Corrado Tomaselli]
289337
338DIP switch improvements: [RansAckeR]
339 1945kiii.c, 88games.c and 40love.c: Made use of PORT_DIPUNKNOWN_DIPLOC
340 40love.c: Made use of PORT_INCLUDE
341 8080bw.c: Added more dip locations; Made use of PORT_INCLUDE
342 wilytowr.c: Added dip locations for atomboy/wilytowr; Fixed coin modes
343 battlane.c, battlera.c, battlnts.c, bbusters.c: added dip locations
344 battlnts.c: made use of PORT_INCLUDE; fixed unknown dip switch
345 bbusters.c: added note regarding correct gun calibration
346 bionicc.c: Added dip locations
347 bladestl.c: Added dip locations, made use of PORT_INCLUDE
348 blockade.c: made use of PORT_INCLUDE
349 beezer.c: Added dip locations
350 bfm_sc2.c: dip switch improvements, made use of PORT_INCLUDE
290351
291New games marked as GAME_NOT_WORKING
292------------------------------------
293Puzzlet (Japan) [Luca Elia]
294Galaxy Games BIOS [Andrew Gardner]
352Conerted the MPU4 driver to use an HD6845, as the Hitachi part was on the
353PCB, while also using it to generate the VBLANK, rather than hardcoding
354a value. Added the pulldown resistor to the network, and added all the
355conditional inputs. Please note that on the later Cabinet Types (Ready
356Steady Go-1 onwards), the 10p slot is locked out (location of the true
357register for this is unknown), but the input setting is correct - you
358have to use Coin 2 or higher to get money in. [James Wallace]
295359
360Fixed "garbage" (newlines) in the debugger window when debugging the
361SH-4 CPU. [Oliver Stoenberg]
296362
297363
2980.122u7
299-------
300364
365New games added or promoted from NOT_WORKING status
366---------------------------------------------------
367Gekisou [Nicola Salmoria]
368Pot Game (italian) [Roberto Fresca]
301369
302MAMETesters Bugs Fixed
303----------------------
304tylz0122u5red [Zsolt Vasvari]
305stadhero0122u3gre [Zsolt Vasvari]
306stadhero0122u3ora [Zsolt Vasvari]
307asterix_1055gre [couriersud]
308blktiger37b15gre [couriersud]
309newui0118u4ora [Atari Ace]
310mpatrol0117u2gre [Aaron Giles]
311realbrk0111u4gra [Brian Troha]
312schmisr0111u5gra [Brian Troha, partial fix]
313penbros0111u5gra [Brian Troha]
314ninjakd2_0111u3gra [Nicola Salmoria]
315mnight0102gre [Nicola Salmoria]
316toki060gre [robiza, Corrado Tomaselli]
317370
371New clones added
372----------------
373Pitfall II (315-5093, Flicky Conversion) [Corrado Tomaselli]
374Thunder Dragon (4th Jun. 1991) [Corrado Tomaselli]
318375
319376
320Source Changes
321--------------
322Added internal divider on m680* series CPUs (except the original
323m6800). Updated clocks on all games using them to remove the explicit
324divider. [Aaron Giles]
325377
326Reverted experimental D3D fix, since it breaks switchres.
327[Aaron Giles]
3780.123u5
379-------
328380
329dkong updates: [couriersud]
330 * fix dkong sound following Clock Divider update
331 * updated to use XTAL_*
332 * revert a change after sound regression in dkong.
333381
334i8085.c updates: [couriersud]
335 * 8085 has an internal clock divider by 2. Changed i8085.c to reflect
336    this for I8085. I8080 still at 1.
337 * Changed driver clocks to reflect internal clock divider
338 * Added some FIXME: comments where clocks for I8085 are outside specs
382MAMETesters Bugs Fixed
383----------------------
38401216 [Tomasz Slanina]
38500898 [couriersud]
38601436 [Aaron Giles]
38701480 [robiza]
38801482 [Zsolt Vasvari]
38901429 [RansAckeR]
39000593 [RansAckeR]
39101478 [RansAckeR]
339392
340Space Fighter Mark II: [Zsolt Vasvari]
341 - Changed year to 1979 as per Guru's contact
342 - Renamed set 2 ROMs to allow merging
343 - Removed experimental code left in there
344393
345phoenix.c updates: [couriersud]
346 * Modified I8085 clock
347 * Added dip locations
348 * consolidated inputs
349 * tagged inputs
350 * combined memory maps
351 * fixed sound issue related to (auto) save states
352394
353pleiads updates: [couriersud]
354 * video timing from schematics
355 * palette from schematics (resnet.h)
356 * no more colortable
395Source Changes
396--------------
397Fixed flickering in Electric Yo-Yo. Changed qix driver to use the
398MC6845's VSYNC notification for interrupts. [Zsolt Vasvari]
357399
358survival updates: [couriersud]
359 * palette from schematics (resnet.h)
400Removed machine from the parameters of some of the device_get_info
401and device_set_info calls because that information is stored
402with the device now. [Aaron Giles]
360403
361Removed bogus (bad) dump of Heated Barrel US set 2. [Brian Troha]
404Changed device interfaces to pass the device_config * rather
405than tokens and individual bits to the device callbacks. Updated
406all existing devices accordingly. [Aaron Giles]
362407
363RSP Changes: [SGINut, Nicola Salmoria, Ville Linde]
364 - Initialize RSP registers to 0 in lieu of mame_rand
365 - Re-fix RSP single-stepping mode when set by another CPU
366 - Reading the RSP PC returns only the least significant 12 bits
367 - Fixed flag behavior when read out via CFC2
368 - Fixed RSP VRCP instruction to match the real hardware results
369 - Corrected VRCP element lookup
370 - Corrected unaligned DMA behavior
371
372Removed all palette_X_r functions in favor of direct RAM reads.
408A number of changes to remove references to screens by index and
409make the video system based strictly upon the screen devices:
373410[Zsolt Vasvari]
374411
375Removed no longer applicable assert from VIDEO_START(generic). Removed
376VIDEO_START(generic) from drivers that didn't need it. Removed
377MDRV_VIDEO_START(generic_bitmapped) from drivers that don't need it.
378[Zsolt Vasvari]
412 * changed vblank_state_changed_func to now have a device_config
413    argument
414 * removed runnning_machine as the first parameter of a VBLANK
415    callback
416 * removed video_data from running_machine
417 * private state screen information now hangs off the public one,
418    instead of the other way around
419 * combined video_global and video_private into a single structure
420 * moved populating screen_state from mame.c to video.c
421 * removed defstate; the default screen parameters live in
422    screen_config directly
423 * moved 'refresh' from public to internal video state and renamed
424    it to 'frame_period'
425 * changed all drivers that previously accessed 'refresh' to use
426    video_screen_get_frame_period()
427 * changed VIDEO_UPDATE signature to pass the screen device
428 * added const device_config *primary_screen to running_machine
429 * changed first argument of video_screen_* functions to take a
430    device_config; all callers that used 0 for the screen number now
431    use machine->primary_screen
432 * changed game info screen and overlay UI to display the screen tag
433    instead of screen number
434 * added video_screen_get_visible_area()
435 * changed render.c to use screen devices
436 * removed direct driver access to machine->screen[] array
437 * added video_screen_auto_bitmap_alloc(screen)
438 * the Dynax/Don Den Lover games now do their updating in VIDEO_UPDATE
439    instead of VIDEO_EOF. Seems to have fixed the palette problems
440 * hooked up swapped videoram in Karnov properly -- same idea as
441    Burger Time
442 * removed the public screen_state object -- all access is via
443    functions
444 * removed screen[] object from running_machine
445 * removed MAX_SCREENS constant -- there is no longer a hardcoded
446    upper bound
447 
448Changed the MC6845 to take and pass device_config's only. The
449following shook out from this that are applicable to other devices
450as well: [Zsolt Vasvari]
451 - running_machine is no longer taken, passed or stored
452 - mc6845_t is now private
453 - since passing device_config's is not device type safe, I added a
454    get_safe_token() to mc6845.c to check the device passed in for
455    the valid type.
379456
380Made detection of dynamic attempts to install ROM/RAM handlers more
381aggressive. Previous checks would not catch modifications in
382DRIVER_INIT or MACHINE_START calls. Fixed a number of cases of
383incorrect usage throughout the drivers. [Aaron Giles]
457Removed video_data from running_machine. Private state screen
458information now hangs off the public one, instead of the other way
459around. Combined video_global and video_private into a single
460structure. [Zsolt Vasvari]
384461
385Changed one of the cheat calls back to using more generic switch
386detection so they can be triggered via joysticks. [Aaron Giles]
462Fixed the crash in Galaga caused by the slightly altered video timing.
463[Zsolt Vasvari]
387464
388Renamed sauro.c sp0256 internal rom to "sp0256-al2.bin".
389Removed BAD_DUMP flag from it as well. [couriersud]
465Converted address maps to tokens. Changed the address_map structure
466to house global map-wide information and hung a list of entries off
467of it corresponding to each address range. Introduced new functions
468address_map_alloc() and address_map_free() to build/destroy these
469structures. Updated all code as necessary. [Aaron Giles]
390470
391Marked HD6309 as divide-by-4 internally. Updated drivers accordingly.
392[Aaron Giles]
471Fixed several instances of porttagtohandler*() in the address maps.
472Drivers should use AM_READ_PORT() macros instead. [Aaron Giles]
393473
394Major cleanup to the ddragon driver: [Aaron Giles]
395 - improved video and interrupt timing
396 - consolidated common memory maps and input ports
397 - added save state support
398 - correct clocks
474ADDRESS_MAP_EXTERN() now is required to specify the number of
475databits, just like ADDRESS_MAP_START. [Aaron Giles]
399476
400blktiger.c updates: [couriersud]
401 * combines memory maps
402 * input ports were tagged
403 * all reads use input port tags
404 * added dip switch locations from Romstar manual
477Removed ADDRESS_MAP_FLAGS() grossness. There are now three new macros
478which replace its former usage. ADDRESS_MAP_GLOBAL_MASK(mask)
479specifies a global address-space-wide mask on all addresses. Useful
480for cases where one or more address lines simply are not used at
481all. And ADDRESS_MAP_UNMAP_LOW/HIGH specifies the behavior of
482unmapped reads (do they come back as 0 or ~0). [Aaron Giles]
405483
406Added all known variants of the tms5110 as proper chips. Updated
407dkong, cvs and scramble to use new chips. [couriersud]
484Changed internal memory mapping behavior to keep only a single
485address map and store the byte-adjusted values next in the address
486map entries rather than maintaining two separate maps. Many other
487small internal changes/cleanups. [Aaron Giles]
408488
409Converted atarifb.c to tilemaps. [Zsolt Vasvari]
489Changed MC6845 to take a screen tag instead of a screen number.
490[Zsolt Vasvari]
410491
411Switched namcos11/namcos12 over to memory_configure_bank /
412memory_set_bank. Simplified golgo 13 gun reading. [smf]
492Voodoo now takes a device_config for the screen. [Zsolt Vasvari]
413493
414mpatrol driver cleanup [Aaron Giles]
415 - merged memory maps
416 - complete memory map
417 - correct video timing
418 - correct CPU clocks
419 - replaced protection hack with actual implementation
420 - cleaned up inputs
494Changed TMS34010 to take a screen tag instead of screen number.
495[Zsolt Vasvari]
421496
422Added tilemap_get_scrollx / tilemap_get_scrolly. [Nicola Salmoria]
497Replaced the following macros (SMH == static memory handler)
423498
424Preserve fractional part of sample offset when looping in SCSP. Fixes
425remaining pitch stability problems. Fixed minor issue with timers
426B&C expiring. [kingshriek, R. Belmont]
499   MRA*_BANK*/MRA*_BANK* -> SMH_BANK*
500   MRA*_RAM/MRA*_ROM     -> SMH_RAM
501   MRA*_ROM/MWA*_ROM     -> SMH_ROM
502   MRA*_NOP/MWA*_NOP     -> SMH_NOP
503   MRA*_UNMAP/MWA*_UNMAP -> SMH_UNMAP
427504
428auto_malloc() once again actually fails when out of memory.
429[Aaron Giles]
505This removes the silly need for a bunch of redundant constants
506with faux type definitions that didn't buy anything. [Aaron Giles]
430507
431Switched zn.c to use MDRV_IMPORT_FROM. [smf]
508Moved some memory system constants into memory.c. [Aaron Giles]
432509
433mario.c changes: [couriersud]
434 * removed all traces to video/generic.h
435 * fix flipscreen issue with autosave
436 * on a hires pcb picture, verified resistor and capacitor values
510Converted atarigen and tms34061 to be handle based. [Zsolt Vasvari]
437511
438Added dip locations to Real Break. Filled in a couple of dips for the
439Pachinko Gindama Shoubu games. [Brian Troha]
512Changed how the PowerPC MMU is enabled at compile time, to cut down
513on the amount of unused functions in MAME. [Nathan Woods]
440514
441Fixed invalid memory_install_*_handler calls in drivers/williams.c.
442Emulated external OR circuit for all drivers using the PIA chip. This
443used to be internal to the PIA emulation, but, in fact, this is
444external logic. The PIA has two seperate INTA and INTB out lines.
445This fixes at least PlayBall. [Zsolt Vasvari]
515Some additional memory system cleanups: [Aaron Giles]
516 * Made address versus byte offsets explicit throughout.
517 * Removed some unused parameters.
518 * Consolidated initialization process.
519 * Removed maximum memory block count.
520 * Centralized bank management.
521 * Added masked handlers and change_pc to the accessors.
522 * Added memory_get_accessors() to return a pointer to the accessors
523   for a given address space/databus width/endian configuration.
446524
447Added the ability to the HC55516 emulator to take an external
448osciallator. Updated Mouse Trap to use the new interface.
525Adds some new 6845 varieties: MC6845-1, H46505, HD6845 and SY6545-1.
449526[Zsolt Vasvari]
450527
451Cleaned up and merged ninjakd2, mnight and omegaf drivers into a
452single driver. Additionally: [Nicola Salmoria]
453 - added flip screen support to all games
454 - fixed sprite overdraw mode:
455    - ninjakd2 congratulations screen (e.g. stage 3) shows japanese
456       characters which were previously missing
457    - in ninjakd2, at the beginning of a level items are visible
458       during the initial fade in. I'm not sure if this is correct
459       but the other effects wouldn't work otherwise
460    - in mnight attract mode, when the big ship is firing the other
461       sprites no longer leave trails
462    - in mnight at the end of a level the screen is slowly filled
463       with balls and then slowly cleared to begin the following
464       level. Same effect in the death sequence during attract mode.
465 - added proper computation of sprites to be drawn taking into
466    account double size sprites. This fixes sticking shots in mnight
467    without need for a hack.
468 - lowered ninjakd2 PCM playback rate to 13020 (from 16000). This
469    seems to sound better and is a round division from one of the
470    master clocks.
471 - removed ROM patch that was used to avoid the input protection in
472    omegaf, added a rough but effective protection simulation.
473 - corrected some dip switches
474 - hooked up sound cpu reset line
475 - simplified ROM loading for the older games swizzling address lines
476    in driver init.
528Moved crosshair code from video.c into its own module. Simplified
529crosshair logic and made it screen device based. [Zsolt Vasvari]
477530
478Added MDRV_SOUND_ROUTE_EX to specify target input channel. Added
479input id to route struct. Fixed DISCRETE_INPUT_STREAM and added input
480channel # to DISCRETE_INPUT_STREAM. [couriersud]
531Saturate MultiPCM on clip and fix envelope discontinuity. [ElSemi]
481532
482Fixed default debugger memory view width for CPUs with >byte-sized
483minimum. Made menu updating dynamic at click time, fixing issues with
484incorrect checkmarks. [Aaron Giles]
533Fixed loading mixer settings when the driver default value is
534calculated. [Nicola Salmoria]
485535
486Fixed Ninja Kuna. Cleaned up memory maps. Renamed files to ninjakun.c.
487[Zsolt Vasvari]
536Removed cpu_scalebyfcount(). Changed input ports to register a frame
537callback, which is called immediately after throttling and updating.
538This is the proper "sync point" between emulated time and real time.
539Moved all analog and digital port processing into a central place
540here. Added tracking of time since the previous frame update and use
541that as an estimate for the time of the current frame. This is used
542to scale analog ports without the use of cpu_scalebyfcount(). This
543is not perfect in the case where frame rates are dynamic (vector
544games), but works well for other cases. [Aaron Giles]
488545
489Added MC3417 and MC3418 variants to the HC55516 sound emulation.
490Changed Mouse Trap to use MC3417. [Zsolt Vasvari]
546Fixed VBLANK end time computation and video_screen_get_vblank() --
547they weren't taking into account games that use
548MDRV_SCREEN_VBLANK_TIME. [Zsolt Vasvari]
491549
492Fixed saving i8085 callbacks across a reset. Added 'pull' callback for
493the SID pin.  This is needed by the Red Alert voice board.
494[Zsolt Vasvari]
495
496Made the text displayed by the various UI sliders more intelligent.
497Basically, it will only print an index for an item if there are
498multiple of a given type. [Zsolt Vasvari]
499
500Updated jailbrek clocks and video timing based on measurements.
550Fixed 68000 prefetching operation. Previous behavior was incorrect.
501551[Aaron Giles]
502552
503Fixed i8051 timers from firing when not enabled. Checking TCON alone
504is not enough to invoke timers. Added IE SFR flags in conditional.
505[Jim Stolis]
553Changed slapstic management to always install an opbase handler to
554more aggressively catch code executing in the slapstic region.
555Updated all drivers to separate the slapstic region of ROM into a
556different ROM section from the fixed ROM. [Aaron Giles]
506557
507Added a _CALL variant to all prototype macros. The use of these
508should make it easier to change the signiture of these functions in
509the future. Replaced existing calls with macro where appropriate.
510[Zsolt Vasvari]
558superqix.c changes: [Mike Haaland]
559 - Changed vblank interrupts to 3 to fix screen drawing issues.
560 - Used memory_configure_bank() to configure memory.
561 - Added save states.
511562
512Removed VIDEO_START_CALL(generic) from all drivers not needing it,
513which were all of them. Removed VIDEO_START_CALL(generic_bitmapped)
514from jpmimpct. [Zsolt Vasvari]
563Added some clock frequency changes which were documented in u4 but
564which did not apply due to operator error. [Corrado Tomaselli]
515565
516Changed YM2203 clock in stfight to 3MHz (compared against OST)
517[Yasuhiro Ogawa]
566Added layout to crop corners in Electric Yo-Yo. [Mr. Do!]
518567
519Improved linear zoom effect resolution to address gaps in CPS3
520rendering. [OopsWare]
568Added support for Sega Virtua Processor, to run Genesis/MegaDrive
569version of Virtua Racing, intended to be used by MESS. It consists
570of a CPU core SSP1601, and updates in megadriv.c: [notaz]
571 * SSP1601 replaces SSP1610, as it has been confirmed that SVP
572    actually contains SSP1601. The current SSP1610 is only a
573    placeholder (nearly completely unimplemented) anyway.
574 * Changed megadriv.c add a new driver for Genesis/MegaDrive+SVP
575    combination, also add SVP memory controller logic and memory map.
521576
522Rewrote and modernized the redalert driver: [Zsolt Vasvari]
523 - correct colors -- in places different from the manual's description,
524    but matches the flyer perfectly
525 - added speech
526 - fixed AY-8910 sounds
527 - odds and ends
528 - corrected colors in Demoneye-X
529 - added some sound to Demoneye-X
530 - marked Demoneye-X it NOT_WORKING, due to the (still) missing 3rd
531    gfx layer that makes it impossible to pass the 2nd level.
577Phase 2 of the Deal 'Em input changes (these work well with the
578default cabinet type, I need to do some conditional input work
579to fix them fully), and also a conversion to the resnet code.
580Unfortunately, this still doesn't fix the apparently needed
581transparency. [James Wallace]
532582
533Added all the known Naomi BIOS dumps along with descriptions and
534information about region bytes & version numbers. [Brian Troha]
583Simplified inputs, improved DIP switches, and added DIP locations
584to punchout.c, bankp.c, and baraduke.c. [RansAckeR]
535585
536Removed the freely distributable Exidy games' dependency on Berzerk.
537[Zsolt Vasvari]
586In asuka.c, created MACHINE_START( asuka ) to configure cpu2 banks
587with memory_configure_bank(). All drivers support save states, with
588the exception of cadash and clones, the background does not load
589properly. [Mike Haaland]
538590
539Added support for the BLX opcode in ARM7 THUMB mode. [SGINut]
591Fixed M68000 build logic to only include it if enabled. [Fabio Priuli]
540592
541Verified DIP locations from manuals for scramble and 800fath.
542[RansAckeR]
543593
544Changed S14001A emulator to allow setting the clock frequency instead
545of the clock multiplier. This is how the real chip works. Changed the
546Berzerk driver to set the S14001A clock as per the schematics. 
547[Zsolt Vasvari]
548594
549Removed the use of the global Machine from a number of places in the
550code. [Zsolt Vasvari]
595New games added or promoted from NOT_WORKING status
596---------------------------------------------------
597Amuse (Version 50.08 IBA) [Pierpaolo Prazzoli]
598Joker Poker (Version 16.03B) [Pierpaolo Prazzoli]
599Super Bowl (Version 16.03B) [Pierpaolo Prazzoli]
600Pit Boss II [Mariusz Wojcieszek]
601Super Pit Boss [Mariusz Wojcieszek]
602Pit Boss Megastar [Mariusz Wojcieszek]
603Megatouch IV [Mariusz Wojcieszek]
604Megatouch IV Tournament Edition [Mariusz Wojcieszek]
605Megatouch 6 [Mariusz Wojcieszek]
551606
552Fixed issues flagged by MSVC warning C4305 (type truncation). Almost
553all of these are harmless double->float narrowing in initializers, but
554one warning spotlighted a bug in segasyse.c, where code to use a
555higher sprite number had no effect due to the insufficient range of
556UINT8. [Atari Ace]
557607
558Removed /wd4550 for VS7/VS71 compilers (expression evaluates to a
559function which is missing an argument list). Fixed some VS7-specific
560issues (OPTIMIZE=0 at least compiles now). [Atari Ace]
561608
562Added a missing case statement in sm8500d.c, noticed while reviewing
563dead code warnings. [Atari Ace]
564
565Corrected Diet gogo h6280 clock so that it behaves correctly with
566Charles Macdonald fix to the cpu core. Verified and corrected
567frequencies and pin 7 okim6295 on the following games:
568The new zealand story (3 z80 version), Trio The punch, Vandyke,
569paradise.c games, Downtown, Shaolin's Road and Twins.
570[Corrado Tomaselli]
571
572Removed all peplus memory hacks and game specific DRIVER_INIT. There
573are now just two DRIVER_INIT, one for normal boards and one for
574superboards. Temporarily disabled AutoHold Cheat but documented
575addresses for future update. [Jim Stolis]
576
577Added further unencrypted opcodes to risky challenge. The game now
578boots with the intro animation. [robiza]
579
580
581
582609New clones added
583610----------------
584Jokers Wild Poker (PP0065) [Jim Stolis]
585Double Down Stud Poker (PP0250) [Jim Stolis]
586Standard Draw Poker (PP0447) [Jim Stolis]
587Night Stocker (set 2) [Andrew Gardner]
588Trivial Pursuit (Genus I) (set 2) [Andrew Gardner]
611Raiden Fighters (Austria) [Corrado Tomaselli]
589612
590613
591614
5920.122u6
6150.123u4
593616-------
594617
595618
596619MAMETesters Bugs Fixed
597620----------------------
598pangpoms098u3ora [Brian Troha]
599cuebrckj0102u5gre [Zsolt Vasvari]
600astinvad0106u11gre [Aaron Giles]
601victory137b4gre [Zsolt Vasvari]
602victory37b16gre [Zsolt Vasvari]
603dcs057ora [Aaron Giles]
604pleiads0111u4gre [Robbert]
605armwrest35b9yel [David Haywood]
606gstrik20105u4gra [Brian Troha]
607narc060gra [Aaron Giles]
608mia0106u5gra [RansAckeR]
609nss_smw0115ora [Atari Ace]
610darkplnt0119u3yel [Atari Ace]
611mhhonban0120u3gra [RansAckeR]
612rollerg0111u5gra [RansAckeR]
613bionicc0109ora [RansAckeR]
614lcasino0111ora [RansAckeR]
615megaplay.c0122u4red [Atari Ace]
616nmnlnd0122u3yel [Mamesick]
617cocktail0119yel [Robbert]
618tokisens0122u3gra [RansAckeR]
619alleymas0119u3gre [RansAckeR]
620crbaloon36finalgre [Zsolt Vasvari]
621topsecrt0109gre2 [Bryan McPhail]
622quasar0122u5red [Zsolt Vasvari]
623stadhero0122u3gra [RansAckeR]
62100817 [RansAckeR]
624622
625623
626624
627625Source Changes
628626--------------
629Swinging Singles cleanup: [Tomasz Slanina]
630 - hooked up crt6845
631 - converted to tilemaps
632 - simplified protection(?) emulation
633 - removed tilemap, a bit more low level video hw emulation
634 - fake colors
627MC6845 updates: [Zsolt Vasvari]
628 * now signalling both 0->1 and 1->0 transitions of synching pins
629 * added mc6845_assert_light_pen_input; uses a timer for latching
630    the light pen address
631 * added reset device function
632 * implemented VSYNC height computation difference between the
633    Motorola and the Rockwell devices
634 * since the Commodore 40xx computers program an HSYNC width that
635    extends past the end of the scanline, I am clamping it in lack
636    of anything better to do
637 * added support for the Commodore 6545-1 device type
638 * added support for the status register
639 * better variable names
640 * more asserts
641 
642Updated the "Input (This Game)" menu to support conditional inputs.
643[stephh]
635644
636Lowerd FPS in lasso.c to avoid corrupting Chameleon's high score
637table. [Zsolt Vasvari]
645Converted Amiga based games to partial updating and proper scanline
646based timers. [Zsolt Vasvari]
638647
639Removed obsolete uitext.c and all references to it. [Aaron Giles]
648Beginning of the clean-up of Space Guerilla - fixed rotation, some
649other stuff. [Zsolt Vasvari]
640650
641Some more modernization/clean-up in the exidy driver. [Zsolt Vasvari]
651Removed use of tmpbitmap from some drivers. [Zsolt Vasvari]
642652
643Added VIDEO_ALWAYS_UPDATED for reliable collision detection in the
644CVS driver. [Zsolt Vasvari]
653Replaced mame_bitmap with direct use of bitmap_t. Removed mame_bitmap
654typedef. [Zsolt Vasvari]
645655
646Cleaned up astinvad driver: [Aaron Giles]
647 * Proper video timing
648 * Hooked up 8255 PPIs
649 * Correct interrupt timing
650 * Consolidated code into single file
656Fixed taitoic regression that caused crashes in several games.
657[Zsolt Vasvari]
651658
652i8039.c/mario.c updates: [couriersud]
653 * fixed movd instructions
654 * add MB8884 and M58715 cpu types
655 * moved timer hack to M58715
656 * added ram_mask for internal ram access
657 * added R.A11 as 'M' to dasm flags
658 * added EA "IO" port
659 * mario now uses M58715 as sound cpu
660 * hooked up EA line for M58715
661 * fixed portA startup value
662 * documented hardware changes to use a I8039 on a mario board
659Changed the way VBLANK_INTs are handled:
660 - Defined a new MDRV_CPU_VBLANK_INT_HACK() (in deprecat.h) which is
661    a copy of the current MDRV_CPU_VBLANK_INT()
662 - Found all the places where VBLANK_INT is used with something other
663    than 1 interrupt per frame and changed it to the new macro
664 - Removed the "# per frame" parameter from MDRV_SCREEN_VBLANK_INT()
665    and added a screen tag in its place; updated all callers
666    appropriately.
667 - Added some validation of the interrupt setup to validate.c
663668
664sauro.c: [couriersud]
665 * revert promsize to 256 for trckydoc
669Fixed SH4 refresh ticks value of 0, makes awbios not blow up the
670timer system. [R. Belmont]
666671
667Added XTAL clocks to zaxxon.c. [Aaron Giles]
672Updated dkong driver to use two discrete structs which were previously
673not being used: [couriersud]
674 * dkong walk using a jump struct
675 * radarscp using a dkong 555 struct
668676
669Cleaned up cojag/jaguar driver: [Aaron Giles]
670 * proper video timing, configured by the chipset
671 * 32-bit rendering, removing 16bpp hacks
672 * support for borders
673 * proper object processor timing, including multiple passes per line
674 * added R3041 as a clone of the R3000
675 * fixed XTALs based on documentation
677MACHINE_DRIVER_EXTERN now requires a semicolon. Removed a number of
678extra semicolons. [couriersud]
676679
677Consolidated exidy and victory drivers. Removed complicated dirty
678tracking from victory.c. Reorganized the exidy audio hardware code.
679Changed Targ to use a loaded PROM instead of a hard-coded one. Renamed
680Side Trak to Side Track as per the title screen. [Zsolt Vasvari]
680In memory.c: removed some code never to be executed: [couriersud]
681 * removed "return 0" from READ* macros since it is unreachable
682 * removed comparisons of type FPTR < 0 and FPTR >= 0
681683
6826821 PIA changes: [Zsolt Vasvari]
683 - Added orthogonal accessors
684 - Removed hacky update_shared_irq_handler(), now the same
685   IRQ callback maybe called multiple times, but this shouldn't
686   be a problem
687 - IRQ lines are cleared on a reset
684Identified code not used and marked with "#ifdef UNUSED_FUNCTION".
685[couriersud]
688686
689Disabled code in the TMS5220 that set the Buffer Empty flag after a
690stop frame. This fixes Victory. This might be the incorrect fix but
691the old code wasn't working either. [Zsolt Vasvari]
687Naomi: Use defines instead of magic numbers for IRQ sources, add
688VBL-out. [R. Belmont]
692689
693Hooked up revx dcs reset line. Signaled IRQ on correct CPU when DCS
694sends data back (duh). [Aaron Giles]
690Improved (not perfect) ACIA slot monitoring. [kingshriek]
695691
696Removed unnecessary check that could cause SCSP hangs in grdforce.
697[kingshriek]
692Changed parent/clone relationship to separate SSI Poker sets from
693Jackpot Joker Poker. [Roberto Fresca]
698694
699Tweaked deco156 clock speed to be 28 to prevent the games from running
700in slow motion. I suspect the 156 chip has an internal multiplier, the
701usual input pin is 7Mhz IIRC. [David Haywood]
695Removed a couple of unused items from the cpuexec_data structure.
696Added validity check that screenless drivers cannot have a VBLANK
697interrupt. [Zsolt Vasvari]
702698
703dkong.c changes: [couriersud]
704 * added equivalence circuit for Sanyo EZV audio amplifier
705 * Set DK_C159 = 0 to avoid over-aggressive high-pass filter. Solely
706    based on observations.
707 * added comment on above to source
708 * Added define DK_NO_FILTERS to turn of DAC filters and post-mixer
709    filters for debugging
699Added macros to define device functions. Updated existing devices
700to use the macros. [Aaron Giles]
710701
711Adds dips for Water Balls. Adds dip port locations to all dips.
712[Brian Troha]
702Added the concept of device classes. Devices specify their class
703in their get_info function. Classes can be used to walk through
704devices at a more general level than their type. Functions have
705been added to iterate through devices by class just as you can
706by type. [Aaron Giles]
713707
714Added CPUINFO_INT_CLOCK_MULTIPLIER to support CPU clock multipliers.
715Updated all CPU cores to return a CPUINFO_INT_CLOCK_MULTIPLIER of 1.
716Changed the core to actually respect both CPUINFO_INT_CLOCK_MULTIPLIER
717and CPUINFO_INT_CLOCK_DIVIDER. Updated a number of drivers to use
718cpunum_get_clock() instead of Machine->drv->cpu[x].clock. Raw input
719clock speeds should now be specified for all CPUs in the
720MACHINE_DRIVER. [Aaron Giles]
708Removed some unused fields from device_config. [Aaron Giles]
721709
722Changed TLC43076 and games using it to RGB32. Removed global Machine
723variable where possible. [Zsolt Vasvari]
710Moved all video timing logic from cpuexec.c to video.c. Added a
711video_screen_register_vbl_cb() function for registering VBLANK
712callbanks. Changed inptport.c and debugcpu.c to make use the VBLANK
713callbacks. Added video_screen_get_time_until_vblank_start(). I did
714some fairly extensive testing, but this is a very signficant internal
715change, so some things may have broke. [Zsolt Vasvari]
724716
725Removed dirtybuffer from video/generic.c and all drivers still using
726it. Good riddance... Removed videoram_w, colorram_w and spriteram_w
727and changed all drivers using it to access RAM directly. Removed
728videoram_r, colorram_r, spriteram_r, spriteram16_r and spriteram16_w
729from video/generic.c and changed all games to use (possibly shared)
730RAM. [Zsolt Vasvari]
717Removed use of cpu_scalebyfcount() from CVS driver. [Zsolt Vasvari]
731718
732Cleaned up memory maps in the seibu sound interfaces. Changed to use
733shared sound configs instead of statically copying them in each
734driver. [Aaron Giles]
719Changed a number of global functions to being static. [couriersud]
735720
736Verified and changed cpu frequencies and oki m6295 pin 7 on the
737following pcbs: Asuka&Asuka, Cadash, Equites h/w games and sound
738board, F1GP, Super Formula, Gladiator, Ping Pong king, Great
739Swordsman, Irem m52 sound board, Tropical Angel, Explosive Breakers,
740Magical Crystal, Mad Gear, Roller Aces, Chinese Hero, Simpsons,
741Golfing Greats, Time Pilot 84. [Corrado Tomaselli]
721Rewrote some potentially compiler specific code: [couriersud]
722 * added ATTR_FORCE_INLINE to osdcomm.h
723 * added ATTR_NONNULL
724 * moved U64 S64 fram mamecore.h to osdcomm.h
725 * define SETJMP_GNUC_PROTECT() in osdcomm.h for use in ppc602, ppc603
742726
743Added some more static qualifiers on recent new/changed code.
744[Atari Ace]
727Removed cpu_getcurrentframe() and replaced it with
728video_screen_get_frame_number(int scrnum). Updated all callers.
729[Zsolt Vasvari]
745730
746Fixed dbreed72 crash introduced in 0.122u5. [Mamesick]
731Moved watchdog processing logic into its own module. [Zsolt Vasvari]
747732
748Fixed HuC6280 low-speed mode so it uses 4 cycles instead of 3.
749[Charles MacDonald]
733Replaced sprite multiplexing hack in tp84.c with
734video_screen_update_now() on sprite RAM write. General driver
735clean-up. [Zsolt Vasvari]
750736
751Hand fixed Road Runner's corrupted ROM. We are 99.99% sure that the
752bad bytes are the same as the Desert Gun ones. [Zsolt Vasvari]
737Gyruss: Tilemap conversion, sprite multiplexing done properly, driver
738clean-up. [Zsolt Vasvari]
753739
754Cleaned up leland clocks a little. Made the i186 divide-by-2 clock
755internal. [Aaron Giles]
740Changed z80dma to new device interface, updated mario.c and dkong.c
741to use new interface. Illustrates how to keep existing memory
742read/write handlers. This is slower than caching the device interface,
743but does not have an impact on devices accessed at a low frequency
744like in this case. [couriersud]
756745
757Added clocks to the MCR sound boards and some of the MCR games. Added
758TMS5220 variants TMS5200 and TMC0285 as proper chips. Changed MCR
759squawk & talk to use the TMS5200 as documented. [Aaron Giles]
746Added video_screen_get_time_until_vblank_end() and
747video_screen_get_time_until_update(). [Aaron Giles]
760748
761Cleaned up Crazy Baloon driver: proper memory maps, crystals, etc.
762Implemented the missing features of the collision detector custom IC.
749Fixed CCPU and QB3 to no longer rely on cpu_scalebyfcount(). Fixed
750busted timing in the CCPU core. Changed watchdog to count internally
751rather than using external watchdog support. Altered CCPU to accept
752interrupt signals from the driver. Updated clocks in the cinemat
753driver to be derived from the clock crystal. [Aaron Giles]
754
755Normalized function pointer typedefs: they are now all
756suffixed with _func. Did this throughout the core and
757drivers I was familiar with. [Aaron Giles]
758
759Added PORT_CHANGED macro which calls a callback if the given port
760changes. Usage is very similar to PORT_CUSTOM. See the Astro Invader
761driver for an example. [Zsolt Vasvari]
762
763Removed input_port_set_changed_callback and converted all users to
764PORT_CHANGED. The only difference between the old callback and the
765ones supplied by PORT_CHANGED is that values passed by PORT_CHANGED
766are normalized to start at bit 0, just like PORT_CUSTOM.
763767[Zsolt Vasvari]
764768
765First pass at fixing the cpu clock speeds on the playstation based
766hardware. The system 10 & 12 clock speeds have been raised as they
767run on an upgraded chipset. The internal divide in the CPU core has
768been set to 4 as we have no wait states, incorrect dma timing,
769no gpu timing, no dma bus stealing and no gte timing. [smf]
769Added running_machine* to the CUSTOM_INPUT callback - updated drivers
770to use it. [Zsolt Vasvari]
770771
771Fixed RET instruction on the i960 core. [Ernesto Corvi, ElSemi]
772Updated brkthru.c, btime.c, exerion.c, fcombat.c, astrof.c,
773cheekyms.c, cinemat.c to use PORT_CHANGED. Combined memory maps where
774applicable. Converted cheekyms.c to use tilemaps. [Zsolt Vasvari]
772775
773Removed speedups in the gstream and limenko drivers which were
774breaking the games. [David Haywood]
776Merged memory maps for drivers X->Z. [Andrew Gardner]
775777
776Fixed regression on i8039 T1 counter mode. [couriersud]
778Exidy440: modernized input port handling with CUSTOM_INPUT and
779INPUT_CHANGED. Cleaned-up special case handling. Created better
780separation between driver and video code. [Zsolt Vasvari]
777781
778Added CUSTOM_INPUT macro for defining input port callbacks. Pushed
779its usage throughout the code. [Aaron Giles]
782Verified clocks and oki pin7 for Peek-a-boo. [Mike Ellery]
780783
781phoenix and clones: [couriersud]
782 * video timing from schematics
783 * palette from schematics (resnet.h)
784 * no more colortable
785 * added save state
784Untangled the Fire Truck driver. Many uses of PORT_CUSTOM and
785PORT_CHANGED, including another good use case for the gear shift
786logic. [Zsolt Vasvari]
786787
787Minor RSP fixes: [SGINut]
788 - Fixed accumulator state on powerup by testing against real hardware
789 - Fixed single-step behavior by testing against real hardware
788Updated ladybug.c, lasso.c, m10.c, madalien.c, maxaflex.c to use
789PORT_CHANGED for coinage. [Zsolt Vasvari]
790790
791Added save state support to atetris.c. [Svante Gerhard]
791Added running_machine * parameter to the front of all read/write
792handlers. Updated all call-through handlers appropriately. Renamed
793read8_handler to read8_machine_func, replicating this pattern
794throughout. [Aaron Giles]
792795
793Fixed up atetris memory maps and clocks according to schematics.
796Defined new set of memory handler functions which are similar but
797which pass a const device_config * in place of the running_machine *.
798These are called read8_device_func, etc. Added macros
799READ8_DEVICE_HANDLER() for specifying functions of this type.
794800[Aaron Giles]
795801
796Added targ and spectar to TinyMAME. [neoforma]
802Added running_machine * to the device_config, live while the device
803is live, and NULL otherwise, just like the token. [Aaron Giles]
797804
805Meadows driver updates: [Zsolt Vasvari]
806 - Merged memory maps
807 - Uses PORT_CHANGED for coins
808 - Renamed 'Inferno (S2650) to 'Inferno (Meadows)'
809 - Renamed 'Bowling 3D' to '3-D Bowling'
810 - Added NO_DUMP entries for Gypsy Juggler's ball graphics and added GAME_IMPERFECT_GRAPHICS flag
798811
812Fixed sprite colors in Exerion. [Zsolt Vasvari]
799813
800New games added or promoted from NOT_WORKING status
801---------------------------------------------------
802Ripper Ribbit [Aaron Giles]
803Chicken Farm [Aaron Giles]
804Crazzy Clownz [Aaron Giles]
805Space Fighter Mark II [Zsolt Vasvari, Guru]
814Added new macros AM_DEVREAD, AM_DEVWRITE, and AM_DEVREADWRITE,
815which specify device read/write handlers in address maps, along
816with the type/tag of the device they reference. [Aaron Giles]
806817
818Converted MC6845 read/write handlers to READ/WRITE8_DEVICE_HANDLERs.
819Updated all MC6845-using drivers to use the new macros and call
820the updated functions. Removed the many little helper functions
821that used to do this work. [Aaron Giles]
807822
823Added validity checks to ensure that the devices referenced
824actually exist. [Aaron Giles]
808825
809New clones added
810----------------
811Heated Barrel (US set 2) [Corrado Tomaselli]
812Player's Edge Plus (XMP00006) Multi-Poker [Jim Stolis]
826Fixed display of screen information so that it shows live information,
827not just the original configurations. [SailorSat]
813828
829Improved DIP switch definitions, added DIP locations, and simplified
830input ports in atarisy2.c, atetris.c, avalnche.c, bagman.c,
831balsente.c, lasso.c, seta.c. [RasnAckeR]
814832
833Added DIPs and locations to onetwo.c. [Sonikos]
815834
816New games marked as GAME_NOT_WORKING
817------------------------------------
818International Toote (Germany) [Luca Elia]
819Dodge City [Roberto Fresca]
835Corrected some glitches and fixed bank reading in Deal'Em.
836[James Wallace]
820837
838Changed/verified clocks on the following pcbs: 1943, Arkanoid, Action
839Holliwood GalsPanic, Ben Bero Beh, 1000 Miglia, Pit and Run,
840Prehistoric Isle, Rastan, Hotmind, Hardtimes, Stagger1 and
841Tiger Road. [Corrado Tomaselli]
821842
843Changed/verified Oki pin 7 on the following pcbs: 1000 miglia,
844Galspanic, Action Holliwood, Hotmind, HardTimes, World Rally,
845Stagger1. [Corrado Tomaselli]
822846
8230.122u5
847Added the new display types to the listxml DTD. [Oliver Stoneberg]
848
849Internal address map constructor changes: [couriersud]
850 * pass running_machine parameter to construct_map_##_name
851 * change "Machine->" to "machine->" in AM_BASE_MEMBER, AM_SIZE_MEMBER
852 * pass Machine in construct_address_map
853
854Mysterious Stones gets the "full treatment". [Zsolt Vasvari]
855
856Fix 8085 RST75 not working with PULSE_LINE. According to datasheet,
857RST7.5 is latched on rising edge, while the other maskable interrupts
858are sampled. [Nicola Salmoria]
859
860Removed AM_SPACE and matchmask support. Updated relevant drivers
861to use AM_MIRROR() and AM_MASK() to achieve the same thing.
862[Aaron Giles]
863
864
865
8660.123u3
824867-------
825868
826869
827870MAMETesters Bugs Fixed
828871----------------------
829scorpion0111u5gra [couriersud]
830qbert37b14gre1 [Zsolt Vasvari]
831blktiger060gre [robiza]
832kinstc081u7gre [Aaron Giles]
833kinst2083gre [Aaron Giles]
834umk3059gre [Aaron Giles]
835umk3137b5gre [Aaron Giles]
836lasso056gre_1 [Zsolt Vasvari]
837lasso056gre_2 [Zsolt Vasvari]
838term20103u4gre [Aaron Giles]
839term20104u2gre [Aaron Giles]
840m72_0115u3yel [Mamesick, Aaron Giles]
841deadang0119u2red [David Haywood]
842tmnt095gre [Zsolt Vasvari]
843memleak0122u2ora [Atari Ace]
844junglek055gre [Zsolt Vasvari]
872connect4_0123u2red [Aaron Giles]
873multiscreeninfo0123u2gre [Aaron Giles]
845874
846875
847876
848877Source Changes
849878--------------
850Fixed flipped tilemap offset for scramble and clones (playable
851cocktail mode). [couriersud]
879Corrected clock speeds for the megasys1.c boards. Yes, the games
880actually ran _THAT_ slow! [Brian Troha]
852881
853Changed Exidy driver to draws the background directly from memory
854avoiding having to decode the gfx repeadately. [Zsolt Vasvari]
882Makefile & build system update: [couriersud]
883 * verinfo: New syntax. verinfo now uses the following syntax:
884     verinfo.exe -b windows|winui|mess.
885   Does not depend on compile time defines any longer.
886 * makefile will include src/osd/$(CROSS_BUILD_OSD)/build.mak if it
887   exists. This was necessary to enable cross builds for winui.
855888
856Added machine and cpunum parameters to INTERRUPT_GEN callbacks. Fixed
857several places that were not using INTERRUPT_GEN or OPBASE_HANDLER
858macros. [Atari Ace]
889Cloak & Dagger video code cleanup: [Zsolt Vasvari]
890 - resnet conversion - colors are now signficantly less saturated
891    because of the 1K pull-ups. This is noticable in the agent's coat
892    and the sky color, for example.
893 - Added bitmap palette selection based on the 128H line. Not sure
894    where this is actually used in the game.
859895
860Minor bugfixes to the gfxlayout cleanups included in u4. [Atari Ace]
896Removed unnecessary machine->pens[] lookups in a large number of
897drivers. [Zsolt Vasvari]
861898
862Added code to debug 64-bit builds to allocate all address space below
8634GB to help find 64-bit errors. Added environment variable
864OSDDEBUGMALLOC which, if set, explicitly overrides the debug malloc
865debug settings. Added environment variable OSDDEBUG4GB which, if set,
866explicitly overrides the new 64-bit address space allocations. (Sadly
867this is necessary due to some D3D drivers being 64-bit unclean....)
899Added built-in layout to Space Tactics. Cleaned up and reorganized the
900driver. [Mr. Do!, Zsolt Vasvari]
901
902Switched the funworld color decoding routines to use resnet code.
903[Roberto Fresca]
904
905Fixed namcos2, namcos21 crashes due to nvram allocation in
906MACHINE_RESET. Created MACHINE_START and move allocation there.
907[couriersud]
908
909Updated info.c to output raw video parameters (pixclock, htotal,
910hbend, hbstart, vtotal, vbend, vbstart) via -listxml if they have
911been given. [couriersud]
912
913Removed some deprecat.h includes from osd layer: [couriersud]
914 * add machine as parameter to osd_update and osd_update_audio_stream
915 * change Machine to machine and remove include deprecat.h
916
917Added a rule in vconv.c to make VS2008 compile seamlessly.
868918[Aaron Giles]
869919
870Fixed winwork to use proper tchar functions for getenv. [Aaron Giles]
920bionicc.c: [couriersud]
921 * Added cpu clocks from schematics
922 * Comment about z80 nmi generation
871923
872Fixed bug where the 64-bit DRC was not saving rbp. [Aaron Giles]
924Fixed the DAC sound in X The Ball. [Zsolt Vasvari, Mamesick]
873925
874Cleaned up the lasso driver. [Zsolt Vasvari]
926Removed the confirmed bad dump of Virtua striker 2 2000. [Brian Troha]
875927
876Simplified Y-unit DMA rendering, fixing bugs and removing the macro
877voodoo. [Aaron Giles]
928Fixes crash in Raiga. [Zsolt Vasvari, David Haywood]
878929
879Removed a bunch of dead code from othunder.c. [Zsolt Vasvari]
930drawgfx.c improvments: [Zsolt Vasvari]
931 - Added some asserts to drawgfx and drawgfxzoom
932 - Moved some variable declarations so that they are only visible
933    where they are actually used
880934
881Implemented proper video timing and scanline interrupts in the m72
882driver. [Mamesick, Aaron Giles]
935Removed 8bpp bitmap support from drawgfx. [Zsolt Vasvari]
883936
884mario.c improvements: [couriersud]
885 * discrete sound
886 * hooked up z80dma
887 * combined memory maps
888 * statics in mario_state struct
889 * fixed save state issues
890 * combine sh_* writes into one routine
937Removed MDRV_PALETTE_LENGTH from vector games, which would trigger
938an assert in emupal.c (debug build) [couriersud]
891939
892audio/dkong.c: [couriersud]
893 * fixed LS123 constant to match TI datasheet diode circuit constant
940Added new module: tokenize.h. This centralizes the behavior of
941tokenizing data structures, as currently used by the input port
942system. Redid the input port tokenization to be more compact and make
943use of the new macros. Added support for designated initializers in
944C99 and GCC builds to enforce type safety. [Aaron Giles]
894945
895TX-1 improvements [Philip Bennett, Guru]:
896 * Fixed remaining arithmetic unit issues
897 * Added correct object colour pixel LUT PROM to tx1a
898 * Fixed x-flipping
899 * Added engine sounds
946Removed bogus DIPs from the NSS driver. [R. Belmont]
900947
901Added correct DIP switch settings for Big Fight. Also corrected Cycle
902Warriors DIP switches. [Philip Bennett]
948Improved the global "flip_screen" macros and variables: [couriersud]
949 * fix issues related to flip_screen being a define
950 * add "int flip_screen_get(void)"
951 * clean up drivers with collisions
952 * remove flip_screen macro
953 * flip_screen_x and flip_screen_y made static
954 * add flip_screen_x_get() and flip_screen_y_get()
955 * change writes to flip_screen_x to flip_screen_set_no_update()
956 * added save state calls for flip_screen_x and flip_screen_y
903957
904Changed and verified frequencies on Ikari Warriors h/w, Tnk3, Hyper
905Sports, Jackal and S.A.R. [Corrado Tomaselli]
958Converted MACHINE_DRIVER definitions from function constructors to
959tokenized lists. For the most part this is a non-invasive change,
960except for those drivers using MDRV_WATCHDOG_TIME_INIT. In order to
961allow for tokenization of attotimes, a set of new macros is provided
962called UINT64_ATTOTIME_IN_x() which follows the same pattern as
963ATTOTIME_IN_x() but packs the attotime down into a single 64-bit
964value for easier tokenization. Fixed several errors in the machine
965drivers which were caught by the additional checks now done in the
966machine config detokenization code. [Aaron Giles]
906967
907Verified and corrected a lot of frequencies and oki6295 pin 7 on pcbs:
908Double Dribble, Chequered Flag, Diet gogo, Boulderdash, Sly Spy,
909Psycho Nics Oscar, Captain Silver, Magical Cat Adventure, Raiden,
910Superman, Twin Hawk, Vimana, Ghox, Dogyunn, truxton2, Pipi and Bibis,
911Fix Eight and Money Money. [Corrado Tomaselli]
968Separated MDRV_DEVICE_CONFIG_DATA into 32-bit and 64-bit versions.
969Added floating-point versions with configurable resolutions.
970[Aaron Giles]
912971
913Cleaned up brkthru/darwin memory maps. Changed both games to use
914identical video timing parameters based on measurements of darwin.
915Guessed based on available information at the master clock and
916derived all game clocks from it. [Aaron Giles]
972Converted speakers into devices. Machine->config no longer houses
973an array of speakers; instead they are iterated through using the
974new macros (defined in sound.h) speaker_output_first() and
975speaker_output_next(). Updated all relevant code to do this.
976[Aaron Giles]
917977
918Reogranized and started to clean up the CVS driver. Added emulation
919of the speech CPU. Removed CVS BIOS entry. Removed unnecessary
920patching. [Zsolt Vasvari]
978Added typedefs for all the machine config callback functions at the
979top of driver.h. [Aaron Giles]
921980
922sauro.c: [couriersud]
923 * Hooked up sp0256 sound
924 * analyzed and commented some ports
925 * added palette_bank support without real success
981Big changes to Cal Omega driver: [Roberto Fresca]
982 - Renamed the driver to calomega.c.
983 - Extended the driver to support all the other Cal Omega systems.
984 - Switched to XTAL def.
985 - Fixed CPU & sound clocks based on official diagrams.
986 - Replaced the AY-8910 with AY-8912 to match the real hardware.
987 - Unified some memory maps.
988 - Splitted machine in sys903 and sys905.
989 - Fixed memory map offsets for sys905.
990 - Added a list of official/unofficial games, and their states.
991 - Fixed a bug introduced when extended the color PROM region to
992    eliminate colortable length.
993 - Updated technical notes.
926994
927Reorganized the Raiden 2 driver.. a bit of extra documentation of the
928'V33' based set, which has been renamed. Nothing new working.
929[David Haywood]
995Merged memory maps for a number of drivers beginning with a digit or
996the letter 'a'. [Aaron Giles]
930997
931Fixed scan functions for kickgoal background, which were swapped.
932[David Haywood]
998Cleaned up the Crazy Climber video driver, mainly via tilemap
999conversion. This fixes the ape sprite positioning in Crazy Kong - no
1000more gap between feet and platform. Merged Yamato driver with Crazy
1001Climber. [Zsolt Vasvari]
9331002
934Fixed 2650 disassembly of the sense and flag bits. Fixed incorrect
935argument order in OUT instruction. Corrected spacing. [Zsolt Vasvari]
1003Converted XX Mission to tilemaps. [Zsolt Vasvari]
9361004
937Fixed hang/crash on empty config file. [Wilbert Pol]
1005Removed VIDEO_START(generic) - no longer used. [Zsolt Vasvari]
9381006
939Cleaned up tceptor memory maps. [Zsolt Vasvari]
1007Added PGM.c EEPROM/hiscore saving. [Creamymami]
9401008
941Atari System 2 driver cleanup: [Aaron Giles]
942 * Proper video timing.
943 * Full memory maps.
944 * Save state support.
945 * Removed 720 sound CPU hack in favor of prepopulated EEPROM like
946    the other games.
1009Added support for original Omega Race state PROM. [Mathis Rosenhauer]
9471010
948Added support for outputting 64-bit target addresses in the i386dasm.
949[Aaron Giles]
1011Added support in the MC6845 emulation for cursors. All 4 blinking
1012modes are supported. [Zsolt Vasvari]
9501013
951Added MESS PC-Engine emulatation system. Fixed MAME debug build under
952VC2003. [Mariusz Wojcieszek]
1014Added a stub implementation of the Rockwell 6545. [Nathan Woods]
9531015
954Unified memory maps in tmnt.c and twin16.c. Reversed ROM set names
955of Cuebrick World and Japan versions. Changed some function names to
956reflect parent set. [Zsolt Vasvari]
1016Added basic support for the NEC uPD7801, uPD78C05, and uPD78C06 CPUs
1017to the uPD7810 cpu core. [Wilbert Pol]
9571018
958Changed Konami drivers to allocate and decode graphics using the same
959layouts. Removed the layout parameter from the decodechar() calls.
960[Atari Ace]
1019Some improvements to the 6850 ACIA CTS pin checking logic and the MPU4
1020ACIA clock logic. [James Wallace]
9611021
962Fixed C++ compilation errors. [Dave Dribin]
1022Another Risky Challenge opcode to fix a sprite bug and a general
1023clean up of the remarks in the driver. [robiza]
9631024
964Made INPs compatible between 64-bit MAME and 32-bit MAME. [Chad]
1025Added dip locations to astinvad, bonzeadv, cadash, asuka, mofflott,
1026galmedes, atarifb, atarifb4, abaseb, soccer. Added DIP locations and
1027improved DIP switches in seawolf2, wow, gorf, robby, profpac.
1028[RansAckeR]
9651029
966Complete taitosj memory map from Nicola's ancient notes. General code
967clean-up. [Zsolt Vasvari]
1030One-line fix for the z80pio. At the moment when the interrupt control
1031word is sent (with interrupts enabled), an interrupt occurs. In
1032reality, interrupts are disabled until the interrupt mask byte is
1033sent. [Robert]
9681034
969src2html improvments: [Aaron Giles]
970 - added line numbers
971 - added link to the raw file if the src and dst dirs are the same
972 
973"Fix" for full screen switch, which makes no sense, but is included
974based on empirical evidence that is somehow works. [Emuman]
9751035
9761036
977
9781037New games added or promoted from NOT_WORKING status
9791038---------------------------------------------------
980Name Club Ver.3 (J 970723 V1.000) [David Haywood, Mariusz Wojcieszek]
981Blazing Lazers [Mariusz Wojcieszek, Charles MacDonald, Mr. Do]
1039Jolly Joker [Roberto Fresca]
1040Cal Omega - Game 7.6 (Arcade Poker) [Roberto Fresca]
1041Cal Omega - Game 7.9 (Arcade Poker) [Roberto Fresca]
1042Cal Omega - Game 12.8 (Arcade Game) [Roberto Fresca]
1043Cal Omega - Game 17.51 (Gaming Draw Poker) [Roberto Fresca]
1044Cal Omega - Game 23.9 (Gaming Draw Poker) [Roberto Fresca]
1045El Grande - 5 Card Draw (New) [Roberto Fresca]
1046Jackpot Joker Poker (5 sets) [Roberto Fresca]
9821047
9831048
9841049
9851050New clones added
9861051----------------
987Lead Angle (Japan) [Guru]
988A Question of Sport (39-960-107) [Highwayman]
989Gee Bee (F.lli Bertolino license) [Corrado Tomaselli]
1052Cosmic Smash (JPN, USA, EXP, KOR, AUS) (original) [icronnya77]
1053Jolly Card (Evona Electronic) [Roberto Fresca]
1054Jolly Card (croatian, set 2) [Roberto Fresca]
1055Super Joly 2000 - 3x [Roberto Fresca]
1056Royal Vegas Joker Card (fast deal, english gfx) [Roberto Fresca]
1057Dungeons and Dragons Tower of Doom (Japan 940412) [Razoola]
1058Real Bout Fatal Fury (bug fix revision) [Razoola]
1059Metal Slug 5 (AES Cart) [Razoola]
9901060
9911061
9921062
9931063New games marked as GAME_NOT_WORKING
9941064------------------------------------
995Road Runner (Midway) [Zsolt Vasvari, Guru]
996Paranoia [Mariusz Wojcieszek]
1065A large number of Cal Omega games [Roberto Fresca]
9971066
9981067
9991068
10000.122u4
10690.123u2
10011070-------
10021071
10031072
10041073MAMETesters Bugs Fixed
10051074----------------------
1006gui0121u1gre [Aaron Giles]
1007drivedge0121u4gre [Aaron Giles]
1008bking3076u2red [Pierpaolo Prazzoli]
1009btoads0102u5gre [Aaron Giles]
1010btoads0103u1gre [Aaron Giles]
1011editableui0120u4red [Aaron Giles]
1012cheat0118red [Aaron Giles]
1013altf4_0111u4gre [Aaron Giles]
1014beastrzb097u2red [Oliver Stoneberg]
1015memoryleak0118u1ora [Oliver Stoneberg]
1016memory_leak0111u6ora [Oliver Stoneberg]
1017mahoudai0106u7yel [Philip Bennett]
1018gridiron079gre [David Haywood]
1019maniach37b11gre [David Haywood]
1020matmaniac37b14gre [David Haywood]
1021qzkklgy2_0106u6red [David Haywood]
1022warriorb0109u2gre [David Haywood]
1023vball071u1gre [Bryan McPhail]
1024d3dwindow0117u3red [Aaron Giles, Emuman]
1025arkanoid061gre [Bryan McPhail]
1026flkatck058gre [David Haywood]
1027memleak0119u3ora [Oliver Stoneberg]
1028system24_0120u3red [Atari Ace, Aaron Giles]
1029aleck64_0120red [Aaron Giles]
1030mtetrisc0115u1red [Aaron Giles]
1031suratk0122u3gra [Pierpaolo Prazzoli]
1032suratk0122u3ora [Pierpaolo Prazzoli]
1033skychut37b1yel [couriersud]
1034skychut37b6gre [couriersud]
1035darius2_0114gre [Bryan McPhail]
1036ad2083_0111u5gra [couriersud]
1037abaseb0122u3red [Zsolt Vasvari]
1038ladybug080u1gre [Zsolt Vasvari]
1039suprridr0122u2gra [Zsolt Vasvari]
1040invho2_0122u3red [Zsolt Vasvari]
1041narc37b16yel [Aaron Giles]
1042kingofb37b6gre [robiza]
1043stonebal0117u2gre [Aaron Giles]
1044wotw36b1gre [Zsolt Vasvari]
1045wallst071gre [Zsolt Vasvari]
1046mtrap37b14gre [Zsolt Vasvari]
1047pitfight0109u2gre [Aaron Giles]
1075progear0123u1gra [stephh]
10481076
10491077
10501078
10511079Source Changes
10521080--------------
1053Corrected btoads clocks according XTALs on the PCB. [Aaron Giles]
1081csk.c driver improvements: [Mirko Buffoni]
1082 * Added DIPLOCATION macros to all Dip Switches. All DSW are verified
1083    through test mode.
1084 * Fixed custom_io_r which is used for protection but also for
1085    keyboard input.
10541086
1055"Simplified" MC8123 decryption, though it's still more complicated
1056than I'd like it to be. [Nicola Salmoria]
1087Fixed build with external zlib. [R. Belmont]
10571088
1058Cleaned up clocks in the itech32 driver. [Aaron Giles]
1089Completed old-style colortable removal. Removed
1090MDRV_COLORTABLE_LENGTH macro. Updated uigfx to display new-style
1091color tables if present. [Zsolt Vasvari]
10591092
1060Added partial key for FD1089B 317-0037. [Nicola Salmoria]
1093Reorganized/minor clean-ups to Mad Alien driver. [Zsolt Vasvari]
10611094
1062Fixed bking3 clocks as per Guru readme. Added GAME_WRONG_COLORS flag
1063to bking3. [Pierpaolo Prazzoli]
1095Fixed Xenophobe sprite aligment. [Derek Ledbetter]
10641096
1065TMS34020 fixes: [Aaron Giles]
1066 * Allowed 32-bit pixel sizes
1067 * Fixed RPIX instruction
1097Converted SNES (except debug code) to RGB32 as it was a serious
1098abuser of the palette system. [Zsolt Vasvari]
10681099
1069Added new function input_poll_keyboard_switches to poll for only key
1070events. Expanded the size of the maximum simultaneously pressed
1071switches. [Aaron Giles]
1100Added colortable_palette_get_size() to emupal. Added some more
1101asserts to catch errors. [Zsolt Vasvari]
10721102
1073Removed GAME_IMPERFECT_GRAPHICS from all jpmimpct games bar Cluedo
1074(see driver note). [Philip Bennett]
1103Fixed Dip Switches (especially coinage) and inputs for 'mpatrol' and
1104'troangl' (and their clones). Tried to "unify" the two drivers (I
1105still think that some things can be merged). Added iremipt.h source
1106file (same purpose as taitoipt.h). Fixed Dip Switches and inputs for
1107'alpha1v'. The game is now more playable to me but I left the
1108GAME_NOT_WORKING flag as I think there are still some things to look
1109at). [stephh]
10751110
1076mario driver improvements: [couriersud]
1077 - Hooked up flipscreen
1078 - Changed monitor orientation to ROT0
1111Changed IREM cpu decryption to be 'real-time' (it's a feature of the
1112CPU). Moved decryption table setup to 'config' struct for the CPU.
1113Added latest tables from robiza, making Risky Challenge playable,
1114promoted it to working. Told CPU core to not decrypt code after
1115brkn instruction, enabling it again on iret, allowing me to remove
1116several 'don't decrypt range' hacks in the code. Updated all drivers
1117accordingly. Currently the disassembly is a bit weird now, this will
1118need looking at. [David Haywood, robiza]
10791119
1080Added Z80 DMA chip [couriersud]
1081 - only implements intelligence to emulate dkong3
1082 - fixed a misleading comment in 8257dma.h
1120Added and hooked up AICA (Naomi sound chip). Naomi boot sounds now
1121play. Since it's an SCSPx2 with ADPCM instead of FM it's already
1122feature-complete except filter envelopes. A bug in the ARM7 core
1123causes incorrect pan/level values to be computed in e.g. the Naomi
1124SOUND TEST menu. This is not a defect in the AICA.
1125[ElSemi, Deunan Knute, kingshriek, R. Belmont]
10831126
1084dkong driver improvements: [couriersud]
1085 - hooked up z80dma
1086 - removed 2nd player inputs from sdbk input_ports
1087 - fixed some dump "copy/paste" bugs in dip locations
1127Fixed Dip Switches (especially coinage) and inputs for '10yard' (and
1128its clones). Tried to "unify" the driver with m52 and m57 drivers
1129(I still think that some things can be merged). [stephh]
10881130
1089Added redumped Turkey USA to the seta2.c driver. [Brian Troha]
1131Fixed unaligned 32-bit reads in the ARM7 core. [R. Belmont]
10901132
1091Fixed bad ram pages errors in stactics service mode.
1092[Pierpaolo Prazzoli]
1133Fixed misaligned backgrounds in mpatrol caused by recent changes.
1134[Zsolt Vasvari]
10931135
1094Atari updates: [Aaron Giles]
1095 - Added save state support to slapstic.
1096 - Added save state support to YM2413.
1097 - Modified slapstic code to support address range mirrors.
1098 - Cleaned up Rampart driver:
1099    - simplified rendering code
1100    - full memory map
1101    - added save state support
1136Minor code cleanups. Added static/const where appropriate, plus some
1137include fixes. Reverted some of the changes to build.mak from u1
1138which made some MSVC builds fail, and adjusted/optimized an m10.c
1139gfx_layout. Added some missing cores to cpuintrf.c, sndintrf.c and
1140added some missing #if's to 5220intf.c. [Atari Ace]
11021141
1103Implemented decent-sounding FM in the SCSP. [kingshriek]
1142Fixed one or two dips in the mirage.c driver and found the "service"
1143switch and likely start of inputs. [Brian Troha]
11041144
1105Updated Naomi driver, now boots and shows some test menus (press F2
1106to get into test, use 9 to navigate). Also hooked up ROM board PIO
1107and skeleton for DMA. [R. Belmont, Samuele Zannoli, ElSemi]
1145Removed expand_machine_driver(). Replaced with machine_config_alloc()
1146and machine_config_free(). Updated all call sites. Normalized info.c
1147style and simplified some of the code. [Aaron Giles]
11081148
1109N64 improvements: [SGINut]
1110 - Move texture masking to occur after coordinate adjustment
1111 - Fix 32-bit texturing in load_tile (Mario Kart 64 title screen)
1112 - Add zero-alpha early-out (Mario 64 trees/stars, Mario Kart 64
1113    trees/karts)
1149Renamed machine->drv to machine->config to reduce overloading of the
1150term "driver". [Aaron Giles]
11141151
1115ad2083 improvements: [couriersud]
1116 * completed tms5110A code
1117 * working speech synthesis
1118 * documented analysis done on pcb pictures and findings
1119 * as a consequence, marked all sound roms as BAD DUMP
1120 * created sound driver in scramble.c
1152Simplified collision detection in taitosj and tank8. [Zsolt Vasvari]
11211153
1122Cleaned up graphics layouts in preparation for new format. Added new
1123GFXLAYOUT_RAW() macro to normalize definition. Added new validation
1124code. Made all remaining instances of gfx_layouts const. [Atari Ace]
1154New module: devintrf.c/.h. Implements a generic device interface
1155similar to the sound and CPU interfaces. [Aaron Giles]
11251156
1126Updated Amiga driver to use formal XTALs. [Dirk Best]
1157New module: mconfig.c/.h. Moved all machine_config and MDRV_* macros
1158here, out of driver.c/.h. Added MDRV macros for adding/removing/
1159configuring devices. [Aaron Giles]
11271160
1128Changed 6522 emulation such that when writing to the ACR register with
1129the timer 1 in continuous counting mode, the timer 1 value should not
1130be reloaded but keep on counting. [Wilbert Pol]
1161Deprecated the following constants because global constants that
1162pretend to document things but which are only guesses are dumb:
1163  - DEFAULT_60HZ_VBLANK_DURATION
1164  - DEFAULT_30HZ_VBLANK_DURATION
1165  - DEFAULT_REAL_60HZ_VBLANK_DURATION
1166  - DEFAULT_REAL_30HZ_VBLANK_DURATION
1167  - DEFAULT_60HZ_3S_VBLANK_WATCHDOG
1168  - DEFAULT_30HZ_3S_VBLANK_WATCHDOG
1169Updated all drivers to explicitly specify the equivalent bogus
1170times. Added comments for the "REAL" VBLANK durations to indicate
1171that they are not accurate. [Aaron Giles]
11311172
1132Added XTAL defines to bfm_sc2.c and cleaned up lvcards.c.
1133[James Wallace]
1173Improved some DIP switches, added some DIP locations, replaced
1174IPT_COINx with IPT_SERVICE1 where appropiate, and simplified some
1175control definitions in the following drivers: alpha68k.c, actfancr.c,
1176aeroboto.c, aerofgt.c, aliens.c, ambush.c, amidar.c, amspdwy.c,
1177angelkds.c, appoooh.c, arabian.c, argus.c, arkanoid.c. [RansAckeR]
11341178
1135Added default layout to neogeo games allowing for either cropping or
1136stretching to the alternate 304x224 layout. Removed default cropping
1137in the driver. [David Haywood, Aaron Giles]
1179Connected the Shadow Warriors buttons like they are wired on the
1180original pcb (which is jamma). [Corrado Tomaselli]
11381181
1139Fixed crash when saving state of older DCS-based games. Added save
1140state support to the midvunit driver. [Aaron Giles]
1182Added DIP locations to: cclimbr2 , legion, terraf, ultennis, cheesech,
1183stonebal, stoneba2,  scessjoe, ashnojoe, asteroid, llander, llander1,
1184astdelux. [RansAckeR]
11411185
1142Major improvements to Cycle Warriors video code (still not perfect,
1143but road layer works now). [Bryan McPhail]
1186Fixed multi-session crash with Namco System 2 games. [Atari Ace]
11441187
1145Major rewrite of skychut.c. There are still some glitches and it is
1146not perfect but the following has been achieved: [couriersud]
1147 * adds samples to ipm invaders - just rename your old invaders
1148    samples to ipminvad to test
1149 * added - amongst others - "capsule" dip switch to ipm invaders
1150 * sound ports identified
1151 * demo sound and cabinet type driver configuration
1188Improved Print Club DIP switches. [Edward Swiftwood]
11521189
1153Updated memory configuration for Superboard game versions in peplus
1154driver. Fixes CMOS DATA errors on reload. [Jim Stolis]
1190Fixed a few corner cases in the 6840 emulation based on running the
1191MPU4 test ROMs, and added the ability to dynamically alter the
1192external clock frequencies in game. [James Wallace]
11551193
1156Rewrote the CVS system video code. [Zsolt Vasvari]
1194Changed the 6850 core to allow dynamic RX and TX clock alteration,
1195to at least try to remove a few of the MPU4 timing problems.
1196[James Wallace]
11571197
1158Fixed S2650 register window display. [Zsolt Vasvari]
1198Updated documentation of the MPU4 Video board. Added documentation of
1199the Cosmic Chasm crystals, and merged the memory maps. [James Wallace]
11591200
1160Added sound to Cycle Warriors and Big Fight. Corrected OKI M6295
1161clock values. [Philip Bennett]
1201Fixed validation fail of '_mul_32x32_hi()' and '_mulu_32x32_hi()'
1202inline function when compiled GCC v3.3.5 with I686 optimization.
1203[KO Myung-Hun]
11621204
1163Fixed missing arrow in Venture on the zoomed out map, and the
1164incorrect fading twister in Hard Hat. [Zsolt Vasvari]
1205Verified clocks on Rainbow Islands and Rambo 3 and Raiden 2. Reverted
1206sound OSC of Truxton 2 to 27mhz/8 since the original OST runs at this
1207speed. The pcb I measured the previous clock was 28mhz/8 and it's a
1208different pcb version from the common one. Since mame doesn't support
1209multiple OSC I prefer to use the 27mhz one. [Corrado Tomaselli]
11651210
1211Fixed some incorrect rom dumps for Double Dragon 3 (Some of the dumps
1212were based of the bootleg and not the original.) and updated the name
1213and location to actually match that of a real board. [Kevin Eshbach]
11661214
1215Added DIP locations to Combatribes and Battletoads. [Kevin Eshbach]
11671216
1168New games added or promoted from NOT_WORKING status
1169---------------------------------------------------
1170Dangerous Curves [Philip Bennett, Dazzer]
1171Big Fight [Bryan McPhail]
1217Added video_screen_update_now(int scrnum) to force a screen update up
1218to the current beam position. [Zsolt Vasvari]
11721219
1220Pulled remaining vestiges of old-style colortables: [Aaron Giles]
1221 * PALETTE_INIT no longer has a colortable parameter
1222 * removed game_colortable and remapped_colortable from machine_config
1223 * updated a few stragglers that still referenced these fields
1224 * removed tile_draw_colortable from tilemap.c
11731225
1226Changed the input port tokens to use a union instead of casting
1227everything to FPTR. In the future, C99-enabled compilers will be able
1228to achieve type safety with designated initializers. [Aaron Giles]
11741229
1175New clones added
1176----------------
1177Invasion - The Abductors (version 5.0) [Brian Troha]
1178Alien Syndrome (set 5, System 16A, FD1089B 317-0037) [Nicola Salmoria]
1179Dragon Spirit (Atari license) [Satoshi Suzuki]
1230Added i8749 CPU variant for MESS. [Curt Coder]
11801231
1232Added missing SH4 instructions and bugfixed the FPU. Improved Naomi
1233I/O board emulation and added working controls. [Samuele Zannoli]
11811234
1235jedi.c improvements: [Zsolt Vasvari]
1236 - Complete memory map
1237 - Crystals
1238 - Driver state structure
1239 - Text layer is rendered at the same time as the background
11821240
11830.122u3
1184-------
1241Reorganized Qix driver (driver state, decoupled audio section, etc.)
1242[Zsolt Vasvari]
11851243
1244Changed all drivers using the MC6845 chip to use the new device
1245interface. Removed mc6845_config. [Zsolt Vasvari]
11861246
1187MAMETesters Bugs Fixed
1188----------------------
1189hstennis0103u2gra [Brian Troha]
1190edrandy0113gra [Brian Troha]
1191robocop2_0106u3gra [Brian Troha, Bryan McPhail]
1192mario0110u1gre [couriersud]
1193sbrkout0118yel [R. Belmont, Adam Bousley]
1194pestplce0122red [couriersud]
1195funkyjet055yel [Bryan McPhail]
1196liberate074u1gre [Bryan McPhail]
1197tokiu056gre [Bryan McPhail]
1198powerbls0112u4red [Pierpaolo Prazzoli]
1199wwestern0115u1yel [Atari Ace]
1200namcos1_0118u2yel [Atari Ace]
1201victnine0116u2red [Pierpaolo Prazzoli]
1202btoads0103gre [Aaron Giles]
1247Reorganized Gameplan driver. Changed Trivia Quest use the Gameplan
1248video code. Added crystal for Gameplan pixel clock. [Zsolt Vasvari]
12031249
1250Removed the unnecessary pen array lookup from some INDEXED16 drivers.
1251[Zsolt Vasvari]
12041252
1253Removed the per-screen palette_base. This was an idea that never
1254really worked out, nor have we really needed it. [Aaron Giles]
12051255
1206Source Changes
1207--------------
1208Fixes clocks for Orbs. [David Haywood, Tomasz Slanina]
1256Defined a new device type VIDEO_SCREEN. Currently this has no
1257live functionality, but merely serves as a placeholder/identifier
1258for video screens. Eventually some of the screen management code
1259may move into the start/stop/reset functions. [Aaron Giles]
12091260
1210Fixed various 64-bit GCC warnings. [R. Belmont]
1261Changed MDRV_SCREEN_ADD to specify a screen type (RASTER, VECTOR,
1262LCD for the moment). Removed the older VIDEO_TYPE_RASTER and
1263VIDEO_TYPE_VECTOR; this information is now determined by walking
1264the screen list. [Aaron Giles]
12111265
1212Improves accuracy and documentation of NSS/SNES DSP-1.
1213[Andreas Naive, R. Belmont]
1266Changed MDRV_SCREEN_* macros to build up VIDEO_SCREEN devices
1267rather than storing values in the screen[] array. Removed the
1268screen[] array from machine_config. Modified all code referencing
1269Machine->config->screen[] and changed it to iterate over the devices
1270using the new video_screen_first() and video_screen_next()
1271functions. [Aaron Giles]
12141272
1215Added new file xtal.h, documenting all known arcade PCB clock cystals.
1216Drivers should be updated to use these as a basis for their clocks,
1217and the list should be augmented as additional crystals are found.
1218[Guru, Aaron Giles]
1273Removed implicit screen #0. This means that ALL DRIVERS MUST
1274EXPLICITLY DECLARE THEIR SCREENS. Updated all drivers to do
1275so. While there, grouped all MDRV_SCREEN_* parameters together.
1276Also removed unnecessary VIDEO_TYPE_RASTER and VIDEO_TYPE_VECTOR.
1277Also removed VBLANK and bitmap format information from vector
1278games. This was painful and very tedious. [Aaron Giles]
12191279
1220suprloco improvements: [Pierpaolo Prazzoli]
1221 * Fixed IC.34 memory test
1222 * Fixed 2nd player cocktail mode
1223 * Changed coin3 to service1
1224 
1225Cleaned up inputs/DIP switches in cninja driver. [Brian Troha]
1280Changed game information to display info about all screens.
1281[Aaron Giles]
12261282
1227Rewrote mario.c: [couriersud]
1228 - rewrote driver, separate MACHINE_DRIVER(mario_audio)
1229 - palette from schematics
1230 - video timing from schematics
1231 - driver configuration switch Nintendo/Std Monitor
1232 - got rid of COLORTABLE
1283Changed Beathead driver to use partial updates instead of caching
1284scanline level information. [Zsolt Vasvari]
12331285
1234Fixed typo for IO1 irq callback in hyperstone core.
1235[Pierpaolo Prazzoli]
1286Added state_save_combine_module_and_tag(). Its purpose is to create
1287a unique name for state saving purposes in modules that are tag
1288based (no index). [Zsolt Vasvari]
12361289
1237Added memory_get_bank() function. Fixed logging in memory.c to to use
1238%p for pointer values. [Aaron Giles]
12391290
1240Fixed save states in i8051 cpu core [Pierpaolo Prazzoli]
12411291
1242Implemented a few SysCtrl, Maple, and PVR/HOLLY bits for Naomi. The
1243BIOS gets slightly further but is nowhere near starting up.
1244[R. Belmont]
1292New games added or promoted from NOT_WORKING status
1293---------------------------------------------------
1294Champion Poker [Mirko Buffoni]
1295Risky Challenge [robiza]
12451296
1246Zeus updates: [Aaron Giles]
1247 * Better documented various bit latches.
1248 * Hooked up crusnexo lamp board (added layout).
1249 * Fixed year in MK4 startup test.
12501297
1251Fixed TMS5110 tables. [couriersud, Lord Nightmare]
12521298
1253Removed ui_popup(). Drivers should always be using popmessage()
1254instead (has been this way for a while). Augmented popmessage() so
1255that you can pass NULL to immediately dismiss any messages.
1256[Aaron Giles, thanks to Oliver Stoneberg's suggestion]
1299New clones added
1300----------------
1301Fighting Soccer (Japan) [Yasuhiro Ogawa]
1302Red Hawk (Excellent Co., Ltd) [Brian Troha]
12571303
1258Added ATTR_PRINTF to a number of functions that have printf semantics.
1259[Oliver Stoneberg]
12601304
1261Rewrote sbrkout driver based on schematics: [Aaron Giles]
1262 * XTAL-based timing
1263 * Correct video timing
1264 * Full memory map
1265 * Correct memory usage ("zero page" RAM is shared with videoram)
1266 * Removed all input hacks
1267 * Fixed interrupt generation
1268 * Connected coin counters
1269 * Added save state support
12701305
1271Fixed several UNICODE=1 issues in the debugger. Changed the Windows
1272build process to always enable UNICODE=1 for 64-bit builds.
1273[Oliver Stoneberg, Aaron Giles]
1306New games marked as GAME_NOT_WORKING
1307------------------------------------
1308Toy Fighter [Corrado Tomaselli]
12741309
1275Added save state support to btoads. [Aaron Giles]
12761310
1277Fixed onna34ro mcu simulation properly. [Pierpaolo Prazzoli]
12781311
1279
1280
1281New clones added
1282----------------
1283Mutant Fighter (World, EM-3) [Stefan Lindberg]
1284The Simpsons (2 Players Asia) [Arzeno Fabrice]
1285
1286
1287
12880.122u2
13120.123u1
12891313-------
12901314
12911315
12921316MAMETesters Bugs Fixed
12931317----------------------
1294pestplce0122red [couriersud]
1295hunchbkd0122red [couriersud]
1296radarscp0122yel [couriersud]
1297mwalk0122red [couriersud]
1298qtheater0122u1ora [Philip Bennett]
1318jantouki0121u3gra [RansAckeR]
1319mcnpshnt0120u3gra [RansAckeR]
1320mjdialq2_0120u3gra [RansAckeR]
1321mjifb0111u2gra [RansAckeR]
1322goldbug0105u4gra [stephh]
1323zn.c0122u8yel [smf]
1324pwrinst2_0122u8gra [Sonikos]
12991325
13001326
13011327
13021328Source Changes
13031329--------------
1304Fixed M65C02 optimization. [Peter Trauner]
1330Removed 'type' parameter from tilemap_create. [Zsolt Vasvari]
13051331
1306TMS51xx and M58817 speech updates: [couriersud]
1307 - radarsc1 uses tms5110 speech synth
1308 - cvs games: according to PCBInfos speech chip is TMS5100.
1309    Changed driver to use TMS5100 and "game system operational" now
1310    sounds more natural
1311 - removed sound/m58817.*
1312 - added support for multiple coefficients maps to tms5110.*
1313 - added coefficient maps for TMS5100 and M58817 from documented
1314    sources to tms5110r.c
1315 - fixed interpolation factors (see tms5110r.c for reason)
1316 - made lattice calculation precision 9bit
1317 - added support for READBIT and LOADADDRESS commands to tms5110.c
1318 - more changes in line with various patents
1319 - documented TRS-02, TKG-02/03 "voice" interface
1332audio/dkong.c: [couriersud]
1333 * fix dkong audio over-modulation issue with DAC sound
1334 * surround the fix with a DK_REVIEW define for later review.
13201335
1321Completed the addition of static qualifiers to all MAME symbols that
1322aren't explicitly exported. [Atari Ace]
1336Changed the use of machine->remapped_colortable to machine->pens where
1337the drivers weren't using color tables. [Zsolt Vasvari]
13231338
1324Named the input_seq_type enumeration and used it explicitly in several
1325places. [Nathan Woods]
1339Corrected the clocks on the following pcbs: Formation Z, MagMax,
1340SlapFight and Tiger Heli. Changed Oki m6295 pin 7 to "high" on Toki
1341and Blood Bros. [Corrado Tomaselli]
13261342
1327Corrected tx1 and tx1a coinage DSW assignments. Reversed buggyboy/
1328buggybjr 'Game Time' settings. [Philip Bennett]
1343Improve build independence for CPU/sound cores. Rescued the M65CE02
1344core from bitrot hell, and fixed some MESS cores that were broken by
1345the deprecat.h changes. [Atari Ace]
13291346
1330TMS3203x core updates: [Aaron Giles]
1331 * fixed interrupt handling
1332 * added support for edge-triggered interrupts on '32
1333 * expanded interrupt support for the '32
1334 * updated drivers using TMS3203x core to deassert interrupts
1335 * added externally accessible functions for converting '3x floating point
1336    format
1337 * updated gaelco3d driver to use new functions
1347Corrected the initial detection of extended INP files.
1348[Barry Rodewald]
13381349
1339Zeus2 (+related) updates: [Aaron Giles]
1340 * fixed save states for DCS games
1341 * cleaned up Zeus2 waveram handling
1342 * added Zeus2 save state support
1343 * added preliminary model and quad rendering support for Zeus2
1344 * added support to timekpr for the ZPRAM used on Zeus2
1345 * hooked up ZPRAM in Zeus2 games
1346 * hooked up controls in Zeus2 games
1347 * updated poly.c to ensure it is idle before saving state
1348 * Added artifical Z offset of -2 to make the full screen show in crusnexo
1350Moved Galaxy Games emulation to tmaster.c. [Luca Elia]
13491351
1350Replaced tekken2/tekken2a/tekken2b 'tes1wave.8k' ROM with the
1351correct, non-byte-swapped dump. [Philip Bennett]
1352makefile/build updates: [couriersud, Aaron Giles]
1353 * moved verinfo.c to src/build
1354 * moved rules for verinfo to src/build/build.mak
1355 * removed osdcore.h from file2str.c, verinfo.c, png2bdc.c
13521356
1353Added discrete 74LS624(56789) implementation [couriersud]
1354 - DISCRETE_74LS624 is a VCO needed for dkongjr
1355 - Supports Logic, Energy and Count outputs
1357Removed color tables from gsword, hyperspt, jailbrek, magmax,
1358konamigx, markham, megazone, pandoras, rocnrope, strnskil, trackfld,
1359tp84, shaolins, scotrsht, pingpong, skykid, wiping, punchout, ikki,
1360rallyx, fastfred, fcombat, finalizr, flower, funworld, galivan,
1361gdrawpkr, goldstar, hanaawas, higemaru, ironhors, jackal, kchamp.
1362Added resnet.c color computations where appropriate. [Zsolt Vasvari]
13561363
1357dkong updates: [couriersud]
1358 - Added dkongjr discrete sound
1359 - Proper interface Z80 - I8035 for dkongjr
1360 - Changed discrete sound output factors
1361 - removed samples support for dkongjr
1362 - Cosmetic changes
1363 - Fixed regression in radarscp sound
1364 - Added dipswitch locations to dkong3b
1364Simplfied Mag Max background drawing code. [Zsolt Vasvari]
13651365
1366Documentation and clock frequency improvements for seta.c: [Brian Troha]
1367 - Added the Guru's readme info for Thundercade
1368 - Corrected rom name for Thundercade
1369 - changed clocks to OSC by divider IE: 16000000/2 /* 8MHz */
1370 - Changed Orbs clock to 16MHz with note about 14.xx MHz
1371 - Changed Meta Fox's x0-006 (65c02) to same as Thundercade
1372 - Changed the YM3438 in Ultra Toukond Densetsu from 6MHz to 1600000/4
1373    /* 4MHz */ as there is no mention of 6MHz OSC on PCB
1366Further altered the Exidy 440 code in preparation for moving to proper
1367sound chip emulation. [Zsolt Vasvari]
13741368
1375Verified a number of clock frequencies from real PCBs.
1376[Corrado Tomaselli, Zsolt Vasvari]
1369Unified transparency handling between scotrsht, shaolins, tp84.
1370[Zsolt Vasvari]
13771371
1378Fixed several memory leaks related to SCSI CD emulation.
1379[Oliver Stoneberg]
1372Split timer_adjust() into timer_adjust_oneshot() and
1373timer_adjust_periodic(). Updated all call sites. [Aaron Giles]
13801374
1381Removed the increasing of the R register from each IX/IY related
1382(FD xx or DD xx) instruction on the Z80. According to documentation
1383and the behavior of the Amstrad CPC driver, this is incorrect.
1384[Barry Rodewald]
1375Fixed some arkanoid clones INPUT_PORTS definitions that were curiously
1376using PORT_START_TAG("DSW") instead of PORT_MODIFY("DSW"). [stephh]
13851377
1386Added initial FPU support to the SH4 core. [Samuele Zannoli]
1378Fixed DIP switches and inputs for all games in cvs.c. [stephh]
13871379
1388Adjusted most conditional logging in MAME to use the idiom
1389"do { if (VERBOSE) logerror x; } while (0)". This has the benefit that
1390the compiler checks the syntax of the logging even in the case it will
1391be eliminated, and in fact a number of cases here needed adjustments
1392to compile because of this. [Atari Ace]
1380Added HOTD2-specific BIOSes. [Arzeno Fabrice]
13931381
1382Added more accurate emulation of the priority system and the beam
1383logic in stactics. Removed color table. Centered crosshair. Used
1384proper game orientation. Unified memory maps. Switched game to use the
1385artwork system. Set GAME_IMPERFECT_GRAPHICS until artwork is created.
1386[Zsolt Vasvari]
13941387
1388Added sound support to Champion Skill. Removed GAME_NO_SOUND flags.
1389Increased interrupts per frame, music was too slow. Minor comments
1390adjustment. [Mirko Buffoni]
13951391
13960.122u1
1397-------
1392Used PORT_SERVICE and PORT_SERVICE_NO_TOGGLE macros when it was
1393possible. [stephh]
13981394
1395In the cps2 driver, Changed the GAME definitions to reflect how many
1396players and how many buttons there are for each game. Rewrote the
1397INPUT_PORTS definitions to use PORT_INCLUDE, PORT_MODIFY and
1398PORT_CUSTOM macros. Added a few notes about the inputs when I thought
1399they were needed to avoid wrong bug reports. Started to clean the
1400driver. [stephh]
13991401
1400MAMETesters Bugs Fixed
1401----------------------
1402ym2610_0119u2gre [Philip Bennett]
1402Added PCB and/or chip docs updates for Blaze On (kaneko16.c),
1403Sand Scorpion (sandscrp.c), Flash Point (segas16b.c). [Brian Troha]
14031404
1405Fixed kangaroo colors by assuming an inversion not present in the
1406schematics. [Nicola Salmoria]
14041407
1408Added the ability to pass absolute paths to mame_schedule_save() and
1409mame_schedule_load(). [Nathan Woods]
14051410
1406Source Changes
1407--------------
1408Zeus updates: [Aaron Giles]
1409 * Figured out data format of 2 matrix form.
1410 * Extracted data for lights.
1411 * Added backface culling which mostly works but fails sometimes, so
1412    it is disabled.
1413 * Started on some initial lighting calculations.
1414 * Cleaned up zeus wave RAM accessors.
1415 * Changed rendering code to allow for greater parallelism on multicore
1416    systems.
1417 * Removed some vestigial zeus 2 hacks.
1418 * Reduced visible area to remove artifacts.
1419 * Made right/bottom vertices inclusive to fix some gapping issues.
1420 * Fixed invasn lightgun offset.
1411Naomi/DC updates: [Samuele Zannoli]
1412 - Add SH4 I/O ports
1413 - Connected the 93C46 of the naomi and the x76f100 of the rom board
1414    and filled them with dummy data to satisfy the BIOS
1415 - Implemented some of the JVS transfers that will be needed to use
1416    the controls
1417 - Implemented ROM board DMA
1418 - Set proper NAOMI RAM sizes (32 MB main, 8 MB for AICA)
1419 - Improved PVR-TA graphics emulation
14211420
1422Zeus 2 hardware:
1423 * Fixed ROM loading, added banking support.
1424 * Separated zeus 2 video implementation from zeus implementation.
1425 * Implemented direct pixel accesses; enough to get startup screens
1426    to show.
1427 * Hooked up ZPRAM.
1428 * Fixed digital inputs for crusnexo.
1429 * Fixed default screen parameters to match the games.
1421Set proper ARM7 clock for Naomi. [Deunan Knute]
14301422
1431Afega/nmk16 cleanups: [David Haywood, Tomasz Slanina]
1432 * Merged afega.c and nmk16.c drivers
1433 * Removed many hacks from both.
1434 * Fixed a number of games
1423ARM7 updates: [Anonymous]
1424 - correct mode at reset (it's always 0b1....)
1425 - HandlePSRTransfer: remove wrong code, correct detection of
1426    privileged mode
1427 - correct carry output for ROR
1428 - Thumb ASR Rd,Rs: correct carry computation
1429 - Thumb ldmia/stmia: correct value for writeback when the writeback
1430    reg is in the list
1431 - ARM ldm/stm ignore lower bits of the address
1432 - most of the exceptions force the I bit
1433 - ignore some flag bits in the CPSR
14351434
1436Fixed C219 sample read order and implemented sign+magnitude format.
1437Removed GAME_IMPERFECT_SOUND flag from all Namco NA-1 games.
1438[Philip Bennett]
1435Some improvements to the Funworld driver and new games added.
1436[Roberto Fresca]
1437 - Switched to XTAL def.
1438 - Fixed Magic Card II graphics issues.
1439 - Fixed Magic Card II inputs.
1440 - Fixed screen and visible area to snooker10.
1441 - Renamed set monglfir to mongolnw.
1442 - Renamed sets description based on languages instead of countries.
1443 - Fixed some years and manufacturers.
1444 - Updated technical notes.
1445 - Cleaned up the driver.
1446 
1447Did some cleanup of the 'special case' mess that the rallyx driver
1448has become. [Zsolt Vasvari]
14391449
1440Fixed ROM-based DCS2 system to ignore HLE transfers. (Fixes broken
1441sound in invasn.) Properly reduced internal memory on the ADSP-2104
1442variants. [Aaron Giles]
1450Removed no longer used TRANSPARENCY_COLOR. [Zsolt Vasvari]
14431451
1444Fixed bug that would cause events to leak through to the game when the
1445debugger was up. [Aaron Giles]
1452MC6845 updates: [Zsolt Vasvari]
1453 - changed the 6845 to be handle based -- adjusted all drivers
1454 - renamed crtc6845 to mc6845
1455 - allow reading registers 12 and 13
1456 - reading write-only registers return 0
1457 - updated comments in header
1458 
1459Changed qix.c to RGB32 mode and made its videoram_w do the partial
1460updating instead of a per scanline timer. [Zsolt Vasvari]
14461461
1447Verified some cpu clocks of original boards using a frequency counter:
1448[Corrado Tomaselli]
1449 * Changed Success Joe Ym2203 clock from 3mhz to 4mhz
1450 * Changed Pang M6295 clock from 990khz to 1Mhz
1451 * Changed Halley Comet main cpu clock to 1.664mhz (it's not a
1452    mistake, the clock is very low)
1453 * Besides confirming clocks on some games, I modified:
1454 * Aerofighters and Turbo Force sound z80 to 5mhz
1455 * Midnight Resitance 68k cpu to 10mhz (20mhz crystal) and modified
1456    m6295 clock to 1mhz. Also confirmed pin 7 is high.
1457    (Midnight resistance has a lot of slow downs on the pcb too)
1462Fixed 'mario' and 'masao' memory maps to match the Dip Switches port
1463name. [stephh]
14581464
1459Minor "code quality" improvements: [Atari Ace]
1460 * fixed some remaining static/const qualifier missed cases
1461 * fixed some missing #include "foo.h"
1462 * a few global names were modified to make them less generic/more
1463    consistent (voodoo.c, vrender0.c, lethal.c, rungun.c, zac2650.c)
1464 * some dead/useless code was removed (i8051.c,model1.c,romcmp.c)
1465Fixed pooyan transparency. Updated to use resnet code. [Zsolt Vasvari]
14651466
1467Changed ZN2 clock speed to 100MHz to match board notes. [smf]
14661468
1469Added DIP locations for sitv, sicv, invadpt2, lrescue, invasion. Fixed
1470coin2 for superinv & invasion. [RansAckeR]
14671471
1472Added initialization to machine/nmk112.c. This resolves a multi-
1473session audio problem reported for donpachi. Also added some variable
1474initialization to machine/n64.c to fix running starsldr multi-session.
1475[Atari Ace]
1476
1477Added diplocations to policetr and marked some as unused based on
1478manual and schematics. [Mike Ellery]
1479
1480Fixed fatal error in the maxaflex, mf_bdash and mf_achas drivers.
1481[Atari Ace]
1482
1483Several more risky challenge opcodes. You can now see "gameplay".
1484[robiza]
1485
1486
1487
14681488New games added or promoted from NOT_WORKING status
14691489---------------------------------------------------
1470Invasion [Aaron Giles]
1471Buggy Boy Junior/Speed Buggy (Upright) [Philip Bennett]
1472Task Force Harrier [David Haywood, Tomasz Slanina]
1473US AAF Mustang [David Haywood, Tomasz Slanina]
1474Black Heart [David Haywood, Tomasz Slanina]
1475Red Hawk [David Haywood, Tomasz Slanina]
1476Stagger I [David Haywood, Tomasz Slanina]
1477Sen Jin - Guardian Storm [David Haywood, Tomasz Slanina]
1478Spectrum 2000 [David Haywood, Tomasz Slanina]
1479Fire Hawk [David Haywood, Tomasz Slanina]
1490Galaxy Games (BIOS v1.90) [Luca Elia]
1491Royal Vegas Joker Card [Roberto Fresca]
14801492
14811493
14821494
14831495New clones added
14841496----------------
1485World Class Bowling (v1.3) [Brian Troha]
1486
1497Contra (US, Set 2) [Brian Troha]
1498Zero Wing (2 player simultaneous ver.) [Brian Troha]
1499Sand Scorpion (Revised Hardware) [Stefan Lindberg]
1500Galaxian (Taito) [Stefan Lindberg]
1501Jolly Card (3x3 deal) [Roberto Fresca]
1502Jolly Card Professional 2.0 [Roberto Fresca]
1503Lucky Lady (3x3 deal) [Roberto Fresca]
1504Lucky Lady (4x1 aces) [Roberto Fresca]
1505
1506
1507
1508New games marked as GAME_NOT_WORKING
1509------------------------------------

Previous 15994 Revisions Next


© 1998-2018 The MESS Team