trunk/src/mame/drivers/darius.c
| r241827 | r241828 | |
| 676 | 676 | }; |
| 677 | 677 | |
| 678 | 678 | static GFXDECODE_START( darius ) |
| 679 | | GFXDECODE_ENTRY( "gfx2", 0, tilelayout, 0, 256 ) /* sprites */ |
| 680 | | GFXDECODE_ENTRY( "gfx1", 0, charlayout, 0, 256 ) /* scr tiles */ |
| 681 | | GFXDECODE_ENTRY( "gfx3", 0, char2layout, 0, 256 ) /* top layer scr tiles */ |
| 679 | GFXDECODE_ENTRY( "gfx2", 0, tilelayout, 0, 128 ) /* sprites */ |
| 680 | GFXDECODE_ENTRY( "gfx1", 0, charlayout, 0, 128 ) /* scr tiles */ |
| 681 | GFXDECODE_ENTRY( "gfx3", 0, char2layout, 0, 128 ) /* top layer scr tiles */ |
| 682 | 682 | GFXDECODE_END |
| 683 | 683 | |
| 684 | 684 | |
| r241827 | r241828 | |
| 764 | 764 | |
| 765 | 765 | /* video hardware */ |
| 766 | 766 | MCFG_GFXDECODE_ADD("gfxdecode", "palette", darius) |
| 767 | | MCFG_PALETTE_ADD("palette", 4096*2) |
| 767 | MCFG_PALETTE_ADD("palette", 2048) |
| 768 | 768 | MCFG_PALETTE_FORMAT(xBBBBBGGGGGRRRRR) |
| 769 | 769 | MCFG_DEFAULT_LAYOUT(layout_darius) |
| 770 | 770 | |
trunk/src/mame/drivers/opwolf.c
| r241827 | r241828 | |
| 666 | 666 | }; |
| 667 | 667 | |
| 668 | 668 | static GFXDECODE_START( opwolf ) |
| 669 | | GFXDECODE_ENTRY( "gfx2", 0, tilelayout, 0, 256 ) /* sprites */ |
| 670 | | GFXDECODE_ENTRY( "gfx1", 0, charlayout, 0, 256 ) /* scr tiles */ |
| 669 | GFXDECODE_ENTRY( "gfx2", 0, tilelayout, 0, 128 ) /* sprites */ |
| 670 | GFXDECODE_ENTRY( "gfx1", 0, charlayout, 0, 128 ) /* scr tiles */ |
| 671 | 671 | GFXDECODE_END |
| 672 | 672 | |
| 673 | 673 | static GFXDECODE_START( opwolfb ) |
| 674 | | GFXDECODE_ENTRY( "gfx2", 0, tilelayout_b, 0, 256 ) /* sprites */ |
| 675 | | GFXDECODE_ENTRY( "gfx1", 0, charlayout_b, 0, 256 ) /* scr tiles */ |
| 674 | GFXDECODE_ENTRY( "gfx2", 0, tilelayout_b, 0, 128 ) /* sprites */ |
| 675 | GFXDECODE_ENTRY( "gfx1", 0, charlayout_b, 0, 128 ) /* scr tiles */ |
| 676 | 676 | GFXDECODE_END |
| 677 | 677 | |
| 678 | 678 | |
| r241827 | r241828 | |
| 704 | 704 | MCFG_SCREEN_PALETTE("palette") |
| 705 | 705 | |
| 706 | 706 | MCFG_GFXDECODE_ADD("gfxdecode", "palette", opwolf) |
| 707 | | MCFG_PALETTE_ADD("palette", 8192) |
| 707 | MCFG_PALETTE_ADD("palette", 2048) |
| 708 | 708 | MCFG_PALETTE_FORMAT(xxxxRRRRGGGGBBBB) |
| 709 | 709 | |
| 710 | 710 | MCFG_DEVICE_ADD("pc080sn", PC080SN, 0) |
| r241827 | r241828 | |
| 770 | 770 | MCFG_SCREEN_PALETTE("palette") |
| 771 | 771 | |
| 772 | 772 | MCFG_GFXDECODE_ADD("gfxdecode", "palette", opwolfb) |
| 773 | | MCFG_PALETTE_ADD("palette", 8192) |
| 773 | MCFG_PALETTE_ADD("palette", 2048) |
| 774 | 774 | MCFG_PALETTE_FORMAT(xxxxRRRRGGGGBBBB) |
| 775 | 775 | |
| 776 | 776 | MCFG_DEVICE_ADD("pc080sn", PC080SN, 0) |
trunk/src/mame/drivers/slapshot.c
| r241827 | r241828 | |
| 446 | 446 | |
| 447 | 447 | static GFXDECODE_START( slapshot ) |
| 448 | 448 | GFXDECODE_ENTRY( "gfx2", 0x0, tilelayout, 0, 256 ) /* sprite parts */ |
| 449 | | GFXDECODE_ENTRY( "gfx1", 0x0, slapshot_charlayout, 0, 256 ) /* sprites & playfield */ |
| 449 | GFXDECODE_ENTRY( "gfx1", 0x0, slapshot_charlayout, 4096, 256 ) /* sprites & playfield */ |
| 450 | 450 | GFXDECODE_END |
| 451 | 451 | |
| 452 | 452 | |
| r241827 | r241828 | |
| 514 | 514 | MCFG_TC0480SCP_OFFSETS(30 + 3, 9) |
| 515 | 515 | MCFG_TC0480SCP_OFFSETS_TX(-1, -1) |
| 516 | 516 | MCFG_TC0480SCP_OFFSETS_FLIP(0, 2) |
| 517 | | MCFG_TC0480SCP_COL_BASE(256) |
| 517 | MCFG_TC0480SCP_COL_BASE(4096) |
| 518 | 518 | MCFG_TC0480SCP_GFXDECODE("gfxdecode") |
| 519 | 519 | MCFG_TC0480SCP_PALETTE("palette") |
| 520 | 520 | |
| r241827 | r241828 | |
| 575 | 575 | MCFG_TC0480SCP_OFFSETS(30 + 3, 9) |
| 576 | 576 | MCFG_TC0480SCP_OFFSETS_TX(-1, -1) |
| 577 | 577 | MCFG_TC0480SCP_OFFSETS_FLIP(0, 2) |
| 578 | | MCFG_TC0480SCP_COL_BASE(256) |
| 578 | MCFG_TC0480SCP_COL_BASE(4096) |
| 579 | 579 | MCFG_TC0480SCP_GFXDECODE("gfxdecode") |
| 580 | 580 | MCFG_TC0480SCP_PALETTE("palette") |
| 581 | 581 | |
trunk/src/mame/drivers/taito_f2.c
| r241827 | r241828 | |
| 2792 | 2792 | RGN_FRAC(1,4), |
| 2793 | 2793 | 4, /* 4 bits per pixel */ |
| 2794 | 2794 | { RGN_FRAC(0,4), RGN_FRAC(1,4),RGN_FRAC(2,4),RGN_FRAC(3,4) }, |
| 2795 | | { 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 }, |
| 2796 | | { 0*16, 1*16, 2*16, 3*16, 4*16, 5*16, 6*16, 7*16, 8*16, 9*16, 10*16, 11*16, 12*16, 13*16, 14*16, 15*16 }, |
| 2795 | { STEP16(0,1) }, |
| 2796 | { STEP16(0,16) }, |
| 2797 | 2797 | 16*16 /* every sprite takes 128 consecutive bytes */ |
| 2798 | 2798 | }; |
| 2799 | 2799 | |
| 2800 | static const gfx_layout footchmpbl_charlayout = |
| 2801 | { |
| 2802 | 8,8, /* 16*16 sprites */ |
| 2803 | 256, /* the ROMs are mostly empty */ |
| 2804 | 4, /* 4 bits per pixel */ |
| 2805 | { RGN_FRAC(0,4), RGN_FRAC(1,4),RGN_FRAC(2,4),RGN_FRAC(3,4) }, |
| 2806 | { STEP8(0,1) }, |
| 2807 | { STEP8(0,8) }, |
| 2808 | 8*8 /* every sprite takes 128 consecutive bytes */ |
| 2809 | }; |
| 2800 | 2810 | |
| 2801 | 2811 | static GFXDECODE_START( footchmpbl ) |
| 2802 | 2812 | GFXDECODE_ENTRY( "gfx2", 0, footchmpbl_tilelayout, 0, 256 ) /* sprites & playfield */ |
| 2803 | 2813 | GFXDECODE_ENTRY( "gfx1", 0, footchmpbl_tilelayout, 0, 256 ) /* sprites & playfield */ |
| 2804 | | GFXDECODE_ENTRY( "gfx3", 0, footchmpbl_tilelayout, 0, 256 ) // gets wiped out by the dynamic decode atm |
| 2805 | | GFXDECODE_ENTRY( "gfx3", 0, footchmpbl_tilelayout, 0, 256 ) // bootleg should clearly use this instead of the uploaded tiles |
| 2814 | GFXDECODE_ENTRY( "gfx3", 0, footchmpbl_charlayout, 0, 256 ) // gets wiped out by the dynamic decode atm |
| 2815 | GFXDECODE_ENTRY( "gfx3", 0, footchmpbl_charlayout, 0, 256 ) // bootleg should clearly use this instead of the uploaded tiles |
| 2806 | 2816 | GFXDECODE_END |
| 2807 | 2817 | |
| 2808 | 2818 | |
| r241827 | r241828 | |
| 3417 | 3427 | MCFG_TC0480SCP_OFFSETS(0x32 + 3, -0x04) |
| 3418 | 3428 | MCFG_TC0480SCP_OFFSETS_TX(1, 0) |
| 3419 | 3429 | MCFG_TC0480SCP_OFFSETS_FLIP(-1, 0) |
| 3420 | | MCFG_TC0480SCP_COL_BASE(256) |
| 3430 | MCFG_TC0480SCP_COL_BASE(4096) |
| 3421 | 3431 | MCFG_TC0480SCP_GFXDECODE("gfxdecode") |
| 3422 | 3432 | MCFG_TC0480SCP_PALETTE("palette") |
| 3423 | 3433 | |
trunk/src/mame/video/darius.c
| r241827 | r241828 | |
| 3 | 3 | |
| 4 | 4 | /***************************************************************************/ |
| 5 | 5 | |
| 6 | | inline void darius_state::actual_get_fg_tile_info( tile_data &tileinfo, int tile_index, UINT16 *ram, int gfxnum ) |
| 6 | TILE_GET_INFO_MEMBER(darius_state::get_fg_tile_info) |
| 7 | 7 | { |
| 8 | | UINT16 code = (ram[tile_index + 0x2000] & 0x7ff); |
| 9 | | UINT16 attr = ram[tile_index]; |
| 8 | UINT16 code = (m_fg_ram[tile_index + 0x2000] & 0x7ff); |
| 9 | UINT16 attr = m_fg_ram[tile_index]; |
| 10 | 10 | |
| 11 | | SET_TILE_INFO_MEMBER(gfxnum, |
| 11 | SET_TILE_INFO_MEMBER(2, |
| 12 | 12 | code, |
| 13 | | ((attr & 0xff) << 2), |
| 13 | (attr & 0x7f), |
| 14 | 14 | TILE_FLIPYX((attr & 0xc000) >> 14)); |
| 15 | 15 | } |
| 16 | 16 | |
| 17 | | TILE_GET_INFO_MEMBER(darius_state::get_fg_tile_info) |
| 18 | | { |
| 19 | | actual_get_fg_tile_info(tileinfo, tile_index, m_fg_ram, 2); |
| 20 | | } |
| 21 | | |
| 22 | 17 | /***************************************************************************/ |
| 23 | 18 | |
| 24 | 19 | void darius_state::video_start() |
| 25 | 20 | { |
| 21 | m_gfxdecode->gfx(2)->set_granularity(16); |
| 26 | 22 | m_fg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(darius_state::get_fg_tile_info),this),TILEMAP_SCAN_ROWS,8,8,128,64); |
| 27 | 23 | |
| 28 | 24 | m_fg_tilemap->set_transparent_pen(0); |
trunk/src/mame/video/tc0100scn.c
| r241827 | r241828 | |
| 132 | 132 | m_bgscrolly(0), |
| 133 | 133 | m_fgscrollx(0), |
| 134 | 134 | m_fgscrolly(0), |
| 135 | | m_bg_col_mult(0), |
| 136 | 135 | m_bg_tilemask(0), |
| 137 | | m_tx_col_mult(0), |
| 138 | 136 | m_gfxbank(0), |
| 139 | | m_colbank(0), |
| 140 | 137 | m_bg0_colbank(0), |
| 141 | 138 | m_bg1_colbank(0), |
| 142 | 139 | m_tx_colbank(0), |
| r241827 | r241828 | |
| 257 | 254 | |
| 258 | 255 | m_bg_tilemask = 0xffff; /* Mjnquest has 0x7fff tilemask */ |
| 259 | 256 | |
| 260 | | m_bg_col_mult = 1; /* multiplier for when bg gfx != 4bpp */ |
| 261 | | m_tx_col_mult = 1; /* multiplier needed when bg gfx is 6bpp */ |
| 257 | m_ram = auto_alloc_array_clear(machine(), UINT16, TC0100SCN_RAM_SIZE / 2); |
| 262 | 258 | |
| 263 | | if (m_gfxdecode->gfx(m_gfxnum)->granularity() == 2) /* Yuyugogo, Yesnoj */ |
| 264 | | m_bg_col_mult = 8; |
| 259 | set_layer_ptrs(); |
| 265 | 260 | |
| 266 | | if (m_gfxdecode->gfx(m_gfxnum)->granularity() == 0x40) /* Undrfire */ |
| 267 | | m_tx_col_mult = 4; |
| 261 | /* create the char set (gfx will then be updated dynamically from RAM) */ |
| 262 | m_gfxdecode->set_gfx(m_txnum, global_alloc(gfx_element(m_palette, tc0100scn_charlayout, (UINT8 *)m_char_ram, NATIVE_ENDIAN_VALUE_LE_BE(8,0), 256, 0))); |
| 268 | 263 | |
| 269 | | //logerror("TC0100SCN bg gfx granularity %04x: multiplier %04x\n", m_gfxdecode->gfx(m_gfxnum)->granularity(), m_tx_col_mult); |
| 264 | gfx_element *gfx = m_gfxdecode->gfx(m_gfxnum); |
| 265 | gfx_element *txt = m_gfxdecode->gfx(m_txnum); |
| 270 | 266 | |
| 271 | | m_ram = auto_alloc_array_clear(machine(), UINT16, TC0100SCN_RAM_SIZE / 2); |
| 267 | if (gfx->granularity() == 2) /* Yuyugogo, Yesnoj */ |
| 268 | gfx->set_granularity(16); |
| 272 | 269 | |
| 273 | | set_layer_ptrs(); |
| 270 | txt->set_granularity(gfx->granularity()); |
| 274 | 271 | |
| 275 | 272 | set_colbanks(0, 0, 0); /* standard values, only Wgp & multiscreen games change them */ |
| 276 | 273 | /* we call this here, so that they can be modified at video_start*/ |
| 277 | 274 | |
| 278 | | /* create the char set (gfx will then be updated dynamically from RAM) */ |
| 279 | | m_gfxdecode->set_gfx(m_txnum, global_alloc(gfx_element(m_palette, tc0100scn_charlayout, (UINT8 *)m_char_ram, NATIVE_ENDIAN_VALUE_LE_BE(8,0), 64, 0))); |
| 280 | | |
| 281 | 275 | save_pointer(NAME(m_ram), TC0100SCN_RAM_SIZE / 2); |
| 282 | 276 | save_item(NAME(m_ctrl)); |
| 283 | 277 | save_item(NAME(m_dblwidth)); |
| r241827 | r241828 | |
| 292 | 286 | void tc0100scn_device::device_reset() |
| 293 | 287 | { |
| 294 | 288 | m_dblwidth = 0; |
| 295 | | m_colbank = 0; |
| 296 | 289 | m_gfxbank = 0; /* Mjnquest uniquely banks tiles */ |
| 297 | 290 | |
| 298 | 291 | for (int i = 0; i < 8; i++) |
| r241827 | r241828 | |
| 304 | 297 | DEVICE HANDLERS |
| 305 | 298 | *****************************************************************************/ |
| 306 | 299 | |
| 307 | | void tc0100scn_device::common_get_bg0_tile_info( tile_data &tileinfo, int tile_index, UINT16 *ram, int gfxnum, int colbank, int dblwidth ) |
| 300 | void tc0100scn_device::common_get_tile_info( tile_data &tileinfo, int tile_index, UINT16 *ram, int colbank ) |
| 308 | 301 | { |
| 309 | 302 | int code, attr; |
| 310 | 303 | |
| 311 | | if (!dblwidth) |
| 304 | if (!m_dblwidth) |
| 312 | 305 | { |
| 313 | 306 | /* Mahjong Quest (F2 system) inexplicably has a banking feature */ |
| 314 | 307 | code = (ram[2 * tile_index + 1] & m_bg_tilemask) + (m_gfxbank << 15); |
| r241827 | r241828 | |
| 320 | 313 | attr = ram[2 * tile_index]; |
| 321 | 314 | } |
| 322 | 315 | |
| 323 | | SET_TILE_INFO_MEMBER(gfxnum, |
| 316 | SET_TILE_INFO_MEMBER(m_gfxnum, |
| 324 | 317 | code, |
| 325 | | (((attr * m_bg_col_mult) + m_bg0_colbank) & 0xff) + colbank, |
| 318 | ((attr + colbank) & 0xff), |
| 326 | 319 | TILE_FLIPYX((attr & 0xc000) >> 14)); |
| 327 | 320 | } |
| 328 | 321 | |
| 329 | | void tc0100scn_device::common_get_bg1_tile_info( tile_data &tileinfo, int tile_index, UINT16 *ram, int gfxnum, int colbank, int dblwidth ) |
| 330 | | { |
| 331 | | int code, attr; |
| 332 | | |
| 333 | | if (!dblwidth) |
| 334 | | { |
| 335 | | /* Mahjong Quest (F2 system) inexplicably has a banking feature */ |
| 336 | | code = (ram[2 * tile_index + 1] & m_bg_tilemask) + (m_gfxbank << 15); |
| 337 | | attr = ram[2 * tile_index]; |
| 338 | | } |
| 339 | | else |
| 340 | | { |
| 341 | | code = ram[2 * tile_index + 1] & m_bg_tilemask; |
| 342 | | attr = ram[2 * tile_index]; |
| 343 | | } |
| 344 | | |
| 345 | | SET_TILE_INFO_MEMBER(gfxnum, |
| 346 | | code, |
| 347 | | (((attr * m_bg_col_mult) + m_bg1_colbank) & 0xff) + colbank, |
| 348 | | TILE_FLIPYX((attr & 0xc000) >> 14)); |
| 349 | | } |
| 350 | | |
| 351 | | void tc0100scn_device::common_get_tx_tile_info( tile_data &tileinfo, int tile_index, UINT16 *ram, int gfxnum, int colbank, int dblwidth ) |
| 352 | | { |
| 353 | | int attr = ram[tile_index]; |
| 354 | | |
| 355 | | SET_TILE_INFO_MEMBER(gfxnum, |
| 356 | | attr & 0xff, |
| 357 | | ((((attr >> 6) & 0xfc) * m_tx_col_mult + (m_tx_colbank << 2)) & 0x3ff) + colbank * 4, |
| 358 | | TILE_FLIPYX((attr & 0xc000) >> 14)); |
| 359 | | } |
| 360 | | |
| 361 | 322 | TILE_GET_INFO_MEMBER(tc0100scn_device::get_bg_tile_info) |
| 362 | 323 | { |
| 363 | | common_get_bg0_tile_info(tileinfo, tile_index, m_bg_ram, m_gfxnum, m_colbank, m_dblwidth); |
| 324 | common_get_tile_info(tileinfo, tile_index, m_bg_ram, m_bg0_colbank); |
| 364 | 325 | } |
| 365 | 326 | |
| 366 | 327 | TILE_GET_INFO_MEMBER(tc0100scn_device::get_fg_tile_info) |
| 367 | 328 | { |
| 368 | | common_get_bg1_tile_info(tileinfo, tile_index, m_fg_ram, m_gfxnum, m_colbank, m_dblwidth); |
| 329 | common_get_tile_info(tileinfo, tile_index, m_fg_ram, m_bg1_colbank); |
| 369 | 330 | } |
| 370 | 331 | |
| 371 | 332 | TILE_GET_INFO_MEMBER(tc0100scn_device::get_tx_tile_info) |
| 372 | 333 | { |
| 373 | | common_get_tx_tile_info(tileinfo, tile_index, m_tx_ram, m_txnum, m_colbank, m_dblwidth); |
| 374 | | } |
| 334 | int attr = m_tx_ram[tile_index]; |
| 375 | 335 | |
| 376 | | void tc0100scn_device::set_colbank( int col ) |
| 377 | | { |
| 378 | | m_colbank = col; |
| 336 | SET_TILE_INFO_MEMBER(m_txnum, |
| 337 | attr & 0x00ff, |
| 338 | ((attr & 0x3f00) >> 8) + m_tx_colbank, |
| 339 | TILE_FLIPYX((attr & 0xc000) >> 14)); |
| 379 | 340 | } |
| 380 | 341 | |
| 381 | 342 | void tc0100scn_device::set_colbanks( int bg0, int bg1, int tx ) |
trunk/src/mame/video/tc0100scn.h
| r241827 | r241828 | |
| 39 | 39 | To change from the default (0,0,0) use after calling TC0100SCN_vh_start */ |
| 40 | 40 | void set_colbanks(int bg0, int bg1, int tx); |
| 41 | 41 | |
| 42 | | /* Function to set separate color banks for each TC0100SCN. |
| 43 | | To change from the default (0,0,0) use after calling TC0100SCN_vh_start */ |
| 44 | | void set_colbank(int colbank); |
| 45 | | |
| 46 | 42 | /* Function to set bg tilemask < 0xffff */ |
| 47 | 43 | void set_bg_tilemask(int mask); |
| 48 | 44 | |
| r241827 | r241828 | |
| 92 | 88 | /* We keep two tilemaps for each of the 3 actual tilemaps: one at standard width, one double */ |
| 93 | 89 | tilemap_t *m_tilemap[3][2]; |
| 94 | 90 | |
| 95 | | int m_bg_col_mult, m_bg_tilemask, m_tx_col_mult; |
| 96 | | INT32 m_gfxbank, m_colbank; |
| 91 | int m_bg_tilemask; |
| 92 | INT32 m_gfxbank; |
| 97 | 93 | INT32 m_bg0_colbank, m_bg1_colbank, m_tx_colbank; |
| 98 | 94 | int m_dblwidth; |
| 99 | 95 | |
| r241827 | r241828 | |
| 112 | 108 | TILE_GET_INFO_MEMBER(get_fg_tile_info); |
| 113 | 109 | TILE_GET_INFO_MEMBER(get_tx_tile_info); |
| 114 | 110 | |
| 115 | | void common_get_bg0_tile_info(tile_data &tileinfo, int tile_index, UINT16 *ram, int gfxnum, int colbank, int dblwidth); |
| 116 | | void common_get_bg1_tile_info(tile_data &tileinfo, int tile_index, UINT16 *ram, int gfxnum, int colbank, int dblwidth); |
| 117 | | void common_get_tx_tile_info(tile_data &tileinfo, int tile_index, UINT16 *ram, int gfxnum, int colbank, int dblwidth); |
| 111 | void common_get_tile_info(tile_data &tileinfo, int tile_index, UINT16 *ram, int colbank); |
| 118 | 112 | |
| 119 | 113 | void tilemap_draw_fg(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, tilemap_t* tmap, int flags, UINT32 priority); |
| 120 | 114 | void set_layer_ptrs(); |
trunk/src/mame/video/tc0480scp.c
| r241827 | r241828 | |
| 282 | 282 | set_layer_ptrs(); |
| 283 | 283 | |
| 284 | 284 | /* create the char set (gfx will then be updated dynamically from RAM) */ |
| 285 | | m_gfxdecode->set_gfx(m_txnum, global_alloc(gfx_element(m_palette, tc0480scp_charlayout, (UINT8 *)m_char_ram, NATIVE_ENDIAN_VALUE_LE_BE(8,0), 64, 0))); |
| 285 | m_gfxdecode->set_gfx(m_txnum, global_alloc(gfx_element(m_palette, tc0480scp_charlayout, (UINT8 *)m_char_ram, NATIVE_ENDIAN_VALUE_LE_BE(8,0), 64, m_col_base))); |
| 286 | m_gfxdecode->gfx(m_gfxnum)->set_colorbase(m_col_base); |
| 286 | 287 | |
| 287 | 288 | save_item(NAME(m_ram)); |
| 288 | 289 | save_item(NAME(m_ctrl)); |
| r241827 | r241828 | |
| 317 | 318 | int attr = ram[2 * tile_index]; |
| 318 | 319 | SET_TILE_INFO_MEMBER(gfxnum, |
| 319 | 320 | code, |
| 320 | | (attr & 0xff) + m_col_base, |
| 321 | (attr & 0xff), |
| 321 | 322 | TILE_FLIPYX((attr & 0xc000) >> 14)); |
| 322 | 323 | } |
| 323 | 324 | |
| r241827 | r241828 | |
| 326 | 327 | int attr = ram[tile_index]; |
| 327 | 328 | SET_TILE_INFO_MEMBER(gfxnum, |
| 328 | 329 | attr & 0xff, |
| 329 | | ((attr & 0x3f00) >> 8) + m_col_base, |
| 330 | ((attr & 0x3f00) >> 8), |
| 330 | 331 | TILE_FLIPYX((attr & 0xc000) >> 14)); |
| 331 | 332 | } |
| 332 | 333 | |
| r241827 | r241828 | |
| 654 | 655 | TODO |
| 655 | 656 | ---- |
| 656 | 657 | |
| 657 | | Broken for any rotation except ROT0. ROT180 support could probably |
| 658 | | be added without too much difficulty: machine_flip is there as a |
| 659 | | place-holder for this purpose. |
| 660 | | |
| 661 | 658 | Wouldn't work if y needs to be > 255 (i.e. if some game uses a |
| 662 | 659 | bigger than usual vertical visible area). Refer to tc0080vco |
| 663 | 660 | custom draw routine for an example of dealing with this. |
| r241827 | r241828 | |
| 709 | 706 | int flip = m_pri_reg & 0x40; |
| 710 | 707 | int i, y, y_index, src_y_index, row_index; |
| 711 | 708 | int x_index, x_step; |
| 712 | | int machine_flip = 0; /* for ROT 180 ? */ |
| 713 | 709 | |
| 714 | 710 | UINT16 screen_width = 512; //cliprect.width(); |
| 715 | 711 | UINT16 min_y = cliprect.min_y; |
| r241827 | r241828 | |
| 736 | 732 | y_index -= (m_y_offset - min_y) * zoomy; |
| 737 | 733 | } |
| 738 | 734 | |
| 739 | | if (!machine_flip) |
| 740 | | y = min_y; |
| 741 | | else |
| 742 | | y = max_y; |
| 735 | y = min_y; |
| 743 | 736 | |
| 744 | 737 | do |
| 745 | 738 | { |
| r241827 | r241828 | |
| 781 | 774 | taitoic_drawscanline(bitmap, cliprect, 0, y, scanline, (flags & TILEMAP_DRAW_OPAQUE) ? 0 : 1, ROT0, screen.priority(), priority); |
| 782 | 775 | |
| 783 | 776 | y_index += zoomy; |
| 784 | | if (!machine_flip) |
| 785 | | y++; |
| 786 | | else |
| 787 | | y--; |
| 777 | y++; |
| 788 | 778 | } |
| 789 | | while ((!machine_flip && y <= max_y) || (machine_flip && y >= min_y)); |
| 779 | while (y <= max_y); |
| 790 | 780 | |
| 791 | 781 | } |
| 792 | 782 | } |
| r241827 | r241828 | |
| 798 | 788 | TODO |
| 799 | 789 | ---- |
| 800 | 790 | |
| 801 | | Broken for any rotation except ROT0. ROT180 support could probably |
| 802 | | be added without too much difficulty: machine_flip is there as a |
| 803 | | place-holder for this purpose. |
| 804 | | |
| 805 | 791 | Wouldn't work if y needs to be > 255 (i.e. if some game uses a |
| 806 | 792 | bigger than usual vertical visible area). Refer to tc0080vco |
| 807 | 793 | custom draw routine for an example of dealing with this. |
| r241827 | r241828 | |
| 844 | 830 | UINT32 zoomx, zoomy; |
| 845 | 831 | UINT16 scanline[512]; |
| 846 | 832 | int flipscreen = m_pri_reg & 0x40; |
| 847 | | int machine_flip = 0; /* for ROT 180 ? */ |
| 848 | 833 | |
| 849 | 834 | UINT16 screen_width = 512; //cliprect.width(); |
| 850 | 835 | UINT16 min_y = cliprect.min_y; |
| r241827 | r241828 | |
| 878 | 863 | y_index -= (m_y_offset - min_y) * zoomy; |
| 879 | 864 | } |
| 880 | 865 | |
| 881 | | |
| 882 | | if (!machine_flip) |
| 883 | 866 | y = min_y; |
| 884 | | else |
| 885 | | y = max_y; |
| 886 | 867 | |
| 887 | 868 | do |
| 888 | 869 | { |
| r241827 | r241828 | |
| 944 | 925 | taitoic_drawscanline(bitmap, cliprect, 0, y, scanline, (flags & TILEMAP_DRAW_OPAQUE) ? 0 : 1, ROT0, screen.priority(), priority); |
| 945 | 926 | |
| 946 | 927 | y_index += zoomy; |
| 947 | | if (!machine_flip) |
| 948 | | y++; |
| 949 | | else |
| 950 | | y--; |
| 928 | y++; |
| 951 | 929 | } |
| 952 | | while ((!machine_flip && y<=max_y) || (machine_flip && y>=min_y)); |
| 930 | while (y<=max_y); |
| 953 | 931 | } |
| 954 | 932 | |
| 955 | 933 | |