Previous 15994 Revisions Next

r10201 Thursday 27th January, 2011 at 09:04:15 UTC by MooglyGuy
[N64] Added additional bounds-checking to RDP::VideoUpdate16. Perfect Dark now at least boots into Combat Sim mode. [Harmony]

[N64] Removed SP DMA early-out on 0-length DMA. Allows Indiana Jones and the Infernal Machine to boot and run up to trying to get in-game. [Happy]

[N64] Changed DRC to use MIPS3DRC_COMPATIBLE_OPTIONS. Fixes a number of glitches and crashes, at the expense of additional glitchiness in Pokemon Snap and possibly others. [Harmony]
[src/mame/machine]n64.c
[src/mame/video]n64.c

src/mame/machine/n64.c
r10200r10201
3333
3434READ32_HANDLER( n64_mi_reg_r )
3535{
36   //printf("mi_reg_r: %08x\n", offset << 2);
3637   switch (offset)
3738   {
3839        case 0x00/4:            // MI_MODE_REG
r10200r10201
5758
5859WRITE32_HANDLER( n64_mi_reg_w )
5960{
61   //printf("mi_reg_w: %08x = %08x & %08x\n", offset << 2, data, mem_mask);
6062   switch (offset)
6163   {
6264      case 0x00/4:      // MI_INIT_MODE_REG
r10200r10201
340342   address_space *space = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM);
341343   int i, c;
342344
343   if (sp_dma_length == 0)
344   {
345      return;
346   }
347
348345   sp_dma_length++;
349346   if ((sp_dma_length & 7) != 0)
350347   {
r10200r10201
13571354         if (pi_first_dma)
13581355         {
13591356            // TODO: CIC-6105 has different address...
1360            space->write_dword(0x00000318, 0x400000);
1357            space->write_dword(0x00000318, 0x400000); // Switch to 0x800000 to let 6105 games see 8 megs... sometimes
13611358            space->write_dword(0x000003f0, 0x800000);
13621359            pi_first_dma = 0;
13631360         }
r10200r10201
20162013
20172014MACHINE_START( n64 )
20182015{
2019   mips3drc_set_options(machine->device("maincpu"), MIPS3DRC_FASTEST_OPTIONS + MIPS3DRC_STRICT_VERIFY);
2016   mips3drc_set_options(machine->device("maincpu"), MIPS3DRC_COMPATIBLE_OPTIONS);
20202017
20212018   /* configure fast RAM regions for DRC */
20222019   mips3drc_add_fastram(machine->device("maincpu"), 0x00000000, 0x007fffff, FALSE, rdram);
src/mame/video/n64.c
r10200r10201
100100
101101   INT32 hdiff = (n64_vi_hstart & 0x3ff) - ((n64_vi_hstart >> 16) & 0x3ff);
102102   float hcoeff = ((float)(n64_vi_xscale & 0xfff) / (1 << 10));
103
103104   UINT32 hres = ((float)hdiff * hcoeff);
104105   INT32 invisiblewidth = n64_vi_width - hres;
105106
r10200r10201
111112   {
112113      return;
113114   }
115   if(vcoeff < 0.0f || hcoeff < 0.0f)
116   {
117      return;
118   }
114119
115120   if (hres > 640) // Needed by Top Gear Overdrive (E)
116121   {
r10200r10201
122127
123128   if (frame_buffer)
124129   {
125      for(int j = 0; j < vres; j++)
130      for(int j = 0; j < vres && j < bitmap->height; j++)
126131      {
127132         UINT32 *d = BITMAP_ADDR32(bitmap, j, 0);
128133
129         for(int i = 0; i < hres; i++)
134         for(int i = 0; i < hres && i < bitmap->width; i++)
130135         {
131136            Color c;
132137            //int r, g, b;

Previous 15994 Revisions Next


© 1998-2018 The MESS Team