FS#12564 - [dgen-sdl] segfaults in 64bit; patches to fix

Attached to Project: Arch Linux
Opened by Andrew Eikum (ColdPie) - Wednesday, 24 December 2008, 21:34 GMT
Last edited by Eric Belanger (Snowman) - Thursday, 27 May 2010, 23:32 GMT
Task Type Bug Report
Category Upstream Bugs
Status Closed
Assigned To James Rayner (iphitus)
Architecture x86_64
Severity Low
Priority Normal
Reported Version None
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

The 64bit version of dgen-sdl segfaults on launch. This is a known issue with the emulator code; it's not 64-bit compatible. Unfortunately, dgen isn't maintained any longer, so upstream fixes aren't really possible.

A user on launchpad created a patch set for dgen which makes it work in 64-bit environments. I applied these patches to dgen-sdl and it works fine, save one patch which refers to some Debian file which obviously isn't there in non-Debian distros.

Link to the launchpad bug & patchset:
https://bugs.launchpad.net/ubuntu/+source/dgen/+bug/131281

As the user describes, there's still an issue with sound emulation. Sound works, but it plays back slowly at times. I don't know anything about writing emulators, so I don't know how to fix this myself. Graphics and gameplay seem to work fine with these patches.

Also note the user's comments about possible issues with distributing changed versions of this source. There is a license and contact information for the mz80 author in dgen-sdl-1.23/mz80/mz80.txt. Given the wording of the license and comments in that file, I doubt the author would have an issue with distribution, but it's probably a good idea to contact the author anyway.
This task depends upon

Closed by  Eric Belanger (Snowman)
Thursday, 27 May 2010, 23:32 GMT
Reason for closing:  Won't fix
Additional comments about closing:  dgen-sdl has been removed from repo.
Comment by Greg (dolby) - Saturday, 27 December 2008, 21:48 GMT
http://tamentis.com/projects/dgen/ says : "Bug reports/patches: tamentis@neopulsar.org"
Seems alive and well here.
Comment by Eric Belanger (Snowman) - Monday, 04 May 2009, 05:04 GMT
James: should we just remove the x86_64 package then? Debian and Gentoo distribute this package only on i686 architecture.
Comment by James Rayner (iphitus) - Wednesday, 06 May 2009, 22:48 GMT
I've sent an email to the author of the MZ80 emulation. I'll drop the package from x86_64 in a week or so if I don't receive a reply.
Comment by James Rayner (iphitus) - Saturday, 09 May 2009, 14:01 GMT
I've got a reply, no problems with patching mz80 - the author is happy to see people are still using it.

I'll update it, including the patches, and a copy of the email into svn.

edit: ignore the blank attachments, that's a bug in uzbl.
   . (0 KiB)
Comment by Eric Belanger (Snowman) - Saturday, 09 May 2009, 19:47 GMT
Great. Don't forget to add the license to the package. The permission email should be installed along the license.
Comment by Eric Belanger (Snowman) - Wednesday, 20 May 2009, 00:47 GMT
James: If you don't have time to fix this, could you at least commit the email in trunk? I could do the fix as I want to finish off the license rebuild.
Comment by James Rayner (iphitus) - Wednesday, 20 May 2009, 01:32 GMT
Committed. Sorry, it's coming to late in the semester and I'm flat out with assignments at the moment. Thanks for offering to fix it.
Comment by Eric Belanger (Snowman) - Saturday, 23 May 2009, 05:13 GMT
The Ubuntu patch fixes the seg fault on x86_64. However, the i686 package now seg faults wether the new patches are applied or not. The app starts fine but it seg fault just before the sound/music starts playing. I'm still trying to figure this out.
Comment by James Rayner (iphitus) - Saturday, 23 May 2009, 08:35 GMT
Thanks!

I just tested it a bit with a range of compile opts/patches and some others I found (gentoo). I got no further than what you did, removing any just made it segfault earlier.

It did work on 32bit with some games. I got through the first few stages of Sonic 1 (w sound), but Sonic 2 just hanged at the opening credits, and Sonic 3 segfaulted.

It's odd though, as the version in extra now works perfectly, so some update of gcc, nasm or sdl has caused it to break.

I looked around and there's three other maintained projects.
- XE, 64 and 32, multi machine emulator, slow, glitches, gtk2.
- gens/GS, 32 only, fully featured, stable, gtk2
- generator, [community], gtk1, 32 and 64, doesnt work with all games.
Comment by Eric Belanger (Snowman) - Saturday, 23 May 2009, 19:09 GMT
I also gave a look at Debian's patches. I haven't tried them but they didn't seem to be for this problem. In your last comment, you mentionned moving it to AUR. I don't know why you edited it out but that might be the easiest solution as the last release dates from several years ago.
Comment by Eric Belanger (Snowman) - Saturday, 07 November 2009, 21:05 GMT
James: status? Are you fine with moving it to AUR?
Comment by Thomas Dziedzic (tomd123) - Thursday, 27 May 2010, 04:17 GMT
Status?
Comment by Andrew Eikum (ColdPie) - Thursday, 27 May 2010, 21:26 GMT
Just gave it a quick test and it looks fixed to me. Cool with me if this gets closed.

Edit: re-read the above comments, and I should be more clear. Runs great on my 64-bit laptop, but now segfaults on my 32-bit desktop. It seems a shame to lose the "official" package, but AUR might be appropriate since it is pretty broken.

Loading...