Sometimes a cart will work differently on different emulators. Why is this?

NES Programming
Post Reply
puppydrum64
Posts: 34
Joined: Thu Apr 22, 2021 9:30 pm

Sometimes a cart will work differently on different emulators. Why is this?

Post by puppydrum64 » Mon May 03, 2021 2:00 am

I've been curious as to why when I run a game created with VASM, occasionally the game will act differently on Mesen than on Nestopia, even if I haven't altered the file in any way. On my VRC6 audio test cart, the sound plays as expected on Nestopia but can't be heard at all on Mesen. I think I made a mistake with the mapper so I'll show it below.

Code: Select all

	org $BFF0

	db "NES",$1a		;ID
	db $01				;Rom pages (16k each)
	db $0				;CHR-ROM pages
	db %10000010		;mmmmFTBM		mmmm = mapper no bottom 4 bits , Four screen vram layout, Trainer at &7000, Battery ram at &6000, Mirror (0=horiz, 1=vert)
	db %00010000		;mmmm--PV 		mapper (top 4 bits...  Pc10 arcade, Vs unisystem )
	db 0				;Ram pages	(this might not be set up correctly)
	db 0,0,0,0,0,0,0	;			(this might not be set up correctly)

User avatar
akuyou
Posts: 562
Joined: Mon Apr 22, 2019 3:19 am
Contact:

Re: Sometimes a cart will work differently on different emulators. Why is this?

Post by akuyou » Mon May 03, 2021 2:59 am

The emulators are all just 'simulating' the hardware of a real NES, often they have bugs or make simplistic 'simulations' of the hardware.

For example there may be a bug or limitation in the hardware itself - does the emulator author recreate the bug or limitation - for example some NES emulators allow more than 8 sprites on a line without flicker - but a real NES could not do this.

This means that a program that works fine on one emulator may not on another.

The truth (unfortunately) is the only way to be sure is to test on real hardware... When I was writing chibiakumas I did this, and found issues on the MSX that did not happen on the emulators for the reasons above.

Testing and bug fixing on real hardware is slow and difficult and expensive (as you need disk/cartridge emulators and a range of hardware out there), and I personally find it very stressful - so it's not something I'll do as part of my tutorials, I've said before that I won't consider it unless my Youtube channel earns enough money to be a full time career (Which I don't ever expect to happen), because it's not something I'm willing to do a part of a hobby
Chibi Akuma(s) Comedy-Horror 8-bit Bullet Hell shooter! // 「チビ悪魔」可笑しいゴシックSTG ! // Work in Progress: ChibiAliens

Interested in CPU's :Z80,6502,68000,6809,ARM,8086,RISC-V
Learning: 65816,ARM,8086,6809

puppydrum64
Posts: 34
Joined: Thu Apr 22, 2021 9:30 pm

Re: Sometimes a cart will work differently on different emulators. Why is this?

Post by puppydrum64 » Sun May 16, 2021 5:33 pm

That's fair enough. I know a guy who can help me out with real hardware testing. Another thing I've learned is that emulators and assemblers are all different. Some may pad empty space with #$FF and others with zeroes. In addition a lot of it had to do with the assembler I'm using and what I'm trying to do with it. VASM is great for general purpose 6502, but for what I was trying to use it for it wasn't quite what I needed. The game I'm trying to make is a Konami VRC6-based Famicom cart which uses multiple CHR-ROM banks, and I had trouble getting the header to work with VASM.

Post Reply

Return to “Nintendo Entertainment System / Famicom Assembly Programming”