newbie questions - porting dgen (Genesis EMU) /w MIPSpro unresolved test symbol "pow

If you're coding on or porting to IRIX, this is the forum for discussion.
User avatar
commodorejohn
Posts: 85
Joined: Tue May 22, 2018 1:09 am

Re: newbie questions - porting dgen (Genesis EMU) /w MIPSpro unresolved test symbol "pow

Post by commodorejohn » Sat Jul 14, 2018 1:24 pm

Yeah, those faux-CRT effects in emulators tend to be a massive horsepower sink. Gens offers a reasonably performant simple horizontal blur to mimic the Genesis's notorious NTSC color smearing (some games rely on this to turn dithering into color blending or even quasi-transparency!) but that's as far as I'll bother taking it.
Computers: Amiga 1200, DEC VAXStation 4000/60, DEC MicroPDP-11/73
Synthesizers: Roland JX-10/SH-09/MT-32/D-50, Yamaha DX7-II/V50/TX7/TG33/FB-01, Korg MS-20 Mini/ARP Odyssey/DW-8000/X5DR, Ensoniq SQ-80, E-mu Proteus/2, Kilpatrick Phenol, Behringer Model D

User avatar
gijoe77
Posts: 196
Joined: Fri Jun 22, 2018 9:17 pm

Re: newbie questions - porting dgen (Genesis EMU) /w MIPSpro unresolved test symbol "pow

Post by gijoe77 » Sun Jul 15, 2018 5:52 am

commodorejohn wrote:
Sat Jul 14, 2018 1:24 pm
Yeah, those faux-CRT effects in emulators tend to be a massive horsepower sink. Gens offers a reasonably performant simple horizontal blur to mimic the Genesis's notorious NTSC color smearing (some games rely on this to turn dithering into color blending or even quasi-transparency!) but that's as far as I'll bother taking it.
dgen also has a pretty cool blur effect (f5 to cycle through "Crap TV" effects - blur, scanlines, interlace, etc; f6 to cycle through the "scaler" effects - scale, hqx, scale2x, etc). Seems the "Crap TV" effects dont seem to have an impact on performance, but enabling the "scaler" effects eats alot of performance.

I think the blur effect is pretty cool, def reminds me of some old TV's I had

User avatar
gijoe77
Posts: 196
Joined: Fri Jun 22, 2018 9:17 pm

Re: newbie questions - porting dgen (Genesis EMU) /w MIPSpro unresolved test symbol "pow

Post by gijoe77 » Sat Jul 21, 2018 11:59 pm

ok, so i think I have a good handle on compiling dgen now. I wanted to add the ability of using compressed rom images (.zip files for example). I had this capability with dgen 1.33 when i did a test compile on a recent linux system, so I know the code can support it.

I was under the impression I needed libarchives for this. so I went and compile and installed libarchives3.3.2, but I seem to not be able to meet my goals.

first I compiled/installed openssl, then i compiled/installed libarchives, both into /usr/local

when I compiled dgen 1.33 with these options, here was the "./configure --help" flag that caught my attention:

Code: Select all

 --with-libarchive       use libarchive for compressed ROMs [default=auto]
so with /usr/local/include/archive.h existing, I did this:

Code: Select all

./configure --with-sdl-prefix=/usr/nekoware --oldincludedir=/usr/local/include --enable-joystick=no  --with-libarchive
and the configure script gave me this:

Code: Select all

checking archive.h usability... no
checking archive.h presence... no
checking for archive.h... no

Code: Select all

 Compressed ROMs: no
I tried playing around with various command line options, but eventually i ended up just saying F* it and doing:

Code: Select all

cp -i /usr/local/include/archive.h /usr/include/
./configure --with-sdl-prefix=/usr/nekoware --oldincludedir=/usr/local/include --enable-joystick=no  --with-libarchive
I actually got more ahead here:

Code: Select all

checking archive.h usability... yes
checking archive.h presence... yes
checking for archive.h... yes
checking for archive_read_support_format_raw in -larchive... no
but still ended up final config with :

Code: Select all

 Compressed ROMs: no
I was under the impression that once I had libarchives I would have "compressed rom" support, can someone shed some light what im doing wrong?

TruHobbyist
Posts: 25
Joined: Tue May 15, 2018 12:04 am

Re: newbie questions - porting dgen (Genesis EMU) /w MIPSpro unresolved test symbol "pow

Post by TruHobbyist » Sun Jul 22, 2018 5:28 am

Hi gijoe,

keep always in mind that you have all you need to resolve this kind of issues. In this case just look into the configure script itself:

1. How does it detect libarchive?
2. How does it determine compressed rom support (it displays [auto], so there is some algorithm for this inside configure)

And then set the correct settings. A possible solution could be setting the include dir for configure to both /usr/include and /usr/local/include, so it finds archive.h. This can be done in a variety of ways, for example modifying CPPFLAGS (CPP = C PreProcessor): Here go all the -I/path/to/include/files flags. Another example is to specify include and lib dirs specifically through appropriate flags, when configure allows this: --libXYZ-includedir=/path/to/libXYZ/include and --libXYZ-libdir=/path/to/libXYZ/lib. These flags get translated to the corresponding -I and -L flags for the C PreProcessor (CPPFLAGS) and linker (LDFLAGS).


Tru

User avatar
Raion-Fox
Founder
Posts: 194
Joined: Fri Nov 17, 2017 12:23 am
Location: Virginia
Contact:

Re: newbie questions - porting dgen (Genesis EMU) /w MIPSpro unresolved test symbol "pow

Post by Raion-Fox » Tue Jul 24, 2018 12:34 am

@gijoe77

Libarchive you got working? Details please!
I'm the manager

Besides irix.cc, I run these sites:

projectkitsune.com

kazuo.io

User avatar
gijoe77
Posts: 196
Joined: Fri Jun 22, 2018 9:17 pm

Re: newbie questions - porting dgen (Genesis EMU) /w MIPSpro unresolved test symbol "pow

Post by gijoe77 » Mon Jul 30, 2018 5:02 pm

Raion-Fox wrote:
Tue Jul 24, 2018 12:34 am
@gijoe77

Libarchive you got working? Details please!
It's in the thread you were helping me with silly! viewtopic.php?f=10&t=265&p=1821#p1655

well I can't say for sure it's working - I'm just assuming it works because it compiled and linked so maybe I shouldn't assume... Not too sure how to test it just yet... was hoping to check to see if its working with this dgen compile :)
Last edited by gijoe77 on Mon Jul 30, 2018 5:06 pm, edited 1 time in total.

User avatar
gijoe77
Posts: 196
Joined: Fri Jun 22, 2018 9:17 pm

Re: newbie questions - porting dgen (Genesis EMU) /w MIPSpro unresolved test symbol "pow

Post by gijoe77 » Mon Jul 30, 2018 5:03 pm

TruHobbyist wrote:
Sun Jul 22, 2018 5:28 am
CPPFLAGS (CPP = C PreProcessor)
OMG all this time I thought that was C++ CFLAGS...

User avatar
gijoe77
Posts: 196
Joined: Fri Jun 22, 2018 9:17 pm

Re: newbie questions - porting dgen (Genesis EMU) /w MIPSpro unresolved test symbol "pow

Post by gijoe77 » Tue Jul 31, 2018 8:01 pm

ok now that I got past the libarchive stuff (viewtopic.php?f=10&t=265&p=1864#p1864), I want to try to use it for compressed ROM support in dgen, I'm getting a problem with linking to the proper libarchive library via C++:

Code: Select all

export CC=/usr/bin/cc
export CXX=/usr/bin/CC
export CFLAGS="-c99 -diag_suppress 3649 -diag_error 1035 -woff all -Ofast=ip35 -g0 -O3 -n32 -mips4 -OPT:Olimit=0:roundoff=3:IEEE_ar=3:fast_sq=ON:div_split=ON:alias=typed -GCM:array_sp=ON -lfastm -TARG:platform=IP35:proc=r16000 -IPA"
export CXXFLAGS="-ptused -diag_suppress 3649 -woff all -Ofast=ip35 -g0 -O3 -n32 -mips4 -OPT:Olimit=0:roundoff=3:IEEE_ar=3:fast_sq=ON:div_split=ON:alias=typed -GCM:array_sp=ON -lfastm -TARG:platform=IP35:proc=r16000 -IPA"
export CPPFLAGS="-I/usr/local/include -I/usr/nekoware/include -L/usr/local/lib -L/usr/nekoware/lib"
export CXXCPP="/usr/bin/CC -E -I/usr/local/include -I/usr/nekoware/include -L/usr/local/lib -L/usr/nekoware/lib"
./configure --with-sdl-prefix=/usr/nekoware --oldincludedir=/usr/nekoware/include --enable-joystick=no

<snip>
checking archive.h usability... yes
checking archive.h presence... yes
checking for archive.h... yes
checking for archive_read_support_format_raw in -larchive... yes
<snip>
 Compressed ROMs: yes

gmake
<snip>  
CXXLD  dgen
C++ prelinker: warning: could not locate library -larchive; assuming /usr/lib/libarchive.a
C++ prelinker: warning: could not locate library -larchive; assuming /usr/lib/libarchive.a
ld32: FATAL   9  : I/O error (-larchive): No such file or directory
gmake[1]: *** [dgen] Error 2
so It appears -larchive doesn't point to /usr/local/lib/libarchive.a - is there a way to point it to the proper path or should I just do a symbolic link to it? What's the proper way to address this?

User avatar
dexter1
Posts: 66
Joined: Thu May 24, 2018 9:30 am
Location: Zoetermeer, The Netherlands

Re: newbie questions - porting dgen (Genesis EMU) /w MIPSpro unresolved test symbol "pow

Post by dexter1 » Wed Aug 01, 2018 6:05 am

Code: Select all

export LDFLAGS="-L/usr/local/lib"
is the environment setting you need to set to tell the linker which path it needs to search for libraries.

User avatar
gijoe77
Posts: 196
Joined: Fri Jun 22, 2018 9:17 pm

Re: newbie questions - porting dgen (Genesis EMU) /w MIPSpro unresolved test symbol "pow

Post by gijoe77 » Wed Aug 01, 2018 4:57 pm

dexter1 wrote:
Wed Aug 01, 2018 6:05 am

Code: Select all

export LDFLAGS="-L/usr/local/lib"
is the environment setting you need to set to tell the linker which path it needs to search for libraries.
Thanks dexter1! That was it! Works like a charm now! it supports zip, gz, rar, xz, bz2 - that's all i've tried so far.

I found a frontend that's supposed to work with an older version of dgen, but it's tcl/tk and the source is in Portuguese, so looks like I'll be learning tcl/tk and portuguese. I'll post everything I have once I gt this frontend working a bit.

Thanks to everyone for your kind help!

Post Reply