trunk/src/mame/drivers/littlerb.c
| r17604 | r17605 | |
| 22 | 22 | How we distinguish between mode setting (clear, copy, cliprect etc.) VDP commands and actual sprite |
| 23 | 23 | commands is not yet understood. All 'sprite' sections of the blit list seem to be terminated with |
| 24 | 24 | a 0x0000 word, but it isn't clear how the blocks are started, the current method relies on some bits |
| 25 | | of the sprite data offset to determine if we're sprite data, or a command. Maybe this is just a |
| 25 | of the sprite data offset to determine if we're sprite data, or a command. Maybe this is just a |
| 26 | 26 | quirk of the hardware, and you can't have sprites at those offsets? |
| 27 | 27 | |
| 28 | 28 | Copy / Scroll are not yet implemented, see the Smileys between scenes in the original video. |
| r17604 | r17605 | |
| 96 | 96 | m_dacl(*this, "dacl"), |
| 97 | 97 | m_dacr(*this, "dacr"), |
| 98 | 98 | m_region4(*this, "region4") |
| 99 | | { |
| 99 | { |
| 100 | 100 | m_1ff80804 = -1; |
| 101 | 101 | } |
| 102 | 102 | |
| r17604 | r17605 | |
| 119 | 119 | UINT32 m_lasttype2pc; |
| 120 | 120 | UINT8 m_sound_index_l,m_sound_index_r; |
| 121 | 121 | UINT16 m_sound_pointer_l,m_sound_pointer_r; |
| 122 | | |
| 122 | |
| 123 | 123 | bitmap_ind16 *m_temp_bitmap_sprites; |
| 124 | 124 | bitmap_ind16 *m_temp_bitmap_sprites_back; |
| 125 | 125 | |
| r17604 | r17605 | |
| 163 | 163 | { |
| 164 | 164 | littlerb_printf("littlerb_1ff80804_w %04x\n", data); |
| 165 | 165 | |
| 166 | | if ((!(m_spritelist[2] & 0x1000)) && (!(m_spritelist[1] & 0x1000))) |
| 166 | if ((!(m_spritelist[2] & 0x1000)) && (!(m_spritelist[1] & 0x1000))) |
| 167 | 167 | { |
| 168 | 168 | |
| 169 | 169 | } |
| 170 | | else |
| 170 | else |
| 171 | 171 | { |
| 172 | 172 | if (!(m_spritelist[2] & 0x1000)) |
| 173 | 173 | m_temp_bitmap_sprites_back->fill(0, m_temp_bitmap_sprites_back->cliprect()); |
| 174 | 174 | |
| 175 | 175 | } |
| 176 | | |
| 176 | |
| 177 | 177 | littlerb_draw_sprites(space.machine()); |
| 178 | 178 | |
| 179 | 179 | |
| r17604 | r17605 | |
| 585 | 585 | } |
| 586 | 586 | |
| 587 | 587 | // logerror("IRQ\n"); |
| 588 | | if(scanline == 256) |
| 588 | if(scanline == 288) |
| 589 | 589 | { |
| 590 | 590 | device_set_input_line(state->m_maincpu, 4, HOLD_LINE); |
| 591 | 591 | } |
| r17604 | r17605 | |
| 683 | 683 | else if (spriteregion[offs+0] == 0x0040) |
| 684 | 684 | { |
| 685 | 685 | 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 | |
| 687 | 687 | // some scroll stuff is here (title -> high score transition) |
| 688 | 688 | // maybe also copy area operations? |
| 689 | 689 | |
| r17604 | r17605 | |
| 704 | 704 | { |
| 705 | 705 | if (spriteregion[offs+1] != 0xffd6) state->m_temp_bitmap_sprites->fill(0, state->m_temp_bitmap_sprites->cliprect()); |
| 706 | 706 | } |
| 707 | | |
| 708 | 707 | |
| 709 | 708 | |
| 709 | |
| 710 | 710 | // this is some kind of scroll or copy area.. |
| 711 | 711 | // also some of the other values change |
| 712 | 712 | // 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 |
| 713 | 713 | // anything scrolling |
| 714 | 714 | //yoffset = spriteregion[offs+1] - 0x90; |
| 715 | | |
| 716 | 715 | |
| 716 | |
| 717 | 717 | offs += 6; |
| 718 | 718 | } |
| 719 | 719 | else if (read_dword == 0x00e40020) |
| 720 | 720 | { |
| 721 | 721 | 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 | |
| 723 | 723 | if (spriteregion[offs+4]==0x6000) |
| 724 | 724 | layer = 1; |
| 725 | 725 | else |
| r17604 | r17605 | |
| 739 | 739 | { |
| 740 | 740 | // same as above? |
| 741 | 741 | 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 | |
| 743 | 743 | if (spriteregion[offs+4]==0x6000) |
| 744 | 744 | layer = 1; |
| 745 | 745 | else |
| r17604 | r17605 | |
| 816 | 816 | if (layer==0) draw_sprite(machine, *state->m_temp_bitmap_sprites, clip,xsize,ysize,fullcode,x,y); |
| 817 | 817 | else draw_sprite(machine, *state->m_temp_bitmap_sprites_back, clip,xsize,ysize,fullcode,x,y); |
| 818 | 818 | |
| 819 | | |
| 819 | |
| 820 | 820 | offs += 6; |
| 821 | 821 | } |
| 822 | 822 | } |
| r17604 | r17605 | |
| 832 | 832 | MCFG_SCREEN_ADD("screen", RASTER) |
| 833 | 833 | MCFG_SCREEN_REFRESH_RATE(50) // guess based on high vertical resolution |
| 834 | 834 | MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) |
| 835 | | MCFG_SCREEN_SIZE(512, 288) |
| 835 | MCFG_SCREEN_SIZE(512+22, 312) |
| 836 | 836 | MCFG_SCREEN_VISIBLE_AREA(0*8, 336-1, 0*8, 288-1) |
| 837 | 837 | MCFG_SCREEN_UPDATE_STATIC(littlerb) |
| 838 | 838 | |