trunk/src/mame/drivers/coolridr.c
| r21428 | r21429 | |
| 364 | 364 | #include "machine/nvram.h" |
| 365 | 365 | #include "rendlay.h" |
| 366 | 366 | |
| 367 | | #define CLIPWIDTH (496-1) |
| 368 | | #define CLIPHIGH (384-1) |
| 367 | #define CLIPMAXX_FULL (496-1) |
| 368 | #define CLIPMAXY_FULL (384-1) |
| 369 | #define CLIPMINX_FULL (0) |
| 370 | #define CLIPMINY_FULL (0) |
| 369 | 371 | |
| 370 | 372 | class coolridr_state : public driver_device |
| 371 | 373 | { |
| r21428 | r21429 | |
| 405 | 407 | // store the blit params here |
| 406 | 408 | UINT32 m_spriteblit[12]; |
| 407 | 409 | |
| 410 | UINT32 m_clipvals[2][3]; |
| 411 | |
| 412 | |
| 413 | |
| 408 | 414 | required_device<cpu_device> m_maincpu; |
| 409 | 415 | required_device<cpu_device> m_subcpu; |
| 410 | 416 | required_device<cpu_device> m_soundcpu; |
| r21428 | r21429 | |
| 488 | 494 | UINT32 m_pen_fill[2]; |
| 489 | 495 | |
| 490 | 496 | osd_work_queue * m_work_queue[2]; // work queue, one per screen |
| 491 | | static void *draw_tile_row_threaded(void *param, int threadid); |
| 497 | static void *draw_object_threaded(void *param, int threadid); |
| 492 | 498 | }; |
| 493 | 499 | |
| 494 | 500 | #define PRINT_BLIT_STUFF \ |
| r21428 | r21429 | |
| 654 | 660 | UINT16 zpri; |
| 655 | 661 | UINT8 blittype; |
| 656 | 662 | coolridr_state* state; |
| 663 | UINT32 clipvals[3]; |
| 657 | 664 | }; |
| 658 | 665 | |
| 659 | 666 | #define RLE_BLOCK(writeaddrxor) \ |
| r21428 | r21429 | |
| 722 | 729 | const int pixelOffsetX = ((hPositionTable[realy]) + (h* 16 * hZoomTable[realy])) / 0x40; \ |
| 723 | 730 | const int pixelOffsetnextX = ((hPositionTable[realy]) + ((h+1)* 16 * hZoomTable[realy])) / 0x40; \ |
| 724 | 731 | const int drawy = pixelOffsetY+y; \ |
| 725 | | if ((drawy>CLIPHIGH) || (drawy<0)) continue; \ |
| 732 | if ((drawy>clipmaxY) || (drawy<clipminY)) continue; \ |
| 726 | 733 | line = &drawbitmap->pix32(drawy); \ |
| 727 | 734 | zline = &object->zbitmap->pix16(drawy); \ |
| 728 | 735 | int blockwide = pixelOffsetnextX-pixelOffsetX; \ |
| 729 | | if (pixelOffsetX+blockwide <0) \ |
| 736 | if (pixelOffsetX+blockwide <clipminX) \ |
| 730 | 737 | continue; \ |
| 731 | | if (pixelOffsetX>CLIPWIDTH) \ |
| 738 | if (pixelOffsetX>clipmaxX) \ |
| 732 | 739 | continue; \ |
| 733 | 740 | UINT32 incx = 0x8000000 / hZoomTable[realy]; \ |
| 734 | 741 | for (int x = 0; x < blockwide; x++) \ |
| 735 | 742 | { \ |
| 736 | 743 | const int drawx = pixelOffsetX+x; \ |
| 737 | | if ((drawx>CLIPWIDTH || drawx<0)) continue; \ |
| 744 | if ((drawx>clipmaxX || drawx<clipminX)) continue; \ |
| 738 | 745 | int realx = ((x*incx)>>21); \ |
| 739 | 746 | |
| 740 | 747 | #define YXLOOP_END \ |
| r21428 | r21429 | |
| 747 | 754 | { \ |
| 748 | 755 | int realy = ((y*incy)>>21); \ |
| 749 | 756 | const int drawy = pixelOffsetY+y; \ |
| 750 | | if ((drawy>CLIPHIGH) || (drawy<0)) continue; \ |
| 757 | if ((drawy>clipmaxY) || (drawy<clipminY)) continue; \ |
| 751 | 758 | line = &drawbitmap->pix32(drawy); \ |
| 752 | 759 | zline = &object->zbitmap->pix16(drawy); \ |
| 753 | 760 | for (int x = 0; x < blockwide; x++) \ |
| 754 | 761 | { \ |
| 755 | 762 | const int drawx = pixelOffsetX+x; \ |
| 756 | | if ((drawx>CLIPWIDTH || drawx<0)) continue; \ |
| 763 | if ((drawx>clipmaxX || drawx<clipminX)) continue; \ |
| 757 | 764 | int realx = ((x*incx)>>21); \ |
| 758 | 765 | |
| 759 | 766 | #define YXLOOP_START_NO_LINEZOOM_NO_XCLIP \ |
| r21428 | r21429 | |
| 761 | 768 | { \ |
| 762 | 769 | int realy = ((y*incy)>>21); \ |
| 763 | 770 | const int drawy = pixelOffsetY+y; \ |
| 764 | | if ((drawy>CLIPHIGH) || (drawy<0)) continue; \ |
| 771 | if ((drawy>clipmaxY) || (drawy<clipminY)) continue; \ |
| 765 | 772 | line = &drawbitmap->pix32(drawy); \ |
| 766 | 773 | zline = &object->zbitmap->pix16(drawy); \ |
| 767 | 774 | for (int x = 0; x < blockwide; x++) \ |
| r21428 | r21429 | |
| 774 | 781 | for (int y = 0; y < 16; y++) \ |
| 775 | 782 | { \ |
| 776 | 783 | const int drawy = pixelOffsetY+y; \ |
| 777 | | if ((drawy>CLIPHIGH) || (drawy<0)) continue; \ |
| 784 | if ((drawy>clipmaxY) || (drawy<clipminY)) continue; \ |
| 778 | 785 | line = &drawbitmap->pix32(drawy); \ |
| 779 | 786 | zline = &object->zbitmap->pix16(drawy); \ |
| 780 | 787 | for (int x = 0; x < 16; x++) \ |
| 781 | 788 | { \ |
| 782 | 789 | const int drawx = pixelOffsetX+x; \ |
| 783 | | if ((drawx>CLIPWIDTH || drawx<0)) continue; \ |
| 790 | if ((drawx>clipmaxX || drawx<clipminX)) continue; \ |
| 784 | 791 | |
| 785 | 792 | #define YXLOOP_START_NO_ZOOM_NO_XCLIP \ |
| 786 | 793 | for (int y = 0; y < 16; y++) \ |
| 787 | 794 | { \ |
| 788 | 795 | const int drawy = pixelOffsetY+y; \ |
| 789 | | if ((drawy>CLIPHIGH) || (drawy<0)) continue; \ |
| 796 | if ((drawy>clipmaxY) || (drawy<clipminY)) continue; \ |
| 790 | 797 | line = &drawbitmap->pix32(drawy); \ |
| 791 | 798 | zline = &object->zbitmap->pix16(drawy); \ |
| 792 | 799 | for (int x = 0; x < 16; x++) \ |
| r21428 | r21429 | |
| 836 | 843 | |
| 837 | 844 | |
| 838 | 845 | |
| 839 | | void *coolridr_state::draw_tile_row_threaded(void *param, int threadid) |
| 846 | void *coolridr_state::draw_object_threaded(void *param, int threadid) |
| 840 | 847 | { |
| 841 | 848 | cool_render_object *object = reinterpret_cast<cool_render_object *>(param); |
| 842 | 849 | bitmap_rgb32* drawbitmap = object->drawbitmap; |
| r21428 | r21429 | |
| 844 | 851 | UINT16* rearranged_16bit_gfx = object->state->m_rearranged_16bit_gfx; |
| 845 | 852 | UINT16* expanded_10bit_gfx = object->state->m_expanded_10bit_gfx; |
| 846 | 853 | |
| 854 | UINT16 clipminX = CLIPMINX_FULL; |
| 855 | UINT16 clipmaxX = CLIPMAXX_FULL; |
| 856 | UINT16 clipminY = CLIPMINY_FULL; |
| 857 | UINT16 clipmaxY = CLIPMAXY_FULL; |
| 847 | 858 | |
| 848 | 859 | |
| 849 | 860 | /************* object->spriteblit[1] *************/ |
| r21428 | r21429 | |
| 868 | 879 | } |
| 869 | 880 | |
| 870 | 881 | |
| 882 | |
| 883 | |
| 871 | 884 | // if(b1colorNumber > 0x60 || b2colorNumber) |
| 872 | 885 | // printf("%08x %08x\n",b1colorNumber,b2colorNumber); |
| 873 | 886 | |
| r21428 | r21429 | |
| 979 | 992 | |
| 980 | 993 | //UINT32 textlookup = 0; // we've cached the data here already |
| 981 | 994 | |
| 995 | /* |
| 996 | sample data from attract mode 'filmstrip' |
| 982 | 997 | |
| 998 | you can see it's screen regions at least, gets enabled in certain game situations too |
| 999 | interestingly there is a bit to determine the screen number this applies to, even if that should already be implied from m_blitterMode |
| 983 | 1000 | |
| 1001 | screen 1 clipping(?) |
| 1002 | |
| 1003 | unknown sprite list type 1 - 00000001 003f00f0 027801f7 00000007 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 |
| 1004 | unknown sprite list type 1 - 00000001 003f00f0 03e001f7 00000007 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 |
| 1005 | unknown sprite list type 1 - 00000001 003f00f0 000700e3 00000007 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 |
| 1006 | unknown sprite list type 1 - 00000001 003f00f0 010c01f7 00000007 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 |
| 1007 | |
| 1008 | unknown sprite list type 1 - 00000001 003f00f0 027401f7 00000007 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 |
| 1009 | unknown sprite list type 1 - 00000001 003f00f0 03dc01f7 00000007 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 |
| 1010 | unknown sprite list type 1 - 00000001 003f00f0 000700df 00000007 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 |
| 1011 | unknown sprite list type 1 - 00000001 003f00f0 010801f7 00000007 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 |
| 1012 | |
| 1013 | unknown sprite list type 1 - 00000001 003f00f0 027001f7 00000007 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 |
| 1014 | unknown sprite list type 1 - 00000001 003f00f0 03d801f7 00000007 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 |
| 1015 | unknown sprite list type 1 - 00000001 003f00f0 000700db 00000007 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 |
| 1016 | unknown sprite list type 1 - 00000001 003f00f0 010401f7 00000007 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 |
| 1017 | |
| 1018 | unknown sprite list type 1 - 00000001 003f00f0 019c01f7 00000007 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 |
| 1019 | unknown sprite list type 1 - 00000001 003f00f0 030401f7 00000007 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 |
| 1020 | unknown sprite list type 1 - 00000001 003f00f0 00070007 00000007 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 |
| 1021 | unknown sprite list type 1 - 00000001 003f00f0 0030016f 00000007 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 |
| 1022 | |
| 1023 | screen 2 clipping |
| 1024 | |
| 1025 | unknown sprite list type 1 - 00000001 003f00f0 039803f7 00000207 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 |
| 1026 | unknown sprite list type 1 - 00000001 003f00f0 050003f7 00000207 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 |
| 1027 | unknown sprite list type 1 - 00000001 003f00f0 02070203 00000207 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 |
| 1028 | unknown sprite list type 1 - 00000001 003f00f0 022c036b 00000207 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 |
| 1029 | |
| 1030 | unknown sprite list type 1 - 00000001 003f00f0 039403f7 00000207 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 |
| 1031 | unknown sprite list type 1 - 00000001 003f00f0 04fc03f7 00000207 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 |
| 1032 | unknown sprite list type 1 - 00000001 003f00f0 020701ff 00000207 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 |
| 1033 | unknown sprite list type 1 - 00000001 003f00f0 02280367 00000207 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 |
| 1034 | |
| 1035 | unknown sprite list type 1 - 00000001 003f00f0 039003f7 00000207 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 |
| 1036 | unknown sprite list type 1 - 00000001 003f00f0 04f803f7 00000207 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 |
| 1037 | unknown sprite list type 1 - 00000001 003f00f0 020701fb 00000207 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 |
| 1038 | unknown sprite list type 1 - 00000001 003f00f0 02240363 00000207 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 |
| 1039 | |
| 1040 | NOTE, we only copy across [1] [2] and [3] as [0] [1] and [2] |
| 1041 | the 3rd dword seems to be some kind of offset, it's 0x207 on the 2nd screen, and the actual x-clip rects are also higher on that screen? |
| 1042 | |
| 1043 | note this is practically the same format as the sysh1_fb_data_w commands.. |
| 1044 | */ |
| 1045 | |
| 1046 | // how does this really work? there's more to it |
| 1047 | // used in film strip attract mode, and between stages |
| 1048 | if (object->clipvals[2] & 0x0000007) |
| 1049 | { |
| 1050 | #if 0 |
| 1051 | clipminX = (((object->clipvals[1]&0xffff0000)>>16) >> 3); |
| 1052 | if (clipminX<CLIPMINX_FULL) clipminX = CLIPMINX_FULL; |
| 1053 | if (clipminX>CLIPMAXX_FULL) clipminX = CLIPMAXX_FULL; |
| 1054 | clipmaxX = (((object->clipvals[1]&0xffff0000)>>16) >> 3) + (((object->clipvals[1]&0x0000ffff)>>0) >> 3); |
| 1055 | if (clipmaxX<CLIPMINX_FULL) clipmaxX = CLIPMINX_FULL; |
| 1056 | if (clipmaxX>CLIPMAXX_FULL) clipmaxX = CLIPMAXX_FULL; |
| 1057 | if (clipminX>clipmaxX) clipminX = clipmaxX; |
| 1058 | |
| 1059 | clipminY = ((object->clipvals[0]&0xffff0000)>>16); |
| 1060 | if (clipminY<CLIPMINY_FULL) clipminY = CLIPMINY_FULL; |
| 1061 | if (clipminY>CLIPMAXY_FULL) clipminY = CLIPMAXY_FULL; |
| 1062 | clipmaxY = ((object->clipvals[0]&0x0000ffff)>>0); |
| 1063 | if (clipmaxY<CLIPMINY_FULL) clipmaxY = CLIPMINY_FULL; |
| 1064 | if (clipmaxY>CLIPMAXY_FULL) clipmaxY = CLIPMAXY_FULL; |
| 1065 | if (clipminY>clipmaxY) clipminY = clipmaxY; |
| 1066 | #endif |
| 1067 | |
| 1068 | |
| 1069 | // b1colorNumber = object->state->machine().rand()&0xfff; |
| 1070 | } |
| 1071 | |
| 984 | 1072 | /* DRAW */ |
| 985 | 1073 | UINT16 used_hCellCount = hCellCount; |
| 986 | 1074 | UINT16 used_vCellCount = vCellCount; |
| r21428 | r21429 | |
| 1049 | 1137 | |
| 1050 | 1138 | |
| 1051 | 1139 | |
| 1052 | | if (pixelOffsetY>CLIPHIGH) |
| 1140 | if (pixelOffsetY>clipmaxY) |
| 1053 | 1141 | { |
| 1054 | 1142 | v = used_vCellCount; |
| 1055 | 1143 | continue; |
| r21428 | r21429 | |
| 1136 | 1224 | if (!indirect_zoom_enable) |
| 1137 | 1225 | { |
| 1138 | 1226 | // int offs = ((hPosition) + (h* 16 * hZoom)) / 0x40; |
| 1139 | | // if (offs>CLIPWIDTH) continue; |
| 1227 | // if (offs>clipmaxX) continue; |
| 1140 | 1228 | } |
| 1141 | 1229 | |
| 1142 | 1230 | UINT32 lastSpriteNumber = 0xffffffff; |
| r21428 | r21429 | |
| 1264 | 1352 | { |
| 1265 | 1353 | const int pixelOffsetX = ((hPosition/0x40) + (h* 16)); |
| 1266 | 1354 | |
| 1267 | | if (pixelOffsetX+16 < 0) |
| 1355 | if (pixelOffsetX+16 < clipminX) |
| 1268 | 1356 | continue; |
| 1269 | 1357 | |
| 1270 | | if (pixelOffsetX>CLIPWIDTH) |
| 1358 | if (pixelOffsetX>clipmaxX) |
| 1271 | 1359 | continue; |
| 1272 | 1360 | |
| 1273 | | if (pixelOffsetX>=0 && pixelOffsetX+16<CLIPWIDTH) |
| 1361 | if (pixelOffsetX>=clipminX && pixelOffsetX+16<clipmaxX) |
| 1274 | 1362 | { |
| 1275 | 1363 | if (blit_rotate) |
| 1276 | 1364 | { |
| r21428 | r21429 | |
| 1313 | 1401 | int blockwide = pixelOffsetnextX-pixelOffsetX; |
| 1314 | 1402 | UINT32 incx = 0x8000000 / hZoom; |
| 1315 | 1403 | |
| 1316 | | if (pixelOffsetX+blockwide < 0) |
| 1404 | if (pixelOffsetX+blockwide < clipminX) |
| 1317 | 1405 | continue; |
| 1318 | 1406 | |
| 1319 | | if (pixelOffsetX>CLIPWIDTH) |
| 1407 | if (pixelOffsetX>clipmaxX) |
| 1320 | 1408 | continue; |
| 1321 | 1409 | |
| 1322 | | if (pixelOffsetX>=0 && pixelOffsetX+blockwide<CLIPWIDTH) |
| 1410 | if (pixelOffsetX>=clipminX && pixelOffsetX+blockwide<clipmaxX) |
| 1323 | 1411 | { |
| 1324 | 1412 | if (blit_rotate) |
| 1325 | 1413 | { |
| r21428 | r21429 | |
| 1424 | 1512 | { |
| 1425 | 1513 | //printf("unknown sprite list type 1 - %08x %08x %08x %08x %08x %08x %08x %08x %08x %08x %08x %08x\n", m_spriteblit[0], m_spriteblit[1],m_spriteblit[2],m_spriteblit[3],m_spriteblit[4],m_spriteblit[5],m_spriteblit[6],m_spriteblit[7],m_spriteblit[8],m_spriteblit[9],m_spriteblit[10],m_spriteblit[10]); |
| 1426 | 1514 | |
| 1427 | | /* |
| 1428 | | sample data from attract mode 'filmstrip' |
| 1515 | |
| 1429 | 1516 | |
| 1430 | | you can see it's screen regions at least, gets enabled in certain game situations too |
| 1431 | | interestingly there is a bit to determine the screen number this applies to, even if that should already be implied from m_blitterMode |
| 1517 | if (m_blitterMode&0x80) |
| 1518 | { |
| 1519 | m_clipvals[1][0] = m_spriteblit[1]; |
| 1520 | m_clipvals[1][1] = m_spriteblit[2]; |
| 1521 | m_clipvals[1][2] = m_spriteblit[3]; |
| 1522 | } |
| 1523 | else |
| 1524 | { |
| 1525 | m_clipvals[0][0] = m_spriteblit[1]; |
| 1526 | m_clipvals[0][1] = m_spriteblit[2]; |
| 1527 | m_clipvals[0][2] = m_spriteblit[3]; |
| 1528 | } |
| 1432 | 1529 | |
| 1433 | | screen 1 clipping(?) |
| 1434 | | |
| 1435 | | unknown sprite list type 1 - 00000001 003f00f0 027801f7 00000007 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 |
| 1436 | | unknown sprite list type 1 - 00000001 003f00f0 03e001f7 00000007 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 |
| 1437 | | unknown sprite list type 1 - 00000001 003f00f0 000700e3 00000007 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 |
| 1438 | | unknown sprite list type 1 - 00000001 003f00f0 010c01f7 00000007 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 |
| 1439 | | |
| 1440 | | unknown sprite list type 1 - 00000001 003f00f0 027401f7 00000007 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 |
| 1441 | | unknown sprite list type 1 - 00000001 003f00f0 03dc01f7 00000007 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 |
| 1442 | | unknown sprite list type 1 - 00000001 003f00f0 000700df 00000007 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 |
| 1443 | | unknown sprite list type 1 - 00000001 003f00f0 010801f7 00000007 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 |
| 1444 | | |
| 1445 | | unknown sprite list type 1 - 00000001 003f00f0 027001f7 00000007 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 |
| 1446 | | unknown sprite list type 1 - 00000001 003f00f0 03d801f7 00000007 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 |
| 1447 | | unknown sprite list type 1 - 00000001 003f00f0 000700db 00000007 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 |
| 1448 | | unknown sprite list type 1 - 00000001 003f00f0 010401f7 00000007 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 |
| 1449 | | |
| 1450 | | unknown sprite list type 1 - 00000001 003f00f0 019c01f7 00000007 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 |
| 1451 | | unknown sprite list type 1 - 00000001 003f00f0 030401f7 00000007 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 |
| 1452 | | unknown sprite list type 1 - 00000001 003f00f0 00070007 00000007 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 |
| 1453 | | unknown sprite list type 1 - 00000001 003f00f0 0030016f 00000007 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 |
| 1454 | | |
| 1455 | | screen 2 clipping |
| 1456 | | |
| 1457 | | unknown sprite list type 1 - 00000001 003f00f0 039803f7 00000207 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 |
| 1458 | | unknown sprite list type 1 - 00000001 003f00f0 050003f7 00000207 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 |
| 1459 | | unknown sprite list type 1 - 00000001 003f00f0 02070203 00000207 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 |
| 1460 | | unknown sprite list type 1 - 00000001 003f00f0 022c036b 00000207 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 |
| 1461 | | |
| 1462 | | unknown sprite list type 1 - 00000001 003f00f0 039403f7 00000207 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 |
| 1463 | | unknown sprite list type 1 - 00000001 003f00f0 04fc03f7 00000207 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 |
| 1464 | | unknown sprite list type 1 - 00000001 003f00f0 020701ff 00000207 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 |
| 1465 | | unknown sprite list type 1 - 00000001 003f00f0 02280367 00000207 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 |
| 1466 | | |
| 1467 | | unknown sprite list type 1 - 00000001 003f00f0 039003f7 00000207 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 |
| 1468 | | unknown sprite list type 1 - 00000001 003f00f0 04f803f7 00000207 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 |
| 1469 | | unknown sprite list type 1 - 00000001 003f00f0 020701fb 00000207 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 |
| 1470 | | unknown sprite list type 1 - 00000001 003f00f0 02240363 00000207 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 |
| 1471 | | */ |
| 1472 | | |
| 1473 | | |
| 1474 | 1530 | // abort early |
| 1475 | 1531 | return; |
| 1476 | 1532 | } |
| r21428 | r21429 | |
| 1527 | 1583 | |
| 1528 | 1584 | testobject->zpri = m_blitterAddr | m_blittype<<12; |
| 1529 | 1585 | testobject->blittype = m_blittype; |
| 1530 | | |
| 1531 | 1586 | osd_work_queue *queue; |
| 1532 | 1587 | // which queue, which bitmap |
| 1533 | 1588 | if (m_blitterMode == 0x30 || m_blitterMode == 0x40 || m_blitterMode == 0x50 || m_blitterMode == 0x60) |
| 1534 | 1589 | { |
| 1535 | 1590 | testobject->drawbitmap = &m_temp_bitmap_sprites[0]; |
| 1536 | 1591 | testobject->zbitmap = &m_zbuffer_bitmap; |
| 1592 | // pass these from the type 1 writes |
| 1593 | testobject->clipvals[0] = m_clipvals[0][0]; |
| 1594 | testobject->clipvals[1] = m_clipvals[0][1]; |
| 1595 | testobject->clipvals[2] = m_clipvals[0][2]; |
| 1596 | |
| 1537 | 1597 | queue = m_work_queue[0]; |
| 1538 | 1598 | } |
| 1539 | 1599 | else // 0x90, 0xa0, 0xb0, 0xc0 |
| 1540 | 1600 | { |
| 1541 | 1601 | testobject->drawbitmap = &m_temp_bitmap_sprites2[0]; |
| 1542 | 1602 | testobject->zbitmap = &m_zbuffer_bitmap2; |
| 1603 | // pass these from the type 1 writes |
| 1604 | testobject->clipvals[0] = m_clipvals[1][0]; |
| 1605 | testobject->clipvals[1] = m_clipvals[1][1]; |
| 1606 | testobject->clipvals[2] = m_clipvals[1][2]; |
| 1607 | |
| 1543 | 1608 | queue = m_work_queue[1]; |
| 1544 | 1609 | } |
| 1545 | 1610 | |
| 1546 | | osd_work_item_queue(queue, draw_tile_row_threaded, testobject, WORK_ITEM_FLAG_AUTO_RELEASE); |
| 1611 | osd_work_item_queue(queue, draw_object_threaded, testobject, WORK_ITEM_FLAG_AUTO_RELEASE); |
| 1547 | 1612 | } |
| 1548 | 1613 | |
| 1549 | 1614 | |
| r21428 | r21429 | |
| 1760 | 1825 | copybitmap(m_screen1_bitmap, m_temp_bitmap_sprites[i], 0, 0, 0, 0, visarea); |
| 1761 | 1826 | m_temp_bitmap_sprites[i].fill(0xff000000, visarea); |
| 1762 | 1827 | m_zbuffer_bitmap.fill(0xffff, visarea); |
| 1828 | // almost certainly wrong |
| 1829 | m_clipvals[0][0] = 0; |
| 1830 | m_clipvals[0][1] = 0; |
| 1831 | m_clipvals[0][2] = 0; |
| 1763 | 1832 | } |
| 1764 | | |
| 1765 | | if(m_blitterClearMode == 0x8c800000) |
| 1833 | else if(m_blitterClearMode == 0x8c800000) |
| 1766 | 1834 | { |
| 1767 | 1835 | osd_work_queue_wait(m_work_queue[1], osd_ticks_per_second() * 100); |
| 1768 | 1836 | copybitmap(m_screen2_bitmap, m_temp_bitmap_sprites2[i], 0, 0, 0, 0, visarea); |
| 1769 | 1837 | m_temp_bitmap_sprites2[i].fill(0xff000000, visarea); |
| 1770 | 1838 | m_zbuffer_bitmap2.fill(0xffff, visarea); |
| 1839 | // almost certainly wrong |
| 1840 | m_clipvals[1][0] = 0; |
| 1841 | m_clipvals[1][1] = 0; |
| 1842 | m_clipvals[1][2] = 0; |
| 1771 | 1843 | } |
| 1772 | 1844 | |
| 1773 | 1845 | //printf("frame\n"); |
| r21428 | r21429 | |
| 2760 | 2832 | MCFG_SCREEN_ADD("lscreen", RASTER) |
| 2761 | 2833 | MCFG_SCREEN_REFRESH_RATE(60) |
| 2762 | 2834 | MCFG_SCREEN_SIZE(640, 512) |
| 2763 | | MCFG_SCREEN_VISIBLE_AREA(0,CLIPWIDTH, 0, CLIPHIGH) |
| 2835 | MCFG_SCREEN_VISIBLE_AREA(CLIPMINX_FULL,CLIPMAXX_FULL, CLIPMINY_FULL, CLIPMAXY_FULL) |
| 2764 | 2836 | MCFG_SCREEN_UPDATE_DRIVER(coolridr_state, screen_update_coolridr1) |
| 2765 | 2837 | |
| 2766 | 2838 | MCFG_SCREEN_ADD("rscreen", RASTER) |
| 2767 | 2839 | MCFG_SCREEN_REFRESH_RATE(60) |
| 2768 | 2840 | MCFG_SCREEN_SIZE(640, 512) |
| 2769 | | MCFG_SCREEN_VISIBLE_AREA(0,CLIPWIDTH, 0, CLIPHIGH) |
| 2841 | MCFG_SCREEN_VISIBLE_AREA(CLIPMINX_FULL,CLIPMAXX_FULL, CLIPMINY_FULL, CLIPMAXY_FULL) |
| 2770 | 2842 | MCFG_SCREEN_UPDATE_DRIVER(coolridr_state, screen_update_coolridr2) |
| 2771 | 2843 | |
| 2772 | 2844 | MCFG_PALETTE_LENGTH(0x10000) |