Mesen - NES Emulator

Discuss emulation of the Nintendo Entertainment System and Famicom.

Moderator: Moderators

NewRisingSun
Posts: 1123
Joined: Thu May 19, 2005 11:30 am

Re: Mesen - NES Emulator

Post by NewRisingSun » Wed Sep 26, 2018 8:34 am

Yes, most NES ROM images were headered a long time ago, when mappers 153, 157 and 159 had not yet been assigned. I hope to soon be ready to release my NES 2.0 header-adjusting utility, which should take care of that problem.

Sour
Posts: 755
Joined: Sun Feb 07, 2016 6:16 pm

Re: Mesen - NES Emulator

Post by Sour » Wed Sep 26, 2018 7:28 pm

Like I mentioned a few days ago, I'll be away from home starting tomorrow until early December, so I won't be able to make any fixes/changes until I get back (and will probably end up taking a few days to reply to any message I get here). So hopefully nothing goes horribly wrong during that time! ...if it does, you're on your own :p

yaros
Posts: 145
Joined: Tue Aug 28, 2018 8:54 am
Location: Edmonton, Canada

Re: Mesen - NES Emulator

Post by yaros » Fri Sep 28, 2018 2:11 pm

Found a bug with label assignment. Not urgent, but I may forget to report later. Have a great trip!

Example code.

Code: Select all

LDA $10 ; mouse click cursor here
PHA
LDA $20
PHA
1. I click F2, window for address $10 opens, type the label, click Enter to save.
2. Use arrows Down,Down to go to next address
3. Click F2 - window for address $10 opens (should be $20)

Great Hierophant
Posts: 748
Joined: Tue Nov 23, 2004 9:35 pm

Re: Mesen - NES Emulator

Post by Great Hierophant » Tue Oct 02, 2018 9:10 pm

A few issues with the database :

Olympus no Tatakai: Ai no Densetsu - Database claims this game has W-RAM, but it's U.S. counterpart, Battle of Olympus, does not. Both versions write to W-RAM after starting a new game or continuing an old game, but they do not read from it.

Business Wars: Database claims this game has battery backed W-RAM, but the game uses a password function to Continue. W-RAM should be the right value.

Dark Lord: Database claims this game has W-RAM, but this game is an RPG and according to a walkthrough I read, it uses a non-password save system. Battery backed W-RAM should be the right value.

Nestopia UE's recent v1.49 release has the same issues plus it only gives 8K to Dezaemon, which has 32K.

User avatar
never-obsolete
Posts: 372
Joined: Wed Sep 07, 2005 9:55 am
Location: Phoenix, AZ

Re: Mesen - NES Emulator

Post by never-obsolete » Fri Oct 05, 2018 6:22 am

Found an issue with the debugger. Here's an example:

Code: Select all

                      lda var
                      beq _is_zero

_is_not_zero:         lda array, X
                      .db $2C

_is_zero:             lda #$FF
                      sta v0
                      rts
The first time it ran, 'var' was non-zero, so it went through the array access path (lda, bit, sta, rts). Later on, 'var' was zero, so it went through the constant access path (lda, sta, rts). While I was stepping through, the debugger branched to the line "BIT $FFA9", but executed "LDA #$FF".
. That's just like, your opinion, man .

tepples
Posts: 21841
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Mesen - NES Emulator

Post by tepples » Fri Oct 05, 2018 6:38 am

When you jump into the middle of an instruction, what do you expect the debugger to display, so that I can translate this into a proper issue for Sour to fix once back from vacation?

User avatar
never-obsolete
Posts: 372
Joined: Wed Sep 07, 2005 9:55 am
Location: Phoenix, AZ

Re: Mesen - NES Emulator

Post by never-obsolete » Fri Oct 05, 2018 1:46 pm

I would show whatever valid instruction the PC points to. In this example, LDA #$FF.

The debugger was highlighted on line $FE66, but the actual value of the PC was $FE67.
. That's just like, your opinion, man .

tepples
Posts: 21841
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Mesen - NES Emulator

Post by tepples » Fri Oct 05, 2018 2:58 pm

Thanks. Reported as issue #513.

User avatar
Banshaku
Posts: 2329
Joined: Tue Jun 24, 2008 8:38 pm
Location: Fukuoka, Japan
Contact:

Re: Mesen - NES Emulator

Post by Banshaku » Fri Oct 05, 2018 9:28 pm

More or less a behavior with all emulator is something we found recently and affect only people that develop software. If by accident you define a chr a size that is not a power of 2, the emulator will run them well but it will fail on flash cart like the power pak when run.

Since flash cart are more common these days and so is homebrew, it would be a nice option to have some kind of warning to let you know that your rom is not valid in size. Is there such an option in mesen? If so, I want to activate it ^^;;;

Pokun
Posts: 1323
Joined: Tue May 28, 2013 5:49 am
Location: Hokkaido, Japan

Re: Mesen - NES Emulator

Post by Pokun » Sun Oct 07, 2018 9:19 pm

Yeah some emulators like BGB (Game Boy emulator) have something like that I think. It lets you know things like if the internal header or CRC is invalid and also whether the game would run on real hardware or not due to the above problem.

User avatar
never-obsolete
Posts: 372
Joined: Wed Sep 07, 2005 9:55 am
Location: Phoenix, AZ

Re: Mesen - NES Emulator

Post by never-obsolete » Fri Oct 19, 2018 6:38 am

On the Nametable Viewer screen, it would be nice to have an additional option for "Highlight Tile Updates" that would print numbers over the tiles to show the order in which those tiles were written to vram.

Also, is the visual cue different if a tile was written to more than once in a frame?
. That's just like, your opinion, man .

User avatar
never-obsolete
Posts: 372
Joined: Wed Sep 07, 2005 9:55 am
Location: Phoenix, AZ

Re: Mesen - NES Emulator

Post by never-obsolete » Sun Nov 04, 2018 11:07 am

Another cosmetic issue with the debugger. This time with self-modifying code in ram:

Code: Select all

					   ldy __center_y_pos
					   dey
					   dey
__tblptrlo_r0:    lda SELFMODIFY_WT_PTRTBL, Y
					   sta __data_ptr
__tblptrhi_r0:    lda SELFMODIFY_WT_PTRTBL, Y
					   sta __data_ptr + 1
The LSBs of the LDA ABS,Y instructions are modified to point to different split msb/lsb arrays as needed. The debugger does not update the display to reflect the changes.
. That's just like, your opinion, man .

User avatar
koitsu
Posts: 4216
Joined: Sun Sep 19, 2004 9:28 pm
Location: A world gone mad

Re: Mesen - NES Emulator

Post by koitsu » Sun Nov 04, 2018 1:10 pm

I have a 5KByte text file describing several reproducible bugs and feature requests, which I'll be posting once Sour returns from his vacation. It's all stuff that's pretty minor, although some are annoying/weird (like a problem stepping through certain RMW instructions). No crashes though! :)

User avatar
nesrocks
Posts: 441
Joined: Thu Aug 13, 2015 4:40 pm
Location: Rio de Janeiro - Brazil
Contact:

Re: Mesen - NES Emulator

Post by nesrocks » Thu Nov 22, 2018 11:55 am

Hi. When using the PPU Memory viewer tool, is there a reason it doesn't show the palette values at the end? Starting at $3F00. Fceux shows it, so I was wondering the reason for the inconsistency. Thanks!
https://twitter.com/bitinkstudios <- Follow me on twitter! Thanks!

tepples
Posts: 21841
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Mesen - NES Emulator

Post by tepples » Thu Nov 22, 2018 12:47 pm

That's because the palette is stored not in video memory but instead in a separate area of memory within the PPU chip that happens to be overlaid on $3F00-$3FFF using special case logic. Palette reads and writes don't actually go through the PPU's video memory bus.

(The actual behavior involves the 1-byte video memory read delay, and my explanation of it may confuse beginners.)

Post Reply