Jump to content

Can't compile code from repository


crazyjul

Recommended Posts

To complete, when I compile the DS dll I get those link errors :

 

 

dsmmumain.obj : error LNK2019: unresolved external symbol _sram_read referenced in function _MMUMainrdB

dsmmusub.obj : error LNK2001: unresolved external symbol _sram_read

dsmmumain.obj : error LNK2019: unresolved external symbol _sram_write referenced in function _MMUMainwrB

dsmmusub.obj : error LNK2001: unresolved external symbol _sram_write

glds.obj : error LNK2001: unresolved external symbol _sram_save

glds.obj : error LNK2001: unresolved external symbol _sram_load

.\..\..\Build\Debug/ds.dll : fatal error LNK1120: 4 unresolved externals

 

Hope it help

 

crazyjul

Link to comment
Share on other sites

That would be great, thanks! The sram patch was a contribution I received and I applied the patch, but after I tested it I forgot to save and record the project.

 

With the sram fixed, I've made a bit of cleaning.

 

I've remove nearly all warnings.

I also fix declarations of all function.

 

I think I've found a bug:

 

In the sqrt intruction, you're doing : src=arm7reg.r[0]; arm7reg.r[0]= (u32) sqrt(src);

 

As far as I know, this sqrt is made on integer and not float. Am I right??

If yes, as math.h was not include, sqrt was returning a float, but was treated as an int. IF no, the code should work,but it's better to cast the register as a float before calling sqrt.

 

Hope it help

 

I've send you the patchs with darcs send command.

 

Crazyjul

Link to comment
Share on other sites

Thanks for the fixes. I've not yet received the patch though. If you are on Windows the automatic sending of the patch sometimes doesn't work. I recommend using the '-o' option to darcs send:

 

darcs send -o file.patch http://www.double.co.nz/nintendo_ds/dsemu

 

Then zip up the file.patch (so the emailer doesn't corrupt it on sending by inserting line breaks) and email me the zip file.

 

I've not yet looked at the bios implementations for the math functions so i'll take a look when I receive you patch. Thanks again!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...