 |
forums.ps2dev.org Homebrew PS2, PSP & PS3 Development Discussions
|
| View previous topic :: View next topic |
| Author |
Message |
Rev1Dev
Joined: 13 Apr 2008 Posts: 22
|
Posted: Thu Apr 17, 2008 7:21 pm Post subject: |
|
|
Ah...
The patch added the bleh.cpp in there but I (or it) hadn't modified the makefile.
I also noticed $(LOGGEROBJ) wasn't setup in my copy of the makefile either... is this something you added?
Well, that fixed that it looks like. (THANK YOU once again Ragnarok... I wish I wasn't so new to this stuff... alot of these fixes I'm having trouble getting around... and creating new functions I'm not very good at... Sorta learning this as I'm going... anyhoo... thank you = D )
Okay... so I'm going to post this to see if it looks identical to where you're at:
| Code: |
REMOVED TO SAVE SPACE |
It's malloc and initialization for the sound CPU core right?
Last edited by Rev1Dev on Fri Apr 18, 2008 3:18 am; edited 1 time in total |
|
| Back to top |
|
 |
ragnarok2040
Joined: 09 Aug 2006 Posts: 230
|
Posted: Thu Apr 17, 2008 9:11 pm Post subject: |
|
|
Yep, looks like you're at the same point I am. You're missing an object file or two I added back into the process but other than that, it looks good. I'm not sure what you mean by malloc and sound core initialization? I added some more checks for logger and screenshot functions that won't be needed in the Makefile and source code which will be in the new patch, :D. When the source gets to a compile-able state, I'll probably start looking at individual functions to determine which ones are needed or not and start commenting them out as well.
On another note:
I took a look at the docs folder, and it mentions in the readme.txt file that snes9x can run on a 486 (133 mhz) machine but that's only for the bare minimum of games. They recommend at least a 600 mhz processor for the ability to run most games at the basic settings. The ps2's EE is clocked at 294 mhz, and while mips processors do tend to run code faster than x86 cpus, I'm sure it's not enough. I would consider Snes-Station to actually be near the far end of the spectrum on performance on the ps2, in my opinion.
Having said that, commenting out a lot of the unneeded stuff should help improve performance. I think that Hiryu said he was running a thread on the IOP to do the sound in Snes-Station way back when or maybe it was that he was planning to do that... Well, that's for the far future :D. |
|
| Back to top |
|
 |
Rev1Dev
Joined: 13 Apr 2008 Posts: 22
|
Posted: Thu Apr 17, 2008 10:59 pm Post subject: |
|
|
Yeah... I see what you mean.
In comparison, however, I think once it's in a state where optimization can occur, it ought to be alright.
Some system specs:
| Quote: | GameCube:
CPU: 128-bit custom IBM Gekko PowerPC (485MHz)
GPU: ATI Flipper (162MHz)
The snes emulator for this system if I'm not mistaken is also based off snes9x source. My memory doesn't serve me too well here (I ended up always using XBOX's once I'd finally got one and had the emu for it) but performance seemed pretty stable when I was using this one. |
| Quote: | XBOX:
CPU: 733 MHz Intel Custom Pentium III
GPU: 250 MHz Custom-Designed NV2X
This one is snes9x based. Did the job, too, and now I see why according to what you posted were optimal specs for good performance. |
Perhaps the one that interests me most here, however, would have to be the PSP...
The snes9x-TYL releases...
They all seem to run most every... if not all games just fine... (I think there were a few that gave me trouble, i.e. Doom, Donkey Kong Country series, Super Mario RPG...)
It's clocked at 333mhz... with the base of 266mhz standard. Also MIPS architecture.
At that rate... the PS2 should be more than ample to handle it.
Let's hope...
EDIT:
Okay, I am completely stumped with this part:
| Code: | | REMOVED TO SAVE SPACE |
It's in control.cpp & snapshot.cpp
| Code: | | [`_splitpath(char const*, char*, char*, char*, char*)'] |
The weird thing is the command is already defined as this in the actual .cpp files
| Code: |
char def [PATH_MAX];
char filename [PATH_MAX];
char drive [_MAX_DRIVE];
char dir [_MAX_DIR];
char ext [_MAX_EXT];
_splitpath(Memory.ROMFilename, drive, dir, def, ext) |
I'm too new to this [C++] to really know how to approach this one. -=shrug=- I've checked all the headers and nothing. Should I create a new one and #include it in all those files?
Last edited by Rev1Dev on Fri Apr 18, 2008 3:17 am; edited 1 time in total |
|
| Back to top |
|
 |
ragnarok2040
Joined: 09 Aug 2006 Posts: 230
|
Posted: Fri Apr 18, 2008 1:05 am Post subject: |
|
|
The IOP is a co-processor for the EE, that's designed to offload the I/O functions from the EE. It's basically the same cpu that the PS1 uses, but I think at a higher clockrate. I forgot what it was though. The various device drivers each run their own thread which can interface with client code from the EE. You can look at the clientside code in the ps2sdk source's ee/rpc and serverside code in the iop folder. I think the simplest example to look at is iop/dev9/poweroff and ee/rpc/poweroff. Offloading some of the emulation onto the IOP would help a bit, but that's for later :D.
The apu code looks like it defines some internal functions for sound emulation that spc700.cpp uses.
I've gotten down to 38 errors. Some of these are from functions not implemented in ps2sdk's libc yet. For the _impure_ptr errors, http://www.embedded.com/story/OEG20011220S0058 down at Reentrancy.
I also grabbed a prototype function for _splitpath from http://forums.hostrocket.com/archive/index.php/t-15876.html. It's not useable right now for the ps2, but it can be modified. device:dir/file or device:/dir/file or device:\dir\file (one of those cdvd modules) isn't too far different from C:\dir\file.ext.
Here's the latest patch. Make sure to apply it to the clean snes9x-1.51 source.
| Code: |
conffile.o(.text+0xfc4): In function `ConfigFile::SaveTo(char const*)':
conffile.cpp: undefined reference to `ctime'
bsx.o(.text+0x15bc): In function `S9xInitBSX':
bsx.cpp: undefined reference to `localtime'
C:\ps2dev\ee\bin\..\lib\gcc-lib\ee\3.2.2\..\..\..\..\ee\lib\libstdc++.a(ios.o)(.text+0x178):../../../../libstdc++-v3/libsupc++/new:89: undefined reference to `_impure_ptr'
C:\ps2dev\ee\bin\..\lib\gcc-lib\ee\3.2.2\..\..\..\..\ee\lib\libstdc++.a(ios.o)(.text+0x180):../../../../libstdc++-v3/libsupc++/new:89: undefined reference to `_impure_ptr'
C:\ps2dev\ee\bin\..\lib\gcc-lib\ee\3.2.2\..\..\..\..\ee\lib\libstdc++.a(ios.o)(.text+0x198):../../../../libstdc++-v3/libsupc++/new:89: undefined reference to `_impure_ptr'
C:\ps2dev\ee\bin\..\lib\gcc-lib\ee\3.2.2\..\..\..\..\ee\lib\libstdc++.a(ios.o)(.text+0x1a0):../../../../libstdc++-v3/libsupc++/new:89: undefined reference to `_impure_ptr'
C:\ps2dev\ee\bin\..\lib\gcc-lib\ee\3.2.2\..\..\..\..\ee\lib\libstdc++.a(ios.o)(.text+0x1bc):../../../../libstdc++-v3/libsupc++/new:89: undefined reference to `_impure_ptr'
C:\ps2dev\ee\bin\..\lib\gcc-lib\ee\3.2.2\..\..\..\..\ee\lib\libstdc++.a(ios.o)(.text+0x1c4):../../../../libstdc++-v3/libsupc++/new:89: more undefined references to `_impure_ptr' follow
C:\ps2dev\ee\bin\..\lib\gcc-lib\ee\3.2.2\..\..\..\..\ee\lib\libstdc++.a(locale.o)(.text+0x1440):c:/ps2dev/src/gcc-3.2.2/build-ee-stage2/ee/libstdc++-v3/include/bits/basic_string.h:781: undefined reference to `setlocale'
C:\ps2dev\ee\bin\..\lib\gcc-lib\ee\3.2.2\..\..\..\..\ee\lib\libstdc++.a(locale-inst.o)(.gnu.linkonce.t._ZNKSt8time_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE14_M_extract_numERS3_S5_RiiijRKSt5ctypeIcERSt12_Ios_Iostate+0x1dc): In function `__static_initialization_and_destruction_0':
c:/ps2dev/src/gcc-3.2.2/build-ee-stage2/ee/libstdc++-v3/include/bits/char_traits.h:123: undefined reference to `atoi'
C:\ps2dev\ee\bin\..\lib\gcc-lib\ee\3.2.2\..\..\..\..\ee\lib\libstdc++.a(locale-inst.o)(.gnu.linkonce.t._ZSt16__convert_from_vIdEiPciPKcT_RKPii+0x34):c:/ps2dev/src/gcc-3.2.2/build-ee-stage2/ee/libstdc++-v3/include/ee/bits/c++locale.h:49: undefined reference to `setlocale'
C:\ps2dev\ee\bin\..\lib\gcc-lib\ee\3.2.2\..\..\..\..\ee\lib\libstdc++.a(locale-inst.o)(.gnu.linkonce.t._ZSt16__convert_from_vIdEiPciPKcT_RKPii+0x74):c:/ps2dev/src/gcc-3.2.2/build-ee-stage2/ee/libstdc++-v3/include/bits/locale_facets.tcc:2021: undefined reference to `setlocale'
C:\ps2dev\ee\bin\..\lib\gcc-lib\ee\3.2.2\..\..\..\..\ee\lib\libstdc++.a(locale-inst.o)(.gnu.linkonce.t._ZSt16__convert_from_vIdEiPciPKcT_RKPii+0xa0): In function `__static_initialization_and_destruction_0':
c:/ps2dev/src/gcc-3.2.2/build-ee-stage2/ee/libstdc++-v3/include/ee/bits/c++locale.h:67: undefined reference to `setlocale'
C:\ps2dev\ee\bin\..\lib\gcc-lib\ee\3.2.2\..\..\..\..\ee\lib\libstdc++.a(locale-inst.o)(.gnu.linkonce.t._ZSt16__convert_from_vIeEiPciPKcT_RKPii+0x34):c:/ps2dev/src/gcc-3.2.2/build-ee-stage2/ee/libstdc++-v3/include/ee/bits/c++locale.h:49: undefined reference to `setlocale'
C:\ps2dev\ee\bin\..\lib\gcc-lib\ee\3.2.2\..\..\..\..\ee\lib\libstdc++.a(locale-inst.o)(.gnu.linkonce.t._ZSt16__convert_from_vIeEiPciPKcT_RKPii+0x74):c:/ps2dev/src/gcc-3.2.2/build-ee-stage2/ee/libstdc++-v3/include/bits/locale_facets.tcc:2021: undefined reference to `setlocale'
C:\ps2dev\ee\bin\..\lib\gcc-lib\ee\3.2.2\..\..\..\..\ee\lib\libstdc++.a(locale-inst.o)(.gnu.linkonce.t._ZSt16__convert_from_vIeEiPciPKcT_RKPii+0xa0):c:/ps2dev/src/gcc-3.2.2/build-ee-stage2/ee/libstdc++-v3/include/ee/bits/c++locale.h:67: more undefined references to `setlocale' follow
C:\ps2dev\ee\bin\..\lib\gcc-lib\ee\3.2.2\..\..\..\..\ee\lib\libstdc++.a(stl-inst.o)(.gnu.linkonce.t._ZNSt24__default_alloc_templateILb1ELi0EE8allocateEj+0xf4):c:/ps2dev/src/gcc-3.2.2/build-ee-stage2/ee/libstdc++-v3/include/bits/stl_alloc.h:109: undefined reference to `__assert'
C:\ps2dev\ee\bin\..\lib\gcc-lib\ee\3.2.2\..\..\..\..\ee\lib\libstdc++.a(stl-inst.o)(.gnu.linkonce.t._ZNSaIcE8allocateEjPKv+0xf8):c:/ps2dev/src/gcc-3.2.2/build-ee-stage2/ee/libstdc++-v3/include/bits/stl_alloc.h:109: undefine
d reference to `__assert'
C:\ps2dev\ee\bin\..\lib\gcc-lib\ee\3.2.2\..\..\..\..\ee\lib\libstdc++.a(collate_members.o)(.text+0xc):c:\ps2dev\src\gcc-3.2.2\build-ee-stage2\ee\libstdc++-v3\src/collate_members.cc:46: undefined reference to `strcoll'
C:\ps2dev\ee\bin\..\lib\gcc-lib\ee\3.2.2\..\..\..\..\ee\lib\libstdc++.a(collate_members.o)(.text+0x40):c:\ps2dev\src\gcc-3.2.2\build-ee-stage2\ee\libstdc++-v3\src/collate_members.cc:54: undefined reference to `strxfrm'
C:\ps2dev\ee\bin\..\lib\gcc-lib\ee\3.2.2\..\..\..\..\ee\lib\libstdc++.a(time_members.o)(.text+0x38):c:\ps2dev\src\gcc-3.2.2\build-ee-stage2\ee\libstdc++-v3\src/time_members.cc:47: undefined reference to `setlocale'
C:\ps2dev\ee\bin\..\lib\gcc-lib\ee\3.2.2\..\..\..\..\ee\lib\libstdc++.a(time_members.o)(.text+0x50):c:\ps2dev\src\gcc-3.2.2\build-ee-stage2\ee\libstdc++-v3\src/time_members.cc:48: undefined reference to `setlocale'
C:\ps2dev\ee\bin\..\lib\gcc-lib\ee\3.2.2\..\..\..\..\ee\lib\libstdc++.a(time_members.o)(.text+0x64):c:\ps2dev\src\gcc-3.2.2\build-ee-stage2\ee\libstdc++-v3\src/time_members.cc:49: undefined reference to `strftime'
C:\ps2dev\ee\bin\..\lib\gcc-lib\ee\3.2.2\..\..\..\..\ee\lib\libstdc++.a(time_members.o)(.text+0x70):c:\ps2dev\src\gcc-3.2.2\build-ee-stage2\ee\libstdc++-v3\src/time_members.cc:50: undefined reference to `setlocale'
C:\ps2dev\ee\bin\..\lib\gcc-lib\ee\3.2.2\..\..\..\..\ee\lib\libstdc++.a(c++locale.o)(.text+0x1d4): In function `void std::__convert_to_v<long long>(char const*, long long&, std::_Ios_Iostate&, int* const&, int)':
c:\ps2dev\src\gcc-3.2.2\build-ee-stage2\ee\libstdc++-v3\src/c++locale.cc:89: undefined reference to `strtoll'
C:\ps2dev\ee\bin\..\lib\gcc-lib\ee\3.2.2\..\..\..\..\ee\lib\libstdc++.a(c++locale.o)(.text+0x28c): In function `void std::__convert_to_v<unsigned long long>(char const*, unsigned long long&, std::_Ios_Iostate&, int* const&, int)':
c:\ps2dev\src\gcc-3.2.2\build-ee-stage2\ee\libstdc++-v3\src/c++locale.cc:106: undefined reference to `strtoull'
C:\ps2dev\ee\bin\..\lib\gcc-lib\ee\3.2.2\..\..\..\..\ee\lib\libstdc++.a(c++locale.o)(.text+0x340): In function `void std::__convert_to_v<float>(char const*, float&, std::_Ios_Iostate&, int* const&, int)':
c:\ps2dev\src\gcc-3.2.2\build-ee-stage2\ee\libstdc++-v3\src/c++locale.cc:123: undefined reference to `setlocale'
C:\ps2dev\ee\bin\..\lib\gcc-lib\ee\3.2.2\..\..\..\..\ee\lib\libstdc++.a(c++locale.o)(.text+0x35c):c:\ps2dev\src\gcc-3.2.2\build-ee-stage2\ee\libstdc++-v3\src/c++locale.cc:124: undefined reference to `setlocale'
C:\ps2dev\ee\bin\..\lib\gcc-lib\ee\3.2.2\..\..\..\..\ee\lib\libstdc++.a(c++locale.o)(.text+0x38c):c:\ps2dev\src\gcc-3.2.2\build-ee-stage2\ee\libstdc++-v3\src/c++locale.cc:133: undefined reference to `finitef'
C:\ps2dev\ee\bin\..\lib\gcc-lib\ee\3.2.2\..\..\..\..\ee\lib\libstdc++.a(c++locale.o)(.text+0x3c4):c:\ps2dev\src\gcc-3.2.2\build-ee-stage2\ee\libstdc++-v3\src/c++locale.cc:150: undefined reference to `setlocale'
C:\ps2dev\ee\bin\..\lib\gcc-lib\ee\3.2.2\..\..\..\..\ee\lib\libstdc++.a(c++locale.o)(.text+0x470): In function `void std::__convert_to_v<double>(char const*, double&, std::_Ios_Iostate&, int* const&, int)':
c:\ps2dev\src\gcc-3.2.2\build-ee-stage2\ee\libstdc++-v3\src/c++locale.cc:163: undefined reference to `setlocale'
C:\ps2dev\ee\bin\..\lib\gcc-lib\ee\3.2.2\..\..\..\..\ee\lib\libstdc++.a(c++locale.o)(.text+0x48c):c:\ps2dev\src\gcc-3.2.2\build-ee-stage2\ee\libstdc++-v3\src/c++locale.cc:164: undefined reference to `setlocale'
C:\ps2dev\ee\bin\..\lib\gcc-lib\ee\3.2.2\..\..\..\..\ee\lib\libstdc++.a(c++locale.o)(.text+0x4d8):c:\ps2dev\src\gcc-3.2.2\build-ee-stage2\ee\libstdc++-v3\src/c++locale.cc:172: undefined reference to `setlocale'
C:\ps2dev\ee\bin\..\lib\gcc-lib\ee\3.2.2\..\..\..\..\ee\lib\libstdc++.a(c++locale.o)(.text+0x570): In function `void std::__convert_to_v<long double>(char const*, long double&, std::_Ios_Iostate&, int* const&, int)':
c:\ps2dev\src\gcc-3.2.2\build-ee-stage2\ee\libstdc++-v3\src/c++locale.cc:185: undefined reference to `setlocale'
C:\ps2dev\ee\bin\..\lib\gcc-lib\ee\3.2.2\..\..\..\..\ee\lib\libstdc++.a(c++locale.o)(.t
ext+0x58c):c:\ps2dev\src\gcc-3.2.2\build-ee-stage2\ee\libstdc++-v3\src/c++locale.cc:186: more undefined references to `setlocale' follow
C:\ps2dev\ee\bin\..\lib\gcc-lib\ee\3.2.2\..\..\..\..\ee\lib\libstdc++.a(ctype.o)(.text+0x0):c:/ps2dev/src/gcc-3.2.2/build-ee-stage2/ee/libstdc++-v3/include/ee/bits/ctype_noninline.h:38: undefined reference to `_ctype_'
C:\ps2dev\ee\bin\..\lib\gcc-lib\ee\3.2.2\..\..\..\..\ee\lib\libstdc++.a(ctype.o)(.text+0x8):c:/ps2dev/src/gcc-3.2.2/build-ee-stage2/ee/libstdc++-v3/include/ee/bits/ctype_noninline.h:38: undefined reference to `_ctype_'
C:\ps2dev\ee\bin\..\lib\gcc-lib\ee\3.2.2\..\..\..\..\ee\lib\libstdc++.a(basic_file.o)(.text+0x314):c:\ps2dev\src\gcc-3.2.2\build-ee-stage2\ee\libstdc++-v3\src/basic_file.cc:100: undefined reference to `setvbuf'
mingw32-make.exe: *** [SNES9X.ELF] Error 1
Process terminated with status 2 (3 minutes, 43 seconds)
38 errors, 13 warnings
|
|
|
| Back to top |
|
 |
Rev1Dev
Joined: 13 Apr 2008 Posts: 22
|
Posted: Fri Apr 18, 2008 1:37 am Post subject: |
|
|
Good Job Ragnarok... you're going to end up cracking this one = )
Man I can't wait until I know what I'm doing -=laughing=-
Well, I wasn't able to d/l the new patch; do you think you would mind re-uploading?
Here's an example of what I've been doing (just took and added it onto bleh.cpp).
For the second one it's now set to FALSE (*correction).
| Code: | //REVONE: Referenced @ apu.cpp, Line 484 ; snapshot.cpp, Line 2065
bool8 S9xSPCDump (const char *filename)
{
return false;
}
//REVONE: Referenced @ snapshot controls.cpp, Line 1684; snapshot.cpp, Line 183
bool8 S9xUnfreezeGame (const char *filename)
{
return FALSE;
} |
Just had to say: Great Job Ragnarok!
EDIT: According to the article, you have edit each instance of the reent failure to include the struct or can you simply set a pointer where it occurs?
Last edited by Rev1Dev on Fri Apr 18, 2008 7:49 am; edited 2 times in total |
|
| Back to top |
|
 |
ragnarok2040
Joined: 09 Aug 2006 Posts: 230
|
Posted: Fri Apr 18, 2008 2:29 am Post subject: |
|
|
Hrmm, that's strange, I can't download it from my link, either, but I can get it from the main page. Go to http://homebrew.thewaffleiron.net/ragnarok2040 and download it from that page. It might be some sort of hotlink protection.
Actually, not all of the undefined references are undefined. Some of them are defined, but aren't linked in, so they need to be commented out when they're called, instead of defined. For other undefined functions, it depends on if you need them or want them or not. The function definitions in bleh.cpp are ones that porting.html said were needed for a port, so I provided them. Also, a bool8 function should return either true or false (or an unsigned char, since that's the type). I only returned NULL on functions that returned a pointer, such as char *function() which will cause either a NULL exception error if the pointer is used or tell the function that called it that NULL was returned.
In the new patch, I added snapshot.cpp back into the build because it's needed for savestates (snapshots) so S9xSPCDump and S9xUnfreezeGame are defined again. I also added #ifdef/#undef guards to the function calls that are defined in objects that aren't linked in, so their calls won't be included into the final object at compile-time. For examples of what I did, search for the CHEAT_SUPPORT symbol or MOVIE_SUPPORT symbol inside of the source code using an ide like CodeBlocks. You could also open up the patch inside of Wordpad to see what I've done.
If you want a good C programming book, you should look for Practical C Programming by O'Reilly and for C++, you should get C++: The Complete Reference by Osborne. And for pointers, http://www.gamedev.net/reference/articles/article1697.asp, which I found useful. There's also plenty of sites that have information about programming in C, as well.
Snes9x is coded mostly in C, but compiled with the C++ compiler because of some features they wanted that weren't available with just gcc, but because of that it has the same quirks a C++ program would have. I think that answered everything from your last two posts, :D.
Extra note:
Can someone try compiling snes9x-1.51 with my patch using their ps2dev toolchain on Linux or Cygwin? That'll tell me if some of the errors are from a bug in MinGW not compiling libstdc++ correctly (weird bug where gcc tries to use a windows path for some reason but doesn't properly '\\' so I get c:msyslocalps2deveebinar.exe type errors). |
|
| Back to top |
|
 |
Rev1Dev
Joined: 13 Apr 2008 Posts: 22
|
Posted: Fri Apr 18, 2008 2:44 am Post subject: |
|
|
I'm trying to apply the patch, but keep getting this:
| Code: |
REMOVED TO SAVE SPACE |
Any pointers?
Last edited by Rev1Dev on Fri Apr 18, 2008 3:15 am; edited 1 time in total |
|
| Back to top |
|
 |
ragnarok2040
Joined: 09 Aug 2006 Posts: 230
|
Posted: Fri Apr 18, 2008 3:01 am Post subject: |
|
|
| Hrmm, working fine for me. I'm using the source from http://files.ipherswipsite.com/snes9x/snes9x-1.51-src.tar.bz2 but other than that it looks like it's not finding the snes9x source files correctly. The snes9x folder you're in should have all the .cpp files in it. |
|
| Back to top |
|
 |
Rev1Dev
Joined: 13 Apr 2008 Posts: 22
|
Posted: Fri Apr 18, 2008 3:10 am Post subject: |
|
|
Nevermind...
Sorry about the first post. Here's the correct output I received, this time with the patch applied correctly:
| Code: |
REMOVED TO SAVE SPACE |
Last edited by Rev1Dev on Fri Apr 18, 2008 7:47 am; edited 1 time in total |
|
| Back to top |
|
 |
ragnarok2040
Joined: 09 Aug 2006 Posts: 230
|
Posted: Fri Apr 18, 2008 3:58 am Post subject: |
|
|
| Weird, _makepath and _splitpath are defined in bleh.cpp. All references to "cheats.h" are commented out via the preprocessor at compile-time so you shouldn't even have undefined references to S9xAddCheat and etc. You sure you aren't using the old patch? |
|
| Back to top |
|
 |
Rev1Dev
Joined: 13 Apr 2008 Posts: 22
|
Posted: Fri Apr 18, 2008 4:14 am Post subject: |
|
|
Okay... you were right. Wrong patch X D
Okay this is where it's really at -=smiling=-
| Code: | | REMOVED TO SAVE SPACE |
Sorry about that, still had the 1st patch in the same directory. Hope this helps.
Last edited by Rev1Dev on Fri Apr 18, 2008 7:53 am; edited 1 time in total |
|
| Back to top |
|
 |
ragnarok2040
Joined: 09 Aug 2006 Posts: 230
|
Posted: Fri Apr 18, 2008 4:33 am Post subject: |
|
|
All of that can be shortened down to this list of 13 functions: ctime, localtime, setlocale, setvbuf, finitef, strtoull, strtoll, strftime, strxfrm, strcoll, __assert, atoi, and _impure_ptr.
It's at the point, now, where real work can start, :D. |
|
| Back to top |
|
 |
Rev1Dev
Joined: 13 Apr 2008 Posts: 22
|
Posted: Fri Apr 18, 2008 8:29 am Post subject: |
|
|
Are these (some of) the files I want to be looking at right?
| Code: | | ctime.c ; lctime_r.c ; lcltime.c ; strftime.c ; setvbuf.c ; errno.c ; errno.h ; reent.h ; basic_string.h ; new |
So it's basically down to... toolchain commands? Are those what these are? |
|
| Back to top |
|
 |
ragnarok2040
Joined: 09 Aug 2006 Posts: 230
|
Posted: Fri Apr 18, 2008 5:17 pm Post subject: |
|
|
| They're parts of the standard c++ library (libstdc++) and the standard c library (libc or newlib). All we have to do is write a frontend or rewrite the internal parts to not use the specific libstdc++ functions that require those undefined newlib definitions or just implement them in ps2sdk's libc (preferrable method as it helps the community). |
|
| Back to top |
|
 |
Rev1Dev
Joined: 13 Apr 2008 Posts: 22
|
Posted: Fri Apr 18, 2008 11:26 pm Post subject: |
|
|
Nice. = ) So there's the added bonus that those adapted libraries will be available if ever needed for other projects in the future... I guess it'll also make it easier when compiling this from source for future updates, while making the SDK itself a more fully featured adaption of existing C/C++ standard.
On another note, I was wondering if condensing the script to only include the features necessary to the PS2 version would require any major rewrites to the foundation code in helping to optimize it?
I was looking at the article you posted in regards to reentrancy and was searching for some examples that used it to gain a better understanding of how to rewrite into a format more suitable for the SDK.
You've been working pretty fast at this so I'm certain you've either begun work towards or have even already completed some implementation of it.
The learning curve still seems pretty steep from this side of the fence, but I just wanted to say what a big help you've been to me in particular in being patient with a newcomer and all the questions that come along with taking on anything new as well as sharing so much valuable information to help me along. Very Much appreciated! = ) |
|
| Back to top |
|
 |
ragnarok2040
Joined: 09 Aug 2006 Posts: 230
|
Posted: Tue Apr 22, 2008 1:00 pm Post subject: |
|
|
Sorry I was away a bit, heh. I was busy playing with Linux on my ps2, :D. I'm nowhere good enough to start implementing standards compliant functions into newlib/libstdc , so I decided to see if I could find a workaround. I took a look at the snes9x port on Wii/GC to see if I could come up with any ideas, as well. It's based on 1.43, and there are huge differences between 1.51 and 1.43. It looks like it was based on the xSnes9x port. There's no controls.cpp, and reader.cpp was replaced with a custom gamecube-based file loader, from the looks of it. Taking out both of those from the project removed all of the libstdc errors I was getting.
The following functions are ones that I commented out:
line file function
1082 bsx.cpp localtime
513 cpuexec.cpp S9xDoAutoJoypad
484 gfx.cpp S9xControlEOF
2075 memmap.cpp S9xVerifyControllers()
1913 ppu.cpp S9xSetJoypadLatch
2437 ppu.cpp S9xReadJOYSERn
2713 ppu.cpp S9xControlsSoftReset
2704 ppu.cpp S9xControlsReset
372 snes9x.cpp S9xSetController
932 snes9x.cpp S9xVerifyControllers
1255 snes9x.cpp S9xVerifyControllers
1111 snapshot.cpp S9xControlPreSave
1429 snapshot.cpp S9xControlPostLoad
And, the fReader calls in memmap.c need to be replaced with a custom file loader for ps2. Lines in memmap.c: 3426 3441 3462 3482 3557 3572 3593 3613, seem to be the only place it's used. I'll work more on it.
Update, I replaced reader.c/.h with just an empty fReader class with a constructor that takes a FILE* reference, and it compiled :D.
There seems to be something weird afoot. Every symbol that's undefined in libstdc++ is supported inside of ps2sdk's stdlib.c/.h. I recompiled my toolchain, fixing my c:ps2deveeeebinnm.exe error, and that didn't fix the problem. I'm out of clues :S. |
|
| Back to top |
|
 |
ragnarok2040
Joined: 09 Aug 2006 Posts: 230
|
Posted: Thu Apr 24, 2008 5:48 am Post subject: |
|
|
| Sorry about posting back to back, but I reverted back to 1.43 and it was relatively easy to get it to compile. It only took me around 2 1/2 hours to create a new makefile, add the function stubs for the port, and comment out miscellaneous movie functions. Just wanted to post to give a heads up. |
|
| Back to top |
|
 |
dlanor
Joined: 28 Oct 2004 Posts: 269 Location: Stockholm, Sweden
|
Posted: Thu Apr 24, 2008 10:29 pm Post subject: |
|
|
@ragnarok2040: Please check your PM box.
Best regards: dlanor |
|
| Back to top |
|
 |
ragnarok2040
Joined: 09 Aug 2006 Posts: 230
|
Posted: Tue May 13, 2008 1:35 am Post subject: |
|
|
The GSTEXTURE structure was throwing me off a bit. The Mem pointer is u32*, and the texture data I was giving it was being cast to 32-bit numbers by default when compiling. By casting the pointer to u16* I was able to fix this
to
this.
:D. |
|
| Back to top |
|
 |
bootsector_

Joined: 25 Feb 2008 Posts: 15
|
Posted: Tue May 13, 2008 4:34 am Post subject: |
|
|
I knew you would show up and take this personally!
Keep up the great job! |
|
| Back to top |
|
 |
syproject
Joined: 28 Mar 2008 Posts: 5
|
Posted: Fri May 16, 2008 7:16 am Post subject: |
|
|
nice work ragnarok2040 i know many people will ask the same qestion.... when will a beta be released?
keep up the good work bud |
|
| Back to top |
|
 |
ragnarok2040
Joined: 09 Aug 2006 Posts: 230
|
Posted: Fri May 16, 2008 7:33 am Post subject: |
|
|
I've already released a couple of builds so people could try it out. Alpha2 is the latest version. It supports one controller mapped to a standard snes controller, just push L2 to get back to the file browser. There's no sound support, or hi-res support or transparency support, and booting new roms is a little broken. It's also kind of fast because the sound core isn't enabled, heh. With it enabled, it's pretty slow.
If you want to try it out, I uploaded the source and the latest alpha2 builds to:
http://homebrew.thewaffleiron.net/ragnarok2040/
They're named packed_snes9xPAL.zip and packed_snes9xNTSC.zip. |
|
| Back to top |
|
 |
syproject
Joined: 28 Mar 2008 Posts: 5
|
Posted: Fri May 16, 2008 6:19 pm Post subject: |
|
|
nice work ragnarok2040 when you starting on the n64 heheh j/k
will have a play about tonight |
|
| Back to top |
|
 |
goldman
Joined: 25 Aug 2008 Posts: 1
|
Posted: Mon Aug 25, 2008 1:09 pm Post subject: |
|
|
bumped
this thread shouldn't fade away |
|
| Back to top |
|
 |
dirsors
Joined: 04 Mar 2008 Posts: 17 Location: Porto Alegre, RS, Brazil
|
Posted: Sun Aug 31, 2008 11:27 am Post subject: |
|
|
| Eagerly wating for a stable version! |
|
| Back to top |
|
 |
ragnarok2040
Joined: 09 Aug 2006 Posts: 230
|
Posted: Wed Oct 01, 2008 8:14 pm Post subject: |
|
|
| Sorry, real life got in the way, heh. My old computer broke down in July, then it took about a month to build another one, then I was supposed to move in August, which didn't really happen until early September. On top of that, I had been learning MIPS assembly, which I need to still complete. Other than that, I'm about to rewrite the ports a bit so I can separate the code a little more cleanly from the browser, redo the startup code a bit so it starts faster, various other changes so it'll be easier to work on the core "porting" of Snes9x as my old code keeps getting in the way, heh. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|