puNES Emulator

Discuss emulation of the Nintendo Entertainment System and Famicom.

Moderator: Moderators

bunnyboy
Posts: 449
Joined: Thu Oct 27, 2005 1:44 pm
Location: CA
Contact:

Post by bunnyboy » Tue Jan 17, 2012 6:12 pm

Zepper wrote:Any reason for supporting 4 joypads, other than "emulating every NES aspect/property/device/whatever"? I seriously doubt about 4 guys playing a NES emulator in a PC.
Don't know if anyone has played them on emulators, but I have programmed/sold three 4 player carts now. I try to make Four Score support a requirement for every 8 Bit Xmas cart. There are a few other good 4 player games like Super Dodge Ball, Super Spike V'ball, and World Cup Soccer. They are all great with real people until they figure out the secret unbeatable attacks!

User avatar
Zepper
Formerly Fx3
Posts: 3190
Joined: Fri Nov 12, 2004 4:59 pm
Location: Brazil
Contact:

Post by Zepper » Tue Jan 17, 2012 6:22 pm

Unfortunately, it's a very low rate of people that uses 4 players games. Even in the emulation side, how many people are currently playing games for 4? Using a Super NES controller is something I'm unable to do it - there's nothing here about it, like a pre-made adaptor for PC or even parts for building such adaptor.

For effect of comparison, emulating the NTSC artifacts look much more interesting.

3gengames
Formerly 65024U
Posts: 2269
Joined: Sat Mar 27, 2010 12:57 pm

Post by 3gengames » Tue Jan 17, 2012 8:50 pm

Maybe on the emulation side, but saying the 4-score use on aq console is low is stretching it, I'm sure if I had a 4-score it'd be hooked up to my console from that day forward. Why NOT implement it into an emulator? It's so trivial and allows for development of a whole other ballpark of games. It's a no brainer honestly, because it's simple. But there's many projects that use 4 controllers, a hell of a lot more than back in the day already I believe, like bunny said. 3 carts from him, some sound utility I saw uses 4 controllers, I'm working on something that if we had no ability to make hardware the 4-score would be the only way to get 16 bits/controllers. It's very common today when you look at the proportion to the NES library.

User avatar
Kasumi
Posts: 1290
Joined: Wed Apr 02, 2008 2:09 pm

Post by Kasumi » Tue Jan 17, 2012 9:47 pm

This is an excellent four player simultaneous brawling game.

While I've never played with four human players, I have done three. There's also an Ice Hockey game made by the same people that I think is also four player simutaneous.

My own homebrew game will probably also have four player simultaneous modes.

But you should implement whatever you want. It's not like there aren't already emulators that support 4 players at once that I can use instead.

User avatar
FARID
Posts: 484
Joined: Wed Apr 07, 2010 1:14 am
Location: Iran
Contact:

Post by FARID » Tue Jan 17, 2012 10:08 pm

Zepper wrote:Using a Super NES controller is something I'm unable to do it - there's nothing here about it, like a pre-made adaptor for PC or even parts for building such adaptor.
Have you seen this :
4 NES and/or 4 SNES controller(s) to USB

Worthy games which support 4-Player mode :

Bikkuri Nekketsu Shin Kiroku! - Harukanaru Kin Medal (J).nes
Downtown - Nekketsu Koushin Kyoku - Soreyuke Daiundoukai (J).nes
Ike Ike! Nekketsu Hockey Bu - Subette Koronde Dai Rantou (J).nes
Kunio-kun no Nekketsu Soccer League (J) [!].nes
Nekketsu Kakutou Densetsu (J).nes
Nekketsu Koukou Dodgeball Bu (J).nes
Nekketsu! Street Basket - Ganbare Dunk Heroes (J).nes
US Championship V'Ball (J) [!].nes

All of them were made by Technos Japan Corp. Most of them have English version. Some of them have fan translation. I have translated Street Basket to english also.

FHorse
Posts: 229
Joined: Sat May 08, 2010 9:31 am

Version 0.49

Post by FHorse » Fri Jan 20, 2012 12:00 pm

Changelog:
0.49
Added emulation of Turbo A and Turbo B on Standard Controller.
The Zapper coordinates, in some circumstances, could be read wrong, fixed.

FHorse
Posts: 229
Joined: Sat May 08, 2010 9:31 am

Version 0.50

Post by FHorse » Fri Jan 27, 2012 6:38 pm

Changelog:
0.50
Implemented mappers VRC6 (24 and 26) and VRC7 (85) including their extra audio channels.
Added extra audio on the mapper Sunsoft 5B (69).

3gengames
Formerly 65024U
Posts: 2269
Joined: Sat Mar 27, 2010 12:57 pm

Post by 3gengames » Sat Jan 28, 2012 3:17 am

Gimmick time! :D

FHorse
Posts: 229
Joined: Sat May 08, 2010 9:31 am

Post by FHorse » Sat Jan 28, 2012 4:28 am

3gengames wrote:Gimmick time! :D
:) Gimmick is really a great game

FHorse
Posts: 229
Joined: Sat May 08, 2010 9:31 am

Version 0.51

Post by FHorse » Tue Feb 21, 2012 4:48 am

Changelog:
0.51
Added initial support for FM2 files (tas movies). I tested the fm2 files found at http://tasvideos.org/Movies-Verified.html and they all work perfectly. The file must be in the same directory of rom to work properly.
Added a system to display messages on screen.
Bug fixes.

FHorse
Posts: 229
Joined: Sat May 08, 2010 9:31 am

Version 0.52

Post by FHorse » Wed Mar 14, 2012 3:59 am

Changelog:
0.52
Added Dendy Emulation.
Implemented mappers 221, 225, 226, 227, 228, 229, 230, 231, 233, 234, 235.
Implemented a sort of "FCEUX Compatibility mode" and now many other FM2 works well (at least several of the most recent).
Bug Fixes.

User avatar
Eugene.S
Posts: 291
Joined: Sat Apr 18, 2009 4:36 am
Location: Russia (UTC+3)
Contact:

Post by Eugene.S » Wed Mar 14, 2012 11:40 am

Thank You!
Dendy timing emulation is good, except for freq. pitch-tables (see nintendulator src)

Sound test, listen Journey to Silius DPCM

Also nestopia src can be helpful

Code: Select all

namespace Nes
{
	namespace Core
	{
		const dword Apu::Cycles::frameClocks[3][4] =
		{
			{
				CPU_RP2A03_CC * 29830UL,
				CPU_RP2A03_CC,
				CPU_RP2A03_CC,
				CPU_RP2A03_CC * (29830UL - 2),
			},
			{
				CPU_RP2A07_CC * 33254UL,
				CPU_RP2A07_CC,
				CPU_RP2A07_CC,
				CPU_RP2A07_CC * (33254UL - 2)
			},
			{
				CPU_DENDY_CC * 29830UL,
				CPU_DENDY_CC,
				CPU_DENDY_CC,
				CPU_DENDY_CC * (29830UL - 2),
			}
		};

		const dword Apu::Cycles::oscillatorClocks[3][2][4] =
		{
			{
				{
					CPU_RP2A03_CC * (7459UL - 1),
					CPU_RP2A03_CC * 7456UL,
					CPU_RP2A03_CC * 7458UL,
					CPU_RP2A03_CC * 7458UL
				},
				{
					CPU_RP2A03_CC * 7458UL,
					CPU_RP2A03_CC * 7456UL,
					CPU_RP2A03_CC * 7458UL,
					CPU_RP2A03_CC * (7458UL + 7452)
				}
			},
			{
				{
					CPU_RP2A07_CC * (8315UL - 1),
					CPU_RP2A07_CC * 8314UL,
					CPU_RP2A07_CC * 8312UL,
					CPU_RP2A07_CC * 8314UL
				},
				{
					CPU_RP2A07_CC * 8314UL,
					CPU_RP2A07_CC * 8314UL,
					CPU_RP2A07_CC * 8312UL,
					CPU_RP2A07_CC * (8314UL + 8312)
				}
			},
			{
				{
					CPU_DENDY_CC * (7459UL - 1),
					CPU_DENDY_CC * 7456UL,
					CPU_DENDY_CC * 7458UL,
					CPU_DENDY_CC * 7458UL
				},
				{
					CPU_DENDY_CC * 7458UL,
					CPU_DENDY_CC * 7456UL,
					CPU_DENDY_CC * 7458UL,
					CPU_DENDY_CC * (7458UL + 7452)
				}
			}
		};

		const byte Apu::Channel::LengthCounter::lut[32] =
		{
			0x0A, 0xFE, 0x14, 0x02,
			0x28, 0x04, 0x50, 0x06,
			0xA0, 0x08, 0x3C, 0x0A,
			0x0E, 0x0C, 0x1A, 0x0E,
			0x0C, 0x10, 0x18, 0x12,
			0x30, 0x14, 0x60, 0x16,
			0xC0, 0x18, 0x48, 0x1A,
			0x10, 0x1C, 0x20, 0x1E
		};

		const word Apu::Noise::lut[3][16] =
		{
			{
				0x004, 0x008, 0x010, 0x020,   //RP2A03 (NTSC) Noise table
				0x040, 0x060, 0x080, 0x0A0,
				0x0CA, 0x0FE, 0x17C, 0x1FC,
				0x2FA, 0x3F8, 0x7F2, 0xFE4
			},
			{
				0x004, 0x007, 0x00E, 0x01E,   //RP2A07 (PAL) Noise table
				0x03C, 0x058, 0x076, 0x094,
				0x0BC, 0x0EC, 0x162, 0x1D8,
				0x2C4, 0x3B0, 0x762, 0xEC2
			},
			{
				0x004, 0x008, 0x010, 0x020,   //Dendy (NTSC) Noise table, same as 2A03
				0x040, 0x060, 0x080, 0x0A0,
				0x0CA, 0x0FE, 0x17C, 0x1FC,
				0x2FA, 0x3F8, 0x7F2, 0xFE4
			}
		};

		const word Apu::Dmc::lut[3][16] =
		{
			{
				0x1AC * CPU_RP2A03_CC,     //RP2A03 (NTSC) DPCM table
				0x17C * CPU_RP2A03_CC,
				0x154 * CPU_RP2A03_CC,
				0x140 * CPU_RP2A03_CC,
				0x11E * CPU_RP2A03_CC,
				0x0FE * CPU_RP2A03_CC,
				0x0E2 * CPU_RP2A03_CC,
				0x0D6 * CPU_RP2A03_CC,
				0x0BE * CPU_RP2A03_CC,
				0x0A0 * CPU_RP2A03_CC,
				0x08E * CPU_RP2A03_CC,
				0x080 * CPU_RP2A03_CC,
				0x06A * CPU_RP2A03_CC,
				0x054 * CPU_RP2A03_CC,
				0x048 * CPU_RP2A03_CC,
				0x036 * CPU_RP2A03_CC
			},
			{
				0x18E * CPU_RP2A07_CC,     //RP2A07 (PAL) DPCM table
				0x162 * CPU_RP2A07_CC,
				0x13C * CPU_RP2A07_CC,
				0x12A * CPU_RP2A07_CC,
				0x114 * CPU_RP2A07_CC,
				0x0EC * CPU_RP2A07_CC,
				0x0D2 * CPU_RP2A07_CC,
				0x0C6 * CPU_RP2A07_CC,
				0x0B0 * CPU_RP2A07_CC,
				0x094 * CPU_RP2A07_CC,
				0x084 * CPU_RP2A07_CC,
				0x076 * CPU_RP2A07_CC,
				0x062 * CPU_RP2A07_CC,
				0x04E * CPU_RP2A07_CC,
				0x042 * CPU_RP2A07_CC,
				0x032 * CPU_RP2A07_CC
			},
			{
				0x1AC * CPU_DENDY_CC,     //Dendy (NTSC) DPCM table, same as 2A03
				0x17C * CPU_DENDY_CC,
				0x154 * CPU_DENDY_CC,
				0x140 * CPU_DENDY_CC,
				0x11E * CPU_DENDY_CC,
				0x0FE * CPU_DENDY_CC,
				0x0E2 * CPU_DENDY_CC,
				0x0D6 * CPU_DENDY_CC,
				0x0BE * CPU_DENDY_CC,
				0x0A0 * CPU_DENDY_CC,
				0x08E * CPU_DENDY_CC,
				0x080 * CPU_DENDY_CC,
				0x06A * CPU_DENDY_CC,
				0x054 * CPU_DENDY_CC,
				0x048 * CPU_DENDY_CC,
				0x036 * CPU_DENDY_CC
			}
		};
[/code]
Last edited by Eugene.S on Thu Aug 16, 2012 8:49 am, edited 2 times in total.

FHorse
Posts: 229
Joined: Sat May 08, 2010 9:31 am

Version 0.53

Post by FHorse » Mon Mar 19, 2012 4:50 am

Changelog:
0.53 (massive bugfix release)
Correct frequency pitch emulation in Dandy mode.
Fixed all the bugs that were going to crash the emulator in the Windows version, now are really stable.
Correct a lots of bugs in the apu emulation and now the sound is much more cleaner and precise.
Rewrite from scratch the popping sound reducer.
Thx Eugene.S for suggestions, feedback and patience.

FHorse
Posts: 229
Joined: Sat May 08, 2010 9:31 am

Version 0.54

Post by FHorse » Mon Mar 19, 2012 7:47 am

Changelog:
0.54 (bugfix release)
I've forgotten to uncomment same code in new squares emulation that results in distorted sound. Correct.

User avatar
Zepper
Formerly Fx3
Posts: 3190
Joined: Fri Nov 12, 2004 4:59 pm
Location: Brazil
Contact:

Re: Version 0.53

Post by Zepper » Mon Mar 19, 2012 8:07 am

FHorse wrote:Rewrite from scratch the popping sound reducer.
Thx Eugene.S for suggestions, feedback and patience.
I wonder if RockNES still has pops on DMC playback...

Post Reply