| 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 |
| r2086 | r2087 | |
|---|---|---|
| 50 | 50 | {RES_K(22)+250, RES_K(10)+250, RES_K(5.6)+250, RES_K(3.3)+250} |
| 51 | 51 | }; |
| 52 | 52 | |
| 53 | DISCRETE_SOUND_START(qix) | |
| 53 | static DISCRETE_SOUND_START(qix) | |
| 54 | 54 | /* NODE */ |
| 55 | 55 | DISCRETE_INPUTX_DATA(QIX_DAC_DATA, 128, -128*128, 128) |
| 56 | 56 | DISCRETE_INPUT_DATA (QIX_VOL_DATA) |
| r2086 | r2087 | |
|---|---|---|
| 122 | 122 | static UINT8 ay_outputa; |
| 123 | 123 | static UINT8 ay_outputb; |
| 124 | 124 | |
| 125 | static double weights0[ | |
| 125 | static double weights0[4], weights1[3], weights2[3]; | |
| 126 | 126 | static int eng0[4]; |
| 127 | 127 | static int eng1[4]; |
| 128 | 128 | static int eng2[4]; |
| r2086 | r2087 | |
|---|---|---|
| 836 | 836 | |
| 837 | 837 | /* Namco System 22 games */ |
| 838 | 838 | DRIVER( ridgerac ) /* (c) 1993 */ |
| 839 | DRIVER( ridgerab ) /* (c) 1993 */ | |
| 839 | 840 | DRIVER( ridgeraj ) /* (c) 1993 */ |
| 840 | 841 | DRIVER( acedrvrw ) /* (c) 1994 */ |
| 841 | 842 | DRIVER( alpinerd ) /* (c) 1994 */ |
| r2086 | r2087 | |
|---|---|---|
| 40 | 40 | |
| 41 | 41 | MACHINE_DRIVER_EXTERN( stactics_video ); |
| 42 | 42 | |
| 43 | WRITE8_HANDLER( stactics_palette_w ); | |
| 44 | 43 | WRITE8_HANDLER( stactics_scroll_ram_w ); |
| 45 | 44 | WRITE8_HANDLER( stactics_speed_latch_w ); |
| 46 | 45 | WRITE8_HANDLER( stactics_shot_trigger_w ); |
| r2086 | r2087 | |
|---|---|---|
| 1 | /*----------- defined in video/equites.c -----------*/ | |
| 2 | ||
| 1 | 3 | extern UINT16 *equites_bg_videoram; |
| 2 | 4 | |
| 3 | 5 | extern READ16_HANDLER(equites_fg_videoram_r); |
| r2086 | r2087 | |
| 7 | 9 | extern WRITE16_HANDLER(equites_bgcolor_w); |
| 8 | 10 | extern WRITE16_HANDLER(splndrbt_selchar0_w); |
| 9 | 11 | extern WRITE16_HANDLER(splndrbt_selchar1_w); |
| 10 | extern WRITE16_HANDLER(splndrbt_bgcolor_w); | |
| 11 | 12 | extern WRITE16_HANDLER(equites_flip0_w); |
| 12 | 13 | extern WRITE16_HANDLER(equites_flip1_w); |
| 13 | 14 | extern WRITE16_HANDLER(splndrbt_flip0_w); |
| r2086 | r2087 | |
|---|---|---|
| 34 | 34 | extern UINT8* orbit_sprite_ram; |
| 35 | 35 | |
| 36 | 36 | extern WRITE8_HANDLER( orbit_playfield_w ); |
| 37 | extern WRITE8_HANDLER( orbit_sprite_w ); |
| r2086 | r2087 | |
|---|---|---|
| 549 | 549 | static void wbbc97_draw_bitmap(bitmap_t *bitmap) |
| 550 | 550 | { |
| 551 | 551 | int x,y,count; |
| 552 | int color; | |
| 553 | 552 | |
| 554 | 553 | count = 16; // weird, the bitmap doesn't start at 0? |
| 555 | 554 | for (y=0;y<256;y++) |
| 556 | { | |
| 557 | 555 | for (x=0;x<512;x++) |
| 558 | 556 | { |
| 559 | color = wbbc97_bitmapram[count] >> 1; | |
| 557 | int color = wbbc97_bitmapram[count] >> 1; | |
| 560 | 558 | |
| 561 | 559 | /* 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; | |
| 564 | 562 | |
| 565 | 563 | count++; |
| 566 | 564 | count &= 0x1ffff; |
| 567 | 565 | } |
| 568 | } | |
| 569 | 566 | } |
| 570 | 567 | |
| 571 | 568 |
| r2086 | r2087 | |
|---|---|---|
| 22 | 22 | } |
| 23 | 23 | |
| 24 | 24 | |
| 25 | WRITE8_HANDLER( orbit_sprite_w ) | |
| 26 | { | |
| 27 | orbit_sprite_ram[offset] = data; | |
| 28 | } | |
| 29 | ||
| 30 | ||
| 31 | 25 | static TILE_GET_INFO( get_tile_info ) |
| 32 | 26 | { |
| 33 | 27 | UINT8 code = orbit_playfield_ram[tile_index]; |
| r2086 | r2087 | |
| 35 | 29 | int flags = 0; |
| 36 | 30 | |
| 37 | 31 | if (code & 0x40) |
| 38 | { | |
| 39 | 32 | flags |= TILE_FLIPX; |
| 40 | } | |
| 41 | 33 | if (orbit_flip_screen) |
| 42 | { | |
| 43 | 34 | flags |= TILE_FLIPY; |
| 44 | } | |
| 45 | 35 | |
| 46 | 36 | SET_TILE_INFO(3, code & 0x3f, 0, flags); |
| 47 | 37 | } |
| r2086 | r2087 | |
| 79 | 69 | code &= 0x3f; |
| 80 | 70 | |
| 81 | 71 | if (flag & 1) |
| 82 | { | |
| 83 | 72 | code |= 0x40; |
| 84 | } | |
| 85 | 73 | if (flag & 2) |
| 86 | { | |
| 87 | 74 | zoom_x *= 2; |
| 88 | } | |
| 89 | 75 | |
| 90 | 76 | vpos = 240 - vpos; |
| 91 | 77 |
| r2086 | r2087 | |
|---|---|---|
| 59 | 59 | int width = video_screen_get_width(machine->primary_screen); |
| 60 | 60 | int height = video_screen_get_height(machine->primary_screen); |
| 61 | 61 | |
| 62 | saa5050_vidram = auto_malloc(0x800); | |
| 63 | ||
| 64 | 62 | /* configure the S2636 chips */ |
| 65 | 63 | // s2636_0 = s2636_config(malzak_s2636_0_ram, height, width, -8, -16); |
| 66 | 64 | // s2636_1 = s2636_config(malzak_s2636_1_ram, height, width, -9, -16); |
| r2086 | r2087 | |
| 248 | 246 | return 0; |
| 249 | 247 | } |
| 250 | 248 | |
| 251 | WRITE8_HANDLER( playfield_w ) | |
| 249 | WRITE8_HANDLER( malzak_playfield_w ) | |
| 252 | 250 | { |
| 253 | 251 | int tile = ((malzak_x / 16) * 16) + (offset / 16); |
| 254 | 252 |
| r2086 | r2087 | |
|---|---|---|
| 178 | 178 | |
| 179 | 179 | void K001005_swap_buffers(void); |
| 180 | 180 | |
| 181 | void K001005_i | |
| 181 | static void K001005_exi | |
| 182 | 182 | { |
| 183 | poly_free(poly); | |
| 184 | } | |
| 185 | ||
| 186 | void K001005_init(running_machine *machine) | |
| 187 | { | |
| 183 | 188 | int i; |
| 184 | 189 | |
| 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); | |
| 187 | 192 | K001005_zbuffer = auto_bitmap_alloc(width, height, BITMAP_FORMAT_INDEXED32); |
| 188 | 193 | |
| 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); | |
| 191 | 196 | |
| 192 | 197 | K001005_texture = auto_malloc(0x800000); |
| 193 | 198 | |
| r2086 | r2087 | |
| 198 | 203 | |
| 199 | 204 | K001005_3d_fifo = auto_malloc(0x10000 * sizeof(UINT32)); |
| 200 | 205 | |
| 206 | poly = poly_alloc(4000, sizeof(poly_extra_data), POLYFLAG_ALLOW_QUADS); | |
| 207 | add_exit_callback(machine, K001005_exit); | |
| 208 | ||
| 201 | 209 | for (i=0; i < 128; i++) |
| 202 | 210 | { |
| 203 | 211 | tex_mirror_table[0][i] = i & 0x3f; |
| r2086 | r2087 | |
| 947 | 955 | } |
| 948 | 956 | } |
| 949 | 957 | |
| 950 | ||
| 951 | ||
| 952 | static void gticlub_exit(running_machine *machine) | |
| 953 | { | |
| 954 | poly_free(poly); | |
| 955 | } | |
| 956 | ||
| 957 | 958 | VIDEO_START( gticlub ) |
| 958 | 959 | { |
| 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); | |
| 963 | 961 | K001604_vh_start(machine, 0); |
| 964 | 962 | } |
| 965 | 963 |
| r2086 | r2087 | |
|---|---|---|
| 1 | 1 | void K001005_draw(bitmap_t *bitmap, const rectangle *cliprect); |
| 2 | 2 | void K001005_swap_buffers(void); |
| 3 | void K001005_init( | |
| 3 | void K001005_init(running_machine *machine); | |
| 4 | 4 | void K001005_preprocess_texture_data(UINT8 *rom, int length, int gticlub); |
| 5 | 5 | |
| 6 | 6 | READ32_HANDLER(K001005_r); |
| r2086 | r2087 | |
|---|---|---|
| 6 | 6 | static tilemap *fg_tilemap, *bg_tilemap, *tx_tilemap; |
| 7 | 7 | static UINT8 bg_color, fg_color, old_bg_color, old_fg_color; |
| 8 | 8 | static rectangle tilemap_clip; |
| 9 | static int video_bank = 0; | |
| 9 | 10 | |
| 10 | 11 | /*************************************************************************** |
| 11 | 12 | ** |
| r2086 | r2087 | |
| 99 | 100 | WRITE8_HANDLER( marvins_foreground_ram_w ) |
| 100 | 101 | { |
| 101 | 102 | 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); | |
| 103 | 105 | } |
| 104 | 106 | |
| 105 | 107 | WRITE8_HANDLER( marvins_background_ram_w ) |
| 106 | 108 | { |
| 107 | 109 | 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); | |
| 109 | 112 | } |
| 110 | 113 | |
| 111 | 114 | WRITE8_HANDLER( marvins_text_ram_w ) |
| r2086 | r2087 | |
| 124 | 127 | { |
| 125 | 128 | SET_TILE_INFO( |
| 126 | 129 | 2, |
| 127 | spriteram_3[tile_index], | |
| 130 | spriteram_3[tile_index + video_bank * 0x800], | |
| 128 | 131 | 0, |
| 129 | 132 | 0); |
| 130 | 133 | } |
| r2086 | r2087 | |
| 133 | 136 | { |
| 134 | 137 | SET_TILE_INFO( |
| 135 | 138 | 1, |
| 136 | spriteram_2[tile_index], | |
| 139 | spriteram_2[tile_index + video_bank * 0x800], | |
| 137 | 140 | 0, |
| 138 | 141 | 0); |
| 139 | 142 | } |
| r2086 | r2087 | |
| 339 | 342 | rectangle finalclip = tilemap_clip; |
| 340 | 343 | sect_rect(&finalclip, cliprect); |
| 341 | 344 | |
| 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 | ||
| 342 | 353 | if( (scroll_attributes & 4)==0 ) bg_scrollx += 256; |
| 343 | 354 | if( scroll_attributes & 1 ) sprite_scrollx += 256; |
| 344 | 355 | if( scroll_attributes & 2 ) fg_scrollx += 256; |
| r2086 | r2087 | |
| 402 | 413 | rectangle finalclip = tilemap_clip; |
| 403 | 414 | sect_rect(&finalclip, cliprect); |
| 404 | 415 | |
| 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 | ||
| 405 | 424 | if( (scroll_attributes & 4)==0 ) bg_scrollx += 256; |
| 406 | 425 | if( scroll_attributes & 1 ) sprite_scrollx += 256; |
| 407 | 426 | if( scroll_attributes & 2 ) fg_scrollx += 256; |
| r2086 | r2087 | |
|---|---|---|
| 1384 | 1384 | sy = (y+nys*16) & 0x1ff; |
| 1385 | 1385 | |
| 1386 | 1386 | 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), | |
| 1388 | 1389 | (col&0x1f) + palette_basecolor[0], |
| 1389 | 1390 | 1,1, |
| 1390 | 1391 | sx,sy); |
| r2086 | r2087 | |
| 1401 | 1402 | sy = (y+nys*16) & 0x1ff; |
| 1402 | 1403 | |
| 1403 | 1404 | 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), | |
| 1405 | 1407 | (col&0x1f) + palette_basecolor[0], |
| 1406 | 1408 | 0,1, |
| 1407 | 1409 | sx,sy); |
| r2086 | r2087 | |
| 1421 | 1423 | sy = (y+nys*16) & 0x1ff; |
| 1422 | 1424 | |
| 1423 | 1425 | 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, | |
| 1425 | 1428 | (col&0x1f) + palette_basecolor[0], |
| 1426 | 1429 | 1,0, |
| 1427 | 1430 | sx,sy); |
| r2086 | r2087 | |
| 1438 | 1441 | sy = (y+nys*16) & 0x1ff; |
| 1439 | 1442 | |
| 1440 | 1443 | 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. | |
| 1442 | 1446 | (col&0x1f) + palette_basecolor[0], |
| 1443 | 1447 | 0,0, |
| 1444 | 1448 | sx,sy); |
| r2086 | r2087 | |
|---|---|---|
| 6 | 6 | UINT8* mermaid_bg_scrollram; |
| 7 | 7 | UINT8* mermaid_fg_scrollram; |
| 8 | 8 | |
| 9 | static bitmap_t* helper; | |
| 10 | static bitmap_t* helper2; | |
| 11 | static int collision_sprite_background,collision_sprite_foreground,collision_sprite_sprite_boat,collision_sprite_sprite_wind; | |
| 12 | ||
| 9 | 13 | static int rougien_gfxbank1, rougien_gfxbank2; |
| 10 | 14 | |
| 11 | 15 | static const rectangle spritevisiblearea = |
| r2086 | r2087 | |
| 107 | 111 | Bit 0 |
| 108 | 112 | Bit 1 - Sprite - Foreground |
| 109 | 113 | Bit 2 - Sprite - Stream |
| 110 | Bit 3 | |
| 114 | Bit 3 - Sprite (Wind) - Sprite | |
| 111 | 115 | Bit 4 |
| 112 | 116 | Bit 5 |
| 113 | Bit 6 | |
| 117 | Bit 6 - Sprite (Boat) - Sprite | |
| 114 | 118 | Bit 7 |
| 115 | 119 | */ |
| 116 | 120 | |
| 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; | |
| 118 | 130 | } |
| 119 | 131 | |
| 120 | 132 | static TILE_GET_INFO( get_bg_tile_info ) |
| r2086 | r2087 | |
| 147 | 159 | fg_tilemap = tilemap_create(get_fg_tile_info, tilemap_scan_rows, 8, 8, 32, 32); |
| 148 | 160 | tilemap_set_scroll_cols(fg_tilemap, 32); |
| 149 | 161 | 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); | |
| 150 | 165 | } |
| 151 | 166 | |
| 152 | 167 | static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect) |
| r2086 | r2087 | |
| 192 | 207 | draw_sprites(screen->machine, bitmap, cliprect); |
| 193 | 208 | return 0; |
| 194 | 209 | } |
| 210 | ||
| 211 | static 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 | ||
| 231 | VIDEO_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 | } |
| r2086 | r2087 | |
|---|---|---|
| 106 | 106 | else if (dy&0x40) code+=32; \ |
| 107 | 107 | else if (dx&0x40) code+=16 |
| 108 | 108 | |
| 109 | INLINE const UINT8 *get_source_ptr( | |
| 109 | INLINE const UINT8 *get_source_ptr( | |
| 110 | 110 | { |
| 111 | const gfx_element *gfx=machine->gfx[bank]; | |
| 112 | 111 | int source_base,code=0; |
| 113 | 112 | |
| 114 | 113 | /* Get a tile index from the x,y position in the block */ |
| r2086 | r2087 | |
| 148 | 147 | |
| 149 | 148 | static 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) |
| 150 | 149 | { |
| 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); | |
| 152 | 152 | UINT32 xinc=(scale_line_count * 0x10000 ) / size; |
| 153 | 153 | UINT8 pixel; |
| 154 | 154 | int x_index; |
| r2086 | r2087 | |
| 172 | 172 | |
| 173 | 173 | for (sx=0; sx<size; sx++) { |
| 174 | 174 | if ((sx%16)==0) |
| 175 | srcptr=get_source_ptr( | |
| 175 | srcptr=get_source_ptr(gfx | |
| 176 | 176 | |
| 177 | 177 | 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; | |
| 180 | 180 | |
| 181 | 181 | if (flipx) |
| 182 | 182 | x_index-=xinc; |
| r2086 | r2087 | |
| 207 | 207 | continue; |
| 208 | 208 | |
| 209 | 209 | y=source[offs+3]; |
| 210 | if (y>254) continue; /* Speedup */ | |
| 211 | 210 | x=source[offs+2]; |
| 212 | 211 | if (x&0x200) x=-(0x100-(x&0xff)); |
| 213 | if (x>256) continue; /* Speedup */ | |
| 214 | 212 | |
| 215 | 213 | /* |
| 216 | 214 | Source[0]: |
| r2086 | r2087 | |
|---|---|---|
| 610 | 610 | pvr_parameterconfig[a] = pvr_parameterconfig[a-1]; |
| 611 | 611 | } |
| 612 | 612 | |
| 613 | TIMER_CALLBACK(vbout) | |
| 613 | static TIMER_CALLBACK(vbout) | |
| 614 | 614 | { |
| 615 | 615 | dc_sysctrl_regs[SB_ISTNRM] |= IST_VBL_OUT; // V Blank-out interrupt |
| 616 | 616 | update_interrupt_status(); |
| r2086 | r2087 | |
|---|---|---|
| 213 | 213 | int newscroll = ((data >> 7) - scanline) & 0x1ff; |
| 214 | 214 | |
| 215 | 215 | /* 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); | |
| 217 | 218 | |
| 218 | 219 | /* update the new scroll */ |
| 219 | 220 | tilemap_set_scrolly(atarigen_playfield_tilemap, 0, newscroll); |
| r2086 | r2087 | |
|---|---|---|
| 7 | 7 | **************************************************************************/ |
| 8 | 8 | |
| 9 | 9 | #include "driver.h" |
| 10 | #include "deprecat.h" | |
| 11 | 10 | #include "cpu/tms34010/tms34010.h" |
| 12 | 11 | #include "video/tlc34076.h" |
| 13 | 12 | #include "btoads.h" |
| r2086 | r2087 | |
| 78 | 77 | COMBINE_DATA(&misc_control); |
| 79 | 78 | |
| 80 | 79 | /* bit 3 controls sound reset line */ |
| 81 | cpunum_set_input_line( | |
| 80 | cpunum_set_input_line(machine, 1, INPUT_LINE_RESET, (misc_control & 8) ? CLEAR_LINE : ASSERT_LINE); | |
| 82 | 81 | } |
| 83 | 82 | |
| 84 | 83 | |
| r2086 | r2087 | |
| 119 | 118 | WRITE16_HANDLER( btoads_scroll0_w ) |
| 120 | 119 | { |
| 121 | 120 | /* allow multiple changes during display */ |
| 122 | video_screen_update_ | |
| 121 | video_screen_update_ | |
| 123 | 122 | |
| 124 | 123 | /* upper bits are Y scroll, lower bits are X scroll */ |
| 125 | 124 | if (ACCESSING_MSB) |
| r2086 | r2087 | |
| 132 | 131 | WRITE16_HANDLER( btoads_scroll1_w ) |
| 133 | 132 | { |
| 134 | 133 | /* allow multiple changes during display */ |
| 135 | video_screen_update_ | |
| 134 | video_screen_update_ | |
| 136 | 135 | |
| 137 | 136 | /* upper bits are Y scroll, lower bits are X scroll */ |
| 138 | 137 | if (ACCESSING_MSB) |
| r2086 | r2087 | |
|---|---|---|
| 1 | 1 | #include "driver.h" |
| 2 | 2 | |
| 3 | 3 | int eolith_buffer = 0; |
| 4 | static bitmap_t *bitmaps[2]; | |
| 5 | static UINT32 *eo_vram; | |
| 4 | static UINT32 *vram; | |
| 6 | 5 | |
| 7 | static 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 | } | |
| 21 | 6 | |
| 7 | ||
| 22 | 8 | WRITE32_HANDLER( eolith_vram_w ) |
| 23 | 9 | { |
| 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]; | |
| 31 | 11 | |
| 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) | |
| 50 | 13 | { |
| 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); | |
| 53 | 16 | |
| 17 | if (~data & 0x00008000) | |
| 18 | *dest = (*dest & 0xffff0000) | (data & 0x0000ffff); | |
| 54 | 19 | } |
| 20 | else if (((mem_mask == 0x0000ffff) && (~data & 0x80000000)) || | |
| 21 | ((mem_mask == 0xffff0000) && (~data & 0x00008000))) | |
| 22 | COMBINE_DATA(dest); | |
| 55 | 23 | } |
| 56 | 24 | |
| 57 | 25 | |
| 58 | 26 | READ32_HANDLER( eolith_vram_r ) |
| 59 | 27 | { |
| 60 | return | |
| 28 | return | |
| 61 | 29 | } |
| 62 | 30 | |
| 63 | 31 | VIDEO_START( eolith ) |
| 64 | 32 | { |
| 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); | |
| 68 | 34 | } |
| 69 | 35 | |
| 70 | 36 | VIDEO_UPDATE( eolith ) |
| 71 | 37 | { |
| 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 | ||
| 73 | 56 | return 0; |
| 74 | 57 | } |
| r2086 | r2087 | |
|---|---|---|
| 398 | 398 | bg_tilemap = tilemap_create(locomotn_bg_get_tile_info,tilemap_scan_rows,8,8,32,32); |
| 399 | 399 | fg_tilemap = tilemap_create(locomotn_fg_get_tile_info,fg_tilemap_scan, 8,8, 8,32); |
| 400 | 400 | |
| 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 | ||
| 401 | 408 | spriteram_base = 0x14; |
| 402 | 409 | |
| 403 | 410 | spriteram = rallyx_videoram + 0x00; |
| r2086 | r2087 | |
| 427 | 434 | bg_tilemap = tilemap_create(locomotn_bg_get_tile_info,tilemap_scan_rows,8,8,32,32); |
| 428 | 435 | fg_tilemap = tilemap_create(locomotn_fg_get_tile_info,fg_tilemap_scan, 8,8, 8,32); |
| 429 | 436 | |
| 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 | ||
| 430 | 444 | /* commsega has more sprites and bullets than the other games */ |
| 431 | 445 | spriteram_base = 0x00; |
| 432 | 446 | |
| r2086 | r2087 | |
| 550 | 564 | int color = spriteram_2[offs + 1] & 0x3f; |
| 551 | 565 | int flip = spriteram[offs] & 2; |
| 552 | 566 | |
| 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 | ||
| 556 | 567 | pdrawgfx(bitmap,machine->gfx[1], |
| 557 | 568 | ((spriteram[offs] & 0x7c) >> 2) + 0x20*(spriteram[offs] & 0x01) + ((spriteram[offs] & 0x80) >> 1), |
| 558 | 569 | color, |
| r2086 | r2087 | |
| 624 | 635 | x = rallyx_radarx[offs] + ((~rallyx_radarattr[offs & 0x0f] & 0x08) << 5); |
| 625 | 636 | y = 252 - rallyx_radary[offs]; |
| 626 | 637 | |
| 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 | ||
| 630 | 638 | drawgfx(bitmap,machine->gfx[2], |
| 631 | 639 | (rallyx_radarattr[offs & 0x0f] & 0x07) ^ 0x07, |
| 632 | 640 | 0, |
| r2086 | r2087 | |
| 713 | 721 | rectangle bg_clip = *cliprect; |
| 714 | 722 | if (flip_screen_get()) |
| 715 | 723 | { |
| 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 | } | |
| 718 | 735 | } |
| 719 | 736 | else |
| 720 | 737 | { |
| r2086 | r2087 | |
|---|---|---|
| 452 | 452 | vertical_feedback = vfeedback; |
| 453 | 453 | horizontal_feedback = hfeedback; |
| 454 | 454 | } |
| 455 | ||
| 456 | /* nothing to do, clear the interrupt */ | |
| 457 | else | |
| 458 | cpunum_set_input_line(machine, 0, 0, CLEAR_LINE); | |
| 459 | 455 | } |
| 460 | 456 | |
| 461 | 457 | |
| r2086 | r2087 | |
| 494 | 490 | else if (astrocade_video_config & AC_LIGHTPEN_INTS) |
| 495 | 491 | astrocade_trigger_lightpen(machine, astrocade_scanline, 8); |
| 496 | 492 | |
| 497 | /* nothing to do, clear the interrupt */ | |
| 498 | else | |
| 499 | cpunum_set_input_line(machine, 0, 0, CLEAR_LINE); | |
| 500 | ||
| 501 | 493 | /* advance to the next scanline */ |
| 502 | 494 | scanline++; |
| 503 | 495 | if (scanline >= video_screen_get_height(machine->primary_screen)) |
| r2086 | r2087 | |
| 564 | 556 | case 0x17: /* keypad column 3 */ |
| 565 | 557 | result = readinputportbytag_safe("KEYPAD3", 0xff); |
| 566 | 558 | 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; | |
| 583 | 559 | } |
| 584 | 560 | |
| 585 | 561 | return result; |
| r2086 | r2087 | |
|---|---|---|
| 11 | 11 | |
| 12 | 12 | |
| 13 | 13 | UINT8 *sraider_grid_data; |
| 14 | UINT8 sraider_grid_color; | |
| 14 | static UINT8 sraider_grid_color; | |
| 15 | 15 | |
| 16 | 16 | /* Use the Zero Hour star generator board */ |
| 17 | 17 | void redclash_set_stars_enable( UINT8 on ); |
| r2086 | r2087 | |
|---|---|---|
| 643 | 643 | /* Text layer is offset on this machine */ |
| 644 | 644 | tilemap_set_scrolly(tx_tilemap, 0, 8); |
| 645 | 645 | |
| 646 | memset(bgscroll8, 0, 0x10); | |
| 647 | memset(bg2scroll8, 0, 0x10); | |
| 648 | memset(fgscroll8, 0, 0x10); | |
| 649 | memset(fg2scroll8, 0, 0x10); | |
| 650 | ||
| 646 | 651 | /* Register for save/restore */ |
| 647 | 652 | state_save_register_global_array(bgscroll8); |
| 648 | 653 | state_save_register_global_array(fgscroll8); |
| r2086 | r2087 | |
| 675 | 680 | /* Text layer is offset on this machine */ |
| 676 | 681 | tilemap_set_scrolly(tx_tilemap, 0, 8); |
| 677 | 682 | |
| 683 | memset(bgscroll8, 0, 0x10); | |
| 684 | memset(bg2scroll8, 0, 0x10); | |
| 685 | memset(fgscroll8, 0, 0x10); | |
| 686 | memset(fg2scroll8, 0, 0x10); | |
| 687 | ||
| 678 | 688 | /* Register for save/restore */ |
| 679 | 689 | state_save_register_global_array(bgscroll8); |
| 680 | 690 | state_save_register_global_array(fgscroll8); |
| r2086 | r2087 | |
| 703 | 713 | tilemap_set_transparent_pen(fg_tilemap, 15); |
| 704 | 714 | tilemap_set_transparent_pen(tx_tilemap, 15); |
| 705 | 715 | |
| 716 | memset(bgscroll8, 0, 0x10); | |
| 717 | memset(bg2scroll8, 0, 0x10); | |
| 718 | memset(fgscroll8, 0, 0x10); | |
| 719 | memset(fg2scroll8, 0, 0x10); | |
| 720 | ||
| 706 | 721 | /* Register for save/restore */ |
| 707 | 722 | state_save_register_global_array(bgscroll8); |
| 708 | 723 | state_save_register_global_array(fgscroll8); |
| r2086 | r2087 | |
| 737 | 752 | tilemap_set_transparent_pen(fg2_tilemap, 15); |
| 738 | 753 | tilemap_set_transparent_pen(tx_tilemap, 15); |
| 739 | 754 | |
| 755 | memset(bgscroll8, 0, 0x10); | |
| 756 | memset(bg2scroll8, 0, 0x10); | |
| 757 | memset(fgscroll8, 0, 0x10); | |
| 758 | memset(fg2scroll8, 0, 0x10); | |
| 759 | ||
| 740 | 760 | /* Register for save/restore */ |
| 741 | 761 | state_save_register_global_array(bgscroll8); |
| 742 | 762 | state_save_register_global_array(fgscroll8); |
| r2086 | r2087 | |
| 767 | 787 | tilemap_set_transparent_pen(fg_tilemap, 15); |
| 768 | 788 | tilemap_set_transparent_pen(tx_tilemap, 15); |
| 769 | 789 | |
| 790 | memset(bgscroll8, 0, 0x10); | |
| 791 | memset(bg2scroll8, 0, 0x10); | |
| 792 | memset(fgscroll8, 0, 0x10); | |
| 793 | memset(fg2scroll8, 0, 0x10); | |
| 794 | ||
| 770 | 795 | /* Register for save/restore */ |
| 771 | 796 | state_save_register_global_array(bgscroll8); |
| 772 | 797 | state_save_register_global_array(fgscroll8); |
| r2086 | r2087 | |
| 775 | 800 | |
| 776 | 801 | VIDEO_START( primella ) |
| 777 | 802 | { |
| 778 | /* Configure memory banking */ | |
| 779 | memory_configure_bank(1, 0, 8, memory_region(REGION_CPU1) + 0x10000, 0x4000); | |
| 780 | ||
| 781 | 803 | /* Configure tilemap callbacks */ |
| 782 | 804 | bg_tilerom = memory_region(REGION_GFX2) + memory_region_length(REGION_GFX2) - 0x8000; |
| 783 | 805 | fg_tilerom = memory_region(REGION_GFX3) + memory_region_length(REGION_GFX3) - 0x8000; |
| r2086 | r2087 | |
| 799 | 821 | tilemap_set_transparent_pen(fg_tilemap, 15); |
| 800 | 822 | tilemap_set_transparent_pen(tx_tilemap, 15); |
| 801 | 823 | |
| 824 | memset(bgscroll8, 0, 0x10); | |
| 825 | memset(bg2scroll8, 0, 0x10); | |
| 826 | memset(fgscroll8, 0, 0x10); | |
| 827 | memset(fg2scroll8, 0, 0x10); | |
| 828 | ||
| 802 | 829 | /* Register for save/restore */ |
| 803 | 830 | state_save_register_global_array(bgscroll8); |
| 804 | 831 | state_save_register_global_array(fgscroll8); |
| r2086 | r2087 | |
| 836 | 863 | tilemap_set_transparent_pen(fg_tilemap, 15); |
| 837 | 864 | tilemap_set_transparent_pen(fg2_tilemap, 15); |
| 838 | 865 | |
| 866 | memset(bgscroll8, 0, 0x10); | |
| 867 | memset(bg2scroll8, 0, 0x10); | |
| 868 | memset(fgscroll8, 0, 0x10); | |
| 869 | memset(fg2scroll8, 0, 0x10); | |
| 870 | ||
| 839 | 871 | /* Register for save/restore */ |
| 840 | 872 | state_save_register_global_array(bgscroll8); |
| 841 | 873 | state_save_register_global_array(bg2scroll8); |
| r2086 | r2087 | |
| 855 | 887 | 32, 32, 32, 8); |
| 856 | 888 | bg2_tilemap = fg_tilemap = fg2_tilemap = NULL; /* Stop scroll handler from crashing on these */ |
| 857 | 889 | |
| 890 | memset(bgscroll8, 0, 0x10); | |
| 891 | memset(bg2scroll8, 0, 0x10); | |
| 892 | memset(fgscroll8, 0, 0x10); | |
| 893 | memset(fg2scroll8, 0, 0x10); | |
| 894 | ||
| 858 | 895 | /* Register for save/restore */ |
| 859 | 896 | state_save_register_global_array(bgscroll8); |
| 860 | 897 | state_save_register_global_array(bg2scroll8); // Not used atm |
| r2086 | r2087 | |
|---|---|---|
| 209 | 209 | |
| 210 | 210 | WRITE8_HANDLER( exerion_video_latch_w ) |
| 211 | 211 | { |
| 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); | |
| 213 | 215 | background_latches[offset] = data; |
| 214 | 216 | } |
| 215 | 217 |
| r2086 | r2087 | |
|---|---|---|
| 117 | 117 | */ |
| 118 | 118 | |
| 119 | 119 | #include "driver.h" |
| 120 | #include "deprecat.h" | |
| 121 | 120 | #include "cpu/se3208/se3208.h" |
| 122 | 121 | #include "video/vrender0.h" |
| 123 | 122 | #include "machine/ds1302.h" |
| r2086 | r2087 | |
| 140 | 139 | static UINT8 OldPort4; |
| 141 | 140 | static UINT32 *ResetPatch; |
| 142 | 141 | |
| 143 | static void IntReq(int num) | |
| 142 | static void IntReq(running_machine *machine, int num) | |
| 144 | 143 | { |
| 145 | 144 | UINT32 IntEn=program_read_dword_32le(0x01800c08); |
| 146 | 145 | UINT32 IntPend=program_read_dword_32le(0x01800c0c); |
| r2086 | r2087 | |
| 148 | 147 | { |
| 149 | 148 | IntPend|=(1<<num); |
| 150 | 149 | program_write_dword_32le(0x01800c0c,IntPend); |
| 151 | cpunum_set_input_line( | |
| 150 | cpunum_set_input_line(machine, 0,SE3208_INT,ASSERT_LINE); | |
| 152 | 151 | } |
| 153 | 152 | #ifdef IDLE_LOOP_SPEEDUP |
| 154 | 153 | FlipCntRead=0; |
| r2086 | r2087 | |
| 189 | 188 | { |
| 190 | 189 | UINT8 Port4=readinputport(4); |
| 191 | 190 | if(!(Port4&0x10) && ((OldPort4^Port4)&0x10)) //coin buttons trigger IRQs |
| 192 | IntReq(12); | |
| 191 | IntReq(machine, 12); | |
| 193 | 192 | if(!(Port4&0x20) && ((OldPort4^Port4)&0x20)) |
| 194 | IntReq(19); | |
| 193 | IntReq(machine, 19); | |
| 195 | 194 | OldPort4=Port4; |
| 196 | 195 | return /*dips*/readinputport(5)|(Port4<<16); |
| 197 | 196 | } |
| r2086 | r2087 | |
| 206 | 205 | IntPend&=~(1<<(data&0x1f)); |
| 207 | 206 | program_write_dword_32le(0x01800c0c,IntPend); |
| 208 | 207 | if(!IntPend) |
| 209 | cpunum_set_input_line( | |
| 208 | cpunum_set_input_line(machine, 0,SE3208_INT,CLEAR_LINE); | |
| 210 | 209 | } |
| 211 | 210 | if((~mem_mask)&0xff00) |
| 212 | 211 | IntHigh=(data>>8)&7; |
| r2086 | r2087 | |
| 240 | 239 | { |
| 241 | 240 | if(!(Timer0ctrl&2)) |
| 242 | 241 | Timer0ctrl&=~1; |
| 243 | IntReq(0); | |
| 242 | IntReq(machine, 0); | |
| 244 | 243 | } |
| 245 | 244 | |
| 246 | 245 | static WRITE32_HANDLER(Timer0_w) |
| r2086 | r2087 | |
| 268 | 267 | { |
| 269 | 268 | if(!(Timer1ctrl&2)) |
| 270 | 269 | Timer1ctrl&=~1; |
| 271 | IntReq(1); | |
| 270 | IntReq(machine, 1); | |
| 272 | 271 | } |
| 273 | 272 | |
| 274 | 273 | static WRITE32_HANDLER(Timer1_w) |
| r2086 | r2087 | |
| 296 | 295 | { |
| 297 | 296 | if(!(Timer2ctrl&2)) |
| 298 | 297 | Timer2ctrl&=~1; |
| 299 | IntReq(9); | |
| 298 | IntReq(machine, 9); | |
| 300 | 299 | } |
| 301 | 300 | |
| 302 | 301 | static WRITE32_HANDLER(Timer2_w) |
| r2086 | r2087 | |
| 324 | 323 | { |
| 325 | 324 | if(!(Timer3ctrl&2)) |
| 326 | 325 | Timer3ctrl&=~1; |
| 327 | IntReq(10); | |
| 326 | IntReq(machine, 10); | |
| 328 | 327 | } |
| 329 | 328 | |
| 330 | 329 | static WRITE32_HANDLER(Timer3_w) |
| r2086 | r2087 | |
| 439 | 438 | } |
| 440 | 439 | data&=~(1<<10); |
| 441 | 440 | program_write_dword_32le(0x0180080C,0); |
| 442 | IntReq(7); | |
| 441 | IntReq(machine, 7); | |
| 443 | 442 | } |
| 444 | 443 | COMBINE_DATA(&DMA0ctrl); |
| 445 | 444 | } |
| r2086 | r2087 | |
| 485 | 484 | } |
| 486 | 485 | data&=~(1<<10); |
| 487 | 486 | program_write_dword_32le(0x0180081C,0); |
| 488 | IntReq(8); | |
| 487 | IntReq(machine, 8); | |
| 489 | 488 | } |
| 490 | 489 | COMBINE_DATA(&DMA1ctrl); |
| 491 | 490 | } |
| r2086 | r2087 | |
| 617 | 616 | { |
| 618 | 617 | } |
| 619 | 618 | |
| 620 | static 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 | ||
| 637 | 619 | static UINT16 GetVidReg(UINT16 reg) |
| 638 | 620 | { |
| 639 | 621 | return program_read_word_32le(0x03000000+reg); |
| r2086 | r2087 | |
| 655 | 637 | UINT16 *Front,*Back; |
| 656 | 638 | UINT16 *Visible,*DrawDest; |
| 657 | 639 | UINT16 *srcline; |
| 658 | int | |
| 640 | int | |
| 659 | 641 | UINT16 head,tail; |
| 660 | 642 | |
| 661 | 643 | if(GetVidReg(0x8e)&1) |
| r2086 | r2087 | |
| 699 | 681 | |
| 700 | 682 | srcline=(UINT16 *) Visible; |
| 701 | 683 | 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 | ||
| 704 | 686 | return 0; |
| 705 | 687 | } |
| 706 | 688 | |
| r2086 | r2087 | |
| 732 | 714 | |
| 733 | 715 | static INTERRUPT_GEN(crystal_interrupt) |
| 734 | 716 | { |
| 735 | IntReq(24); //VRender0 VBlank | |
| 717 | IntReq(machine, 24); //VRender0 VBlank | |
| 736 | 718 | } |
| 737 | 719 | |
| 738 | 720 | static INPUT_PORTS_START(crystal) |
| r2086 | r2087 | |
| 832 | 814 | MDRV_SCREEN_ADD("main", RASTER) |
| 833 | 815 | MDRV_SCREEN_REFRESH_RATE(60) |
| 834 | 816 | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) |
| 835 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_ | |
| 817 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) | |
| 836 | 818 | MDRV_SCREEN_SIZE(320, 240) |
| 837 | 819 | MDRV_SCREEN_VISIBLE_AREA(0, 319, 0, 239) |
| 838 | 820 | |
| 839 | MDRV_PALETTE_LENGTH(8192) | |
| 840 | ||
| 841 | 821 | MDRV_VIDEO_START(crystal) |
| 842 | 822 | MDRV_VIDEO_UPDATE(crystal) |
| 843 | 823 | MDRV_VIDEO_EOF(crystal) |
| 844 | 824 | |
| 825 | MDRV_PALETTE_INIT(RRRRR_GGGGGG_BBBBB) | |
| 826 | MDRV_PALETTE_LENGTH(65536) | |
| 827 | ||
| 845 | 828 | MDRV_SPEAKER_STANDARD_STEREO("left", "right") |
| 846 | 829 | |
| 847 | 830 | MDRV_SOUND_ADD(VRENDER0, 0) |
| r2086 | r2087 | |
| 921 | 904 | Rom[WORD_XOR_LE(0x974ED2/2)]=0x9001; //PUSH R0 |
| 922 | 905 | } |
| 923 | 906 | |
| 924 | GAME( 2001, crysbios, 0, crystal, crystal, 0, ROT0, "Brezzasoft", "Crystal System BIOS", GAME_IS_BIOS_ROOT ) | |
| 925 | GAME( 2001, crysking, crysbios, crystal, crystal, crysking, ROT0, "Brezzasoft", "The Crystal of Kings", 0 ) | |
| 926 | GAME( 2001, evosocc, crysbios, crystal, crystal, evosocc, ROT0, "Evoga", "Evolution Soccer", 0 ) | |
| 907 | GAME( 2001, crysbios, 0, crystal, crystal, 0, ROT0, "Brezzasoft", "Crystal System BIOS", GAME_IS_BIOS_ROOT ) | |
| 908 | GAME( 2001, crysking, crysbios, crystal, crystal, crysking, ROT0, "Brezzasoft", "The Crystal of Kings", 0 ) | |
| 909 | GAME( 2001, evosocc, crysbios, crystal, crystal, evosocc, ROT0, "Evoga", "Evolution Soccer", 0 ) |
| r2086 | r2087 | |
|---|---|---|
| 1624 | 1624 | MDRV_SCREEN_ADD("main", RASTER) |
| 1625 | 1625 | MDRV_SCREEN_REFRESH_RATE(60) |
| 1626 | 1626 | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) |
| 1627 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_RGB | |
| 1627 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_RGB32) | |
| 1628 | 1628 | MDRV_SCREEN_SIZE(64*8, 64*8) |
| 1629 | 1629 | MDRV_SCREEN_VISIBLE_AREA(0*8+14, 44*8-1+4, 0*8, 30*8-1) |
| 1630 | 1630 |
| r2086 | r2087 | |
|---|---|---|
| 14 | 14 | |
| 15 | 15 | static UINT32 *vram; |
| 16 | 16 | |
| 17 | static VIDEO_START( ultrsprt ) | |
| 18 | { | |
| 19 | } | |
| 20 | ||
| 21 | 17 | static VIDEO_UPDATE( ultrsprt ) |
| 22 | 18 | { |
| 23 | 19 | int i, j; |
| 24 | UINT8 *ram = (UINT8*)vram; | |
| 25 | 20 | |
| 26 | if (ram != NULL) | |
| 21 | UINT8 *ram = (UINT8 *)vram; | |
| 22 | ||
| 23 | for (j=0; j < 400; j++) | |
| 27 | 24 | { |
| 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; | |
| 32 | 27 | |
| 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; | |
| 46 | 35 | } |
| 47 | 36 | } |
| 48 | 37 | |
| 49 | 38 | return 0; |
| 50 | 39 | } |
| 51 | 40 | |
| 52 | static WRITE32_HANDLER(palette_w) | |
| 41 | static WRITE32_HANDLER( palette_w ) | |
| 53 | 42 | { |
| 54 | int r1, g1, b1, r2, g2, b2; | |
| 55 | ||
| 56 | 43 | COMBINE_DATA(&paletteram32[offset]); |
| 57 | 44 | data = paletteram32[offset]; |
| 58 | 45 | |
| 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))); | |
| 75 | 48 | } |
| 76 | 49 | |
| 77 | static READ32_HANDLER(eeprom_r) | |
| 50 | static READ32_HANDLER( eeprom_r ) | |
| 78 | 51 | { |
| 79 | 52 | UINT32 r = 0; |
| 80 | 53 | |
| 81 | 54 | if (!(mem_mask & 0xff000000)) |
| 82 | { | |
| 83 | 55 | r |= (((EEPROM_read_bit()) << 1) | (readinputport(6) << 3)) << 24; |
| 84 | } | |
| 85 | 56 | |
| 86 | 57 | return r; |
| 87 | 58 | } |
| 88 | 59 | |
| 89 | static WRITE32_HANDLER(eeprom_w) | |
| 60 | static WRITE32_HANDLER( eeprom_w ) | |
| 90 | 61 | { |
| 91 | 62 | if (!(mem_mask & 0xff000000)) |
| 92 | 63 | { |
| r2086 | r2087 | |
| 96 | 67 | } |
| 97 | 68 | } |
| 98 | 69 | |
| 99 | static READ32_HANDLER(control1_r) | |
| 70 | static READ32_HANDLER( control1_r ) | |
| 100 | 71 | { |
| 101 | 72 | return (readinputport(0) << 28) | ((readinputport(1) & 0xfff) << 16) | (readinputport(2) & 0xfff); |
| 102 | 73 | } |
| 103 | 74 | |
| 104 | static READ32_HANDLER(control2_r) | |
| 75 | static READ32_HANDLER( control2_r ) | |
| 105 | 76 | { |
| 106 | 77 | return (readinputport(3) << 28) | ((readinputport(4) & 0xfff) << 16) | (readinputport(5) & 0xfff); |
| 107 | 78 | } |
| 108 | 79 | |
| 109 | static WRITE32_HANDLER(int_ack_w) | |
| 80 | static WRITE32_HANDLER( int_ack_w ) | |
| 110 | 81 | { |
| 111 | cpunum_set_input_line( | |
| 82 | cpunum_set_input_line(machine, 0, INPUT_LINE_IRQ1, CLEAR_LINE); | |
| 112 | 83 | } |
| 113 | 84 | |
| 114 | 85 | static 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) | |
| 127 | 99 | ADDRESS_MAP_END |
| 128 | 100 | |
| 129 | 101 | |
| 130 | 102 | /*****************************************************************************/ |
| 131 | 103 | |
| 132 | 104 | |
| 133 | static READ16_HANDLER(sound_r) | |
| 105 | static READ16_HANDLER( sound_r ) | |
| 134 | 106 | { |
| 135 | 107 | UINT16 r = 0; |
| 136 | 108 | int reg = offset * 2; |
| 137 | 109 | |
| 138 | 110 | if (ACCESSING_MSB16) |
| 139 | { | |
| 140 | 111 | r |= K054539_0_r(machine, reg+0) << 8; |
| 141 | ||
| 112 | ||
| 142 | 113 | if (ACCESSING_LSB16) |
| 143 | { | |
| 144 | 114 | r |= K054539_0_r(machine, reg+1) << 0; |
| 145 | } | |
| 146 | 115 | |
| 147 | 116 | return r; |
| 148 | 117 | } |
| 149 | 118 | |
| 150 | static WRITE16_HANDLER(sound_w) | |
| 119 | static WRITE16_HANDLER( sound_w ) | |
| 151 | 120 | { |
| 152 | 121 | int reg = offset * 2; |
| 153 | 122 | |
| 154 | 123 | if (ACCESSING_MSB16) |
| 155 | { | |
| 156 | 124 | K054539_0_w(machine, reg+0, (data >> 8) & 0xff); |
| 157 | ||
| 125 | ||
| 158 | 126 | if (ACCESSING_LSB16) |
| 159 | { | |
| 160 | 127 | K054539_0_w(machine, reg+1, (data >> 0) & 0xff); |
| 161 | } | |
| 162 | 128 | } |
| 163 | 129 | |
| 164 | static READ16_HANDLER(K056800_68k_r) | |
| 130 | static READ16_HANDLER( K056800_68k_r ) | |
| 165 | 131 | { |
| 166 | 132 | UINT16 r = 0; |
| 167 | 133 | |
| 168 | 134 | if (!(mem_mask & 0xff00)) |
| 169 | { | |
| 170 | 135 | r |= K056800_sound_r(machine, (offset*2)+0, 0xffff) << 8; |
| 171 | ||
| 136 | ||
| 172 | 137 | if (!(mem_mask & 0x00ff)) |
| 173 | { | |
| 174 | 138 | r |= K056800_sound_r(machine, (offset*2)+1, 0xffff) << 0; |
| 175 | } | |
| 176 | 139 | |
| 177 | 140 | return r; |
| 178 | 141 | } |
| 179 | 142 | |
| 180 | static WRITE16_HANDLER(K056800_68k_w) | |
| 143 | static WRITE16_HANDLER( K056800_68k_w ) | |
| 181 | 144 | { |
| 182 | 145 | if (!(mem_mask & 0xff00)) |
| 183 | { | |
| 184 | 146 | K056800_sound_w(machine, (offset*2)+0, (data >> 8) & 0xff, 0xffff); |
| 185 | ||
| 147 | ||
| 186 | 148 | if (!(mem_mask & 0x00ff)) |
| 187 | { | |
| 188 | 149 | K056800_sound_w(machine, (offset*2)+1, (data >> 0) & 0xff, 0xffff); |
| 189 | } | |
| 190 | 150 | } |
| 191 | 151 | |
| 192 | 152 | static ADDRESS_MAP_START( sound_map, ADDRESS_SPACE_PROGRAM, 16 ) |
| r2086 | r2087 | |
| 263 | 223 | cpunum_set_input_line(machine, 0, INPUT_LINE_IRQ1, ASSERT_LINE); |
| 264 | 224 | } |
| 265 | 225 | |
| 266 | static MACHINE_RESET( ultrsprt ) | |
| 267 | { | |
| 268 | 226 | |
| 269 | } | |
| 270 | ||
| 271 | 227 | static MACHINE_DRIVER_START( ultrsprt ) |
| 272 | 228 | /* basic machine hardware */ |
| 273 | 229 | MDRV_CPU_ADD(PPC403, 25000000) /* PowerPC 403GA 25MHz */ |
| r2086 | r2087 | |
| 282 | 238 | MDRV_INTERLEAVE(200) |
| 283 | 239 | |
| 284 | 240 | MDRV_NVRAM_HANDLER(ultrsprt) |
| 285 | MDRV_MACHINE_RESET(ultrsprt) | |
| 286 | 241 | |
| 287 | 242 | /* video hardware */ |
| 288 | 243 | MDRV_SCREEN_ADD("main", RASTER) |
| 289 | 244 | MDRV_SCREEN_REFRESH_RATE(60) |
| 290 | 245 | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) |
| 291 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_ | |
| 246 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) | |
| 292 | 247 | MDRV_SCREEN_SIZE(512, 400) |
| 293 | 248 | MDRV_SCREEN_VISIBLE_AREA(0, 511, 0, 399) |
| 294 | 249 | |
| 295 | 250 | MDRV_PALETTE_LENGTH(8192) |
| 296 | 251 | |
| 297 | MDRV_VIDEO_START(ultrsprt) | |
| 298 | 252 | MDRV_VIDEO_UPDATE(ultrsprt) |
| 299 | 253 | |
| 300 | 254 | /* sound hardware */ |
| r2086 | r2087 | |
| 309 | 263 | static void sound_irq_callback(int irq) |
| 310 | 264 | { |
| 311 | 265 | 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)*/; | |
| 315 | 267 | else |
| 316 | { | |
| 317 | 268 | cpunum_set_input_line(Machine, 1, INPUT_LINE_IRQ6, PULSE_LINE); |
| 318 | } | |
| 319 | 269 | } |
| 320 | 270 | |
| 321 | 271 | static DRIVER_INIT( ultrsprt ) |
| r2086 | r2087 | |
| 327 | 277 | |
| 328 | 278 | /*****************************************************************************/ |
| 329 | 279 | |
| 330 | ROM_START(fiveside) | |
| 280 | ROM_START( fiveside ) | |
| 331 | 281 | 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)) | |
| 336 | 286 | |
| 337 | 287 | ROM_REGION(0x20000, REGION_CPU2, 0) /* M68K program */ |
| 338 | | |
| 288 | | |
| 339 | 289 | |
| 340 | 290 | 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)) | |
| 343 | 293 | ROM_END |
| 344 | 294 | |
| 345 | GAME(1995, fiveside, 0, | |
| 295 | GAME(1995, fiveside, 0, |
| r2086 | r2087 | |
|---|---|---|
| 22 | 22 | #include "sound/discrete.h" |
| 23 | 23 | |
| 24 | 24 | |
| 25 | ||
| 25 | #defi | |
| 26 | 26 | |
| 27 | ||
| 27 | 28 | static UINT8 orbit_misc_flags; |
| 28 | 29 | |
| 29 | 30 | |
| 31 | ||
| 32 | /************************************* | |
| 33 | * | |
| 34 | * Interrupts and timing | |
| 35 | * | |
| 36 | *************************************/ | |
| 37 | ||
| 38 | static 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 | ||
| 46 | static TIMER_CALLBACK( irq_off ) | |
| 47 | { | |
| 48 | cpunum_set_input_line(machine, 0, 0, CLEAR_LINE); | |
| 49 | } | |
| 50 | ||
| 51 | ||
| 30 | 52 | static INTERRUPT_GEN( orbit_interrupt ) |
| 31 | 53 | { |
| 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); | |
| 34 | 56 | } |
| 35 | 57 | |
| 36 | 58 | |
| 59 | ||
| 60 | /************************************* | |
| 61 | * | |
| 62 | * Bit flags | |
| 63 | * | |
| 64 | *************************************/ | |
| 65 | ||
| 37 | 66 | static void update_misc_flags(running_machine *machine, UINT8 val) |
| 38 | 67 | { |
| 39 | 68 | orbit_misc_flags = val; |
| r2086 | r2087 | |
| 47 | 76 | /* BIT6 => HYPER LED */ |
| 48 | 77 | /* BIT7 => WARNING SND */ |
| 49 | 78 | |
| 50 | orbit_nmi_enable = (orbit_misc_flags >> 2) & 1; | |
| 51 | 79 | discrete_sound_w(machine, ORBIT_WARNING_EN, orbit_misc_flags & 0x80); |
| 52 | 80 | |
| 53 | 81 | set_led_status(0, orbit_misc_flags & 0x08); |
| r2086 | r2087 | |
| 58 | 86 | } |
| 59 | 87 | |
| 60 | 88 | |
| 61 | static MACHINE_RESET( orbit ) | |
| 62 | { | |
| 63 | update_misc_flags(machine, 0); | |
| 64 | } | |
| 65 | ||
| 66 | ||
| 67 | 89 | static WRITE8_HANDLER( orbit_misc_w ) |
| 68 | 90 | { |
| 69 | 91 | UINT8 bit = offset >> 1; |
| 70 | 92 | |
| 71 | 93 | if (offset & 1) |
| 72 | { | |
| 73 | 94 | update_misc_flags(machine, orbit_misc_flags | (1 << bit)); |
| 74 | } | |
| 75 | 95 | else |
| 76 | { | |
| 77 | 96 | update_misc_flags(machine, orbit_misc_flags & ~(1 << bit)); |
| 78 | } | |
| 79 | 97 | } |
| 80 | 98 | |
| 81 | 99 | |
| 100 | ||
| 101 | /************************************* | |
| 102 | * | |
| 103 | * Machine setup | |
| 104 | * | |
| 105 | *************************************/ | |
| 106 | ||
| 107 | static MACHINE_RESET( orbit ) | |
| 108 | { | |
| 109 | update_misc_flags(machine, 0); | |
| 110 | } | |
| 111 | ||
| 112 | ||
| 113 | ||
| 114 | /************************************* | |
| 115 | * | |
| 116 | * Address maps | |
| 117 | * | |
| 118 | *************************************/ | |
| 119 | ||
| 82 | 120 | static 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 | |
| 100 | 137 | ADDRESS_MAP_END |
| 101 | 138 | |
| 102 | 139 | |
| 140 | ||
| 141 | /************************************* | |
| 142 | * | |
| 143 | * Port definitions | |
| 144 | * | |
| 145 | *************************************/ | |
| 146 | ||
| 103 | 147 | static INPUT_PORTS_START( orbit ) |
| 104 | 148 | PORT_START /* 0800 */ |
| 105 | 149 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r2086 | r2087 | |
| 174 | 218 | INPUT_PORTS_END |
| 175 | 219 | |
| 176 | 220 | |
| 221 | ||
| 222 | /************************************* | |
| 223 | * | |
| 224 | * Graphics layouts | |
| 225 | * | |
| 226 | *************************************/ | |
| 227 | ||
| 177 | 228 | static const gfx_layout orbit_full_sprite_layout = |
| 178 | 229 | { |
| 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 | |
| 193 | 237 | }; |
| 194 | 238 | |
| 195 | 239 | |
| 196 | 240 | static const gfx_layout orbit_upper_sprite_layout = |
| 197 | 241 | { |
| 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 | |
| 210 | 249 | }; |
| 211 | 250 | |
| 212 | 251 | |
| 213 | 252 | static const gfx_layout orbit_lower_sprite_layout = |
| 214 | 253 | { |
| 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 | |
| 227 | 261 | }; |
| 228 | 262 | |
| 229 | 263 | |
| 230 | 264 | static const gfx_layout orbit_tile_layout = |
| 231 | 265 | { |
| 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 | |
| 244 | 273 | }; |
| 245 | 274 | |
| 246 | 275 | |
| r2086 | r2087 | |
| 248 | 277 | GFXDECODE_ENTRY( REGION_GFX1, 0, orbit_full_sprite_layout, 0, 1 ) |
| 249 | 278 | GFXDECODE_ENTRY( REGION_GFX1, 0, orbit_upper_sprite_layout, 0, 1 ) |
| 250 | 279 | GFXDECODE_ENTRY( REGION_GFX1, 0, orbit_lower_sprite_layout, 0, 1 ) |
| 251 | GFXDECODE_E | |
| 280 | GFXDECODE_SCALE | |
| 252 | 281 | GFXDECODE_END |
| 253 | 282 | |
| 254 | 283 | |
| 255 | static 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 | } | |
| 260 | 284 | |
| 285 | /************************************* | |
| 286 | * | |
| 287 | * Machine drivers | |
| 288 | * | |
| 289 | *************************************/ | |
| 261 | 290 | |
| 262 | 291 | static MACHINE_DRIVER_START( orbit ) |
| 263 | 292 | |
| 264 | 293 | /* basic machine hardware */ |
| 265 | MDRV_CPU_ADD(M6800, | |
| 294 | MDRV_CPU_ADD(M6800, MASTER_CLOCK / 16) | |
| 266 | 295 | 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) | |
| 269 | 297 | |
| 298 | MDRV_TIMER_ADD_SCANLINE("32V", nmi_32v, "main", 0, 32) | |
| 299 | ||
| 270 | 300 | MDRV_MACHINE_RESET(orbit) |
| 271 | 301 | |
| 272 | 302 | /* video hardware */ |
| 273 | 303 | 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))) | |
| 276 | 304 | 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) | |
| 279 | 306 | |
| 280 | 307 | MDRV_GFXDECODE(orbit) |
| 281 | 308 | MDRV_PALETTE_LENGTH(2) |
| 282 | MDRV_PALETTE_INIT( | |
| 309 | MDRV_PALETTE_INIT( | |
| 283 | 310 | MDRV_VIDEO_START(orbit) |
| 284 | 311 | MDRV_VIDEO_UPDATE(orbit) |
| 285 | 312 | |
| r2086 | r2087 | |
| 293 | 320 | MACHINE_DRIVER_END |
| 294 | 321 | |
| 295 | 322 | |
| 323 | ||
| 324 | /************************************* | |
| 325 | * | |
| 326 | * ROM definitions | |
| 327 | * | |
| 328 | *************************************/ | |
| 329 | ||
| 296 | 330 | ROM_START( orbit ) |
| 297 | 331 | ROM_REGION( 0x10000, REGION_CPU1, 0 ) |
| 298 | 332 | ROM_LOAD_NIB_LOW ( "033701.h2", 0x6800, 0x400, CRC(6de43b85) SHA1(1643972f45d3a0dd6540158c575cd84cee2b0c9a) ) |
| r2086 | r2087 | |
| 322 | 356 | ROM_END |
| 323 | 357 | |
| 324 | 358 | |
| 359 | ||
| 360 | /************************************* | |
| 361 | * | |
| 362 | * Game drivers | |
| 363 | * | |
| 364 | *************************************/ | |
| 365 | ||
| 325 | 366 | GAME( 1978, orbit, 0, orbit, orbit, 0, 0, "Atari", "Orbit", 0 ) |
| r2086 | r2087 | |
|---|---|---|
| 275 | 275 | cpunum_set_input_line(machine, 1,UPD7810_INTF2,HOLD_LINE); |
| 276 | 276 | } |
| 277 | 277 | |
| 278 | static UPD7810_CONFIG sound_cpu_config = | |
| 278 | static const UPD7810_CONFIG sound_cpu_config = | |
| 279 | 279 | { |
| 280 | 280 | TYPE_7810, |
| 281 | 281 | 0 |
| r2086 | r2087 | |
|---|---|---|
| 48 | 48 | extern int malzak_x; |
| 49 | 49 | extern int malzak_y; |
| 50 | 50 | |
| 51 | extern UINT8 | |
| 51 | extern UINT8 | |
| 52 | 52 | extern UINT8 *malzak_s2636_0_ram; |
| 53 | 53 | extern UINT8 *malzak_s2636_1_ram; |
| 54 | 54 | |
| 55 | 55 | // in video/malzak.c |
| 56 | 56 | VIDEO_START( malzak ); |
| 57 | 57 | VIDEO_UPDATE( malzak ); |
| 58 | WRITE8_HANDLER( playfield_w ); | |
| 58 | WRITE8_HANDLER( malzak_playfield_w ); | |
| 59 | 59 | |
| 60 | 60 | |
| 61 | static READ8_HANDLER( saa5050_r ) | |
| 62 | { | |
| 63 | return saa5050_vidram[offset]; | |
| 64 | } | |
| 65 | ||
| 66 | static WRITE8_HANDLER( saa5050_w ) | |
| 67 | { | |
| 68 | saa5050_vidram[offset] = data; | |
| 69 | } | |
| 70 | ||
| 71 | 61 | static READ8_HANDLER( fake_VRLE_r ) |
| 72 | 62 | { |
| 73 | 63 | return (malzak_s2636_0_ram[0xcb] & 0x3f) + (video_screen_get_vblank(machine->primary_screen)*0x40); |
| 74 | 64 | } |
| 75 | 65 | |
| 76 | static READ8_HANDLER( ram_mirror_r ) | |
| 77 | { | |
| 78 | return program_read_byte(0x1000+offset); | |
| 79 | } | |
| 80 | ||
| 81 | static WRITE8_HANDLER( ram_mirror_w ) | |
| 82 | { | |
| 83 | program_write_byte(0x1000+offset,data); | |
| 84 | } | |
| 85 | ||
| 86 | 66 | static READ8_HANDLER( bank_r ) |
| 87 | 67 | { |
| 88 | 68 | UINT8* bank = memory_region(REGION_USER2); |
| r2086 | r2087 | |
| 110 | 90 | } |
| 111 | 91 | } |
| 112 | 92 | |
| 113 | /* | |
| 114 | static 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 | */ | |
| 121 | static ADDRESS_MAP_START( readmem, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 122 | AM_RANGE(0x0000, 0x0bff) AM_READ(SMH_ROM) | |
| 93 | static ADDRESS_MAP_START( malzak_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 94 | ADDRESS_MAP_GLOBAL_MASK(0x7fff) | |
| 95 | AM_RANGE(0x0000, 0x0bff) AM_ROM | |
| 123 | 96 | 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 | |
| 140 | 110 | ADDRESS_MAP_END |
| 141 | 111 | |
| 142 | 112 | |
| 143 | static 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) | |
| 161 | ADDRESS_MAP_END | |
| 162 | ||
| 163 | static ADDRESS_MAP_START( malzak2_readmem, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 164 | AM_RANGE(0x0000, 0x0bff) AM_READ(SMH_ROM) | |
| 113 | static ADDRESS_MAP_START( malzak2_map, ADDRESS_SPACE_PROGRAM, 8 ) | |
| 114 | ADDRESS_MAP_GLOBAL_MASK(0x7fff) | |
| 115 | AM_RANGE(0x0000, 0x0bff) AM_ROM | |
| 165 | 116 | 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 | |
| 183 | 131 | ADDRESS_MAP_END |
| 184 | 132 | |
| 185 | 133 | |
| 186 | static 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) | |
| 204 | ADDRESS_MAP_END | |
| 205 | ||
| 206 | 134 | static READ8_HANDLER( s2650_data_r ) |
| 207 | 135 | { |
| 208 | 136 | popmessage("S2650 data port read"); |
| r2086 | r2087 | |
| 247 | 175 | return 0xd0 + counter; |
| 248 | 176 | } |
| 249 | 177 | |
| 250 | static ADDRESS_MAP_START( | |
| 178 | static ADDRESS_MAP_START( m | |
| 251 | 179 | 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) | |
| 255 | ADDRESS_MAP_END | |
| 256 | ||
| 257 | static ADDRESS_MAP_START( writeport, ADDRESS_SPACE_IO, 8 ) | |
| 258 | 180 | AM_RANGE(0x40, 0x40) AM_WRITE(port40_w) // possibly sound codes for dual SN76477s |
| 259 | 181 | 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 | |
| 260 | 183 | AM_RANGE(0xa0, 0xa0) AM_WRITE(SMH_NOP) // echoes I/O port read from port 0x80 |
| 261 | 184 | 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) | |
| 262 | 187 | ADDRESS_MAP_END |
| 263 | 188 | |
| 189 | ||
| 264 | 190 | static INPUT_PORTS_START( malzak ) |
| 265 | 191 | |
| 266 | 192 | /* Malzak has an 8-way stick |
| r2086 | r2087 | |
| 415 | 341 | |
| 416 | 342 | /* basic machine hardware */ |
| 417 | 343 | 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) | |
| 420 | 346 | |
| 421 | 347 | /* video hardware */ |
| 422 | 348 | MDRV_SCREEN_ADD("main", RASTER) |
| r2086 | r2087 | |
| 451 | 377 | MDRV_IMPORT_FROM( malzak ) |
| 452 | 378 | |
| 453 | 379 | MDRV_CPU_MODIFY( "main" ) |
| 454 | MDRV_CPU_PROGRAM_MAP( | |
| 380 | MDRV_CPU_PROGRAM_MAP( | |
| 455 | 381 | |
| 456 | 382 | MDRV_NVRAM_HANDLER( generic_0fill ) |
| 457 | 383 | MACHINE_DRIVER_END |
| r2086 | r2087 | |
|---|---|---|
| 49 | 49 | |
| 50 | 50 | |
| 51 | 51 | #include "driver.h" |
| 52 | #include "deprecat.h" | |
| 53 | 52 | #include "astrof.h" |
| 54 | 53 | |
| 55 | 54 | |
| r2086 | r2087 | |
| 70 | 69 | static UINT8 *astrof_colorram; |
| 71 | 70 | static UINT8 *tomahawk_protection; |
| 72 | 71 | |
| 73 | static emu_timer *irq_timer; | |
| 74 | ||
| 75 | 72 | static UINT8 *astrof_color; |
| 76 | 73 | static UINT8 astrof_palette_bank; |
| 77 | 74 | static UINT8 red_on; |
| r2086 | r2087 | |
| 88 | 85 | * |
| 89 | 86 | *************************************/ |
| 90 | 87 | |
| 91 | static READ8_HANDLER( irq_ | |
| 88 | static READ8_HANDLER( irq_ | |
| 92 | 89 | { |
| 93 | cpunum_set_input_line( | |
| 90 | cpunum_set_input_line(machine, 0, 0, CLEAR_LINE); | |
| 94 | 91 | |
| 95 | 92 | return 0; |
| 96 | 93 | } |
| 97 | 94 | |
| 98 | 95 | |
| 99 | static TIMER_CALLBACK( irq_callback ) | |
| 96 | static TIMER_DEVICE_CALLBACK( irq_callback ) | |
| 100 | 97 | { |
| 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); | |
| 104 | 99 | } |
| 105 | 100 | |
| 106 | 101 | |
| 107 | static void create_irq_timer(void) | |
| 108 | { | |
| 109 | irq_timer = timer_alloc(irq_callback, NULL); | |
| 110 | } | |
| 111 | 102 | |
| 112 | ||
| 113 | static 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 | ||
| 120 | 103 | /************************************* |
| 121 | 104 | * |
| 122 | 105 | * Input handling |
| r2086 | r2087 | |
| 386 | 369 | static READ8_HANDLER( shoot_r ) |
| 387 | 370 | { |
| 388 | 371 | /* not really sure about this */ |
| 389 | return mame_rand( | |
| 372 | return mame_rand(machine) & 8; | |
| 390 | 373 | } |
| 391 | 374 | |
| 392 | 375 | |
| r2086 | r2087 | |
| 422 | 405 | |
| 423 | 406 | static MACHINE_START( astrof ) |
| 424 | 407 | { |
| 425 | create_irq_timer(); | |
| 426 | ||
| 427 | 408 | /* the 74175 outputs all HI's if not otherwise set */ |
| 428 | 409 | astrof_set_video_control_2(0xff); |
| 429 | 410 | |
| r2086 | r2087 | |
| 448 | 429 | |
| 449 | 430 | static MACHINE_START( spfghmk2 ) |
| 450 | 431 | { |
| 451 | create_irq_timer(); | |
| 452 | ||
| 453 | 432 | /* the 74175 outputs all HI's if not otherwise set */ |
| 454 | 433 | spfghmk2_set_video_control_2(0xff); |
| 455 | 434 | |
| r2086 | r2087 | |
| 465 | 444 | |
| 466 | 445 | static MACHINE_START( tomahawk ) |
| 467 | 446 | { |
| 468 | create_irq_timer(); | |
| 469 | ||
| 470 | 447 | /* the 74175 outputs all HI's if not otherwise set */ |
| 471 | 448 | tomahawk_set_video_control_2(0xff); |
| 472 | 449 | |
| r2086 | r2087 | |
| 484 | 461 | * |
| 485 | 462 | *************************************/ |
| 486 | 463 | |
| 487 | static MACHINE_RESET( astrof ) | |
| 488 | { | |
| 489 | start_irq_timer(machine); | |
| 490 | } | |
| 491 | ||
| 492 | ||
| 493 | 464 | static MACHINE_RESET( abattle ) |
| 494 | 465 | { |
| 495 | MACHINE_RESET_CALL(astrof); | |
| 496 | ||
| 497 | 466 | abattle_count = 0; |
| 498 | 467 | } |
| 499 | 468 | |
| r2086 | r2087 | |
| 518 | 487 | AM_RANGE(0x8007, 0x8007) AM_MIRROR(0x1ff8) AM_READWRITE(SMH_NOP, astrof_audio_2_w) |
| 519 | 488 | AM_RANGE(0xa000, 0xa000) AM_MIRROR(0x1ff8) AM_READ_PORT("IN") AM_WRITENOP |
| 520 | 489 | AM_RANGE(0xa001, 0xa001) AM_MIRROR(0x1ff8) AM_READ_PORT("DSW") AM_WRITENOP |
| 521 | AM_RANGE(0xa002, 0xa002) AM_MIRROR(0x1ff8) AM_READWRITE(irq_ | |
| 490 | AM_RANGE(0xa002, 0xa002) AM_MIRROR(0x1ff8) AM_READWRITE(irq_ | |
| 522 | 491 | AM_RANGE(0xa003, 0xa007) AM_MIRROR(0x1ff8) AM_NOP |
| 523 | 492 | AM_RANGE(0xc000, 0xffff) AM_ROM |
| 524 | 493 | ADDRESS_MAP_END |
| r2086 | r2087 | |
| 537 | 506 | AM_RANGE(0x8007, 0x8007) AM_MIRROR(0x1ff8) AM_NOP |
| 538 | 507 | AM_RANGE(0xa000, 0xa000) AM_MIRROR(0x1ff8) AM_READ_PORT("IN") AM_WRITENOP |
| 539 | 508 | AM_RANGE(0xa001, 0xa001) AM_MIRROR(0x1ff8) AM_READ_PORT("DSW") AM_WRITENOP |
| 540 | AM_RANGE(0xa002, 0xa002) AM_MIRROR(0x1ff8) AM_READWRITE(irq_ | |
| 509 | AM_RANGE(0xa002, 0xa002) AM_MIRROR(0x1ff8) AM_READWRITE(irq_ | |
| 541 | 510 | AM_RANGE(0xa003, 0xa007) AM_MIRROR(0x1ff8) AM_NOP |
| 542 | 511 | AM_RANGE(0xc000, 0xffff) AM_ROM |
| 543 | 512 | ADDRESS_MAP_END |
| r2086 | r2087 | |
| 556 | 525 | AM_RANGE(0x8007, 0x8007) AM_MIRROR(0x1ff8) AM_READWRITE(SMH_NOP, SMH_RAM) AM_BASE(&tomahawk_protection) |
| 557 | 526 | AM_RANGE(0xa000, 0xa000) AM_MIRROR(0x1ff8) AM_READ_PORT("IN") AM_WRITE(SMH_NOP) |
| 558 | 527 | 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_ | |
| 528 | AM_RANGE(0xa002, 0xa002) AM_MIRROR(0x1ff8) AM_READWRITE(irq_ | |
| 560 | 529 | AM_RANGE(0xa003, 0xa003) AM_MIRROR(0x1ff8) AM_READWRITE(tomahawk_protection_r, SMH_NOP) |
| 561 | 530 | AM_RANGE(0xa004, 0xa007) AM_MIRROR(0x1ff8) AM_NOP |
| 562 | 531 | AM_RANGE(0xc000, 0xffff) AM_ROM |
| r2086 | r2087 | |
| 651 | 620 | PORT_DIPSETTING( 0x00, "5000" ) |
| 652 | 621 | PORT_DIPSETTING( 0x10, "7000" ) |
| 653 | 622 | PORT_DIPSETTING( 0x20, "10000" ) |
| 654 | PORT_DIPSETTING( 0x30, DEF_STR( None ) ) | |
| 623 | PORT_DIPSETTING( 0x30, DEF_STR( None ) ) | |
| 655 | 624 | PORT_DIPNAME( 0x40, 0x00, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW:7") |
| 656 | 625 | PORT_DIPSETTING( 0x00, DEF_STR( Easy ) ) |
| 657 | 626 | PORT_DIPSETTING( 0x40, DEF_STR( Hard ) ) |
| r2086 | r2087 | |
| 864 | 833 | |
| 865 | 834 | /* basic machine hardware */ |
| 866 | 835 | MDRV_CPU_ADD_TAG("main", M6502, MAIN_CPU_CLOCK) |
| 836 | MDRV_TIMER_ADD_SCANLINE("VBLANK", irq_callback, "main", VBSTART, 0) | |
| 867 | 837 | |
| 868 | MDRV_MACHINE_RESET(astrof) | |
| 869 | ||
| 870 | 838 | /* video hardware */ |
| 871 | 839 | MDRV_VIDEO_START(astrof) |
| 872 | 840 |
| r2086 | r2087 | |
|---|---|---|
| 338 | 338 | { |
| 339 | 339 | FALSE, /* halt on reset */ |
| 340 | 340 | "main", /* the screen operated on */ |
| 341 | 5000000, /* pixel clock */ | |
| 342 | 2, /* pixels per clock */ | |
| 341 | 10000000, /* pixel clock */ | |
| 342 | 1, /* pixels per clock */ | |
| 343 | 343 | xtheball_scanline_update, /* scanline callback */ |
| 344 | 344 | NULL, /* generate interrupt */ |
| 345 | 345 | xtheball_to_shiftreg, /* write to shiftreg function */ |
| r2086 | r2087 | |
| 369 | 369 | |
| 370 | 370 | MDRV_SCREEN_ADD("main", RASTER) |
| 371 | 371 | 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) | |
| 375 | 373 | |
| 376 | 374 | /* sound hardware */ |
| 377 | 375 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| r2086 | r2087 | |
|---|---|---|
| 53 | 53 | UINT8 gticlub_led_reg1 = 0x7f; |
| 54 | 54 | |
| 55 | 55 | int K001604_vh_start(running_machine *machine, int chip); |
| 56 | void K001604_tile_update(int chip); | |
| 56 | void K001604_tile_update(running_machine *machine, int chip); | |
| 57 | 57 | void K001604_draw_front_layer(int chip, bitmap_t *bitmap, const rectangle *cliprect); |
| 58 | 58 | void K001604_draw_back_layer(int chip, bitmap_t *bitmap, const rectangle *cliprect); |
| 59 | 59 | READ32_HANDLER(K001604_tile_r); |
| r2086 | r2087 | |
| 112 | 112 | |
| 113 | 113 | if (screen == left_screen) |
| 114 | 114 | { |
| 115 | K001604_tile_update(0); | |
| 115 | K001604_tile_update(screen->machine, 0); | |
| 116 | 116 | // K001604_draw_back_layer(bitmap, cliprect); |
| 117 | 117 | |
| 118 | 118 | voodoo_update(0, bitmap, cliprect); |
| r2086 | r2087 | |
| 121 | 121 | } |
| 122 | 122 | else if (screen == right_screen) |
| 123 | 123 | { |
| 124 | K001604_tile_update(1); | |
| 124 | K001604_tile_update(screen->machine, 1); | |
| 125 | 125 | // K001604_draw_back_layer(bitmap, cliprect); |
| 126 | 126 | |
| 127 | 127 | voodoo_update(1, bitmap, cliprect); |
| r2086 | r2087 | |
|---|---|---|
| 337 | 337 | * |
| 338 | 338 | *************************************/ |
| 339 | 339 | |
| 340 | static z80dma_interface dk3_dma = | |
| 340 | static const z80dma_interface dk3_dma = | |
| 341 | 341 | { |
| 342 | 342 | 0, |
| 343 | 343 | CLOCK_1H, |
| r2086 | r2087 | |
|---|---|---|
| 1313 | 1313 | } |
| 1314 | 1314 | |
| 1315 | 1315 | // generate a 50 Hz signal (based on an RC time) ////////////////////////// |
| 1316 | static | |
| 1316 | static | |
| 1317 | 1317 | { |
| 1318 | 1318 | // Although reported as a '50Hz' signal, the fact that both rising and |
| 1319 | 1319 | // falling edges of the pulse are used, the timer actually gives a 100Hz |
| r2086 | r2087 | |
| 1352 | 1352 | MDRV_CPU_ADD_TAG("main", M6809, MPU4_MASTER_CLOCK/4) |
| 1353 | 1353 | MDRV_CPU_PROGRAM_MAP(mod2_memmap,0) |
| 1354 | 1354 | |
| 1355 | MDRV_ | |
| 1355 | MDRV_TIMER_ADD_PERIODIC | |
| 1356 | 1356 | |
| 1357 | 1357 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 1358 | 1358 | MDRV_SOUND_ADD_TAG("AY8913",AY8913, MPU4_MASTER_CLOCK/4) |
| r2086 | r2087 | |
|---|---|---|
| 1093 | 1093 | PORT_START_TAG("IN1") |
| 1094 | 1094 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1095 | 1095 | |
| 1096 | PORT_START_TAG("IN | |
| 1096 | PORT_START_TAG("IN3") | |
| 1097 | 1097 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL |
| 1098 | 1098 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_COCKTAIL |
| 1099 | 1099 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL |
| r2086 | r2087 | |
|---|---|---|
| 9 | 9 | Known Issues: |
| 10 | 10 | Mad Crasher fails the ROM test, but ROMs are verified to be good (reason's unknown) |
| 11 | 11 | 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) | |
| 14 | 12 | |
| 15 | 13 | |
| 16 | 14 | Change Log |
| r2086 | r2087 | |
| 122 | 120 | |
| 123 | 121 | static READ8_HANDLER( sound_nmi_ack_r ) |
| 124 | 122 | { |
| 125 | cpunum_set_input_line( | |
| 123 | cpunum_set_input_line(machine, 2, INPUT_LINE_NMI, CLEAR_LINE); | |
| 126 | 124 | return 0; |
| 127 | 125 | } |
| 128 | 126 | |
| r2086 | r2087 | |
| 170 | 168 | AM_RANGE(0x8300, 0x8300) AM_WRITE(sound_command_w) |
| 171 | 169 | AM_RANGE(0x8400, 0x8400) AM_READ(input_port_3_r) /* dipswitch#1 */ |
| 172 | 170 | AM_RANGE(0x8500, 0x8500) AM_READ(input_port_4_r) /* dipswitch#2 */ |
| 173 | AM_RANGE(0x8600, 0x8600) AM_ | |
| 171 | AM_RANGE(0x8600, 0x8600) AM_ | |
| 174 | 172 | AM_RANGE(0x8700, 0x8700) AM_READWRITE(snk_cpuB_nmi_trigger_r, snk_cpuA_nmi_ack_w) |
| 175 | 173 | AM_RANGE(0xc000, 0xcfff) AM_RAM AM_BASE(&spriteram) AM_SHARE(1) |
| 176 | 174 | AM_RANGE(0xd000, 0xdfff) AM_READWRITE(SMH_RAM, marvins_background_ram_w) AM_SHARE(2) AM_BASE(&spriteram_3) |
| r2086 | r2087 | |
| 196 | 194 | AM_RANGE(0x8300, 0x8300) AM_WRITE(sound_command_w) |
| 197 | 195 | AM_RANGE(0x8400, 0x8400) AM_READ(input_port_3_r) /* dipswitch#1 */ |
| 198 | 196 | AM_RANGE(0x8500, 0x8500) AM_READ(input_port_4_r) /* dipswitch#2 */ |
| 199 | AM_RANGE(0x8600, 0x86ff) AM_ | |
| 197 | AM_RANGE(0x8600, 0x86ff) AM_ | |
| 200 | 198 | AM_RANGE(0x8700, 0x8700) AM_READWRITE(snk_cpuB_nmi_trigger_r, snk_cpuA_nmi_ack_w) |
| 201 | 199 | // AM_RANGE(0xc800, 0xc800) AM_WRITE(marvins_palette_bank_w) // palette bank switch (c8f1 for Vanguard) |
| 202 | 200 | AM_RANGE(0xc800, 0xc8ff) AM_RAM |
| r2086 | r2087 | |
| 413 | 411 | PORT_DIPNAME( 0x01, 0x01, "Unused SW 1-0" ) |
| 414 | 412 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) |
| 415 | 413 | 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 ) ) | |
| 419 | 417 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Lives ) ) |
| 420 | 418 | PORT_DIPSETTING( 0x04, "3" ) |
| 421 | 419 | PORT_DIPSETTING( 0x00, "5" ) |
| r2086 | r2087 | |
|---|---|---|
| 751 | 751 | |
| 752 | 752 | ROM_START(kviper) |
| 753 | 753 | VIPER_BIOS |
| 754 | ||
| 755 | ROM_REGION(0x2000, REGION_USER2, ROMREGION_ERASE00) /* M48T58 Timekeeper NVRAM */ | |
| 754 | 756 | ROM_END |
| 755 | 757 | |
| 756 | 758 |
| r2086 | r2087 | |
|---|---|---|
| 104 | 104 | PALETTE_INIT( mermaid ); |
| 105 | 105 | VIDEO_START( mermaid ); |
| 106 | 106 | VIDEO_UPDATE( mermaid ); |
| 107 | VIDEO_EOF( mermaid ); | |
| 107 | 108 | |
| 108 | 109 | /* Read/Write Handlers */ |
| 109 | 110 | |
| r2086 | r2087 | |
| 272 | 273 | MDRV_PALETTE_INIT(mermaid) |
| 273 | 274 | MDRV_VIDEO_START(mermaid) |
| 274 | 275 | MDRV_VIDEO_UPDATE(mermaid) |
| 276 | MDRV_VIDEO_EOF(mermaid) | |
| 275 | 277 | |
| 276 | 278 | // sound hardware |
| 277 | 279 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| r2086 | r2087 | |
| 388 | 390 | |
| 389 | 391 | /* Game Drivers */ |
| 390 | 392 | |
| 391 | GAME( 1982, mermaid, 0, mermaid, mermaid, 0, ROT0, "[Sanritsu] Rock-Ola", "Mermaid", GAME_NOT_WORKING ) | |
| 392 | GAME( 1982, yachtmn, mermaid, mermaid, mermaid, 0, ROT0, "[Sanritsu] Esco", "Yachtsman", GAME_NOT_WORKING ) | |
| 393 | GAME( 1982, mermaid, 0, mermaid, mermaid, 0, ROT0, "[Sanritsu] Rock-Ola", "Mermaid", 0 ) | |
| 394 | GAME( 1982, yachtmn, mermaid, mermaid, mermaid, 0, ROT0, "[Sanritsu] Esco", "Yachtsman", 0 ) | |
| 393 | 395 | GAME( 1982, rougien, 0, mermaid, mermaid, 0, ROT0, "Sanritsu", "Rougien", 0 ) |
| r2086 | r2087 | |
|---|---|---|
| 525 | 525 | MDRV_CPU_PROGRAM_MAP(lethalj_map,0) |
| 526 | 526 | |
| 527 | 527 | /* video hardware */ |
| 528 | MDRV_PALETTE_LENGTH(32768) | |
| 529 | ||
| 530 | 528 | MDRV_SCREEN_ADD("main", RASTER) |
| 531 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_ | |
| 529 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) | |
| 532 | 530 | MDRV_SCREEN_RAW_PARAMS(VIDEO_CLOCK, 701, 0, 512, 263, 0, 236) |
| 533 | 531 | |
| 534 | 532 | MDRV_VIDEO_START(lethalj) |
| 535 | 533 | MDRV_VIDEO_UPDATE(tms340x0) |
| 536 | 534 | |
| 535 | MDRV_PALETTE_INIT(RRRRR_GGGGG_BBBBB) | |
| 536 | MDRV_PALETTE_LENGTH(32768) | |
| 537 | ||
| 537 | 538 | /* sound hardware */ |
| 538 | 539 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 539 | 540 |
| r2086 | r2087 | |
|---|---|---|
| 742 | 742 | MDRV_SCREEN_ADD("main", RASTER) |
| 743 | 743 | MDRV_SCREEN_REFRESH_RATE(60) |
| 744 | 744 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 745 | MDRV_SCREEN_SIZE( | |
| 745 | MDRV_SCREEN_SIZE(64*8, 32*8) | |
| 746 | 746 | MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1) |
| 747 | 747 | MDRV_GFXDECODE(bbusters) |
| 748 | 748 | MDRV_PALETTE_LENGTH(2048) |
| r2086 | r2087 | |
| 784 | 784 | MDRV_SCREEN_ADD("main", RASTER) |
| 785 | 785 | MDRV_SCREEN_REFRESH_RATE(60) |
| 786 | 786 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 787 | MDRV_SCREEN_SIZE( | |
| 787 | MDRV_SCREEN_SIZE(64*8, 32*8) | |
| 788 | 788 | MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1) |
| 789 | 789 | MDRV_GFXDECODE(mechatt) |
| 790 | 790 | MDRV_PALETTE_LENGTH(1024) |
| r2086 | r2087 | |
|---|---|---|
| 160 | 160 | MDRV_SCREEN_ADD("main", RASTER) |
| 161 | 161 | MDRV_SCREEN_REFRESH_RATE(60) |
| 162 | 162 | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */) |
| 163 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_ | |
| 163 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) | |
| 164 | 164 | MDRV_SCREEN_SIZE(512, 512) |
| 165 | 165 | MDRV_SCREEN_VISIBLE_AREA(0, 319, 0, 223) |
| 166 | 166 | |
| 167 | MDRV_PALETTE_INIT(RRRRR_GGGGG_BBBBB) | |
| 168 | MDRV_PALETTE_LENGTH(32768) | |
| 169 | ||
| 167 | 170 | MDRV_VIDEO_UPDATE(mosaicf2) |
| 168 | 171 | |
| 169 | 172 | /* sound hardware */ |
| r2086 | r2087 | |
|---|---|---|
| 54 | 54 | |
| 55 | 55 | static UINT32 *vram; |
| 56 | 56 | static int vbuffer = 0; |
| 57 | static bitmap_t *bitmaps[2]; | |
| 58 | 57 | |
| 59 | 58 | static int flash_roms; |
| 60 | 59 | static UINT32 flash_cmd = 0; |
| r2086 | r2087 | |
| 139 | 138 | } |
| 140 | 139 | } |
| 141 | 140 | |
| 142 | static 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 | ||
| 159 | 141 | static WRITE32_HANDLER( vram_w ) |
| 160 | 142 | { |
| 161 | | |
| 143 | UINT32 *dest = &vram[offset+(0x40000/4)*vbuffer]; | |
| 162 | 144 | |
| 163 | | |
| 145 | | |
| 164 | 146 | { |
| 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); | |
| 169 | 149 | |
| 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); | |
| 179 | 152 | } |
| 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); | |
| 191 | 156 | } |
| 192 | 157 | |
| 193 | 158 | static READ32_HANDLER( vram_r ) |
| r2086 | r2087 | |
| 307 | 272 | static VIDEO_START( dgpix ) |
| 308 | 273 | { |
| 309 | 274 | 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); | |
| 312 | 275 | } |
| 313 | 276 | |
| 314 | 277 | static VIDEO_UPDATE( dgpix ) |
| 315 | 278 | { |
| 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 | ||
| 317 | 297 | return 0; |
| 318 | 298 | } |
| 319 | 299 | |
| r2086 | r2087 | |
| 333 | 313 | MDRV_SCREEN_ADD("main", RASTER) |
| 334 | 314 | MDRV_SCREEN_REFRESH_RATE(60) |
| 335 | 315 | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */) |
| 336 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_ | |
| 316 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) | |
| 337 | 317 | MDRV_SCREEN_SIZE(512, 256) |
| 338 | 318 | MDRV_SCREEN_VISIBLE_AREA(0, 319, 0, 239) |
| 339 | 319 | |
| 320 | MDRV_PALETTE_INIT(BBBBB_GGGGG_RRRRR) | |
| 340 | 321 | MDRV_PALETTE_LENGTH(32768) |
| 341 | 322 | |
| 342 | 323 | MDRV_VIDEO_START(dgpix) |
| r2086 | r2087 | |
|---|---|---|
| 362 | 362 | /* 0x00 disables Coin 2. It still accepts coins and makes the sound, but |
| 363 | 363 | it doesn't give you any credit */ |
| 364 | 364 | |
| 365 | PORT_START_TAG(" | |
| 365 | PORT_START_TAG("DSW1") | |
| 366 | 366 | PORT_DIPNAME( 0x01, 0x00, DEF_STR( Allow_Continue ) ) |
| 367 | 367 | PORT_DIPSETTING( 0x01, DEF_STR( No ) ) |
| 368 | 368 | PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) |
| r2086 | r2087 | |
|---|---|---|
| 221 | 221 | /* loop over columns */ |
| 222 | 222 | for (x = cliprect->min_x; x < cliprect->max_x; x += 2) |
| 223 | 223 | { |
| 224 | /* data is BGR; convert to RGB */ | |
| 225 | 224 | UINT32 data = *src++; |
| 226 | data = (data & 0x03e003e0) | ((data << 10) & 0x7c007c00) | ((data >> 10) & 0x001f001f); | |
| 227 | 225 | |
| 228 | 226 | /* store two pixels */ |
| 229 | *dest++ = data & 0x7fff; | |
| 227 | *dest++ = (data >> 0) & 0x7fff; | |
| 230 | 228 | *dest++ = (data >> 16) & 0x7fff; |
| 231 | 229 | } |
| 232 | 230 | } |
| r2086 | r2087 | |
| 668 | 666 | MDRV_SCREEN_ADD("main", RASTER) |
| 669 | 667 | MDRV_SCREEN_REFRESH_RATE(60) |
| 670 | 668 | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */) |
| 671 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_ | |
| 669 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) | |
| 672 | 670 | MDRV_SCREEN_SIZE(320, 240) |
| 673 | 671 | MDRV_SCREEN_VISIBLE_AREA(0, 319, 0, 239) |
| 674 | 672 | |
| 673 | MDRV_PALETTE_INIT(BBBBB_GGGGG_RRRRR) | |
| 675 | 674 | MDRV_PALETTE_LENGTH(32768) |
| 676 | 675 | |
| 677 | 676 | MDRV_VIDEO_UPDATE(kinst) |
| r2086 | r2087 | |
|---|---|---|
| 63 | 63 | MDRV_SCREEN_ADD("main", RASTER) |
| 64 | 64 | MDRV_SCREEN_REFRESH_RATE(60) |
| 65 | 65 | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) |
| 66 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_RGB | |
| 66 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_RGB32) | |
| 67 | 67 | MDRV_SCREEN_SIZE(320, 240) |
| 68 | 68 | MDRV_SCREEN_VISIBLE_AREA(0, 319, 0, 239) |
| 69 | 69 |
| r2086 | r2087 | |
|---|---|---|
| 3269 | 3269 | |
| 3270 | 3270 | ROM_START( ridgerac ) |
| 3271 | 3271 | 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 ) | |
| 3319 | ROM_END | |
| 3320 | ||
| 3321 | ROM_START( ridgerab ) | |
| 3322 | ROM_REGION( 0x200000, REGION_CPU1, 0 ) /* main program */ | |
| 3272 | 3323 | ROM_LOAD32_BYTE( "rr1prll.4d", 0x00003, 0x80000, CRC(4bb7fc86) SHA1(8291375b8ec4d37e0d9e3bf38da2d5907b0f31bd) ) |
| 3273 | 3324 | ROM_LOAD32_BYTE( "rr1prlm.2d", 0x00002, 0x80000, CRC(68e13830) SHA1(ddc447c7afbb5c4238969d7e78bfe9cf8fac6061) ) |
| 3274 | 3325 | ROM_LOAD32_BYTE( "rr1prum.8d", 0x00001, 0x80000, CRC(705ef78a) SHA1(881903413e66d6fd83d46eb18c4e1230531832ae) ) |
| r2086 | r2087 | |
| 4370 | 4421 | GAME( 1995, raveracw, 0, namcos22, raveracw, raveracw, ROT0, "Namco", "Rave Racer (Rev. RV2, World)" , GAME_IMPERFECT_SOUND|GAME_IMPERFECT_GRAPHICS ) |
| 4371 | 4422 | GAME( 1995, raveracj, raveracw, namcos22, raveracw, raveracw, ROT0, "Namco", "Rave Racer (Rev. RV1 Ver.B, Japan)" , GAME_IMPERFECT_SOUND|GAME_IMPERFECT_GRAPHICS ) |
| 4372 | 4423 | GAME( 1995, raveraja, raveracw, namcos22, raveracw, raveracw, ROT0, "Namco", "Rave Racer (Rev. RV1, Japan)" , GAME_IMPERFECT_SOUND|GAME_IMPERFECT_GRAPHICS ) |
| 4373 | GAME( 1993, ridgerac, 0, namcos22, ridgera, ridgeraj, ROT0, "Namco", "Ridge Racer (Rev. RR2, World)" , GAME_IMPERFECT_SOUND|GAME_IMPERFECT_GRAPHICS ) /* 1993-10-07 */ | |
| 4424 | GAME( 1993, ridgerac, 0, namcos22, ridgera, ridgeraj, ROT0, "Namco", "Ridge Racer (Rev. RR3, World)" , GAME_IMPERFECT_SOUND|GAME_IMPERFECT_GRAPHICS ) /* 1993-10-07 */ | |
| 4425 | GAME( 1993, ridgerab, ridgerac, namcos22, ridgera, ridgeraj, ROT0, "Namco", "Ridge Racer (Rev. RR2, World)" , GAME_IMPERFECT_SOUND|GAME_IMPERFECT_GRAPHICS ) /* 1993-10-07 */ | |
| 4374 | 4426 | GAME( 1993, ridgeraj, ridgerac, namcos22, ridgera, ridgeraj, ROT0, "Namco", "Ridge Racer (Rev. RR1, Japan)" , GAME_IMPERFECT_SOUND|GAME_IMPERFECT_GRAPHICS ) /* 1993-10-07 */ |
| 4375 | 4427 | GAME( 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 */ |
| 4376 | 4428 | GAME( 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 ) |
| r2086 | r2087 | |
|---|---|---|
| 1566 | 1566 | return 0; |
| 1567 | 1567 | } |
| 1568 | 1568 | |
| 1569 | MC6845_ON_VSYNC_CHANGED( dealem_vsync_changed ) | |
| 1569 | static MC6845_ON_VSYNC_CHANGED( dealem_vsync_changed ) | |
| 1570 | 1570 | { |
| 1571 | 1571 | cpunum_set_input_line(device->machine, 0, INPUT_LINE_NMI, vsync); |
| 1572 | 1572 | } |
| r2086 | r2087 | |
| 1619 | 1619 | |
| 1620 | 1620 | MDRV_CPU_ADD_TAG("main", M6809, MPU4_MASTER_CLOCK/4 ) |
| 1621 | 1621 | MDRV_CPU_PROGRAM_MAP(mpu4_6809_map,0) |
| 1622 | MDRV_ | |
| 1622 | MDRV_TIMER_ADD_PERIODIC | |
| 1623 | 1623 | |
| 1624 | 1624 | MDRV_NVRAM_HANDLER(generic_0fill) // confirm |
| 1625 | 1625 | |
| r2086 | r2087 | |
| 1671 | 1671 | MDRV_CPU_ADD_TAG("main", M6809, MPU4_MASTER_CLOCK/4) |
| 1672 | 1672 | MDRV_CPU_PROGRAM_MAP(dealem_memmap,0) |
| 1673 | 1673 | |
| 1674 | MDRV_ | |
| 1674 | MDRV_TIMER_ADD_PERIODIC | |
| 1675 | 1675 | |
| 1676 | 1676 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 1677 | 1677 | MDRV_SOUND_ADD_TAG("AY8913",AY8913, MPU4_MASTER_CLOCK/4) |
| r2086 | r2087 | |
|---|---|---|
| 2328 | 2328 | ***************************************************************************/ |
| 2329 | 2329 | |
| 2330 | 2330 | static INPUT_PORTS_START( batlbubl ) |
| 2331 | PORT_START_TAG("IN | |
| 2331 | PORT_START_TAG("IN1") | |
| 2332 | 2332 | JOY_LSB(1, BUTTON1, UNKNOWN, UNKNOWN, UNKNOWN) |
| 2333 | 2333 | JOY_MSB(2, BUTTON1, UNKNOWN, UNKNOWN, UNKNOWN) |
| 2334 | 2334 |
| r2086 | r2087 | |
|---|---|---|
| 268 | 268 | MDRV_SCREEN_ADD("main", RASTER) |
| 269 | 269 | MDRV_SCREEN_REFRESH_RATE(60) |
| 270 | 270 | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) |
| 271 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_ | |
| 271 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) | |
| 272 | 272 | MDRV_SCREEN_SIZE(512, 512) |
| 273 | 273 | MDRV_SCREEN_VISIBLE_AREA(0, 319, 0, 239) |
| 274 | 274 | |
| 275 | MDRV_PALETTE_INIT(BBBBB_GGGGG_RRRRR) | |
| 276 | MDRV_PALETTE_LENGTH(32768) | |
| 277 | ||
| 275 | 278 | MDRV_VIDEO_START(eolith) |
| 276 | 279 | MDRV_VIDEO_UPDATE(eolith) |
| 277 | 280 |
| r2086 | r2087 | |
|---|---|---|
| 451 | 451 | ROM_LOAD( "gg6.bin", 0x14000, 0x4000, CRC(2d77e9b2) SHA1(944da1ce29a18bf0fc8deff78bceacba0bf23a07) ) /* tiles 2-3 Plane 3*/ |
| 452 | 452 | |
| 453 | 453 | ROM_REGION( 0x20000, REGION_GFX3, ROMREGION_DISPOSE | ROMREGION_ERASEFF ) |
| 454 | ROM_LOAD( "gg1 | |
| 454 | ROM_LOAD( "gng13. | |
| 455 | 455 | ROM_LOAD( "gg16.bin", 0x04000, 0x4000, CRC(06d7e5ca) SHA1(9e06012bcd82f98fad43de666ef9a75979d940ab) ) /* sprites 1 Plane 1-2 */ |
| 456 | 456 | ROM_LOAD( "gg15.bin", 0x08000, 0x4000, CRC(bc1fe02d) SHA1(e3a1421d465b87148ffa94f5673b2307f0246afe) ) /* sprites 2 Plane 1-2 */ |
| 457 | ROM_LOAD( "gg1 | |
| 457 | ROM_LOAD( "gng16.l4 | |
| 458 | 458 | ROM_LOAD( "gg13.bin", 0x14000, 0x4000, CRC(e80c3fca) SHA1(cb641c25bb04b970b2cbeca41adb792bbe142fb5) ) /* sprites 1 Plane 3-4 */ |
| 459 | 459 | ROM_LOAD( "gg12.bin", 0x18000, 0x4000, CRC(7780a925) SHA1(3f129ca6d695548b659955fe538584bd9ac2ff17) ) /* sprites 2 Plane 3-4 */ |
| 460 | 460 |
| r2086 | r2087 | |
|---|---|---|
| 44 | 44 | static UINT8 port1, port2; |
| 45 | 45 | |
| 46 | 46 | |
| 47 | WRITE8_HANDLER( sound_cmd_w ) | |
| 47 | static WRITE8_HANDLER( sound_cmd_w ) | |
| 48 | 48 | { |
| 49 | 49 | if ((data & 0x80) == 0) |
| 50 | 50 | soundlatch_w(machine, 0, data & 0x7f); |
| r2086 | r2087 | |
| 253 | 253 | unused_w |
| 254 | 254 | }; |
| 255 | 255 | |
| 256 | INTERRUPT_GEN (sound_nmi) | |
| 256 | static INTERRUPT_GEN (sound_nmi) | |
| 257 | 257 | { |
| 258 | 258 | cpunum_set_input_line(Machine, 1, INPUT_LINE_NMI, PULSE_LINE); |
| 259 | 259 | } |
| r2086 | r2087 | |
|---|---|---|
| 4154 | 4154 | PORT_DIPSETTING( 0x0000, DEF_STR( Yes ) ) |
| 4155 | 4155 | PORT_DIPUNUSED_DIPLOC( 0x8000, 0x8000, "SW1:8" ) /* Listed as "Unused" */ |
| 4156 | 4156 | |
| 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) | |
| 4162 | 4165 | |
| 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) | |
| 4167 | 4170 | INPUT_PORTS_END |
| 4168 | 4171 | |
| 4169 | 4172 |
| r2086 | r2087 | |
|---|---|---|
| 165 | 165 | At 0x0050 there is code to give infinite lives for player 1 when bit 3 of DSW0 |
| 166 | 166 | is ON. I can't tell however when it is supposed to be called. |
| 167 | 167 | |
| 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 | ||
| 168 | 171 | TODO: |
| 169 | 172 | - commsega: the first time you kill a soldier, the music stops. When you die, |
| 170 | 173 | the music restarts and won't stop a second time. |
| r2086 | r2087 | |
|---|---|---|
| 133 | 133 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 ) |
| 134 | 134 | |
| 135 | 135 | 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") | |
| 137 | 137 | PORT_DIPSETTING( 0x02, DEF_STR( 4C_1C ) ) |
| 138 | 138 | PORT_DIPSETTING( 0x05, DEF_STR( 3C_1C ) ) |
| 139 | 139 | PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ) ) |
| r2086 | r2087 | |
| 150 | 150 | PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) ) |
| 151 | 151 | PORT_DIPSETTING( 0x09, DEF_STR( 1C_7C ) ) |
| 152 | 152 | 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") | |
| 154 | 154 | PORT_DIPSETTING( 0x20, DEF_STR( 4C_1C ) ) |
| 155 | 155 | PORT_DIPSETTING( 0x50, DEF_STR( 3C_1C ) ) |
| 156 | 156 | PORT_DIPSETTING( 0x80, DEF_STR( 2C_1C ) ) |
| r2086 | r2087 | |
| 169 | 169 | // PORT_DIPSETTING( 0x00, "Invalid" ) |
| 170 | 170 | |
| 171 | 171 | PORT_START /* DSW #2 */ |
| 172 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Lives ) ) | |
| 172 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:1") | |
| 173 | 173 | PORT_DIPSETTING( 0x01, "1" ) |
| 174 | 174 | 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") | |
| 188 | 180 | PORT_DIPSETTING( 0x60, DEF_STR( Easy ) ) |
| 189 | 181 | PORT_DIPSETTING( 0x40, DEF_STR( Normal ) ) |
| 190 | 182 | PORT_DIPSETTING( 0x20, "Difficult" ) |
| 191 | 183 | 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") | |
| 193 | 185 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) |
| 194 | 186 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 195 | 187 | |
| r2086 | r2087 | |
| 198 | 190 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 199 | 191 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 ) |
| 200 | 192 | 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") | |
| 202 | 194 | PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) |
| 203 | 195 | 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" */ | |
| 211 | 199 | INPUT_PORTS_END |
| 212 | 200 | |
| 213 | 201 |
| r2086 | r2087 | |
|---|---|---|
| 99 | 99 | |
| 100 | 100 | } ds1204; |
| 101 | 101 | |
| 102 | void ds1204_w( int rst, int clk, int dq ) | |
| 102 | static void ds1204_w( int rst, int clk, int dq ) | |
| 103 | 103 | { |
| 104 | 104 | //logerror("ds1204_w: rst = %d, clk = %d, dq = %d\n", rst, clk, dq ); |
| 105 | 105 | if ( rst == 0 ) |
| r2086 | r2087 | |
| 178 | 178 | } |
| 179 | 179 | }; |
| 180 | 180 | |
| 181 | int ds1204_r(void) | |
| 181 | static int ds1204_r(void) | |
| 182 | 182 | { |
| 183 | 183 | //logerror("ds1204_r\n"); |
| 184 | 184 | return ds1204.out_bit; |
| 185 | 185 | }; |
| 186 | 186 | |
| 187 | void ds1204_init(const UINT8* key, const UINT8* nvram) | |
| 187 | static void ds1204_init(const UINT8* key, const UINT8* nvram) | |
| 188 | 188 | { |
| 189 | 189 | memset(&ds1204, 0, sizeof(ds1204)); |
| 190 | 190 | if (key) |
| r2086 | r2087 | |
| 350 | 350 | } |
| 351 | 351 | }; |
| 352 | 352 | |
| 353 | INPUT_PORTS_START(microtouch) | |
| 353 | static INPUT_PORTS_START(microtouch) | |
| 354 | 354 | PORT_START_TAG("TOUCH") |
| 355 | 355 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_IMPULSE(10) PORT_NAME( "Touch screen" ) |
| 356 | 356 | PORT_START_TAG("TOUCH_X") |
| r2086 | r2087 | |
| 513 | 513 | static int meritm_bank; |
| 514 | 514 | static int meritm_psd_a15; |
| 515 | 515 | |
| 516 | void meritm_crt250_switch_banks( void ) | |
| 516 | static void meritm_crt250_switch_banks( void ) | |
| 517 | 517 | { |
| 518 | 518 | int rombank = (meritm_bank & 0x07) ^ 0x07; |
| 519 | 519 | |
| r2086 | r2087 | |
| 526 | 526 | meritm_crt250_switch_banks(); |
| 527 | 527 | }; |
| 528 | 528 | |
| 529 | void meritm_switch_banks( void ) | |
| 529 | static void meritm_switch_banks( void ) | |
| 530 | 530 | { |
| 531 | 531 | int rambank = (meritm_psd_a15 >> 2) & 0x3; |
| 532 | 532 | int rombank = (((meritm_bank >> 3) & 0x3) << 5) | |
| r2086 | r2087 | |
| 623 | 623 | * |
| 624 | 624 | *************************************/ |
| 625 | 625 | |
| 626 | WRITE8_HANDLER(meritm_ds1644_w) | |
| 626 | static WRITE8_HANDLER(meritm_ds1644_w) | |
| 627 | 627 | { |
| 628 | 628 | int rambank = (meritm_psd_a15 >> 2) & 0x3; |
| 629 | 629 | if (rambank < 3) |
| r2086 | r2087 | |
| 647 | 647 | return ((data / 10) << 4) | (data %10); |
| 648 | 648 | } |
| 649 | 649 | |
| 650 | READ8_HANDLER(meritm_ds1644_r) | |
| 650 | static READ8_HANDLER(meritm_ds1644_r) | |
| 651 | 651 | { |
| 652 | 652 | mame_system_time systime; |
| 653 | 653 | int rambank = (meritm_psd_a15 >> 2) & 0x3; |
| r2086 | r2087 | |
| 811 | 811 | * |
| 812 | 812 | *************************************/ |
| 813 | 813 | |
| 814 | READ8_HANDLER(meritm_8255_port_c_r) | |
| 814 | static READ8_HANDLER(meritm_8255_port_c_r) | |
| 815 | 815 | { |
| 816 | 816 | //logerror( "8255 port C read\n" ); |
| 817 | 817 | return 0xff; |
| 818 | 818 | }; |
| 819 | 819 | |
| 820 | WRITE8_HANDLER(meritm_crt250_port_b_w) | |
| 820 | static WRITE8_HANDLER(meritm_crt250_port_b_w) | |
| 821 | 821 | { |
| 822 | 822 | //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) ); |
| 823 | 823 | output_set_value("P1 DISC 1 LAMP", !BIT(data,0)); |
| r2086 | r2087 | |
| 862 | 862 | Port B: Bits 0,1 used |
| 863 | 863 | */ |
| 864 | 864 | |
| 865 | READ8_HANDLER(meritm_ay8930_port_a_r) | |
| 865 | static READ8_HANDLER(meritm_ay8930_port_a_r) | |
| 866 | 866 | { |
| 867 | 867 | return readinputportbytag_safe("DSW", 0); |
| 868 | 868 | }; |
| 869 | 869 | |
| 870 | WRITE8_HANDLER(meritm_ay8930_port_b_w) | |
| 870 | static WRITE8_HANDLER(meritm_ay8930_port_b_w) | |
| 871 | 871 | { |
| 872 | 872 | // lamps |
| 873 | 873 | }; |
| r2086 | r2087 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | driver by Nicola Salmoria |
| 6 | 6 | |
| 7 | DIP locations verified for: | |
| 8 | - blockout (manual) | |
| 9 | ||
| 7 | 10 | ***************************************************************************/ |
| 8 | 11 | |
| 9 | 12 | #include "driver.h" |
| r2086 | r2087 | |
| 88 | 91 | |
| 89 | 92 | |
| 90 | 93 | static INPUT_PORTS_START( blockout ) |
| 91 | PORT_START | |
| 94 | PORT_START_TAG(" | |
| 92 | 95 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY |
| 93 | 96 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY |
| 94 | 97 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY |
| r2086 | r2087 | |
| 98 | 101 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) |
| 99 | 102 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) |
| 100 | 103 | |
| 101 | PORT_START | |
| 104 | PORT_START_TAG(" | |
| 102 | 105 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) |
| 103 | 106 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) |
| 104 | 107 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) |
| r2086 | r2087 | |
| 108 | 111 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) |
| 109 | 112 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 ) |
| 110 | 113 | |
| 111 | PORT_START | |
| 114 | PORT_START_TAG("IN2") | |
| 112 | 115 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 113 | 116 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 114 | 117 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN3 ) |
| 115 | 118 | |
| 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") | |
| 118 | 121 | PORT_DIPSETTING( 0x00, DEF_STR( 3C_1C ) ) |
| 119 | 122 | PORT_DIPSETTING( 0x01, DEF_STR( 2C_1C ) ) |
| 120 | 123 | PORT_DIPSETTING( 0x03, DEF_STR( 1C_1C ) ) |
| 121 | 124 | PORT_DIPSETTING( 0x02, DEF_STR( 1C_2C ) ) |
| 122 | 125 | /* the following two are supposed to control Coin 2, but they don't work. */ |
| 123 | 126 | /* 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") | |
| 134 | 133 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 135 | 134 | 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" */ | |
| 142 | 137 | |
| 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") | |
| 145 | 140 | PORT_DIPSETTING( 0x02, DEF_STR( Easy ) ) |
| 146 | 141 | PORT_DIPSETTING( 0x03, DEF_STR( Normal ) ) |
| 147 | 142 | PORT_DIPSETTING( 0x01, DEF_STR( Hard ) ) |
| 148 | 143 | 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") | |
| 150 | 145 | PORT_DIPSETTING( 0x00, "2" ) |
| 151 | 146 | 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" */ | |
| 163 | 152 | INPUT_PORTS_END |
| 164 | 153 | |
| 165 | 154 | static 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") | |
| 171 | 158 | 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 ) | |
| 175 | 159 | |
| 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") | |
| 181 | 161 | 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 ) | |
| 185 | 162 | |
| 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") | |
| 224 | 164 | /* 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" ) | |
| 237 | 166 | /* 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") | |
| 240 | 169 | INPUT_PORTS_END |
| 241 | 170 | |
| 242 | 171 | static 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 ) | |
| 252 | 173 | |
| 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 | ||
| 268 | 174 | /* 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") | |
| 277 | 177 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 278 | 178 | 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" ) | |
| 286 | 180 | |
| 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") | |
| 293 | 182 | /* 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") | |
| 295 | 184 | PORT_DIPSETTING( 0x04, "1" ) |
| 296 | 185 | 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 ) | |
| 302 | 186 | INPUT_PORTS_END |
| 303 | 187 | |
| 304 | 188 | /* handler called by the 2151 emulator when the internal timers cause an IRQ */ |
| r2086 | r2087 | |
|---|---|---|
| 84 | 84 | |
| 85 | 85 | static VIDEO_START( jetwave ) |
| 86 | 86 | { |
| 87 | K001005_init(); | |
| 87 | K001005_init(machine); | |
| 88 | 88 | K001604_vh_start(machine, 0); |
| 89 | 89 | } |
| 90 | 90 | |
| r2086 | r2087 | |
| 133 | 133 | }; |
| 134 | 134 | |
| 135 | 135 | K056832_vh_start(machine, REGION_GFX2, K056832_BPP_8, 1, scrolld, game_tile_callback, 0); |
| 136 | K001005_init(); | |
| 136 | K001005_init(machine); | |
| 137 | 137 | } |
| 138 | 138 | |
| 139 | 139 | static VIDEO_UPDATE( zr107 ) |
| r2086 | r2087 | |
|---|---|---|
| 37 | 37 | } |
| 38 | 38 | } |
| 39 | 39 | |
| 40 | static void draw_char( | |
| 40 | static void draw_char( | |
| 41 | 41 | { |
| 42 | 42 | int i,j; |
| 43 | 43 | UINT8 *dp; |
| r2086 | r2087 | |
| 51 | 51 | { |
| 52 | 52 | UINT8 pen = dp[index++]; |
| 53 | 53 | if (pen) |
| 54 | p[i] = | |
| 54 | p[i] = | |
| 55 | 55 | else |
| 56 | p[i] = | |
| 56 | p[i] = | |
| 57 | 57 | } |
| 58 | 58 | } |
| 59 | 59 | } |
| r2086 | r2087 | |
| 76 | 76 | int att1 = (cga[index] >> 24) & 0xff; |
| 77 | 77 | int ch1 = (cga[index] >> 16) & 0xff; |
| 78 | 78 | |
| 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); | |
| 81 | 81 | index++; |
| 82 | 82 | } |
| 83 | 83 | } |
| r2086 | r2087 | |
| 422 | 422 | MDRV_SCREEN_ADD("main", RASTER) |
| 423 | 423 | MDRV_SCREEN_REFRESH_RATE(60) |
| 424 | 424 | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) |
| 425 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_ | |
| 425 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) | |
| 426 | 426 | MDRV_SCREEN_SIZE(640, 480) |
| 427 | 427 | MDRV_SCREEN_VISIBLE_AREA(0, 639, 0, 199) |
| 428 | 428 |
| r2086 | r2087 | |
|---|---|---|
| 279 | 279 | AM_RANGE(0xf003, 0xf003) AM_WRITE(wilytwr_palbank_w) |
| 280 | 280 | AM_RANGE(0xf006, 0xf007) AM_WRITE(coin_w) |
| 281 | 281 | AM_RANGE(0xf800, 0xf800) AM_WRITE(soundlatch_w) |
| 282 | AM_RANGE(0xf801, 0xf801) AM_WRITE( | |
| 282 | AM_RANGE(0xf801, 0xf801) AM_WRITE(SMH | |
| 283 | 283 | AM_RANGE(0xf803, 0xf803) AM_WRITE(snd_irq_w) |
| 284 | 284 | ADDRESS_MAP_END |
| 285 | 285 |
| r2086 | r2087 | |
|---|---|---|
| 98 | 98 | - similarly, splndrbt hardware only appears to be capable of displaying 24 sprites. |
| 99 | 99 | This time, they are consecutive in RAM. |
| 100 | 100 | |
| 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. | |
| 101 | 104 | |
| 102 | TODO: | |
| 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 | ||
| 117 | 105 | Settings: 1 2 3 4 5 6 7 8 |
| 118 | 106 | COIN 1 1 Coin / 1 Play ON ON |
| 119 | 107 | 1 Coin / 2 Play ON OFF |
| r2086 | r2087 | |
| 128 | 116 | CABINET Cocktail ON |
| 129 | 117 | Upright OFF |
| 130 | 118 | |
| 119 | ||
| 120 | TODO: | |
| 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 | ||
| 131 | 134 | - gekisou: there's a white line crossing the explosion sprite. This doesn't look |
| 132 | 135 | like a bad ROM since the line is crossing several, not concecutive, explosion |
| 133 | 136 | sprites, and no other sprites. |
| 134 | 137 | |
| 135 | 138 | - gekisou: wrong sprite when hitting helicopter with missile? |
| 136 | 139 | |
| 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 | ||
| 137 | 144 | - splndrbt, hvoltage: the interpretation of the scaling PROMs might be wrong. |
| 138 | 145 | 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. | |
| 139 | 147 | Note that sprites are 30x30 instead of 32x32. |
| 140 | 148 | |
| 141 | 149 | - Need to use different default volumes for various games, especially gekisou |
| r2086 | r2087 | |
| 150 | 158 | |
| 151 | 159 | - implement low-pass filters on the DAC output |
| 152 | 160 | |
| 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 | ||
| 153 | 165 | * Special Thanks to: |
| 154 | 166 | |
| 155 | 167 | Jarek Burczynski for a superb MSM5232 emulation |
| r2086 | r2087 | |
| 376 | 388 | static UINT8 equites_dac_latch; |
| 377 | 389 | static UINT8 equites_8155_portb; |
| 378 | 390 | |
| 379 | static UINT8 eq8155_port_a,eq8155_port_c,ay_port_a,ay_port_b,eq_ | |
| 391 | static UINT8 eq8155_port_a,eq8155_port_c,ay_port_a,ay_port_b,eq_cymbal_ctrl; | |
| 380 | 392 | |
| 381 | 393 | static MACHINE_RESET(equites) |
| 382 | 394 | { |
| r2086 | r2087 | |
| 395 | 407 | cpunum_set_input_line(machine, 1, INPUT_LINE_NMI, ASSERT_LINE); |
| 396 | 408 | } |
| 397 | 409 | |
| 410 | ||
| 411 | static float cymvol,hihatvol; | |
| 412 | ||
| 398 | 413 | static TIMER_CALLBACK( equites_frq_adjuster_callback ) |
| 399 | 414 | { |
| 400 | 415 | UINT8 frq = readinputportbytag(FRQ_ADJUSTER_TAG); |
| 401 | 416 | |
| 402 | 417 | 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 */ | |
| 404 | 424 | } |
| 405 | 425 | |
| 406 | 426 | static SOUND_START(equites) |
| r2086 | r2087 | |
| 435 | 455 | |
| 436 | 456 | case 4: // c0fc: increment PROM address (written by NMI handler) |
| 437 | 457 | 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. | |
| 441 | 464 | break; |
| 442 | 465 | |
| 443 | 466 | case 5: // c0fd: n.c. |
| r2086 | r2087 | |
| 492 | 515 | if (data & ~ay_port_b & 0x80) |
| 493 | 516 | sample_start(2, 2, 0); |
| 494 | 517 | |
| 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 | ||
| 495 | 534 | ay_port_b = data; |
| 496 | 535 | |
| 497 | 536 | #if POPDRUMKIT |
| r2086 | r2087 | |
| 499 | 538 | #endif |
| 500 | 539 | } |
| 501 | 540 | |
| 541 | static WRITE8_HANDLER(equites_cymbal_ctrl_w) | |
| 542 | { | |
| 543 | eq_cymbal_ctrl++; | |
| 544 | } | |
| 502 | 545 | |
| 503 | 546 | |
| 547 | ||
| 504 | 548 | static void equites_update_dac(void) |
| 505 | 549 | { |
| 506 | 550 | // there is only one latch, which is used to drive two DAC channels. |
| r2086 | r2087 | |
| 528 | 572 | equites_update_dac(); |
| 529 | 573 | } |
| 530 | 574 | |
| 531 | static WRITE8_HANDLER(equites_unk1_w) | |
| 532 | { | |
| 533 | eq_unk1++; | |
| 534 | } | |
| 535 | ||
| 536 | 575 | static void equites_msm5232_gate(int state) |
| 537 | 576 | { |
| 538 | 577 | } |
| r2086 | r2087 | |
| 608 | 647 | } |
| 609 | 648 | #endif |
| 610 | 649 | |
| 650 | ||
| 651 | // Gekisou special handling | |
| 652 | static int unknown_bit; | |
| 653 | ||
| 654 | static CUSTOM_INPUT( gekisou_unknown_status ) | |
| 655 | { | |
| 656 | return unknown_bit; | |
| 657 | } | |
| 658 | ||
| 659 | static WRITE16_HANDLER( gekisou_unknown_0_w ) | |
| 660 | { | |
| 661 | unknown_bit = 0; | |
| 662 | } | |
| 663 | ||
| 664 | static WRITE16_HANDLER( gekisou_unknown_1_w ) | |
| 665 | { | |
| 666 | unknown_bit = 1; | |
| 667 | } | |
| 668 | ||
| 611 | 669 | /******************************************************************************/ |
| 612 | 670 | // Main CPU Memory Map |
| 613 | 671 | |
| r2086 | r2087 | |
| 645 | 703 | |
| 646 | 704 | static ADDRESS_MAP_START( equites_map, ADDRESS_SPACE_PROGRAM, 16 ) |
| 647 | 705 | 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 | |
| 649 | 707 | AM_RANGE(0x080000, 0x080fff) AM_READWRITE(equites_fg_videoram_r, equites_fg_videoram_w) // 8-bit |
| 650 | 708 | AM_RANGE(0x0c0000, 0x0c01ff) AM_RAM AM_WRITE(equites_bg_videoram_w) AM_BASE(&equites_bg_videoram) |
| 651 | 709 | AM_RANGE(0x0c0200, 0x0c0fff) AM_RAM |
| r2086 | r2087 | |
| 661 | 719 | AM_RANGE(0x1ac000, 0x1ac001) AM_WRITENOP // 8404 control port4 |
| 662 | 720 | AM_RANGE(0x1c0000, 0x1c0001) AM_READWRITE(input_port_0_word_r, equites_scrollreg_w) // scroll register[XXYY] |
| 663 | 721 | 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) | |
| 664 | 724 | AM_RANGE(0x780000, 0x780001) AM_WRITE(watchdog_reset16_w) |
| 665 | 725 | ADDRESS_MAP_END |
| 666 | 726 | |
| r2086 | r2087 | |
| 694 | 754 | AM_RANGE(0xc0a0, 0xc0a0) AM_WRITE(AY8910_write_port_0_w) |
| 695 | 755 | AM_RANGE(0xc0a1, 0xc0a1) AM_WRITE(AY8910_control_port_0_w) |
| 696 | 756 | AM_RANGE(0xc0b0, 0xc0b0) AM_WRITENOP // n.c. |
| 697 | AM_RANGE(0xc0c0, 0xc0c0) AM_WRITE(equites_ | |
| 757 | AM_RANGE(0xc0c0, 0xc0c0) AM_WRITE(equites_cymbal_ctrl_w) | |
| 698 | 758 | AM_RANGE(0xc0d0, 0xc0d0) AM_WRITE(equites_dac_latch_w) // followed by 1 (and usually 0) on 8155 port B |
| 699 | 759 | AM_RANGE(0xc0e0, 0xc0e0) AM_WRITE(equites_dac_latch_w) // followed by 2 (and usually 0) on 8155 port B |
| 700 | 760 | AM_RANGE(0xc0f8, 0xc0ff) AM_WRITE(equites_c0f8_w) |
| r2086 | r2087 | |
| 784 | 844 | #if EASY_TEST_MODE |
| 785 | 845 | PORT_SERVICE( 0x0300, IP_ACTIVE_HIGH ) |
| 786 | 846 | #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) | |
| 805 | 853 | |
| 806 | 854 | /* this is actually a variable resistor */ |
| 807 | 855 | PORT_START_TAG(FRQ_ADJUSTER_TAG) |
| r2086 | r2087 | |
| 1087 | 1135 | 0 |
| 1088 | 1136 | }; |
| 1089 | 1137 | |
| 1090 | const struct Samplesinterface alphamc07_samples_interface = | |
| 1138 | static const struct Samplesinterface alphamc07_samples_interface = | |
| 1091 | 1139 | { |
| 1092 | 1140 | 3, /* 3 channels */ |
| 1093 | 1141 | alphamc07_sample_names |
| r2086 | r2087 | |
| 1118 | 1166 | MDRV_SOUND_ROUTE(5, "mono", MSM5232_BASE_VOLUME/1.5) // pin 35 4'-2 : 15k resistor |
| 1119 | 1167 | MDRV_SOUND_ROUTE(6, "mono", MSM5232_BASE_VOLUME) // pin 34 8'-2 : 10k resistor |
| 1120 | 1168 | 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) | |
| 1124 | 1172 | |
| 1125 | 1173 | MDRV_SOUND_ADD(AY8910, XTAL_6_144MHz/4) /* verified on pcb */ |
| 1126 | 1174 | MDRV_SOUND_CONFIG(equites_8910intf) |
| r2086 | r2087 | |
| 1167 | 1215 | MDRV_MACHINE_RESET(equites) |
| 1168 | 1216 | MACHINE_DRIVER_END |
| 1169 | 1217 | |
| 1218 | ||
| 1219 | static 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 | ||
| 1225 | MACHINE_DRIVER_END | |
| 1226 | ||
| 1227 | ||
| 1170 | 1228 | static MACHINE_DRIVER_START( splndrbt ) |
| 1171 | 1229 | |
| 1172 | 1230 | /* basic machine hardware */ |
| r2086 | r2087 | |
| 1760 | 1818 | |
| 1761 | 1819 | static DRIVER_INIT( gekisou ) |
| 1762 | 1820 | { |
| 1763 | UINT16 *rom = (UINT16 *)memory_region(REGION_CPU1); | |
| 1764 | ||
| 1765 | 1821 | unpack_region(REGION_GFX2); |
| 1766 | 1822 | unpack_region(REGION_GFX3); |
| 1767 | 1823 | |
| 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); | |
| 1778 | 1827 | } |
| 1779 | 1828 | |
| 1780 | 1829 | static DRIVER_INIT( splndrbt ) |
| r2086 | r2087 | |
| 1798 | 1847 | // Equites Hardware |
| 1799 | 1848 | GAME( 1984, equites, 0, equites, equites, equites, ROT90, "Alpha Denshi Co.", "Equites", GAME_IMPERFECT_SOUND ) |
| 1800 | 1849 | GAME( 1984, equitess, equites, equites, equites, equites, ROT90, "Alpha Denshi Co. (Sega license)", "Equites (Sega)", GAME_IMPERFECT_SOUND ) |
| 1801 | GAME( 1985, gekisou, 0, e | |
| 1850 | GAME( 1985, gekisou, 0, gek | |
| 1802 | 1851 | GAME( 1984, bullfgtr, 0, equites, bullfgtr, bullfgtr, ROT90, "Alpha Denshi Co.", "Bull Fighter", GAME_IMPERFECT_SOUND ) |
| 1803 | 1852 | GAME( 1984, bullfgts, bullfgtr, equites, bullfgtr, bullfgtr, ROT90, "Alpha Denshi Co. (Sega license)", "Bull Fighter (Sega)", GAME_IMPERFECT_SOUND ) |
| 1804 | 1853 | GAME( 1985, kouyakyu, 0, equites, kouyakyu, kouyakyu, ROT0, "Alpha Denshi Co.", "The Koukouyakyuh", GAME_IMPERFECT_SOUND ) |
| r2086 | r2087 | |
|---|---|---|
| 13 | 13 | #define FIRETRK_CPU_CLOCK_750KZ (12096000 / 16) |
| 14 | 14 | |
| 15 | 15 | |
| 16 | int firetrk_game; | |
| 17 | ||
| 18 | 16 | static UINT8 in_service_mode; |
| 19 | 17 | static UINT32 dial[2]; |
| 20 | 18 | static UINT8 steer_dir[2]; |
| r2086 | r2087 | |
|---|---|---|
| 1307 | 1307 | }; |
| 1308 | 1308 | |
| 1309 | 1309 | |
| 1310 | static UPD7810_CONFIG upd_config = | |
| 1310 | static const UPD7810_CONFIG upd_config = | |
| 1311 | 1311 | { |
| 1312 | 1312 | TYPE_7810, |
| 1313 | 1313 | NULL /* io_callback */ |
| r2086 | r2087 | |
|---|---|---|
| 140 | 140 | |
| 141 | 141 | PORT_START /* (2) PORT 0 */ |
| 142 | 142 | 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 | |
| 144 | 144 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) // SERVICE |
| 145 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE | |
| 145 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_NAME("Memory Reset") // MEMORY RESET | |
| 146 | 146 | PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) // TEST |
| 147 | 147 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) // COIN1 |
| 148 | 148 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) // NOT USED |
| r2086 | r2087 | |
| 215 | 215 | |
| 216 | 216 | PORT_START /* (2) PORT 0 */ |
| 217 | 217 | 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 | |
| 219 | 219 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) // SERVICE |
| 220 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE | |
| 220 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_NAME("Memory Reset") // MEMORY RESET | |
| 221 | 221 | PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) // TEST |
| 222 | 222 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) // COIN1 |
| 223 | 223 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) // NOT USED |
| r2086 | r2087 | |
|---|---|---|
| 70 | 70 | palette_set_color(machine, i, cga_palette[i]); |
| 71 | 71 | } |
| 72 | 72 | |
| 73 | static void draw_char( | |
| 73 | static void draw_char( | |
| 74 | 74 | { |
| 75 | 75 | int i,j; |
| 76 | 76 | UINT8 *dp; |
| r2086 | r2087 | |
| 85 | 85 | { |
| 86 | 86 | UINT8 pen = dp[index++]; |
| 87 | 87 | if (pen) |
| 88 | p[i] = | |
| 88 | p[i] = | |
| 89 | 89 | else |
| 90 | p[i] = | |
| 90 | p[i] = | |
| 91 | 91 | } |
| 92 | 92 | } |
| 93 | 93 | } |
| r2086 | r2087 | |
| 110 | 110 | int att1 = (cga[index] >> 24) & 0xff; |
| 111 | 111 | int ch1 = (cga[index] >> 16) & 0xff; |
| 112 | 112 | |
| 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); | |
| 115 | 115 | index++; |
| 116 | 116 | } |
| 117 | 117 | } |
| r2086 | r2087 | |
| 456 | 456 | MDRV_SCREEN_ADD("main", RASTER) |
| 457 | 457 | MDRV_SCREEN_REFRESH_RATE(60) |
| 458 | 458 | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) |
| 459 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_ | |
| 459 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) | |
| 460 | 460 | MDRV_SCREEN_SIZE(640, 480) |
| 461 | 461 | MDRV_SCREEN_VISIBLE_AREA(0, 639, 0, 199) |
| 462 | 462 |
| r2086 | r2087 | |
|---|---|---|
| 538 | 538 | static MACHINE_DRIVER_START( cabal ) |
| 539 | 539 | |
| 540 | 540 | /* basic machine hardware */ |
| 541 | MDRV_CPU_ADD(M68000, 20 | |
| 541 | MDRV_CPU_ADD(M68000, XTAL_20MHz | |
| 542 | 542 | MDRV_CPU_PROGRAM_MAP(readmem_cpu,writemem_cpu) |
| 543 | 543 | MDRV_CPU_VBLANK_INT("main", irq1_line_hold) |
| 544 | 544 | |
| 545 | MDRV_CPU_ADD(Z80, 35795 | |
| 545 | MDRV_CPU_ADD(Z80, XTAL_3_579545MHz) /* verified on pcb */ | |
| 546 | 546 | /* audio CPU */ |
| 547 | 547 | MDRV_CPU_PROGRAM_MAP(readmem_sound,writemem_sound) |
| 548 | 548 | |
| r2086 | r2087 | |
| 565 | 565 | /* sound hardware */ |
| 566 | 566 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 567 | 567 | |
| 568 | MDRV_SOUND_ADD(YM2151, 35795 | |
| 568 | MDRV_SOUND_ADD(YM2151, XTAL_3_579545MHz) /* verified on pcb */ | |
| 569 | 569 | MDRV_SOUND_CONFIG(seibu_ym2151_interface) |
| 570 | 570 | MDRV_SOUND_ROUTE(ALL_OUTPUTS,"mono", 0.80) |
| 571 | 571 | |
| 572 | MDRV_SOUND_ADD(CUSTOM, 8000) | |
| 572 | MDRV_SOUND_ADD(CUSTOM, 8000) /* it should use the msm5205 */ | |
| 573 | 573 | MDRV_SOUND_CONFIG(seibu_adpcm_interface) |
| 574 | 574 | MDRV_SOUND_ROUTE(ALL_OUTPUTS,"mono", 0.40) |
| 575 | 575 | |
| 576 | MDRV_SOUND_ADD(CUSTOM, 8000) | |
| 576 | MDRV_SOUND_ADD(CUSTOM, 8000) /* it should use the msm5205 */ | |
| 577 | 577 | MDRV_SOUND_CONFIG(seibu_adpcm_interface) |
| 578 | 578 | MDRV_SOUND_ROUTE(ALL_OUTPUTS,"mono", 0.40) |
| 579 | 579 | MACHINE_DRIVER_END |
| r2086 | r2087 | |
| 583 | 583 | static MACHINE_DRIVER_START( cabalbl ) |
| 584 | 584 | |
| 585 | 585 | /* basic machine hardware */ |
| 586 | MDRV_CPU_ADD(M68000, | |
| 586 | MDRV_CPU_ADD(M68000, XTAL_20MHz/2) /* verified on pcb */ | |
| 587 | 587 | MDRV_CPU_PROGRAM_MAP(cabalbl_readmem_cpu,cabalbl_writemem_cpu) |
| 588 | 588 | MDRV_CPU_VBLANK_INT("main", irq1_line_hold) |
| 589 | 589 | |
| 590 | MDRV_CPU_ADD(Z80, 4 | |
| 590 | MDRV_CPU_ADD(Z80, XTAL_3_579545MHz | |
| 591 | 591 | MDRV_CPU_PROGRAM_MAP(cabalbl_readmem_sound,cabalbl_writemem_sound) |
| 592 | 592 | |
| 593 | 593 | /* there are 2x z80s for the ADPCM */ |
| 594 | MDRV_CPU_ADD(Z80, 4 | |
| 594 | MDRV_CPU_ADD(Z80, XTAL_3_579545MHz | |
| 595 | 595 | MDRV_CPU_PROGRAM_MAP(cabalbl_talk1_map,0) |
| 596 | 596 | MDRV_CPU_IO_MAP(cabalbl_talk1_portmap,0) |
| 597 | 597 | MDRV_CPU_PERIODIC_INT(irq0_line_hold,8000) |
| 598 | 598 | |
| 599 | MDRV_CPU_ADD(Z80, 4 | |
| 599 | MDRV_CPU_ADD(Z80, XTAL_3_579545MHz | |
| 600 | 600 | MDRV_CPU_PROGRAM_MAP(cabalbl_talk2_map,0) |
| 601 | 601 | MDRV_CPU_IO_MAP(cabalbl_talk2_portmap,0) |
| 602 | 602 | MDRV_CPU_PERIODIC_INT(irq0_line_hold,8000) |
| r2086 | r2087 | |
| 622 | 622 | /* sound hardware */ |
| 623 | 623 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 624 | 624 | |
| 625 | MDRV_SOUND_ADD(YM2151, 35795 | |
| 625 | MDRV_SOUND_ADD(YM2151, XTAL_3_579545MHz) /* verified on pcb */ | |
| 626 | 626 | MDRV_SOUND_CONFIG(cabalbl_ym2151_interface) |
| 627 | 627 | MDRV_SOUND_ROUTE(ALL_OUTPUTS,"mono", 0.80) |
| 628 | 628 | |
| 629 | MDRV_SOUND_ADD(MSM5205, 3 | |
| 629 | MDRV_SOUND_ADD(MSM5205, XTAL_12MHz/32 | |
| 630 | 630 | MDRV_SOUND_CONFIG(msm5205_interface_1) |
| 631 | 631 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.60) |
| 632 | 632 | |
| 633 | MDRV_SOUND_ADD(MSM5205, 3 | |
| 633 | MDRV_SOUND_ADD(MSM5205, XTAL_12MHz/32 | |
| 634 | 634 | MDRV_SOUND_CONFIG(msm5205_interface_2) |
| 635 | 635 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.60) |
| 636 | 636 | MACHINE_DRIVER_END |
| r2086 | r2087 | |
|---|---|---|
| 10 | 10 | |
| 11 | 11 | TODO: |
| 12 | 12 | |
| 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 | |
| 14 | 15 | - fix COP420 core to get sound in Draco |
| 15 | 16 | |
| 16 | 17 | */ |
| 17 | 18 | |
| 18 | 19 | #define DESTRYER_CHR1 3579000.0 // unverified |
| 19 | #define DESTRYER_CHR2 57143 | |
| 20 | #define DESTRYER_CHR2 XTAL_5_7143MHz | |
| 20 | 21 | #define ALTAIR_CHR1 3579000.0 // unverified |
| 21 | 22 | #define ALTAIR_CHR2 CDP1869_DOT_CLK_PAL // unverified |
| 22 | #define DRACO_CHR1 443361 | |
| 23 | #define DRACO_CHR1 XTAL_4_43361MHz | |
| 23 | 24 | #define DRACO_CHR2 CDP1869_DOT_CLK_PAL // unverified |
| 24 | #define DRACO_SND_CHR1 201216 | |
| 25 | #define DRACO_SND_CHR1 XTAL_2_01216MHz | |
| 25 | 26 | |
| 26 | 27 | /* CDP1802 Interface */ |
| 27 | 28 | |
| r2086 | r2087 | |
| 45 | 46 | EF4 Coin 1 |
| 46 | 47 | */ |
| 47 | 48 | |
| 48 | return | |
| 49 | return | |
| 49 | 50 | } |
| 50 | 51 | |
| 51 | 52 | static const CDP1802_CONFIG cidelsa_cdp1802_config = |
| r2086 | r2087 | |
| 58 | 59 | NULL |
| 59 | 60 | }; |
| 60 | 61 | |
| 61 | static READ8_HANDLER ( cidelsa_input_port_0_r ) | |
| 62 | { | |
| 63 | return (readinputportbytag("IN0") & 0x7f) + (cdp1869_pcb ? 0x80 : 0x00); | |
| 64 | } | |
| 65 | ||
| 66 | 62 | /* Sound Interface */ |
| 67 | 63 | |
| 68 | 64 | static int draco_sound; |
| r2086 | r2087 | |
| 216 | 212 | static WRITE8_HANDLER ( cidelsa_charram_w ) |
| 217 | 213 | { |
| 218 | 214 | int addr = cdp1869_get_cma(offset); |
| 215 | ||
| 219 | 216 | cidelsa_pcb[addr] = activecpu_get_reg(CDP1802_Q); |
| 217 | ||
| 220 | 218 | cdp1869_charram_w(machine, offset, data); |
| 221 | 219 | } |
| 222 | 220 | |
| 223 | 221 | static READ8_HANDLER ( cidelsa_charram_r ) |
| 224 | 222 | { |
| 225 | 223 | int addr = cdp1869_get_cma(offset); |
| 224 | ||
| 226 | 225 | cdp1869_pcb = cidelsa_pcb[addr]; |
| 227 | return cdp1869_charram_r(machine,offset); | |
| 226 | ||
| 227 | return cdp1869_charram_r(machine, offset); | |
| 228 | 228 | } |
| 229 | 229 | |
| 230 | 230 | /* Memory Maps */ |
| r2086 | r2087 | |
| 246 | 246 | ADDRESS_MAP_END |
| 247 | 247 | |
| 248 | 248 | static 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") | |
| 251 | 251 | AM_RANGE(0x03, 0x03) AM_WRITE(cdp1869_out3_w) |
| 252 | 252 | AM_RANGE(0x04, 0x04) AM_WRITE(cdp1869_out4_w) |
| 253 | 253 | AM_RANGE(0x05, 0x05) AM_WRITE(cdp1869_out5_w) |
| r2086 | r2087 | |
| 265 | 265 | ADDRESS_MAP_END |
| 266 | 266 | |
| 267 | 267 | static 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") | |
| 270 | 270 | AM_RANGE(0x03, 0x03) AM_WRITE(cdp1869_out3_w) |
| 271 | AM_RANGE(0x04, 0x04) AM_READWRITE( | |
| 271 | AM_RANGE(0x04, 0x04) AM_READ_PORT("IN2") AM_WRITE( | |
| 272 | 272 | AM_RANGE(0x05, 0x05) AM_WRITE(cdp1869_out5_w) |
| 273 | 273 | AM_RANGE(0x06, 0x06) AM_WRITE(cdp1869_out6_w) |
| 274 | 274 | AM_RANGE(0x07, 0x07) AM_WRITE(cdp1869_out7_w) |
| r2086 | r2087 | |
| 284 | 284 | ADDRESS_MAP_END |
| 285 | 285 | |
| 286 | 286 | static 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") | |
| 289 | 289 | AM_RANGE(0x03, 0x03) AM_WRITE(cdp1869_out3_w) |
| 290 | AM_RANGE(0x04, 0x04) AM_READWRITE( | |
| 290 | AM_RANGE(0x04, 0x04) AM_READ_PORT("IN2") AM_WRITE( | |
| 291 | 291 | AM_RANGE(0x05, 0x05) AM_WRITE(cdp1869_out5_w) |
| 292 | 292 | AM_RANGE(0x06, 0x06) AM_WRITE(cdp1869_out6_w) |
| 293 | 293 | AM_RANGE(0x07, 0x07) AM_WRITE(cdp1869_out7_w) |
| r2086 | r2087 | |
| 306 | 306 | |
| 307 | 307 | /* Input Ports */ |
| 308 | 308 | |
| 309 | static CUSTOM_INPUT( cdp1869_pcb_r ) | |
| 310 | { | |
| 311 | return cdp1869_pcb; | |
| 312 | } | |
| 313 | ||
| 314 | static CUSTOM_INPUT( cdp1869_predisplay_r ) | |
| 315 | { | |
| 316 | return cdp1869_prd; | |
| 317 | } | |
| 318 | ||
| 309 | 319 | static INPUT_PORTS_START( destryer ) |
| 310 | 320 | PORT_START_TAG("IN0") |
| 311 | 321 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) // CARTUCHO |
| r2086 | r2087 | |
| 315 | 325 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) // LF |
| 316 | 326 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) // FR |
| 317 | 327 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 318 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SPECIAL ) | |
| 328 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SPECIAL ) | |
| 319 | 329 | |
| 320 | 330 | PORT_START_TAG("IN1") |
| 321 | 331 | PORT_DIPNAME( 0x03, 0x02, DEF_STR( Difficulty ) ) |
| r2086 | r2087 | |
| 340 | 350 | PORT_DIPSETTING( 0x00, "Slot A: 2.5 Slot B: 5" ) |
| 341 | 351 | |
| 342 | 352 | PORT_START_TAG("EF") |
| 343 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SPECIAL ) | |
| 353 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SPECIAL ) | |
| 344 | 354 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE ) // ST |
| 345 | 355 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 ) // M2 |
| 346 | 356 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 ) // M1 |
| r2086 | r2087 | |
| 355 | 365 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) // LF |
| 356 | 366 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) // FR |
| 357 | 367 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 358 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SPECIAL ) | |
| 368 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SPECIAL ) | |
| 359 | 369 | |
| 360 | 370 | PORT_START_TAG("IN1") |
| 361 | 371 | PORT_DIPNAME( 0x03, 0x02, DEF_STR( Difficulty ) ) |
| r2086 | r2087 | |
| 390 | 400 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 391 | 401 | |
| 392 | 402 | PORT_START_TAG("EF") |
| 393 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SPECIAL ) | |
| 403 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SPECIAL ) | |
| 394 | 404 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE ) // ST |
| 395 | 405 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 ) // M2 |
| 396 | 406 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 ) // M1 |
| r2086 | r2087 | |
| 405 | 415 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 406 | 416 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 407 | 417 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 408 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SPECIAL ) | |
| 418 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SPECIAL ) | |
| 409 | 419 | |
| 410 | 420 | PORT_START_TAG("IN1") |
| 411 | 421 | PORT_DIPNAME( 0x03, 0x02, DEF_STR( Difficulty ) ) |
| r2086 | r2087 | |
| 442 | 452 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_LEFT ) |
| 443 | 453 | |
| 444 | 454 | PORT_START_TAG("EF") |
| 445 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SPECIAL ) | |
| 455 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SPECIAL ) | |
| 446 | 456 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE ) // ST |
| 447 | 457 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 ) // M2 |
| 448 | 458 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 ) // M1 |
| 449 | 459 | INPUT_PORTS_END |
| 450 | 460 | |
| 451 | /* | |
| 461 | /* Video | |
| 452 | 462 | |
| 453 | static | |
| 463 | static | |
| 454 | 464 | { |
| 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 | } | |
| 456 | 468 | |
| 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; | |
| 469 | static 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 | } | |
| 463 | 474 | |
| 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 | } | |
| 475 | static TIMER_DEVICE_CALLBACK( draco_prd_start ) | |
| 476 | { | |
| 477 | cdp1869_prd = 0; | |
| 469 | 478 | } |
| 470 | 479 | |
| 471 | static | |
| 480 | static | |
| 472 | 481 | { |
| 473 | int scanline = (CDP1869_TOTAL_SCANLINES_PAL - 1) - cpu_getiloops(); | |
| 482 | cdp1869_prd = 1; | |
| 483 | } | |
| 474 | 484 | |
| 475 | switch (scanline) | |
| 476 | { | |
| 477 | case CDP1869_SCANLINE_PREDISPLAY_START_PAL: | |
| 478 | cdp1869_prd = 0; | |
| 479 | break; | |
| 485 | /* Machine Start */ | |
| 480 | 486 | |
| 481 | case CDP1869_SCANLINE_PREDISPLAY_END_PAL: | |
| 482 | cdp1869_prd = 1; | |
| 483 | break; | |
| 484 | } | |
| 487 | static TIMER_CALLBACK( set_cpu_mode ) | |
| 488 | { | |
| 489 | cdp1802_mode = CDP1802_MODE_RUN; | |
| 485 | 490 | } |
| 486 | 491 | |
| 492 | static 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 | ||
| 501 | static const CDP1869_interface destryer_CDP1869_interface = | |
| 502 | { | |
| 503 | CDP1869_PAL, | |
| 504 | REGION_INVALID, | |
| 505 | 0x800, | |
| 506 | 0x400, | |
| 507 | cidelsa_get_color_bits | |
| 508 | }; | |
| 509 | ||
| 510 | static const CDP1869_interface draco_CDP1869_interface = | |
| 511 | { | |
| 512 | CDP1869_PAL, | |
| 513 | REGION_INVALID, | |
| 514 | 0x800, | |
| 515 | 0x800, | |
| 516 | cidelsa_get_color_bits | |
| 517 | }; | |
| 518 | ||
| 487 | 519 | static MACHINE_START( destryer ) |
| 488 | 520 | { |
| 521 | cdp1869_configure(&destryer_CDP1869_interface); | |
| 522 | ||
| 523 | timer_set(ATTOTIME_IN_MSEC(200), NULL, 0, set_cpu_mode); | |
| 524 | ||
| 489 | 525 | state_save_register_global(cdp1802_mode); |
| 490 | 526 | state_save_register_global_array(cidelsa_pcb); |
| 491 | 527 | state_save_register_global(cdp1869_prd); |
| r2086 | r2087 | |
| 494 | 530 | |
| 495 | 531 | static MACHINE_START( draco ) |
| 496 | 532 | { |
| 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 | ||
| 497 | 540 | state_save_register_global(cdp1802_mode); |
| 498 | 541 | state_save_register_global_array(cidelsa_pcb); |
| 499 | 542 | state_save_register_global(cdp1869_prd); |
| r2086 | r2087 | |
| 502 | 545 | state_save_register_global(draco_ay_latch); |
| 503 | 546 | } |
| 504 | 547 | |
| 548 | /* Machine Reset */ | |
| 549 | ||
| 505 | 550 | static MACHINE_RESET( destryer ) |
| 506 | 551 | { |
| 507 | 552 | cpunum_set_input_line(machine, 0, INPUT_LINE_RESET, PULSE_LINE); |
| r2086 | r2087 | |
| 510 | 555 | /* Machine Drivers */ |
| 511 | 556 | |
| 512 | 557 | static MACHINE_DRIVER_START( destryer ) |
| 513 | ||
| 514 | 558 | // basic system hardware |
| 515 | 559 | |
| 516 | 560 | MDRV_CPU_ADD(CDP1802, DESTRYER_CHR1) |
| 517 | 561 | MDRV_CPU_PROGRAM_MAP(destryer_map, 0) |
| 518 | 562 | MDRV_CPU_IO_MAP(destryer_io_map, 0) |
| 519 | 563 | MDRV_CPU_CONFIG(cidelsa_cdp1802_config) |
| 520 | MDRV_CPU_VBLANK_INT_HACK(altair_interrupt, CDP1869_TOTAL_SCANLINES_PAL) | |
| 521 | 564 | MDRV_NVRAM_HANDLER(generic_0fill) |
| 522 | 565 | MDRV_MACHINE_START(destryer) |
| 523 | 566 | MDRV_MACHINE_RESET(destryer) |
| r2086 | r2087 | |
| 534 | 577 | 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) |
| 535 | 578 | MDRV_SCREEN_DEFAULT_POSITION(1.226, 0.012, 1.4, 0.044) |
| 536 | 579 | |
| 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 | ||
| 537 | 583 | // sound hardware |
| 538 | 584 | |
| 539 | 585 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| r2086 | r2087 | |
| 543 | 589 | MACHINE_DRIVER_END |
| 544 | 590 | |
| 545 | 591 | static MACHINE_DRIVER_START( destryea ) |
| 546 | ||
| 547 | 592 | // basic system hardware |
| 548 | 593 | |
| 549 | 594 | MDRV_CPU_ADD(CDP1802, DESTRYER_CHR1) |
| 550 | 595 | MDRV_CPU_PROGRAM_MAP(destryea_map, 0) |
| 551 | 596 | MDRV_CPU_IO_MAP(destryer_io_map, 0) |
| 552 | 597 | MDRV_CPU_CONFIG(cidelsa_cdp1802_config) |
| 553 | MDRV_CPU_VBLANK_INT_HACK(altair_interrupt, CDP1869_TOTAL_SCANLINES_PAL) | |
| 554 | 598 | MDRV_NVRAM_HANDLER(generic_0fill) |
| 555 | 599 | MDRV_MACHINE_START(destryer) |
| 556 | 600 | MDRV_MACHINE_RESET(destryer) |
| r2086 | r2087 | |
| 567 | 611 | 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) |
| 568 | 612 | MDRV_SCREEN_DEFAULT_POSITION(1.226, 0.012, 1.4, 0.044) |
| 569 | 613 | |
| 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 | ||
| 570 | 617 | // sound hardware |
| 571 | 618 | |
| 572 | 619 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| r2086 | r2087 | |
| 576 | 623 | MACHINE_DRIVER_END |
| 577 | 624 | |
| 578 | 625 | static MACHINE_DRIVER_START( altair ) |
| 579 | ||
| 580 | 626 | // basic system hardware |
| 581 | 627 | |
| 582 | 628 | MDRV_CPU_ADD(CDP1802, ALTAIR_CHR1) |
| 583 | 629 | MDRV_CPU_PROGRAM_MAP(altair_map, 0) |
| 584 | 630 | MDRV_CPU_IO_MAP(altair_io_map, 0) |
| 585 | 631 | MDRV_CPU_CONFIG(cidelsa_cdp1802_config) |
| 586 | MDRV_CPU_VBLANK_INT_HACK(altair_interrupt, CDP1869_TOTAL_SCANLINES_PAL) | |
| 587 | 632 | MDRV_MACHINE_START(destryer) |
| 588 | 633 | MDRV_MACHINE_RESET(destryer) |
| 589 | 634 | |
| r2086 | r2087 | |
| 599 | 644 | 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) |
| 600 | 645 | MDRV_SCREEN_DEFAULT_POSITION(1.226, 0.012, 1.4, 0.044) |
| 601 | 646 | |
| 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 | ||
| 602 | 650 | // sound hardware |
| 603 | 651 | |
| 604 | 652 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| r2086 | r2087 | |
| 608 | 656 | MACHINE_DRIVER_END |
| 609 | 657 | |
| 610 | 658 | static MACHINE_DRIVER_START( draco ) |
| 611 | ||
| 612 | 659 | // basic system hardware |
| 613 | 660 | |
| 614 | 661 | MDRV_CPU_ADD(CDP1802, DRACO_CHR1) |
| 615 | 662 | MDRV_CPU_PROGRAM_MAP(draco_map, 0) |
| 616 | 663 | MDRV_CPU_IO_MAP(draco_io_map, 0) |
| 617 | 664 | MDRV_CPU_CONFIG(cidelsa_cdp1802_config) |
| 618 | MDRV_CPU_VBLANK_INT_HACK(draco_interrupt, CDP1869_TOTAL_SCANLINES_PAL) | |
| 619 | 665 | MDRV_NVRAM_HANDLER(generic_0fill) |
| 620 | 666 | MDRV_MACHINE_START(draco) |
| 621 | 667 | MDRV_MACHINE_RESET(destryer) |
| r2086 | r2087 | |
| 636 | 682 | 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) |
| 637 | 683 | MDRV_SCREEN_DEFAULT_POSITION(1.226, 0.012, 1.360, 0.024) |
| 638 | 684 | |
| 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 | ||
| 639 | 688 | // sound hardware |
| 640 | 689 | |
| 641 | 690 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| r2086 | r2087 | |
| 648 | 697 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) |
| 649 | 698 | MACHINE_DRIVER_END |
| 650 | 699 | |
| 651 | /* Driver Initialization */ | |
| 652 | ||
| 653 | static 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 | ||
| 662 | static const CDP1869_interface destryer_CDP1869_interface = | |
| 663 | { | |
| 664 | CDP1869_PAL, | |
| 665 | REGION_INVALID, | |
| 666 | 0x800, | |
| 667 | 0x400, | |
| 668 | cidelsa_get_color_bits | |
| 669 | }; | |
| 670 | ||
| 671 | static TIMER_CALLBACK( set_cpu_mode ) | |
| 672 | { | |
| 673 | cdp1802_mode = CDP1802_MODE_RUN; | |
| 674 | } | |
| 675 | ||
| 676 | static 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 | ||
| 683 | static const CDP1869_interface draco_CDP1869_interface = | |
| 684 | { | |
| 685 | CDP1869_PAL, | |
| 686 | REGION_INVALID, | |
| 687 | 0x800, | |
| 688 | 0x800, | |
| 689 | cidelsa_get_color_bits | |
| 690 | }; | |
| 691 | ||
| 692 | static 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 | ||
| 702 | 700 | /* ROMs */ |
| 703 | 701 | |
| 704 | 702 | ROM_START( destryer ) |
| r2086 | r2087 | |
| 745 | 743 | |
| 746 | 744 | /* Game Drivers */ |
| 747 | 745 | |
| 748 | GAME( 1980, destryer, 0, destryer, destryer, cidelsa, ROT90, "Cidelsa", "Destroyer (Cidelsa) (set 1)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) | |
| 749 | GAME( 1980, destryea, destryer, destryea, destryer, cidelsa, ROT90, "Cidelsa", "Destroyer (Cidelsa) (set 2)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) | |
| 750 | GAME( 1981, altair, 0, altair, altair, cidelsa, ROT90, "Cidelsa", "Altair", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) | |
| 751 | GAME( 1981, draco, 0, draco, draco, draco, ROT90, "Cidelsa", "Draco", GAME_IMPERFECT_COLORS | GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) | |
| 746 | GAME( 1980, destryer, 0, destryer, destryer, 0, ROT90, "Cidelsa", "Destroyer (Cidelsa) (set 1)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) | |
| 747 | GAME( 1980, destryea, destryer, destryea, destryer, 0, ROT90, "Cidelsa", "Destroyer (Cidelsa) (set 2)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) | |
| 748 | GAME( 1981, altair, 0, altair, altair, 0, ROT90, "Cidelsa", "Altair", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) | |
| 749 | GAME( 1981, draco, 0, draco, draco, 0, ROT90, "Cidelsa", "Draco", GAME_IMPERFECT_COLORS | GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) |
| r2086 | r2087 | |
|---|---|---|
| 1153 | 1153 | /* audio CPU */ /* ??? */ |
| 1154 | 1154 | MDRV_CPU_PROGRAM_MAP(bluehawk_sound_readmem,bluehawk_sound_writemem) |
| 1155 | 1155 | |
| 1156 | MDRV_MACHINE_START(lastday) | |
| 1157 | ||
| 1156 | 1158 | /* video hardware */ |
| 1157 | 1159 | MDRV_SCREEN_ADD("main", RASTER) |
| 1158 | 1160 | MDRV_SCREEN_REFRESH_RATE(60) |
| r2086 | r2087 | |
|---|---|---|
| 305 | 305 | |
| 306 | 306 | /* same as Turtles, but dip switches are different. */ |
| 307 | 307 | static INPUT_PORTS_START( turpin ) |
| 308 | PORT_START_TAG("IN0") | |
| 309 | 308 | PORT_INCLUDE( turtles ) |
| 310 | 309 | |
| 311 | 310 | PORT_MODIFY("IN1") |
| r2086 | r2087 | |
|---|---|---|
| 1043 | 1043 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN) |
| 1044 | 1044 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN) |
| 1045 | 1045 | 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) | |
| 1046 | 1051 | |
| 1047 | 1052 | PORT_MODIFY("SERVICE") |
| 1048 | 1053 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r2086 | r2087 | |
|---|---|---|
| 417 | 417 | MDRV_SCREEN_ADD("main", RASTER) |
| 418 | 418 | MDRV_SCREEN_REFRESH_RATE(60) |
| 419 | 419 | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) |
| 420 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_ | |
| 420 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) | |
| 421 | 421 | MDRV_SCREEN_SIZE(64*8, 64*8) |
| 422 | 422 | MDRV_SCREEN_VISIBLE_AREA(0, 40*8-1, 0, 30*8-1) |
| 423 | 423 | |
| r2086 | r2087 | |
| 455 | 455 | MDRV_SCREEN_ADD("main", RASTER) |
| 456 | 456 | MDRV_SCREEN_REFRESH_RATE(60) |
| 457 | 457 | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) |
| 458 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_ | |
| 458 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) | |
| 459 | 459 | MDRV_SCREEN_SIZE(64*8, 64*8) |
| 460 | 460 | MDRV_SCREEN_VISIBLE_AREA(0, 40*8-1, 0, 30*8-1) |
| 461 | 461 |
| r2086 | r2087 | |
|---|---|---|
| 71 | 71 | |
| 72 | 72 | RC = @windres --use-temp-file |
| 73 | 73 | |
| 74 | RCDEFS = -DNDEBUG -D_WIN32_IE=0x0 | |
| 74 | RCDEFS = -DNDEBUG -D_WIN32_IE=0x0501 | |
| 75 | 75 | |
| 76 | 76 | RCFLAGS = -O coff -I $(WINSRC) -I $(WINOBJ) |
| 77 | 77 | |
| r2086 | r2087 | |
| 198 | 198 | LIBS += -luser32 -lgdi32 -lddraw -ldsound -ldinput -ldxguid -lwinmm -ladvapi32 -lcomctl32 -lshlwapi |
| 199 | 199 | |
| 200 | 200 | ifdef PTR64 |
| 201 | ifdef MSVC_BUILD | |
| 201 | 202 | LIBS += -lbufferoverflowu |
| 203 | else | |
| 204 | DEFS += -D_COM_interface=struct | |
| 202 | 205 | endif |
| 206 | endif | |
| 203 | 207 | |
| 204 | 208 | |
| 205 | 209 |
| r2086 | r2087 | |
|---|---|---|
| 7 | 7 | // |
| 8 | 8 | //============================================================ |
| 9 | 9 | |
| 10 | #define _WIN32_WINNT 0x0501 | |
| 11 | ||
| 10 | 12 | #ifdef MALLOC_DEBUG |
| 11 | 13 | #include <stdlib.h> |
| 14 | #include <malloc.h> | |
| 12 | 15 | |
| 13 | // override malloc to track file/line | |
| 14 | void* malloc_file_line(size_t size, const char *file, int line); | |
| 15 | void* calloc_file_line(size_t size, size_t count, const char *FILE, int line); | |
| 16 | void * realloc_file_line(void *memory, size_t size, const char *file, int line); | |
| 16 | // override malloc/calloc/realloc/free to track file/line | |
| 17 | void *malloc_file_line(size_t size, const char *file, int line); | |
| 18 | void *calloc_file_line(size_t size, size_t count, const char *FILE, int line); | |
| 19 | void *realloc_file_line(void *memory, size_t size, const char *file, int line); | |
| 20 | void free_file_line(void *memory, const char *file, int line); | |
| 17 | 21 | |
| 18 | 22 | #undef malloc |
| 19 | 23 | #define malloc(x) malloc_file_line(x, __FILE__, __LINE__) |
| r2086 | r2087 | |
| 21 | 25 | #define calloc(x,y) calloc_file_line(x, y, __FILE__, __LINE__) |
| 22 | 26 | #undef realloc |
| 23 | 27 | #define realloc(x,y) realloc_file_line(x, y, __FILE__, __LINE__) |
| 28 | #undef free | |
| 29 | #define free(x) free_file_line(x, __FILE__, __LINE__) | |
| 24 | 30 | #endif |
| 25 | 31 | |
| 26 | 32 | #ifdef _MSC_VER |
| r2086 | r2087 | |
| 32 | 38 | #endif |
| 33 | 39 | |
| 34 | 40 | #ifdef __GNUC__ |
| 41 | #ifndef alloca | |
| 35 | 42 | #define alloca __builtin_alloca |
| 36 | 43 | #endif |
| 44 | #endif | |
| 37 | 45 | |
| 38 | 46 | #define PATH_SEPARATOR "\\" |
| r2086 | r2087 | |
|---|---|---|
| 8 | 8 | //============================================================ |
| 9 | 9 | |
| 10 | 10 | // standard windows headers |
| 11 | #ifndef _WIN32_WINNT | |
| 12 | #define _WIN32_WINNT 0x0400 | |
| 13 | #endif | |
| 14 | 11 | #define WIN32_LEAN_AND_MEAN |
| 15 | 12 | #include <windows.h> |
| 16 | 13 |
| r2086 | r2087 | |
|---|---|---|
| 10 | 10 | // For testing purposes: force DirectInput |
| 11 | 11 | #define FORCE_DIRECTINPUT 0 |
| 12 | 12 | |
| 13 | // Needed for RAW Input | |
| 14 | #define _WIN32_WINNT 0x501 | |
| 15 | ||
| 16 | 13 | // standard windows headers |
| 17 | 14 | #define WIN32_LEAN_AND_MEAN |
| 18 | 15 | #include <windows.h> |
| r2086 | r2087 | |
|---|---|---|
| 8 | 8 | //============================================================ |
| 9 | 9 | |
| 10 | 10 | // standard windows headers |
| 11 | #define _WIN32_WINNT 0x0400 | |
| 12 | 11 | #define WIN32_LEAN_AND_MEAN |
| 13 | 12 | #include <windows.h> |
| 14 | 13 | #include <process.h> |
| r2086 | r2087 | |
|---|---|---|
| 29 | 29 | // |
| 30 | 30 | //============================================================ |
| 31 | 31 | |
| 32 | // Needed for RAW Input | |
| 33 | #define _WIN32_WINNT 0x501 | |
| 34 | ||
| 35 | 32 | // standard windows headers |
| 36 | 33 | #define WIN32_LEAN_AND_MEAN |
| 37 | 34 | #include <windows.h> |
| r2086 | r2087 | |
|---|---|---|
| 8 | 8 | //============================================================ |
| 9 | 9 | |
| 10 | 10 | // standard windows headers |
| 11 | #define _WIN32_WINNT 0x0501 | |
| 12 | 11 | #define WIN32_LEAN_AND_MEAN |
| 13 | 12 | #include <windows.h> |
| 14 | 13 | #include <commctrl.h> |
| r2086 | r2087 | |
|---|---|---|
| 8 | 8 | //============================================================ |
| 9 | 9 | |
| 10 | 10 | // standard windows headers |
| 11 | #define _WIN32_WINNT 0x0400 | |
| 12 | 11 | #define WIN32_LEAN_AND_MEAN |
| 13 | 12 | #include <windows.h> |
| 14 | 13 | #include <shellapi.h> |
| r2086 | r2087 | |
|---|---|---|
| 7 | 7 | // |
| 8 | 8 | //============================================================ |
| 9 | 9 | |
| 10 | // needed for multimonitor | |
| 11 | #define _WIN32_WINNT 0x501 | |
| 12 | ||
| 13 | 10 | // standard windows headers |
| 14 | 11 | #define WIN32_LEAN_AND_MEAN |
| 15 | 12 | #include <windows.h> |
| r2086 | r2087 | |
|---|---|---|
| 7 | 7 | // |
| 8 | 8 | //============================================================ |
| 9 | 9 | |
| 10 | // needed for multimonitor | |
| 11 | #define _WIN32_WINNT 0x501 | |
| 12 | ||
| 13 | 10 | // standard windows headers |
| 14 | 11 | #define WIN32_LEAN_AND_MEAN |
| 15 | 12 | #include <windows.h> |
| r2086 | r2087 | |
|---|---|---|
| 11 | 11 | #define LOG_TEMP_PAUSE 0 |
| 12 | 12 | |
| 13 | 13 | // Needed for RAW Input |
| 14 | #define _WIN32_WINNT 0x501 | |
| 15 | 14 | #define WM_INPUT 0x00FF |
| 16 | 15 | |
| 17 | 16 | // standard windows headers |
| r2086 | r2087 | |
|---|---|---|
| 7 | 7 | // |
| 8 | 8 | //============================================================ |
| 9 | 9 | |
| 10 | #define _WIN32_WINNT 0x0400 | |
| 11 | ||
| 12 | 10 | // standard windows headers |
| 13 | 11 | #define WIN32_LEAN_AND_MEAN |
| 14 | 12 | #include <windows.h> |
| r2086 | r2087 | |
| 28 | 26 | // CONSTANTS |
| 29 | 27 | //============================================================ |
| 30 | 28 | |
| 29 | #define OVERRIDE_STANDARD_CALLS (0) | |
| 30 | ||
| 31 | 31 | #define PAGE_SIZE 4096 |
| 32 | 32 | #define COOKIE_VAL 0x11335577 |
| 33 | 33 | |
| r2086 | r2087 | |
| 193 | 193 | // malloc - override for the malloc() function |
| 194 | 194 | //============================================================ |
| 195 | 195 | |
| 196 | #if OVERRIDE_STANDARD_CALLS | |
| 196 | 197 | void *CLIB_DECL malloc(size_t size) |
| 197 | 198 | { |
| 198 | 199 | return malloc_file_line(size, NULL, 0); |
| 199 | 200 | } |
| 201 | #endif | |
| 200 | 202 | |
| 201 | 203 | |
| 202 | 204 | //============================================================ |
| r2086 | r2087 | |
| 221 | 223 | // calloc - override for the calloc() function |
| 222 | 224 | //============================================================ |
| 223 | 225 | |
| 226 | #if OVERRIDE_STANDARD_CALLS | |
| 224 | 227 | void *CLIB_DECL calloc(size_t size, size_t count) |
| 225 | 228 | { |
| 226 | 229 | return calloc_file_line(size, count, NULL, 0); |
| 227 | 230 | } |
| 231 | #endif | |
| 228 | 232 | |
| 229 | 233 | |
| 230 | 234 | //============================================================ |
| r2086 | r2087 | |
| 232 | 236 | // which is called by beginthreadex |
| 233 | 237 | //============================================================ |
| 234 | 238 | |
| 239 | #if OVERRIDE_STANDARD_CALLS | |
| 235 | 240 | void *CLIB_DECL _calloc_crt(size_t size, size_t count) |
| 236 | 241 | { |
| 237 | 242 | return calloc_file_line(size, count, NULL, 0); |
| 238 | 243 | } |
| 244 | #endif | |
| 239 | 245 | |
| 240 | 246 | |
| 241 | 247 | //============================================================ |
| r2086 | r2087 | |
| 298 | 304 | // realloc - override for the realloc() function |
| 299 | 305 | //============================================================ |
| 300 | 306 | |
| 307 | #if OVERRIDE_STANDARD_CALLS | |
| 301 | 308 | void *CLIB_DECL realloc(void *memory, size_t size) |
| 302 | 309 | { |
| 303 | 310 | return realloc_file_line(memory, size, NULL, 0); |
| 304 | 311 | } |
| 312 | #endif | |
| 305 | 313 | |
| 306 | 314 | |
| 307 | 315 | //============================================================ |
| 308 | // free - override for the free() function | |
| 316 | // free_file_line - debugging version of free which | |
| 317 | // accepts filename and line number | |
| 309 | 318 | //============================================================ |
| 310 | 319 | |
| 311 | void CLIB_DECL free(void *memory) | |
| 320 | void CLIB_DECL free_file_line(void *memory, const char *file, int line) | |
| 312 | 321 | { |
| 313 | 322 | memory_entry *entry; |
| 314 | 323 | |
| r2086 | r2087 | |
| 347 | 356 | |
| 348 | 357 | |
| 349 | 358 | //============================================================ |
| 359 | // free - override for the free() function | |
| 360 | //============================================================ | |
| 361 | ||
| 362 | #if OVERRIDE_STANDARD_CALLS | |
| 363 | void CLIB_DECL free(void *memory) | |
| 364 | { | |
| 365 | free_file_line(memory, NULL, 0); | |
| 366 | } | |
| 367 | #endif | |
| 368 | ||
| 369 | ||
| 370 | //============================================================ | |
| 350 | 371 | // _msize - internal MSVC routine that returns the size of |
| 351 | 372 | // a memory block |
| 352 | 373 | //============================================================ |
| 353 | 374 | |
| 375 | #if OVERRIDE_STANDARD_CALLS | |
| 354 | 376 | size_t CLIB_DECL _msize(void *memory) |
| 355 | 377 | { |
| 356 | 378 | size_t result; |
| r2086 | r2087 | |
| 376 | 398 | } |
| 377 | 399 | return result; |
| 378 | 400 | } |
| 401 | #endif | |
| 379 | 402 | |
| 380 | 403 | |
| 381 | 404 | //============================================================ |
| r2086 | r2087 | |
|---|---|---|
| 8 | 8 | //============================================================ |
| 9 | 9 | |
| 10 | 10 | // standard windows headers |
| 11 | #define _WIN32_WINNT 0x0400 | |
| 12 | 11 | #define WIN32_LEAN_AND_MEAN |
| 13 | 12 | #include <windows.h> |
| 14 | 13 | #include <tchar.h> |
| r2086 | r2087 | |
|---|---|---|
| 8 | 8 | //============================================================ |
| 9 | 9 | |
| 10 | 10 | // standard windows headers |
| 11 | #define _WIN32_WINNT 0x0400 | |
| 12 | 11 | #define WIN32_LEAN_AND_MEAN |
| 13 | 12 | #include <windows.h> |
| 14 | 13 | #include <tchar.h> |
| r2086 | r2087 | |
|---|---|---|
| 8 | 8 | //============================================================ |
| 9 | 9 | |
| 10 | 10 | // standard windows headers |
| 11 | #define _WIN32_WINNT 0x0400 | |
| 12 | 11 | #define WIN32_LEAN_AND_MEAN |
| 13 | 12 | #include <windows.h> |
| 14 | 13 |
| r2086 | r2087 | |
|---|---|---|
| 317 | 317 | typedef UINT32 (*read_func_t)(int reg); |
| 318 | 318 | typedef void (*write_func_t)(int reg, UINT32 d); |
| 319 | 319 | |
| 320 | static read_func_t reg_read_handlers[16] = | |
| 320 | static const read_func_t reg_read_handlers[16] = | |
| 321 | 321 | { |
| 322 | 322 | read_unknown, read_unknown, read_unknown, read_unknown, // -, X, Y, A |
| 323 | 323 | read_unknown, // 4 ST |
| r2086 | r2087 | |
| 334 | 334 | read_AL |
| 335 | 335 | }; |
| 336 | 336 | |
| 337 | static write_func_t reg_write_handlers[16] = | |
| 337 | static const write_func_t reg_write_handlers[16] = | |
| 338 | 338 | { |
| 339 | 339 | write_unknown, write_unknown, write_unknown, write_unknown, // -, X, Y, A |
| 340 | 340 | write_ST, |
| r2086 | r2087 | |
|---|---|---|
| 4 | 4 | #include "video/cdp1869.h" |
| 5 | 5 | #include "sound/cdp1869.h" |
| 6 | 6 | |
| 7 | /* | |
| 8 | ||
| 9 | TODO: | |
| 10 | ||
| 11 | - convert CDP1869 into a device with video/sound | |
| 12 | - add predisplay/display timers | |
| 13 | ||
| 14 | */ | |
| 15 | ||
| 7 | 16 | typedef struct |
| 8 | 17 | { |
| 9 | 18 | int ntsc_pal; |
| r2086 | r2087 | |
| 563 | 572 | memcpy(cdp1869.cram, memory, intf->charram_size); |
| 564 | 573 | } |
| 565 | 574 | |
| 566 | cdp1869.ntsc_pal = intf-> | |
| 575 | cdp1869.ntsc_pal = intf->video_format; | |
| 567 | 576 | cdp1869.cramsize = intf->charram_size; |
| 568 | 577 | cdp1869.pramsize = intf->pageram_size; |
| 569 | 578 | cdp1869.color_callback = intf->get_color_bits; |
| r2086 | r2087 | |
|---|---|---|
| 352 | 352 | return vdp->vram[offset]; |
| 353 | 353 | } |
| 354 | 354 | |
| 355 | void v9938_vram_w( UINT8 data ) | |
| 355 | static void v9938_vram_w( UINT8 data ) | |
| 356 | 356 | { |
| 357 | 357 | int address; |
| 358 | 358 |
| r2086 | r2087 | |
|---|---|---|
| 34 | 34 | #ifndef __CDP1869_VIDEO__ |
| 35 | 35 | #define __CDP1869_VIDEO__ |
| 36 | 36 | |
| 37 | enum { | |
| 37 | typedef enum _cdp1869_video_format cdp1869_video_format; | |
| 38 | ||
| 39 | enum _cdp1869_video_format { | |
| 38 | 40 | CDP1869_NTSC, |
| 39 | 41 | CDP1869_PAL |
| 40 | 42 | }; |
| r2086 | r2087 | |
| 99 | 101 | |
| 100 | 102 | typedef struct CDP1869_interface |
| 101 | 103 | { |
| 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 | |
| 106 | 108 | UINT8 (*get_color_bits)(UINT8 cramdata, UINT16 cramaddr, UINT16 pramaddr); // 0x01 = PCB, 0x02 = CCB0, 0x04 = CCB1 |
| 107 | 109 | } CDP1869_interface; |
| 108 | 110 |
| r2086 | r2087 | |
|---|---|---|
| 625 | 625 | |
| 626 | 626 | |
| 627 | 627 | |
| 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 | ||
| 634 | PALETTE_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 | ||
| 643 | PALETTE_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 | ||
| 659 | PALETTE_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 | ||
| 628 | 669 | /*************************************************************************** |
| 629 | 670 | 3-3-2 RGB PALETTE WRITE HANDLERS |
| 630 | 671 | ***************************************************************************/ |
| r2086 | r2087 | |
|---|---|---|
| 133 | 133 | |
| 134 | 134 | PALETTE_INIT( black_and_white ); |
| 135 | 135 | PALETTE_INIT( RRRR_GGGG_BBBB ); |
| 136 | PALETTE_INIT( RRRRR_GGGGG_BBBBB ); | |
| 137 | PALETTE_INIT( BBBBB_GGGGG_RRRRR ); | |
| 138 | PALETTE_INIT( RRRRR_GGGGGG_BBBBB ); | |
| 136 | 139 | |
| 137 | 140 | |
| 138 | 141 |
| r2086 | r2087 | |
|---|---|---|
| 822 | 822 | |
| 823 | 823 | #if HAS_WAVE |
| 824 | 824 | /* add tape control menu */ |
| 825 | if (device_find(Machine | |
| 825 | if (device_find_from_machine(Machine | |
| 826 | 826 | ADD_MENU("Tape Control", menu_tape_control, 1); |
| 827 | 827 | #endif /* HAS_WAVE */ |
| 828 | 828 | #endif /* MESS */ |
| r2086 | r2087 | |
| 1248 | 1248 | UINT32 selected = 0; |
| 1249 | 1249 | |
| 1250 | 1250 | /* add the game info */ |
| 1251 | bufptr += sprintf_game_info(bufptr); | |
| 1251 | bufptr += sprintf_game_info(Machine, bufptr); | |
| 1252 | 1252 | |
| 1253 | 1253 | /* draw the text */ |
| 1254 | 1254 | ui_menu_draw_text_box(buf); |
| r2086 | r2087 | |
|---|---|---|
| 288 | 288 | /* validate */ |
| 289 | 289 | assert(machine != NULL); |
| 290 | 290 | assert(machine->config != NULL); |
| 291 | assert(machine->config->devicelist != NULL); | |
| 292 | 291 | |
| 293 | 292 | /* request a callback upon exiting */ |
| 294 | 293 | add_exit_callback(machine, video_exit); |
| r2086 | r2087 | |
|---|---|---|
| 1460 | 1460 | space->write.handlers[entrynum].handler.generic = get_static_handler(space->dbits, 1, spacenum, entrynum); |
| 1461 | 1461 | } |
| 1462 | 1462 | |
| 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 | ||
| 1463 | 1467 | /* allocate memory */ |
| 1464 | 1468 | space->read.table = malloc_or_die(1 << LEVEL1_BITS); |
| 1465 | 1469 | space->write.table = malloc_or_die(1 << LEVEL1_BITS); |
| r2086 | r2087 | |
|---|---|---|
| 7 | 7 | |
| 8 | 8 | void SCSIDeleteInstance( SCSIInstance *instance ) |
| 9 | 9 | { |
| 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 | } | |
| 11 | 14 | } |
| 12 | 15 | |
| 13 | 16 | void SCSISetDevice( SCSIInstance *instance, void *device ) |
| 14 | 17 | { |
| 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 | } | |
| 16 | 22 | } |
| 17 | 23 | |
| 18 | 24 | void SCSIGetDevice( SCSIInstance *instance, void **device ) |
| 19 | 25 | { |
| 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 | } | |
| 21 | 30 | } |
| 22 | 31 | |
| 23 | 32 | void SCSIReset( SCSIInstance *instance ) |
| 24 | 33 | { |
| 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 | } | |
| 26 | 38 | } |
| 27 | 39 | |
| 28 | 40 | void SCSIExecCommand( SCSIInstance *instance, int *resultLength ) |
| 29 | 41 | { |
| 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 | } | |
| 31 | 46 | } |
| 32 | 47 | |
| 33 | 48 | void SCSISetCommand( SCSIInstance *instance, UINT8 *command, int commandLength ) |
| 34 | 49 | { |
| 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 | } | |
| 36 | 54 | } |
| 37 | 55 | |
| 38 | 56 | void SCSIGetCommand( SCSIInstance *instance, UINT8 **command, int *commandLength ) |
| 39 | 57 | { |
| 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 | } | |
| 41 | 62 | } |
| 42 | 63 | |
| 43 | 64 | void SCSIWriteData( SCSIInstance *instance, void *data, int dataLength ) |
| 44 | 65 | { |
| 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 | } | |
| 46 | 70 | } |
| 47 | 71 | |
| 48 | 72 | void SCSIReadData( SCSIInstance *instance, void *data, int dataLength ) |
| 49 | 73 | { |
| 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 | } | |
| 51 | 78 | } |
| 52 | 79 | |
| 53 | 80 | void SCSISetPhase( SCSIInstance *instance, int phase ) |
| 54 | 81 | { |
| 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 | } | |
| 56 | 86 | } |
| 57 | 87 | |
| 58 | 88 | void SCSIGetPhase( SCSIInstance *instance, int *phase ) |
| 59 | 89 | { |
| 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 | } | |
| 61 | 94 | } |
| 62 | 95 | |
| 63 | 96 | int SCSIBase( const SCSIClass *scsiClass, int operation, void *file, INT64 intparm, UINT8 *ptrparm ) |
| r2086 | r2087 | |
|---|---|---|
| 429 | 429 | #define ADPCMSHIFT 8 |
| 430 | 430 | #define ADFIX(f) (int) ((float) f*(float) (1<<ADPCMSHIFT)) |
| 431 | 431 | |
| 432 | 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)}; | |
| 433 | const int quant_mul[16]= { 1, 3, 5, 7, 9, 11, 13, 15, -1, -3, -5, -7, -9, -11, -13, -15}; | |
| 432 | static 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)}; | |
| 433 | static const int quant_mul[16]= { 1, 3, 5, 7, 9, 11, 13, 15, -1, -3, -5, -7, -9, -11, -13, -15}; | |
| 434 | 434 | |
| 435 | 435 | static void InitADPCM(int *PrevSignal, int *PrevQuant) |
| 436 | 436 | { |
| r2086 | r2087 | |
|---|---|---|
| 20 | 20 | // AICA register access |
| 21 | 21 | READ16_HANDLER( AICA_0_r ); |
| 22 | 22 | WRITE16_HANDLER( AICA_0_w ); |
| 23 | READ16_HANDLER( AICA_1_r ); | |
| 24 | WRITE16_HANDLER( AICA_1_w ); | |
| 25 | 23 | |
| 26 | 24 | // MIDI I/O access |
| 27 | 25 | WRITE16_HANDLER( AICA_MidiIn ); |
| r2086 | r2087 | |
|---|---|---|
| 712 | 712 | stream_sample_t *buf8 = buffer[7]; |
| 713 | 713 | stream_sample_t *bufsolo1 = buffer[8]; |
| 714 | 714 | stream_sample_t *bufsolo2 = buffer[9]; |
| 715 | stream_sample_t *bufnoise = buffer[10]; | |
| 715 | 716 | int i; |
| 716 | 717 | |
| 717 | 718 | for (i=0; i<samples; i++) |
| r2086 | r2087 | |
| 764 | 765 | cnt--; |
| 765 | 766 | } |
| 766 | 767 | } |
| 768 | ||
| 769 | bufnoise[i] = (chip->noise_rng & (1<<16)) ? 32767 : 0; | |
| 767 | 770 | } |
| 768 | 771 | } |
| 769 | 772 | |
| r2086 | r2087 | |
| 782 | 785 | |
| 783 | 786 | msm5232_init(chip, intf, clock, rate); |
| 784 | 787 | |
| 785 | chip->stream = stream_create(0,1 | |
| 788 | chip->stream = stream_create(0,11,rate,chip,MSM5232_update_one); | |
| 786 | 789 | return chip; |
| 787 | 790 | } |
| 788 | 791 |
| r2086 | r2087 | |
|---|---|---|
| 19 | 19 | #include "ui.h" |
| 20 | 20 | #include "uimenu.h" |
| 21 | 21 | #include "uigfx.h" |
| 22 | #include "deprecat.h" | |
| 23 | 22 | |
| 24 | 23 | #ifdef MESS |
| 25 | 24 | #include "mess.h" |
| r2086 | r2087 | |
| 125 | 124 | static int rescale_notifier(running_machine *machine, int width, int height); |
| 126 | 125 | |
| 127 | 126 | /* text generators */ |
| 128 | static int sprintf_disclaimer(char *buffer); | |
| 129 | static int sprintf_warnings(char *buffer); | |
| 127 | static int sprintf_disclaimer(running_machine *machine, char *buffer); | |
| 128 | static int sprintf_warnings(running_machine *machine, char *buffer); | |
| 130 | 129 | |
| 131 | 130 | /* UI handlers */ |
| 132 | 131 | static UINT32 handler_messagebox(running_machine *machine, UINT32 state); |
| r2086 | r2087 | |
| 137 | 136 | static UINT32 handler_load_save(running_machine *machine, UINT32 state); |
| 138 | 137 | |
| 139 | 138 | /* slider controls */ |
| 140 | static void slider_init( | |
| 139 | static void slider_init(running_machine *machine); | |
| 141 | 140 | static void slider_display(const char *text, int minval, int maxval, int defval, int curval); |
| 142 | 141 | static void slider_draw_bar(float leftx, float topy, float width, float height, float percentage, float default_percentage); |
| 143 | 142 | static INT32 slider_volume(running_machine *machine, INT32 newval, char *buffer, int arg); |
| r2086 | r2087 | |
| 324 | 323 | #endif /* MESS */ |
| 325 | 324 | |
| 326 | 325 | /* disable everything if we are using -str */ |
| 327 | if (!first_time || (str > 0 && str < 60*5) || | |
| 326 | if (!first_time || (str > 0 && str < 60*5) || machine->gamedrv == &driver_empty) | |
| 328 | 327 | show_gameinfo = show_warnings = show_disclaimer = FALSE; |
| 329 | 328 | |
| 330 | 329 | /* initialize the on-screen display system */ |
| 331 | slider_init(); | |
| 330 | slider_init(machine); | |
| 332 | 331 | |
| 333 | 332 | /* loop over states */ |
| 334 | 333 | ui_set_handler(handler_ingame, 0); |
| 335 | for (state = 0; state < maxstate && !mame_is_scheduled_event_pending( | |
| 334 | for (state = 0; state < maxstate && !mame_is_scheduled_event_pending(machine) && !ui_menu_is_force_game_select(); state++) | |
| 336 | 335 | { |
| 337 | 336 | /* default to standard colors */ |
| 338 | 337 | messagebox_backcolor = UI_FILLCOLOR; |
| r2086 | r2087 | |
| 341 | 340 | switch (state) |
| 342 | 341 | { |
| 343 | 342 | case 0: |
| 344 | if (show_disclaimer && sprintf_disclaimer(messagebox_text)) | |
| 343 | if (show_disclaimer && sprintf_disclaimer(machine, messagebox_text)) | |
| 345 | 344 | ui_set_handler(handler_messagebox_ok, 0); |
| 346 | 345 | break; |
| 347 | 346 | |
| 348 | 347 | case 1: |
| 349 | if (show_warnings && sprintf_warnings(messagebox_text)) | |
| 348 | if (show_warnings && sprintf_warnings(machine, messagebox_text)) | |
| 350 | 349 | { |
| 351 | 350 | ui_set_handler(handler_messagebox_ok, 0); |
| 352 | if ( | |
| 351 | if (machine->gamedrv->flags & (GAME_NOT_WORKING | GAME_UNEMULATED_PROTECTION)) | |
| 353 | 352 | messagebox_backcolor = UI_REDCOLOR; |
| 354 | 353 | } |
| 355 | 354 | break; |
| 356 | 355 | |
| 357 | 356 | case 2: |
| 358 | if (show_gameinfo && sprintf_game_info(messagebox_text)) | |
| 357 | if (show_gameinfo && sprintf_game_info(machine, messagebox_text)) | |
| 359 | 358 | ui_set_handler(handler_messagebox_anykey, 0); |
| 360 | 359 | break; |
| 361 | 360 | #ifdef MESS |
| r2086 | r2087 | |
| 369 | 368 | while (input_code_poll_switches(FALSE) != INPUT_CODE_INVALID) ; |
| 370 | 369 | |
| 371 | 370 | /* loop while we have a handler */ |
| 372 | while (ui_handler_callback != handler_ingame && !mame_is_scheduled_event_pending( | |
| 371 | while (ui_handler_callback != handler_ingame && !mame_is_scheduled_event_pending(machine) && !ui_menu_is_force_game_select()) | |
| 373 | 372 | video_frame_update(machine, FALSE); |
| 374 | 373 | |
| 375 | 374 | /* clear the handler and force an update */ |
| r2086 | r2087 | |
| 419 | 418 | render_container_empty(render_container_get_ui()); |
| 420 | 419 | |
| 421 | 420 | /* if we're paused, dim the whole screen */ |
| 422 | if (mame_get_phase( | |
| 421 | if (mame_get_phase(machine) >= MAME_PHASE_RESET && (single_step || mame_is_paused(machine))) | |
| 423 | 422 | { |
| 424 | 423 | int alpha = (1.0f - options_get_float(mame_options(), OPTION_PAUSE_BRIGHTNESS)) * 255.0f; |
| 425 | 424 | if (ui_menu_is_force_game_select()) |
| r2086 | r2087 | |
| 939 | 938 | text to the given buffer |
| 940 | 939 | -------------------------------------------------*/ |
| 941 | 940 | |
| 942 | static int sprintf_disclaimer(char *buffer) | |
| 941 | static int sprintf_disclaimer(running_machine *machine, char *buffer) | |
| 943 | 942 | { |
| 944 | 943 | char *bufptr = buffer; |
| 945 | 944 | 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", | |
| 945 | bufptr += sprintf(bufptr, "IF YOU ARE NOT LEGALLY ENTITLED TO PLAY \"%s\" ON THIS EMULATOR, PRESS ESC.\n\n", machine->gamedrv->description); | |
| 947 | 946 | bufptr += sprintf(bufptr, "Otherwise, type OK or move the joystick left then right to continue"); |
| 948 | 947 | return bufptr - buffer; |
| 949 | 948 | } |
| r2086 | r2087 | |
| 954 | 953 | text to the given buffer |
| 955 | 954 | -------------------------------------------------*/ |
| 956 | 955 | |
| 957 | static int sprintf_warnings(char *buffer) | |
| 956 | static int sprintf_warnings(running_machine *machine, char *buffer) | |
| 958 | 957 | { |
| 959 | 958 | #define WARNING_FLAGS ( GAME_NOT_WORKING | \ |
| 960 | 959 | GAME_UNEMULATED_PROTECTION | \ |
| r2086 | r2087 | |
| 968 | 967 | int i; |
| 969 | 968 | |
| 970 | 969 | /* if no warnings, nothing to return */ |
| 971 | if (rom_load_warnings() == 0 && !( | |
| 970 | if (rom_load_warnings() == 0 && !(machine->gamedrv->flags & WARNING_FLAGS)) | |
| 972 | 971 | return 0; |
| 973 | 972 | |
| 974 | 973 | /* add a warning if any ROMs were loaded with warnings */ |
| 975 | 974 | if (rom_load_warnings() > 0) |
| 976 | 975 | { |
| 977 | 976 | bufptr += sprintf(bufptr, "One or more ROMs/CHDs for this game are incorrect. The " GAMENOUN " may not run correctly.\n"); |
| 978 | if ( | |
| 977 | if (machine->gamedrv->flags & WARNING_FLAGS) | |
| 979 | 978 | *bufptr++ = '\n'; |
| 980 | 979 | } |
| 981 | 980 | |
| 982 | 981 | /* if we have at least one warning flag, print the general header */ |
| 983 | if ( | |
| 982 | if (machine->gamedrv->flags & WARNING_FLAGS) | |
| 984 | 983 | { |
| 985 | 984 | bufptr += sprintf(bufptr, "There are known problems with this " GAMENOUN "\n\n"); |
| 986 | 985 | |
| 987 | 986 | /* add one line per warning flag */ |
| 988 | 987 | #ifdef MESS |
| 989 | if ( | |
| 988 | if (machine->gamedrv->flags & GAME_COMPUTER) | |
| 990 | 989 | bufptr += sprintf(bufptr, "%s\n\n%s\n", "The emulated system is a computer: ", "The keyboard emulation may not be 100% accurate."); |
| 991 | 990 | #endif |
| 992 | if ( | |
| 991 | if (machine->gamedrv->flags & GAME_IMPERFECT_COLORS) | |
| 993 | 992 | bufptr += sprintf(bufptr, "The colors aren't 100%% accurate.\n"); |
| 994 | if ( | |
| 993 | if (machine->gamedrv->flags & GAME_WRONG_COLORS) | |
| 995 | 994 | bufptr += sprintf(bufptr, "The colors are completely wrong.\n"); |
| 996 | if ( | |
| 995 | if (machine->gamedrv->flags & GAME_IMPERFECT_GRAPHICS) | |
| 997 | 996 | bufptr += sprintf(bufptr, "The video emulation isn't 100%% accurate.\n"); |
| 998 | if ( | |
| 997 | if (machine->gamedrv->flags & GAME_IMPERFECT_SOUND) | |
| 999 | 998 | bufptr += sprintf(bufptr, "The sound emulation isn't 100%% accurate.\n"); |
| 1000 | if ( | |
| 999 | if (machine->gamedrv->flags & GAME_NO_SOUND) | |
| 1001 | 1000 | bufptr += sprintf(bufptr, "The game lacks sound.\n"); |
| 1002 | if ( | |
| 1001 | if (machine->gamedrv->flags & GAME_NO_COCKTAIL) | |
| 1003 | 1002 | bufptr += sprintf(bufptr, "Screen flipping in cocktail mode is not supported.\n"); |
| 1004 | 1003 | |
| 1005 | 1004 | /* if there's a NOT WORKING or UNEMULATED PROTECTION warning, make it stronger */ |
| 1006 | if ( | |
| 1005 | if (machine->gamedrv->flags & (GAME_NOT_WORKING | GAME_UNEMULATED_PROTECTION)) | |
| 1007 | 1006 | { |
| 1008 | 1007 | const game_driver *maindrv; |
| 1009 | 1008 | const game_driver *clone_of; |
| 1010 | 1009 | int foundworking; |
| 1011 | 1010 | |
| 1012 | 1011 | /* add the strings for these warnings */ |
| 1013 | if ( | |
| 1012 | if (machine->gamedrv->flags & GAME_NOT_WORKING) | |
| 1014 | 1013 | bufptr += sprintf(bufptr, "THIS " CAPGAMENOUN " DOESN'T WORK. You won't be able to make it work correctly. Don't bother.\n"); |
| 1015 | if ( | |
| 1014 | if (machine->gamedrv->flags & GAME_UNEMULATED_PROTECTION) | |
| 1016 | 1015 | bufptr += sprintf(bufptr, "The game has protection which isn't fully emulated.\n"); |
| 1017 | 1016 | |
| 1018 | 1017 | /* find the parent of this driver */ |
| 1019 | clone_of = driver_get_clone( | |
| 1018 | clone_of = driver_get_clone(machine->gamedrv); | |
| 1020 | 1019 | if (clone_of != NULL && !(clone_of->flags & GAME_IS_BIOS_ROOT)) |
| 1021 | 1020 | maindrv = clone_of; |
| 1022 | 1021 | else |
| 1023 | maindrv = | |
| 1022 | maindrv = machine->gamedrv; | |
| 1024 | 1023 | |
| 1025 | 1024 | /* scan the driver list for any working clones and add them */ |
| 1026 | 1025 | foundworking = 0; |
| r2086 | r2087 | |
| 1048 | 1047 | to the given buffer |
| 1049 | 1048 | -------------------------------------------------*/ |
| 1050 | 1049 | |
| 1051 | int sprintf_game_info(char *buffer) | |
| 1050 | int sprintf_game_info(running_machine *machine, char *buffer) | |
| 1052 | 1051 | { |
| 1053 | int scrcount = video_screen_count( | |
| 1052 | int scrcount = video_screen_count(machine->config); | |
| 1054 | 1053 | char *bufptr = buffer; |
| 1055 | 1054 | int cpunum, sndnum; |
| 1056 | 1055 | int count; |
| 1057 | 1056 | |
| 1058 | 1057 | /* print description, manufacturer, and CPU: */ |
| 1059 | bufptr += sprintf(bufptr, "%s\n%s %s\n\nCPU:\n", | |
| 1058 | bufptr += sprintf(bufptr, "%s\n%s %s\n\nCPU:\n", machine->gamedrv->description, machine->gamedrv->year, machine->gamedrv->manufacturer); | |
| 1060 | 1059 | |
| 1061 | 1060 | /* loop over all CPUs */ |
| 1062 | for (cpunum = 0; cpunum < MAX_CPU && | |
| 1061 | for (cpunum = 0; cpunum < MAX_CPU && machine->config->cpu[cpunum].type != CPU_DUMMY; cpunum += count) | |
| 1063 | 1062 | { |
| 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; | |
| 1066 | 1065 | |
| 1067 | 1066 | /* count how many identical CPUs we have */ |
| 1068 | 1067 | 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) | |
| 1071 | 1070 | break; |
| 1072 | 1071 | |
| 1073 | 1072 | /* if more than one, prepend a #x in front of the CPU name */ |
| r2086 | r2087 | |
| 1083 | 1082 | } |
| 1084 | 1083 | |
| 1085 | 1084 | /* loop over all sound chips */ |
| 1086 | for (sndnum = 0; sndnum < MAX_SOUND && | |
| 1085 | for (sndnum = 0; sndnum < MAX_SOUND && machine->config->sound[sndnum].type != SOUND_DUMMY; sndnum += count) | |
| 1087 | 1086 | { |
| 1088 | sound_type type = | |
| 1087 | sound_type type = machine->config->sound[sndnum].type; | |
| 1089 | 1088 | int clock = sndnum_clock(sndnum); |
| 1090 | 1089 | |
| 1091 | 1090 | /* append the Sound: string */ |
| r2086 | r2087 | |
| 1094 | 1093 | |
| 1095 | 1094 | /* count how many identical sound chips we have */ |
| 1096 | 1095 | for (count = 1; sndnum + count < MAX_SOUND; count++) |
| 1097 | if ( | |
| 1096 | if (machine->config->sound[sndnum + count].type != type || | |
| 1098 | 1097 | sndnum_clock(sndnum + count) != clock) |
| 1099 | 1098 | break; |
| 1100 | 1099 | |
| r2086 | r2087 | |
| 1120 | 1119 | { |
| 1121 | 1120 | const device_config *screen; |
| 1122 | 1121 | |
| 1123 | for (screen = video_screen_first( | |
| 1122 | for (screen = video_screen_first(machine->config); screen != NULL; screen = video_screen_next(screen)) | |
| 1124 | 1123 | { |
| 1125 | 1124 | const screen_config *scrconfig = screen->inline_config; |
| 1126 | 1125 | |
| r2086 | r2087 | |
| 1136 | 1135 | bufptr += sprintf(bufptr, "%d " UTF8_MULTIPLY " %d (%s) %f" UTF8_NBSP "Hz\n", |
| 1137 | 1136 | visarea->max_x - visarea->min_x + 1, |
| 1138 | 1137 | visarea->max_y - visarea->min_y + 1, |
| 1139 | ( | |
| 1138 | (machine->gamedrv->flags & ORIENTATION_SWAP_XY) ? "V" : "H", | |
| 1140 | 1139 | ATTOSECONDS_TO_HZ(video_screen_get_frame_period(screen).attoseconds)); |
| 1141 | 1140 | } |
| 1142 | 1141 | } |
| r2086 | r2087 | |
| 1184 | 1183 | /* if the user cancels, exit out completely */ |
| 1185 | 1184 | else if (input_ui_pressed(IPT_UI_CANCEL)) |
| 1186 | 1185 | { |
| 1187 | mame_schedule_exit( | |
| 1186 | mame_schedule_exit(machine); | |
| 1188 | 1187 | state = UI_HANDLER_CANCEL; |
| 1189 | 1188 | } |
| 1190 | 1189 | |
| r2086 | r2087 | |
| 1206 | 1205 | /* if the user cancels, exit out completely */ |
| 1207 | 1206 | if (input_ui_pressed(IPT_UI_CANCEL)) |
| 1208 | 1207 | { |
| 1209 | mame_schedule_exit( | |
| 1208 | mame_schedule_exit(machine); | |
| 1210 | 1209 | state = UI_HANDLER_CANCEL; |
| 1211 | 1210 | } |
| 1212 | 1211 | |
| r2086 | r2087 | |
| 1225 | 1224 | |
| 1226 | 1225 | static UINT32 handler_ingame(running_machine *machine, UINT32 state) |
| 1227 | 1226 | { |
| 1228 | int is_paused = mame_is_paused( | |
| 1227 | int is_paused = mame_is_paused(machine); | |
| 1229 | 1228 | |
| 1230 | 1229 | /* first draw the FPS counter */ |
| 1231 | 1230 | if (showfps || osd_ticks() < showfps_end) |
| r2086 | r2087 | |
| 1253 | 1252 | /* if we're single-stepping, pause now */ |
| 1254 | 1253 | if (single_step) |
| 1255 | 1254 | { |
| 1256 | mame_pause( | |
| 1255 | mame_pause(machine, TRUE); | |
| 1257 | 1256 | single_step = FALSE; |
| 1258 | 1257 | } |
| 1259 | 1258 | |
| r2086 | r2087 | |
| 1264 | 1263 | |
| 1265 | 1264 | /* if the user pressed ESC, stop the emulation */ |
| 1266 | 1265 | if (input_ui_pressed(IPT_UI_CANCEL)) |
| 1267 | mame_schedule_exit( | |
| 1266 | mame_schedule_exit(machine); | |
| 1268 | 1267 | |
| 1269 | 1268 | /* turn on menus if requested */ |
| 1270 | 1269 | if (input_ui_pressed(IPT_UI_CONFIGURE)) |
| 1271 | 1270 | return ui_set_handler(ui_menu_ui_handler, 0); |
| 1272 | 1271 | |
| 1273 | 1272 | /* if the on-screen display isn't up and the user has toggled it, turn it on */ |
| 1274 | if (! | |
| 1273 | if (!machine->debug_mode && input_ui_pressed(IPT_UI_ON_SCREEN_DISPLAY)) | |
| 1275 | 1274 | return ui_set_handler(handler_slider, 0); |
| 1276 | 1275 | |
| 1277 | 1276 | /* handle a reset request */ |
| 1278 | 1277 | if (input_ui_pressed(IPT_UI_RESET_MACHINE)) |
| 1279 | mame_schedule_hard_reset( | |
| 1278 | mame_schedule_hard_reset(machine); | |
| 1280 | 1279 | if (input_ui_pressed(IPT_UI_SOFT_RESET)) |
| 1281 | mame_schedule_soft_reset( | |
| 1280 | mame_schedule_soft_reset(machine); | |
| 1282 | 1281 | |
| 1283 | 1282 | /* handle a request to display graphics/palette */ |
| 1284 | 1283 | if (input_ui_pressed(IPT_UI_SHOW_GFX)) |
| 1285 | 1284 | { |
| 1286 | 1285 | if (!is_paused) |
| 1287 | mame_pause( | |
| 1286 | mame_pause(machine, TRUE); | |
| 1288 | 1287 | return ui_set_handler(ui_gfx_ui_handler, is_paused); |
| 1289 | 1288 | } |
| 1290 | 1289 | |
| 1291 | 1290 | /* handle a save state request */ |
| 1292 | 1291 | if (input_ui_pressed(IPT_UI_SAVE_STATE)) |
| 1293 | 1292 | { |
| 1294 | mame_pause( | |
| 1293 | mame_pause(machine, TRUE); | |
| 1295 | 1294 | return ui_set_handler(handler_load_save, LOADSAVE_SAVE); |
| 1296 | 1295 | } |
| 1297 | 1296 | |
| 1298 | 1297 | /* handle a load state request */ |
| 1299 | 1298 | if (input_ui_pressed(IPT_UI_LOAD_STATE)) |
| 1300 | 1299 | { |
| 1301 | mame_pause( | |
| 1300 | mame_pause(machine, TRUE); | |
| 1302 | 1301 | return ui_set_handler(handler_load_save, LOADSAVE_LOAD); |
| 1303 | 1302 | } |
| 1304 | 1303 | |
| 1305 | 1304 | /* handle a save snapshot request */ |
| 1306 | 1305 | if (input_ui_pressed(IPT_UI_SNAPSHOT)) |
| 1307 | video_save_active_screen_snapshots( | |
| 1306 | video_save_active_screen_snapshots(machine); | |
| 1308 | 1307 | |
| 1309 | 1308 | /* toggle pause */ |
| 1310 | 1309 | if (input_ui_pressed(IPT_UI_PAUSE)) |
| r2086 | r2087 | |
| 1313 | 1312 | if (is_paused && (input_code_pressed(KEYCODE_LSHIFT) || input_code_pressed(KEYCODE_RSHIFT))) |
| 1314 | 1313 | { |
| 1315 | 1314 | single_step = TRUE; |
| 1316 | mame_pause( | |
| 1315 | mame_pause(machine, FALSE); | |
| 1317 | 1316 | } |
| 1318 | 1317 | else |
| 1319 | mame_pause( | |
| 1318 | mame_pause(machine, !mame_is_paused(machine)); | |
| 1320 | 1319 | } |
| 1321 | 1320 | |
| 1322 | 1321 | /* toggle movie recording */ |
| 1323 | 1322 | if (input_ui_pressed(IPT_UI_RECORD_MOVIE)) |
| 1324 | 1323 | { |
| 1325 | if (!video_is_movie_active( | |
| 1324 | if (!video_is_movie_active(machine->primary_screen)) | |
| 1326 | 1325 | { |
| 1327 | video_movie_begin_recording( | |
| 1326 | video_movie_begin_recording(machine->primary_screen, NULL); | |
| 1328 | 1327 | popmessage("REC START"); |
| 1329 | 1328 | } |
| 1330 | 1329 | else |
| 1331 | 1330 | { |
| 1332 | video_movie_end_recording( | |
| 1331 | video_movie_end_recording(machine->primary_screen); | |
| 1333 | 1332 | popmessage("REC STOP"); |
| 1334 | 1333 | } |
| 1335 | 1334 | } |
| r2086 | r2087 | |
| 1485 | 1484 | popmessage("Load cancelled"); |
| 1486 | 1485 | |
| 1487 | 1486 | /* reset the state */ |
| 1488 | mame_pause( | |
| 1487 | mame_pause(machine, FALSE); | |
| 1489 | 1488 | return UI_HANDLER_CANCEL; |
| 1490 | 1489 | } |
| 1491 | 1490 | |
| r2086 | r2087 | |
| 1509 | 1508 | if (state == LOADSAVE_SAVE) |
| 1510 | 1509 | { |
| 1511 | 1510 | popmessage("Save to position %c", file); |
| 1512 | mame_schedule_save( | |
| 1511 | mame_schedule_save(machine, filename); | |
| 1513 | 1512 | } |
| 1514 | 1513 | else |
| 1515 | 1514 | { |
| 1516 | 1515 | popmessage("Load from position %c", file); |
| 1517 | mame_schedule_load( | |
| 1516 | mame_schedule_load(machine, filename); | |
| 1518 | 1517 | } |
| 1519 | 1518 | |
| 1520 | 1519 | /* remove the pause and reset the state */ |
| 1521 | mame_pause( | |
| 1520 | mame_pause(machine, FALSE); | |
| 1522 | 1521 | return UI_HANDLER_CANCEL; |
| 1523 | 1522 | } |
| 1524 | 1523 | |
| r2086 | r2087 | |
| 1533 | 1532 | controls |
| 1534 | 1533 | -------------------------------------------------*/ |
| 1535 | 1534 | |
| 1536 | static void slider_init( | |
| 1535 | static void slider_init(running_machine *machine) | |
| 1537 | 1536 | { |
| 1538 | int numscreens = video_screen_count( | |
| 1537 | int numscreens = video_screen_count(machine->config); | |
| 1539 | 1538 | const device_config *device; |
| 1540 | 1539 | int numitems, item; |
| 1541 | 1540 | input_port_entry *in; |
| r2086 | r2087 | |
| 1551 | 1550 | slider_config(&slider_list[slider_count++], 0, sound_get_default_gain(item) * 1000.0f + 0.5f, 2000, 20, slider_mixervol, item); |
| 1552 | 1551 | |
| 1553 | 1552 | /* add analog adjusters */ |
| 1554 | for (in = | |
| 1553 | for (in = machine->input_ports; in && in->type != IPT_END; in++) | |
| 1555 | 1554 | if ((in->type & 0xff) == IPT_ADJUSTER) |
| 1556 | slider_config(&slider_list[slider_count++], 0, in->default_value >> 8, 100, 1, slider_adjuster, in - | |
| 1555 | slider_config(&slider_list[slider_count++], 0, in->default_value >> 8, 100, 1, slider_adjuster, in - machine->input_ports); | |
| 1557 | 1556 | |
| 1558 | 1557 | if (options_get_bool(mame_options(), OPTION_CHEAT)) |
| 1559 | 1558 | { |
| r2086 | r2087 | |
| 1568 | 1567 | |
| 1569 | 1568 | for (item = 0; item < numscreens; item++) |
| 1570 | 1569 | { |
| 1571 | const screen_config *scrconfig = device_list_find_by_index( | |
| 1570 | const screen_config *scrconfig = device_list_find_by_index(machine->config->devicelist, VIDEO_SCREEN, item)->inline_config; | |
| 1572 | 1571 | int defxscale = floor(scrconfig->xscale * 1000.0f + 0.5f); |
| 1573 | 1572 | int defyscale = floor(scrconfig->yscale * 1000.0f + 0.5f); |
| 1574 | 1573 | int defxoffset = floor(scrconfig->xoffset * 1000.0f + 0.5f); |
| r2086 | r2087 | |
| 1586 | 1585 | slider_config(&slider_list[slider_count++], -500, defyoffset, 500, 2, slider_yoffset, item); |
| 1587 | 1586 | } |
| 1588 | 1587 | |
| 1589 | for (device = video_screen_first( | |
| 1588 | for (device = video_screen_first(machine->config); device != NULL; device = video_screen_next(device)) | |
| 1590 | 1589 | { |
| 1591 | 1590 | const screen_config *scrconfig = device->inline_config; |
| 1592 | 1591 | if (scrconfig->type == SCREEN_TYPE_VECTOR) |
| r2086 | r2087 | |
| 1600 | 1599 | |
| 1601 | 1600 | #ifdef MAME_DEBUG |
| 1602 | 1601 | /* add crosshair adjusters */ |
| 1603 | for (in = | |
| 1602 | for (in = machine->input_ports; in && in->type != IPT_END; in++) | |
| 1604 | 1603 | if (in->analog.crossaxis != CROSSHAIR_AXIS_NONE && in->player == 0) |
| 1605 | 1604 | { |
| 1606 | 1605 | slider_config(&slider_list[slider_count++], -3000, 1000, 3000, 100, slider_crossscale, in->analog.crossaxis); |
| r2086 | r2087 | |
| 1714 | 1713 | |
| 1715 | 1714 | static INT32 slider_adjuster(running_machine *machine, INT32 newval, char *buffer, int arg) |
| 1716 | 1715 | { |
| 1717 | input_port_entry *in = & | |
| 1716 | input_port_entry *in = &machine->input_ports[arg]; | |
| 1718 | 1717 | if (buffer != NULL) |
| 1719 | 1718 | { |
| 1720 | 1719 | in->default_value = (in->default_value & ~0xff) | (newval & 0xff); |
| r2086 | r2087 | |
| 1746 | 1745 | |
| 1747 | 1746 | static INT32 slider_refresh(running_machine *machine, INT32 newval, char *buffer, int arg) |
| 1748 | 1747 | { |
| 1749 | const screen_config *scrconfig = device_list_find_by_index( | |
| 1748 | const screen_config *scrconfig = device_list_find_by_index(machine->config->devicelist, VIDEO_SCREEN, arg)->inline_config; | |
| 1750 | 1749 | double defrefresh = ATTOSECONDS_TO_HZ(scrconfig->refresh); |
| 1751 | 1750 | double refresh; |
| 1752 | 1751 | |
| r2086 | r2087 | |
| 1953 | 1952 | |
| 1954 | 1953 | if (buffer != NULL) |
| 1955 | 1954 | { |
| 1956 | for (in = | |
| 1955 | for (in = machine->input_ports; in && in->type != IPT_END; in++) | |
| 1957 | 1956 | if (in->analog.crossaxis == arg) |
| 1958 | 1957 | { |
| 1959 | 1958 | in->analog.crossscale = (float)newval * 0.001f; |
| r2086 | r2087 | |
| 1961 | 1960 | } |
| 1962 | 1961 | sprintf(buffer, "%s %s %1.3f", "Crosshair Scale", (in->analog.crossaxis == CROSSHAIR_AXIS_X) ? "X" : "Y", (float)newval * 0.001f); |
| 1963 | 1962 | } |
| 1964 | for (in = | |
| 1963 | for (in = machine->input_ports; in && in->type != IPT_END; in++) | |
| 1965 | 1964 | if (in->analog.crossaxis == arg) |
| 1966 | 1965 | return floor(in->analog.crossscale * 1000.0f + 0.5f); |
| 1967 | 1966 | return 0; |
| r2086 | r2087 | |
| 1981 | 1980 | |
| 1982 | 1981 | if (buffer != NULL) |
| 1983 | 1982 | { |
| 1984 | for (in = | |
| 1983 | for (in = machine->input_ports; in && in->type != IPT_END; in++) | |
| 1985 | 1984 | if (in->analog.crossaxis == arg) |
| 1986 | 1985 | { |
| 1987 | 1986 | in->analog.crossoffset = (float)newval * 0.001f; |
| r2086 | r2087 | |
| 1989 | 1988 | } |
| 1990 | 1989 | sprintf(buffer, "%s %s %1.3f", "Crosshair Offset", (in->analog.crossaxis == CROSSHAIR_AXIS_X) ? "X" : "Y", (float)newval * 0.001f); |
| 1991 | 1990 | } |
| 1992 | for (in = | |
| 1991 | for (in = machine->input_ports; in && in->type != IPT_END; in++) | |
| 1993 | 1992 | if (in->analog.crossaxis == arg) |
| 1994 | 1993 | return floor(in->analog.crossoffset * 1000.0f + 0.5f); |
| 1995 | 1994 | return 0; |
| r2086 | r2087 | |
|---|---|---|
| 136 | 136 | int ui_is_slider_active(void); |
| 137 | 137 | |
| 138 | 138 | /* print the game info string into a buffer */ |
| 139 | int sprintf_game_info(char *buffer); | |
| 139 | int sprintf_game_info(running_machine *machine, char *buffer); | |
| 140 | 140 | |
| 141 | 141 | #endif /* __USRINTRF_H__ */ |
| r2086 | r2087 | |
|---|---|---|
| 506 | 506 | |
| 507 | 507 | #define RAW 0 |
| 508 | 508 | #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)) | |
| 510 | 511 | #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; } |
| 511 | 512 | #define DECLARE_SWAP_RAW_PRI(function,args,body) static void function##_pri16 args body |
| 512 | 513 | #include "drawgfx.c" |
| r2086 | r2087 | |
| 532 | 533 | |
| 533 | 534 | #define RAW 0 |
| 534 | 535 | #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)) | |
| 536 | 538 | #define SETPIXELCOLOR(dest,n) {dstdata[dest] = (n);} |
| 537 | 539 | #define DECLARE_SWAP_RAW_PRI(function,args,body) static void function##16 args body |
| 538 | 540 | #include "drawgfx.c" |
| r2086 | r2087 | |
| 613 | 615 | #undef RAW |
| 614 | 616 | |
| 615 | 617 | #define RAW 0 |
| 616 | #define COLOR_ARG int colorbase, | |
| 618 | #define COLOR_ARG int colorbase, | |
| 617 | 619 | #define LOOKUP(n) (paldata[n]) |
| 620 | //#define LOOKUP(n) (colorbase + (n)) | |
| 618 | 621 | #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; } } } |
| 619 | 622 | #define DECLARE_SWAP_RAW_PRI(function,args,body) static void function##_pri32 args body |
| 620 | 623 | #include "drawgfx.c" |
| r2086 | r2087 | |
| 641 | 644 | #define RAW 0 |
| 642 | 645 | #define COLOR_ARG int colorbase, const pen_t *paldata |
| 643 | 646 | #define LOOKUP(n) (paldata[n]) |
| 647 | //#define LOOKUP(n) (colorbase + (n)) | |
| 644 | 648 | #define SETPIXELCOLOR(dest,n) {dstdata[dest] = (n);} |
| 645 | 649 | #define DECLARE_SWAP_RAW_PRI(function,args,body) static void function##32 args body |
| 646 | 650 | #include "drawgfx.c" |
| r2086 | r2087 | |
| 1179 | 1183 | if (dest_bmp->bpp == 16) |
| 1180 | 1184 | { |
| 1181 | 1185 | int colorbase = gfx->color_base + gfx->color_granularity * (color % gfx->total_colors); |
| 1186 | const pen_t *pal = &Machine->pens[colorbase]; | |
| 1182 | 1187 | UINT8 *source_base = gfx->gfxdata + (code % gfx->total_elements) * gfx->char_modulo; |
| 1183 | 1188 | |
| 1184 | 1189 | int sprite_screen_height = (scaley*gfx->height+0x8000)>>16; |
| r2086 | r2087 | |
| 1261 | 1266 | for (x = sx; x < ex; x++) |
| 1262 | 1267 | { |
| 1263 | 1268 | 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); | |
| 1265 | 1271 | pri[x] = 31; |
| 1266 | 1272 | x_index += dx; |
| 1267 | 1273 | } |
| r2086 | r2087 | |
| 1279 | 1285 | for (x = sx; x < ex; x++) |
| 1280 | 1286 | { |
| 1281 | 1287 | 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]; | |
| 1283 | 1290 | pri[x] = 31; |
| 1284 | 1291 | x_index += dx; |
| 1285 | 1292 | } |
| r2086 | r2087 | |
| 1298 | 1305 | int x, x_index = x_index_base; |
| 1299 | 1306 | for (x = sx; x < ex; x++) |
| 1300 | 1307 | { |
| 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); | |
| 1302 | 1310 | x_index += dx; |
| 1303 | 1311 | } |
| 1304 | 1312 | |
| r2086 | r2087 | |
| 1313 | 1321 | int x, x_index = x_index_base; |
| 1314 | 1322 | for (x = sx; x < ex; x++) |
| 1315 | 1323 | { |
| 1316 | dest[x] = colorbase + source[x_index>>16]; | |
| 1324 | dest[x] = pal[source[x_index>>16]]; | |
| 1325 | // dest[x] = colorbase + source[x_index>>16]; | |
| 1317 | 1326 | x_index += dx; |
| 1318 | 1327 | } |
| 1319 | 1328 | |
| r2086 | r2087 | |
| 1341 | 1350 | if (c != transparent_color) |
| 1342 | 1351 | { |
| 1343 | 1352 | if (((1 << pri[x]) & pri_mask) == 0) |
| 1344 | dest[x] = colorbase + c; | |
| 1353 | dest[x] = pal[c]; | |
| 1354 | // dest[x] = colorbase + c; | |
| 1345 | 1355 | pri[x] = 31; |
| 1346 | 1356 | } |
| 1347 | 1357 | x_index += dx; |
| r2086 | r2087 | |
| 1363 | 1373 | if (c != transparent_color) |
| 1364 | 1374 | { |
| 1365 | 1375 | if (((1 << pri[x]) & pri_mask) == 0) |
| 1366 | dest[x] = colorbase + c; | |
| 1376 | dest[x] = pal[c]; | |
| 1377 | // dest[x] = colorbase + c; | |
| 1367 | 1378 | pri[x] = 31; |
| 1368 | 1379 | } |
| 1369 | 1380 | x_index += dx; |
| r2086 | r2087 | |
| 1384 | 1395 | for (x = sx; x < ex; x++) |
| 1385 | 1396 | { |
| 1386 | 1397 | 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; | |
| 1388 | 1400 | x_index += dx; |
| 1389 | 1401 | } |
| 1390 | 1402 | |
| r2086 | r2087 | |
| 1400 | 1412 | for (x = sx; x < ex; x++) |
| 1401 | 1413 | { |
| 1402 | 1414 | 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; | |
| 1404 | 1417 | x_index += dx; |
| 1405 | 1418 | } |
| 1406 | 1419 | |
| r2086 | r2087 | |
| 1469 | 1482 | if (((1 << c) & transparent_color) == 0) |
| 1470 | 1483 | { |
| 1471 | 1484 | if (((1 << pri[x]) & pri_mask) == 0) |
| 1472 | dest[x] = colorbase + c; | |
| 1485 | dest[x] = pal[c]; | |
| 1486 | // dest[x] = colorbase + c; | |
| 1473 | 1487 | pri[x] = 31; |
| 1474 | 1488 | } |
| 1475 | 1489 | x_index += dx; |
| r2086 | r2087 | |
| 1488 | 1502 | { |
| 1489 | 1503 | int c = source[x_index>>16]; |
| 1490 | 1504 | if (((1 << c) & transparent_color) == 0) |
| 1491 | dest[x] = colorbase + c; | |
| 1505 | dest[x] = pal[c]; | |
| 1506 | // dest[x] = colorbase + c; | |
| 1492 | 1507 | x_index += dx; |
| 1493 | 1508 | } |
| 1494 | 1509 | |
| r2086 | r2087 | |
| 1525 | 1540 | if (((1 << (ah & 0x1f)) & pri_mask) == 0) |
| 1526 | 1541 | { |
| 1527 | 1542 | 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]; | |
| 1529 | 1545 | else |
| 1530 | dest[x] = colorbase + c; | |
| 1546 | dest[x] = pal[c]; | |
| 1547 | // dest[x] = colorbase + c; | |
| 1531 | 1548 | } |
| 1532 | 1549 | pri[x] = (ah & 0x7f) | 31; |
| 1533 | 1550 | break; |
| r2086 | r2087 | |
| 1560 | 1577 | switch(gfx_drawmode_table[c]) |
| 1561 | 1578 | { |
| 1562 | 1579 | case DRAWMODE_SOURCE: |
| 1563 | dest[x] = colorbase + c; | |
| 1580 | dest[x] = pal[c]; | |
| 1581 | // dest[x] = colorbase + c; | |
| 1564 | 1582 | break; |
| 1565 | 1583 | case DRAWMODE_SHADOW: |
| 1566 | 1584 | dest[x] = palette_shadow_table[dest[x]]; |
| r2086 | r2087 | |
| 1592 | 1610 | if (c != transparent_color) |
| 1593 | 1611 | { |
| 1594 | 1612 | 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); | |
| 1596 | 1615 | pri[x] = 31; |
| 1597 | 1616 | } |
| 1598 | 1617 | x_index += dx; |
| r2086 | r2087 | |
| 1610 | 1629 | for (x = sx; x < ex; x++) |
| 1611 | 1630 | { |
| 1612 | 1631 | 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); | |
| 1614 | 1634 | x_index += dx; |
| 1615 | 1635 | } |
| 1616 | 1636 | |
| r2086 | r2087 | |
| 1637 | 1657 | if (((1 << pri[x]) & pri_mask) == 0) |
| 1638 | 1658 | { |
| 1639 | 1659 | if (gfx_alpharange_table[c] == 0xff) |
| 1640 | dest[x] = colorbase + c; | |
| 1660 | dest[x] = pal[c]; | |
| 1661 | // dest[x] = colorbase + c; | |
| 1641 | 1662 | 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]); | |
| 1643 | 1665 | } |
| 1644 | 1666 | pri[x] = 31; |
| 1645 | 1667 | } |
| r2086 | r2087 | |
| 1661 | 1683 | if (c != transparent_color) |
| 1662 | 1684 | { |
| 1663 | 1685 | if (gfx_alpharange_table[c] == 0xff) |
| 1664 | dest[x] = colorbase + c; | |
| 1686 | dest[x] = pal[c]; | |
| 1687 | // dest[x] = colorbase + c; | |
| 1665 | 1688 | 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]); | |
| 1667 | 1691 | } |
| 1668 | 1692 | x_index += dx; |
| 1669 | 1693 | } |
| r2086 | r2087 | |
|---|---|---|
| 209 | 209 | { |
| 210 | 210 | device_type devtype; |
| 211 | 211 | const char *tag; |
| 212 | int size, offset, type, bits; | |
| 212 | int size, offset, type, bits, in, out; | |
| 213 | 213 | UINT32 data32, clock, gain; |
| 214 | 214 | UINT64 data64; |
| 215 | 215 | |
| r2086 | r2087 | |
| 516 | 516 | |
| 517 | 517 | case MCONFIG_TOKEN_SOUND_ROUTE: |
| 518 | 518 | assert(sound != NULL); |
| 519 | in = sound->route[sound->routes].input; | |
| 520 | out = sound->route[sound->routes].output; | |
| 519 | 521 | TOKEN_UNGET_UINT32(tokens); |
| 520 | TOKEN_GET_UINT64_UNPACK4(tokens, entrytype, 8, | |
| 522 | TOKEN_GET_UINT64_UNPACK4(tokens, entrytype, 8, | |
| 521 | 523 | sound->route[sound->routes].gain = (float)gain / 16777216.0f; |
| 522 | 524 | sound->route[sound->routes].target = TOKEN_GET_STRING(tokens); |
| 523 | 525 | sound->routes++; |
| r2086 | r2087 | |
|---|---|---|
| 1016 | 1016 | const char *flipscreen = input_port_string_from_index(INPUT_STRING_Flip_Screen); |
| 1017 | 1017 | const input_port_entry *inp, *last_dipname_entry = NULL; |
| 1018 | 1018 | const game_driver *driver = drivers[drivnum]; |
| 1019 | const char *tag[MAX_INPUT_PORTS] = { 0 }; | |
| 1020 | int portnum = 0; | |
| 1019 | 1021 | int empty_string_found = FALSE; |
| 1020 | 1022 | int last_strindex = 0; |
| 1021 | 1023 | quark_entry *entry; |
| r2086 | r2087 | |
| 1044 | 1046 | { |
| 1045 | 1047 | int strindex = 0; |
| 1046 | 1048 | |
| 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 | ||
| 1047 | 1067 | if (port_type_is_analog(inp->type)) |
| 1048 | 1068 | { |
| 1049 | 1069 | INT32 analog_max = inp->analog.max; |
| r2086 | r2087 | |
| 1148 | 1168 | } |
| 1149 | 1169 | |
| 1150 | 1170 | /* 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) | |
| 1152 | 1172 | last_dipname_entry = NULL; |
| 1153 | 1173 | |
| 1154 | 1174 | /* look for invalid (0) types which should be mapped to IPT_OTHER */ |
| r2086 | r2087 | |
| 1159 | 1179 | } |
| 1160 | 1180 | |
| 1161 | 1181 | /* if this entry doesn't have a name, we don't care about the rest of this stuff */ |
| 1162 | if ( | |
| 1182 | if ( | |
| 1163 | 1183 | { |
| 1164 | 1184 | /* not allowed for dipswitches */ |
| 1165 | 1185 | if (inp->type == IPT_DIPSWITCH_NAME || inp->type == IPT_DIPSWITCH_SETTING) |
| r2086 | r2087 | |
| 1172 | 1192 | } |
| 1173 | 1193 | |
| 1174 | 1194 | /* check for empty string */ |
| 1175 | if ( | |
| 1195 | if ( | |
| 1176 | 1196 | { |
| 1177 | 1197 | mame_printf_error("%s: %s has an input with an empty string\n", driver->source_file, driver->name); |
| 1178 | 1198 | error = TRUE; |
| r2086 | r2087 | |
| 1180 | 1200 | } |
| 1181 | 1201 | |
| 1182 | 1202 | /* 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] == ' ') | |
| 1184 | 1204 | { |
| 1185 | 1205 | mame_printf_error("%s: %s input '%s' has trailing spaces\n", driver->source_file, driver->name, inp->name); |
| 1186 | 1206 | error = TRUE; |
| r2086 | r2087 | |
|---|---|---|
| 45 | 45 | XTAL_1MHz = 1000000, /* Used to drive OKI M6295 chips */ |
| 46 | 46 | XTAL_1_75MHz = 1750000, /* RCA CDP1861 */ |
| 47 | 47 | XTAL_2MHz = 2000000, |
| 48 | XTAL_2_01216MHz = 2012160, /* Cidelsa Draco sound board */ | |
| 48 | 49 | XTAL_2_4576MHz = 2457600, /* Atari ST MFP */ |
| 49 | 50 | XTAL_3MHz = 3000000, /* Probably only used to drive 68705 or similar MCUs on 80's Taito PCBs */ |
| 50 | 51 | XTAL_3_52128MHz = 3521280, /* RCA COSMAC VIP */ |
| r2086 | r2087 | |
| 52 | 53 | XTAL_3_6864MHz = 3686400, /* CPS3 */ |
| 53 | 54 | XTAL_4MHz = 4000000, |
| 54 | 55 | XTAL_4_224MHz = 4224000, /* Used to drive OKI M6295 chips, usually with /4 divider */ |
| 56 | XTAL_4_43361MHz = 4433610, /* Cidelsa Draco */ | |
| 55 | 57 | XTAL_4_433619MHz = 4433619, /* PAL color subcarrier */ |
| 56 | 58 | XTAL_4_9152MHz = 4915200, |
| 57 | 59 | XTAL_5MHz = 5000000, /* Mutant Night */ |
| 60 | XTAL_5_7143MHz = 5714300, /* Cidelsa Destroyer */ | |
| 58 | 61 | XTAL_6MHz = 6000000, |
| 59 | 62 | XTAL_6_144MHz = 6144000, /* Used on Alpha Denshi early 80's games sound board */ |
| 60 | 63 | XTAL_7MHz = 7000000, /* Jaleco Mega System PCBs */ |
| r2086 | r2087 | |
|---|---|---|
| 534 | 534 | ***************************************************************************/ |
| 535 | 535 | |
| 536 | 536 | /*------------------------------------------------- |
| 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 | ||
| 543 | static void *expat_malloc(size_t size) | |
| 544 | { | |
| 545 | return malloc(size); | |
| 546 | } | |
| 547 | ||
| 548 | static void *expat_realloc(void *ptr, size_t size) | |
| 549 | { | |
| 550 | return realloc(ptr, size); | |
| 551 | } | |
| 552 | ||
| 553 | static void expat_free(void *ptr) | |
| 554 | { | |
| 555 | free(ptr); | |
| 556 | } | |
| 557 | ||
| 558 | ||
| 559 | /*------------------------------------------------- | |
| 537 | 560 | expat_setup_parser - set up expat for parsing |
| 538 | 561 | -------------------------------------------------*/ |
| 539 | 562 | |
| 540 | 563 | static int expat_setup_parser(xml_parse_info *parse_info, xml_parse_options *opts) |
| 541 | 564 | { |
| 565 | XML_Memory_Handling_Suite memcallbacks; | |
| 566 | ||
| 542 | 567 | /* setup parse_info structure */ |
| 543 | 568 | memset(parse_info, 0, sizeof(*parse_info)); |
| 544 | 569 | if (opts != NULL) |
| r2086 | r2087 | |
| 559 | 584 | parse_info->curnode = parse_info->rootnode; |
| 560 | 585 | |
| 561 | 586 | /* 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); | |
| 563 | 591 | if (parse_info->parser == NULL) |
| 564 | 592 | { |
| 565 | 593 | free(parse_info->rootnode); |
| r2086 | r2087 | |
|---|---|---|
| 5 | 5 | //============================================================ |
| 6 | 6 | |
| 7 | 7 | // Needed for better file dialog |
| 8 | #ifdef _WIN32_WINNT | |
| 9 | #undef _WIN32_WINNT | |
| 10 | #endif // _WIN32_WINNT | |
| 8 | 11 | #define _WIN32_WINNT 0x500 |
| 9 | 12 | |
| 10 | 13 | // standard windows headers |
| r2086 | r2087 | |
|---|---|---|
| 1 | 0.12 | |
| 1 | 0.124 | |
| 2 | 2 | ----- |
| 3 | 3 | |
| 4 | 4 | |
| 5 | 5 | MAMETesters Bugs Fixed |
| 6 | 6 | ---------------------- |
| 7 | taito_f3.c0122u8red [Aaron Giles] | |
| 8 | dubugchunklength0122u7gre [Aaron Giles] | |
| 9 | m62.c0122u7yel [Aaron Giles] | |
| 10 | qix.c0122u8red [Atari Ace] | |
| 11 | yard.c0122u7yel [Aaron Giles] | |
| 7 | 01586: [Multisession] bluehawk: Graphics corruption (Reip) | |
| 8 | 01433: [Graphics] marvins: If you play player 2, the maze remains | |
| 9 | unchanged. (Reip) | |
| 10 | 01601: [Misc.] orbit: Game doesn't start. Watchdog/reset problem? | |
| 11 | (Aaron Giles) | |
| 12 | 01584: [Misc.] exerion, exerionb, exeriont: Assertion (Aaron Giles) | |
| 13 | 01560: [DIP/Input] turpin: Cannot coin up in either slot. (RansAckeR) | |
| 14 | 01525: [Misc.] wilytowr, atomboy: watchdog resets (RansAckeR) | |
| 15 | 01524: [Misc.] btoads: Assertion (Zsolt Vasvari) | |
| 16 | 01557: [Misc.] dealem: Assertion (Zsolt Vasvari) | |
| 17 | 00059: [Graphics] commsega, locomotn, tactcian: They exhibit a problem | |
| 18 | with screen area. (Nicola Salmoria) | |
| 19 | 00406: [Graphics] qadj: When playing as the ninja, there is one broken | |
| 20 | frame in his animation loop when walking. (Nicola Salmoria) | |
| 12 | 21 | |
| 13 | 22 | |
| 14 | 23 | |
| 15 | 24 | Source Changes |
| 16 | 25 | -------------- |
| 17 | Fixed crash in debugcmt with starting with no game on the command-line. | |
| 18 | [Andrew Gardner] | |
| 26 | bbusters: Fixed sprite wrapping -- this is used on the gun calibration | |
| 27 | screen, at least. The game still hangs on a black screen after service | |
| 28 | mode is turned off. Even exiting MAME and restarting doesn't fix it, | |
| 29 | so it's probably a EEPROM issue. [Zsolt Vasvari] | |
| 19 | 30 | |
| 20 | ||
| 31 | Added Noi | |
| 21 | 32 | |
| 22 | Fixed regression in cpu_spinuntil* calls that broke a number of games. | |
| 23 | [Aaron Giles] | |
| 33 | Added placeholder effects for cymbal and hihat to equites.c. These | |
| 34 | will need further work to properly emulate the discrete circuitry. | |
| 35 | [Nicola Salmoria] | |
| 24 | 36 | |
| 25 | ||
| 37 | ||
| 26 | 38 | |
| 27 | Fixed palette gradient for promutrv. [Pierpaolo Prazzoli] | |
| 39 | Added NVRAM to Gekisou. Fixed inputs and promoted to working. | |
| 40 | [Nicola Salmoria] | |
| 28 | 41 | |
| 29 | Fixed watchdog behavior when not explicitly specified. [Aaron Giles] | |
| 42 | Explicitly fixed unmapped handler masks so that we don't report all | |
| 43 | unmapped addresses as 0. [Aaron Giles] | |
| 30 | 44 | |
| 31 | Fixed sprite placement again in chinagat driver. [Aaron Giles] | |
| 45 | Centralized definitions of _WIN32_WINNT. Removed malloc/calloc/ | |
| 46 | realloc/free link-time overrides; we now rely exclusively on compile- | |
| 47 | time overrides. Made a few tweaks toward getting mingw-w64 working, | |
| 48 | but there are still linker issues. [Aaron Giles] | |
| 32 | 49 | |
| 33 | Fixed | |
| 50 | Fixed ass | |
| 34 | 51 | |
| 52 | De-deprecat-ed ui.c. [Aaron Giles] | |
| 35 | 53 | |
| 54 | Changed xmlfile.c to pass in memory handlers to expat so that | |
| 55 | our memory overrides are properly managed. [Aaron Giles] | |
| 36 | 56 | |
| 37 | New clones added | |
| 38 | ---------------- | |
| 39 | Vs. Janshi Brandnew Stars (MegaSystem32 Version) [David Haywood] | |
| 57 | Fixed wbbc97 regression. [Zsolt Vasvari] | |
| 40 | 58 | |
| 59 | Fixed crospang.c regression. Not sure why this needed to be RGB15, | |
| 60 | works fine with INDEXED16. [Zsolt Vasvari] | |
| 41 | 61 | |
| 62 | [GTICLUB] Fixed crash. [R. Belmont] | |
| 42 | 63 | |
| 43 | 0.122u8 | |
| 44 | ------- | |
| 64 | [SCSI] Fixed case when no device exists (e.g. running the sys573 BIOS | |
| 65 | directly). [R. Belmont] | |
| 45 | 66 | |
| 67 | Got most of the Konami PPC games running again. [R. Belmont] | |
| 46 | 68 | |
| 47 | MAMETesters Bugs Fixed | |
| 48 | ---------------------- | |
| 49 | stadhero0122u3gra [RansAckeR] | |
| 50 | wboy3_0119u3gra [RansAckeR] | |
| 51 | zerohour0122u6gra [RansAckeR] | |
| 52 | strahl0122u6yel [Mamesick] | |
| 53 | cmv801_0116gra [RansAckeR] | |
| 69 | Fixed crash running "kviper" BIOS. [R. Belmont] | |
| 54 | 70 | |
| 71 | Changed crystal.c from RGB15 to RGB32. RGB15 is not enough bits to | |
| 72 | hold the 5-6-5 colorspace. [Zsolt Vasvari] | |
| 55 | 73 | |
| 74 | Updated astrof.c to use the timer device. [Zsolt Vasvari] | |
| 56 | 75 | |
| 57 | Source Changes | |
| 58 | -------------- | |
| 59 | Added deprecat.h that contains some deprecated/discouraged contructs. | |
| 60 | The idea is to create extra work if a driver wants to use these and | |
| 61 | hopefully gives an incentive to look for an alternate solution. Added | |
| 62 | #include of deprecat.h that rely on these contructs. Removed a bunch | |
| 63 | of unneccassary #include's from these files. [Zsolt Vasvari] | |
| 76 | dgpix and eolith: Converted to INDEXED16. Removed temp bitmaps. | |
| 77 | Changed ugly recursive video RAM code. [Zsolt Vasvari] | |
| 64 | 78 | |
| 65 | Simplified Star Fire driver. [Zsolt Vasvari] | |
| 79 | ddz: Removed RGB15 -- it's a "skeleton" driver, so why have it? | |
| 80 | [Zsolt Vasvari] | |
| 66 | 81 | |
| 67 | drawgfx 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. | |
| 82 | video\generic.c: Added PALETTE_INIT functions for common 16-bit RGB | |
| 83 | patterns. [Zsolt Vasvari] | |
| 81 | 84 | |
| 82 | Fixed crash in masao. [couriersud] | |
| 85 | Converted f-32, kinst, lethalj, ultrsprt, gamecstl, taitowlf to use | |
| 86 | INDEXED16. [Zsolt Vasvari] | |
| 83 | 87 | |
| 84 | Corrected previous i0851 timer fix to use more accurate IE SFRs. | |
| 85 | [Jim Stolis] | |
| 88 | Added option in MC6845 to programatically set the clock pin. This is | |
| 89 | needed by at least one MESS driver. Added | |
| 90 | mc6845_set_hpixels_per_column() for the Hercules gfx adapter. | |
| 91 | [Zsolt Vasvari] | |
| 86 | 92 | |
| 87 | jedi.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 | |
| 93 | Fixed video timing in xtheball. Still don't know why it changed | |
| 94 | recently, but the new parameters reproduce the old values. | |
| 95 | [Aaron Giles] | |
| 91 | 96 | |
| 92 | Fixed the CPS driver to at least display the correct clock in the | |
| 93 | driver info, by degrading the clock through alternate means. | |
| 94 | [David Haywood] | |
| 97 | Removed unnecessary assert in video.c that broke screenless games. | |
| 98 | [Dirk Best] | |
| 95 | 99 | |
| 96 | m62.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. | |
| 100 | Changed the zombraid gun input ports to work with the calibrated | |
| 101 | settings. [Derrick Renaud] | |
| 101 | 102 | |
| 102 | ||
| 103 | Fix | |
| 103 | 104 | |
| 104 | Added PCB layouts for Penguin Bros & Puzzle De Bowling based on | |
| 105 | Hi-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 | |
| 107 | are for other chips (28MHz and or 32.53047MHz). [Brian Troha] | |
| 105 | Fixed graphics ROMs in gnga. [Cesare Falco] | |
| 108 | 106 | |
| 109 | Simplified video code and adjusted some set names in the leland | |
| 110 | driver. [Zsolt Vasvari] | |
| 107 | Added validity check to ensure input port tags don't have duplicates. | |
| 108 | Fixed several drivers where there were duplicates. [Aaron Giles] | |
| 111 | 109 | |
| 112 | Replaced tables with equations in the Sega C2 driver. | |
| 113 | [Nicola Salmoria] | |
| 110 | Corrected clocks on Cabal bootleg. [Corrado Tomaselli] | |
| 114 | 111 | |
| 115 | Added checks for CROSS_BUILD=1 to omit building m68kmake.exe, | |
| 116 | verinfo.exe, png2bdc.exe and file2str. Enables building mame using | |
| 117 | mingw on linux. [couriersud] | |
| 112 | blockhl.c, blockout.c: Added dip locations, fixed unknown dip | |
| 113 | switches. [RansAckeR] | |
| 118 | 114 | |
| 119 | Various 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 | |
| 115 | Removed improper use of PERIODIC_INT in mpu4, to use new timer | |
| 116 | devices. Also corrected 50Hz timer in MPU4 Video games. | |
| 117 | [James Wallace] | |
| 130 | 118 | |
| 131 | Cleaned up 20pacgal driver, including driver state. Tried improving | |
| 132 | on the ROM mirroring, without any success. [Zsolt Vasvari] | |
| 119 | Fixed bug in tx1.c spotted by new compiler warnings in gcc 4.3.0. | |
| 120 | [Atari Ace] | |
| 133 | 121 | |
| 134 | Removed colortables from a number of drivers, as part of a larger | |
| 135 | move to phase out old-style colortables: gotya, gyruss, ampoker, | |
| 136 | circusc, clshroad, champbas, 1943, lucky8, olibochu, yamato, | |
| 137 | appoooh, bking, bladestl, blueprnt, carpolo, centiped, cop01, | |
| 138 | cosmic, ddrible, irobot, ace, alpha68k, arabian, bfm_sc2, carjmbre, | |
| 139 | cclimber, cherrym2, combatsc, contra, fastlane, hcastle, labyrunr, | |
| 140 | cham24, multigam. [Zsolt Vasvari] | |
| 122 | Another batch of pedantic static/const/include fixes. [Atari Ace] | |
| 141 | 123 | |
| 142 | Removed non-existent, second M6295 from Hit the Ice. Fixes missing | |
| 143 | sounds (e.g. team select screen). Hit the Ice/Violence Fight now | |
| 144 | share the same sound CPU memory maps. [Philip Bennett] | |
| 124 | Redid video timing in orbit with raw parameters. Added full memory map | |
| 125 | and a few other cleanups. [Aaron Giles] | |
| 145 | 126 | |
| 146 | Improved DIP switches according to manuals for the following drivers: | |
| 147 | wboy, chplft, extdwnhl, zingzip, zaxxon, congo, vanguard, zarzon, | |
| 148 | nibbler, segag80r.c, yard, kaneko16.c. [RansAckeR] | |
| 149 | 127 | |
| 150 | Verified the sound roms for Rock'n 3 and added proper names. Added | |
| 151 | PCB layout for sound rom board only. [Brian Troha] | |
| 152 | 128 | |
| 153 | Cleaned 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 | |
| 129 | New games added or promoted from NOT_WORKING status | |
| 130 | --------------------------------------------------- | |
| 131 | Gekisou [Nicola Salmoria] | |
| 132 | Mermaid [robiza] | |
| 157 | 133 | |
| 158 | Cleaned 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 | |
| 168 | 134 | |
| 169 | Cleaned up pooyan driver. Save states, full memory maps, proper NMI | |
| 170 | generation, etc. Flipped video to align better with Time Pilot. | |
| 171 | [Aaron Giles] | |
| 172 | 135 | |
| 173 | Changed 6840 interrupt handling to work like the recent 6821 changes. | |
| 174 | Updated MPU4 driver accordingly. Updated Scorpion 2 driver to match | |
| 175 | MPU4 coding style. [James Wallace] | |
| 136 | New clones added | |
| 137 | ---------------- | |
| 138 | Ridge Racer (Rev. RR3, World) [Andrea Turci] | |
| 176 | 139 | |
| 177 | Resolved all unknown dips in the galpani2 driver according to kaneko's | |
| 178 | docs, unified memory maps of both CPUs and repositioned a pair of | |
| 179 | graphic ROMS. [Luis Faria] | |
| 180 | 140 | |
| 181 | Made some minor improvements to 1942.c & 1943.c DIPs. Improved | |
| 182 | segas16a.c, segas16b.c & system16.c DIPs and added DIP locations | |
| 183 | from manuals. [RansAckeR] | |
| 184 | 141 | |
| 185 | Removed distinction between *_gettotalcycles() and | |
| 186 | *_gettotalcycles64(). All functions now return 64-bit results. Updated | |
| 187 | all call sites appropriately. [Aaron Giles] | |
| 142 | 0.123u6 | |
| 143 | ------- | |
| 188 | 144 | |
| 189 | Further improvements to SCSP FM. [kingshriek] | |
| 190 | 145 | |
| 191 | Moved cpu_getiloops() and cpu_scalebyfcount() to deprecat.h. Added | |
| 192 | #include "deprecat.h" where necessary to make this happen. Cleaned up | |
| 193 | cpuexec.c/.h to latest core style. Cleaned up implementation of | |
| 194 | extended INP header in inptport.c. Removed external access to | |
| 195 | cycles_currently_ran(). Replaced use of cycles_currently_ran() in | |
| 196 | v9938 code with mame_rand(), since that is effectively the same thing. | |
| 197 | [Aaron Giles] | |
| 146 | MAMETesters 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. | |
| 198 | 212 | |
| 199 | Added dip locations to about half the games in seta.c. [Brian Troha] | |
| 200 | 213 | |
| 201 | Removed champbas color PROM. Now uses TRANSPARENCY_PENS instead of | |
| 202 | TRANSPARENCY_COLOR. Hooked up palette bank selector from schematics, | |
| 203 | though I am not sure if it is actually used by the code. Changed set | |
| 204 | names to match title screen, which is why baseball is spelt as | |
| 205 | "Base Ball". [Zsolt Vasvari] | |
| 206 | 214 | |
| 207 | Some minor cleanup to the equites driver, including memory map | |
| 208 | merging. [Aaron Giles] | |
| 215 | Source Changes | |
| 216 | -------------- | |
| 217 | Added a new device type for timers. Where applicable, added a parallel | |
| 218 | set of timer functions that take a device_config instead of an | |
| 219 | emu_timer. Added MDRV_TIMER_* macros to define the timers in the | |
| 220 | machine driver. Implemented both periodic and scanline-based timer | |
| 221 | variants. Modified Space Encounters and Centipede to make use of this | |
| 222 | feature. Going forward, this is the preferred way of creating periodic | |
| 223 | timers. [Zsolt Vasvari] | |
| 209 | 224 | |
| 210 | Added new option VIDEO_UPDATE_SCANLINE, which cases VIDEO_UPDATE to | |
| 211 | be called for every visible scanline. Removed manual implementation | |
| 212 | of this in timeplt, in favor of using the new flag. There are | |
| 213 | probably many more drivers that can leverage this. [Aaron Giles] | |
| 225 | Renamed *_vbl_cb to *_vblank_callback. [Aaron Giles] | |
| 214 | 226 | |
| 215 | Added stream_get_sample_rate(), stream_get_time(), and | |
| 216 | stream_get_sample_period(). These functions are not really tested yet | |
| 217 | -- make sure they give reasonable results when first used! Updated | |
| 218 | streams.h header to latest core style. [Aaron Giles] | |
| 227 | Magicfly 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. | |
| 219 | 231 | |
| 220 | Fixed reset crashes in all Z180 games. Removed the various busy loop | |
| 221 | and non-exact optimzations from the Z180 core. [Zsolt Vasvari] | |
| 232 | Funworld 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. | |
| 222 | 236 | |
| 223 | Correct colors in Birdie King 3 -- just needed a new dump. Fixed | |
| 224 | incorrect ROM names. Switched color decoding to use the resnet code. | |
| 237 | Changed exidy440_sound_command back to "UINT8." Since it's used by | |
| 238 | both 8-bit and 16-bit systems, the automatic allocation is not worth | |
| 239 | it if you need an ugly UINT16 ** cast. Removed deprecat.h from some of | |
| 240 | the exidy files. [Zsolt Vasvari] | |
| 241 | ||
| 242 | Fixed Air Buster bootleg from reseting because of the watchdog. | |
| 225 | 243 | [Zsolt Vasvari] |
| 226 | 244 | |
| 227 | Cleaned up the rockola.c driver. Fixed dip switches for all games. | |
| 228 | Added notes about the games. [stephh] | |
| 245 | The on-screen "Reset by watchdog" message only appears in debug | |
| 246 | builds now. [Zsolt Vasvari] | |
| 229 | 247 | |
| 230 | Reorganized exidy440 audio code to make it easier to eventually use | |
| 231 | the MC3417/18 emulation directly. Added MC3418 variant support to the | |
| 232 | HC55516 audio code. [Zsolt Vasvari] | |
| 248 | Fixed the top screen in the megatech games. [Zsolt Vasvari] | |
| 233 | 249 | |
| 234 | Updated williams driver to use VIDEO_UPDATE_SCANLINE (most bitmap- | |
| 235 | based drivers should.) Converted to 32bpp to catch mid-screen palette | |
| 236 | tweaks. Removed some unnecessary read/write handlers. [Aaron Giles] | |
| 250 | Added internal artwork for Gorf. [Mr. Do!] | |
| 237 | 251 | |
| 238 | Improved colors in circusc, gyruss, gotya with the resnet code. | |
| 239 | [Zsolt Vasvari] | |
| 252 | Fixed memory leak in clifront.c. [Zsolt Vasvari] | |
| 240 | 253 | |
| 241 | Significant improvements to Lock-On. Added POLL input handling to the | |
| 242 | NEC V20/V30 core. [Philip Bennett] | |
| 254 | Added a crosshair_set_screen() to allow drivers to control which | |
| 255 | screen(s) on which crosshairs are displayed. [Nathan Woods] | |
| 243 | 256 | |
| 244 | Changed debugger-related code to be based off a new makefile define | |
| 245 | (DEBUGGER) which sets a new compile-time define (ENABLE_DEBUGGER). | |
| 246 | This means that MAME_DEBUG no longer means "enable debugger", it | |
| 247 | simply enables debugging features such as assertions and debug code | |
| 248 | in drivers. Also removed the various levels of opbase protection in | |
| 249 | memory.h and always just turned on full bounds checking. [Aaron Giles] | |
| 257 | Made it a fatalerror to registr save state callbacks at the wrong time | |
| 258 | if the current driver claims to support save states. [Aaron Giles] | |
| 250 | 259 | |
| 251 | Added 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 | |
| 260 | Fixed 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. | |
| 260 | 266 | |
| 261 | Added H8/3007 & H8/3044 variants with their memory maps. Preliminary | |
| 262 | implementation 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. | |
| 263 | 271 | |
| 264 | Added 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. | |
| 265 | 278 | |
| 266 | Cleaned 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 | ||
| 272 | More opcode improvements to Risky Challenge. [robiza] | |
| 279 | Moved per-screen initialization into DEVICE_START and per-screen | |
| 280 | cleanup into DEVICE_STOP in the core video implementation. | |
| 281 | [Aaron Giles] | |
| 273 | 282 | |
| 274 | Added DIP locations to bking.c [RansAckeR] | |
| 283 | Fixed render_target_get_minimum_size() to return nominal values | |
| 284 | if no screens are found. [Aaron Giles] | |
| 275 | 285 | |
| 286 | Alpha 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 | |
| 276 | 322 | |
| 323 | Fixed crash in spbactn. [Zsolt Vasvari] | |
| 277 | 324 | |
| 278 | New games added or promoted from NOT_WORKING status | |
| 279 | --------------------------------------------------- | |
| 280 | Wheels Runner [Luca Elia] | |
| 325 | In drawgfx, removed unneeded pen lookups. Did some code formatting | |
| 326 | clean-up. [Zsolt Vasvari] | |
| 281 | 327 | |
| 328 | Fixed ninjakd2 PCM sample rate to match pcb measurement. | |
| 329 | [Nicola Salmoria] | |
| 282 | 330 | |
| 331 | Fixed chdman -extract to a physical drive on Windows. [Aaron Giles] | |
| 283 | 332 | |
| 284 | New clones added | |
| 285 | ---------------- | |
| 286 | Lock-On (rev. C) [Philip Bennett] | |
| 287 | Progressive Music Trivia (Question set 4) [Andrew Gardner] | |
| 333 | Added return value to video_screen_update_partial() indicating whether | |
| 334 | or not the VIDEO_UPDATE was called as a result. [Aaron Giles] | |
| 288 | 335 | |
| 336 | Fixed typo in pitnrun frequency. [Corrado Tomaselli] | |
| 289 | 337 | |
| 338 | DIP 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 | |
| 290 | 351 | |
| 291 | New games marked as GAME_NOT_WORKING | |
| 292 | ------------------------------------ | |
| 293 | Puzzlet (Japan) [Luca Elia] | |
| 294 | Galaxy Games BIOS [Andrew Gardner] | |
| 352 | Conerted the MPU4 driver to use an HD6845, as the Hitachi part was on the | |
| 353 | PCB, while also using it to generate the VBLANK, rather than hardcoding | |
| 354 | a value. Added the pulldown resistor to the network, and added all the | |
| 355 | conditional inputs. Please note that on the later Cabinet Types (Ready | |
| 356 | Steady Go-1 onwards), the 10p slot is locked out (location of the true | |
| 357 | register for this is unknown), but the input setting is correct - you | |
| 358 | have to use Coin 2 or higher to get money in. [James Wallace] | |
| 295 | 359 | |
| 360 | Fixed "garbage" (newlines) in the debugger window when debugging the | |
| 361 | SH-4 CPU. [Oliver Stoenberg] | |
| 296 | 362 | |
| 297 | 363 | |
| 298 | 0.122u7 | |
| 299 | ------- | |
| 300 | 364 | |
| 365 | New games added or promoted from NOT_WORKING status | |
| 366 | --------------------------------------------------- | |
| 367 | Gekisou [Nicola Salmoria] | |
| 368 | Pot Game (italian) [Roberto Fresca] | |
| 301 | 369 | |
| 302 | MAMETesters Bugs Fixed | |
| 303 | ---------------------- | |
| 304 | tylz0122u5red [Zsolt Vasvari] | |
| 305 | stadhero0122u3gre [Zsolt Vasvari] | |
| 306 | stadhero0122u3ora [Zsolt Vasvari] | |
| 307 | asterix_1055gre [couriersud] | |
| 308 | blktiger37b15gre [couriersud] | |
| 309 | newui0118u4ora [Atari Ace] | |
| 310 | mpatrol0117u2gre [Aaron Giles] | |
| 311 | realbrk0111u4gra [Brian Troha] | |
| 312 | schmisr0111u5gra [Brian Troha, partial fix] | |
| 313 | penbros0111u5gra [Brian Troha] | |
| 314 | ninjakd2_0111u3gra [Nicola Salmoria] | |
| 315 | mnight0102gre [Nicola Salmoria] | |
| 316 | toki060gre [robiza, Corrado Tomaselli] | |
| 317 | 370 | |
| 371 | New clones added | |
| 372 | ---------------- | |
| 373 | Pitfall II (315-5093, Flicky Conversion) [Corrado Tomaselli] | |
| 374 | Thunder Dragon (4th Jun. 1991) [Corrado Tomaselli] | |
| 318 | 375 | |
| 319 | 376 | |
| 320 | Source Changes | |
| 321 | -------------- | |
| 322 | Added internal divider on m680* series CPUs (except the original | |
| 323 | m6800). Updated clocks on all games using them to remove the explicit | |
| 324 | divider. [Aaron Giles] | |
| 325 | 377 | |
| 326 | Reverted experimental D3D fix, since it breaks switchres. | |
| 327 | [Aaron Giles] | |
| 378 | 0.123u5 | |
| 379 | ------- | |
| 328 | 380 | |
| 329 | dkong updates: [couriersud] | |
| 330 | * fix dkong sound following Clock Divider update | |
| 331 | * updated to use XTAL_* | |
| 332 | * revert a change after sound regression in dkong. | |
| 333 | 381 | |
| 334 | i8085.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 | |
| 382 | MAMETesters Bugs Fixed | |
| 383 | ---------------------- | |
| 384 | 01216 [Tomasz Slanina] | |
| 385 | 00898 [couriersud] | |
| 386 | 01436 [Aaron Giles] | |
| 387 | 01480 [robiza] | |
| 388 | 01482 [Zsolt Vasvari] | |
| 389 | 01429 [RansAckeR] | |
| 390 | 00593 [RansAckeR] | |
| 391 | 01478 [RansAckeR] | |
| 339 | 392 | |
| 340 | Space 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 | |
| 344 | 393 | |
| 345 | phoenix.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 | |
| 352 | 394 | |
| 353 | pleiads updates: [couriersud] | |
| 354 | * video timing from schematics | |
| 355 | * palette from schematics (resnet.h) | |
| 356 | * no more colortable | |
| 395 | Source Changes | |
| 396 | -------------- | |
| 397 | Fixed flickering in Electric Yo-Yo. Changed qix driver to use the | |
| 398 | MC6845's VSYNC notification for interrupts. [Zsolt Vasvari] | |
| 357 | 399 | |
| 358 | survival updates: [couriersud] | |
| 359 | * palette from schematics (resnet.h) | |
| 400 | Removed machine from the parameters of some of the device_get_info | |
| 401 | and device_set_info calls because that information is stored | |
| 402 | with the device now. [Aaron Giles] | |
| 360 | 403 | |
| 361 | Removed bogus (bad) dump of Heated Barrel US set 2. [Brian Troha] | |
| 404 | Changed device interfaces to pass the device_config * rather | |
| 405 | than tokens and individual bits to the device callbacks. Updated | |
| 406 | all existing devices accordingly. [Aaron Giles] | |
| 362 | 407 | |
| 363 | RSP 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 | ||
| 372 | Removed all palette_X_r functions in favor of direct RAM reads. | |
| 408 | A number of changes to remove references to screens by index and | |
| 409 | make the video system based strictly upon the screen devices: | |
| 373 | 410 | [Zsolt Vasvari] |
| 374 | 411 | |
| 375 | Removed no longer applicable assert from VIDEO_START(generic). Removed | |
| 376 | VIDEO_START(generic) from drivers that didn't need it. Removed | |
| 377 | MDRV_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 | ||
| 448 | Changed the MC6845 to take and pass device_config's only. The | |
| 449 | following shook out from this that are applicable to other devices | |
| 450 | as 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. | |
| 379 | 456 | |
| 380 | Made detection of dynamic attempts to install ROM/RAM handlers more | |
| 381 | aggressive. Previous checks would not catch modifications in | |
| 382 | DRIVER_INIT or MACHINE_START calls. Fixed a number of cases of | |
| 383 | incorrect usage throughout the drivers. [Aaron Giles] | |
| 457 | Removed video_data from running_machine. Private state screen | |
| 458 | information now hangs off the public one, instead of the other way | |
| 459 | around. Combined video_global and video_private into a single | |
| 460 | structure. [Zsolt Vasvari] | |
| 384 | 461 | |
| 385 | Changed one of the cheat calls back to using more generic switch | |
| 386 | detection so they can be triggered via joysticks. [Aaron Giles] | |
| 462 | Fixed the crash in Galaga caused by the slightly altered video timing. | |
| 463 | [Zsolt Vasvari] | |
| 387 | 464 | |
| 388 | Renamed sauro.c sp0256 internal rom to "sp0256-al2.bin". | |
| 389 | Removed BAD_DUMP flag from it as well. [couriersud] | |
| 465 | Converted address maps to tokens. Changed the address_map structure | |
| 466 | to house global map-wide information and hung a list of entries off | |
| 467 | of it corresponding to each address range. Introduced new functions | |
| 468 | address_map_alloc() and address_map_free() to build/destroy these | |
| 469 | structures. Updated all code as necessary. [Aaron Giles] | |
| 390 | 470 | |
| 391 | Marked HD6309 as divide-by-4 internally. Updated drivers accordingly. | |
| 392 | [Aaron Giles] | |
| 471 | Fixed several instances of porttagtohandler*() in the address maps. | |
| 472 | Drivers should use AM_READ_PORT() macros instead. [Aaron Giles] | |
| 393 | 473 | |
| 394 | Major 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 | |
| 474 | ADDRESS_MAP_EXTERN() now is required to specify the number of | |
| 475 | databits, just like ADDRESS_MAP_START. [Aaron Giles] | |
| 399 | 476 | |
| 400 | blktiger.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 | |
| 477 | Removed ADDRESS_MAP_FLAGS() grossness. There are now three new macros | |
| 478 | which replace its former usage. ADDRESS_MAP_GLOBAL_MASK(mask) | |
| 479 | specifies a global address-space-wide mask on all addresses. Useful | |
| 480 | for cases where one or more address lines simply are not used at | |
| 481 | all. And ADDRESS_MAP_UNMAP_LOW/HIGH specifies the behavior of | |
| 482 | unmapped reads (do they come back as 0 or ~0). [Aaron Giles] | |
| 405 | 483 | |
| 406 | Added all known variants of the tms5110 as proper chips. Updated | |
| 407 | dkong, cvs and scramble to use new chips. [couriersud] | |
| 484 | Changed internal memory mapping behavior to keep only a single | |
| 485 | address map and store the byte-adjusted values next in the address | |
| 486 | map entries rather than maintaining two separate maps. Many other | |
| 487 | small internal changes/cleanups. [Aaron Giles] | |
| 408 | 488 | |
| 409 | Converted atarifb.c to tilemaps. [Zsolt Vasvari] | |
| 489 | Changed MC6845 to take a screen tag instead of a screen number. | |
| 490 | [Zsolt Vasvari] | |
| 410 | 491 | |
| 411 | Switched namcos11/namcos12 over to memory_configure_bank / | |
| 412 | memory_set_bank. Simplified golgo 13 gun reading. [smf] | |
| 492 | Voodoo now takes a device_config for the screen. [Zsolt Vasvari] | |
| 413 | 493 | |
| 414 | mpatrol 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 | |
| 494 | Changed TMS34010 to take a screen tag instead of screen number. | |
| 495 | [Zsolt Vasvari] | |
| 421 | 496 | |
| 422 | ||
| 497 | R | |
| 423 | 498 | |
| 424 | Preserve fractional part of sample offset when looping in SCSP. Fixes | |
| 425 | remaining pitch stability problems. Fixed minor issue with timers | |
| 426 | B&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 | |
| 427 | 504 | |
| 428 | auto_malloc() once again actually fails when out of memory. | |
| 429 | [Aaron Giles] | |
| 505 | This removes the silly need for a bunch of redundant constants | |
| 506 | with faux type definitions that didn't buy anything. [Aaron Giles] | |
| 430 | 507 | |
| 431 | ||
| 508 | Mov | |
| 432 | 509 | |
| 433 | mario.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 | |
| 510 | Converted atarigen and tms34061 to be handle based. [Zsolt Vasvari] | |
| 437 | 511 | |
| 438 | Added dip locations to Real Break. Filled in a couple of dips for the | |
| 439 | Pachinko Gindama Shoubu games. [Brian Troha] | |
| 512 | Changed how the PowerPC MMU is enabled at compile time, to cut down | |
| 513 | on the amount of unused functions in MAME. [Nathan Woods] | |
| 440 | 514 | |
| 441 | Fixed invalid memory_install_*_handler calls in drivers/williams.c. | |
| 442 | Emulated external OR circuit for all drivers using the PIA chip. This | |
| 443 | used to be internal to the PIA emulation, but, in fact, this is | |
| 444 | external logic. The PIA has two seperate INTA and INTB out lines. | |
| 445 | This fixes at least PlayBall. [Zsolt Vasvari] | |
| 515 | Some 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. | |
| 446 | 524 | |
| 447 | Added the ability to the HC55516 emulator to take an external | |
| 448 | osciallator. Updated Mouse Trap to use the new interface. | |
| 525 | Adds some new 6845 varieties: MC6845-1, H46505, HD6845 and SY6545-1. | |
| 449 | 526 | [Zsolt Vasvari] |
| 450 | 527 | |
| 451 | Cleaned up and merged ninjakd2, mnight and omegaf drivers into a | |
| 452 | single 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. | |
| 528 | Moved crosshair code from video.c into its own module. Simplified | |
| 529 | crosshair logic and made it screen device based. [Zsolt Vasvari] | |
| 477 | 530 | |
| 478 | Added MDRV_SOUND_ROUTE_EX to specify target input channel. Added | |
| 479 | input id to route struct. Fixed DISCRETE_INPUT_STREAM and added input | |
| 480 | channel # to DISCRETE_INPUT_STREAM. [couriersud] | |
| 531 | Saturate MultiPCM on clip and fix envelope discontinuity. [ElSemi] | |
| 481 | 532 | |
| 482 | Fixed default debugger memory view width for CPUs with >byte-sized | |
| 483 | minimum. Made menu updating dynamic at click time, fixing issues with | |
| 484 | incorrect checkmarks. [Aaron Giles] | |
| 533 | Fixed loading mixer settings when the driver default value is | |
| 534 | calculated. [Nicola Salmoria] | |
| 485 | 535 | |
| 486 | Fixed Ninja Kuna. Cleaned up memory maps. Renamed files to ninjakun.c. | |
| 487 | [Zsolt Vasvari] | |
| 536 | Removed cpu_scalebyfcount(). Changed input ports to register a frame | |
| 537 | callback, which is called immediately after throttling and updating. | |
| 538 | This is the proper "sync point" between emulated time and real time. | |
| 539 | Moved all analog and digital port processing into a central place | |
| 540 | here. Added tracking of time since the previous frame update and use | |
| 541 | that as an estimate for the time of the current frame. This is used | |
| 542 | to scale analog ports without the use of cpu_scalebyfcount(). This | |
| 543 | is not perfect in the case where frame rates are dynamic (vector | |
| 544 | games), but works well for other cases. [Aaron Giles] | |
| 488 | 545 | |
| 489 | Added MC3417 and MC3418 variants to the HC55516 sound emulation. | |
| 490 | Changed Mouse Trap to use MC3417. [Zsolt Vasvari] | |
| 546 | Fixed VBLANK end time computation and video_screen_get_vblank() -- | |
| 547 | they weren't taking into account games that use | |
| 548 | MDRV_SCREEN_VBLANK_TIME. [Zsolt Vasvari] | |
| 491 | 549 | |
| 492 | Fixed saving i8085 callbacks across a reset. Added 'pull' callback for | |
| 493 | the SID pin. This is needed by the Red Alert voice board. | |
| 494 | [Zsolt Vasvari] | |
| 495 | ||
| 496 | Made the text displayed by the various UI sliders more intelligent. | |
| 497 | Basically, it will only print an index for an item if there are | |
| 498 | multiple of a given type. [Zsolt Vasvari] | |
| 499 | ||
| 500 | Updated jailbrek clocks and video timing based on measurements. | |
| 550 | Fixed 68000 prefetching operation. Previous behavior was incorrect. | |
| 501 | 551 | [Aaron Giles] |
| 502 | 552 | |
| 503 | Fixed i8051 timers from firing when not enabled. Checking TCON alone | |
| 504 | is not enough to invoke timers. Added IE SFR flags in conditional. | |
| 505 | [Jim Stolis] | |
| 553 | Changed slapstic management to always install an opbase handler to | |
| 554 | more aggressively catch code executing in the slapstic region. | |
| 555 | Updated all drivers to separate the slapstic region of ROM into a | |
| 556 | different ROM section from the fixed ROM. [Aaron Giles] | |
| 506 | 557 | |
| 507 | Added a _CALL variant to all prototype macros. The use of these | |
| 508 | should make it easier to change the signiture of these functions in | |
| 509 | the future. Replaced existing calls with macro where appropriate. | |
| 510 | [Zsolt Vasvari] | |
| 558 | superqix.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. | |
| 511 | 562 | |
| 512 | Removed VIDEO_START_CALL(generic) from all drivers not needing it, | |
| 513 | which were all of them. Removed VIDEO_START_CALL(generic_bitmapped) | |
| 514 | from jpmimpct. [Zsolt Vasvari] | |
| 563 | Added some clock frequency changes which were documented in u4 but | |
| 564 | which did not apply due to operator error. [Corrado Tomaselli] | |
| 515 | 565 | |
| 516 | Changed YM2203 clock in stfight to 3MHz (compared against OST) | |
| 517 | [Yasuhiro Ogawa] | |
| 566 | Added layout to crop corners in Electric Yo-Yo. [Mr. Do!] | |
| 518 | 567 | |
| 519 | Improved linear zoom effect resolution to address gaps in CPS3 | |
| 520 | rendering. [OopsWare] | |
| 568 | Added support for Sega Virtua Processor, to run Genesis/MegaDrive | |
| 569 | version of Virtua Racing, intended to be used by MESS. It consists | |
| 570 | of 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. | |
| 521 | 576 | |
| 522 | Rewrote 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. | |
| 577 | Phase 2 of the Deal 'Em input changes (these work well with the | |
| 578 | default cabinet type, I need to do some conditional input work | |
| 579 | to fix them fully), and also a conversion to the resnet code. | |
| 580 | Unfortunately, this still doesn't fix the apparently needed | |
| 581 | transparency. [James Wallace] | |
| 532 | 582 | |
| 533 | Added all the known Naomi BIOS dumps along with descriptions and | |
| 534 | information about region bytes & version numbers. [Brian Troha] | |
| 583 | Simplified inputs, improved DIP switches, and added DIP locations | |
| 584 | to punchout.c, bankp.c, and baraduke.c. [RansAckeR] | |
| 535 | 585 | |
| 536 | Removed the freely distributable Exidy games' dependency on Berzerk. | |
| 537 | [Zsolt Vasvari] | |
| 586 | In asuka.c, created MACHINE_START( asuka ) to configure cpu2 banks | |
| 587 | with memory_configure_bank(). All drivers support save states, with | |
| 588 | the exception of cadash and clones, the background does not load | |
| 589 | properly. [Mike Haaland] | |
| 538 | 590 | |
| 539 | ||
| 591 | Fixed M68000 build | |
| 540 | 592 | |
| 541 | Verified DIP locations from manuals for scramble and 800fath. | |
| 542 | [RansAckeR] | |
| 543 | 593 | |
| 544 | Changed S14001A emulator to allow setting the clock frequency instead | |
| 545 | of the clock multiplier. This is how the real chip works. Changed the | |
| 546 | Berzerk driver to set the S14001A clock as per the schematics. | |
| 547 | [Zsolt Vasvari] | |
| 548 | 594 | |
| 549 | Removed the use of the global Machine from a number of places in the | |
| 550 | code. [Zsolt Vasvari] | |
| 595 | New games added or promoted from NOT_WORKING status | |
| 596 | --------------------------------------------------- | |
| 597 | Amuse (Version 50.08 IBA) [Pierpaolo Prazzoli] | |
| 598 | Joker Poker (Version 16.03B) [Pierpaolo Prazzoli] | |
| 599 | Super Bowl (Version 16.03B) [Pierpaolo Prazzoli] | |
| 600 | Pit Boss II [Mariusz Wojcieszek] | |
| 601 | Super Pit Boss [Mariusz Wojcieszek] | |
| 602 | Pit Boss Megastar [Mariusz Wojcieszek] | |
| 603 | Megatouch IV [Mariusz Wojcieszek] | |
| 604 | Megatouch IV Tournament Edition [Mariusz Wojcieszek] | |
| 605 | Megatouch 6 [Mariusz Wojcieszek] | |
| 551 | 606 | |
| 552 | Fixed issues flagged by MSVC warning C4305 (type truncation). Almost | |
| 553 | all of these are harmless double->float narrowing in initializers, but | |
| 554 | one warning spotlighted a bug in segasyse.c, where code to use a | |
| 555 | higher sprite number had no effect due to the insufficient range of | |
| 556 | UINT8. [Atari Ace] | |
| 557 | 607 | |
| 558 | Removed /wd4550 for VS7/VS71 compilers (expression evaluates to a | |
| 559 | function which is missing an argument list). Fixed some VS7-specific | |
| 560 | issues (OPTIMIZE=0 at least compiles now). [Atari Ace] | |
| 561 | 608 | |
| 562 | Added a missing case statement in sm8500d.c, noticed while reviewing | |
| 563 | dead code warnings. [Atari Ace] | |
| 564 | ||
| 565 | Corrected Diet gogo h6280 clock so that it behaves correctly with | |
| 566 | Charles Macdonald fix to the cpu core. Verified and corrected | |
| 567 | frequencies and pin 7 okim6295 on the following games: | |
| 568 | The new zealand story (3 z80 version), Trio The punch, Vandyke, | |
| 569 | paradise.c games, Downtown, Shaolin's Road and Twins. | |
| 570 | [Corrado Tomaselli] | |
| 571 | ||
| 572 | Removed all peplus memory hacks and game specific DRIVER_INIT. There | |
| 573 | are now just two DRIVER_INIT, one for normal boards and one for | |
| 574 | superboards. Temporarily disabled AutoHold Cheat but documented | |
| 575 | addresses for future update. [Jim Stolis] | |
| 576 | ||
| 577 | Added further unencrypted opcodes to risky challenge. The game now | |
| 578 | boots with the intro animation. [robiza] | |
| 579 | ||
| 580 | ||
| 581 | ||
| 582 | 609 | New clones added |
| 583 | 610 | ---------------- |
| 584 | Jokers Wild Poker (PP0065) [Jim Stolis] | |
| 585 | Double Down Stud Poker (PP0250) [Jim Stolis] | |
| 586 | Standard Draw Poker (PP0447) [Jim Stolis] | |
| 587 | Night Stocker (set 2) [Andrew Gardner] | |
| 588 | Trivial Pursuit (Genus I) (set 2) [Andrew Gardner] | |
| 611 | Raiden Fighters (Austria) [Corrado Tomaselli] | |
| 589 | 612 | |
| 590 | 613 | |
| 591 | 614 | |
| 592 | 0.12 | |
| 615 | 0.123u4 | |
| 593 | 616 | ------- |
| 594 | 617 | |
| 595 | 618 | |
| 596 | 619 | MAMETesters Bugs Fixed |
| 597 | 620 | ---------------------- |
| 598 | pangpoms098u3ora [Brian Troha] | |
| 599 | cuebrckj0102u5gre [Zsolt Vasvari] | |
| 600 | astinvad0106u11gre [Aaron Giles] | |
| 601 | victory137b4gre [Zsolt Vasvari] | |
| 602 | victory37b16gre [Zsolt Vasvari] | |
| 603 | dcs057ora [Aaron Giles] | |
| 604 | pleiads0111u4gre [Robbert] | |
| 605 | armwrest35b9yel [David Haywood] | |
| 606 | gstrik20105u4gra [Brian Troha] | |
| 607 | narc060gra [Aaron Giles] | |
| 608 | mia0106u5gra [RansAckeR] | |
| 609 | nss_smw0115ora [Atari Ace] | |
| 610 | darkplnt0119u3yel [Atari Ace] | |
| 611 | mhhonban0120u3gra [RansAckeR] | |
| 612 | rollerg0111u5gra [RansAckeR] | |
| 613 | bionicc0109ora [RansAckeR] | |
| 614 | lcasino0111ora [RansAckeR] | |
| 615 | megaplay.c0122u4red [Atari Ace] | |
| 616 | nmnlnd0122u3yel [Mamesick] | |
| 617 | cocktail0119yel [Robbert] | |
| 618 | tokisens0122u3gra [RansAckeR] | |
| 619 | alleymas0119u3gre [RansAckeR] | |
| 620 | crbaloon36finalgre [Zsolt Vasvari] | |
| 621 | topsecrt0109gre2 [Bryan McPhail] | |
| 622 | quasar0122u5red [Zsolt Vasvari] | |
| 623 | stadhero0122u3gra [RansAckeR] | |
| 621 | 00817 [RansAckeR] | |
| 624 | 622 | |
| 625 | 623 | |
| 626 | 624 | |
| 627 | 625 | Source Changes |
| 628 | 626 | -------------- |
| 629 | Swinging 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 | |
| 627 | MC6845 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 | ||
| 642 | Updated the "Input (This Game)" menu to support conditional inputs. | |
| 643 | [stephh] | |
| 635 | 644 | |
| 636 | Lowerd FPS in lasso.c to avoid corrupting Chameleon's high score | |
| 637 | table. [Zsolt Vasvari] | |
| 645 | Converted Amiga based games to partial updating and proper scanline | |
| 646 | based timers. [Zsolt Vasvari] | |
| 638 | 647 | |
| 639 | Removed obsolete uitext.c and all references to it. [Aaron Giles] | |
| 648 | Beginning of the clean-up of Space Guerilla - fixed rotation, some | |
| 649 | other stuff. [Zsolt Vasvari] | |
| 640 | 650 | |
| 641 | ||
| 651 | R | |
| 642 | 652 | |
| 643 | Added VIDEO_ALWAYS_UPDATED for reliable collision detection in the | |
| 644 | CVS driver. [Zsolt Vasvari] | |
| 653 | Replaced mame_bitmap with direct use of bitmap_t. Removed mame_bitmap | |
| 654 | typedef. [Zsolt Vasvari] | |
| 645 | 655 | |
| 646 | Cleaned up astinvad driver: [Aaron Giles] | |
| 647 | * Proper video timing | |
| 648 | * Hooked up 8255 PPIs | |
| 649 | * Correct interrupt timing | |
| 650 | * Consolidated code into single file | |
| 656 | Fixed taitoic regression that caused crashes in several games. | |
| 657 | [Zsolt Vasvari] | |
| 651 | 658 | |
| 652 | i8039.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 | |
| 659 | Changed 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 | |
| 663 | 668 | |
| 664 | sauro.c: [couriersud] | |
| 665 | * revert promsize to 256 for trckydoc | |
| 669 | Fixed SH4 refresh ticks value of 0, makes awbios not blow up the | |
| 670 | timer system. [R. Belmont] | |
| 666 | 671 | |
| 667 | Added XTAL clocks to zaxxon.c. [Aaron Giles] | |
| 672 | Updated dkong driver to use two discrete structs which were previously | |
| 673 | not being used: [couriersud] | |
| 674 | * dkong walk using a jump struct | |
| 675 | * radarscp using a dkong 555 struct | |
| 668 | 676 | |
| 669 | Cleaned 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 | |
| 677 | MACHINE_DRIVER_EXTERN now requires a semicolon. Removed a number of | |
| 678 | extra semicolons. [couriersud] | |
| 676 | 679 | |
| 677 | Consolidated exidy and victory drivers. Removed complicated dirty | |
| 678 | tracking from victory.c. Reorganized the exidy audio hardware code. | |
| 679 | Changed Targ to use a loaded PROM instead of a hard-coded one. Renamed | |
| 680 | Side Trak to Side Track as per the title screen. [Zsolt Vasvari] | |
| 680 | In 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 | |
| 681 | 683 | |
| 682 | 6821 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 | |
| 684 | Identified code not used and marked with "#ifdef UNUSED_FUNCTION". | |
| 685 | [couriersud] | |
| 688 | 686 | |
| 689 | Disabled code in the TMS5220 that set the Buffer Empty flag after a | |
| 690 | stop frame. This fixes Victory. This might be the incorrect fix but | |
| 691 | the old code wasn't working either. [Zsolt Vasvari] | |
| 687 | Naomi: Use defines instead of magic numbers for IRQ sources, add | |
| 688 | VBL-out. [R. Belmont] | |
| 692 | 689 | |
| 693 | Hooked up revx dcs reset line. Signaled IRQ on correct CPU when DCS | |
| 694 | sends data back (duh). [Aaron Giles] | |
| 690 | Improved (not perfect) ACIA slot monitoring. [kingshriek] | |
| 695 | 691 | |
| 696 | Removed unnecessary check that could cause SCSP hangs in grdforce. | |
| 697 | [kingshriek] | |
| 692 | Changed parent/clone relationship to separate SSI Poker sets from | |
| 693 | Jackpot Joker Poker. [Roberto Fresca] | |
| 698 | 694 | |
| 699 | Tweaked deco156 clock speed to be 28 to prevent the games from running | |
| 700 | in slow motion. I suspect the 156 chip has an internal multiplier, the | |
| 701 | usual input pin is 7Mhz IIRC. [David Haywood] | |
| 695 | Removed a couple of unused items from the cpuexec_data structure. | |
| 696 | Added validity check that screenless drivers cannot have a VBLANK | |
| 697 | interrupt. [Zsolt Vasvari] | |
| 702 | 698 | |
| 703 | dkong.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 | |
| 699 | Added macros to define device functions. Updated existing devices | |
| 700 | to use the macros. [Aaron Giles] | |
| 710 | 701 | |
| 711 | Adds dips for Water Balls. Adds dip port locations to all dips. | |
| 712 | [Brian Troha] | |
| 702 | Added the concept of device classes. Devices specify their class | |
| 703 | in their get_info function. Classes can be used to walk through | |
| 704 | devices at a more general level than their type. Functions have | |
| 705 | been added to iterate through devices by class just as you can | |
| 706 | by type. [Aaron Giles] | |
| 713 | 707 | |
| 714 | Added CPUINFO_INT_CLOCK_MULTIPLIER to support CPU clock multipliers. | |
| 715 | Updated all CPU cores to return a CPUINFO_INT_CLOCK_MULTIPLIER of 1. | |
| 716 | Changed the core to actually respect both CPUINFO_INT_CLOCK_MULTIPLIER | |
| 717 | and CPUINFO_INT_CLOCK_DIVIDER. Updated a number of drivers to use | |
| 718 | cpunum_get_clock() instead of Machine->drv->cpu[x].clock. Raw input | |
| 719 | clock speeds should now be specified for all CPUs in the | |
| 720 | MACHINE_DRIVER. [Aaron Giles] | |
| 708 | Removed some unused fields from device_config. [Aaron Giles] | |
| 721 | 709 | |
| 722 | Changed TLC43076 and games using it to RGB32. Removed global Machine | |
| 723 | variable where possible. [Zsolt Vasvari] | |
| 710 | Moved all video timing logic from cpuexec.c to video.c. Added a | |
| 711 | video_screen_register_vbl_cb() function for registering VBLANK | |
| 712 | callbanks. Changed inptport.c and debugcpu.c to make use the VBLANK | |
| 713 | callbacks. Added video_screen_get_time_until_vblank_start(). I did | |
| 714 | some fairly extensive testing, but this is a very signficant internal | |
| 715 | change, so some things may have broke. [Zsolt Vasvari] | |
| 724 | 716 | |
| 725 | Removed dirtybuffer from video/generic.c and all drivers still using | |
| 726 | it. Good riddance... Removed videoram_w, colorram_w and spriteram_w | |
| 727 | and changed all drivers using it to access RAM directly. Removed | |
| 728 | videoram_r, colorram_r, spriteram_r, spriteram16_r and spriteram16_w | |
| 729 | from video/generic.c and changed all games to use (possibly shared) | |
| 730 | RAM. [Zsolt Vasvari] | |
| 717 | Removed use of cpu_scalebyfcount() from CVS driver. [Zsolt Vasvari] | |
| 731 | 718 | |
| 732 | Cleaned up memory maps in the seibu sound interfaces. Changed to use | |
| 733 | shared sound configs instead of statically copying them in each | |
| 734 | driver. [Aaron Giles] | |
| 719 | Changed a number of global functions to being static. [couriersud] | |
| 735 | 720 | |
| 736 | Verified and changed cpu frequencies and oki m6295 pin 7 on the | |
| 737 | following pcbs: Asuka&Asuka, Cadash, Equites h/w games and sound | |
| 738 | board, F1GP, Super Formula, Gladiator, Ping Pong king, Great | |
| 739 | Swordsman, Irem m52 sound board, Tropical Angel, Explosive Breakers, | |
| 740 | Magical Crystal, Mad Gear, Roller Aces, Chinese Hero, Simpsons, | |
| 741 | Golfing Greats, Time Pilot 84. [Corrado Tomaselli] | |
| 721 | Rewrote 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 | |
| 742 | 726 | |
| 743 | Added some more static qualifiers on recent new/changed code. | |
| 744 | [Atari Ace] | |
| 727 | Removed cpu_getcurrentframe() and replaced it with | |
| 728 | video_screen_get_frame_number(int scrnum). Updated all callers. | |
| 729 | [Zsolt Vasvari] | |
| 745 | 730 | |
| 746 | ||
| 731 | Moved watchdog processing logic | |
| 747 | 732 | |
| 748 | Fixed HuC6280 low-speed mode so it uses 4 cycles instead of 3. | |
| 749 | [Charles MacDonald] | |
| 733 | Replaced sprite multiplexing hack in tp84.c with | |
| 734 | video_screen_update_now() on sprite RAM write. General driver | |
| 735 | clean-up. [Zsolt Vasvari] | |
| 750 | 736 | |
| 751 | Hand fixed Road Runner's corrupted ROM. We are 99.99% sure that the | |
| 752 | bad bytes are the same as the Desert Gun ones. [Zsolt Vasvari] | |
| 737 | Gyruss: Tilemap conversion, sprite multiplexing done properly, driver | |
| 738 | clean-up. [Zsolt Vasvari] | |
| 753 | 739 | |
| 754 | Cleaned up leland clocks a little. Made the i186 divide-by-2 clock | |
| 755 | internal. [Aaron Giles] | |
| 740 | Changed z80dma to new device interface, updated mario.c and dkong.c | |
| 741 | to use new interface. Illustrates how to keep existing memory | |
| 742 | read/write handlers. This is slower than caching the device interface, | |
| 743 | but does not have an impact on devices accessed at a low frequency | |
| 744 | like in this case. [couriersud] | |
| 756 | 745 | |
| 757 | Added clocks to the MCR sound boards and some of the MCR games. Added | |
| 758 | TMS5220 variants TMS5200 and TMC0285 as proper chips. Changed MCR | |
| 759 | squawk & talk to use the TMS5200 as documented. [Aaron Giles] | |
| 746 | Added video_screen_get_time_until_vblank_end() and | |
| 747 | video_screen_get_time_until_update(). [Aaron Giles] | |
| 760 | 748 | |
| 761 | Cleaned up Crazy Baloon driver: proper memory maps, crystals, etc. | |
| 762 | Implemented the missing features of the collision detector custom IC. | |
| 749 | Fixed CCPU and QB3 to no longer rely on cpu_scalebyfcount(). Fixed | |
| 750 | busted timing in the CCPU core. Changed watchdog to count internally | |
| 751 | rather than using external watchdog support. Altered CCPU to accept | |
| 752 | interrupt signals from the driver. Updated clocks in the cinemat | |
| 753 | driver to be derived from the clock crystal. [Aaron Giles] | |
| 754 | ||
| 755 | Normalized function pointer typedefs: they are now all | |
| 756 | suffixed with _func. Did this throughout the core and | |
| 757 | drivers I was familiar with. [Aaron Giles] | |
| 758 | ||
| 759 | Added PORT_CHANGED macro which calls a callback if the given port | |
| 760 | changes. Usage is very similar to PORT_CUSTOM. See the Astro Invader | |
| 761 | driver for an example. [Zsolt Vasvari] | |
| 762 | ||
| 763 | Removed input_port_set_changed_callback and converted all users to | |
| 764 | PORT_CHANGED. The only difference between the old callback and the | |
| 765 | ones supplied by PORT_CHANGED is that values passed by PORT_CHANGED | |
| 766 | are normalized to start at bit 0, just like PORT_CUSTOM. | |
| 763 | 767 | [Zsolt Vasvari] |
| 764 | 768 | |
| 765 | First pass at fixing the cpu clock speeds on the playstation based | |
| 766 | hardware. The system 10 & 12 clock speeds have been raised as they | |
| 767 | run on an upgraded chipset. The internal divide in the CPU core has | |
| 768 | been set to 4 as we have no wait states, incorrect dma timing, | |
| 769 | no gpu timing, no dma bus stealing and no gte timing. [smf] | |
| 769 | Added running_machine* to the CUSTOM_INPUT callback - updated drivers | |
| 770 | to use it. [Zsolt Vasvari] | |
| 770 | 771 | |
| 771 | Fixed RET instruction on the i960 core. [Ernesto Corvi, ElSemi] | |
| 772 | Updated brkthru.c, btime.c, exerion.c, fcombat.c, astrof.c, | |
| 773 | cheekyms.c, cinemat.c to use PORT_CHANGED. Combined memory maps where | |
| 774 | applicable. Converted cheekyms.c to use tilemaps. [Zsolt Vasvari] | |
| 772 | 775 | |
| 773 | Removed speedups in the gstream and limenko drivers which were | |
| 774 | breaking the games. [David Haywood] | |
| 776 | Merged memory maps for drivers X->Z. [Andrew Gardner] | |
| 775 | 777 | |
| 776 | Fixed regression on i8039 T1 counter mode. [couriersud] | |
| 778 | Exidy440: modernized input port handling with CUSTOM_INPUT and | |
| 779 | INPUT_CHANGED. Cleaned-up special case handling. Created better | |
| 780 | separation between driver and video code. [Zsolt Vasvari] | |
| 777 | 781 | |
| 778 | Added CUSTOM_INPUT macro for defining input port callbacks. Pushed | |
| 779 | its usage throughout the code. [Aaron Giles] | |
| 782 | Verified clocks and oki pin7 for Peek-a-boo. [Mike Ellery] | |
| 780 | 783 | |
| 781 | phoenix and clones: [couriersud] | |
| 782 | * video timing from schematics | |
| 783 | * palette from schematics (resnet.h) | |
| 784 | * no more colortable | |
| 785 | * added save state | |
| 784 | Untangled the Fire Truck driver. Many uses of PORT_CUSTOM and | |
| 785 | PORT_CHANGED, including another good use case for the gear shift | |
| 786 | logic. [Zsolt Vasvari] | |
| 786 | 787 | |
| 787 | Minor RSP fixes: [SGINut] | |
| 788 | - Fixed accumulator state on powerup by testing against real hardware | |
| 789 | - Fixed single-step behavior by testing against real hardware | |
| 788 | Updated ladybug.c, lasso.c, m10.c, madalien.c, maxaflex.c to use | |
| 789 | PORT_CHANGED for coinage. [Zsolt Vasvari] | |
| 790 | 790 | |
| 791 | Added save state support to atetris.c. [Svante Gerhard] | |
| 791 | Added running_machine * parameter to the front of all read/write | |
| 792 | handlers. Updated all call-through handlers appropriately. Renamed | |
| 793 | read8_handler to read8_machine_func, replicating this pattern | |
| 794 | throughout. [Aaron Giles] | |
| 792 | 795 | |
| 793 | Fixed up atetris memory maps and clocks according to schematics. | |
| 796 | Defined new set of memory handler functions which are similar but | |
| 797 | which pass a const device_config * in place of the running_machine *. | |
| 798 | These are called read8_device_func, etc. Added macros | |
| 799 | READ8_DEVICE_HANDLER() for specifying functions of this type. | |
| 794 | 800 | [Aaron Giles] |
| 795 | 801 | |
| 796 | Added targ and spectar to TinyMAME. [neoforma] | |
| 802 | Added running_machine * to the device_config, live while the device | |
| 803 | is live, and NULL otherwise, just like the token. [Aaron Giles] | |
| 797 | 804 | |
| 805 | Meadows 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 | |
| 798 | 811 | |
| 812 | Fixed sprite colors in Exerion. [Zsolt Vasvari] | |
| 799 | 813 | |
| 800 | New games added or promoted from NOT_WORKING status | |
| 801 | --------------------------------------------------- | |
| 802 | Ripper Ribbit [Aaron Giles] | |
| 803 | Chicken Farm [Aaron Giles] | |
| 804 | Crazzy Clownz [Aaron Giles] | |
| 805 | Space Fighter Mark II [Zsolt Vasvari, Guru] | |
| 814 | Added new macros AM_DEVREAD, AM_DEVWRITE, and AM_DEVREADWRITE, | |
| 815 | which specify device read/write handlers in address maps, along | |
| 816 | with the type/tag of the device they reference. [Aaron Giles] | |
| 806 | 817 | |
| 818 | Converted MC6845 read/write handlers to READ/WRITE8_DEVICE_HANDLERs. | |
| 819 | Updated all MC6845-using drivers to use the new macros and call | |
| 820 | the updated functions. Removed the many little helper functions | |
| 821 | that used to do this work. [Aaron Giles] | |
| 807 | 822 | |
| 823 | Added validity checks to ensure that the devices referenced | |
| 824 | actually exist. [Aaron Giles] | |
| 808 | 825 | |
| 809 | New clones added | |
| 810 | ---------------- | |
| 811 | Heated Barrel (US set 2) [Corrado Tomaselli] | |
| 812 | Player's Edge Plus (XMP00006) Multi-Poker [Jim Stolis] | |
| 826 | Fixed display of screen information so that it shows live information, | |
| 827 | not just the original configurations. [SailorSat] | |
| 813 | 828 | |
| 829 | Improved DIP switch definitions, added DIP locations, and simplified | |
| 830 | input ports in atarisy2.c, atetris.c, avalnche.c, bagman.c, | |
| 831 | balsente.c, lasso.c, seta.c. [RasnAckeR] | |
| 814 | 832 | |
| 833 | Added DIPs and locations to onetwo.c. [Sonikos] | |
| 815 | 834 | |
| 816 | New games marked as GAME_NOT_WORKING | |
| 817 | ------------------------------------ | |
| 818 | International Toote (Germany) [Luca Elia] | |
| 819 | Dodge City [Roberto Fresca] | |
| 835 | Corrected some glitches and fixed bank reading in Deal'Em. | |
| 836 | [James Wallace] | |
| 820 | 837 | |
| 838 | Changed/verified clocks on the following pcbs: 1943, Arkanoid, Action | |
| 839 | Holliwood GalsPanic, Ben Bero Beh, 1000 Miglia, Pit and Run, | |
| 840 | Prehistoric Isle, Rastan, Hotmind, Hardtimes, Stagger1 and | |
| 841 | Tiger Road. [Corrado Tomaselli] | |
| 821 | 842 | |
| 843 | Changed/verified Oki pin 7 on the following pcbs: 1000 miglia, | |
| 844 | Galspanic, Action Holliwood, Hotmind, HardTimes, World Rally, | |
| 845 | Stagger1. [Corrado Tomaselli] | |
| 822 | 846 | |
| 823 | 0.122u5 | |
| 847 | Added the new display types to the listxml DTD. [Oliver Stoneberg] | |
| 848 | ||
| 849 | Internal 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 | ||
| 854 | Mysterious Stones gets the "full treatment". [Zsolt Vasvari] | |
| 855 | ||
| 856 | Fix 8085 RST75 not working with PULSE_LINE. According to datasheet, | |
| 857 | RST7.5 is latched on rising edge, while the other maskable interrupts | |
| 858 | are sampled. [Nicola Salmoria] | |
| 859 | ||
| 860 | Removed AM_SPACE and matchmask support. Updated relevant drivers | |
| 861 | to use AM_MIRROR() and AM_MASK() to achieve the same thing. | |
| 862 | [Aaron Giles] | |
| 863 | ||
| 864 | ||
| 865 | ||
| 866 | 0.123u3 | |
| 824 | 867 | ------- |
| 825 | 868 | |
| 826 | 869 | |
| 827 | 870 | MAMETesters Bugs Fixed |
| 828 | 871 | ---------------------- |
| 829 | scorpion0111u5gra [couriersud] | |
| 830 | qbert37b14gre1 [Zsolt Vasvari] | |
| 831 | blktiger060gre [robiza] | |
| 832 | kinstc081u7gre [Aaron Giles] | |
| 833 | kinst2083gre [Aaron Giles] | |
| 834 | umk3059gre [Aaron Giles] | |
| 835 | umk3137b5gre [Aaron Giles] | |
| 836 | lasso056gre_1 [Zsolt Vasvari] | |
| 837 | lasso056gre_2 [Zsolt Vasvari] | |
| 838 | term20103u4gre [Aaron Giles] | |
| 839 | term20104u2gre [Aaron Giles] | |
| 840 | m72_0115u3yel [Mamesick, Aaron Giles] | |
| 841 | deadang0119u2red [David Haywood] | |
| 842 | tmnt095gre [Zsolt Vasvari] | |
| 843 | memleak0122u2ora [Atari Ace] | |
| 844 | junglek055gre [Zsolt Vasvari] | |
| 872 | connect4_0123u2red [Aaron Giles] | |
| 873 | multiscreeninfo0123u2gre [Aaron Giles] | |
| 845 | 874 | |
| 846 | 875 | |
| 847 | 876 | |
| 848 | 877 | Source Changes |
| 849 | 878 | -------------- |
| 850 | Fixed flipped tilemap offset for scramble and clones (playable | |
| 851 | cocktail mode). [couriersud] | |
| 879 | Corrected clock speeds for the megasys1.c boards. Yes, the games | |
| 880 | actually ran _THAT_ slow! [Brian Troha] | |
| 852 | 881 | |
| 853 | Changed Exidy driver to draws the background directly from memory | |
| 854 | avoiding having to decode the gfx repeadately. [Zsolt Vasvari] | |
| 882 | Makefile & 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. | |
| 855 | 888 | |
| 856 | Added machine and cpunum parameters to INTERRUPT_GEN callbacks. Fixed | |
| 857 | several places that were not using INTERRUPT_GEN or OPBASE_HANDLER | |
| 858 | macros. [Atari Ace] | |
| 889 | Cloak & 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. | |
| 859 | 895 | |
| 860 | Minor bugfixes to the gfxlayout cleanups included in u4. [Atari Ace] | |
| 896 | Removed unnecessary machine->pens[] lookups in a large number of | |
| 897 | drivers. [Zsolt Vasvari] | |
| 861 | 898 | |
| 862 | Added code to debug 64-bit builds to allocate all address space below | |
| 863 | 4GB to help find 64-bit errors. Added environment variable | |
| 864 | OSDDEBUGMALLOC which, if set, explicitly overrides the debug malloc | |
| 865 | debug settings. Added environment variable OSDDEBUG4GB which, if set, | |
| 866 | explicitly overrides the new 64-bit address space allocations. (Sadly | |
| 867 | this is necessary due to some D3D drivers being 64-bit unclean....) | |
| 899 | Added built-in layout to Space Tactics. Cleaned up and reorganized the | |
| 900 | driver. [Mr. Do!, Zsolt Vasvari] | |
| 901 | ||
| 902 | Switched the funworld color decoding routines to use resnet code. | |
| 903 | [Roberto Fresca] | |
| 904 | ||
| 905 | Fixed namcos2, namcos21 crashes due to nvram allocation in | |
| 906 | MACHINE_RESET. Created MACHINE_START and move allocation there. | |
| 907 | [couriersud] | |
| 908 | ||
| 909 | Updated info.c to output raw video parameters (pixclock, htotal, | |
| 910 | hbend, hbstart, vtotal, vbend, vbstart) via -listxml if they have | |
| 911 | been given. [couriersud] | |
| 912 | ||
| 913 | Removed 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 | ||
| 917 | Added a rule in vconv.c to make VS2008 compile seamlessly. | |
| 868 | 918 | [Aaron Giles] |
| 869 | 919 | |
| 870 | Fixed winwork to use proper tchar functions for getenv. [Aaron Giles] | |
| 920 | bionicc.c: [couriersud] | |
| 921 | * Added cpu clocks from schematics | |
| 922 | * Comment about z80 nmi generation | |
| 871 | 923 | |
| 872 | Fixed | |
| 924 | Fixed | |
| 873 | 925 | |
| 874 | ||
| 926 | R | |
| 875 | 927 | |
| 876 | Simplified Y-unit DMA rendering, fixing bugs and removing the macro | |
| 877 | voodoo. [Aaron Giles] | |
| 928 | Fixes crash in Raiga. [Zsolt Vasvari, David Haywood] | |
| 878 | 929 | |
| 879 | Removed a bunch of dead code from othunder.c. [Zsolt Vasvari] | |
| 930 | drawgfx.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 | |
| 880 | 934 | |
| 881 | Implemented proper video timing and scanline interrupts in the m72 | |
| 882 | driver. [Mamesick, Aaron Giles] | |
| 935 | Removed 8bpp bitmap support from drawgfx. [Zsolt Vasvari] | |
| 883 | 936 | |
| 884 | mario.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 | |
| 937 | Removed MDRV_PALETTE_LENGTH from vector games, which would trigger | |
| 938 | an assert in emupal.c (debug build) [couriersud] | |
| 891 | 939 | |
| 892 | audio/dkong.c: [couriersud] | |
| 893 | * fixed LS123 constant to match TI datasheet diode circuit constant | |
| 940 | Added new module: tokenize.h. This centralizes the behavior of | |
| 941 | tokenizing data structures, as currently used by the input port | |
| 942 | system. Redid the input port tokenization to be more compact and make | |
| 943 | use of the new macros. Added support for designated initializers in | |
| 944 | C99 and GCC builds to enforce type safety. [Aaron Giles] | |
| 894 | 945 | |
| 895 | TX-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 | |
| 946 | Removed bogus DIPs from the NSS driver. [R. Belmont] | |
| 900 | 947 | |
| 901 | Added correct DIP switch settings for Big Fight. Also corrected Cycle | |
| 902 | Warriors DIP switches. [Philip Bennett] | |
| 948 | Improved 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 | |
| 903 | 957 | |
| 904 | Changed and verified frequencies on Ikari Warriors h/w, Tnk3, Hyper | |
| 905 | Sports, Jackal and S.A.R. [Corrado Tomaselli] | |
| 958 | Converted MACHINE_DRIVER definitions from function constructors to | |
| 959 | tokenized lists. For the most part this is a non-invasive change, | |
| 960 | except for those drivers using MDRV_WATCHDOG_TIME_INIT. In order to | |
| 961 | allow for tokenization of attotimes, a set of new macros is provided | |
| 962 | called UINT64_ATTOTIME_IN_x() which follows the same pattern as | |
| 963 | ATTOTIME_IN_x() but packs the attotime down into a single 64-bit | |
| 964 | value for easier tokenization. Fixed several errors in the machine | |
| 965 | drivers which were caught by the additional checks now done in the | |
| 966 | machine config detokenization code. [Aaron Giles] | |
| 906 | 967 | |
| 907 | Verified and corrected a lot of frequencies and oki6295 pin 7 on pcbs: | |
| 908 | Double Dribble, Chequered Flag, Diet gogo, Boulderdash, Sly Spy, | |
| 909 | Psycho Nics Oscar, Captain Silver, Magical Cat Adventure, Raiden, | |
| 910 | Superman, Twin Hawk, Vimana, Ghox, Dogyunn, truxton2, Pipi and Bibis, | |
| 911 | Fix Eight and Money Money. [Corrado Tomaselli] | |
| 968 | Separated MDRV_DEVICE_CONFIG_DATA into 32-bit and 64-bit versions. | |
| 969 | Added floating-point versions with configurable resolutions. | |
| 970 | [Aaron Giles] | |
| 912 | 971 | |
| 913 | Cleaned up brkthru/darwin memory maps. Changed both games to use | |
| 914 | identical video timing parameters based on measurements of darwin. | |
| 915 | Guessed based on available information at the master clock and | |
| 916 | derived all game clocks from it. [Aaron Giles] | |
| 972 | Converted speakers into devices. Machine->config no longer houses | |
| 973 | an array of speakers; instead they are iterated through using the | |
| 974 | new macros (defined in sound.h) speaker_output_first() and | |
| 975 | speaker_output_next(). Updated all relevant code to do this. | |
| 976 | [Aaron Giles] | |
| 917 | 977 | |
| 918 | Reogranized and started to clean up the CVS driver. Added emulation | |
| 919 | of the speech CPU. Removed CVS BIOS entry. Removed unnecessary | |
| 920 | patching. [Zsolt Vasvari] | |
| 978 | Added typedefs for all the machine config callback functions at the | |
| 979 | top of driver.h. [Aaron Giles] | |
| 921 | 980 | |
| 922 | sauro.c: [couriersud] | |
| 923 | * Hooked up sp0256 sound | |
| 924 | * analyzed and commented some ports | |
| 925 | * added palette_bank support without real success | |
| 981 | Big 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. | |
| 926 | 994 | |
| 927 | Reorganized 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] | |
| 995 | Merged memory maps for a number of drivers beginning with a digit or | |
| 996 | the letter 'a'. [Aaron Giles] | |
| 930 | 997 | |
| 931 | Fixed scan functions for kickgoal background, which were swapped. | |
| 932 | [David Haywood] | |
| 998 | Cleaned up the Crazy Climber video driver, mainly via tilemap | |
| 999 | conversion. This fixes the ape sprite positioning in Crazy Kong - no | |
| 1000 | more gap between feet and platform. Merged Yamato driver with Crazy | |
| 1001 | Climber. [Zsolt Vasvari] | |
| 933 | 1002 | |
| 934 | Fixed 2650 disassembly of the sense and flag bits. Fixed incorrect | |
| 935 | argument order in OUT instruction. Corrected spacing. [Zsolt Vasvari] | |
| 1003 | Converted XX Mission to tilemaps. [Zsolt Vasvari] | |
| 936 | 1004 | |
| 937 | ||
| 1005 | R | |
| 938 | 1006 | |
| 939 | ||
| 1007 | Adde | |
| 940 | 1008 | |
| 941 | Atari 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. | |
| 1009 | Added support for original Omega Race state PROM. [Mathis Rosenhauer] | |
| 947 | 1010 | |
| 948 | Added support for outputting 64-bit target addresses in the i386dasm. | |
| 949 | [Aaron Giles] | |
| 1011 | Added support in the MC6845 emulation for cursors. All 4 blinking | |
| 1012 | modes are supported. [Zsolt Vasvari] | |
| 950 | 1013 | |
| 951 | Added MESS PC-Engine emulatation system. Fixed MAME debug build under | |
| 952 | VC2003. [Mariusz Wojcieszek] | |
| 1014 | Added a stub implementation of the Rockwell 6545. [Nathan Woods] | |
| 953 | 1015 | |
| 954 | Unified memory maps in tmnt.c and twin16.c. Reversed ROM set names | |
| 955 | of Cuebrick World and Japan versions. Changed some function names to | |
| 956 | reflect parent set. [Zsolt Vasvari] | |
| 1016 | Added basic support for the NEC uPD7801, uPD78C05, and uPD78C06 CPUs | |
| 1017 | to the uPD7810 cpu core. [Wilbert Pol] | |
| 957 | 1018 | |
| 958 | Changed Konami drivers to allocate and decode graphics using the same | |
| 959 | layouts. Removed the layout parameter from the decodechar() calls. | |
| 960 | [Atari Ace] | |
| 1019 | Some improvements to the 6850 ACIA CTS pin checking logic and the MPU4 | |
| 1020 | ACIA clock logic. [James Wallace] | |
| 961 | 1021 | |
| 962 | Fixed C++ compilation errors. [Dave Dribin] | |
| 1022 | Another Risky Challenge opcode to fix a sprite bug and a general | |
| 1023 | clean up of the remarks in the driver. [robiza] | |
| 963 | 1024 | |
| 964 | Made INPs compatible between 64-bit MAME and 32-bit MAME. [Chad] | |
| 1025 | Added dip locations to astinvad, bonzeadv, cadash, asuka, mofflott, | |
| 1026 | galmedes, atarifb, atarifb4, abaseb, soccer. Added DIP locations and | |
| 1027 | improved DIP switches in seawolf2, wow, gorf, robby, profpac. | |
| 1028 | [RansAckeR] | |
| 965 | 1029 | |
| 966 | Complete taitosj memory map from Nicola's ancient notes. General code | |
| 967 | clean-up. [Zsolt Vasvari] | |
| 1030 | One-line fix for the z80pio. At the moment when the interrupt control | |
| 1031 | word is sent (with interrupts enabled), an interrupt occurs. In | |
| 1032 | reality, interrupts are disabled until the interrupt mask byte is | |
| 1033 | sent. [Robert] | |
| 968 | 1034 | |
| 969 | src2html 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 | |
| 974 | based on empirical evidence that is somehow works. [Emuman] | |
| 975 | 1035 | |
| 976 | 1036 | |
| 977 | ||
| 978 | 1037 | New games added or promoted from NOT_WORKING status |
| 979 | 1038 | --------------------------------------------------- |
| 980 | Name Club Ver.3 (J 970723 V1.000) [David Haywood, Mariusz Wojcieszek] | |
| 981 | Blazing Lazers [Mariusz Wojcieszek, Charles MacDonald, Mr. Do] | |
| 1039 | Jolly Joker [Roberto Fresca] | |
| 1040 | Cal Omega - Game 7.6 (Arcade Poker) [Roberto Fresca] | |
| 1041 | Cal Omega - Game 7.9 (Arcade Poker) [Roberto Fresca] | |
| 1042 | Cal Omega - Game 12.8 (Arcade Game) [Roberto Fresca] | |
| 1043 | Cal Omega - Game 17.51 (Gaming Draw Poker) [Roberto Fresca] | |
| 1044 | Cal Omega - Game 23.9 (Gaming Draw Poker) [Roberto Fresca] | |
| 1045 | El Grande - 5 Card Draw (New) [Roberto Fresca] | |
| 1046 | Jackpot Joker Poker (5 sets) [Roberto Fresca] | |
| 982 | 1047 | |
| 983 | 1048 | |
| 984 | 1049 | |
| 985 | 1050 | New clones added |
| 986 | 1051 | ---------------- |
| 987 | Lead Angle (Japan) [Guru] | |
| 988 | A Question of Sport (39-960-107) [Highwayman] | |
| 989 | Gee Bee (F.lli Bertolino license) [Corrado Tomaselli] | |
| 1052 | Cosmic Smash (JPN, USA, EXP, KOR, AUS) (original) [icronnya77] | |
| 1053 | Jolly Card (Evona Electronic) [Roberto Fresca] | |
| 1054 | Jolly Card (croatian, set 2) [Roberto Fresca] | |
| 1055 | Super Joly 2000 - 3x [Roberto Fresca] | |
| 1056 | Royal Vegas Joker Card (fast deal, english gfx) [Roberto Fresca] | |
| 1057 | Dungeons and Dragons Tower of Doom (Japan 940412) [Razoola] | |
| 1058 | Real Bout Fatal Fury (bug fix revision) [Razoola] | |
| 1059 | Metal Slug 5 (AES Cart) [Razoola] | |
| 990 | 1060 | |
| 991 | 1061 | |
| 992 | 1062 | |
| 993 | 1063 | New games marked as GAME_NOT_WORKING |
| 994 | 1064 | ------------------------------------ |
| 995 | Road Runner (Midway) [Zsolt Vasvari, Guru] | |
| 996 | Paranoia [Mariusz Wojcieszek] | |
| 1065 | A large number of Cal Omega games [Roberto Fresca] | |
| 997 | 1066 | |
| 998 | 1067 | |
| 999 | 1068 | |
| 1000 | 0.12 | |
| 1069 | 0.123u2 | |
| 1001 | 1070 | ------- |
| 1002 | 1071 | |
| 1003 | 1072 | |
| 1004 | 1073 | MAMETesters Bugs Fixed |
| 1005 | 1074 | ---------------------- |
| 1006 | gui0121u1gre [Aaron Giles] | |
| 1007 | drivedge0121u4gre [Aaron Giles] | |
| 1008 | bking3076u2red [Pierpaolo Prazzoli] | |
| 1009 | btoads0102u5gre [Aaron Giles] | |
| 1010 | btoads0103u1gre [Aaron Giles] | |
| 1011 | editableui0120u4red [Aaron Giles] | |
| 1012 | cheat0118red [Aaron Giles] | |
| 1013 | altf4_0111u4gre [Aaron Giles] | |
| 1014 | beastrzb097u2red [Oliver Stoneberg] | |
| 1015 | memoryleak0118u1ora [Oliver Stoneberg] | |
| 1016 | memory_leak0111u6ora [Oliver Stoneberg] | |
| 1017 | mahoudai0106u7yel [Philip Bennett] | |
| 1018 | gridiron079gre [David Haywood] | |
| 1019 | maniach37b11gre [David Haywood] | |
| 1020 | matmaniac37b14gre [David Haywood] | |
| 1021 | qzkklgy2_0106u6red [David Haywood] | |
| 1022 | warriorb0109u2gre [David Haywood] | |
| 1023 | vball071u1gre [Bryan McPhail] | |
| 1024 | d3dwindow0117u3red [Aaron Giles, Emuman] | |
| 1025 | arkanoid061gre [Bryan McPhail] | |
| 1026 | flkatck058gre [David Haywood] | |
| 1027 | memleak0119u3ora [Oliver Stoneberg] | |
| 1028 | system24_0120u3red [Atari Ace, Aaron Giles] | |
| 1029 | aleck64_0120red [Aaron Giles] | |
| 1030 | mtetrisc0115u1red [Aaron Giles] | |
| 1031 | suratk0122u3gra [Pierpaolo Prazzoli] | |
| 1032 | suratk0122u3ora [Pierpaolo Prazzoli] | |
| 1033 | skychut37b1yel [couriersud] | |
| 1034 | skychut37b6gre [couriersud] | |
| 1035 | darius2_0114gre [Bryan McPhail] | |
| 1036 | ad2083_0111u5gra [couriersud] | |
| 1037 | abaseb0122u3red [Zsolt Vasvari] | |
| 1038 | ladybug080u1gre [Zsolt Vasvari] | |
| 1039 | suprridr0122u2gra [Zsolt Vasvari] | |
| 1040 | invho2_0122u3red [Zsolt Vasvari] | |
| 1041 | narc37b16yel [Aaron Giles] | |
| 1042 | kingofb37b6gre [robiza] | |
| 1043 | stonebal0117u2gre [Aaron Giles] | |
| 1044 | wotw36b1gre [Zsolt Vasvari] | |
| 1045 | wallst071gre [Zsolt Vasvari] | |
| 1046 | mtrap37b14gre [Zsolt Vasvari] | |
| 1047 | pitfight0109u2gre [Aaron Giles] | |
| 1075 | progear0123u1gra [stephh] | |
| 1048 | 1076 | |
| 1049 | 1077 | |
| 1050 | 1078 | |
| 1051 | 1079 | Source Changes |
| 1052 | 1080 | -------------- |
| 1053 | Corrected btoads clocks according XTALs on the PCB. [Aaron Giles] | |
| 1081 | csk.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. | |
| 1054 | 1086 | |
| 1055 | "Simplified" MC8123 decryption, though it's still more complicated | |
| 1056 | than I'd like it to be. [Nicola Salmoria] | |
| 1087 | Fixed build with external zlib. [R. Belmont] | |
| 1057 | 1088 | |
| 1058 | Cleaned up clocks in the itech32 driver. [Aaron Giles] | |
| 1089 | Completed old-style colortable removal. Removed | |
| 1090 | MDRV_COLORTABLE_LENGTH macro. Updated uigfx to display new-style | |
| 1091 | color tables if present. [Zsolt Vasvari] | |
| 1059 | 1092 | |
| 1060 | ||
| 1093 | R | |
| 1061 | 1094 | |
| 1062 | Fixed bking3 clocks as per Guru readme. Added GAME_WRONG_COLORS flag | |
| 1063 | to bking3. [Pierpaolo Prazzoli] | |
| 1095 | Fixed Xenophobe sprite aligment. [Derek Ledbetter] | |
| 1064 | 1096 | |
| 1065 | TMS34020 fixes: [Aaron Giles] | |
| 1066 | * Allowed 32-bit pixel sizes | |
| 1067 | * Fixed RPIX instruction | |
| 1097 | Converted SNES (except debug code) to RGB32 as it was a serious | |
| 1098 | abuser of the palette system. [Zsolt Vasvari] | |
| 1068 | 1099 | |
| 1069 | Added new function input_poll_keyboard_switches to poll for only key | |
| 1070 | events. Expanded the size of the maximum simultaneously pressed | |
| 1071 | switches. [Aaron Giles] | |
| 1100 | Added colortable_palette_get_size() to emupal. Added some more | |
| 1101 | asserts to catch errors. [Zsolt Vasvari] | |
| 1072 | 1102 | |
| 1073 | Removed GAME_IMPERFECT_GRAPHICS from all jpmimpct games bar Cluedo | |
| 1074 | (see driver note). [Philip Bennett] | |
| 1103 | Fixed Dip Switches (especially coinage) and inputs for 'mpatrol' and | |
| 1104 | 'troangl' (and their clones). Tried to "unify" the two drivers (I | |
| 1105 | still think that some things can be merged). Added iremipt.h source | |
| 1106 | file (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 | |
| 1108 | GAME_NOT_WORKING flag as I think there are still some things to look | |
| 1109 | at). [stephh] | |
| 1075 | 1110 | |
| 1076 | mario driver improvements: [couriersud] | |
| 1077 | - Hooked up flipscreen | |
| 1078 | - Changed monitor orientation to ROT0 | |
| 1111 | Changed IREM cpu decryption to be 'real-time' (it's a feature of the | |
| 1112 | CPU). Moved decryption table setup to 'config' struct for the CPU. | |
| 1113 | Added latest tables from robiza, making Risky Challenge playable, | |
| 1114 | promoted it to working. Told CPU core to not decrypt code after | |
| 1115 | brkn instruction, enabling it again on iret, allowing me to remove | |
| 1116 | several 'don't decrypt range' hacks in the code. Updated all drivers | |
| 1117 | accordingly. Currently the disassembly is a bit weird now, this will | |
| 1118 | need looking at. [David Haywood, robiza] | |
| 1079 | 1119 | |
| 1080 | Added Z80 DMA chip [couriersud] | |
| 1081 | - only implements intelligence to emulate dkong3 | |
| 1082 | - fixed a misleading comment in 8257dma.h | |
| 1120 | Added and hooked up AICA (Naomi sound chip). Naomi boot sounds now | |
| 1121 | play. Since it's an SCSPx2 with ADPCM instead of FM it's already | |
| 1122 | feature-complete except filter envelopes. A bug in the ARM7 core | |
| 1123 | causes incorrect pan/level values to be computed in e.g. the Naomi | |
| 1124 | SOUND TEST menu. This is not a defect in the AICA. | |
| 1125 | [ElSemi, Deunan Knute, kingshriek, R. Belmont] | |
| 1083 | 1126 | |
| 1084 | dkong 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 | |
| 1127 | Fixed Dip Switches (especially coinage) and inputs for '10yard' (and | |
| 1128 | its clones). Tried to "unify" the driver with m52 and m57 drivers | |
| 1129 | (I still think that some things can be merged). [stephh] | |
| 1088 | 1130 | |
| 1089 | ||
| 1131 | Fixed | |
| 1090 | 1132 | |
| 1091 | Fixed bad ram pages errors in stactics service mode. | |
| 1092 | [Pierpaolo Prazzoli] | |
| 1133 | Fixed misaligned backgrounds in mpatrol caused by recent changes. | |
| 1134 | [Zsolt Vasvari] | |
| 1093 | 1135 | |
| 1094 | Atari 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 | |
| 1136 | Minor code cleanups. Added static/const where appropriate, plus some | |
| 1137 | include fixes. Reverted some of the changes to build.mak from u1 | |
| 1138 | which made some MSVC builds fail, and adjusted/optimized an m10.c | |
| 1139 | gfx_layout. Added some missing cores to cpuintrf.c, sndintrf.c and | |
| 1140 | added some missing #if's to 5220intf.c. [Atari Ace] | |
| 1102 | 1141 | |
| 1103 | Implemented decent-sounding FM in the SCSP. [kingshriek] | |
| 1142 | Fixed one or two dips in the mirage.c driver and found the "service" | |
| 1143 | switch and likely start of inputs. [Brian Troha] | |
| 1104 | 1144 | |
| 1105 | Updated Naomi driver, now boots and shows some test menus (press F2 | |
| 1106 | to get into test, use 9 to navigate). Also hooked up ROM board PIO | |
| 1107 | and skeleton for DMA. [R. Belmont, Samuele Zannoli, ElSemi] | |
| 1145 | Removed expand_machine_driver(). Replaced with machine_config_alloc() | |
| 1146 | and machine_config_free(). Updated all call sites. Normalized info.c | |
| 1147 | style and simplified some of the code. [Aaron Giles] | |
| 1108 | 1148 | |
| 1109 | N64 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) | |
| 1149 | Renamed machine->drv to machine->config to reduce overloading of the | |
| 1150 | term "driver". [Aaron Giles] | |
| 1114 | 1151 | |
| 1115 | ad2083 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 | |
| 1152 | Simplified collision detection in taitosj and tank8. [Zsolt Vasvari] | |
| 1121 | 1153 | |
| 1122 | Cleaned up graphics layouts in preparation for new format. Added new | |
| 1123 | GFXLAYOUT_RAW() macro to normalize definition. Added new validation | |
| 1124 | code. Made all remaining instances of gfx_layouts const. [Atari Ace] | |
| 1154 | New module: devintrf.c/.h. Implements a generic device interface | |
| 1155 | similar to the sound and CPU interfaces. [Aaron Giles] | |
| 1125 | 1156 | |
| 1126 | Updated Amiga driver to use formal XTALs. [Dirk Best] | |
| 1157 | New module: mconfig.c/.h. Moved all machine_config and MDRV_* macros | |
| 1158 | here, out of driver.c/.h. Added MDRV macros for adding/removing/ | |
| 1159 | configuring devices. [Aaron Giles] | |
| 1127 | 1160 | |
| 1128 | Changed 6522 emulation such that when writing to the ACR register with | |
| 1129 | the timer 1 in continuous counting mode, the timer 1 value should not | |
| 1130 | be reloaded but keep on counting. [Wilbert Pol] | |
| 1161 | Deprecated the following constants because global constants that | |
| 1162 | pretend 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 | |
| 1169 | Updated all drivers to explicitly specify the equivalent bogus | |
| 1170 | times. Added comments for the "REAL" VBLANK durations to indicate | |
| 1171 | that they are not accurate. [Aaron Giles] | |
| 1131 | 1172 | |
| 1132 | Added XTAL defines to bfm_sc2.c and cleaned up lvcards.c. | |
| 1133 | [James Wallace] | |
| 1173 | Improved some DIP switches, added some DIP locations, replaced | |
| 1174 | IPT_COINx with IPT_SERVICE1 where appropiate, and simplified some | |
| 1175 | control definitions in the following drivers: alpha68k.c, actfancr.c, | |
| 1176 | aeroboto.c, aerofgt.c, aliens.c, ambush.c, amidar.c, amspdwy.c, | |
| 1177 | angelkds.c, appoooh.c, arabian.c, argus.c, arkanoid.c. [RansAckeR] | |
| 1134 | 1178 | |
| 1135 | Added default layout to neogeo games allowing for either cropping or | |
| 1136 | stretching to the alternate 304x224 layout. Removed default cropping | |
| 1137 | in the driver. [David Haywood, Aaron Giles] | |
| 1179 | Connected the Shadow Warriors buttons like they are wired on the | |
| 1180 | original pcb (which is jamma). [Corrado Tomaselli] | |
| 1138 | 1181 | |
| 1139 | Fixed crash when saving state of older DCS-based games. Added save | |
| 1140 | state support to the midvunit driver. [Aaron Giles] | |
| 1182 | Added DIP locations to: cclimbr2 , legion, terraf, ultennis, cheesech, | |
| 1183 | stonebal, stoneba2, scessjoe, ashnojoe, asteroid, llander, llander1, | |
| 1184 | astdelux. [RansAckeR] | |
| 1141 | 1185 | |
| 1142 | Major improvements to Cycle Warriors video code (still not perfect, | |
| 1143 | but road layer works now). [Bryan McPhail] | |
| 1186 | Fixed multi-session crash with Namco System 2 games. [Atari Ace] | |
| 1144 | 1187 | |
| 1145 | Major rewrite of skychut.c. There are still some glitches and it is | |
| 1146 | not 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 | |
| 1188 | Improved Print Club DIP switches. [Edward Swiftwood] | |
| 1152 | 1189 | |
| 1153 | Updated memory configuration for Superboard game versions in peplus | |
| 1154 | driver. Fixes CMOS DATA errors on reload. [Jim Stolis] | |
| 1190 | Fixed a few corner cases in the 6840 emulation based on running the | |
| 1191 | MPU4 test ROMs, and added the ability to dynamically alter the | |
| 1192 | external clock frequencies in game. [James Wallace] | |
| 1155 | 1193 | |
| 1156 | Rewrote the CVS system video code. [Zsolt Vasvari] | |
| 1194 | Changed the 6850 core to allow dynamic RX and TX clock alteration, | |
| 1195 | to at least try to remove a few of the MPU4 timing problems. | |
| 1196 | [James Wallace] | |
| 1157 | 1197 | |
| 1158 | Fixed S2650 register window display. [Zsolt Vasvari] | |
| 1198 | Updated documentation of the MPU4 Video board. Added documentation of | |
| 1199 | the Cosmic Chasm crystals, and merged the memory maps. [James Wallace] | |
| 1159 | 1200 | |
| 1160 | Added sound to Cycle Warriors and Big Fight. Corrected OKI M6295 | |
| 1161 | clock values. [Philip Bennett] | |
| 1201 | Fixed validation fail of '_mul_32x32_hi()' and '_mulu_32x32_hi()' | |
| 1202 | inline function when compiled GCC v3.3.5 with I686 optimization. | |
| 1203 | [KO Myung-Hun] | |
| 1162 | 1204 | |
| 1163 | Fixed missing arrow in Venture on the zoomed out map, and the | |
| 1164 | incorrect fading twister in Hard Hat. [Zsolt Vasvari] | |
| 1205 | Verified clocks on Rainbow Islands and Rambo 3 and Raiden 2. Reverted | |
| 1206 | sound OSC of Truxton 2 to 27mhz/8 since the original OST runs at this | |
| 1207 | speed. The pcb I measured the previous clock was 28mhz/8 and it's a | |
| 1208 | different pcb version from the common one. Since mame doesn't support | |
| 1209 | multiple OSC I prefer to use the 27mhz one. [Corrado Tomaselli] | |
| 1165 | 1210 | |
| 1211 | Fixed some incorrect rom dumps for Double Dragon 3 (Some of the dumps | |
| 1212 | were based of the bootleg and not the original.) and updated the name | |
| 1213 | and location to actually match that of a real board. [Kevin Eshbach] | |
| 1166 | 1214 | |
| 1215 | Added DIP locations to Combatribes and Battletoads. [Kevin Eshbach] | |
| 1167 | 1216 | |
| 1168 | New games added or promoted from NOT_WORKING status | |
| 1169 | --------------------------------------------------- | |
| 1170 | Dangerous Curves [Philip Bennett, Dazzer] | |
| 1171 | Big Fight [Bryan McPhail] | |
| 1217 | Added video_screen_update_now(int scrnum) to force a screen update up | |
| 1218 | to the current beam position. [Zsolt Vasvari] | |
| 1172 | 1219 | |
| 1220 | Pulled 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 | |
| 1173 | 1225 | |
| 1226 | Changed the input port tokens to use a union instead of casting | |
| 1227 | everything to FPTR. In the future, C99-enabled compilers will be able | |
| 1228 | to achieve type safety with designated initializers. [Aaron Giles] | |
| 1174 | 1229 | |
| 1175 | New clones added | |
| 1176 | ---------------- | |
| 1177 | Invasion - The Abductors (version 5.0) [Brian Troha] | |
| 1178 | Alien Syndrome (set 5, System 16A, FD1089B 317-0037) [Nicola Salmoria] | |
| 1179 | Dragon Spirit (Atari license) [Satoshi Suzuki] | |
| 1230 | Added i8749 CPU variant for MESS. [Curt Coder] | |
| 1180 | 1231 | |
| 1232 | Added missing SH4 instructions and bugfixed the FPU. Improved Naomi | |
| 1233 | I/O board emulation and added working controls. [Samuele Zannoli] | |
| 1181 | 1234 | |
| 1235 | jedi.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 | |
| 1182 | 1240 | |
| 1183 | 0.122u3 | |
| 1184 | ------- | |
| 1241 | Reorganized Qix driver (driver state, decoupled audio section, etc.) | |
| 1242 | [Zsolt Vasvari] | |
| 1185 | 1243 | |
| 1244 | Changed all drivers using the MC6845 chip to use the new device | |
| 1245 | interface. Removed mc6845_config. [Zsolt Vasvari] | |
| 1186 | 1246 | |
| 1187 | MAMETesters Bugs Fixed | |
| 1188 | ---------------------- | |
| 1189 | hstennis0103u2gra [Brian Troha] | |
| 1190 | edrandy0113gra [Brian Troha] | |
| 1191 | robocop2_0106u3gra [Brian Troha, Bryan McPhail] | |
| 1192 | mario0110u1gre [couriersud] | |
| 1193 | sbrkout0118yel [R. Belmont, Adam Bousley] | |
| 1194 | pestplce0122red [couriersud] | |
| 1195 | funkyjet055yel [Bryan McPhail] | |
| 1196 | liberate074u1gre [Bryan McPhail] | |
| 1197 | tokiu056gre [Bryan McPhail] | |
| 1198 | powerbls0112u4red [Pierpaolo Prazzoli] | |
| 1199 | wwestern0115u1yel [Atari Ace] | |
| 1200 | namcos1_0118u2yel [Atari Ace] | |
| 1201 | victnine0116u2red [Pierpaolo Prazzoli] | |
| 1202 | btoads0103gre [Aaron Giles] | |
| 1247 | Reorganized Gameplan driver. Changed Trivia Quest use the Gameplan | |
| 1248 | video code. Added crystal for Gameplan pixel clock. [Zsolt Vasvari] | |
| 1203 | 1249 | |
| 1250 | Removed the unnecessary pen array lookup from some INDEXED16 drivers. | |
| 1251 | [Zsolt Vasvari] | |
| 1204 | 1252 | |
| 1253 | Removed the per-screen palette_base. This was an idea that never | |
| 1254 | really worked out, nor have we really needed it. [Aaron Giles] | |
| 1205 | 1255 | |
| 1206 | Source Changes | |
| 1207 | -------------- | |
| 1208 | Fixes clocks for Orbs. [David Haywood, Tomasz Slanina] | |
| 1256 | Defined a new device type VIDEO_SCREEN. Currently this has no | |
| 1257 | live functionality, but merely serves as a placeholder/identifier | |
| 1258 | for video screens. Eventually some of the screen management code | |
| 1259 | may move into the start/stop/reset functions. [Aaron Giles] | |
| 1209 | 1260 | |
| 1210 | Fixed various 64-bit GCC warnings. [R. Belmont] | |
| 1261 | Changed MDRV_SCREEN_ADD to specify a screen type (RASTER, VECTOR, | |
| 1262 | LCD for the moment). Removed the older VIDEO_TYPE_RASTER and | |
| 1263 | VIDEO_TYPE_VECTOR; this information is now determined by walking | |
| 1264 | the screen list. [Aaron Giles] | |
| 1211 | 1265 | |
| 1212 | Improves accuracy and documentation of NSS/SNES DSP-1. | |
| 1213 | [Andreas Naive, R. Belmont] | |
| 1266 | Changed MDRV_SCREEN_* macros to build up VIDEO_SCREEN devices | |
| 1267 | rather than storing values in the screen[] array. Removed the | |
| 1268 | screen[] array from machine_config. Modified all code referencing | |
| 1269 | Machine->config->screen[] and changed it to iterate over the devices | |
| 1270 | using the new video_screen_first() and video_screen_next() | |
| 1271 | functions. [Aaron Giles] | |
| 1214 | 1272 | |
| 1215 | Added new file xtal.h, documenting all known arcade PCB clock cystals. | |
| 1216 | Drivers should be updated to use these as a basis for their clocks, | |
| 1217 | and the list should be augmented as additional crystals are found. | |
| 1218 | [Guru, Aaron Giles] | |
| 1273 | Removed implicit screen #0. This means that ALL DRIVERS MUST | |
| 1274 | EXPLICITLY DECLARE THEIR SCREENS. Updated all drivers to do | |
| 1275 | so. While there, grouped all MDRV_SCREEN_* parameters together. | |
| 1276 | Also removed unnecessary VIDEO_TYPE_RASTER and VIDEO_TYPE_VECTOR. | |
| 1277 | Also removed VBLANK and bitmap format information from vector | |
| 1278 | games. This was painful and very tedious. [Aaron Giles] | |
| 1219 | 1279 | |
| 1220 | suprloco improvements: [Pierpaolo Prazzoli] | |
| 1221 | * Fixed IC.34 memory test | |
| 1222 | * Fixed 2nd player cocktail mode | |
| 1223 | * Changed coin3 to service1 | |
| 1224 | ||
| 1225 | Cleaned up inputs/DIP switches in cninja driver. [Brian Troha] | |
| 1280 | Changed game information to display info about all screens. | |
| 1281 | [Aaron Giles] | |
| 1226 | 1282 | |
| 1227 | Rewrote 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 | |
| 1283 | Changed Beathead driver to use partial updates instead of caching | |
| 1284 | scanline level information. [Zsolt Vasvari] | |
| 1233 | 1285 | |
| 1234 | Fixed typo for IO1 irq callback in hyperstone core. | |
| 1235 | [Pierpaolo Prazzoli] | |
| 1286 | Added state_save_combine_module_and_tag(). Its purpose is to create | |
| 1287 | a unique name for state saving purposes in modules that are tag | |
| 1288 | based (no index). [Zsolt Vasvari] | |
| 1236 | 1289 | |
| 1237 | Added memory_get_bank() function. Fixed logging in memory.c to to use | |
| 1238 | %p for pointer values. [Aaron Giles] | |
| 1239 | 1290 | |
| 1240 | Fixed save states in i8051 cpu core [Pierpaolo Prazzoli] | |
| 1241 | 1291 | |
| 1242 | Implemented a few SysCtrl, Maple, and PVR/HOLLY bits for Naomi. The | |
| 1243 | BIOS gets slightly further but is nowhere near starting up. | |
| 1244 | [R. Belmont] | |
| 1292 | New games added or promoted from NOT_WORKING status | |
| 1293 | --------------------------------------------------- | |
| 1294 | Champion Poker [Mirko Buffoni] | |
| 1295 | Risky Challenge [robiza] | |
| 1245 | 1296 | |
| 1246 | Zeus updates: [Aaron Giles] | |
| 1247 | * Better documented various bit latches. | |
| 1248 | * Hooked up crusnexo lamp board (added layout). | |
| 1249 | * Fixed year in MK4 startup test. | |
| 1250 | 1297 | |
| 1251 | Fixed TMS5110 tables. [couriersud, Lord Nightmare] | |
| 1252 | 1298 | |
| 1253 | Removed ui_popup(). Drivers should always be using popmessage() | |
| 1254 | instead (has been this way for a while). Augmented popmessage() so | |
| 1255 | that you can pass NULL to immediately dismiss any messages. | |
| 1256 | [Aaron Giles, thanks to Oliver Stoneberg's suggestion] | |
| 1299 | New clones added | |
| 1300 | ---------------- | |
| 1301 | Fighting Soccer (Japan) [Yasuhiro Ogawa] | |
| 1302 | Red Hawk (Excellent Co., Ltd) [Brian Troha] | |
| 1257 | 1303 | |
| 1258 | Added ATTR_PRINTF to a number of functions that have printf semantics. | |
| 1259 | [Oliver Stoneberg] | |
| 1260 | 1304 | |
| 1261 | Rewrote 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 | |
| 1270 | 1305 | |
| 1271 | Fixed several UNICODE=1 issues in the debugger. Changed the Windows | |
| 1272 | build process to always enable UNICODE=1 for 64-bit builds. | |
| 1273 | [Oliver Stoneberg, Aaron Giles] | |
| 1306 | New games marked as GAME_NOT_WORKING | |
| 1307 | ------------------------------------ | |
| 1308 | Toy Fighter [Corrado Tomaselli] | |
| 1274 | 1309 | |
| 1275 | Added save state support to btoads. [Aaron Giles] | |
| 1276 | 1310 | |
| 1277 | Fixed onna34ro mcu simulation properly. [Pierpaolo Prazzoli] | |
| 1278 | 1311 | |
| 1279 | ||
| 1280 | ||
| 1281 | New clones added | |
| 1282 | ---------------- | |
| 1283 | Mutant Fighter (World, EM-3) [Stefan Lindberg] | |
| 1284 | The Simpsons (2 Players Asia) [Arzeno Fabrice] | |
| 1285 | ||
| 1286 | ||
| 1287 | ||
| 1288 | 0.122u2 | |
| 1312 | 0.123u1 | |
| 1289 | 1313 | ------- |
| 1290 | 1314 | |
| 1291 | 1315 | |
| 1292 | 1316 | MAMETesters Bugs Fixed |
| 1293 | 1317 | ---------------------- |
| 1294 | pestplce0122red [couriersud] | |
| 1295 | hunchbkd0122red [couriersud] | |
| 1296 | radarscp0122yel [couriersud] | |
| 1297 | mwalk0122red [couriersud] | |
| 1298 | qtheater0122u1ora [Philip Bennett] | |
| 1318 | jantouki0121u3gra [RansAckeR] | |
| 1319 | mcnpshnt0120u3gra [RansAckeR] | |
| 1320 | mjdialq2_0120u3gra [RansAckeR] | |
| 1321 | mjifb0111u2gra [RansAckeR] | |
| 1322 | goldbug0105u4gra [stephh] | |
| 1323 | zn.c0122u8yel [smf] | |
| 1324 | pwrinst2_0122u8gra [Sonikos] | |
| 1299 | 1325 | |
| 1300 | 1326 | |
| 1301 | 1327 | |
| 1302 | 1328 | Source Changes |
| 1303 | 1329 | -------------- |
| 1304 | ||
| 1330 | R | |
| 1305 | 1331 | |
| 1306 | TMS51xx 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 | |
| 1332 | audio/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. | |
| 1320 | 1335 | |
| 1321 | Completed the addition of static qualifiers to all MAME symbols that | |
| 1322 | aren't explicitly exported. [Atari Ace] | |
| 1336 | Changed the use of machine->remapped_colortable to machine->pens where | |
| 1337 | the drivers weren't using color tables. [Zsolt Vasvari] | |
| 1323 | 1338 | |
| 1324 | Named the input_seq_type enumeration and used it explicitly in several | |
| 1325 | places. [Nathan Woods] | |
| 1339 | Corrected the clocks on the following pcbs: Formation Z, MagMax, | |
| 1340 | SlapFight and Tiger Heli. Changed Oki m6295 pin 7 to "high" on Toki | |
| 1341 | and Blood Bros. [Corrado Tomaselli] | |
| 1326 | 1342 | |
| 1327 | Corrected tx1 and tx1a coinage DSW assignments. Reversed buggyboy/ | |
| 1328 | buggybjr 'Game Time' settings. [Philip Bennett] | |
| 1343 | Improve build independence for CPU/sound cores. Rescued the M65CE02 | |
| 1344 | core from bitrot hell, and fixed some MESS cores that were broken by | |
| 1345 | the deprecat.h changes. [Atari Ace] | |
| 1329 | 1346 | |
| 1330 | TMS3203x 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 | |
| 1347 | Corrected the initial detection of extended INP files. | |
| 1348 | [Barry Rodewald] | |
| 1338 | 1349 | |
| 1339 | Zeus2 (+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 | |
| 1350 | Moved Galaxy Games emulation to tmaster.c. [Luca Elia] | |
| 1349 | 1351 | |
| 1350 | Replaced tekken2/tekken2a/tekken2b 'tes1wave.8k' ROM with the | |
| 1351 | correct, non-byte-swapped dump. [Philip Bennett] | |
| 1352 | makefile/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 | |
| 1352 | 1356 | |
| 1353 | Added discrete 74LS624(56789) implementation [couriersud] | |
| 1354 | - DISCRETE_74LS624 is a VCO needed for dkongjr | |
| 1355 | - Supports Logic, Energy and Count outputs | |
| 1357 | Removed color tables from gsword, hyperspt, jailbrek, magmax, | |
| 1358 | konamigx, markham, megazone, pandoras, rocnrope, strnskil, trackfld, | |
| 1359 | tp84, shaolins, scotrsht, pingpong, skykid, wiping, punchout, ikki, | |
| 1360 | rallyx, fastfred, fcombat, finalizr, flower, funworld, galivan, | |
| 1361 | gdrawpkr, goldstar, hanaawas, higemaru, ironhors, jackal, kchamp. | |
| 1362 | Added resnet.c color computations where appropriate. [Zsolt Vasvari] | |
| 1356 | 1363 | |
| 1357 | dkong 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 | |
| 1364 | Simplfied Mag Max background drawing code. [Zsolt Vasvari] | |
| 1365 | 1365 | |
| 1366 | Documentation 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 | |
| 1366 | Further altered the Exidy 440 code in preparation for moving to proper | |
| 1367 | sound chip emulation. [Zsolt Vasvari] | |
| 1374 | 1368 | |
| 1375 | Verified a number of clock frequencies from real PCBs. | |
| 1376 | [Corrado Tomaselli, Zsolt Vasvari] | |
| 1369 | Unified transparency handling between scotrsht, shaolins, tp84. | |
| 1370 | [Zsolt Vasvari] | |
| 1377 | 1371 | |
| 1378 | Fixed several memory leaks related to SCSI CD emulation. | |
| 1379 | [Oliver Stoneberg] | |
| 1372 | Split timer_adjust() into timer_adjust_oneshot() and | |
| 1373 | timer_adjust_periodic(). Updated all call sites. [Aaron Giles] | |
| 1380 | 1374 | |
| 1381 | Removed the increasing of the R register from each IX/IY related | |
| 1382 | (FD xx or DD xx) instruction on the Z80. According to documentation | |
| 1383 | and the behavior of the Amstrad CPC driver, this is incorrect. | |
| 1384 | [Barry Rodewald] | |
| 1375 | Fixed some arkanoid clones INPUT_PORTS definitions that were curiously | |
| 1376 | using PORT_START_TAG("DSW") instead of PORT_MODIFY("DSW"). [stephh] | |
| 1385 | 1377 | |
| 1386 | ||
| 1378 | Fixed DIP swi | |
| 1387 | 1379 | |
| 1388 | Adjusted most conditional logging in MAME to use the idiom | |
| 1389 | "do { if (VERBOSE) logerror x; } while (0)". This has the benefit that | |
| 1390 | the compiler checks the syntax of the logging even in the case it will | |
| 1391 | be eliminated, and in fact a number of cases here needed adjustments | |
| 1392 | to compile because of this. [Atari Ace] | |
| 1380 | Added HOTD2-specific BIOSes. [Arzeno Fabrice] | |
| 1393 | 1381 | |
| 1382 | Added more accurate emulation of the priority system and the beam | |
| 1383 | logic in stactics. Removed color table. Centered crosshair. Used | |
| 1384 | proper game orientation. Unified memory maps. Switched game to use the | |
| 1385 | artwork system. Set GAME_IMPERFECT_GRAPHICS until artwork is created. | |
| 1386 | [Zsolt Vasvari] | |
| 1394 | 1387 | |
| 1388 | Added sound support to Champion Skill. Removed GAME_NO_SOUND flags. | |
| 1389 | Increased interrupts per frame, music was too slow. Minor comments | |
| 1390 | adjustment. [Mirko Buffoni] | |
| 1395 | 1391 | |
| 1396 | 0.122u1 | |
| 1397 | ------- | |
| 1392 | Used PORT_SERVICE and PORT_SERVICE_NO_TOGGLE macros when it was | |
| 1393 | possible. [stephh] | |
| 1398 | 1394 | |
| 1395 | In the cps2 driver, Changed the GAME definitions to reflect how many | |
| 1396 | players and how many buttons there are for each game. Rewrote the | |
| 1397 | INPUT_PORTS definitions to use PORT_INCLUDE, PORT_MODIFY and | |
| 1398 | PORT_CUSTOM macros. Added a few notes about the inputs when I thought | |
| 1399 | they were needed to avoid wrong bug reports. Started to clean the | |
| 1400 | driver. [stephh] | |
| 1399 | 1401 | |
| 1400 | MAMETesters Bugs Fixed | |
| 1401 | ---------------------- | |
| 1402 | ym2610_0119u2gre [Philip Bennett] | |
| 1402 | Added PCB and/or chip docs updates for Blaze On (kaneko16.c), | |
| 1403 | Sand Scorpion (sandscrp.c), Flash Point (segas16b.c). [Brian Troha] | |
| 1403 | 1404 | |
| 1405 | Fixed kangaroo colors by assuming an inversion not present in the | |
| 1406 | schematics. [Nicola Salmoria] | |
| 1404 | 1407 | |
| 1408 | Added the ability to pass absolute paths to mame_schedule_save() and | |
| 1409 | mame_schedule_load(). [Nathan Woods] | |
| 1405 | 1410 | |
| 1406 | Source Changes | |
| 1407 | -------------- | |
| 1408 | Zeus 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. | |
| 1411 | Naomi/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 | |
| 1421 | 1420 | |
| 1422 | Zeus 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. | |
| 1421 | Set proper ARM7 clock for Naomi. [Deunan Knute] | |
| 1430 | 1422 | |
| 1431 | Afega/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 | |
| 1423 | ARM7 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 | |
| 1435 | 1434 | |
| 1436 | Fixed C219 sample read order and implemented sign+magnitude format. | |
| 1437 | Removed GAME_IMPERFECT_SOUND flag from all Namco NA-1 games. | |
| 1438 | [Philip Bennett] | |
| 1435 | Some 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 | ||
| 1447 | Did some cleanup of the 'special case' mess that the rallyx driver | |
| 1448 | has become. [Zsolt Vasvari] | |
| 1439 | 1449 | |
| 1440 | Fixed ROM-based DCS2 system to ignore HLE transfers. (Fixes broken | |
| 1441 | sound in invasn.) Properly reduced internal memory on the ADSP-2104 | |
| 1442 | variants. [Aaron Giles] | |
| 1450 | Removed no longer used TRANSPARENCY_COLOR. [Zsolt Vasvari] | |
| 1443 | 1451 | |
| 1444 | Fixed bug that would cause events to leak through to the game when the | |
| 1445 | debugger was up. [Aaron Giles] | |
| 1452 | MC6845 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 | ||
| 1459 | Changed qix.c to RGB32 mode and made its videoram_w do the partial | |
| 1460 | updating instead of a per scanline timer. [Zsolt Vasvari] | |
| 1446 | 1461 | |
| 1447 | Verified 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) | |
| 1462 | Fixed 'mario' and 'masao' memory maps to match the Dip Switches port | |
| 1463 | name. [stephh] | |
| 1458 | 1464 | |
| 1459 | Minor "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) | |
| 1465 | Fixed pooyan transparency. Updated to use resnet code. [Zsolt Vasvari] | |
| 1465 | 1466 | |
| 1467 | Changed ZN2 clock speed to 100MHz to match board notes. [smf] | |
| 1466 | 1468 | |
| 1469 | Added DIP locations for sitv, sicv, invadpt2, lrescue, invasion. Fixed | |
| 1470 | coin2 for superinv & invasion. [RansAckeR] | |
| 1467 | 1471 | |
| 1472 | Added initialization to machine/nmk112.c. This resolves a multi- | |
| 1473 | session audio problem reported for donpachi. Also added some variable | |
| 1474 | initialization to machine/n64.c to fix running starsldr multi-session. | |
| 1475 | [Atari Ace] | |
| 1476 | ||
| 1477 | Added diplocations to policetr and marked some as unused based on | |
| 1478 | manual and schematics. [Mike Ellery] | |
| 1479 | ||
| 1480 | Fixed fatal error in the maxaflex, mf_bdash and mf_achas drivers. | |
| 1481 | [Atari Ace] | |
| 1482 | ||
| 1483 | Several more risky challenge opcodes. You can now see "gameplay". | |
| 1484 | [robiza] | |
| 1485 | ||
| 1486 | ||
| 1487 | ||
| 1468 | 1488 | New games added or promoted from NOT_WORKING status |
| 1469 | 1489 | --------------------------------------------------- |
| 1470 | Invasion [Aaron Giles] | |
| 1471 | Buggy Boy Junior/Speed Buggy (Upright) [Philip Bennett] | |
| 1472 | Task Force Harrier [David Haywood, Tomasz Slanina] | |
| 1473 | US AAF Mustang [David Haywood, Tomasz Slanina] | |
| 1474 | Black Heart [David Haywood, Tomasz Slanina] | |
| 1475 | Red Hawk [David Haywood, Tomasz Slanina] | |
| 1476 | Stagger I [David Haywood, Tomasz Slanina] | |
| 1477 | Sen Jin - Guardian Storm [David Haywood, Tomasz Slanina] | |
| 1478 | Spectrum 2000 [David Haywood, Tomasz Slanina] | |
| 1479 | Fire Hawk [David Haywood, Tomasz Slanina] | |
| 1490 | Galaxy Games (BIOS v1.90) [Luca Elia] | |
| 1491 | Royal Vegas Joker Card [Roberto Fresca] | |
| 1480 | 1492 | |
| 1481 | 1493 | |
| 1482 | 1494 | |
| 1483 | 1495 | New clones added |
| 1484 | 1496 | ---------------- |
| 1485 | World Class Bowling (v1.3) [Brian Troha] | |
| 1486 | ||
| 1497 | Contra (US, Set 2) [Brian Troha] | |
| 1498 | Zero Wing (2 player simultaneous ver.) [Brian Troha] | |
| 1499 | Sand Scorpion (Revised Hardware) [Stefan Lindberg] | |
| 1500 | Galaxian (Taito) [Stefan Lindberg] | |
| 1501 | Jolly Card (3x3 deal) [Roberto Fresca] | |
| 1502 | Jolly Card Professional 2.0 [Roberto Fresca] | |
| 1503 | Lucky Lady (3x3 deal) [Roberto Fresca] | |
| 1504 | Lucky Lady (4x1 aces) [Roberto Fresca] | |
| 1505 | ||
| 1506 | ||
| 1507 | ||
| 1508 | New games marked as GAME_NOT_WORKING | |
| 1509 | ------------------------------------ |
| Previous | 15994 Revisions | Next |