Mesen - NES Emulator

Discuss emulation of the Nintendo Entertainment System and Famicom.

Moderator: Moderators

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

Re: Mesen - NES Emulator

Post by NewRisingSun »

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: 890
Joined: Sun Feb 07, 2016 6:16 pm

Re: Mesen - NES Emulator

Post by Sour »

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
Great Hierophant
Posts: 780
Joined: Tue Nov 23, 2004 9:35 pm

Re: Mesen - NES Emulator

Post by Great Hierophant »

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: 411
Joined: Wed Sep 07, 2005 9:55 am
Location: Phoenix, AZ
Contact:

Re: Mesen - NES Emulator

Post by never-obsolete »

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: 22705
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Mesen - NES Emulator

Post by tepples »

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: 411
Joined: Wed Sep 07, 2005 9:55 am
Location: Phoenix, AZ
Contact:

Re: Mesen - NES Emulator

Post by never-obsolete »

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: 22705
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Mesen - NES Emulator

Post by tepples »

Thanks. Reported as issue #513.
User avatar
Banshaku
Posts: 2417
Joined: Tue Jun 24, 2008 8:38 pm
Location: Japan
Contact:

Re: Mesen - NES Emulator

Post by Banshaku »

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: 2675
Joined: Tue May 28, 2013 5:49 am
Location: Hokkaido, Japan

Re: Mesen - NES Emulator

Post by Pokun »

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: 411
Joined: Wed Sep 07, 2005 9:55 am
Location: Phoenix, AZ
Contact:

Re: Mesen - NES Emulator

Post by never-obsolete »

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: 411
Joined: Wed Sep 07, 2005 9:55 am
Location: Phoenix, AZ
Contact:

Re: Mesen - NES Emulator

Post by never-obsolete »

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: 4201
Joined: Sun Sep 19, 2004 9:28 pm
Location: A world gone mad

Re: Mesen - NES Emulator

Post by koitsu »

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: 563
Joined: Thu Aug 13, 2015 4:40 pm
Location: Rio de Janeiro - Brazil
Contact:

Re: Mesen - NES Emulator

Post by nesrocks »

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!
https://www.patreon.com/bitinkstudios <- Support me on Patreon!
tepples
Posts: 22705
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Mesen - NES Emulator

Post by tepples »

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.)
User avatar
rainwarrior
Posts: 8731
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Mesen - NES Emulator

Post by rainwarrior »

Why is that a reason not to show the palette memory at the address that you would read or write it? It's still what you'd find at that PPU address.
nesrocks wrote: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!
There is a "palette RAM" option to view it, at least, which might even be more convenient, but I agree that I'd expect the palettes to appear in the PPU memory view, and it would more intuitively represent how that address space is organized.

I don't think there's really value in showing the "underlying" RAM. In almost all cases it's just a mirror anyway, but in the rare cases that it's not I suppose the CHR RAM view suffices?
Post Reply