Previous 199869 Revisions Next

r17605 Sunday 2nd September, 2012 at 23:41:45 UTC by Angelo Salese
Fixed vblank line irq triggering
[src/mame/drivers]littlerb.c

trunk/src/mame/drivers/littlerb.c
r17604r17605
2222How we distinguish between mode setting (clear, copy, cliprect etc.) VDP commands and actual sprite
2323commands is not yet understood.  All 'sprite' sections of the blit list seem to be terminated with
2424a 0x0000 word, but it isn't clear how the blocks are started, the current method relies on some bits
25of the sprite data offset to determine if we're sprite data, or a command.  Maybe this is just a
25of the sprite data offset to determine if we're sprite data, or a command.  Maybe this is just a
2626quirk of the hardware, and you can't have sprites at those offsets?
2727
2828Copy / Scroll are not yet implemented, see the Smileys between scenes in the original video.
r17604r17605
9696        m_dacl(*this, "dacl"),
9797         m_dacr(*this, "dacr"),
9898      m_region4(*this, "region4")
99   {
99   {
100100      m_1ff80804 = -1;
101101   }
102102
r17604r17605
119119   UINT32 m_lasttype2pc;
120120   UINT8 m_sound_index_l,m_sound_index_r;
121121   UINT16 m_sound_pointer_l,m_sound_pointer_r;
122   
122
123123   bitmap_ind16 *m_temp_bitmap_sprites;
124124   bitmap_ind16 *m_temp_bitmap_sprites_back;
125125
r17604r17605
163163   {
164164      littlerb_printf("littlerb_1ff80804_w %04x\n", data);
165165
166      if ((!(m_spritelist[2] & 0x1000)) && (!(m_spritelist[1] & 0x1000)))
166      if ((!(m_spritelist[2] & 0x1000)) && (!(m_spritelist[1] & 0x1000)))
167167      {
168168
169169      }
170      else
170      else
171171      {
172172         if (!(m_spritelist[2] & 0x1000))
173173            m_temp_bitmap_sprites_back->fill(0, m_temp_bitmap_sprites_back->cliprect());
174174
175175      }
176     
176
177177      littlerb_draw_sprites(space.machine());
178178
179179
r17604r17605
585585   }
586586
587587//  logerror("IRQ\n");
588   if(scanline == 256)
588   if(scanline == 288)
589589   {
590590      device_set_input_line(state->m_maincpu, 4, HOLD_LINE);
591591   }
r17604r17605
683683      else if (spriteregion[offs+0] == 0x0040)
684684      {
685685         littlerb_alt_printf("Control Word %04x %04x %04x %04x %04x %04x ---- ---- ---- ----\n", spriteregion[offs+0], spriteregion[offs+1], spriteregion[offs+2], spriteregion[offs+3], spriteregion[offs+4], spriteregion[offs+5]);
686         
686
687687         // some scroll stuff is here (title -> high score transition)
688688         // maybe also copy area operations?
689689
r17604r17605
704704         {
705705            if (spriteregion[offs+1] != 0xffd6) state->m_temp_bitmap_sprites->fill(0, state->m_temp_bitmap_sprites->cliprect());
706706         }
707           
708707
709708
709
710710         // this is some kind of scroll or copy area..
711711         // also some of the other values change
712712         // this is set AFTER the graphics which need to be scrolled are sent and causes the credit text to bounce up and down instead of
713713         // anything scrolling
714714         //yoffset = spriteregion[offs+1] - 0x90;
715         
716715
716
717717         offs += 6;
718718      }
719719      else if (read_dword == 0x00e40020)
720720      {
721721         littlerb_alt_printf("Control Word %04x %04x %04x %04x %04x %04x %04x %04x %04x %04x\n", spriteregion[offs+0], spriteregion[offs+1], spriteregion[offs+2], spriteregion[offs+3], spriteregion[offs+4], spriteregion[offs+5], spriteregion[offs+6], spriteregion[offs+7], spriteregion[offs+8], spriteregion[offs+9]);
722     
722
723723         if (spriteregion[offs+4]==0x6000)
724724            layer = 1;
725725         else
r17604r17605
739739      {
740740         // same as above?
741741         littlerb_alt_printf("Control Word %04x %04x %04x %04x %04x %04x %04x %04x %04x %04x\n", spriteregion[offs+0], spriteregion[offs+1], spriteregion[offs+2], spriteregion[offs+3], spriteregion[offs+4], spriteregion[offs+5], spriteregion[offs+6], spriteregion[offs+7], spriteregion[offs+8], spriteregion[offs+9]);
742   
742
743743         if (spriteregion[offs+4]==0x6000)
744744            layer = 1;
745745         else
r17604r17605
816816         if (layer==0) draw_sprite(machine, *state->m_temp_bitmap_sprites, clip,xsize,ysize,fullcode,x,y);
817817         else draw_sprite(machine, *state->m_temp_bitmap_sprites_back, clip,xsize,ysize,fullcode,x,y);
818818
819           
819
820820         offs += 6;
821821      }
822822   }
r17604r17605
832832   MCFG_SCREEN_ADD("screen", RASTER)
833833   MCFG_SCREEN_REFRESH_RATE(50) // guess based on high vertical resolution
834834   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500))
835   MCFG_SCREEN_SIZE(512, 288)
835   MCFG_SCREEN_SIZE(512+22, 312)
836836   MCFG_SCREEN_VISIBLE_AREA(0*8, 336-1, 0*8, 288-1)
837837   MCFG_SCREEN_UPDATE_STATIC(littlerb)
838838

Previous 199869 Revisions Next


© 1997-2024 The MAME Team