Previous 199869 Revisions Next

r21463 Wednesday 27th February, 2013 at 12:14:35 UTC by David Haywood
some notes on what is likely the blending control
[src/mame/drivers]coolridr.c

trunk/src/mame/drivers/coolridr.c
r21462r21463
403403      m_work_queue[1] = osd_work_queue_alloc(WORK_QUEUE_FLAG_HIGH_FREQ);
404404      decode[0].current_object = 0;
405405      decode[1].current_object = 0;
406      debug_randompal = 8;
406407
407408   }
408409
r21462r21463
502503
503504   void sysh1_dma_transfer( address_space &space, UINT16 dma_index );
504505
506   int debug_randompal;
507
505508   UINT16 *m_h1_vram;
506509   UINT8 *m_h1_pcg;
507510   UINT16 *m_h1_pal;
r21462r21463
707710
708711UINT32 coolridr_state::screen_update_coolridr1(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
709712{
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
710726   return screen_update_coolridr(screen,bitmap,cliprect,0);
711727}
712728
r21462r21463
10221038*/
10231039
10241040
1041
1042
1043
10251044#define DRAW_PIX \
10261045   if (pix != 0x8000) \
10271046   { \
r21462r21463
11421161
11431162   /************* object->spriteblit[4] *************/
11441163
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;
11471166   //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
11491169   UINT32 blit_flipx = object->spriteblit[4] & 0x00000001;
11501170   UINT32 blit_flipy = (object->spriteblit[4] & 0x00000100)>>8;
11511171   UINT32 blit_rotate = (object->spriteblit[4] & 0x00010000)>>16;
1172   //UINT32 b4_unk = object->spriteblit[4] & 0x00000010;
1173
11521174   if (blit4_unused) printf("unknown bits in blit word %d -  %08x\n", 4, blit4_unused);
11531175
1154   // ---- -111 ---- ---r ---- ---y ---- ---x
1176   // ---- -111 ---- ---r ---- ---y ---z ---x
11551177   // 1 = used bits? (unknown purpose.. might be object colour mode)
11561178   // x = x-flip
11571179   // 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?
11591182
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)
11601192
11611193
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
11621196
1197   if (blit4==object->state->debug_randompal)
1198   {
1199      b1colorNumber = object->state->machine().rand()&0xfff;
1200   }
1201
1202
11631203   /************* object->spriteblit[6] *************/
11641204
11651205   UINT16 vCellCount = (object->spriteblit[6] & 0x03ff0000) >> 16;

Previous 199869 Revisions Next


© 1997-2024 The MAME Team