I need help, trying porting Jaguar emu


mjohansson

Supporter
Joined
Feb 10, 2011
Messages
409
Hi, the emulator can be found here:http://icculus.org/virtualjaguar/


I was gonna try to port it, so I thaught the first step would be to compile it myself on linux, but typing make I get error messages, first is that a } is missing in some file wich I added. Now its a bit more difficult... sdlemu_config.cpp 119: error: ´strcmp´ was not declared in this scope


It includes the .h file were this thing is declared, hmm no its not...


What exactly is this? I cant understand what happens here:


if(strcmp((*p).Token().c_str(), key_string) == 0)


return (*p).Value().c_str();


can a variable start with a dot?? dosnt that imply that its a member variable, here its functions but no pre thingy is stated, it just starts with a dot...


Does anyone have a clue about any of this? How the heck am I gonna solve this, I cant declare a function myself when I dont know what its supposed to do.
 
I saw something simlar while porting webkit, could it be one or more optimization flags that cause it? Try overriding CFLAGS, CPPFLAGS and CXXFLAGS with something without any optimization flags.
 
Hi, the emulator can be found here:http://icculus.org/virtualjaguar/


I was gonna try to port it, so I thaught the first step would be to compile it myself on linux, but typing make I get error messages, first is that a } is missing in some file wich I added. Now its a bit more difficult... sdlemu_config.cpp 119: error: ´strcmp´ was not declared in this scope


It includes the .h file were this thing is declared, hmm no its not...


What exactly is this? I cant understand what happens here:


if(strcmp((*p).Token().c_str(), key_string) == 0)


return (*p).Value().c_str();


can a variable start with a dot?? dosnt that imply that its a member variable, here its functions but no pre thingy is stated, it just starts with a dot...


Does anyone have a clue about any of this? How the heck am I gonna solve this, I cant declare a function myself when I dont know what its supposed to do.

I'll look forward to this 1 mate , cheers for your hard work :)
 
Strange that someone would use (*x). instead of the field dereference (->) operator..
 
Yea ok, that certainly helped, the include file didnt have .h


adding .h gave some more errors so I let the <string> remain and added extra <string.h> and that did the trick, I also added <cstdlib> and it stopped complaining about atoi.


Now I dont get any errors but a warning, : ignoring return value of ´size_t fread(void*, size_t, size_t, FILE*)´ , declared with attribute warn_unused_result


No there is an error, macro names must be identifiers


What does that mean?


Ok its something with #if #endif


I take a look at all files tomorow, but it said well no it didnt say a specific location...


There is only CFLAGS in the makefile, I look at google also tomorrow if I can work it out
 
Status update:


Im throwing in the towel, this is above my skilllevel and I dont have the time to spend on it now, sorry to the others that also wanted a jaguar emu.


What needs to be done? As far as I can understand theres a problem with the #defines, and it uses a lot of librarys that probably isnt standard and thus need to be ported as well, and it uses SDL/openGL wich need to be ported to SDL/GLES.


My plan was to cut out everything essential and put into a single file, to manually bypass all defines and make compiling easy with commandline, I dont know how to use make and such things, starting with the jaguar.cpp I started following all includes threads but it came to a stop suddenly and there was still lots of more data files, mayby theres a compile list somewere describing the order of includes? I could look for that actually... If I could get everything into one file in order I should be able to convert the GL cmmands, the only question should be non standard librarys, but mayby someone else could port them then? I should poke around with the code one last time, Ill do that right now, if I dont write another reply here by tomorrow it means I threw in the towel, otherwise we will see what I write...
 
Could you provide a bit more info?


You want to package the whole sourcecode in to one file? Not a good idea and hint: You can compile and link multiple files via gcc command. Have a read of the manpage.


You want to compile a jaguar emulator, but don't want to compile some simple libraries, that are needed? Which ones are needed? We might help you out with these.


why not use the makefile? Much easier and 5 mins of work to alter it to work with toolchains.


If you have trouble with openglconversion, just ask.
 
I did a compile, while ripping out any of the oglstuff and it just works.


There were just two defines to be added: string.h and stdlib.h


No additional libraries needed.


Should I upload my sources, so that you can go on from there? What would be left is to add the egl context and convert the oglstuff.
 
I think the only libs needed was SDL, openGL and ZLIB. The rest should be standard ones I hope. If you managed to get it to compile but dont want to fix the rest then indeed please upload your files and I try from there, I havent looked for the GL commands in it but I do know openGL fairly ok at this point so I might have a chanse to convert the commands and fix a context to Pandora.
 
Will upload tomorrow. This will be a directory,that compiles on sebt3s toolchain withut any problems.
 
Here are the sources:


This also includes the modified makefile to use the precompiled m68kmake binary, that had to be compiled on x86 to be used on the sources.


As said, this is an archive, that is the source, that should compile on sebt3's toolchain without any additional libraries.


All you still need to convert is the oglstuff in sdlemu_opengl.c . The "ifdef OGL" parts are, what I commented out. I also converted all the RGB* to RGBA in the texturecalls.


http://maheld.heckel-web.pharmchem.uni-frankfurt.de/virtualjaguar-1.0.7-src-pandora.tar.gz


Have fun!
 
Thousand thanks for the help mcobit, I tried compiling it on Panda with c-dev-tools and it worked, I looked in the opengl-c file also and the only major thing was glBegin wich I can fix, dont know if thats all it will take though but I will find out this week, Im to tired to work tonight, also I came to realise theres a need for a menu, Im thinking this should run fullscreen all time and have a osd menu pop up when space button is pressed, and keys need remapping, I start working sometime tis week and I bet I will need more help with stuff but I will try my hardest on my own first. Thansk again!
 
I saw glOrtho too. Good, that it compiles. Did you do a make clean before? And did you set back the m68kmake to the one, that gets made while compiling?


If you have any troubles, I will try to help. Just post here.
 
Can we have per-game customizable controls? I can already tell we're gonna need 'em.
 
Back
Top