bsnes v0.033 released

Archived bsnes development news, feature requests and bug reports. Forum is now located at http://board.byuu.org/
Locked
neo_bahamut1985
-Burninated-
Posts: 871
Joined: Mon Sep 10, 2007 11:33 pm
Location: Unspecified

Post by neo_bahamut1985 »

DOLLS wrote:
byuu wrote:Alright, new WIP. Added a new feature so people will stop harassing me about it :P

Try and guess what it is.
Where does one get the WIP?
Good question.
俺はテメエの倒す男だ! 宜しく! お前はもう死んでいる...
FitzRoy
Veteran
Posts: 861
Joined: Wed Aug 04, 2004 5:43 pm
Location: Sloop

Post by FitzRoy »

The WIPs are private. Most of the people with access got it two years ago.
DOLLS (J) [!]
ZNES Developer
Posts: 215
Joined: Mon Aug 02, 2004 11:22 pm

Post by DOLLS (J) [!] »

I see.
byuu

Post by byuu »

Alright, then. This was the new feature from the last WIP:

Image

Multitap support for Nach and tetsuo55 :)

New WIP up as well. This one adds Pogo's request, there's a new config variable named input.analog_axis_resistance. The setting works both for the DirectInput/Windows and SDL/Linux drivers.

It used to be 75% on Windows, 50% on Linux. Now it defaults to 50% on both platforms. If any of you guys have an analog stick and want to come up with a better default value, please feel free. I wasn't able to pull off Ryu's spinning kick thing very easily at 75%, for instance.
The WIPs are private. Most of the people with access got it two years ago.
I used to give out access to anyone who found a new emulator bug in a public release, but that's not working so well anymore ...

Eventually I'd like to get a system set up where anyone can get access, yet avoid having the WIPs leak. I really don't want to bother emu news site readers with daily WIP updates that change ~3kb of code.
Nach
ZSNES Developer
ZSNES Developer
Posts: 3904
Joined: Tue Jul 27, 2004 10:54 pm
Location: Solar powered park bench
Contact:

Post by Nach »

byuu wrote: Multitap support for Nach and tetsuo55 :)
If you wanted to make Nach happy, you'd be the first emulator to support the Multitap 5 ports, you only added support for the Multitap 4 ports.
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
I.S.T.
Zealot
Posts: 1325
Joined: Tue Nov 27, 2007 7:03 am

Post by I.S.T. »

Can't you do that yourself in snex9x and zsnes? ;)
Nach
ZSNES Developer
ZSNES Developer
Posts: 3904
Joined: Tue Jul 27, 2004 10:54 pm
Location: Solar powered park bench
Contact:

Post by Nach »

I.S.T. wrote:Can't you do that yourself in snex9x and zsnes? ;)
Perhaps.
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
henke37
Lurker
Posts: 152
Joined: Tue Apr 10, 2007 4:30 pm
Location: Sweden
Contact:

Post by henke37 »

You forgot to mention my nagging about the multitap. :) All I can say is, good work. Btw, have a pat on the back for remembering to update the readme. I feel that you did a very solid work with the supporting material for this new feature, solid work.

But I did find one tiny quirk, the open dialog has the open as read only check box. I know that there has been discussions about changing the files, but I don't think you are doing that right now, so how about you hide it in the next build?

Also, the configuration dialog isn't modal. Personally I would preffer if it was, so that I didn't accidentally lose it when multi tasking. But I see the point in letting it be non-modal. So another advanced setting, then?
byuu

Post by byuu »

If you wanted to make Nach happy, you'd be the first emulator to support the Multitap 5 ports, you only added support for the Multitap 4 ports.
Hard to tell ... were you being sarcastic about me listing no support for a 5-port version in previous readme files, or is there seriously an actual 5-port adapter that connects to a single controller port?

If the former, the "MP5" name obviously confused me. I didn't realize they were counting the other controller port. If the latter, I'd be curious how they implemented it. Does any game actually use it? I mean, we could easily make it an 8-port (or any power-of-two) adapter by using a ring buffer on IO register bit transitions -- but I don't see much point in that :P
Nach
ZSNES Developer
ZSNES Developer
Posts: 3904
Joined: Tue Jul 27, 2004 10:54 pm
Location: Solar powered park bench
Contact:

Post by Nach »

byuu wrote:
If you wanted to make Nach happy, you'd be the first emulator to support the Multitap 5 ports, you only added support for the Multitap 4 ports.
Hard to tell ... were you being sarcastic about me listing no support for a 5-port version in previous readme files, or is there seriously an actual 5-port adapter that connects to a single controller port?
There is an actual 5 port multitap, I am not being sarcastic.
byuu wrote:Does any game actually use it?
There are 2 or 3 soccer games that use it IIRC. They were 6 player.

IIRC, neviksti made an 8 player game which stuck a multitap 4 port into each SNES port. Technically though, you can get up to 10 there.

If you have an SGB2 in each SNES, connect them together via the Gamelink, you get a 20 player game there (yes, the SNES can take advantage of stuff on the SGB2). If you use the Gamelink 4 port device, you can get 40 controllers connected to an SNES. I am giddy just waiting for someone to make an SNES/DMG game which runs on an SGB2 taking advantage of both CPUs, and massively linking it all up, and showing a video of the worlds first in house 40 player video game.

Edit:
Imagine this insanity.
A game where 20 players run around on the screen (and you can look at any of your 4 screens), while another 8 players are all holding a Justifier in their hand, trying to blow them away.

Game requirements:
4 DMG game packs with this custom game in the ROM.
1 Gamelink 4.
4 Gamelink cables.
4 SGB2s.
4 SNESs.
4 Multitap 5 Ports.
4 Justifier Pink.
4 Justifier Blue.
4 Old television screens which support the Justifier.
20 SNES contollers (although feel free to mix in ASCII Pads, Capcom Pro Fighter, SNES Advantage, and whatever).
28 People capable of playing.

I'd sure just love to see a video of people playing it.

Edit 2:
If anyone decides to make such an SNES/DMG game, please program in that when the 20 beat the 8, a laughing dog appears on the screen. Thanks.
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
d4s
Rookie
Posts: 28
Joined: Wed Sep 08, 2004 12:05 pm

Post by d4s »

I've been wondering how that 5-player multitap works, aswell.
I assume we're talking about this device here:
Image

Wanted to get one of these for the longest time to play around with...

From my understanding, the normal 4-port multitap works something like this when connected to joypad port 2:

JoyPort2Data1Io0=joypad4
JoyPort2Data2Io0=joypad5
JoyPort2Data1Io1=joypad2
JoyPort2Data2Io1=joypad3

I wonder where the sixth one fits in...
byuu

Post by byuu »

I think I can tell how it works from looking at a picture of it:

Image

Notice how pins 5 and 6 are not connected, as with a regular gamepad.

Pin 5 = Data2
Pin 6 = IOBit

Without those two, there's really only one way it can work: it's streaming data for all five controllers in a row. Or in other words, you read the lowest bit of $4016 / $4017 ~80x.

Well, the exact number of reads depends upon how it works. It could be simply using the standard 16-bits of data that a normal joypad gets, or it could reduce that to 12-bits. It may or may not have a "17th bit" to identify if the controller is connected (obviously, it's just the controller shifting 1s into the output stream, but it acts as though there's a 17th bit since no controller would return 0s instead.) It could have a special 4-bit signature to identify the device, and it may or may not "pack" the controller connected bit into that identifier.

Hard to say, but the adapters are dirt cheap on eBay. If someone really wants it figured out, cover the cost + shipping and I'll pick one up.

Going to be annoying to emulate. I'll probably leave two standard joypads that can be configured, and then 10 joypads that are shared for Multitap and Tribal Tap. The former will just ignore #5 of each.
byuu

Post by byuu »

Okay, trying to RE the interface from existing games.

Does anyone know of any 6-player games?

I looked at Battle Cross (J), but it looks as though the sixth player is meant to always be a computer player. After analyzing the code, it only checks for multi-tap and standard joypads. There's no other tests going on. I also tried hacking the memory to force-enable players, and I can enable all but #6, so obviously this game does not have support for the Tribal Tap.

http://img186.imageshack.us/img186/6162 ... ossqw0.png

We'd probably want a 6-player US game, post-1994.
neviksti
Lurker
Posts: 122
Joined: Thu Jul 29, 2004 6:15 am

Post by neviksti »

Nach wrote:IIRC, neviksti made an 8 player game which stuck a multitap 4 port into each SNES port.
Yeah, it was just a test to show it was possible though. I had it setup to be each person had an asteroids-like controlled ship, and when I tested it out with some roommates it was way too chaotic, so I never bothered to add shooting or collision detection as it was clear this wouldn't work as a game. But it was neat to see that it was possible.
Nach wrote:Edit:
Imagine this insanity.
A game where 20 players run around on the screen (and you can look at any of your 4 screens), while another 8 players are all holding a Justifier in their hand, trying to blow them away.
That actually sounds like a lot of fun.
A lot of those parts are becoming increasingly difficult to get though.

At one point I ran into someone that had a justifier gun, and let me take it appart to see how it works. It had a pcb that just screamed "options" to me, so I took the chance and bought a SEGA justifies gun and sure enough it was simple to convert to act like a "pink"/second player gun. That was back when I gave the hardware explanation to snes9x of how they worked... I always felt a bit weird about that, since I was 99.99% sure I was describing the second gun hardware correctly, but I had no way of knowing for sure at the time. Oh well, the emulation worked, and the device also worked with real hardware.

Man, I really should write these things up sometime so others running into trouble collecting stuff can make them. I have no idea where I scrawled all those notes though.
Nach wrote:Edit 2:
If anyone decides to make such an SNES/DMG game, please program in that when the 20 beat the 8, a laughing dog appears on the screen. Thanks.
Awesome. I like the small touches.
byuu wrote:I think I can tell how it works from looking at a picture of it:
[ image ]

Notice how pins 5 and 6 are not connected, as with a regular gamepad.

Pin 5 = Data2
Pin 6 = IOBit

Without those two, there's really only one way it can work:
That doesn't really give you any hint as the controller pads don't use those lines (so they just didn't bother putting in connections).

I have one of these somewhere, and can run tests if you want. If I remember correctly (which is doubtful here), the device couldn't be taken appart without destroying the case and I don't want to break it so we might be left with blackboxing it. There are really only a couple ways it could work so I'm sure we could figure it out quickly with a test.

EDIT: I didn't know of any game that used 6 players, so I never really tested it with an official game.
Nach
ZSNES Developer
ZSNES Developer
Posts: 3904
Joined: Tue Jul 27, 2004 10:54 pm
Location: Solar powered park bench
Contact:

Post by Nach »

neviksti wrote:
Nach wrote:Edit:
Imagine this insanity.
A game where 20 players run around on the screen (and you can look at any of your 4 screens), while another 8 players are all holding a Justifier in their hand, trying to blow them away.
That actually sounds like a lot of fun.
Yeah, unfortunately though, if anyone were ever to design the game, and had the parts, organizing that many people to play would be rough.
5 players versus 2 guns would be easier to arrange, but not as insanely fun. And most certainly not pushing the system to its limit.
neviksti wrote: Man, I really should write these things up sometime so others running into trouble collecting stuff can make them. I have no idea where I scrawled all those notes though.
If you do find good notes on the Justifier again, please send them my way, I'm considering rewriting the code in ZSNES, and perhaps even adding the mouse devices to bsnes.
neviksti wrote:
Nach wrote:Edit 2:
If anyone decides to make such an SNES/DMG game, please program in that when the 20 beat the 8, a laughing dog appears on the screen. Thanks.
Awesome. I like the small touches.
I'm glad someone understood :lol:

I mentioned a laughing dog to some kids playing a Wii shooting game recently, and how it'd be nice if Nintendo would allow us to blow up one, and they didn't get the reference at all.
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
odditude
Official tech support dood
Posts: 2118
Joined: Wed Jan 25, 2006 7:57 am

Post by odditude »

Nach wrote:I mentioned a laughing dog to some kids playing a Wii shooting game recently, and how it'd be nice if Nintendo would allow us to blow up one, and they didn't get the reference at all.
My friend and I were playing the skeet/duck shooting game in Wii Play, and got pissed off when the dog didn't show up. I don't think I'll ever forget that laugh.
Why yes, my shift key *IS* broken.
Dullaron
Lurker
Posts: 199
Joined: Mon Mar 10, 2008 11:36 pm

Post by Dullaron »

This going to be cool when this work out very well.
Window Vista Home Premium 32-bit / Intel Core 2 Quad Q6600 2.40Ghz / 3.00 GB RAM / Nvidia GeForce 8500 GT
byuu

Post by byuu »

It's really sad that this product's packaging failed to name even a single game that actually supports six players.
That doesn't really give you any hint as the controller pads don't use those lines (so they just didn't bother putting in connections).
Oh, duh ... you're exactly right, of course. Sorry.
I have one of these somewhere, and can run tests if you want.
If you don't mind, that would be helpful since it doesn't seem we can find a game that actually uses it ;)

I guess just strobe it manually. Read the value when JOYSER0 latch is raised as well as lowered, and get about ~120 reads from the controller port (probably use port B / $4017 to be safe), in case all five controllers are streamed in a linear fashion rather than two at a time as in the multi-tap. Then do all of that again with IOBit set for good measure.

That should give us any signatures or anything we need to emulate it.

If you're busy, no problems. I can probably pick one of these up for cheap.
wertigon
Rookie
Posts: 46
Joined: Sat Aug 07, 2004 7:20 pm

Post by wertigon »

Yeah, unfortunately though, if anyone were ever to design the game, and had the parts, organizing that many people to play would be rough.
5 players versus 2 guns would be easier to arrange, but not as insanely fun. And most certainly not pushing the system to its limit.
Were anyone to actually do something crazy as that, finding the people to play it would be the LEAST of your worries. Got two words for ya: Gaming Convention! :mrgreen:
neviksti
Lurker
Posts: 122
Joined: Thu Jul 29, 2004 6:15 am

Post by neviksti »

byuu wrote:
I have one of these somewhere, and can run tests if you want.
If you don't mind, that would be helpful since it doesn't seem we can find a game that actually uses it ;)
Alright, I found the device. It can be openned without destroying the case, so I'll check that in a bit. Something I didn't notice before, the box says: "Important! Always turn off the game console before connecting or disconnecting your Tribal Tap Adapter. Failure to do so may result in damage to your system." Depending on how it works, this could just be a generic warning. If it outputs on the I/O port and doesn't use open collector outputs, it may actually be able to damage the system.

Unfortunately, I have yet to find anything that distinguishes between "5P" and "6P" mode on this thing. So at the moment it just seems like a multitap that has an extra port that is ignored :) I'll open it up and see what I can find. I hope it doesn't use an expoxy blob.
byuu

Post by byuu »

neviksti wrote:If it outputs on the I/O port and doesn't use open collector outputs, it may actually be able to damage the system.
Hmm, that will be a tough one to emulate ... I suppose I'll randomly corrupt parts of the bsnes executable each time you swap out the Tribal Tap while the system is on. That should be at least somewhat hardware accurate ;)

Thanks a ton for looking at this thing for me! Wouldn't surprise me at all if the sixth port was a total fake at this point.
neviksti
Lurker
Posts: 122
Joined: Thu Jul 29, 2004 6:15 am

Post by neviksti »

byuu wrote:
neviksti wrote:If it outputs on the I/O port and doesn't use open collector outputs, it may actually be able to damage the system.
Hmm, that will be a tough one to emulate ... I suppose I'll randomly corrupt parts of the bsnes executable each time you swap out the Tribal Tap while the system is on. That should be at least somewhat hardware accurate ;)
Okay, I openned it up and there is a single IC, some transistors, and the rest are passives.

The IC (unlabelled) has about half its pins pulled high. So it probably does have open collector or otherwise. So it looks like that warning is probably generic, and there is no serious risk.
byuu wrote:Thanks a ton for looking at this thing for me! Wouldn't surprise me at all if the sixth port was a total fake at this point.
That would surprise me. I'm amazed it wasn't as simple as I expected though. I expected, when the IO pin was high from the SNES side, for it to write a bit to the IO pin during each clock out. So when the IO pin was high at the start of a transfer, it would select three pads, when it was low it would select the remaining two. For compatibility reasons I expected high to select (as labelled on the tribal tap case) pads 2,3,6 and when low select pads 4,5.

This of course is not how it worked.
I can't find good SNES console schematics online (and I don't know where mine are at the moment) nor good pinouts. Here's what I'm assuming based on the MCM schematics, info I could find online, and educated guessing.

Code: Select all

rounded tip
  GND
  IO 
  D1 (to serial port)
separator
  D0 (to serial port)
  latch
  clk
  Vcc
square end
Strangely, the PCB labells the joypad ports in the opposite direction of the plastic case. I will use the plastic case to refer to them here.

joypad 2 - appears to use all 7 pins, but the connector doesn't (they probably designed the "P2" setting to be fully compatibly but then cheaped out and didn't pay for the better connector)

joypad 3-6 - all share a common line for the latch
joypad 4-6 - clk is common

The last parts may be a useful clue, as joypad 6 is clocked out when 4 and 5 are. But this is when the IO pin is low. So data can't be sent to the snes this way.

The comment on the latch line is the really interesting one. There is no reason to not share this directly between all joypads... unless it is used for communication. I have a few ideas here, and I'll go try them now, but if that doesn't work I'll be stuck... so feel free to share ideas.
neviksti
Lurker
Posts: 122
Joined: Thu Jul 29, 2004 6:15 am

Post by neviksti »

Eh, I tried my few ideas and some random hopeful tries. I'm going to give up for tonight as I'm clearly not thinking creatively enough at the moment.
Nach wrote:
byuu wrote:Does any game actually use it?
There are 2 or 3 soccer games that use it IIRC. They were 6 player.
What were these games?
I'm worried that there is some activation sequence that I'll never be able to guess.

Considering they have a switch to select between "normal" multitap, and the 6P mode, I don't know why there would be any activation sequence (maybe it would echo something special like the mouse did, as a double check of authenticity?).
neo_bahamut1985
-Burninated-
Posts: 871
Joined: Mon Sep 10, 2007 11:33 pm
Location: Unspecified

Post by neo_bahamut1985 »

I've heard of five player games, like Bomberman, but SIX!!? Seems like games such as John Madden Football '94 and NHL Hockey '94 were...weird.
俺はテメエの倒す男だ! 宜しく! お前はもう死んでいる...
byuu

Post by byuu »

New WIP posted.

It adds my new findings on HDMA, which I've posted here:
http://board.zsnes.com/phpBB2/viewtopic.php?t=11804

This effectively fixes Mecarobot Golf once and for all. Interestingly enough, it also eliminates the track line flickering in Super Mario Kart.

Image
What a boring screenshot ...

I've tested for regressions with Battle Blaze, Battletoads, Battletoads & DD, Breath of Fire 2 German, Circuit USA, Der Langrisser, Energy Breaker, Earthworm Jim 2 (USA and EUR), F1 Grand-Prix, FF: Mystic Quest, Mortal Kombat I & II, Jumbo Ozaki no Hole in One, Secret of Mana and Street Racer. Basically, all the usual HDMA suspects. Looks good to me.

Let me know if you guys find any new regressions, though.
Locked