Previous 15994 Revisions Next

r14687 Sunday 4th March, 2012 at 14:01:32 UTC by Dan Boris
- Changed color of background grid color 0 to match sprite color 0 (Fixes KTAA title screen)
- Fixed Odyssey2_video_w so that m_o2_vdc.reg[] is always updated (Fixes Blockout)
- Changed quad character generation so character height is always taken from 4th character (KTAA level 2)
[src/mess/video]odyssey2.c

src/mess/video/odyssey2.c
r14686r14687
22
33  video/odyssey2.c
44
5  2012-02-04 DanBoris
6     - Changed color of background grid color 0 to match sprite color 0 (Fixes KTAA title screen)
7     - Fixed Odyssey2_video_w so that m_o2_vdc.reg[] is always updated (Fixes Blockout)
8     - Changed quad character generation so character height is always taken from 4th character (KTAA level 2)
9
10
511***************************************************************************/
612
713#include "emu.h"
r14686r14687
4753   0xFF,0xFF,0xFF,
4854
4955   /* Character,Sprite colors */
50   0x71,0x71,0x71,   /* Dark Grey */
56   0x80,0x80,0x80,   /* Dark Grey */
5157   0xFF,0x80,0x80,   /* Red */
5258   0x00,0xC0,0x00,   /* Green */
5359   0xff,0x9b,0x60,   /* Orange */
r14686r14687
204210   if( offset >= 0xa7 && offset <= 0xaa )
205211      state->m_sh_channel->update();
206212
207    if (offset == 0xa0)
208    {
213    if (offset == 0xa0) {
214
215
209216        if (    state->m_o2_vdc.s.control & VDC_CONTROL_REG_STROBE_XY
210217             && !(data & VDC_CONTROL_REG_STROBE_XY))
211218        {
r14686r14687
221228         }
222229
223230            state->m_y_beam_pos = space->machine().primary_screen->vpos() - state->m_start_vpos;
224
225            /* This is wrong but more games work with it, TODO: Figure
226             * out correct change.  Maybe update the screen here??
227             * It seems what happens is 0x0 is written to $A0 just before
228             * VLBANK (video update) so no screen updates happen.
229             */
230
231            return;
232231        }
233232    }
234233
r14686r14687
398397               int   x = state->m_o2_vdc.s.quad[i].single[0].x;
399398               int j;
400399
400               // Charaecter height is always determined by the height of the 4th character
401               int      char_height = 8 - ( ( ( y >> 1 ) + state->m_o2_vdc.s.quad[i].single[3].ptr ) & 7 );
402
401403               for ( j = 0; j < ARRAY_LENGTH( state->m_o2_vdc.s.quad[0].single ); j++, x += 8 )
402404               {
403                  int      char_height = 8 - ( ( ( y >> 1 ) + state->m_o2_vdc.s.quad[i].single[j].ptr ) & 7 );
405
406
407                  /* char_height = 8; */
408
409                  logerror("char_height: %d, y: %d, m_start_vpos: %d\n",char_height,y, state->m_start_vpos);
410
411
404412                  if ( y <= ( vpos - state->m_start_vpos ) && ( vpos - state->m_start_vpos ) < y + char_height * 2 )
405413                  {
406                     UINT16 color = 16 + ( ( state->m_o2_vdc.s.quad[i].single[j].color & 0x0E ) >> 1 );
414
415                  UINT16 color = 16 + ( ( state->m_o2_vdc.s.quad[i].single[j].color & 0x0E ) >> 1 );
416
417
407418                     int   offset = ( state->m_o2_vdc.s.quad[i].single[j].ptr | ( ( state->m_o2_vdc.s.quad[i].single[j].color & 0x01 ) << 8 ) ) + ( y >> 1 ) + ( ( vpos - state->m_start_vpos - y ) >> 1 );
419
408420                     UINT8   chr = ((char*)o2_shape)[ offset & 0x1FF ];
421
422
423                      logerror("vpos: %d, object: %d, Inst: %d, offset: %d, chr: %x \n",vpos,i,j,offset,chr);
424
409425                     UINT8   m;
410426                     for ( m = 0x80; m > 0; m >>= 1, x++ )
411427                     {

Previous 15994 Revisions Next


© 1998-2018 The MESS Team