Emuforums.com

Go Back   Emuforums.com > Miscellaneous Emulation > SDLEmu Official Discussion
About Us Register FAQ Members List Calendar Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old February 4th, 2004   #21 (permalink)
_Em
Registered User
 
Join Date: Feb 2004
Posts: 23
Thanks... the other issue I have is that one of the mouse axes is reversed in 1.0.6 (can't remember if it's X or Y). But that's definitely not a big issue.
_Em is offline   Reply With Quote
Old February 4th, 2004   #22 (permalink)
_Em
Registered User
 
Join Date: Feb 2004
Posts: 23
Maybe the CVS build just can't find my SDL libs:
In file included from src/include/jaguar.h:8,
from src/anajoy.cpp:12:
src/include/memory.h:17:20: malloc.h: No such file or directory
_Em is offline   Reply With Quote
Old February 4th, 2004   #23 (permalink)
_Em
Registered User
 
Join Date: Feb 2004
Posts: 23
My malloc.h's are here:
/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/sys/malloc.h
/usr/include/objc/malloc.h
/usr/include/sys/malloc.h
_Em is offline   Reply With Quote
Old February 4th, 2004   #24 (permalink)
_Em
Registered User
 
Join Date: Feb 2004
Posts: 23
The following is the output with a hardlinked malloc.h:

make -f Makefile.unix gcc -Wall -Wno-switch -Wno-non-virtual-dtor -O2 -D__GCCUNIX__ -Dstricmp="strcasecmp" -fomit-frame-pointer `sdl-config --cflags` -I. -Isrc -Isrc/include -I/usr/local/include -c src/anajoy.cpp -o obj/anajoy.o
gcc -Wall -Wno-switch -Wno-non-virtual-dtor -O2 -D__GCCUNIX__ -Dstricmp="strcasecmp" -fomit-frame-pointer `sdl-config --cflags` -I. -Isrc -Isrc/include -I/usr/local/include -c src/blitter.cpp -o obj/blitter.o
gcc -Wall -Wno-switch -Wno-non-virtual-dtor -O2 -D__GCCUNIX__ -Dstricmp="strcasecmp" -fomit-frame-pointer `sdl-config --cflags` -I. -Isrc -Isrc/include -I/usr/local/include -c src/cdbios.cpp -o obj/cdbios.o
src/cdbios.cpp: In function `void cdbios_build_sector_lut()':
src/cdbios.cpp:104: warning: comparison between signed and unsigned integer
expressions
src/cdbios.cpp:111: warning: comparison between signed and unsigned integer
expressions
src/cdbios.cpp: In function `void cdbios_get_time(unsigned int, uint32*,
uint32*, uint32*)':
src/cdbios.cpp:124: warning: unused variable `uint32 _sectors'
src/cdbios.cpp: In function `void cdbios_cmd_mode()':
src/cdbios.cpp:318: warning: unused variable `uint32 cdrom_mode'
src/cdbios.cpp:319: warning: unused variable `uint32 cdrom_speed'
src/cdbios.cpp: In function `void cdbios_cmd_read()':
src/cdbios.cpp:431: warning: unused variable `uint32 reste'
src/cdbios.cpp:432: warning: unused variable `uint32 buffer_offset'
src/cdbios.cpp:382: warning: unused variable `uint8 cdbios_sector[2352]'
src/cdbios.cpp: In function `void cd_bios_exec(unsigned int)':
src/cdbios.cpp:585: warning: unused variable `uint32 bytes_per_scanline'
gcc -Wall -Wno-switch -Wno-non-virtual-dtor -O2 -D__GCCUNIX__ -Dstricmp="strcasecmp" -fomit-frame-pointer `sdl-config --cflags` -I. -Isrc -Isrc/include -I/usr/local/include -c src/cdi.cpp -o obj/cdi.o
gcc -Wall -Wno-switch -Wno-non-virtual-dtor -O2 -D__GCCUNIX__ -Dstricmp="strcasecmp" -fomit-frame-pointer `sdl-config --cflags` -I. -Isrc -Isrc/include -I/usr/local/include -c src/cdrom.cpp -o obj/cdrom.o
gcc -Wall -Wno-switch -Wno-non-virtual-dtor -O2 -D__GCCUNIX__ -Dstricmp="strcasecmp" -fomit-frame-pointer `sdl-config --cflags` -I. -Isrc -Isrc/include -I/usr/local/include -c src/clock.cpp -o obj/clock.o
gcc -Wall -Wno-switch -Wno-non-virtual-dtor -O2 -D__GCCUNIX__ -Dstricmp="strcasecmp" -fomit-frame-pointer `sdl-config --cflags` -I. -Isrc -Isrc/include -I/usr/local/include -c src/crc32.cpp -o obj/crc32.o
gcc -Wall -Wno-switch -Wno-non-virtual-dtor -O2 -D__GCCUNIX__ -Dstricmp="strcasecmp" -fomit-frame-pointer `sdl-config --cflags` -I. -Isrc -Isrc/include -I/usr/local/include -c src/dac.cpp -o obj/dac.o
gcc -Wall -Wno-switch -Wno-non-virtual-dtor -O2 -D__GCCUNIX__ -Dstricmp="strcasecmp" -fomit-frame-pointer `sdl-config --cflags` -I. -Isrc -Isrc/include -I/usr/local/include -c src/dsp.cpp -o obj/dsp.o
src/dsp.cpp:2996: warning: `uint32 prevR1' defined but not used
gcc -Wall -Wno-switch -Wno-non-virtual-dtor -O2 -D__GCCUNIX__ -Dstricmp="strcasecmp" -fomit-frame-pointer `sdl-config --cflags` -I. -Isrc -Isrc/include -I/usr/local/include -c src/eeprom.cpp -o obj/eeprom.o
gcc -Wall -Wno-switch -Wno-non-virtual-dtor -O2 -D__GCCUNIX__ -Dstricmp="strcasecmp" -fomit-frame-pointer `sdl-config --cflags` -I. -Isrc -Isrc/include -I/usr/local/include -c src/gpu.cpp -o obj/gpu.o
src/gpu.cpp: In function `void GPUWriteLong(unsigned int, unsigned int,
unsigned int)':
src/gpu.cpp:780: warning: unused variable `bool finished'
src/gpu.cpp: At top level:
src/gpu.cpp:1088: warning: `int testCount' defined but not used
src/gpu.cpp:1089: warning: `int len' defined but not used
gcc -Wall -Wno-switch -Wno-non-virtual-dtor -O2 -D__GCCUNIX__ -Dstricmp="strcasecmp" -fomit-frame-pointer `sdl-config --cflags` -I. -Isrc -Isrc/include -I/usr/local/include -c src/gui.cpp -o obj/gui.o
In file included from /usr/include/dirent.h:64,
from src/gui.cpp:8:
/usr/include/sys/dirent.h:73: error: 'u_int32_t' is used as a type, but is not
defined as a type.
/usr/include/sys/dirent.h:74: error: 'u_int16_t' is used as a type, but is not
defined as a type.
/usr/include/sys/dirent.h:75: error: 'u_int8_t' is used as a type, but is not
defined as a type.
/usr/include/sys/dirent.h:76: error: 'u_int8_t' is used as a type, but is not
defined as a type.
make: *** [obj/gui.o] Error 1
_Em is offline   Reply With Quote
Old February 4th, 2004   #25 (permalink)
Emu author
 
nwagenaar's Avatar
 
Join Date: Oct 2001
Location: The Netherlands
Posts: 114
You don't have to hardlink with malloc.h, you just need to set the libraries/includes correctly in the Makefile.unix. Edit the Makefile.unix and find the following lines :

Code:
LIBS = -L/usr/local/lib `sdl-config --libs` -lstdc++ -lz -l$(GLLIB)

INCS = -I. -Isrc -Isrc/include -I/usr/local/include
At the LIBS section, put in -L/usr/lib after -L/usr/local/lib (watch the spaces!). At the INCS section, set -I/usr/include (watch the spaces again). You should get something like this :

Code:
LIBS = -L/usr/local/lib -L/usr/lib `sdl-config --libs` -lstdc++ -lz -l$(GLLIB)

INCS = -I. -Isrc -Isrc/include -I/usr/local/include -I/usr/include

The "problem" resides in the fact that it seems that MacOS X doesn't set the include and libraries in it's enviroment which result in not find your correct headers and libraries. I hope this helps a bit Also, make sure you have gzip and opengl installed on your system (which shouldn't be a problem on a Mac).

Yours,

Niels Wagenaar
__________________
Better a penguin that rox than
Windows that often locks!
nwagenaar is offline   Reply With Quote
Old February 4th, 2004   #26 (permalink)
_Em
Registered User
 
Join Date: Feb 2004
Posts: 23
Thanks! -A much more elegant solution. Any chance that extra path can be committed to the cvs?
_Em is offline   Reply With Quote
Old February 5th, 2004   #27 (permalink)
Emu author
 
Shamus's Avatar
 
Join Date: Jul 2003
Posts: 130
Committed.
Shamus is offline   Reply With Quote
Old February 8th, 2004   #28 (permalink)
_Em
Registered User
 
Join Date: Feb 2004
Posts: 23
Well, here's the latest compilation results; still dying on obj/gui.o:

make -f Makefile.unix
gcc -Wall -Wno-switch -Wno-non-virtual-dtor -O2 -D__GCCUNIX__ -Dstricmp="strcasecmp" -fomit-frame-pointer `sdl-config --cflags` -I. -Isrc -Isrc/include -I/usr/local/include -I/usr/include -c src/gui.cpp -o obj/gui.o
In file included from /usr/include/dirent.h:64,
from src/gui.cpp:8:
/usr/include/sys/dirent.h:73: error: 'u_int32_t' is used as a type, but is not
defined as a type.
/usr/include/sys/dirent.h:74: error: 'u_int16_t' is used as a type, but is not
defined as a type.
/usr/include/sys/dirent.h:75: error: 'u_int8_t' is used as a type, but is not
defined as a type.
/usr/include/sys/dirent.h:76: error: 'u_int8_t' is used as a type, but is not
defined as a type.
make: *** [obj/gui.o] Error 1

Do I just need to make the compilation directive less strict?
_Em is offline   Reply With Quote
Old February 8th, 2004   #29 (permalink)
Registered User
 
Join Date: Jun 2003
Posts: 20
Put an "#include <sys/types.h>" before you include dirent.h so it can get the typedefs it needs.
Adam Green is offline   Reply With Quote
Old February 8th, 2004   #30 (permalink)
Emu author
 
Shamus's Avatar
 
Join Date: Jul 2003
Posts: 130
Quote:
Originally Posted by Adam Green
Put an "#include <sys/types.h>" before you include dirent.h so it can get the typedefs it needs.
Hmm. Isn't that the job of the dirent.h header file (to pull in its own dependencies)?

Maybe there needs to be a MacOSX specific define there?
Shamus is offline   Reply With Quote
Old February 8th, 2004   #31 (permalink)
Registered User
 
Join Date: Jun 2003
Posts: 20
Perhaps, but I always thought it was pretty standard practice to include <sys/types.h> before using headers like dirent.h. Maybe you could just do a unix/linux #ifdef for it if it causes problems on Win32, since it should be fine on any unix/linux distribution (including Mac OS X).
Adam Green is offline   Reply With Quote
Old February 9th, 2004   #32 (permalink)
_Em
Registered User
 
Join Date: Feb 2004
Posts: 23
Speaking of cleaning up things like that; a unix/linux check in the makefile could mean that only one makefile is necessary as well .
Thanks for the tip on the include; I get a lot further now; here's the end of my current make:

gcc -Wall -Wno-switch -Wno-non-virtual-dtor -O2 -D__GCCUNIX__ -Dstricmp="strcasecmp" -fomit-frame-pointer `sdl-config --cflags` -o vj obj/anajoy.o obj/blitter.o obj/cdbios.o obj/cdi.o obj/cdrom.o obj/clock.o obj/crc32.o obj/dac.o obj/dsp.o obj/eeprom.o obj/gpu.o obj/gui.o obj/jagdasm.o obj/jaguar.o obj/jerry.o obj/joystick.o obj/log.o obj/m68kcpu.o obj/m68kops.o obj/m68kopac.o obj/m68kopdm.o obj/m68kopnz.o obj/m68kdasm.o obj/memory.o obj/objectp.o obj/sdlemu_config.o obj/sdlemu_opengl.o obj/settings.o obj/tom.o obj/unzip.o obj/version.o obj/video.o obj/vj.o -L/usr/local/lib -L/usr/lib `sdl-config --libs` -lstdc++ -lz -lGL
ld: can't locate file for: -lGL
make: *** [vj] Error 1

So it looks like it's not finding the OS X OpenGL libs.
I hope you guys don't mind all this feedback; I could probably figure it all out myself, but I thought that letting you know how the default build went would probably help streamline things for others in the future.
_Em is offline   Reply With Quote
Old February 9th, 2004   #33 (permalink)
_Em
Registered User
 
Join Date: Feb 2004
Posts: 23
Oh, and Adam; even though you told me you weren't going to do a GUI; DropScript works quite well for that if you want to post a quick lickable binary on your page
_Em is offline   Reply With Quote
Old February 9th, 2004   #34 (permalink)
Emu author
 
Shamus's Avatar
 
Join Date: Jul 2003
Posts: 130
I'd love to have a single makefile for all architectures, but I'm not sure how you'd go about doing that (i.e., checking for a specific architecture inside the makefile)... As it stands now, the makefiles are nearly identical--the only differences are in the variables defined at the top. So, they're almost unified...


Quote:
Originally Posted by _Em
Oh, and Adam; even though you told me you weren't going to do a GUI; DropScript works quite well for that if you want to post a quick lickable binary on your page
Once you get CVS up and running, you'll see why nobody is working on a front end GUI for VJ. It ain't lickable, but it's better than nothing!
Shamus is offline   Reply With Quote
Old February 9th, 2004   #35 (permalink)
_Em
Registered User
 
Join Date: Feb 2004
Posts: 23
sorry; lickable == double clickable app with aqua goodness I can set it up so you double click, and it brings up the built in SDL GUI. Works quite well, and fends off all the OS X people who don't know how to use terminal and flags.
_Em is offline   Reply With Quote
Old February 9th, 2004   #36 (permalink)
_Em
Registered User
 
Join Date: Feb 2004
Posts: 23
To answer my other question: Adam says for OS X, you need to add -framework Cocoa -framework OpenGL to the link flags. I doubt any other platform needs those
_Em is offline   Reply With Quote
Old February 10th, 2004   #37 (permalink)
_Em
Registered User
 
Join Date: Feb 2004
Posts: 23
Update: at Adam's suggestion, I tried removing -lGL instead of adding the framework lines; that fixed the problem. Also, I found that the problem of an inverted y-axis on the mouse got fixed by customizing my .cfg file. So now we're down to the following:

Everything works fine until I try to "Load..." something, at which point there's a Bus Error. I have a feeling it's a problem with my SDL, and not something to do with vj, but you never know....
_Em is offline   Reply With Quote
Old February 10th, 2004   #38 (permalink)
Emu author
 
Shamus's Avatar
 
Join Date: Jul 2003
Posts: 130
If you could post the relevant part of the vj.log file where it fails (you can leave out the GPU/DSP/68K disassembly) that might yield some useful information.
Shamus is offline   Reply With Quote
Old February 10th, 2004   #39 (permalink)
Registered User
 
Join Date: Jun 2003
Posts: 20
Ok, the problem arises in FileList::FileList() in gui.c when we try to open the roms directory when it doesn't exist (which it doesn't by default). There needs to be an assertion after the opendir call or maybe some case which will mkdir the ROMs directory if it doesn't already exist.
Adam Green is offline   Reply With Quote
Old February 10th, 2004   #40 (permalink)
_Em
Registered User
 
Join Date: Feb 2004
Posts: 23
Only one thing, Adam; my roms directory already existed; I changed the path in the cfg file before launch.
_Em is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 07:21.

© 2006 - 2008 Emu Forums | About Emu Forums | Legal | A member of the Crowdgather Forum Community


Powered by vBulletin® Version 3.7.0 Release Candidate 3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC5