Mesen - NES Emulator
Moderator: Moderators
Re: Mesen - NES Emulator
Why do you think that's a problem in the Nametable viewer?
You see the same thing in FCEUX's nametable viewer.
You see the same thing in FCEUX's nametable viewer.
Re: Mesen - NES Emulator
Definitely not a bug; game is using some per-scanline/at-runtime PPU trickery that cannot be reflected in the nametable directly.
Re: Mesen - NES Emulator
Like koitsu & lidnariq said, this isn't a bug.
The game probably switches CHR banks in the middle of screen, but the nametable viewer can only display the nametable using whatever CHR banks are currently in use. To see the top portion of the screen correctly, you'll need to change the scanline value at the bottom of the ppu viewer window - this defaults to 241, but try setting it to 40-50 and you should be able to see the top portion (which will cause the bottom part to look incorrect)
The game probably switches CHR banks in the middle of screen, but the nametable viewer can only display the nametable using whatever CHR banks are currently in use. To see the top portion of the screen correctly, you'll need to change the scanline value at the bottom of the ppu viewer window - this defaults to 241, but try setting it to 40-50 and you should be able to see the top portion (which will cause the bottom part to look incorrect)
Re: Mesen - NES Emulator
Thanks, I'll try that.
Re: Mesen - NES Emulator
PPU IRQs, much like the scorebar in SMB3.koitsu wrote:Definitely not a bug; game is using some per-scanline/at-runtime PPU trickery that cannot be reflected in the nametable directly.
Re: Mesen - NES Emulator
Pedantically, the Bandai game in the screen shot is using an M2-timed IRQ.
-
- Posts: 1318
- Joined: Thu Apr 23, 2009 11:21 pm
- Location: cypress, texas
Re: Mesen - NES Emulator
Sour, something I don't understand about your Tile Updates in Mesen's Nametable Viewer is: why does 8bit row 24 and row 25 never become red? The full screen always changes appropriately, but even when running at [Emulation Speed] 1%, rows 24 and 25 are never highlighted red.
Our game now draws the background horizontally a 32bit tall row during each vblank, while each screen is being drawn. So an 8th of screen per vblank. Maybe this info will somehow help?
oh, instead of highlighting rows 24 and 25, rows 28 and 29 are highlighted. Which should only happen the next frame when, afterward but still in vblank, the screen is colored.
I'm sorry if this becomes another waste of your time and space.
Our game now draws the background horizontally a 32bit tall row during each vblank, while each screen is being drawn. So an 8th of screen per vblank. Maybe this info will somehow help?
oh, instead of highlighting rows 24 and 25, rows 28 and 29 are highlighted. Which should only happen the next frame when, afterward but still in vblank, the screen is colored.
I'm sorry if this becomes another waste of your time and space.
Re: Mesen - NES Emulator
It's a bit hard to know with the information you've given. As far as I can tell, any of the rows can get highlighted on my end.
Do the rows physically change in the PPU viewer but don't show any highlight?
Make sure you haven't enabled the "ignore writes that do not alter data" option and try setting the window to refresh at 60fps instead of the default 30, just in case (but this shouldn't matter if you're already running the emulation at a slow speed)
Do the rows physically change in the PPU viewer but don't show any highlight?
Make sure you haven't enabled the "ignore writes that do not alter data" option and try setting the window to refresh at 60fps instead of the default 30, just in case (but this shouldn't matter if you're already running the emulation at a slow speed)
Re: Mesen - NES Emulator
Another problem when using the keyboard. The Alt key is conveniently used as the Famicom's GRPH key by default, but when pressing Alt an emulator menu option is selected. This makes using the GRPH key inconvenient, especially as it's used as a modifier key and pressing Alt + another key may trigger a menu option in the emulator interface. Is there a way to disable this behaviour of the Alt key?
If you want to test this quickly, run Family BASIC V3, press the KANA key to enter kana mode and then press the "A" key which should normally type a "サ" and a "ザ" if the GRPH key is held.
Finally I have a feature request. Nestopia and some other emulators like OpenMSX has a paste macro for automatically typing characters in the clipboard into the emulated machine. In Nestopia you press F12 (or click the menu option) to "paste" the text into the emulated Famicom. In OpenMSX there is a text box in the emulator interface that characters can be typed or pasted into and then be automatically typed on the emulated MSX with a button click. Both approaches works quite well, although I like the OpenMSX approach more since you can see what text you paste and easily make any edits before you start the typing macro. One small annoyance in Nestopia is that it doesn't seem to recognize katakana characters in the clipboard (or at least I don't know how to get it to work using UTF-8), meaning programs using katakana strings will have empty strings and must be modified manually in Family BASIC (I guess this would require to keep track on the kana mode and use the GRPH key for dakuten and handakuten characters). Also although Family BASIC doesn't have lower case letters, keyboard Famiclone programs and pirate versions of Family BASIC do using the SHIFT key, so since it already supports Subor Famiclones, case sensitivity might also be a consideration.
This is the final feature that forces me to keep using Nestopia for Family BASIC stuff, and it's a great feature I'd like to see on Mesen. It's a great way to quickly test a Family BASIC program typed on a computer without having to type it out again. Although I have Family BASIC and keyboard I more often develop programs on my computer and paste them in Nestopia. My computer have better tools and I can save programs on it without having to use tapes, this speeds up work greatly (once a cool program is done I might type it out on my real hardware though and save it on tape though).
If you want to test this quickly, run Family BASIC V3, press the KANA key to enter kana mode and then press the "A" key which should normally type a "サ" and a "ザ" if the GRPH key is held.
Finally I have a feature request. Nestopia and some other emulators like OpenMSX has a paste macro for automatically typing characters in the clipboard into the emulated machine. In Nestopia you press F12 (or click the menu option) to "paste" the text into the emulated Famicom. In OpenMSX there is a text box in the emulator interface that characters can be typed or pasted into and then be automatically typed on the emulated MSX with a button click. Both approaches works quite well, although I like the OpenMSX approach more since you can see what text you paste and easily make any edits before you start the typing macro. One small annoyance in Nestopia is that it doesn't seem to recognize katakana characters in the clipboard (or at least I don't know how to get it to work using UTF-8), meaning programs using katakana strings will have empty strings and must be modified manually in Family BASIC (I guess this would require to keep track on the kana mode and use the GRPH key for dakuten and handakuten characters). Also although Family BASIC doesn't have lower case letters, keyboard Famiclone programs and pirate versions of Family BASIC do using the SHIFT key, so since it already supports Subor Famiclones, case sensitivity might also be a consideration.
This is the final feature that forces me to keep using Nestopia for Family BASIC stuff, and it's a great feature I'd like to see on Mesen. It's a great way to quickly test a Family BASIC program typed on a computer without having to type it out again. Although I have Family BASIC and keyboard I more often develop programs on my computer and paste them in Nestopia. My computer have better tools and I can save programs on it without having to use tapes, this speeds up work greatly (once a cool program is done I might type it out on my real hardware though and save it on tape though).
- rainwarrior
- Posts: 8732
- Joined: Sun Jan 22, 2012 12:03 pm
- Location: Canada
- Contact:
Re: Mesen - NES Emulator
Feature request: display of "cycles since last resume"
This is one thing that I keep going back to FCEUX for. It's very useful for verifying cycle timed loops when there's branches involved. E.g. for sample playback I could breakpoint on $4011 and then resume 100 times in a row watching that counter to make sure it's the expected number of cycles each time.
Mesen seems to have an editable cycles field, which is OK if you want to time something just once, but not very useful for repetition like that, which is usually what I need when I'm writing cycle timed code. A simple way to do this might be an option/checkbox to reset that field to 0 automatically on every resume?
This is one thing that I keep going back to FCEUX for. It's very useful for verifying cycle timed loops when there's branches involved. E.g. for sample playback I could breakpoint on $4011 and then resume 100 times in a row watching that counter to make sure it's the expected number of cycles each time.
Mesen seems to have an editable cycles field, which is OK if you want to time something just once, but not very useful for repetition like that, which is usually what I need when I'm writing cycle timed code. A simple way to do this might be an option/checkbox to reset that field to 0 automatically on every resume?
Re: Mesen - NES Emulator
Probably not at the moment - I should be able to disable the behavior whenever "keyboard mode" is enabled though. I'll add it to the list and try to take a look soon.Pokun wrote:Is there a way to disable this behaviour of the Alt key?
RE: Pasting, it's been on my list of things to do forever, just never got around to it. In one release I implemented ~15 peripherals and it took a month to get it all done - at that point I was just tired and needed it to end, so paste ability ended up being cut :p I'll try to take a look and see how simple it would be to implement - can't imagine it would be too hard.
The debugger window does display the number of cycles since the previous break at the bottom right in the status bar - that sounds like what you're asking for, but I might be misunderstanding?rainwarrior wrote:This is one thing that I keep going back to FCEUX for. It's very useful for verifying cycle timed loops when there's branches involved. E.g. for sample playback I could breakpoint on $4011 and then resume 100 times in a row watching that counter to make sure it's the expected number of cycles each time.
- rainwarrior
- Posts: 8732
- Joined: Sun Jan 22, 2012 12:03 pm
- Location: Canada
- Contact:
Re: Mesen - NES Emulator
Ah, that does it! Awesome! No I just never saw it down there.Sour wrote:The debugger window does display the number of cycles since the previous break at the bottom right in the status bar - that sounds like what you're asking for, but I might be misunderstanding?
Re: Mesen - NES Emulator
Thanks, I was worried it couldn't be fixed so easily.Sour wrote:Probably not at the moment - I should be able to disable the behavior whenever "keyboard mode" is enabled though. I'll add it to the list and try to take a look soon.Pokun wrote:Is there a way to disable this behaviour of the Alt key?
Good to hear that you were planning this already. I'll eagerly be waiting for this feature.Sour wrote:RE: Pasting, it's been on my list of things to do forever, just never got around to it. In one release I implemented ~15 peripherals and it took a month to get it all done - at that point I was just tired and needed it to end, so paste ability ended up being cut :p I'll try to take a look and see how simple it would be to implement - can't imagine it would be too hard.
BTW, while I mentioned case sensitivity being a good idea, in the case of Family BASIC (except for the Chinese/Russian hacked versions) it may be a good idea to be able to turn case sensitivity off since it can't type letters at all if SHIFT is pressed.
-
- Posts: 1318
- Joined: Thu Apr 23, 2009 11:21 pm
- Location: cypress, texas
Re: Mesen - NES Emulator
Sour, thank you for your response, I'm not sure if that was fixed after following your advise. Just checked and currently both the Ignore writes that do not alter data box is unchecked and the nametable viewer is refreshing now at 60hz. Thank you for your help too.
Another problem, for me, I've found is that after creating "labels" without labels, but just filling out the Comment: box, after pressing F2, destroys Mesen after a while. This has happened twice. Eventually the .mlb file size increases dramaticly (like from 9kb to something like 32mb) and this causes the debugger to load extremely slow and resets to take extremely long.
The 9kb and 32mb .mlb files are entirely the same, except that each line that appears like: P:3D788::RLE loop begins\n(sets and uses carry) or P:3D78F::\neven (notice the two colons beside each other due to missing label) is repeated and repeated and repeated many many many times.
To restore Mesen's speed both times I've had to delete all-1 of each of those :: lines and then load that updated .mlb file. Currently I've created 4 comment only "labels".
Comment only "labels" were never planned? For me they help the debugging process...
p.s. I do not use fasm to create mlb files... rather I just keep editing the mlb and cdl files (with and without Mesen's help) manually. Maybe that causes this problem?
Another problem, for me, I've found is that after creating "labels" without labels, but just filling out the Comment: box, after pressing F2, destroys Mesen after a while. This has happened twice. Eventually the .mlb file size increases dramaticly (like from 9kb to something like 32mb) and this causes the debugger to load extremely slow and resets to take extremely long.
The 9kb and 32mb .mlb files are entirely the same, except that each line that appears like: P:3D788::RLE loop begins\n(sets and uses carry) or P:3D78F::\neven (notice the two colons beside each other due to missing label) is repeated and repeated and repeated many many many times.
To restore Mesen's speed both times I've had to delete all-1 of each of those :: lines and then load that updated .mlb file. Currently I've created 4 comment only "labels".
Comment only "labels" were never planned? For me they help the debugging process...
p.s. I do not use fasm to create mlb files... rather I just keep editing the mlb and cdl files (with and without Mesen's help) manually. Maybe that causes this problem?
Re: Mesen - NES Emulator
I thought I had fixed the issue with comments endlessly repeating themselves, but it looks like it was only fixed it in Mesen-S and not Mesen. I'll try to commit the fix for it over the weekend.