Nestopia's back from the dead

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
Nestopia's back from the dead
by on (#111354)
Hey boys and girls, I just wanted to let you all know I decided to resurrect Nestopia awhile ago. It's one of my personal favourite emulators, and I didn't want to see it die, so I forked it and have been making whatever improvements I can as a service to the community. Most of what I've done is related to the Linux release, but I have also done some stuff for the win32 release and added some patches from members of the community to the core emulator. There's a bit of community involvement from the libretro team as well.

Anyways, if anyone has patches or improvements, feel free to throw them my way. I'm planning to keep maintaining this code for everyone's benefit. You may have seen Windows builds on emucr from my repo, and if you're a unixy type of person, the packages in Debian, Arch, and OpenBSD are also from my repo.

Github Repo
Re: Nestopia's back from the dead
by on (#111355)
I'll be getting the .deb on my Linux Mint 64 distro as soon as I can! Sweet! :)
Re: Nestopia's back from the dead
by on (#111356)
It may take awhile to get into Ubuntu and Mint. It just got into Debian sid, so I think the next release of Ubuntu after 13.04 (probably 13.10?) will have it available. Compiling from source is the best method, though ;).
Re: Nestopia's back from the dead
by on (#111357)
Thanks for commit #a8846d338b3 :)
Re: Nestopia's back from the dead
by on (#111367)
Awesome awesome awesome. The only thing I wish were made available along with this are actual builds/binary releases for the Win32 bits. I'd build it myself (using an XP VM) but I have other things on my XP VM relating to Visual Studio 6 (yes, you read that right -- the thing from 1998) and other emulators, so this becomes a PITA to manage. :-)

If there is a developer who is helping out with that repo who does the Win32 pieces + has all the tools available for building under MSVC, providing those builds would be awesome. I am happy to test on native Windows XP as needed too.
Re: Nestopia's back from the dead
by on (#111378)
I build the Windows versions. I post them up on sourceforge: http://sourceforge.net/projects/nestopiaue/files/1.44/

But I only build releases. EmuCR builds whenever there's a commit, and those builds have all the latest features. If you're okay with using an EmuCR build, feel free to check that out, but there are some strange gui glitches they introduce somehow...
Re: Nestopia's back from the dead
by on (#111403)
As before: awesome. Totally awesome. Thank you so, so much for taking on the project and doing this. You have my support (and if somehow you had a Paypal Donate link, I'd be using that too. :-) )
Re: Nestopia's back from the dead
by on (#111406)
I can only agree! It is great that you continue working on nestopia. I will try it on linux as soon as I can :3
Re: Nestopia's back from the dead
by on (#111430)
That's very good news indeed!!

Feature request:
* Selectable Zapper/VS Zapper as inputdevice (good for homebrew-purposes!)
Re: Nestopia's back from the dead
by on (#111431)
tehcloud wrote:
But I only build releases. EmuCR builds whenever there's a commit, and those builds have all the latest features. If you're okay with using an EmuCR build, feel free to check that out, but there are some strange gui glitches they introduce somehow...


I had bad experiences with emucr in the past (virus detected in a couple of their packages), so unless they improved in the past year I would not suggest it as the main resource to test your progresses ;)
Re: Nestopia's back from the dead
by on (#112493)
The best NES emulator (after WedNESday v1.215.15125.151.785889.637.2 BETA, of course) is back!

Some questions about Nestopia;

1. What does adjust pitch do in sound settings?
2. Primary Sound Driver or other options?
3. Auto, YUV or RGB?
4. Monitor frequency?
Re: Nestopia's back from the dead
by on (#113012)
Guys, try to help me please:
Dendy emulation is incorrect in official 1.40 because something is broken since 1.38:
Quote:
v.1.38 changes:
- PPU power/reset timing and register states.
- Misc IRQ/NMI/BRK/DMA special-case behavior.

I've compiled 1.36, 1.37, 1.38, 1.39 and 1.40 versions of NEStopia and "hacked" their PAL-mode according to Dendy-timings:
Code:
fragments of NstBase.hpp (NstCpu.hpp & NstPpu.hpp under version 1.37)
// fixing PAL(RP2A07) divider to dendy CPU(UA6527P) divider
{
 RP2A03_CC = 12,
 RP2A07_CC = 15
};

// fixing timings according to dendy PPU(UA6538)
   RP2C07_VACTIVE   = 240,
   RP2C07_VSLEEP    = 51,
   RP2C07_VINT      = 20,
   RP2C07_VDUMMY    = 1,

//I've fixed PAL-Noise and PAL-DMC rates to NTSC-like in "NstApu.cpp" also


But strange glitches appear since version 1.38 and above:

- "Power Blade 2 (USA)": scrolling glitches on title movie
- "James Bond Jr. (USA)": hang on 1-st level when you fall into a pit
- "Front Line (Japan)", "Aladdin 4 (1995) (Unl)", "Aladdin 4 (1996) (Unl)" - screen glitches at 1-st level
- "Batman Returns (USA)" - black vertical strip at 1-st level /happens randomly/

Below v1.38 these glitches aren't present as well as it not present on other nes emulators at dendy-mode (punes/nintedulator/bizhawk/fceux etc)

How to fix it in nestopia undead?
Here is 1.31-1.40 source archives.
And here is dendy information.
Re: Nestopia's back from the dead
by on (#113026)
Some features might be useful to add if it doesn't already have:
  • RGB PPU mode, to make it max brightness of picture when emphasis bits are used.
  • Paste text from clipboard into Famicom keyboard.
  • Support for .NES.INI (at least partial; not everything in the file is relevant for emulation).
  • Support tape for Famicom keyboard storing using audio file and a raw file.
  • FDS loading using .QDI format (where each side is a separate file; therefore you can share disks between different games/programs that use them, or whatever).
  • Log audio register write to .VGM (currently the only expansion supported is the Sunsoft 5B, although games with no expansion audio will also work).
  • Full support of NES 2.0 including submappers.
  • Audio input using a microphone attached to the computer.
  • VS Zapper including in FourScore and Famicom 4-players adapter (since it is a class 3 device, it is compatible with both).
  • Super PakPak analog controller.
  • You can connect multiple input devices at once in different ports, for example, keyboard and mouse together.
Re: Nestopia's back from the dead
by on (#113028)
zzo38 wrote:
  • Support tape for Famicom keyboard storing using audio file and a raw file.


are there raw files available? I've been looking for them since ages, to support the real waveforms in MESS
Re: Nestopia's back from the dead
by on (#113035)
I have problem with sound pops/clicks since 1.37 is out.
1.36 and below works good on laptop and desktop.

I've tried all settings (vsync / triple buffer / hi-precision timer / custom refresh rates / audio-video memory pool, etc..) but it didn't help.

Here is buggy wave dumps:
1. Journey to Silius (U). Sound clicks on 0m:11s:980ms very often.
Image
You may see a strange "virtual DC offset" also. Maybe this is the reason for clicks.

2. Power Blade (U). Sound clicks often on area select screen.
0m:03s:144ms
0m:03s:925ms
0m:08s:400ms
Image

3. Rockman 6 (MegaMan 6) (U)
Click at 0m:04s:933ms
Image

Here is DxDiag dumps from laptop and desktop.
I've compiled native 1.40 linux overlay H) for ubuntu 10.04, and it also have sound problems.
Re: Nestopia's back from the dead
by on (#116109)
For those curious:

http://www.emucr.com/2013/07/nestopia-v145.html
Re: Nestopia's back from the dead
by on (#173250)
Very BIG thanks to FHorse. He can fix all dendy glitches.
Problem was in the part of the code added since 1.38. Vblank and NMI flags were set prior of sleep scanlines.

Here is original nestopia 1.40 with patch applied.
Also NstApu.cpp was fixed, disabled the part of code which cause audioglitches, thanks to Martin Freij, who helped me via facebook.

Patch was sent to nue developers:
https://github.com/rdanbrook/nestopia/issues/46
Re: Nestopia's back from the dead
by on (#173605)
There is an amusing bug with the most recent version of Nestopia UE, Castlevania US, either revision will fail miserably just after you enter the castle gates. You will see a glitchy background and instantly fall to your death. This does not happen with the European or Japanese cart, PlayChoice-10 or disk versions.
Re: Nestopia's back from the dead
by on (#173615)
Great Hierophant wrote:
There is an amusing bug with the most recent version of Nestopia UE, Castlevania US, either revision will fail miserably just after you enter the castle gates. You will see a glitchy background and instantly fall to your death. This does not happen with the European or Japanese cart, PlayChoice-10 or disk versions.

Can't confirm this, using Nestopia UE 1.47 (af82db9253b91a00cd1e9ef2281676ab *nestopia_1.47-win32.zip, from here), testing using the below two ROMs:

00d93c9f6b8aefb8b6c02b20147df4ec *Castlevania (U) (PRG0) [!].nes
52eb3f7e2c5fc765aa71f21c85f0770e *Castlevania (U) (PRG1) [!].nes

Make sure you don't have any "Cheats" loaded (Options -> Cheats), temporary or permanent, that don't match the specific game checksum. I've been bitten by this more than once.
Re: Nestopia's back from the dead
by on (#173616)
koitsu wrote:
Make sure you don't have any "Cheats" loaded (Options -> Cheats), temporary or permanent, that don't match the specific game checksum. I've been bitten by this more than once.

Same here.
Re: Nestopia's back from the dead
by on (#173625)
I can't confirm this too, using lastest Nestopia UE 1.48wip (build 13 june 2016) with applied dendy-patches.

Note that:
FHorse wrote:
Watching routine Ppu::Run you can easily see that the flag of VBLANK and the NMI are performed to cycles.hClock 681 (HCLOCK_VBLANK_0), 682 (HCLOCK_VBLANK_1) and 684 (HCLOCK_VBLANK_2) that is virtually one scanline after the VACTIVE (240) scanlines. This is fine for PPU_RP2C02 (NTSC) and PPU_RP2C07 (PAL) but not for PPU_DENDY that needs another 50 sleep scanlines. What I did was nothing more than adding these 50 scanlines first of the HCLOCK_VBLANK_0 that are performed only when the variable (ssleep >= 0) and this is true only in the case of PPU_DENDY.

This way I left intact the logic with which the routine work for NTSC and PAL, intervening only for Dendy mode because ssleep will always be -1 for PPU_RP2C02 and PPU_RP2C07.

I hope that I was able to explain well.
Re: Nestopia's back from the dead
by on (#173628)
koitsu wrote:
Great Hierophant wrote:
Make sure you don't have any "Cheats" loaded (Options -> Cheats), temporary or permanent, that don't match the specific game checksum. I've been bitten by this more than once.


D'oh! I had some cheats enabled, I totally forgot about that. Disabling them fixed these games. Sorry about that silly mistake.

One thing that isn't a bug, Windows Nestopia UE 1.47 will crash if I try to load The Incredible Crash Dummies or Mickey's Safari in Letterland with the iNES 2.0 header set to the Acclaim MMC3 clone.
Re: Nestopia's back from the dead
by on (#173832)
Great Hierophant wrote:
koitsu wrote:
Great Hierophant wrote:
Make sure you don't have any "Cheats" loaded (Options -> Cheats), temporary or permanent, that don't match the specific game checksum. I've been bitten by this more than once.


D'oh! I had some cheats enabled, I totally forgot about that. Disabling them fixed these games. Sorry about that silly mistake.

One thing that isn't a bug, Windows Nestopia UE 1.47 will crash if I try to load The Incredible Crash Dummies or Mickey's Safari in Letterland with the iNES 2.0 header set to the Acclaim MMC3 clone.


class NST_NO_VTABLE McAcc : public Board ---> class McAcc : public Board
or new class ,class McAcc_TxRom:public McAcc