Previous Thread
Next Thread
Print Thread
Page 108 of 528 1 2 106 107 108 109 110 527 528
Re: SVN builds - new driver flood [Re: R. Belmont] #56363 11/15/09 08:12 PM
Joined: Mar 2001
Posts: 16,303
R
R. Belmont Online Content
Very Senior Member
Online Content
Very Senior Member
R
Joined: Mar 2001
Posts: 16,303
Oh, god. This code is beyond Acho levels of 64-bit dirtiness. If MSVC compiled it without warnings the compiler team should be nuked from orbit.

Code:
Compiling src/mame/video/n64.c...                                 
cc1: warnings being treated as errors                             
src/mame/video/n64.c: In function ‘video_update_n64’:             
src/mame/video/n64.c:565: error: cast from pointer to integer of different size
src/mame/video/n64.c:565: error: cast from pointer to integer of different size
src/mame/video/n64.c: In function ‘video_filter16’:
src/mame/video/n64.c:2139: error: cast from pointer to integer of different size
src/mame/video/n64.c:2165: error: cast from pointer to integer of different size
src/mame/video/n64.c:2172: error: cast to pointer from integer of different size
src/mame/video/n64.c:2173: error: cast to pointer from integer of different size
src/mame/video/n64.c:2199: error: cast to pointer from integer of different size
src/mame/video/n64.c:2200: error: cast to pointer from integer of different size
src/mame/video/n64.c:2226: error: cast to pointer from integer of different size
src/mame/video/n64.c:2227: error: cast to pointer from integer of different size
src/mame/video/n64.c: In function ‘divot_filter16’:
src/mame/video/n64.c:2356: error: cast from pointer to integer of different size
src/mame/video/n64.c:2358: error: cast to pointer from integer of different size
src/mame/video/n64.c:2358: error: cast to pointer from integer of different size
src/mame/video/n64.c:2359: error: cast to pointer from integer of different size
src/mame/video/n64.c:2359: error: cast to pointer from integer of different size
src/mame/video/n64.c: In function ‘restore_filter16’:
src/mame/video/n64.c:2449: error: cast from pointer to integer of different size
src/mame/video/n64.c:2468: error: cast to pointer from integer of different size
src/mame/video/n64.c:2504: error: cast to pointer from integer of different size
src/mame/video/n64.c:2541: error: cast to pointer from integer of different size

Last edited by R. Belmont; 11/15/09 08:15 PM.
Re: SVN builds - new driver flood [Re: R. Belmont] #56364 11/15/09 08:21 PM
Joined: Dec 1999
Posts: 1,173
J
Justin Offline
Very Senior Member
Offline
Very Senior Member
J
Joined: Dec 1999
Posts: 1,173
Those cast issues should have been fixed in MESS SVN last night. I do still get some different warnings in MSVC though:

Quote:
src\mame\video\n64.c(3488) : warning C4819: The file contains a character that cannot be represented in the current code page (932). Save the file in Unicode format to prevent data loss
c:\games\emulated\mess\src\mame\video\n64.c(4271) : warning C4701: potentially uninitialized local variable 'dsdeh' used
c:\games\emulated\mess\src\mame\video\n64.c(4272) : warning C4701: potentially uninitialized local variable 'dtdeh' used
c:\games\emulated\mess\src\mame\video\n64.c(4273) : warning C4701: potentially uninitialized local variable 'dwdeh' used
c:\games\emulated\mess\src\mame\video\n64.c(4274) : warning C4701: potentially uninitialized local variable 'drdeh' used
c:\games\emulated\mess\src\mame\video\n64.c(4275) : warning C4701: potentially uninitialized local variable 'dgdeh' used
c:\games\emulated\mess\src\mame\video\n64.c(4276) : warning C4701: potentially uninitialized local variable 'dbdeh' used
c:\games\emulated\mess\src\mame\video\n64.c(4277) : warning C4701: potentially uninitialized local variable 'dadeh' used
c:\games\emulated\mess\src\mame\video\n64.c(4278) : warning C4701: potentially uninitialized local variable 'dzdeh' used
c:\games\emulated\mess\src\mame\video\n64.c(1859) : warning C4701: potentially uninitialized local variable 't0' used
c:\games\emulated\mess\src\mame\video\n64.c(1864) : warning C4701: potentially uninitialized local variable 't3' used


(The Unicode thing is because of a comment in what appears to be the legacy Windows Russian encoding on line 4008. I'd convert it myself if it wasn't in a src/mame/ file.)

Re: SVN builds - new driver flood [Re: Justin] #56365 11/15/09 08:50 PM
Joined: Mar 2001
Posts: 16,303
R
R. Belmont Online Content
Very Senior Member
Online Content
Very Senior Member
R
Joined: Mar 2001
Posts: 16,303
Oh, well those cast issues weren't fixed in MAME - that's current MAME SVN I got those errors from. Could whoever fixed them in MESS please submit them over?

Re: SVN builds - new driver flood [Re: R. Belmont] #56367 11/15/09 09:05 PM
Joined: May 2009
Posts: 1,804
J
Just Desserts Offline
Very Senior Member
Offline
Very Senior Member
J
Joined: May 2009
Posts: 1,804
Originally Posted By R. Belmont
Oh, well those cast issues weren't fixed in MAME - that's current MAME SVN I got those errors from. Could whoever fixed them in MESS please submit them over?


I will as soon as I fix all of these Mysterious Issues That I'm Not Seeing in the MESS build, then I'll move it all over en masse.

Re: SVN builds - new driver flood [Re: Just Desserts] #56376 11/16/09 04:51 AM
Joined: Mar 2001
Posts: 16,303
R
R. Belmont Online Content
Very Senior Member
Online Content
Very Senior Member
R
Joined: Mar 2001
Posts: 16,303
Incidentally, current SVN does compile finally, but zero (0) N64 games don't crash on a 64-bit build now, which makes it impossible for me or Aaron to diagnose your TLB problems. Can we back out to 0.135 until angrylion and friends get their shit together?

Re: SVN builds - new driver flood [Re: R. Belmont] #56379 11/16/09 10:54 AM
Joined: Sep 2007
Posts: 40
A
angrylion Offline
Member
Offline
Member
A
Joined: Sep 2007
Posts: 40
Yeah, my code is dirty in many aspects, not warning-free and not 64-bit compatible. I warned JD about that.
Negative array indices are allowed by C (C 99 standard, 6.5.2.1, 6.5.6.8), provided that an array is effectively a pointer into another array, which is the case here. It's a dangerous programming practice, though.
leftup and the likes should be signed, as I suggested on the previous page. In r6390 JD made them unsigned, it may be (just a guess) a cause for crashes on 64 bit machines.
One option is to exclude VI filters entirely until the clean implementation is written.
Another option is to roll back altogether and then add functionality from my code in parts.

Last edited by angrylion; 11/16/09 11:57 AM.
Re: SVN builds - new driver flood [Re: angrylion] #56381 11/16/09 01:27 PM
Joined: May 2009
Posts: 1,804
J
Just Desserts Offline
Very Senior Member
Offline
Very Senior Member
J
Joined: May 2009
Posts: 1,804
I just checked in a potential fix for the 64-bit crashiness, see if that fixes anything.

Re: SVN builds - new driver flood [Re: Just Desserts] #56382 11/16/09 03:17 PM
Joined: Dec 1999
Posts: 1,173
J
Justin Offline
Very Senior Member
Offline
Very Senior Member
J
Joined: Dec 1999
Posts: 1,173
Yes, that did the trick.

Re: SVN builds - new driver flood [Re: angrylion] #56392 11/16/09 07:10 PM
Joined: May 2004
Posts: 1,592
H
Haze Offline
Very Senior Member
Offline
Very Senior Member
H
Joined: May 2004
Posts: 1,592
Originally Posted By angrylion
I warned JD about that.
Negative array indices are allowed by C (C 99 standard, 6.5.2.1, 6.5.6.8), provided that an array is effectively a pointer into another array, which is the case here. It's a dangerous programming practice, though.


I'm pretty sure we used to have a bug in a few drivers caused by this very thing on 64-bit systems, and when compiled as 64-bit a negative array index would kill it on the spot, regardless of how valid it was. Might have been an issue with that version of the compiler tho.


Re: SVN builds - new driver flood [Re: Haze] #56393 11/16/09 07:48 PM
Joined: May 2009
Posts: 1,804
J
Just Desserts Offline
Very Senior Member
Offline
Very Senior Member
J
Joined: May 2009
Posts: 1,804
Fortunately, that doesn't seem to happen anymore. INT32-ing the UINT32s took care of it nicely. Thanks for the suggestion, AL! smile

Page 108 of 528 1 2 106 107 108 109 110 527 528

Who's Online Now
7 registered members (Reznor007, AJR, Golden Child, Stiletto, robcfg, couriersud, 1 invisible), 147 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
ShoutChat Box
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Forum Statistics
Forums9
Topics8,684
Posts114,031
Members4,863
Most Online510
Aug 26th, 2019
Powered by UBB.threads™ PHP Forum Software 7.7.3