trunk/src/mame/drivers/coolridr.c
| r21462 | r21463 | |
| 403 | 403 | m_work_queue[1] = osd_work_queue_alloc(WORK_QUEUE_FLAG_HIGH_FREQ); |
| 404 | 404 | decode[0].current_object = 0; |
| 405 | 405 | decode[1].current_object = 0; |
| 406 | debug_randompal = 8; |
| 406 | 407 | |
| 407 | 408 | } |
| 408 | 409 | |
| r21462 | r21463 | |
| 502 | 503 | |
| 503 | 504 | void sysh1_dma_transfer( address_space &space, UINT16 dma_index ); |
| 504 | 505 | |
| 506 | int debug_randompal; |
| 507 | |
| 505 | 508 | UINT16 *m_h1_vram; |
| 506 | 509 | UINT8 *m_h1_pcg; |
| 507 | 510 | UINT16 *m_h1_pal; |
| r21462 | r21463 | |
| 707 | 710 | |
| 708 | 711 | UINT32 coolridr_state::screen_update_coolridr1(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
| 709 | 712 | { |
| 713 | #if 0 |
| 714 | if (screen.machine().input().code_pressed_once(KEYCODE_W)) |
| 715 | { |
| 716 | debug_randompal++; |
| 717 | popmessage("%02x",debug_randompal); |
| 718 | } |
| 719 | if (screen.machine().input().code_pressed_once(KEYCODE_Q)) |
| 720 | { |
| 721 | debug_randompal--; |
| 722 | popmessage("%02x",debug_randompal); |
| 723 | } |
| 724 | #endif |
| 725 | |
| 710 | 726 | return screen_update_coolridr(screen,bitmap,cliprect,0); |
| 711 | 727 | } |
| 712 | 728 | |
| r21462 | r21463 | |
| 1022 | 1038 | */ |
| 1023 | 1039 | |
| 1024 | 1040 | |
| 1041 | |
| 1042 | |
| 1043 | |
| 1025 | 1044 | #define DRAW_PIX \ |
| 1026 | 1045 | if (pix != 0x8000) \ |
| 1027 | 1046 | { \ |
| r21462 | r21463 | |
| 1142 | 1161 | |
| 1143 | 1162 | /************* object->spriteblit[4] *************/ |
| 1144 | 1163 | |
| 1145 | | UINT32 blit4_unused = object->spriteblit[4] & 0xf8fefefe; |
| 1146 | | //UINT32 blit4 = (object->spriteblit[4] & 0x07000000)>>24; |
| 1164 | UINT32 blit4_unused = object->spriteblit[4] & 0xf8fefeee; |
| 1165 | UINT32 blit4 = (object->spriteblit[4] & 0x07000000)>>24; |
| 1147 | 1166 | //object->zpri = 7-blit4; |
| 1148 | | // unknown bits in blit word 4 - 00000010 - australia |
| 1167 | // unknown bits in blit word 4 - 00000010 - australia (and various other times) |
| 1168 | |
| 1149 | 1169 | UINT32 blit_flipx = object->spriteblit[4] & 0x00000001; |
| 1150 | 1170 | UINT32 blit_flipy = (object->spriteblit[4] & 0x00000100)>>8; |
| 1151 | 1171 | UINT32 blit_rotate = (object->spriteblit[4] & 0x00010000)>>16; |
| 1172 | //UINT32 b4_unk = object->spriteblit[4] & 0x00000010; |
| 1173 | |
| 1152 | 1174 | if (blit4_unused) printf("unknown bits in blit word %d - %08x\n", 4, blit4_unused); |
| 1153 | 1175 | |
| 1154 | | // ---- -111 ---- ---r ---- ---y ---- ---x |
| 1176 | // ---- -111 ---- ---r ---- ---y ---z ---x |
| 1155 | 1177 | // 1 = used bits? (unknown purpose.. might be object colour mode) |
| 1156 | 1178 | // x = x-flip |
| 1157 | 1179 | // y = y-flip |
| 1158 | | // r = unknown, not used much, occasional object - rotate |
| 1180 | // r = rotate 90 degrees |
| 1181 | // z = ??? set very occasionally, often at the start of stages, might relate to the clipping done at the same time? |
| 1159 | 1182 | |
| 1183 | // this might affect blending logic / amount when 0x8000 palette bit is set, and maybe even z-behavior |
| 1184 | // 7 = road, player bike etc.? possibly a 'do not blend' (solid) flag of sorts because the road has 0x8000 palette bit set... |
| 1185 | // 6 = smoke frome player bike, waves on west indies, waterfalls on niagra, occasional bits of road? |
| 1186 | // 5 = clouds |
| 1187 | // 4 = shadows and some HUD elements, occassional bit of road, some firework effects, all bg elements in the coolriders of coolriders (including reaper) |
| 1188 | // 3 = front coloured jets |
| 1189 | // 2 = middle coloured jets |
| 1190 | // 1 = last few coloured trails from the jets at the start, occassional bit of road |
| 1191 | // 0 = some HUD elements, title screen, tunnels? road during coolriders of.. (this doesn't have 0x8000 set) |
| 1160 | 1192 | |
| 1161 | 1193 | |
| 1194 | // note the road always has 0x8000 bit set in the palette. I *think* this is because they do a gradual blend of some kind between the road types |
| 1195 | // see the number of transitional road bits which have various values above set |
| 1162 | 1196 | |
| 1197 | if (blit4==object->state->debug_randompal) |
| 1198 | { |
| 1199 | b1colorNumber = object->state->machine().rand()&0xfff; |
| 1200 | } |
| 1201 | |
| 1202 | |
| 1163 | 1203 | /************* object->spriteblit[6] *************/ |
| 1164 | 1204 | |
| 1165 | 1205 | UINT16 vCellCount = (object->spriteblit[6] & 0x03ff0000) >> 16; |