Previous 199869 Revisions Next

r41669 Monday 9th November, 2015 at 11:23:29 UTC by Ryan Holtz
nw, more PVS-Studio fixes
[src/devices/cpu/hcd62121]hcd62121_ops.h
[src/devices/cpu/upd7810]upd7810.cpp
[src/devices/cpu/v810]v810.cpp
[src/devices/video]ef9345.cpp h63484.cpp i8244.cpp mc6845.cpp psx.cpp scn2674.cpp
[src/emu]render.cpp
[src/emu/ui]selgame.cpp
[src/lib/netlist/devices]nld_system.cpp
[src/mame/drivers]bfm_ad5.cpp bfm_sc5sw.cpp
[src/mame/machine]deco146.cpp pgmprot_igs027a_type1.cpp
[src/osd/modules/debugger]debugint.cpp

trunk/src/devices/cpu/hcd62121/hcd62121_ops.h
r250180r250181
185185         {                                                                           \
186186            UINT16 res = ( m_temp1[i] & 0x0f ) + ( m_temp2[i] & 0x0f ) + carry; \
187187                                                                  \
188            carry = 0;                                                              \
189188            if ( res > 9 )                                                          \
190189            {                                                                       \
191190               res += 6;                                                           \
trunk/src/devices/cpu/upd7810/upd7810.cpp
r250180r250181
17351735   m_tm.d = 0;
17361736   m_ecnt.d = 0;
17371737   m_etm.d = 0;
1738   m_ma = 0;
1739   m_mb = 0;
1738   MA = 0xff;
1739   MB = 0xff;
17401740   m_mcc = 0;
1741   m_mc = 0;
1741   MC = 0xff;
17421742   m_mm = 0;
1743   m_mf = 0;
1744   m_tmm = 0;
1745   m_etmm = 0;
1743   MF = 0xff;
1744   TMM = 0xff;
1745   ETMM = 0xff;
17461746   m_eom = 0;
17471747   m_sml = 0;
17481748   m_smh = 0;
17491749   m_anm = 0;
1750   m_mkl = 0;
1751   m_mkh = 0;
1750   MKL = 0xFF;
1751   MKH = 0xFF; // ??
17521752   m_zcm = 0;
17531753   m_pa_in = 0;
17541754   m_pb_in = 0;
r250180r250181
18021802   m_adrange = 0;
18031803
18041804   PANM = 0xff;
1805   ETMM = 0xff;
1806   TMM = 0xff;
1807   MA = 0xff;
1808   MB = 0xff;
1809   MC = 0xff;
1810   MF = 0xff;
1811   MKL = 0xff;
1812   MKH = 0xff; //?
18131805}
18141806
18151807void upd7801_device::device_reset()
trunk/src/devices/cpu/v810/v810.cpp
r250180r250181
12471247
12481248void v810_device::device_start()
12491249{
1250   m_irq_state = CLEAR_LINE;
1251   m_irq_line = 0;
1252   m_nmi_line = CLEAR_LINE;
12531250   m_program = &space(AS_PROGRAM);
12541251   m_direct = &m_program->direct();
12551252   m_io = &space(AS_IO);
12561253
12571254   m_irq_line = 0;
1258   m_irq_state = 0;
1259   m_nmi_line = 0;
1255   m_irq_state = CLEAR_LINE;
1256   m_nmi_line = CLEAR_LINE;
12601257   memset(m_reg, 0x00, sizeof(m_reg));
12611258
12621259   save_item(NAME(m_reg));
trunk/src/devices/video/ef9345.cpp
r250180r250181
860860         set_busy_flag(3.5);
861861         switch(cmd&7)
862862         {
863            case 0:     m_registers[1] = m_charset->u8(indexrom(7) & 0x1fff);
863            case 0:     m_registers[1] = m_charset->u8(indexrom(7) & 0x1fff); break;
864864            case 1:     m_registers[1] = m_tgs; break;
865865            case 2:     m_registers[1] = m_mat; break;
866866            case 3:     m_registers[1] = m_pat; break;
trunk/src/devices/video/h63484.cpp
r250180r250181
20162016   m_hc = m_hds = m_hdw = m_hws = m_hww = 0;
20172017   m_vc = m_vws = m_vww = m_vds = m_vsw = 0;
20182018   m_sp[0] = m_sp[1] = m_sp[2] = 0;
2019   m_ppx = m_ppy = 0;
20202019   m_cl0 = m_cl1 = 0;
20212020   m_xmin = m_ymin = m_xmax = m_ymax = 0;
20222021   m_ppx = m_pzcx = m_psx = m_pzx = m_pex = 0;
trunk/src/devices/video/i8244.cpp
r250180r250181
746746   {
747747      for( ii = 0; ii < samples; ii++, buffer++ )
748748      {
749         *buffer = 0;
750749         *buffer = signal & 0x1;
751750         period = (m_vdc.s.sound & 0x20) ? 1 : 4;
752751         if( ++m_sh_count >= period )
trunk/src/devices/video/mc6845.cpp
r250180r250181
10471047   m_vert_sync_pos = 1;
10481048   m_de = 0;
10491049   m_sync_width = 1;
1050   m_vert_disp = 0;
10511050   m_horiz_pix_total = m_vert_pix_total = 0;
10521051   m_max_visible_x = m_max_visible_y = 0;
10531052   m_hsync_on_pos = m_vsync_on_pos = 0;
trunk/src/devices/video/psx.cpp
r250180r250181
23122312
23132313   n_xend = SINT11( COORD_X( m_packet.GouraudLine.vertex[ 1 ].n_coord ) );
23142314   n_yend = SINT11( COORD_Y( m_packet.GouraudLine.vertex[ 1 ].n_coord ) );
2315   n_cr2.w.h = BGR_R( m_packet.GouraudLine.vertex[ 1 ].n_bgr ); n_cr1.w.l = 0;
2316   n_cg2.w.h = BGR_G( m_packet.GouraudLine.vertex[ 1 ].n_bgr ); n_cg1.w.l = 0;
2317   n_cb2.w.h = BGR_B( m_packet.GouraudLine.vertex[ 1 ].n_bgr ); n_cb1.w.l = 0;
2315   n_cr2.w.h = BGR_R( m_packet.GouraudLine.vertex[ 1 ].n_bgr ); n_cr2.w.l = 0;
2316   n_cg2.w.h = BGR_G( m_packet.GouraudLine.vertex[ 1 ].n_bgr ); n_cg2.w.l = 0;
2317   n_cb2.w.h = BGR_B( m_packet.GouraudLine.vertex[ 1 ].n_bgr ); n_cb2.w.l = 0;
23182318
23192319   n_x.sw.h = n_xstart; n_x.sw.l = 0;
23202320   n_y.sw.h = n_ystart; n_y.sw.l = 0;
trunk/src/devices/video/scn2674.cpp
r250180r250181
4444
4545void scn2674_device::device_reset()
4646{
47   m_IR_pointer= 0;
48   m_screen1_l= 0;
49   m_screen1_h= 0;
50   m_cursor_l= 0;
51   m_cursor_h= 0;
52   m_screen2_l= 0;
53   m_screen2_h= 0;
54   m_irq_register= 0;
55   m_status_register= 0;
56   m_irq_mask= 0;
57   m_gfx_enabled= 0;
58   m_display_enabled= 0;
59   m_display_enabled_field= 0;
60   m_display_enabled_scanline= 0;
61   m_cursor_enabled= 0;
62   m_IR0_double_ht_wd= 0;
63   m_IR0_scanline_per_char_row= 1;
64   m_IR0_sync_select= 0;
65   m_IR0_buffer_mode_select= 0;
66   m_IR1_interlace_enable= 0;
67   m_IR1_equalizing_constant= 0;
68   m_IR2_row_table= 0;
69   m_IR2_horz_sync_width= 0;
70   m_IR2_horz_back_porch= 0;
71   m_IR3_vert_front_porch= 0;
72   m_IR3_vert_back_porch= 0;
73   m_IR4_rows_per_screen= 0;
74   m_IR4_character_blink_rate_divisor= 0;
75   m_IR5_character_per_row= 0;
76   m_IR6_cursor_first_scanline= 0;
77   m_IR6_cursor_last_scanline= 0;
78   m_IR7_cursor_underline_position= 0;
79   m_IR7_cursor_rate_divisor= 0;
80   m_IR7_cursor_blink= 0;
81   m_IR7_vsync_width= 0;
82   m_IR8_display_buffer_first_address_LSB= 0;
83   m_IR9_display_buffer_first_address_MSB= 0;
84   m_IR9_display_buffer_last_address= 0;
85   m_IR10_display_pointer_address_lower= 0;
86   m_IR11_display_pointer_address_upper= 0;
87   m_IR11_reset_scanline_counter_on_scrollup= 0;
88   m_IR11_reset_scanline_counter_on_scrolldown= 0;
89   m_IR12_scroll_start= 0;
90   m_IR12_split_register_1= 0;
91   m_IR13_scroll_end= 0;
92   m_IR13_split_register_2= 0;
93   m_IR14_scroll_lines= 0;
94   m_IR14_double_1= 0;
95   m_IR14_double_2= 0;
96   m_spl1= 0;
97   m_spl2= 0;
98   m_dbl1= 0;
99   m_buffer= 0;
100   m_linecounter= 0;
101   m_irq_state= 0;
47   m_screen1_l = 0;
48   m_screen1_h = 0;
49   m_cursor_l = 0;
50   m_cursor_h = 0;
51   m_screen2_l = 0;
52   m_screen2_h = 0;
53   m_irq_register = 0;
54   m_status_register = 0;
55   m_irq_mask = 0;
56   m_gfx_enabled = 0;
57   m_display_enabled = 0;
58   m_display_enabled_field = 0;
59   m_display_enabled_scanline = 0;
60   m_cursor_enabled = 0;
61   m_IR0_double_ht_wd = 0;
62   m_IR0_scanline_per_char_row = 1;
63   m_IR0_sync_select = 0;
64   m_IR0_buffer_mode_select = 0;
65   m_IR1_interlace_enable = 0;
66   m_IR1_equalizing_constant = 0;
67   m_IR2_row_table = 0;
68   m_IR2_horz_sync_width = 0;
69   m_IR2_horz_back_porch = 0;
70   m_IR3_vert_front_porch = 0;
71   m_IR3_vert_back_porch = 0;
72   m_IR4_rows_per_screen = 0;
73   m_IR4_character_blink_rate_divisor = 0;
74   m_IR5_character_per_row = 0;
75   m_IR6_cursor_first_scanline = 0;
76   m_IR6_cursor_last_scanline = 0;
77   m_IR7_cursor_underline_position = 0;
78   m_IR7_cursor_rate_divisor = 0;
79   m_IR7_cursor_blink = 0;
80   m_IR7_vsync_width = 0;
81   m_IR8_display_buffer_first_address_LSB = 0;
82   m_IR9_display_buffer_first_address_MSB = 0;
83   m_IR9_display_buffer_last_address = 0;
84   m_IR10_display_pointer_address_lower = 0;
85   m_IR11_display_pointer_address_upper = 0;
86   m_IR11_reset_scanline_counter_on_scrollup = 0;
87   m_IR11_reset_scanline_counter_on_scrolldown = 0;
88   m_IR12_scroll_start = 0;
89   m_IR12_split_register_1 = 0;
90   m_IR13_scroll_end = 0;
91   m_IR13_split_register_2 = 0;
92   m_IR14_scroll_lines = 0;
93   m_IR14_double_1 = 0;
94   m_IR14_double_2 = 0;
95   m_spl1 = 0;
96   m_spl2 = 0;
97   m_dbl1 = 0;
98   m_buffer = 0;
99   m_linecounter = 0;
100   m_irq_state = 0;
102101   m_IR_pointer = 0;
103102   m_address = 0;
104103   m_start1change = 0;
trunk/src/emu/render.cpp
r250180r250181
935935   m_base_layerconfig.set_zoom_to_screen(manager.machine().options().artwork_crop());
936936
937937   // determine the base orientation based on options
938   m_orientation = ROT0;
939938   if (!manager.machine().options().rotate())
940939      m_base_orientation = orientation_reverse(manager.machine().system().flags & ORIENTATION_MASK);
941940
r250180r250181
13531352      ui_xform.yoffs = 0;
13541353      ui_xform.xscale = (float)m_width;
13551354      ui_xform.yscale = (float)m_height;
1356      ui_xform.color.r = ui_xform.color.g = ui_xform.color.b = ui_xform.color.a = 1.0f;
1355      ui_xform.color.r = ui_xform.color.g = ui_xform.color.b = 1.0f;
13571356      ui_xform.color.a = 0.9f;
13581357      ui_xform.orientation = m_orientation;
13591358      ui_xform.no_center = true;
trunk/src/emu/ui/selgame.cpp
r250180r250181
311311   x1 += UI_BOX_LR_BORDER;
312312   x2 -= UI_BOX_LR_BORDER;
313313   y1 += UI_BOX_TB_BORDER;
314   y2 -= UI_BOX_TB_BORDER;
315314
316315   // draw the text within it
317316   machine().ui().draw_text_full(container, tempbuf[0].c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE,
trunk/src/lib/netlist/devices/nld_system.cpp
r250180r250181
316316         rc.m_cmd = MULT;
317317      else if (cmd == "/")
318318         rc.m_cmd = DIV;
319      else if (cmd == "/")
320         rc.m_cmd = DIV;
321319      else if (cmd.startsWith("A"))
322320      {
323321         rc.m_cmd = PUSH_INPUT;
trunk/src/mame/drivers/bfm_ad5.cpp
r250180r250181
3838   // find it.
3939   int found = find_project_string(machine(), 3, 0);
4040   if (!found)
41    {
4142      printf("Normal rom pair string not found, checking mismatched / missing rom string\n");
43    }
4244
4345   // help identify roms where one of the pair is missing too
4446   if (!found)
4547   {
46         found = find_project_string(machine(), 3, 1);
47         found = find_project_string(machine(), 3, 2);
48      found = find_project_string(machine(), 3, 1);
4849   }
4950
50   if (!found)
51    if (!found)
52    {
53      found = find_project_string(machine(), 3, 2);
54    }
55   
56    if (!found)
57    {
5158      printf("No suitable string found\n");
59    }
5260
5361}
5462
trunk/src/mame/drivers/bfm_sc5sw.cpp
r250180r250181
1313513135   // find it.
1313613136   int found = find_project_string(machine(), 3, 0);
1313713137   if (!found)
13138    {
1313813139      printf("Normal rom pair string not found, checking mismatched / missing rom string\n");
13140    }
1313913141
1314013142   // help identify roms where one of the pair is missing too
1314113143   if (!found)
1314213144   {
13143         found = find_project_string(machine(), 3, 1);
13144         found = find_project_string(machine(), 3, 2);
13145      found = find_project_string(machine(), 3, 1);
1314513146   }
13147   
13148    if (!found)
13149    {
13150      found = find_project_string(machine(), 3, 2);
13151    }
13152   
13153    if (!found)
13154    {
13155        printf("No suitable string found\n");
13156    }
1314613157
13147   if (!found)
13148      printf("No suitable string found\n");
13149
1315013158}
1315113159
1315213160// PR2437 28 PLAYS LATER         TEDL SOUNDS         NITH
trunk/src/mame/machine/deco146.cpp
r250180r250181
14491449
14501450   m_current_rambank = 0;
14511451
1452   m_nand = 0x0000;
1453   m_xor = 0x0000;
14541452   m_soundlatch = 0x0000;
14551453
14561454   m_latchaddr = 0xffff;
r250180r250181
14601458   m_xor=0;
14611459//  m_nand=0xffff;
14621460   m_nand=0x0; // wizard fire doesn't initialize it, but accesses addresses rohga needs the mask applied on
1463
1464
1465
14661461}
14671462
14681463
trunk/src/mame/machine/pgmprot_igs027a_type1.cpp
r250180r250181
18461846{
18471847   if (stage==-1)
18481848   {
1849      tableoffs = 0;
1850      tableoffs2 = 0;
18511849      entries_left = 0;
18521850      currentcolumn = 0;
18531851      currentrow = 0;
r250180r250181
21142112   hackcount2 = 0;
21152113   hack_47_value = 0;
21162114   hack_31_table_offset = 0;
2117   hack_31_table_offset = 0;
21182115
21192116//#define PUZZLI2_LEVEL_STRUCTURE_LOG
21202117#ifdef PUZZLI2_LEVEL_STRUCTURE_LOG
trunk/src/osd/modules/debugger/debugint.cpp
r250180r250181
14371437{
14381438   if (firststop && list == NULL)
14391439   {
1440      DView *dv;
1441      render_target *target;
1440      render_target *target = &device.machine().render().ui_target();
14421441
1443      target = &device.machine().render().ui_target();
1444
14451442      //set_view_by_name(target, "Debug");
14461443
1447      dv = dview_alloc(target, device.machine(), DVT_DISASSEMBLY, VIEW_STATE_FOLLOW_CPU);
1448      dv->editor.active = TRUE;
1449      dv->editor.container = &device.machine().render().ui_container();
1450      dv = dview_alloc(target, device.machine(), DVT_STATE, VIEW_STATE_FOLLOW_CPU);
1451      dv = dview_alloc(target, device.machine(), DVT_CONSOLE, VIEW_STATE_FOLLOW_CPU);
1452      dview_set_title(dv, "Console");
1453      dv->editor.active = TRUE;
1454      dv->editor.container = &device.machine().render().ui_container();
1455      set_focus_view(dv);
1444      DView *disassembly = dview_alloc(target, device.machine(), DVT_DISASSEMBLY, VIEW_STATE_FOLLOW_CPU);
1445      disassembly->editor.active = TRUE;
1446      disassembly->editor.container = &device.machine().render().ui_container();
1447     
1448        dview_alloc(target, device.machine(), DVT_STATE, VIEW_STATE_FOLLOW_CPU);
1449     
1450        DView *console = dview_alloc(target, device.machine(), DVT_CONSOLE, VIEW_STATE_FOLLOW_CPU);
1451      dview_set_title(console, "Console");
1452      console->editor.active = TRUE;
1453      console->editor.container = &device.machine().render().ui_container();
1454      set_focus_view(console);
14561455   }
14571456
14581457   followers_set_cpu(&device);


Previous 199869 Revisions Next


© 1997-2024 The MAME Team