trunk/src/mame/video/goldstar.c
| r244897 | r244898 | |
| 34 | 34 | |
| 35 | 35 | TILE_GET_INFO_MEMBER(goldstar_state::get_goldstar_fg_tile_info) |
| 36 | 36 | { |
| 37 | | int code = m_fg_vidram[tile_index]; |
| 38 | | int attr = m_fg_atrram[tile_index]; |
| 37 | int const code = m_fg_vidram[tile_index]; |
| 38 | int const attr = m_fg_atrram[tile_index]; |
| 39 | 39 | |
| 40 | 40 | SET_TILE_INFO_MEMBER(0, |
| 41 | | code | (attr & 0xf0)<<4, |
| 42 | | attr&0x0f, |
| 41 | code | (attr & 0xf0) << 4, |
| 42 | attr & 0x0f, |
| 43 | 43 | 0); |
| 44 | 44 | } |
| 45 | 45 | |
| r244897 | r244898 | |
| 47 | 47 | // colour / high tile bits are swapped around |
| 48 | 48 | TILE_GET_INFO_MEMBER(goldstar_state::get_cherrym_fg_tile_info) |
| 49 | 49 | { |
| 50 | | int code = m_fg_vidram[tile_index]; |
| 51 | | int attr = m_fg_atrram[tile_index]; |
| 50 | int const code = m_fg_vidram[tile_index]; |
| 51 | int const attr = m_fg_atrram[tile_index]; |
| 52 | 52 | |
| 53 | 53 | SET_TILE_INFO_MEMBER(0, |
| 54 | | code | (attr & 0x0f)<<8, |
| 55 | | (attr&0xf0)>>4, |
| 54 | code | (attr & 0x0f) << 8, |
| 55 | (attr & 0xf0) >> 4, |
| 56 | 56 | 0); |
| 57 | 57 | } |
| 58 | 58 | |
| r244897 | r244898 | |
| 66 | 66 | |
| 67 | 67 | TILE_GET_INFO_MEMBER(goldstar_state::get_goldstar_reel1_tile_info) |
| 68 | 68 | { |
| 69 | | int code = m_reel1_ram[tile_index]; |
| 70 | | |
| 71 | 69 | SET_TILE_INFO_MEMBER(1, |
| 72 | | code, |
| 70 | m_reel1_ram[tile_index], |
| 73 | 71 | m_bgcolor, |
| 74 | 72 | 0); |
| 75 | 73 | } |
| r244897 | r244898 | |
| 83 | 81 | |
| 84 | 82 | TILE_GET_INFO_MEMBER(goldstar_state::get_goldstar_reel2_tile_info) |
| 85 | 83 | { |
| 86 | | int code = m_reel2_ram[tile_index]; |
| 87 | | |
| 88 | 84 | SET_TILE_INFO_MEMBER(1, |
| 89 | | code, |
| 85 | m_reel2_ram[tile_index], |
| 90 | 86 | m_bgcolor, |
| 91 | 87 | 0); |
| 92 | 88 | } |
| r244897 | r244898 | |
| 99 | 95 | |
| 100 | 96 | TILE_GET_INFO_MEMBER(goldstar_state::get_goldstar_reel3_tile_info) |
| 101 | 97 | { |
| 102 | | int code = m_reel3_ram[tile_index]; |
| 103 | | |
| 104 | 98 | SET_TILE_INFO_MEMBER(1, |
| 105 | | code, |
| 99 | m_reel3_ram[tile_index], |
| 106 | 100 | m_bgcolor, |
| 107 | 101 | 0); |
| 108 | 102 | } |
| r244897 | r244898 | |
| 159 | 153 | |
| 160 | 154 | UINT32 goldstar_state::screen_update_goldstar(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
| 161 | 155 | { |
| 162 | | int i; |
| 163 | | |
| 164 | 156 | bitmap.fill(m_palette->black_pen(), cliprect); |
| 165 | 157 | |
| 166 | | if (!(m_cm_enable_reg &0x01)) |
| 158 | if (!(m_cm_enable_reg & 0x01)) |
| 167 | 159 | return 0; |
| 168 | 160 | |
| 169 | | if (m_cm_enable_reg &0x08) |
| 161 | if (m_cm_enable_reg & 0x08) |
| 170 | 162 | { |
| 171 | | for (i= 0;i < 64;i++) |
| 163 | for (int i = 0; i < 64; i++) |
| 172 | 164 | { |
| 173 | 165 | m_reel1_tilemap->set_scrolly(i, m_reel1_scroll[i]); |
| 174 | 166 | m_reel2_tilemap->set_scrolly(i, m_reel2_scroll[i]); |
| 175 | 167 | m_reel3_tilemap->set_scrolly(i, m_reel3_scroll[i]); |
| 176 | 168 | } |
| 177 | 169 | |
| 178 | | |
| 179 | 170 | // are these hardcoded, or registers? |
| 180 | 171 | const rectangle visible1(0*8, (14+48)*8-1, 4*8, (4+7)*8-1); |
| 181 | 172 | const rectangle visible2(0*8, (14+48)*8-1, 12*8, (12+7)*8-1); |
| r244897 | r244898 | |
| 186 | 177 | m_reel3_tilemap->draw(screen, bitmap, visible3, 0, 0); |
| 187 | 178 | } |
| 188 | 179 | |
| 189 | | if (m_cm_enable_reg &0x04) |
| 180 | if (m_cm_enable_reg & 0x04) |
| 190 | 181 | { |
| 191 | 182 | if (memregion("user1")->base()) |
| 192 | 183 | { |
| 193 | 184 | gfx_element *gfx = m_gfxdecode->gfx(2); |
| 194 | | int girlyscroll = (INT8)((m_cm_girl_scroll & 0xf0)); |
| 195 | | int girlxscroll = (INT8)((m_cm_girl_scroll & 0x0f)<<4); |
| 185 | int const girlyscroll = (INT8)((m_cm_girl_scroll & 0xf0)); |
| 186 | int const girlxscroll = (INT8)((m_cm_girl_scroll & 0x0f) << 4); |
| 196 | 187 | |
| 197 | 188 | gfx->zoom_transpen(bitmap,cliprect,m_cmaster_girl_num,m_cmaster_girl_pal,0,0,-(girlxscroll*2),-(girlyscroll), 0x20000, 0x10000,0); |
| 198 | 189 | } |
| 199 | 190 | } |
| 200 | 191 | |
| 201 | | if (m_cm_enable_reg &0x02) |
| 202 | | { |
| 192 | if (m_cm_enable_reg & 0x02) |
| 203 | 193 | m_fg_tilemap->draw(screen, bitmap, cliprect, 0, 0); |
| 204 | | } |
| 205 | 194 | |
| 206 | 195 | return 0; |
| 207 | 196 | } |
| r244897 | r244898 | |
| 209 | 198 | |
| 210 | 199 | UINT32 goldstar_state::screen_update_cmast91(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
| 211 | 200 | { |
| 212 | | int i; |
| 213 | | |
| 214 | 201 | bitmap.fill(m_palette->black_pen(), cliprect); |
| 215 | 202 | |
| 216 | | if (!(m_cm_enable_reg &0x01)) |
| 203 | if (!(m_cm_enable_reg & 0x01)) |
| 217 | 204 | return 0; |
| 218 | 205 | |
| 219 | | if (m_cm_enable_reg &0x08) |
| 206 | if (m_cm_enable_reg & 0x08) |
| 220 | 207 | { |
| 221 | | for (i= 0;i < 64;i++) |
| 208 | for (int i = 0; i < 64; i++) |
| 222 | 209 | { |
| 223 | 210 | m_reel1_tilemap->set_scrolly(i, m_reel1_scroll[i]); |
| 224 | 211 | m_reel2_tilemap->set_scrolly(i, m_reel2_scroll[i]); |
| 225 | 212 | m_reel3_tilemap->set_scrolly(i, m_reel3_scroll[i]); |
| 226 | 213 | } |
| 227 | 214 | |
| 228 | | const rectangle visible1(0*8, (14+48)*8-1, 4*8, (4+7)*8-1); /* same start for reel1 */ |
| 215 | const rectangle visible1(0*8, (14+48)*8-1, 4*8, (4+7)*8-1); /* same start for reel1 */ |
| 229 | 216 | const rectangle visible2(0*8, (14+48)*8-1, 11*8, (12+7)*8-1); /* 4 pixels less for reel2 */ |
| 230 | 217 | const rectangle visible3(0*8, (14+48)*8-1, 19*8, (19+7)*8-1); /* 8 pixels less for reel3 */ |
| 231 | 218 | |
| r244897 | r244898 | |
| 234 | 221 | m_reel3_tilemap->draw(screen, bitmap, visible3, 0, 0); |
| 235 | 222 | } |
| 236 | 223 | |
| 237 | | if (m_cm_enable_reg &0x02) |
| 238 | | { |
| 224 | if (m_cm_enable_reg & 0x02) |
| 239 | 225 | m_fg_tilemap->draw(screen, bitmap, cliprect, 0, 0); |
| 240 | | } |
| 241 | 226 | |
| 242 | 227 | return 0; |
| 243 | 228 | } |
| r244897 | r244898 | |
| 287 | 272 | |
| 288 | 273 | |
| 289 | 274 | */ |
| 290 | | m_cmaster_girl_num = (data >> 4)&0x7; |
| 291 | | m_cmaster_girl_pal = (data >> 2)&0x3; |
| 275 | m_cmaster_girl_num = (data >> 4) & 0x7; |
| 276 | m_cmaster_girl_pal = (data >> 2) & 0x3; |
| 292 | 277 | |
| 293 | 278 | //bgcolor = (data & 0x03) >> 0; |
| 294 | 279 | |
| r244897 | r244898 | |
| 310 | 295 | |
| 311 | 296 | UINT32 cmaster_state::screen_update_amcoe1a(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
| 312 | 297 | { |
| 313 | | int i; |
| 314 | | |
| 315 | 298 | bitmap.fill(m_palette->black_pen(), cliprect); |
| 316 | 299 | |
| 317 | | if (!(m_cm_enable_reg &0x01)) |
| 300 | if (!(m_cm_enable_reg & 0x01)) |
| 318 | 301 | return 0; |
| 319 | 302 | |
| 320 | | if (m_cm_enable_reg &0x08) |
| 303 | if (m_cm_enable_reg & 0x08) |
| 321 | 304 | { |
| 322 | | for (i= 0;i < 64;i++) |
| 305 | for (int i= 0;i < 64;i++) |
| 323 | 306 | { |
| 324 | 307 | m_reel1_tilemap->set_scrolly(i, m_reel1_scroll[i]); |
| 325 | 308 | m_reel2_tilemap->set_scrolly(i, m_reel2_scroll[i]); |
| 326 | 309 | m_reel3_tilemap->set_scrolly(i, m_reel3_scroll[i]); |
| 327 | 310 | } |
| 328 | 311 | |
| 329 | | const rectangle visible1(0*8, (14+48)*8-1, 4*8, (4+6)*8-1); |
| 330 | | const rectangle visible2(0*8, (14+48)*8-1, 10*8, (10+6)*8-1); |
| 331 | | const rectangle visible3(0*8, (14+48)*8-1, 16*8, (16+6)*8-1); |
| 312 | rectangle const visible1(0*8, (14+48)*8-1, 4*8, (4+6)*8-1); |
| 313 | rectangle const visible2(0*8, (14+48)*8-1, 10*8, (10+6)*8-1); |
| 314 | rectangle const visible3(0*8, (14+48)*8-1, 16*8, (16+6)*8-1); |
| 332 | 315 | |
| 333 | 316 | m_reel1_tilemap->draw(screen, bitmap, visible1, 0, 0); |
| 334 | 317 | m_reel2_tilemap->draw(screen, bitmap, visible2, 0, 0); |
| 335 | 318 | m_reel3_tilemap->draw(screen, bitmap, visible3, 0, 0); |
| 336 | 319 | } |
| 337 | 320 | |
| 338 | | if (m_cm_enable_reg &0x04) |
| 321 | if (m_cm_enable_reg & 0x04) |
| 339 | 322 | { |
| 340 | 323 | // no girls |
| 341 | 324 | } |
| 342 | 325 | |
| 343 | | if (m_cm_enable_reg &0x02) |
| 344 | | { |
| 326 | if (m_cm_enable_reg & 0x02) |
| 345 | 327 | m_fg_tilemap->draw(screen, bitmap, cliprect, 0, 0); |
| 346 | | } |
| 347 | 328 | |
| 348 | 329 | return 0; |
| 349 | 330 | } |
| r244897 | r244898 | |
| 352 | 333 | |
| 353 | 334 | TILE_GET_INFO_MEMBER(wingco_state::get_magical_fg_tile_info) |
| 354 | 335 | { |
| 355 | | int code = m_fg_vidram[tile_index]; |
| 356 | | int attr = m_fg_atrram[tile_index]; |
| 336 | int const code = m_fg_vidram[tile_index]; |
| 337 | int const attr = m_fg_atrram[tile_index]; |
| 357 | 338 | |
| 358 | 339 | SET_TILE_INFO_MEMBER(0, |
| 359 | | (code | (attr & 0xf0)<<4)+m_tile_bank*0x1000, |
| 360 | | attr&0x0f, |
| 340 | (code | (attr & 0xf0)<<4) + (m_tile_bank * 0x1000), |
| 341 | attr & 0x0f, |
| 361 | 342 | 0); |
| 362 | 343 | } |
| 363 | 344 | |
| r244897 | r244898 | |
| 395 | 376 | |
| 396 | 377 | UINT32 wingco_state::screen_update_bingowng(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
| 397 | 378 | { |
| 398 | | int i; |
| 399 | | |
| 400 | 379 | bitmap.fill(m_palette->black_pen(), cliprect); |
| 401 | 380 | |
| 402 | | if (!(m_cm_enable_reg &0x01)) |
| 381 | if (!(m_cm_enable_reg & 0x01)) |
| 403 | 382 | return 0; |
| 404 | 383 | |
| 405 | | if (m_cm_enable_reg &0x08) |
| 384 | if (m_cm_enable_reg & 0x08) |
| 406 | 385 | { |
| 407 | | for (i= 0;i < 64;i++) |
| 386 | for (int i = 0; i < 64; i++) |
| 408 | 387 | { |
| 409 | 388 | m_reel1_tilemap->set_scrolly(i, m_reel1_scroll[i]); |
| 410 | 389 | } |
| 411 | 390 | |
| 412 | | |
| 413 | | const rectangle visible1(0*8, (14+48)*8-1, 3*8, (4+7)*8-1); |
| 391 | rectangle const visible1(0*8, (14+48)*8-1, 3*8, (4+7)*8-1); |
| 414 | 392 | m_reel1_tilemap->draw(screen, bitmap, visible1, 0, 0); |
| 415 | 393 | } |
| 416 | 394 | |
| 417 | | if (m_cm_enable_reg &0x04) |
| 395 | if (m_cm_enable_reg & 0x04) |
| 418 | 396 | { |
| 419 | 397 | if (memregion("user1")->base()) |
| 420 | 398 | { |
| 421 | 399 | gfx_element *gfx = m_gfxdecode->gfx(2); |
| 422 | | int girlyscroll = (INT8)((m_cm_girl_scroll & 0xf0)); |
| 423 | | int girlxscroll = (INT8)((m_cm_girl_scroll & 0x0f)<<4); |
| 400 | int const girlyscroll = (INT8)((m_cm_girl_scroll & 0xf0)); |
| 401 | int const girlxscroll = (INT8)((m_cm_girl_scroll & 0x0f)<<4); |
| 424 | 402 | |
| 425 | 403 | gfx->zoom_transpen(bitmap,cliprect,m_cmaster_girl_num,m_cmaster_girl_pal,0,0,-(girlxscroll*2),-(girlyscroll), 0x20000, 0x10000,0); |
| 426 | 404 | } |
| 427 | 405 | } |
| 428 | 406 | |
| 429 | | if (m_cm_enable_reg &0x02) |
| 407 | if (m_cm_enable_reg & 0x02) |
| 430 | 408 | { |
| 431 | 409 | m_fg_tilemap->draw(screen, bitmap, cliprect, 0, 0); |
| 432 | 410 | } |
| r244897 | r244898 | |
| 436 | 414 | |
| 437 | 415 | UINT32 wingco_state::screen_update_magical(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
| 438 | 416 | { |
| 439 | | int i; |
| 440 | | |
| 441 | 417 | bitmap.fill(m_palette->black_pen(), cliprect); |
| 442 | 418 | |
| 443 | | if (!(m_cm_enable_reg &0x01)) |
| 419 | if (!(m_cm_enable_reg & 0x01)) |
| 444 | 420 | return 0; |
| 445 | 421 | |
| 446 | | if (m_cm_enable_reg &0x08) |
| 422 | if (m_cm_enable_reg & 0x08) |
| 447 | 423 | { |
| 448 | 424 | // guess, could be wrong, but different screens clearly need different reel layouts |
| 449 | 425 | if (m_vidreg & 2) |
| 450 | 426 | { |
| 451 | | for (i= 0;i < 32;i++) |
| 427 | for (int i = 0; i < 32; i++) |
| 452 | 428 | { |
| 453 | 429 | m_reel1_tilemap->set_scrolly(i, m_reel1_scroll[i*2]); |
| 454 | 430 | m_reel2_tilemap->set_scrolly(i, m_reel2_scroll[i*2]); |
| 455 | 431 | // m_reel3_tilemap->set_scrolly(i, m_reel3_scroll[i*2]); |
| 456 | 432 | } |
| 457 | 433 | |
| 434 | rectangle const visible1alt(0*8, (16+48)*8-1, 4*8, 16*8-1); |
| 435 | rectangle const visible2alt(0*8, (16+48)*8-1, 16*8, 28*8-1); |
| 458 | 436 | |
| 459 | | const rectangle visible1alt(0*8, (16+48)*8-1, 4*8, 16*8-1); |
| 460 | | const rectangle visible2alt(0*8, (16+48)*8-1, 16*8, 28*8-1); |
| 461 | | |
| 462 | 437 | m_reel1_tilemap->draw(screen, bitmap, visible1alt, 0, 0); |
| 463 | 438 | m_reel2_tilemap->draw(screen, bitmap, visible2alt, 0, 0); |
| 464 | 439 | //m_reel3_tilemap->draw(screen, bitmap, &magical_visible3, 0, 0); |
| 465 | 440 | } |
| 466 | 441 | else |
| 467 | 442 | { |
| 468 | | for (i= 0;i < 32;i++) |
| 443 | for (int i = 0; i < 32; i++) |
| 469 | 444 | { |
| 470 | 445 | m_reel1_tilemap->set_scrolly(i, m_reel1_scroll[i*2]); |
| 471 | 446 | m_reel2_tilemap->set_scrolly(i, m_reel2_scroll[i*2]); |
| 472 | 447 | m_reel3_tilemap->set_scrolly(i, m_reel3_scroll[i*2]); |
| 473 | 448 | } |
| 474 | 449 | |
| 450 | rectangle const visible1(0*8, (14+48)*8-1, 4*8, (4+8)*8-1); |
| 451 | rectangle const visible2(0*8, (14+48)*8-1, 12*8, (12+8)*8-1); |
| 452 | rectangle const visible3(0*8, (14+48)*8-1, 20*8, (20+8)*8-1); |
| 475 | 453 | |
| 476 | | const rectangle visible1(0*8, (14+48)*8-1, 4*8, (4+8)*8-1); |
| 477 | | const rectangle visible2(0*8, (14+48)*8-1, 12*8, (12+8)*8-1); |
| 478 | | const rectangle visible3(0*8, (14+48)*8-1, 20*8, (20+8)*8-1); |
| 479 | | |
| 480 | 454 | m_reel1_tilemap->draw(screen, bitmap, visible1, 0, 0); |
| 481 | 455 | m_reel2_tilemap->draw(screen, bitmap, visible2, 0, 0); |
| 482 | 456 | m_reel3_tilemap->draw(screen, bitmap, visible3, 0, 0); |
| 483 | 457 | } |
| 484 | 458 | } |
| 485 | 459 | |
| 486 | | if (m_cm_enable_reg &0x02) |
| 487 | | { |
| 460 | if (m_cm_enable_reg & 0x02) |
| 488 | 461 | m_fg_tilemap->draw(screen, bitmap, cliprect, 0, 0); |
| 489 | | } |
| 490 | 462 | |
| 491 | 463 | return 0; |
| 492 | 464 | } |
| r244897 | r244898 | |
| 538 | 510 | |
| 539 | 511 | TILE_GET_INFO_MEMBER(sanghopm_state::get_fg_tile_info) |
| 540 | 512 | { |
| 541 | | int code = m_fg_vidram[tile_index]; |
| 542 | | int attr = m_fg_atrram[tile_index]; |
| 513 | int const code = m_fg_vidram[tile_index]; |
| 514 | int const attr = m_fg_atrram[tile_index]; |
| 543 | 515 | |
| 544 | 516 | SET_TILE_INFO_MEMBER(0, |
| 545 | 517 | code | (attr & 0x0f)<<8, |
| 546 | | (attr&0x70)>>4, |
| 518 | (attr & 0x70) >> 4, |
| 547 | 519 | 0); |
| 548 | 520 | } |
| 549 | 521 | |
| 550 | 522 | TILE_GET_INFO_MEMBER(sanghopm_state::get_bg_tile_info) |
| 551 | 523 | { |
| 552 | | int code = m_bg_vidram[tile_index]; |
| 553 | | int attr = m_bg_atrram[tile_index]; |
| 524 | int const code = m_bg_vidram[tile_index]; |
| 525 | int const attr = m_bg_atrram[tile_index]; |
| 554 | 526 | |
| 555 | 527 | SET_TILE_INFO_MEMBER(1, |
| 556 | 528 | code | (attr & 0x0f)<<8, |
| 557 | | (attr&0x70)>>4, |
| 529 | (attr & 0x70) >> 4, |
| 558 | 530 | 0); |
| 559 | 531 | } |
| 560 | 532 | |
| 561 | 533 | TILE_GET_INFO_MEMBER(sanghopm_state::get_reel1_tile_info) |
| 562 | 534 | { |
| 563 | | int code = m_reel1_ram[tile_index]; |
| 564 | | int attr = m_reel1_attrram[tile_index]; |
| 535 | int const code = m_reel1_ram[tile_index]; |
| 536 | int const attr = m_reel1_attrram[tile_index]; |
| 565 | 537 | |
| 566 | 538 | SET_TILE_INFO_MEMBER(1, |
| 567 | 539 | code | (attr & 0x0f)<<8, |
| 568 | | (attr&0x70)>>4, |
| 540 | (attr & 0x70) >> 4, |
| 569 | 541 | 0); |
| 570 | 542 | } |
| 571 | 543 | |
| 572 | 544 | TILE_GET_INFO_MEMBER(sanghopm_state::get_reel2_tile_info) |
| 573 | 545 | { |
| 574 | | int code = m_reel2_ram[tile_index]; |
| 575 | | int attr = m_reel2_attrram[tile_index]; |
| 546 | int const code = m_reel2_ram[tile_index]; |
| 547 | int const attr = m_reel2_attrram[tile_index]; |
| 576 | 548 | |
| 577 | 549 | SET_TILE_INFO_MEMBER(1, |
| 578 | 550 | code | (attr & 0x0f)<<8, |
| 579 | | (attr&0x70)>>4, |
| 551 | (attr & 0x70)>>4, |
| 580 | 552 | 0); |
| 581 | 553 | } |
| 582 | 554 | |
| 583 | 555 | TILE_GET_INFO_MEMBER(sanghopm_state::get_reel3_tile_info) |
| 584 | 556 | { |
| 585 | | int code = m_reel3_ram[tile_index]; |
| 586 | | int attr = m_reel3_attrram[tile_index]; |
| 557 | int const code = m_reel3_ram[tile_index]; |
| 558 | int const attr = m_reel3_attrram[tile_index]; |
| 587 | 559 | |
| 588 | 560 | SET_TILE_INFO_MEMBER(1, |
| 589 | 561 | code | (attr & 0x0f)<<8, |
| 590 | | (attr&0x70)>>4, |
| 562 | (attr & 0x70)>>4, |
| 591 | 563 | 0); |
| 592 | 564 | } |
| 593 | 565 | |
| r244897 | r244898 | |
| 611 | 583 | |
| 612 | 584 | UINT32 sanghopm_state::screen_update_sangho(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
| 613 | 585 | { |
| 614 | | int i; |
| 615 | | |
| 616 | 586 | bitmap.fill(m_palette->black_pen(), cliprect); |
| 617 | 587 | |
| 618 | | if (m_enable_reg & 0x01) |
| 619 | | { |
| 620 | | /* disable reels (only render bg and fg layers) */ |
| 621 | | m_bg_tilemap->set_scrolly(0, -16); |
| 622 | | m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0); |
| 623 | | m_fg_tilemap->draw(screen, bitmap, cliprect, 0, 0); |
| 588 | m_bg_tilemap->set_scrolly(0, -16); |
| 589 | m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0); |
| 624 | 590 | |
| 625 | | return 0; |
| 626 | | } |
| 627 | | else |
| 591 | /* enable reels (render all the five layers) */ |
| 592 | if (!(m_enable_reg & 0x01)) |
| 628 | 593 | { |
| 629 | | /* enable reels (render all the five layers) */ |
| 630 | | m_bg_tilemap->set_scrolly(0, -16); |
| 631 | | m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0); |
| 632 | | |
| 633 | | for (i= 0;i < 64;i++) |
| 594 | for (int i = 0; i < 64;i++) |
| 634 | 595 | { |
| 635 | 596 | m_reel1_tilemap->set_scrolly(i, m_reel1_scroll[i]); |
| 636 | 597 | m_reel2_tilemap->set_scrolly(i, m_reel2_scroll[i]); |
| r244897 | r244898 | |
| 638 | 599 | } |
| 639 | 600 | |
| 640 | 601 | // are these hardcoded, or registers? |
| 641 | | const rectangle visible1(0*8, (15+48)*8-1, 4*8, (4+7)*8-1); |
| 642 | | const rectangle visible2(0*8, (15+48)*8-1, 12*8, (12+7)*8-1); |
| 643 | | const rectangle visible3(0*8, (15+48)*8-1, 20*8, (20+7)*8-1); |
| 602 | rectangle const visible1(0*8, (15+48)*8-1, 4*8, (4+7)*8-1); |
| 603 | rectangle const visible2(0*8, (15+48)*8-1, 12*8, (12+7)*8-1); |
| 604 | rectangle const visible3(0*8, (15+48)*8-1, 20*8, (20+7)*8-1); |
| 644 | 605 | |
| 645 | 606 | m_reel1_tilemap->draw(screen, bitmap, visible1, 0, 0); |
| 646 | 607 | m_reel2_tilemap->draw(screen, bitmap, visible2, 0, 0); |
| 647 | 608 | m_reel3_tilemap->draw(screen, bitmap, visible3, 0, 0); |
| 648 | | |
| 649 | | m_fg_tilemap->draw(screen, bitmap, cliprect, 0, 0); |
| 650 | 609 | } |
| 651 | 610 | |
| 611 | m_fg_tilemap->draw(screen, bitmap, cliprect, 0, 0); |
| 612 | |
| 652 | 613 | return 0; |
| 653 | 614 | } |
| 654 | 615 | |
| r244897 | r244898 | |
| 676 | 637 | |
| 677 | 638 | TILE_GET_INFO_MEMBER(unkch_state::get_reel1_tile_info) |
| 678 | 639 | { |
| 679 | | int code = m_reel1_ram[tile_index]; |
| 680 | | int attr = m_reel1_attrram[tile_index]; |
| 640 | int const code = m_reel1_ram[tile_index]; |
| 641 | int const attr = m_reel1_attrram[tile_index]; |
| 681 | 642 | |
| 682 | 643 | SET_TILE_INFO_MEMBER(1, |
| 683 | 644 | code | (attr & 0x0f)<<8, |
| 684 | | (attr&0xf0)>>4, |
| 645 | (attr & 0xf0) >> 4, |
| 685 | 646 | 0); |
| 686 | 647 | } |
| 687 | 648 | |
| 688 | 649 | TILE_GET_INFO_MEMBER(unkch_state::get_reel2_tile_info) |
| 689 | 650 | { |
| 690 | | int code = m_reel2_ram[tile_index]; |
| 691 | | int attr = m_reel2_attrram[tile_index]; |
| 651 | int const code = m_reel2_ram[tile_index]; |
| 652 | int const attr = m_reel2_attrram[tile_index]; |
| 692 | 653 | |
| 693 | 654 | SET_TILE_INFO_MEMBER(1, |
| 694 | 655 | code | (attr & 0x0f)<<8, |
| 695 | | (attr&0xf0)>>4, |
| 656 | (attr & 0xf0) >> 4, |
| 696 | 657 | 0); |
| 697 | 658 | } |
| 698 | 659 | |
| 699 | 660 | TILE_GET_INFO_MEMBER(unkch_state::get_reel3_tile_info) |
| 700 | 661 | { |
| 701 | | int code = m_reel3_ram[tile_index]; |
| 702 | | int attr = m_reel3_attrram[tile_index]; |
| 662 | int const code = m_reel3_ram[tile_index]; |
| 663 | int const attr = m_reel3_attrram[tile_index]; |
| 703 | 664 | |
| 704 | 665 | SET_TILE_INFO_MEMBER(1, |
| 705 | 666 | code | (attr & 0x0f)<<8, |
| 706 | | (attr&0xf0)>>4, |
| 667 | (attr & 0xf0) >> 4, |
| 707 | 668 | 0); |
| 708 | 669 | } |
| 709 | 670 | |
| r244897 | r244898 | |
| 730 | 691 | |
| 731 | 692 | UINT32 unkch_state::screen_update_unkch(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
| 732 | 693 | { |
| 733 | | int i; |
| 734 | | |
| 735 | 694 | bitmap.fill(m_palette->black_pen(), cliprect); |
| 736 | 695 | |
| 737 | | if (!(m_cm_enable_reg &0x01)) |
| 696 | if (!(m_cm_enable_reg & 0x01)) |
| 738 | 697 | return 0; |
| 739 | 698 | |
| 740 | | if (m_cm_enable_reg &0x08) |
| 699 | if (m_cm_enable_reg & 0x08) |
| 741 | 700 | { |
| 742 | 701 | // guess, this could be something else completely!! |
| 743 | 702 | // only draw the first 'reels' tilemap, but fullscreen, using alt registers? (or no scrolling at all? - doubtful, see girl) |
| 744 | 703 | if (m_vidreg & 0x40) |
| 745 | 704 | { |
| 746 | | for (i= 0;i < 32;i++) |
| 705 | for (int i = 0; i < 32; i++) |
| 747 | 706 | { |
| 748 | 707 | m_reel1_tilemap->set_scrolly(i, -0x08/*m_reel1_scroll[(i*2)+1]*/); |
| 749 | 708 | // m_reel2_tilemap->set_scrolly(i, m_reel2_scroll[(i*2)+1]); |
| r244897 | r244898 | |
| 756 | 715 | // or draw the reels normally? |
| 757 | 716 | else |
| 758 | 717 | { |
| 759 | | for (i= 0;i < 32;i++) |
| 718 | for (int i= 0; i < 32; i++) |
| 760 | 719 | { |
| 761 | 720 | m_reel1_tilemap->set_scrolly(i, m_reel1_scroll[i*2]); |
| 762 | 721 | m_reel2_tilemap->set_scrolly(i, m_reel2_scroll[i*2]); |
| r244897 | r244898 | |
| 773 | 732 | } |
| 774 | 733 | } |
| 775 | 734 | |
| 776 | | if (m_cm_enable_reg &0x02) |
| 777 | | { |
| 735 | if (m_cm_enable_reg & 0x02) |
| 778 | 736 | m_fg_tilemap->draw(screen, bitmap, cliprect, 0, 0); |
| 779 | | } |
| 780 | 737 | |
| 781 | 738 | return 0; |
| 782 | 739 | } |