bsnes v0.036 released

Archived bsnes development news, feature requests and bug reports. Forum is now located at http://board.byuu.org/
Locked
creaothceann
Seen it all
Posts: 2302
Joined: Mon Jan 03, 2005 5:04 pm
Location: Germany
Contact:

Post by creaothceann »

byuu wrote:
Look at Windows Calculator, it didn't bother to include a file menu just to have Exit.
Excellent! An application with a normal menubar and no "Exit". So far we have: Calculator, Windows Media Player, Google Chrome and Winamp that we can reference as other similar applications without an exit menu option.
Just for the record...

charmap.exe
CPU-Z
Daemon Tools
DOSBox
Fraps
GameWiz32
HijackThis
JkDefrag
kkapture
Lunar IPS
Microsoft Reader
RAD Video Tools
RegToy
RivaTuner
ScummVM
SpeedFan
TweakUI
VirtuaWin
vSNES
WebVideoCap
WinUAE
xmplay
xp-AntiSpy
Last edited by creaothceann on Thu Sep 25, 2008 1:42 pm, edited 1 time in total.
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 »

byuu wrote:... Windows Media Player ...
Windows Media Player does have an Exit option in a normal menu, but you have to 'Show Classic Menus' or use the right click menu to see it.
byuu

Post by byuu »

New WIP.

This one adds BS-X flash cart detection (please let me know if you get any false-positives or false-negatives), the redesigned System menu suggested by FitzRoy sans it still saying "Load Cartridge ..." (still open to suggestions at this point, of course), Power on/off in place of power cycle, henke37's fix for hiding the "Read Only" checkbox on WinXP file dialog boxes, and henke37's suggestion to add ellipses to form buttons that open new windows. Thanks to everyone for their help with this.

Please note that Windows isn't disabling the "Power >" group as it should. I'll work on that tomorrow, got tired of screwing with it. It's ignoring MF_GRAYED and MF_DISABLED on group items for some reason. It works fine on Linux, and nothing bad will happen if you swap power states with no cart inserted.

I won't release a new version until it's fixed properly, or until I find out I can't fix it properly (hopefully the former), of course.

I'm also open to suggestions for improving the layout of the advanced mode audio panel. Note that it needs to be text boxes to enter values. Spinboxes aren't going to work there.
creaothceann
Seen it all
Posts: 2302
Joined: Mon Jan 03, 2005 5:04 pm
Location: Germany
Contact:

Post by creaothceann »

byuu wrote:the redesigned System menu suggested by FitzRoy sans it still saying "Load Cartridge ..." (still open to suggestions at this point, of course)
"insert game"?
vSNES | Delphi 10 BPLs
bsnes launcher with recent files list
FitzRoy
Veteran
Posts: 861
Joined: Wed Aug 04, 2004 5:43 pm
Location: Sloop

Post by FitzRoy »

There were a lot of things you could stick in there that weren't games. Test carts, interface carts, copiers...
byuu

Post by byuu »

Okay, figured out how to disable menu groups in Windows.

Regular items have no handles, so I use a static instance counter for that. Not much choice. But I was using the pMenuControl base class' disable function for both pMenuGroup and pMenuItem. Now, pMenuGroup has its own identifier, HMENU group = CreatePopupMenu();
That's the identifier that needs to be passed to EnableMenuItem().

A quick fix:

Code: Select all

void pMenuControl::enable(bool state) {
  if(self.type == Widget::MenuGroupType) {
    HMENU group = static_cast<pMenuGroup*>(this)->group;
    EnableMenuItem(parent, (unsigned)group, MF_BYCOMMAND | (state? MF_ENABLED : MF_GRAYED));
  } else {
    EnableMenuItem(parent, instance, MF_BYCOMMAND | (state ? MF_ENABLED : MF_GRAYED));
  }
}
Now, obviously, the proper fix, which I'll add to the official codebase, is to implement ::enable() in pMenuGroup and pMenuItem separately. But yeah, it's working now at least. No more turning on a system with no cart.

---

So, by suggestion of wertigon, stuff I want to see before v037 ...

Still need to get GZ and ZIP to load UTF-16 filenames on Windows. I'm not going to target fixing this for JMA for the next release, as I need to coordinate that with Nach first.

I'd like to get the custom memory mapping .pcb file format in there. It will serve as an important fall-back in case we spot any false cart detections immediately after the next release. Unlikely, but just in case.

I was looking at a recent thread where someone was asking if both xkas and IPS were "soft-patching" methods. The latter can be, but the former not so much. But that got me thinking ... wouldn't it be interesting to soft-patch an assembly file onto a game before loading?

ASM has a lot of advantages over IPS, the most notable being that you can edit it by hand. Eg stick all the variables at the top and you have a nice configuration system. It also serves as a pretty nice open-source patch format.

Might be worth adding for developers. The obvious issue is that it's a moving target. I update xkas constantly, so it's not going to be as compatible as, say, IPS or UPS.

Cheat code sort would still be nice. I can't use the column headers for sorting because I only intend to support one sort method, and I don't know how to capture column header clicks on both platforms anyway.

I'd still like to re-do the advanced-mode audio panel to look a bit nicer.

Lastly, it'd be neat if we could get some minor BS-X improvements in before the next release ... I was thinking about making a UPS patch for the BS-X BIOS that bypasses the "disabled cart" flag, rather than writing code that parses the BS-X flash cart image for games and manually re-enables them. Then it works like a real system, unless you put the UPS patch in with the BIOS.

EDIT: oh yeah, and I need to merge the "Sync to Video" setting to be the same both in fullscreen and windowed mode.
Last edited by byuu on Thu Sep 25, 2008 10:58 pm, edited 1 time in total.
Gil_Hamilton
Buzzkill Gil
Posts: 4294
Joined: Wed Jan 12, 2005 7:14 pm

Post by Gil_Hamilton »

FitzRoy wrote:There were a lot of things you could stick in there that weren't games. Test carts, interface carts, copiers...
pennies...
DOLLS (J) [!]
ZNES Developer
Posts: 215
Joined: Mon Aug 02, 2004 11:22 pm

Post by DOLLS (J) [!] »

Gil_Hamilton wrote:
FitzRoy wrote:There were a lot of things you could stick in there that weren't games. Test carts, interface carts, copiers...
penis...
FitzRoy
Veteran
Posts: 861
Joined: Wed Aug 04, 2004 5:43 pm
Location: Sloop

Post by FitzRoy »

Byuu, I'm not sure if you saw this the last time I posted about it, but the "Drivers" section of the configuration seems to have more spacing at the top than any of the other sections, which looks kind of weird. Can you see this, is it intentional?

Also, what do you think about making notes bold to differentiate the text a little more? And were you planning on adding the one I wrote up to the audio section?
byuu

Post by byuu »

the "Drivers" section of the configuration seems to have more spacing at the top than any of the other sections
Oops, yeah I missed that. I'll fix it, thanks.
Also, what do you think about making notes bold to differentiate the text a little more? And were you planning on adding the one I wrote up to the audio section?
I don't have unique font selection capabilities in hiro just yet. In the future, bold or italic would be a good idea, definitely.

Could you repeat your audio note again? Might be worded better than what I have in mind.

Also, for cart loading ... what do you think would be best? I'd like something descriptive to what it is, eg "Cartridge Port", but also at the same time, easy to understand what it does, eg "Load Cartridge", so that new users aren't confused when they're looking for a "Load" option.
henke37
Lurker
Posts: 152
Joined: Tue Apr 10, 2007 4:30 pm
Location: Sweden
Contact:

Post by henke37 »

It's called a slot when the port/reading device is inside a tight hole and you need to slide in the media.
byuu

Post by byuu »

New WIP. Quite a bit of neat stuff this time.

First, BS-X and ST BIOS detection is in. Attempting to load them will bring up the multi-cart loader window with the BIOS fields filled in. So now it doesn't matter what image the user tries to load, it'll just work.

Next, added the expansion menu per FitzRoy. You can choose between "None" and "Satellaview BS-X". I also added a new menu there, for region selection. There's "Auto-detect" (base off the cart type), "NTSC" and "PAL". Admittedly not very useful, but I figure since we aren't automatically selecting the expansion unit, we should make it possible to manually specify the SNES type. Looks like some games work in either region, eg the SNES Test Program - Electronics Test. That kind of surprised me.

I was thinking it might be best to hide expansion port + region when advanced mode is disabled, since it's something I imagine 99% of users will never need to touch.

Also, it's set up so that you can only change the settings when the power is off, or no cart is loaded. This is very much intentional! It's impossible to change the SNES console without a mod-switch while it's on, and it'd be really stupid to try hot-swapping the BS-X base unit while it's running. You can still expand the menu to see what is currently selected, unlike power. I figured there wasn't much point in seeing the power-on state with no cart loaded. It's obviously off in that case.

Speaking of which, updated hiro to support MenuGroup::disable() properly on Windows.

Fixed the minor cosmetic Y start offset on the drivers panel.

And I cleaned up the cart loading a bit more. Still need to do a bit more work on that, but it's looking pretty good so far.
FitzRoy
Veteran
Posts: 861
Joined: Wed Aug 04, 2004 5:43 pm
Location: Sloop

Post by FitzRoy »

henke37 wrote:It's called a slot when the port/reading device is inside a tight hole and you need to slide in the media.
I think port may actually be referring to anything connected outside the housing. For example, a PCI card would go in the PCI slot. A USB drive would go into the USB port. So, if that's the case, then it's Cartridge Port.
byuu wrote:Could you repeat your audio note again? Might be worded better than what I have in mind.
I have two, and the best one depends on whether there is a predictable relationship between the two. If there isn't, choose the second one.

Note: When audio and video are synced, a lower frequency adjust decreases the chance of audio crackle, but increases the chance of duplicate frames.

Note: When audio and video are synced, experiment with frequency adjust to eliminate audio crackle and minimize duplicate frames.
Also, for cart loading ... what do you think would be best? I'd like something descriptive to what it is, eg "Cartridge Port", but also at the same time, easy to understand what it does, eg "Load Cartridge", so that new users aren't confused when they're looking for a "Load" option.
Well, there really isn't much else to consider. What you're describing is this, with the second part always grayed out and checked, but changing to the name of the of loaded file sans the extension when something's loaded:

Code: Select all

Cartridge Port >     ...
                 [x] None
Because really, "Cartridge Port..." does sort of look like you're being asked to select a cartridge port. The arrow would be needed to denote something in it similar to the other ports, and show what's in there. This one would have to act like this, obviously, since these objects aren't built into the emulator, and even if they were there are thousands of valid licensed entries.
Last edited by FitzRoy on Fri Sep 26, 2008 3:32 pm, edited 1 time in total.
Verdauga Greeneyes
Regular
Posts: 347
Joined: Tue Mar 07, 2006 10:32 am
Location: The Netherlands

Post by Verdauga Greeneyes »

FitzRoy wrote:Note: When audio and video are synced, a lower frequency adjust decreases the chance of audio crackle, but increases the chance of duplicate frames.

Note: When audio and video are synced, experiment with frequency adjust to eliminate audio crackle and minimize duplicate frames.
Hmm, I'd like to note two things.
For your first note, the frequency adjust doesn't decrease the chance of audio crackle or duplicate frames, but the 'occurrence' or 'frequency' of one or the other - unless you count OS-related CPU spikes that cause audio crackle. I mean, the duplicate frames are -going- to happen, it's just a matter of how often - audio crackle is less predictable as it's up to the variable rate at which bsnes emulates audio samples, but you can still pretty much eliminate them by keeping the frequency adjust below a certain threshold, above which they happen pretty often.
For your second note, perhaps it should indicate the relationship between the two, i.e. "experiment with frequency adjust to eliminate audio crackle while minimizing duplicate frames."
FitzRoy
Veteran
Posts: 861
Joined: Wed Aug 04, 2004 5:43 pm
Location: Sloop

Post by FitzRoy »

I'm not sure I understand the problem. Isn't it actually possible to eliminate either one, just not at the same time? So why would "occurence" be correct if a setting existed that made no duplicate frames or no audio crackling occur?
Verdauga Greeneyes
Regular
Posts: 347
Joined: Tue Mar 07, 2006 10:32 am
Location: The Netherlands

Post by Verdauga Greeneyes »

FitzRoy wrote:I'm not sure I understand the problem. Isn't it actually possible to eliminate either one, just not at the same time? So why would "occurence" be correct if a setting existed that made no duplicate frames or no audio crackling occur?
I don't think it's actually possible to eliminate frame duplication altogether, though you may get close enough that it's too infrequent to notice. But even if you could, wouldn't 'no occurrences' be a valid result of minimizing the amount of occurrences? I know that's not a very good sentence, and I must admit English isn't my native language, but I think the word is valid. It was just a suggestion though, my point was that I don't like the word 'chance' here because it's a matter of the synchronization being slightly off - a frame is duplicated whenever the discrepancy becomes too big.
Gil_Hamilton
Buzzkill Gil
Posts: 4294
Joined: Wed Jan 12, 2005 7:14 pm

Post by Gil_Hamilton »

FitzRoy wrote:
henke37 wrote:It's called a slot when the port/reading device is inside a tight hole and you need to slide in the media.
I think port may actually be referring to anything connected outside the housing. For example, a PCI card would go in the PCI slot. A USB drive would go into the USB port. So, if that's the case, then it's Cartridge Port.
Thinking about it, my usage has always referred to the nature of the connector used. Any card-edge connector with any sort of length to it is a slot, and any small female connector is a port(including USB, which I know intellectually is a card-edge connector, but... ).
FitzRoy
Veteran
Posts: 861
Joined: Wed Aug 04, 2004 5:43 pm
Location: Sloop

Post by FitzRoy »

Verdauga Greeneyes wrote:I don't think it's actually possible to eliminate frame duplication altogether, though you may get close enough that it's too infrequent to notice.
You're pretty much right then. Because saying reduce occurrence and nothing more implies that there is always occurrence no matter what you do, so that's pretty accurate for dupe frames. Frankly, chance is the same thing, only implying some kind of weather-like randomness. So I concede that one as describing neither well.

Crackling, though, here we have something that can be eliminated, but when it isn't, occurs at certain frequency depending on the setting. Since this one CAN be eliminated and is annoying any time it isn't, its elimination is meaningful while its reduction is meaningless.

Note: When audio and video and synced, experiment with frequency adjust to eliminate audio crackle while minimizing duplicate video frames.

That's about as short and descriptive as it's going to get.
Gil_Hamilton wrote:Thinking about it, my usage has always referred to the nature of the connector used. Any card-edge connector with any sort of length to it is a slot, and any small female connector is a port(including USB, which I know intellectually is a card-edge connector, but... ).
I don't think we'll eve get a definitive answer to this one, but I'm leaning towards slot. Is there some kind of official computer glossary? Standard definitions seems to suggest that a port is external and deals more with peripherals while slots are internal and do more to expand upon the functions of the original hardware. Certainly, the connection we're talking about is doing more of the latter, and it's not viewable from the outside, but accessible from it.

Heh, this guy can't even seem to make up his mind in his first two references.

http://www.atarimagazines.com/startv1n3 ... eSlot.html
Verdauga Greeneyes
Regular
Posts: 347
Joined: Tue Mar 07, 2006 10:32 am
Location: The Netherlands

Post by Verdauga Greeneyes »

Hmm, I think a slot is just a hole with a certain shape that you insert something into (slot machine), whereas a port implies electronics (usb port). i.e. the SNES has a slot in that it has a hole that cartridges fit into, and it has a port at the bottom of that slot that the electrical connections of the cart fit into.

Also, FitzRoy, that version of the note looks good to me.
Edit: by the way, you could of course eliminate duplicate frames, but then you'd slip over to the other side and start skipping frames. And of course there's no reason you'd ever reach that point with bsnes, as you'd get audio crackle long before then. (well, perhaps if you have a very odd soundcard)
Last edited by Verdauga Greeneyes on Sat Sep 27, 2008 12:33 am, edited 2 times in total.
creaothceann
Seen it all
Posts: 2302
Joined: Mon Jan 03, 2005 5:04 pm
Location: Germany
Contact:

Post by creaothceann »

Isn't slot the official description?

EDIT: I think "slot" (physical POV) is used by users and "port" (logical / system POV) is used by developers.
Last edited by creaothceann on Sat Sep 27, 2008 11:13 am, edited 1 time in total.
vSNES | Delphi 10 BPLs
bsnes launcher with recent files list
FitzRoy
Veteran
Posts: 861
Joined: Wed Aug 04, 2004 5:43 pm
Location: Sloop

Post by FitzRoy »

Here's a better one.

Note: When audio and video are synced, a lower frequency adjust may eliminate audio crackle with minimal frame duplication.

Check out all the fun stuff we were missing.

http://img03.picoodle.com/img/img03/3/9 ... c3d791.gif

And the winner for most nonsenical lockout screen goes to... "From TV Animation Slam Dunk 2 - IH Yosen Kanzen Ban!!" with nothing but a bunch of basketball characters quietly dribbling about the screen. Second place goes to "Adventures of Dr. Franken" for putting in the effort to draw a (rather good) Game Boy. Third place goes to "Super Robot Taisen EX" for not spelling their company name correctly and blurting awful alarm noises.
Gil_Hamilton
Buzzkill Gil
Posts: 4294
Joined: Wed Jan 12, 2005 7:14 pm

Post by Gil_Hamilton »

FitzRoy wrote:Here's a better one.

Note: When audio and video are synced, a lower frequency adjust may eliminate audio crackle with minimal frame duplication.

Check out all the fun stuff we were missing.

http://img03.picoodle.com/img/img03/3/9 ... c3d791.gif

And the winner for most nonsenical lockout screen goes to... "From TV Animation Slam Dunk 2 - IH Yosen Kanzen Ban!!" with nothing but a bunch of basketball characters quietly dribbling about the screen. Second place goes to "Adventures of Dr. Franken" for putting in the effort to draw a (rather good) Game Boy. Third place goes to "Super Robot Taisen EX" for not spelling their company name correctly and blurting awful alarm noises.
Captain's Log:

This Game Pak is not designed for your Super-NES system.
tetsuo55
Regular
Posts: 307
Joined: Sat Mar 04, 2006 3:17 pm

Post by tetsuo55 »

byuu wrote:I'd like to get the custom memory mapping .pcb file format in there. It will serve as an important fall-back in case we spot any false cart detections immediately after the next release. Unlikely, but just in case.
Been waiting for this one :)
byuu wrote: I was looking at a recent thread where someone was asking if both xkas and IPS were "soft-patching" methods. The latter can be, but the former not so much. But that got me thinking ... wouldn't it be interesting to soft-patch an assembly file onto a game before loading?

ASM has a lot of advantages over IPS, the most notable being that you can edit it by hand. Eg stick all the variables at the top and you have a nice configuration system. It also serves as a pretty nice open-source patch format.

Might be worth adding for developers. The obvious issue is that it's a moving target. I update xkas constantly, so it's not going to be as compatible as, say, IPS or UPS.
This would be great (especially if we could apply/remove patches on the fly)
byuu wrote:Lastly, it'd be neat if we could get some minor BS-X improvements in before the next release ... I was thinking about making a UPS patch for the BS-X BIOS that bypasses the "disabled cart" flag, rather than writing code that parses the BS-X flash cart image for games and manually re-enables them. Then it works like a real system, unless you put the UPS patch in with the BIOS.
I can think of few ways this could be done:
1. The BS-X load screen has an extra entry with (disable-cart flag fix patch).
2. The BS-X load screen has a checkbox "Apply disable-cart flag fix
3. Settings could have a new entry "BS-X\Satellaview settings" there would be an option to apply the fix, with or without a path to the patch(The patch could simply be in bsnes)


byuu wrote:New WIP. Quite a bit of neat stuff this time.
The new "System" menu feels great to me. Very logical and inutitive.

One thing i really miss though is: Bsnes does not remember which cart was loaded, it would be great if you could add that. (store path in ini and auto-load on startup with power-off)
byuu wrote:I also added a new menu there, for region selection. There's "Auto-detect" (base off the cart type), "NTSC" and "PAL". Admittedly not very useful, but I figure since we aren't automatically selecting the expansion unit, we should make it possible to manually specify the SNES type. Looks like some games work in either region, eg the SNES Test Program - Electronics Test. That kind of surprised me.
Cool, i have an idea that might make this more usefull.

Could you add an (advanced) option to change auto-change the view type to pal and ntsc?
Auto-Detect (changes screen to pal or ntsc depending on the games region)
NTSC (Fixes the screen to ntsc no matter what the region)
PAL (Fixes the screen to pal no matter what the region)

When the advanced option is disable the screen stays whatever you selected in view mode.

-----------



I also have another request.

Could you add the following to the audio settings:
-Audio bit depth, 16/24/32 (with advanced dithering) (This really helps on some crappy soundcards)
-Asio output and/or kernel streaming for windows(and possibly linux/unix) (reduces latency and bypasses windows horrible kmixer)
exdeath
New Member
Posts: 7
Joined: Fri Nov 09, 2007 9:06 pm

Post by exdeath »

why not create a bios area on the configuration part of the emulator??? a place where the user can go and configure where are bios files needed by the emulator. This would make the emulator more clean.
byuu

Post by byuu »

Check out all the fun stuff we were missing.
Cool :D
I like the Nintendo one best. "This adaptor may damage your SNES!"
Riiight, sure it will.

Anyway, yeah. I'm going to make ExpPort + Region only visible in advanced mode. Default will be BS-X on + Auto-detect. The BS-X add-on won't interfere with any other games.
This would be great (especially if we could apply/remove patches on the fly)
On the fly is too complicated. Don't see a whole lot of use for it, either.
I can think of few ways this could be done:
I was going to make it transparent, like other emulators, for ease of use.
I do like the idea of making it internal with a checkbox, though.
One thing i really miss though is: Bsnes does not remember which cart was loaded, it would be great if you could add that. (store path in ini and auto-load on startup with power-off)
It would be more than just keeping the game name.
I'd need game name A, game name B, BIOS name, cart type.
It's doable, but it'll require quite a bit of code.
Could you add an (advanced) option to change auto-change the view type to pal and ntsc?
Probably, yes. I would either have to force NTSC or the last game loaded on start-up (when there's no game to auto-detect), which would be kind of jarring either way.
-Audio bit depth, 16/24/32 (with advanced dithering)
Not anytime soon. Would require lots of rewrites to all ten or so sound drivers.
-Asio output and/or kernel streaming for windows(and possibly linux/unix)
If someone writes the driver, I'll be happy to include it. I don't have the first idea how to.
why not create a bios area on the configuration part of the emulator??? a place where the user can go and configure where are bios files needed by the emulator. This would make the emulator more clean.
You really think that's a cleaner approach? I thought my idea was pretty clever and new.

With most emulators, you have to find the BIOS assignment window before your games will even start. One version of an emulator I used recently didn't even have a window for it, you had to set it in the ini file by hand first.

With bsnes, the option to assign a BIOS is right there when you load a compatible game. You only have to pick the BIOS file one time, it saves the filename to the config file. Next time, just pick the game and hit launch.

I realize it'd be possible to launch BS-X games directly with the BIOS path known; but that doesn't work for BS-X slotted carts (Same Game, etc) and Sufami Turbo games (can load up to two games.)

Not discounting your suggestion, but could you clarify on what makes it easier? Maybe we can implement those changes and make it even easier.
Locked