Sonic and Sega Retro Message Board: Gens/GS Release 7 - Sonic and Sega Retro Message Board

Jump to content

Hey there, Guest!  (Log In · Register) Help
Loading News Feed...
 

Gens/GS Release 7 finally :D

#31 User is offline Hayate 

Posted 28 December 2009 - 10:04 PM

  • Posts: 2355
  • Joined: 01-February 04
  • Gender:Male
  • Location:Torquay, England
  • Wiki edits:70
...what?

Dude, it's not like the mode would be mandatory. It'd be an OPTION, just like it is in MovieGens. What do you need to do to avoid using it? Absolutely nothing.

Windowed Fullscreen has never caused lag/slowdown for me. Plus, if you're so bothered about non-integral resizing, there could be another option to make it only scale to the next lowest integral size available - for example, with a resolution of 1920x1080, the scale factor would be 4, which would produce a 1280x960 (or 1280x896 for the purists) image in the center of the screen.

Also, it seems you're failing to take into account the fact that Gens/GS already can display in this scaling mode, it just doesn't let you display the window in fullscreen without changing the resolution.

I'm sure MovieGens has this for a reason, and I'm sure I'm not the only one out there with a weird monitor.

There's another advantage it has that MovieGens doesn't make use of - with windowed fullscreen, you no longer need to revert to non-fullscreen to display dialogs such as the open or preferences dialogs. It always annoyed me when the screen would be black for three seconds just because I wanted to change my controls or somesuch.

Speaking of changing controls, there's a bug which I've seen in a lot of emulators which only seems to happen on Vista and 7 - the keypresses aren't marked as "handled", so they get processed by the GUI. So if you want to use the space key, it re-presses the "change assignment" button you just pressed. This one can be avoided by holding down the mouse button somewhere else while pressing space, but more annoyingly and specific to Gens/GS is that if you try and use the 'c' key, it presses the Cancel button, which I haven't found a workaround for. Yes, the response to this will probably be "go change the values in the config file", but why even have the configuration dialog if I need to edit the values in the file?
This post has been edited by Hayate: 28 December 2009 - 10:06 PM

#32 User is offline GerbilSoft 

Posted 12 January 2010 - 01:15 AM

  • RickRotate'd.
  • Posts: 1610
  • Joined: 11-January 03
  • Gender:Male
  • Location:USA
  • Project:Gens/GS
  • Wiki edits:158
Release 7.1 status report:

I'm probably going to push back the Z80 porting until Release 7.2, since I shifted focus to another aspect: the VDP. I'm currently porting the VDP code from assembler to C. So far, I've finished all the I/O and DMA code, and am almost finished the Mode 5 rendering code. Parts remaining include the render functions for Scroll A / Window and Sprites. (I improved the sprite masking function to properly implement the per-line sprite limit, which is 16 in H32 and 20 in H40. This is configurable using the "Sprite Limit" option in the Graphics menu, which also controls the sprite-dots-per-line limit. [256 in H32, 320 in H40.])

Another area I'm focusing on is the new VDP Debugger plugin. Currently, it displays the palette and register list in realtime. I plan on adding some more stuff before Release 7.1, possibly including VRAM pattern viewing (already supported by the built-in debugger), scroll plane viewing, hardware sprite viewing (all at once via a GtkTreeView), and Sonic sprite mapping viewing. [Note that the initial release will be Linux/GTK+ only. A Win32 UI will be added in a future release.]

Other notable improvements:
- IRC Reporter plugin. (Linux only for r7.1) Reports the currently-loaded ROM via D-BUS to IRC clients, which can then use the information in a script similar to MP3-reporting scripts.
- mcd_reader_t struct, which cleans up the physical CD-ROM interface and will allow for proper BIN/CUE support in the future.
- Full Unicode and DPI awareness on Win32. (This unfortunately breaks Gens/GS on Windows 95, since Windows 95 doesn't support UTF-8.)
- FPS counter and Message now allow any RGB color to be selected instead of just red, green, blue, and white.
- The internal VDP debugger has improved tile display for Interlaced mode, plus improved line numbering for both MD tiles and SegaCD Word RAM patterns.
- Lots of bug fixes.

Hayate: Regarding "windowed fullscreen", Gens/GS kinda does support it right now - at least on Linux with a decent window manager. Disable the menu bar by pressing Ctrl-M, then set the window to No Border using the window manager. Windows unfortunately doesn't provide this functionality, and it'd be a pain for me to figure it out myself, especially because I haven't done any multi-monitor programming in Windows before. If anyone could provide a patch to enable "windowed fullscreen" on the specified monitor, I would appreciate it. (Incidentally, since Gens/GS uses DirectDraw on Win32, resizing the window does not increase CPU load. The rescaling is done in hardware on the video card. Also, DirectDraw only supports nearest-neighbor scaling, so there's no blurring.)

For the "unhandled" keypresses, I'm pretty sure Gens/GS does throw out all the WM_KEY* messages after waiting for DirectInput to process them. Maybe Vista/7 is sending some other messages that I'm not discarding?

#33 User is offline TmEE 

Posted 12 January 2010 - 03:13 AM

  • Watermelons are good stuff
  • Posts: 1496
  • Joined: 06-January 08
  • Gender:Male
  • Location:Estonia, Rapla City
  • Project:Mélodie, Radical Rat, Cannon Cat, SMStrk
  • Wiki edits:11
Is Gens/GS using SSE2 or something ? I get "this program has tried to execute illegal instruction error" every time I try to run it... I've got a Tualatin Pentium III here, its only got SSE...

#34 User is offline Hayate 

Posted 12 January 2010 - 07:06 AM

  • Posts: 2355
  • Joined: 01-February 04
  • Gender:Male
  • Location:Torquay, England
  • Wiki edits:70
QUOTE (GerbilSoft @ Jan 12 2010, 06:15 AM)
Hayate: Regarding "windowed fullscreen", Gens/GS kinda does support it right now - at least on Linux with a decent window manager. Disable the menu bar by pressing Ctrl-M, then set the window to No Border using the window manager. Windows unfortunately doesn't provide this functionality, and it'd be a pain for me to figure it out myself, especially because I haven't done any multi-monitor programming in Windows before. If anyone could provide a patch to enable "windowed fullscreen" on the specified monitor, I would appreciate it. (Incidentally, since Gens/GS uses DirectDraw on Win32, resizing the window does not increase CPU load. The rescaling is done in hardware on the video card. Also, DirectDraw only supports nearest-neighbor scaling, so there's no blurring.)


Just set the window's border state to "none" and then maximize it; then it'll automatically hide the taskbar/other docked toolbars if people still use those (and, in the case of multi-monitor, the window will simply fill whatever screen it was already visible on). If the window's already maximized, you NEED to restore it before going windowed fullscreen, or it won't work.

QUOTE
For the "unhandled" keypresses, I'm pretty sure Gens/GS does throw out all the WM_KEY* messages after waiting for DirectInput to process them. Maybe Vista/7 is sending some other messages that I'm not discarding?


I can't think why it would, but this could well be the case - it's a pretty common problem with all emulators, not just Gens/GS.

#35 User is offline GerbilSoft 

Posted 12 January 2010 - 10:08 AM

  • RickRotate'd.
  • Posts: 1610
  • Joined: 11-January 03
  • Gender:Male
  • Location:USA
  • Project:Gens/GS
  • Wiki edits:158
QUOTE (TmEE @ Jan 12 2010, 03:13 AM)
Is Gens/GS using SSE2 or something ? I get "this program has tried to execute illegal instruction error" every time I try to run it... I've got a Tualatin Pentium III here, its only got SSE...

Gens/GS Release 7 is compiled for i686, and the only optimizations that are available are MMX (which are enabled at runtime)...

Can you post the faulting address? (Better yet, can you go on #retro so we can debug this? =P)

QUOTE (Hayate @ Jan 12 2010, 07:06 AM)
Just set the window's border state to "none" and then maximize it; then it'll automatically hide the taskbar/other docked toolbars if people still use those (and, in the case of multi-monitor, the window will simply fill whatever screen it was already visible on). If the window's already maximized, you NEED to restore it before going windowed fullscreen, or it won't work.

Okay, I'll consider adding this in the win32-dlu branch. (This branch has all the Dialog Unit changes for resolution-independence.)

QUOTE (Hayate @ Jan 12 2010, 07:06 AM)
QUOTE (GerbilSoft @ Jan 12 2010, 06:15 AM)
For the "unhandled" keypresses, I'm pretty sure Gens/GS does throw out all the WM_KEY* messages after waiting for DirectInput to process them. Maybe Vista/7 is sending some other messages that I'm not discarding?


I can't think why it would, but this could well be the case - it's a pretty common problem with all emulators, not just Gens/GS.

Do you have a copy of Spy++? If so, can you record a log of all the messages sent to the Controller Configuration window when configuring a key and pastebin it?

#36 User is offline Hayate 

Posted 12 January 2010 - 01:51 PM

  • Posts: 2355
  • Joined: 01-February 04
  • Gender:Male
  • Location:Torquay, England
  • Wiki edits:70
I don't have Spy++. I think it came with Visual Studio 6 which I had years ago, but I really don't feel like digging that up again and installing it =P

#37 User is offline Conan Kudo 

Posted 12 January 2010 - 02:55 PM

  • 「真実はいつも一つ!」工藤新一
  • Posts: 477
  • Joined: 12-January 09
  • Gender:Male
  • Wiki edits:14
QUOTE (Hayate @ Jan 12 2010, 12:51 PM)
I don't have Spy++. I think it came with Visual Studio 6 which I had years ago, but I really don't feel like digging that up again and installing it =P


You can download the Debugging Tools for Windows which includes Spy++ among other debugging tools.

#38 User is offline GerbilSoft 

Posted 12 January 2010 - 10:28 PM

  • RickRotate'd.
  • Posts: 1610
  • Joined: 11-January 03
  • Gender:Male
  • Location:USA
  • Project:Gens/GS
  • Wiki edits:158
Random stuff done just now:
  • Fixed a RAM mirroring issue with Starscream (the 68000 emulator). The instuction fetch table didn't have all the RAM mirrors set up, and Jorge's test ROM has an interrupt handler at $E00000. I reworked it to add all the mirrors, and the test ROM now works. (Eventually, the 68000 emulator will be ported to C and updated to use a more efficient page table system.) [Note that memory fetch had the mirroring system set up properly. Why Starscream uses separate instruction and data fetch functions is beyond me.]
  • SegaCD: Added support for 128 KB, 256 KB, and 512 KB backup RAM cartridges. (default is still 64 KB)
  • SegaCD: The backup RAM cartridge is now automatically formatted if it doesn't exist. This should hopefully eliminate all of the "Why do I get a picture of Eggman when I try running Sonic CD?" problems.

This post has been edited by GerbilSoft: 16 January 2010 - 02:17 AM
Reason for edit: +512 KB

#39 User is offline Hayate 

Posted 13 January 2010 - 07:32 AM

  • Posts: 2355
  • Joined: 01-February 04
  • Gender:Male
  • Location:Torquay, England
  • Wiki edits:70
QUOTE (King InuYasha @ Jan 12 2010, 07:55 PM)
QUOTE (Hayate @ Jan 12 2010, 12:51 PM)
I don't have Spy++. I think it came with Visual Studio 6 which I had years ago, but I really don't feel like digging that up again and installing it =P


You can download the Debugging Tools for Windows which includes Spy++ among other debugging tools.


I just installed that, and the only program it seems to have put on the Start menu is "WinDbg". Taking a quick glance at the help file which had a list of "additional tools and utilities", Spy++ isn't in that list either.

#40 User is offline Conan Kudo 

Posted 13 January 2010 - 07:48 AM

  • 「真実はいつも一つ!」工藤新一
  • Posts: 477
  • Joined: 12-January 09
  • Gender:Male
  • Wiki edits:14
QUOTE (Hayate @ Jan 13 2010, 06:32 AM)
QUOTE (King InuYasha @ Jan 12 2010, 07:55 PM)
QUOTE (Hayate @ Jan 12 2010, 12:51 PM)
I don't have Spy++. I think it came with Visual Studio 6 which I had years ago, but I really don't feel like digging that up again and installing it =P


You can download the Debugging Tools for Windows which includes Spy++ among other debugging tools.


I just installed that, and the only program it seems to have put on the Start menu is "WinDbg". Taking a quick glance at the help file which had a list of "additional tools and utilities", Spy++ isn't in that list either.


Hmm... Well, here is a "substitute" of Spy++, called WinSpy. Perhaps this can help? Binaries and Source code are available for WinSpy, too...

#41 User is offline Hayate 

Posted 13 January 2010 - 09:17 AM

  • Posts: 2355
  • Joined: 01-February 04
  • Gender:Male
  • Location:Torquay, England
  • Wiki edits:70
Doesn't seem to have any kind of event log, though I did manage to hide the window border with it (by removing the WS_OVERLAPPEDWINDOW style).

#42 User is offline Mad Echidna 

Posted 16 January 2010 - 12:55 PM

  • Gone
  • Posts: 5203
  • Joined: 13-January 03
  • Gender:Male
  • Wiki edits:4
I've got some bugs I need to report, according to SELinux:
QUOTE
Summary:

SELinux is preventing /usr/local/bin/gens from loading
/usr/local/lib/mdp/mdp_misc_game_genie.so which requires text relocation.

Detailed Description:

The gens application attempted to load /usr/local/lib/mdp/mdp_misc_game_genie.so
which requires text relocation. This is a potential security problem. Most
libraries do not need this permission. Libraries are sometimes coded incorrectly
and request this permission. The SELinux Memory Protection Tests
(http://people.redhat...elinux-mem.html) web page explains how to
remove this requirement. You can configure SELinux temporarily to allow
/usr/local/lib/mdp/mdp_misc_game_genie.so to use relocation as a workaround,
until the library is fixed. Please file a bug report.

Allowing Access:

If you trust /usr/local/lib/mdp/mdp_misc_game_genie.so to run correctly, you can
change the file context to textrel_shlib_t. "chcon -t textrel_shlib_t
'/usr/local/lib/mdp/mdp_misc_game_genie.so'" You must also change the default
file context files on the system in order to preserve them even on a full
relabel. "semanage fcontext -a -t textrel_shlib_t
'/usr/local/lib/mdp/mdp_misc_game_genie.so'"

Fix Command:

chcon -t textrel_shlib_t '/usr/local/lib/mdp/mdp_misc_game_genie.so'

Additional Information:

Source Context unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1
023
Target Context system_u:object_r:lib_t:s0
Target Objects /usr/local/lib/mdp/mdp_misc_game_genie.so [ file ]
Source gens
Source Path /usr/local/bin/gens
Port <Unknown>
Host ianeee
Source RPM Packages
Target RPM Packages
Policy RPM selinux-policy-3.6.32-66.fc12
Selinux Enabled True
Policy Type targeted
Enforcing Mode Enforcing
Plugin Name allow_execmod
Host Name ianeee
Platform Linux ianeee 2.6.31.9-174.fc12.i686 #1 SMP Mon Dec
21 06:24:20 UTC 2009 i686 i686
Alert Count 1
First Seen Sat 16 Jan 2010 08:42:10 AM PST
Last Seen Sat 16 Jan 2010 08:42:10 AM PST
Local ID 438a6316-d43c-4fe3-b413-680b3a4c3c5d
Line Numbers

Raw Audit Messages

node=ianeee type=AVC msg=audit(1263660130.670:19631): avc: denied { execmod } for pid=31560 comm="gens" path="/usr/local/lib/mdp/mdp_misc_game_genie.so" dev=dm-1 ino=679725 scontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tcontext=system_u:object_r:lib_t:s0 tclass=file

node=ianeee type=SYSCALL msg=audit(1263660130.670:19631): arch=40000003 syscall=125 success=no exit=-13 a0=3eb000 a1=8000 a2=5 a3=bf9fdff0 items=0 ppid=1 pid=31560 auid=500 uid=500 gid=500 euid=500 suid=500 fsuid=500 egid=500 sgid=500 fsgid=500 tty=(none) ses=4 comm="gens" exe="/usr/local/bin/gens" subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 key=(null)


QUOTE
Summary:

SELinux is preventing /usr/local/bin/gens from loading
/usr/local/lib/mdp/mdp_misc_ips_patcher.so which requires text relocation.

Detailed Description:

The gens application attempted to load
/usr/local/lib/mdp/mdp_misc_ips_patcher.so which requires text relocation. This
is a potential security problem. Most libraries do not need this permission.
Libraries are sometimes coded incorrectly and request this permission. The
SELinux Memory Protection Tests
(http://people.redhat...elinux-mem.html) web page explains how to
remove this requirement. You can configure SELinux temporarily to allow
/usr/local/lib/mdp/mdp_misc_ips_patcher.so to use relocation as a workaround,
until the library is fixed. Please file a bug report.

Allowing Access:

If you trust /usr/local/lib/mdp/mdp_misc_ips_patcher.so to run correctly, you
can change the file context to textrel_shlib_t. "chcon -t textrel_shlib_t
'/usr/local/lib/mdp/mdp_misc_ips_patcher.so'" You must also change the default
file context files on the system in order to preserve them even on a full
relabel. "semanage fcontext -a -t textrel_shlib_t
'/usr/local/lib/mdp/mdp_misc_ips_patcher.so'"

Fix Command:

chcon -t textrel_shlib_t '/usr/local/lib/mdp/mdp_misc_ips_patcher.so'

Additional Information:

Source Context unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1
023
Target Context system_u:object_r:lib_t:s0
Target Objects /usr/local/lib/mdp/mdp_misc_ips_patcher.so [ file
]
Source gens
Source Path /usr/local/bin/gens
Port <Unknown>
Host ianeee
Source RPM Packages
Target RPM Packages
Policy RPM selinux-policy-3.6.32-66.fc12
Selinux Enabled True
Policy Type targeted
Enforcing Mode Enforcing
Plugin Name allow_execmod
Host Name ianeee
Platform Linux ianeee 2.6.31.9-174.fc12.i686 #1 SMP Mon Dec
21 06:24:20 UTC 2009 i686 i686
Alert Count 1
First Seen Sat 16 Jan 2010 08:42:10 AM PST
Last Seen Sat 16 Jan 2010 08:42:10 AM PST
Local ID 050f0f0e-9332-4e9a-9b3d-c737a42b6487
Line Numbers

Raw Audit Messages

node=ianeee type=AVC msg=audit(1263660130.672:19632): avc: denied { execmod } for pid=31560 comm="gens" path="/usr/local/lib/mdp/mdp_misc_ips_patcher.so" dev=dm-1 ino=679734 scontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tcontext=system_u:object_r:lib_t:s0 tclass=file

node=ianeee type=SYSCALL msg=audit(1263660130.672:19632): arch=40000003 syscall=125 success=no exit=-13 a0=3eb000 a1=2000 a2=5 a3=bf9fdff0 items=0 ppid=1 pid=31560 auid=500 uid=500 gid=500 euid=500 suid=500 fsuid=500 egid=500 sgid=500 fsgid=500 tty=(none) ses=4 comm="gens" exe="/usr/local/bin/gens" subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 key=(null)


There are 6 more of the same error for each of the renders.

#43 User is offline GerbilSoft 

Posted 16 January 2010 - 02:35 PM

  • RickRotate'd.
  • Posts: 1610
  • Joined: 11-January 03
  • Gender:Male
  • Location:USA
  • Project:Gens/GS
  • Wiki edits:158
QUOTE (Mad Echidna @ Jan 16 2010, 12:55 PM)
I've got some bugs I need to report, according to SELinux:
QUOTE
SELinux blah blah blah


There are 6 more of the same error for each of the renders.

Some of the renderers do require text relocation, since they use x86 assembler and don't properly support PIC; however, Game Genie and IPS Patcher are C/C++-only, and shouldn't have a problem.

...then again, I just ran scanelf on the r7 versions, and I do see text relocations in Game Genie, IPS Patcher, Sonic Gens, VDP Layer Options, NTSC, hq2x, hq3x, and hq4x. I'll try fixing them.

EDIT: The latest sources (r7+ from git) show text relocations only in hq2x, hq3x, and hq4x.
This post has been edited by GerbilSoft: 16 January 2010 - 02:41 PM

#44 User is offline Mad Echidna 

Posted 16 January 2010 - 04:05 PM

  • Gone
  • Posts: 5203
  • Joined: 13-January 03
  • Gender:Male
  • Wiki edits:4
Sounds good Gerb, thanks. I was half expecting you to just tell me to stop using SELinux :P

#45 User is offline GerbilSoft 

Posted 16 January 2010 - 05:54 PM

  • RickRotate'd.
  • Posts: 1610
  • Joined: 11-January 03
  • Gender:Male
  • Location:USA
  • Project:Gens/GS
  • Wiki edits:158
QUOTE (TmEE @ Jan 12 2010, 03:13 AM)
Is Gens/GS using SSE2 or something ? I get "this program has tried to execute illegal instruction error" every time I try to run it... I've got a Tualatin Pentium III here, its only got SSE...

I uploaded a new compile of Release 7 that's compiled with the correct toolchain. (-march=i586 -mtune=i686). It should work correctly now.

File:Gens-gs-r7-win32-pkg1.zip

  • 5 Pages +
  • 1
  • 2
  • 3
  • 4
  • 5
    Locked
    Locked Forum

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users