View previous topic :: View next topic |
Author |
Message |
wah_wah_69 Tux's lil' helper
Joined: 26 Aug 2003 Posts: 145
|
Posted: Fri Jul 30, 2004 8:01 am Post subject: Gens for linux with opengl support |
|
|
I've added opengl support to gens (a megadrive /gensis emulator) , I did so because the sdl render was quite slow on my system. Note this is no oficial release it's just a tarball with my changes.
Get it here:
http://www.telefonica.net/web2/wahwah69/gens-rc3-opengl.tar.gz
I'm also adding opengl support to visualboy advance , but I just replaced the sdl rendering with opengl one , I'd like to make it selectable so it'll take a bit more time. _________________ Be good and if you can't be good, be careful. |
|
Back to top |
|
|
yabdeo Tux's lil' helper
Joined: 28 Feb 2004 Posts: 99
|
Posted: Sat Jul 31, 2004 5:05 pm Post subject: |
|
|
Hello wah_wah, you use Gentoo also ? |
|
Back to top |
|
|
wah_wah_69 Tux's lil' helper
Joined: 26 Aug 2003 Posts: 145
|
Posted: Sat Jul 31, 2004 6:33 pm Post subject: |
|
|
Nice to read you I thought you used some *bsd.
I've been using gentoo around a year and a half , I started with Mandrake then moved to debian and finally gentoo.
There doesn't seem to be much interest in gens anyway, why didn't you mention there's a newer tarball? _________________ Be good and if you can't be good, be careful. |
|
Back to top |
|
|
yabdeo Tux's lil' helper
Joined: 28 Feb 2004 Posts: 99
|
Posted: Sun Aug 01, 2004 10:58 am Post subject: |
|
|
I started with Suse, made my LFS on a previously installed RedHat, went on FreeBSD and stood a very long time with it, and finally stuck with Gentoo.
I mentionned there were a development version, but only on Gens forum. |
|
Back to top |
|
|
crimson Guru
Joined: 27 Apr 2002 Posts: 430 Location: Cedar Rapids, IA
|
Posted: Wed Sep 01, 2004 7:14 pm Post subject: |
|
|
Thank you very much for adding this OpenGL option, gens was running horrible for me until I tried this version! It does just crash out of the blue when changing video settings however, but atleast I can play games! Thanks. |
|
Back to top |
|
|
Matheus Villela Apprentice
Joined: 25 Oct 2003 Posts: 263
|
Posted: Wed Sep 01, 2004 9:56 pm Post subject: |
|
|
Great job!
Thanks for sharing with us, wah_wah_69 do you plan to send a patch to the gens sourceforge page, or send an e-mail to gens linux mantainer? |
|
Back to top |
|
|
wah_wah_69 Tux's lil' helper
Joined: 26 Aug 2003 Posts: 145
|
Posted: Tue Sep 07, 2004 4:26 pm Post subject: |
|
|
Yes it's submited , for the crashes start the emu in sdl mode select your favourite filter / fullscreen value and change to opengl (CTRL+R changes from sdl to opengl) I know it's a workaround but right now I have no time to debug
*EDITED*
I´ve managed to avoid the crashes , in /src/gens/sdllayer/g_sdldraw.c function Init_draw_gl() line 130 change
Code: | filter_buffer=(unsigned short *) malloc(640*480*sizeof(unsigned short) ); |
for Code: | filter_buffer=(unsigned short *) malloc(640*512*sizeof(unsigned short) ); |
That is 480 for 512. _________________ Be good and if you can't be good, be careful. |
|
Back to top |
|
|
Vanquirius Retired Dev
Joined: 14 Jun 2002 Posts: 1297 Location: Ethereal plains
|
Posted: Sat Oct 30, 2004 8:34 pm Post subject: |
|
|
Very nice work, thank you. _________________ Hello. |
|
Back to top |
|
|
yabdeo Tux's lil' helper
Joined: 28 Feb 2004 Posts: 99
|
Posted: Mon Nov 01, 2004 5:36 pm Post subject: |
|
|
Hi wah_wah_69 !
What about your OpenGL work ?
Can you send me your more stable (or even unstable, if it's runnable) version of your work, since you have the sources with all the latest patches ?
Regards,
yabdeo
Gens for Linux maintainer |
|
Back to top |
|
|
wah_wah_69 Tux's lil' helper
Joined: 26 Aug 2003 Posts: 145
|
Posted: Tue Nov 16, 2004 2:03 pm Post subject: |
|
|
Done!
http://www.telefonica.net/web2/wahwah69/gens-rc3.1-opengl.tar.gz
The texture handling code has been changed a bit (now is more simple) instead of using 2 textures now I use one (but bigger "wasting" some video memory I think , since nowadays there's video memory to spare... ) seems to be a bit faster since it takes less time setting 1 big texture than 2 smaller ones (it allways will depend on your gl implementation).
I've also added a new option to enable opengl linear filtering (on by default).
I just noticed... I forgot to add said option to the gui, use CTRL+F to toggle filtering on /off. _________________ Be good and if you can't be good, be careful.
Last edited by wah_wah_69 on Tue Nov 16, 2004 2:31 pm; edited 1 time in total |
|
Back to top |
|
|
yabdeo Tux's lil' helper
Joined: 28 Feb 2004 Posts: 99
|
Posted: Tue Nov 16, 2004 2:10 pm Post subject: |
|
|
Cool ! I test it tonight.
Regards |
|
Back to top |
|
|
j_c_p Guru
Joined: 30 Aug 2003 Posts: 319 Location: France - Colmar
|
|
Back to top |
|
|
yabdeo Tux's lil' helper
Joined: 28 Feb 2004 Posts: 99
|
Posted: Thu Nov 18, 2004 7:08 pm Post subject: |
|
|
Can you post you .gens config file ? |
|
Back to top |
|
|
yabdeo Tux's lil' helper
Joined: 28 Feb 2004 Posts: 99
|
Posted: Thu Nov 18, 2004 7:13 pm Post subject: |
|
|
OpenGL renderer works flawless on my GForce 5700. However, on my laptop (ATI Rage Mobility M3 with DRI), the SDL window shows only a white screen (sound works). |
|
Back to top |
|
|
j_c_p Guru
Joined: 30 Aug 2003 Posts: 319 Location: France - Colmar
|
Posted: Thu Nov 18, 2004 7:30 pm Post subject: |
|
|
yabdeo wrote: | Can you post you .gens config file ? |
Of course :
Quote: | [General]
Rom path=./megadrive/
Save path=./
SRAM path=./
BRAM path=./
Dump path=./
Dump GYM path=./
Screen Shot path=./
Patch path=./
IPS Patch path=./
Genesis Bios=./
USA CD Bios=./
EUROPE CD Bios=./
JAPAN CD Bios=./
32X 68000 Bios=./
32X Master SH2 Bios=./
32X Slave SH2 Bios=./
State Number=0
Language=0
Window X=0
Window Y=0
Free Mode Color=7
...
|
The roms bios are in ~.gens (the files are zipped and unzipped too) :
Quote: | [20:28][jcp@phoenix]
[~/.gens] > ls
32X_G_BIOS.BIN
32X_M_BIOS.BIN
32X_S_BIOS.BIN
Ayrton Senna's Super Monaco GP II (U) [!].srm
bios_megacd.zip
CDX Pro BIOS V1.8I (Unl).bin
CDX Pro BIOS V1.8I (Unl).zip
Dragon Slayer 2 - Legend of Heroes (B) [h1].srm
eu_mcd1_9210.bin
eu_mcd1_9210.zip
euro_bios.bin
Genesis_OS_ROM.bin
gens.cfg
gens.cfg~
genscfgSAVE.old
Landstalker - The Treasures of King Nole (E) (Fre).srm
language.dat
mcd_101.bin
mcd2_200.bin
md_segacd_32x_bios.zip
MegaCD Model 1 BIOS V1.01 (J) (Dec 1991).bin
MegaCD Model 1 BIOS V1.01 (J) (Dec 1991).zip
MegaCD Model 2 BIOS V2.00 (E) (Mar 1993) [a1][!].bin
MegaCD Model 2 BIOS V2.00 (E) (Mar 1993) [a1][!].zip
megadrive
NHL 98 (U) [h3].srm
scd_110.bin
scd2_200.bin
scds2_200.bin
Sonic 3.srm
Test Drive 2 - The Duel (U) [h1].srm
us_bios.bin
us_scd1_9210.bin
us_scd1_9210.zip |
_________________ Lian Li PC60 - AMD FX 8300 - Asrock 990FX EXTREME9 - Gigabyte GTX960 G1 Gaming 4Go |
|
Back to top |
|
|
yabdeo Tux's lil' helper
Joined: 28 Feb 2004 Posts: 99
|
Posted: Thu Nov 18, 2004 7:49 pm Post subject: |
|
|
For you bios file : you must specify where they are :
Options->Bios/Misc Files->Change
There is also an howto here : http://yabdeo.free.fr/howto.png |
|
Back to top |
|
|
wah_wah_69 Tux's lil' helper
Joined: 26 Aug 2003 Posts: 145
|
Posted: Thu Nov 18, 2004 9:28 pm Post subject: |
|
|
yabdeo wrote: | OpenGL renderer works flawless on my GForce 5700. However, on my laptop (ATI Rage Mobility M3 with DRI), the SDL window shows only a white screen (sound works). |
Maybe your card is short of video ram , it needs to store a 1024*512 texture in any filtered mode and a 512*256 in normal mode (both in rgb16 format).
Maybe we should go back to the old texture handling code , warn you that with the older code if you used gl filtering you could notice a darker line in the limits between the first and the second texture (I think it happened because it finished doing the interpolation with an imaginary black row). _________________ Be good and if you can't be good, be careful. |
|
Back to top |
|
|
j_c_p Guru
Joined: 30 Aug 2003 Posts: 319 Location: France - Colmar
|
Posted: Thu Nov 18, 2004 9:43 pm Post subject: |
|
|
yabdeo : thanks _________________ Lian Li PC60 - AMD FX 8300 - Asrock 990FX EXTREME9 - Gigabyte GTX960 G1 Gaming 4Go |
|
Back to top |
|
|
yabdeo Tux's lil' helper
Joined: 28 Feb 2004 Posts: 99
|
Posted: Sat Nov 20, 2004 10:33 am Post subject: |
|
|
wah_wah_69 wrote: |
Maybe your card is short of video ram , it needs to store a 1024*512 texture in any filtered mode and a 512*256 in normal mode (both in rgb16 format).
Maybe we should go back to the old texture handling code , warn you that with the older code if you used gl filtering you could notice a darker line in the limits between the first and the second texture (I think it happened because it finished doing the interpolation with an imaginary black row). |
Ok, I ran X in 800x600, OpenGL worked (I was short of ram), but it was slower than the sdl method. I think the dri driver has a problem, since on nvidia gens with Opengl works faster. |
|
Back to top |
|
|
skunkworx Guru
Joined: 02 Feb 2003 Posts: 420 Location: Planet Houston
|
Posted: Sat Nov 20, 2004 4:12 pm Post subject: |
|
|
wah_wah_69, nice work, thank you!
I created an ebuild based on the gens-2.12a ebuild. Here's the diff, if anyone's interested. Note that I'm using the name "gensgl-3.1" just to be different.
Code: | # diff /usr/portage/games-emulation/gens/gens-2.12a.ebuild \
/usr/portage-overlay/games-emulation/gensgl/gensgl-3.1.ebuild
1,4d0
< # Copyright 1999-2004 Gentoo Foundation
< # Distributed under the terms of the GNU General Public License v2
< # $Header: /var/cvsroot/gentoo-x86/games-emulation/gens/gens-2.12a.ebuild,v 1.7 2004/07/01 11:14:31 eradicator Exp $
<
8,9c4,5
< HOMEPAGE="http://gens.consolemul.com/"
< SRC_URI="mirror://sourceforge/gens/gens-rc2.tar.gz"
---
> HOMEPAGE="http://www.telefonica.net/web2/wahwah69/"
> SRC_URI="mirror://www.telefonica.net/web2/wahwah69/gens-rc3.1-opengl.tar.gz"
24c20
< S="${WORKDIR}/gens-linux-${PV}"
---
> S="${WORKDIR}/gens-rc3-opengl"
|
Edit: Removed the Gentoo headers from the custom ebuild, since they didn't really apply. _________________ Proud to be a... eh, forget it.
"Everyday is just one day." -- not the Traveling Wilburys
Last edited by skunkworx on Sun Nov 21, 2004 2:08 am; edited 2 times in total |
|
Back to top |
|
|
yabdeo Tux's lil' helper
Joined: 28 Feb 2004 Posts: 99
|
Posted: Sat Nov 20, 2004 9:24 pm Post subject: |
|
|
Gens with opengl is intended to be the future gens-rc4. Could you better name the ebuild gens-2.12-rc4-pre1 ? Thanks ! |
|
Back to top |
|
|
skunkworx Guru
Joined: 02 Feb 2003 Posts: 420 Location: Planet Houston
|
Posted: Sun Nov 21, 2004 1:56 am Post subject: |
|
|
The ebuild can really be named anything you want. I wasn't planning on actually submitting it, since I figured the people who maintain gens and/or the gens ebuilds would want to have more of a say in that. I just hacked this ebuild together so that Portage could install this version in the meantime, before there was a more official release with GL support. You're more than welcome to further hack the ebuild to suit your taste.
Actually, I suppose it could be given a somewhat more accurate name, like gens 2.12-rc3-gl. I'll give it a tweak.
Edit: Easier said than done. Portage doesn't seem to like exotic version strings, and the fact that the latest official ebuild is numbered 2.12a means it would be chosen over any ebuild named 2.12-* anyway (assuming I'm correctly understanding how Portage works). I did make a slight change, removing the comments from the beginning of the custom ebuild since they didn't really apply to it. _________________ Proud to be a... eh, forget it.
"Everyday is just one day." -- not the Traveling Wilburys
Last edited by skunkworx on Sun Nov 21, 2004 2:10 am; edited 2 times in total |
|
Back to top |
|
|
Vanquirius Retired Dev
Joined: 14 Jun 2002 Posts: 1297 Location: Ethereal plains
|
Posted: Sun Nov 21, 2004 2:00 am Post subject: |
|
|
I reported a bug some time ago, but no replies thus far... _________________ Hello. |
|
Back to top |
|
|
wah_wah_69 Tux's lil' helper
Joined: 26 Aug 2003 Posts: 145
|
Posted: Tue Nov 23, 2004 9:42 pm Post subject: |
|
|
Do anyone else have problems with the new texture code ? Please post your experiences. _________________ Be good and if you can't be good, be careful. |
|
Back to top |
|
|
skunkworx Guru
Joined: 02 Feb 2003 Posts: 420 Location: Planet Houston
|
Posted: Tue Nov 23, 2004 10:26 pm Post subject: |
|
|
wah_wah_69 wrote: | Do anyone else have problems with the new texture code ? Please post your experiences. |
I have to plead ignorance, as I'm not sure what the significance of the texture code is. Could I ask for an explanation?
Otherwise, I played with this build pretty extensively over the weekend, and it worked nicely. I didn't see any problems that I haven't seen in the Windows version of Gens, and this runs much faster than the non-OpenGL linux version in full screen. The only suggestion I have is to enable the vsync and screen stretch toggles to work in Open GL mode, if possible. _________________ Proud to be a... eh, forget it.
"Everyday is just one day." -- not the Traveling Wilburys |
|
Back to top |
|
|
|