bsnes v0.041 released

Archived bsnes development news, feature requests and bug reports. Forum is now located at http://board.byuu.org/
Locked
franpa
Gecko snack
Posts: 2372
Joined: Sun Aug 21, 2005 11:06 am
Location: Australia, QLD
Contact:

Post by franpa »

_willow_ wrote:
grinvader wrote:
_willow_ wrote:plugins

You have 30 seconds to die on your own before I start helping you.

No, it's not i propose to move all the code out of the core but to add the enumeration for auxiliary renderers support. It is not that silly. Just to add another renderer which adds the external modules. Not a thing would change for existed renderers classes except additional wrapper device.
Why would you want to use an alternate rendering engine anyways?
Core i7 920 @ 2.66GHZ | ASUS P6T Motherboard | 8GB DDR3 1600 RAM | Gigabyte Geforce 760 4GB | Windows 10 Pro x64
creaothceann
Seen it all
Posts: 2302
Joined: Mon Jan 03, 2005 5:04 pm
Location: Germany
Contact:

Post by creaothceann »

You could switch more easily between scanline- and pixel-based renderers.

EDIT: Anyway, plugins would make sense if several independent developers work on the project. Though that increases the risk of incompatibilities and bugs, as can be seen with N64/Playstation emulators.
vSNES | Delphi 10 BPLs
bsnes launcher with recent files list
Verdauga Greeneyes
Regular
Posts: 347
Joined: Tue Mar 07, 2006 10:32 am
Location: The Netherlands

Post by Verdauga Greeneyes »

creaothceann wrote:You could switch more easily between scanline- and pixel-based renderers.

I'm not sure it would really be good for that considering the amount of communication between the core and the renderer - you probably want to give the compiler as much opportunity to optimize that as possible!
creaothceann
Seen it all
Posts: 2302
Joined: Mon Jan 03, 2005 5:04 pm
Location: Germany
Contact:

Post by creaothceann »

Verdauga Greeneyes wrote:I'm not sure it would really be good for that considering the amount of communication between the core and the renderer - you probably want to give the compiler as much opportunity to optimize that as possible!

My guess is that compiler optimizations won't be able to help much.

For example, if you do rendering on a Pentium 1 with a VGA card, realistic raytracing in realtime is just not possible, optimizations or not.
vSNES | Delphi 10 BPLs
bsnes launcher with recent files list
franpa
Gecko snack
Posts: 2372
Joined: Sun Aug 21, 2005 11:06 am
Location: Australia, QLD
Contact:

Post by franpa »

how do plugins alleviate the problem in your example?
Core i7 920 @ 2.66GHZ | ASUS P6T Motherboard | 8GB DDR3 1600 RAM | Gigabyte Geforce 760 4GB | Windows 10 Pro x64
byuu

Post by byuu »

New WIP.

This adds support for hats and analog buttons, and fixes the centering code so that it never ends up minimized on Linux at startup. Just went back to putting the window offscreen before centering, as thanks to the delay in propagating window messages in Xorg, you don't even notice the flicker on Linux.

You can now have up to 8 hats, 16 axes, 16 analog buttons and 96 digital buttons. Just to future proof things. If your controller has more than that ... then I demand you send it to me before I'll support it.

SDL input for Linux should work fully: hats allow four unique inputs, axes two and analog buttons one. It calibrates to tell the difference when you start the emulator.

DirectInput doesn't work so well. The DIJOYSTATE2 struct has a ton of analog inputs, but only lX/lY map to the first stick, and lRx/lRy to the analog buttons. But I can't even detect those properly because for some bastardized reason, polling them at startup returns 0, 0. It isn't until the user presses at least one button that the controller 'snaps out of it' and returns the proper +32767,+32767 for the two buttons.

On the bright side, DI treats POV hats like POV hats. It allows up to four, so that's what you get. You'll have to deal with that or the first analog stick for Windows.

Unless there's a DirectInput expert here, not sure I can fix this. The other inputs are not in DIJOYSTATE2 at all. Yet somehow the control panel applet can sense them.

Mapping is fully inclusive, for joypad buttons and UI shortcuts, you can use keyboard buttons, mouse buttons, joypad buttons, joypad axes, joypad hats, joypad analog buttons. For mouse / super scope axes, you can use mouse axes and joypad axes. Buttons aren't bi-directional and lack the precision to support the mouse / SS / Justifier to any usable degree, and analog buttons are uni-directional.

Have you thought about rendering plugins for sound, input, video?


Would rather not. Cross-platform dynamic library support is terrible.

Hmm must be "spin the black circle" as far as I can tell.


Yeah, here. I posted about it here a while back. Probably should've mentioned the name.

Yeah. That cheating nonsense discourages me from really playing any online games with top scores like that. It sucks all the fun out of it.


It's usually okay when it's painfully obvious. I cleared every level at least a dozen times, and took advantage of every collision quirk there was to get time there. For there to be a > 30 second leap between #4 and #5 (and #1-4 all from the same person), it's pretty obvious that he was cheating in some way.

I consider the best time to be 03:58, and 04:06 (edit: 4:01:97 now) is close enough to make me happy :D
Last edited by byuu on Wed Mar 18, 2009 7:39 pm, edited 2 times in total.
FitzRoy
Veteran
Posts: 861
Joined: Wed Aug 04, 2004 5:43 pm
Location: Sloop

Post by FitzRoy »

Why would there ever be more than 4 analog axes per controller? Humans only have two thumbs.
byuu

Post by byuu »

FitzRoy wrote:Why would there ever be more than 4 analog axes per controller? Humans only have two thumbs.


Lazy ass Linux driver developers mapping four physical controllers (eg 4-player PS2 USB adapter) to one logical device.
_willow_
Hazed
Posts: 51
Joined: Mon Dec 24, 2007 2:03 am
Location: Russia
Contact:

Post by _willow_ »

Verdauga Greeneyes wrote:
creaothceann wrote:You could switch more easily between scanline- and pixel-based renderers.

I'm not sure it would really be good for that considering the amount of communication between the core and the renderer - you probably want to give the compiler as much opportunity to optimize that as possible!

The interface thing would pass just pointers not the data itself. No worries about the precious optimizations. Besides, we are speaking about extra renderers.
byuu wrote:Would rather not. Cross-platform dynamic library support is terrible.

And it should not to be portable. Why you do not complain about DirectSound or whatever renderer being not portable? Just another Platform specific wrapper. I'm sure it would reduce the specific demands considerably. Some may want to try the exclusive full screen, capturing or platform and device specific drivers.. I'm not pressing for myself, but trying for some tech wise solution for everyones good.
creaothceann
Seen it all
Posts: 2302
Joined: Mon Jan 03, 2005 5:04 pm
Location: Germany
Contact:

Post by creaothceann »

franpa wrote:how do plugins alleviate the problem in your example?

I'm not saying they do.
vSNES | Delphi 10 BPLs
bsnes launcher with recent files list
byuu

Post by byuu »

_willow_ wrote:Why you do not complain about DirectSound or whatever renderer being not portable?


Because the DirectX drivers come with Windows, and I link directly against their libraries.

Targeting an as-yet-undefined implementation requires LoadLibrary / GetProcAddress / dlopen / dlsym / etc etc. And then each platform needs drivers, it isn't a one-package deal like the binaries.

I don't like the idea, sorry. If something is important, I'll add direct support for it.
FitzRoy
Veteran
Posts: 861
Joined: Wed Aug 04, 2004 5:43 pm
Location: Sloop

Post by FitzRoy »

byuu wrote:
FitzRoy wrote:Why would there ever be more than 4 analog axes per controller? Humans only have two thumbs.


Lazy ass Linux driver developers mapping four physical controllers (eg 4-player PS2 USB adapter) to one logical device.


byuu wrote:Thanks, but the problem isn't on my end, it's with worthless Windows anti-virus software. By working around it, I encourage said behavior to continue.


byuu vs byuu. Fight!
Verdauga Greeneyes
Regular
Posts: 347
Joined: Tue Mar 07, 2006 10:32 am
Location: The Netherlands

Post by Verdauga Greeneyes »

FitzRoy wrote:byuu vs byuu. Fight!

Image
byuu

Post by byuu »

You people have too much free time.

http://www.bubblebox.com/highscores/902.htm
http://i73.photobucket.com/albums/i221/ ... /stbc1.png
http://i73.photobucket.com/albums/i221/ ... /stbc2.png
http://i73.photobucket.com/albums/i221/ ... /stbc3.png

3:58:65. First place if you discount the cheater with > 25 seconds better time above me :D
Now if only my emulator was that fast ...
Nach
ZSNES Developer
ZSNES Developer
Posts: 3903
Joined: Tue Jul 27, 2004 10:54 pm
Location: Solar powered park bench
Contact:

Post by Nach »

FitzRoy wrote:Why would there ever be more than 4 analog axes per controller? Humans only have two thumbs.

I have a gamepad with a D-Pad, an analog pad, a hat, and flippers (think playing pinball). That's 2+2+2+1 (the hat is read as 2 axis for some reasons). Obviously, they're not meant to all be used at the same time, more of an all in one deal.
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
Verdauga Greeneyes
Regular
Posts: 347
Joined: Tue Mar 07, 2006 10:32 am
Location: The Netherlands

Post by Verdauga Greeneyes »

byuu wrote:You people have too much free time.

Fitzroy inspired me :D And it only took me like 15 minutes. (or I would have tried to get rid of the red outline)
FitzRoy
Veteran
Posts: 861
Joined: Wed Aug 04, 2004 5:43 pm
Location: Sloop

Post by FitzRoy »

byuu wrote:You people have too much free time.

http://www.bubblebox.com/highscores/902.htm
http://i73.photobucket.com/albums/i221/ ... /stbc1.png
http://i73.photobucket.com/albums/i221/ ... /stbc2.png
http://i73.photobucket.com/albums/i221/ ... /stbc3.png

3:58:65. First place if you discount the cheater with > 25 seconds better time above me :D
Now if only my emulator was that fast ...


Cool music, but I don't have the patience for games like this. It's basically cameltry with booby traps.
sweener2001
Inmate
Posts: 1751
Joined: Mon Dec 06, 2004 7:47 am
Location: WA

Post by sweener2001 »

a 360 controller uses an axis for the triggers
Image
kick
Trooper
Posts: 550
Joined: Wed Mar 01, 2006 8:47 pm

Post by kick »

FitzRoy wrote:Why would there ever be more than 4 analog axes per controller? Humans only have two thumbs.


Analog triggers,flight simulator joysticks,wii-style controllers...
Have a nice kick in da nutz @~@* c//
FitzRoy
Veteran
Posts: 861
Joined: Wed Aug 04, 2004 5:43 pm
Location: Sloop

Post by FitzRoy »

Analog triggers


Button, not an axis.

flight simulator joysticks


2/4 axis controller, normally.

wii-style controllers...


PS3 and Wii might have 6, but that's with motion sensors.
sweener2001
Inmate
Posts: 1751
Joined: Mon Dec 06, 2004 7:47 am
Location: WA

Post by sweener2001 »

FitzRoy wrote:
Analog triggers


Button, not an axis.



axis, or haven't you tried one?

neutral when you're not doing anything, right trigger makes it go in one direction and left trigger the other

they are analog, after all.
Image
odditude
Official tech support dood
Posts: 2107
Joined: Wed Jan 25, 2006 7:57 am

Post by odditude »

sweener2001 wrote:
FitzRoy wrote:
Analog triggers


Button, not an axis.


axis, or haven't you tried one?

neutral when you're not doing anything, right trigger makes it go in one direction and left trigger the other

they are analog, after all.

or two independent axes (like the ps3 l2/r2 buttons)
Last edited by odditude on Thu Mar 19, 2009 9:34 pm, edited 1 time in total.
Why yes, my shift key *IS* broken.
henke37
Lurker
Posts: 152
Joined: Tue Apr 10, 2007 4:30 pm
Location: Sweden
Contact:

Post by henke37 »

Gamecube controller, 2 joysticks + two triggers.
FitzRoy
Veteran
Posts: 861
Joined: Wed Aug 04, 2004 5:43 pm
Location: Sloop

Post by FitzRoy »

odditude wrote:or two independent axes (like the ps3 l2/r2 buttons)


Uh, I've never seen the sixaxis referenced as having more than 6 axes.
Gil_Hamilton
Buzzkill Gil
Posts: 4267
Joined: Wed Jan 12, 2005 7:14 pm

Post by Gil_Hamilton »

FitzRoy wrote:
odditude wrote:or two independent axes (like the ps3 l2/r2 buttons)


Uh, I've never seen the sixaxis referenced as having more than 6 axes.
It has six-axis motion-tracking(rotational and translational movement along the X, Y, and Z axes), which is what the name refers to.

It ALSO has 6 traditional potentiometer axes(2 per thumbstick, plus two triggers).

Plus 6 damned pressure-sensitive face buttons(I assume L1 and R1 are still pressure-sensitive), which supply analog data and are treated as analog axes.


So it has 6 + 6 + 6 axes.
Locked