Previous 199869 Revisions Next

r20425 Thursday 24th January, 2013 at 00:27:48 UTC by Angelo Salese
SCSP: Made MSLC register to be write only, fixes Deka Yonku ~Tough the Truck~ hang on Human logo
[src/emu/sound]scsp.c
[src/mame/video]stvvdp2.c

trunk/src/mame/video/stvvdp2.c
r20424r20425
39273927   int i;
39283928   int scroll_values_equal;
39293929   int lines;
3930   INT16 scrollx, scrolly;
3930   INT16 main_scrollx, main_scrolly;
39313931//  INT32 incx;
39323932   int linescroll_enable, vertical_linescroll_enable, linezoom_enable;
39333933   int vertical_linescroll_index = -1;
39343934
39353935   // read original scroll values
3936   scrollx = stv2_current_tilemap.scrollx;
3937   scrolly = stv2_current_tilemap.scrolly;
3936   main_scrollx = stv2_current_tilemap.scrollx;
3937   main_scrolly = stv2_current_tilemap.scrolly;
39383938//  incx = stv2_current_tilemap.incx;
39393939
39403940   // prepare linescroll flags
r20424r20425
40194019      {
40204020         prev_scroll_values[i] &= 0x07ffff00;
40214021         if ( prev_scroll_values[i] & 0x04000000 ) prev_scroll_values[i] |= 0xf8000000;
4022         stv2_current_tilemap.scrollx = scrollx + (prev_scroll_values[i] >> 16);
4022         stv2_current_tilemap.scrollx = main_scrollx + (prev_scroll_values[i] >> 16);
40234023         i++;
40244024      }
40254025      // vertical line scroll
40264026      if ( vertical_linescroll_enable )
40274027      {
4028         stv2_current_tilemap.scrolly = scrolly + (prev_scroll_values[i] >> 16);
4028         stv2_current_tilemap.scrolly = main_scrolly + (prev_scroll_values[i] >> 16);
40294029         i++;
40304030      }
40314031
r20424r20425
40404040
40414041//      if ( LOG_VDP2 ) logerror( "Linescroll: y < %d, %d >, scrollx = %d, scrolly = %d, incx = %f\n", mycliprect.min_y, mycliprect.max_y, stv2_current_tilemap.scrollx, stv2_current_tilemap.scrolly, (float)stv2_current_tilemap.incx/65536.0 );
40424042      // render current tilemap portion
4043      stv_vdp2_check_tilemap(machine, bitmap, mycliprect );
4043      stv_vdp2_apply_window_on_layer(machine,mycliprect);
40444044
4045      if (stv2_current_tilemap.bitmap_enable) // this layer is a bitmap
4046      {
4047         /*elandore doesn't like current cliprect code,will be worked on...*/
4048         //if ( window_applied && stv2_current_tilemap.colour_depth != 4)
4049         //  stv2_current_tilemap.window_control = 0;
4050
4051         stv_vdp2_draw_basic_bitmap(machine, bitmap, mycliprect);
4052      }
4053      else
4054      {
4055         stv_vdp2_draw_basic_tilemap(machine, bitmap, mycliprect);
4056      }
4057
40454058      // update parameters for next iteration
40464059      memcpy( prev_scroll_values, scroll_values, sizeof(scroll_values));
40474060      cur_line += lines;
trunk/src/emu/sound/scsp.c
r20424r20425
736736      case 0x7:
737737         scsp_midi_in(space.machine().device("scsp"), space, 0, scsp->udata.data[0x6/2]&0xff, 0);
738738         break;
739      case 8:
740      case 9:
741         /* Only MSLC could be written. */
742         scsp->udata.data[0x8/2] &= 0x7800;
743         break;
739744      case 0x12:
740745      case 0x13:
741746      case 0x14:
r20424r20425
901906            unsigned int SGC = (slot->EG.state) & 3;
902907            unsigned int CA = (slot->cur_addr>>(SHIFT+12)) & 0xf;
903908            unsigned int EG = (0x1f - (slot->EG.volume>>(EG_SHIFT+5))) & 0x1f;
904            scsp->udata.data[0x8/2] =  (MSLC << 11) | (CA << 7) | (SGC << 5) | EG;
909            /* note: according to the manual MSLC is write only, CA, SGC and EG read only.  */
910            scsp->udata.data[0x8/2] =  /*(MSLC << 11) |*/ (CA << 7) | (SGC << 5) | EG;
905911         }
906912         break;
907913

Previous 199869 Revisions Next


© 1997-2024 The MAME Team