Vs. DualSystem

Discuss emulation of the Nintendo Entertainment System and Famicom.

Moderator: Moderators

User avatar
zeroone
Posts: 939
Joined: Mon Dec 29, 2014 1:46 pm
Location: New York, NY
Contact:

Re: Vs. DualSystem

Post by zeroone »

Memblers wrote:So far it sounds like VS Wrecking Crew the only game that uses the battery for something interesting (not coin counting alone).
Here are the results (from most interesting to worst):

VS. Wrecking Crew -- High score table is saved

VS. Balloon Fight / VS. Ice Climber (Dual) -- Coin slot distribution saved | High score table is not saved

VS. Baseball / VS. Tennis -- Provides battery tester | Saves nothing (doesn't even provide high score table)

VS. Raid on Bungeling Bay / VS. Mahjong -- Saves nothing

If you want to get pedantic, all VS games have battery-backed RAM. The list above reveals how that feature was utilized. In the cart DB in my emulator, I'm going to mark the ones that do something with with the battery as having NVRAM.

@NewRisingSun As the keeper of the NES 2.0 ROMs, I'll leave the header bit choices up to you.
lidnariq
Posts: 11430
Joined: Sun Apr 13, 2008 11:12 am

Re: Vs. DualSystem

Post by lidnariq »

zeroone wrote:If you want to get pedantic, all VS games have battery-backed RAM.
I mean, sorta. Arcades aren't like cartridges. Most MDS games were distributed as packs of discrete ROMs and a manual, and the manual could have said something like "insert batteries to retain high score table".

It's not like Family BASIC where the data and hardware are coupled and only exist in one form, with a user-serviceable battery holder where it's reasonable to assume that the user would have always added those batteries.
User avatar
zeroone
Posts: 939
Joined: Mon Dec 29, 2014 1:46 pm
Location: New York, NY
Contact:

Re: Vs. DualSystem

Post by zeroone »

On a slightly different topic, other than frequenters of this forum, no one is going to have the ROMs to play the VS. DualSystem. But someone mentioned that the ROMs actually exists in the GoodNES set, but they are split across multiple files. Is it plausible to construct a table in which an emulator could seek out all the pieces and run this stuff, if you direct it to a GoodNES zip file? Alternatively, are the MAME files standard enough and available enough to use as an alternate source? Are there any plans to seed warez sites with the NES 2.0 files (maybe that should be answered privately)?
lidnariq
Posts: 11430
Joined: Sun Apr 13, 2008 11:12 am

Re: Vs. DualSystem

Post by lidnariq »

zeroone wrote:Is it plausible to construct a table in which an emulator could seek out all the pieces and run this stuff, if you direct it to a GoodNES zip file?
I'm not entirely certain there's a canonical packet for the redistributed copies of the ROMs referred to by Cowering's GoodTools. "GoodMerged" sets are a thing, most often 7z of each individual group. It might be best off just saving filenames? e.g. "Balloon Fight (VS) [!].nes" and "Balloon Fight (VS) (Player 2 Mode).nes"
Alternatively, are the MAME files standard enough
Absolutely. Those have canonical contents and hashes.

(edit: to be specific, for the mapper 99 games, the filenames inside have canonical forms, where the extension specifies exactly at which CPU/PPU memory address each of the up-to-twelve ROMs are mapped)
Last edited by lidnariq on Thu Jan 31, 2019 10:23 pm, edited 1 time in total.
NewRisingSun
Posts: 1510
Joined: Thu May 19, 2005 11:30 am

Re: Vs. DualSystem

Post by NewRisingSun »

You could direct people to my little batch file that converts MAME sets to canonical NES 2.0 files (well, except now for the battery bit), or include them with your emulator.
User avatar
zeroone
Posts: 939
Joined: Mon Dec 29, 2014 1:46 pm
Location: New York, NY
Contact:

Re: Vs. DualSystem

Post by zeroone »

NewRisingSun wrote:You could direct people to my little batch file that converts MAME sets to canonical NES 2.0 files (well, except now for the battery bit), or include them with your emulator.
With that batch file as a template and the set of hdr files, I was able to get my emulator to load MAME archives. That is, if you open an archive file that contains the complete MAME file set representing a VS game, it will assemble the pieces together in memory and collectively load it as a virtual NES 2.0 file. But, for space-saving reasons, MAME archives are organized using a parent-child scheme; game variant archives only contain modified ROM files, and MAME expects the original archive and the variant archive to coexist on the same drive. I didn't add that extra loading complexity. So, at least for now, the VS variants won't load, unless of course you assembled your own archive containing all the files.
lidnariq wrote:I'm not entirely certain there's a canonical packet for the redistributed copies of the ROMs referred to by Cowering's GoodTools. "GoodMerged" sets are a thing, most often 7z of each individual group. It might be best off just saving filenames? e.g. "Balloon Fight (VS) [!].nes" and "Balloon Fight (VS) (Player 2 Mode).nes"
I'll examine if it's possible to load in multiple files like that if they are present within a common archive. I believe this is really an important feature because most people won't think of trying the MAME archives. And if they open one of those files, they'll just assume that the emulator is faulty.
User avatar
zeroone
Posts: 939
Joined: Mon Dec 29, 2014 1:46 pm
Location: New York, NY
Contact:

Re: Vs. DualSystem

Post by zeroone »

I compared a few GoodNES sets and they all had these files:

Balloon Fight.7z <Balloon Fight (VS) (Player 2 Mode) [b1].nes>
Balloon Fight.7z <Balloon Fight (VS) [!].nes>

Baseball.7z <Baseball (VS) (Player 1 Mode) [b1].nes>
Baseball.7z <Baseball (VS) (Player 1 Mode) [b2].nes>
Baseball.7z <Baseball (VS) (Player 1 Mode) [b3].nes>
Baseball.7z <Baseball (VS) (Player 2 Mode) [b1].nes>
Baseball.7z <Baseball (VS) (Player 2 Mode) [b2].nes>
Baseball.7z <Baseball (VS) (Player 2 Mode) [b3].nes>
Baseball.7z <Baseball (VS) [b1].nes>

Ice Climber.7z <Ice Climber (VS) (Player 1 Mode) [b1].nes>
Ice Climber.7z <Ice Climber (VS) (Player 2 Mode) [b1].nes>

Mahjong.7z <Mahjong (VS) (Player 1 Mode) [b1].nes>
Mahjong.7z <Mahjong (VS) (Player 2 Mode) [b1].nes>
Mahjong.7z <Mahjong (VS) [!].nes>
Mahjong.7z <Mahjong (VS) [a1].nes>

Tennis.7z <Tennis (VS) (Player 2 Mode) [b1].nes>
Tennis.7z <Tennis (VS) [!].nes>
Tennis.7z <Tennis (VS) [o1].nes>

Wrecking Crew.7z <Wrecking Crew (VS) (Player 1 Mode) [b1].nes>
Wrecking Crew.7z <Wrecking Crew (VS) (Player 2 Mode) [b1].nes>
Wrecking Crew.7z <Wrecking Crew (VS) [!].nes>
Wrecking Crew.7z <Wrecking Crew (VS) [hM01].nes>

The only VS. DualSystem game missing from that list is Raid on Bungeling Bay. And I'm still not sure if it really is possible to combine those files to play them.

As for other ROM sources, the No-Intro sets appear highly sanitized. Each archive contains only 1 NES file. And the VS games are not among them. Those games may be treated as MAME-only.

I found other ROM collections and they're also missing the VS games.

In other words, even if I support combining the files listed above, the trick will only work for GoodNES.
User avatar
zeroone
Posts: 939
Joined: Mon Dec 29, 2014 1:46 pm
Location: New York, NY
Contact:

Re: Vs. DualSystem

Post by zeroone »

I implemented the GoodNES trick discussed above and it works fine. Aside from Raid on Bungeling Bay, the VS. DualSystem games can be loaded from the GoodNES set.

This means that there is 3 valid sources of VS. DualSystem ROMs: NES 2.0 files, MAME files and GoodNES files.
User avatar
Zepper
Formerly Fx3
Posts: 3262
Joined: Fri Nov 12, 2004 4:59 pm
Location: Brazil
Contact:

Re: Vs. DualSystem

Post by Zepper »

zeroone wrote:This means that there is 3 valid sources of VS. DualSystem ROMs: NES 2.0 files, MAME files and GoodNES files.
You should give the option to convert from one ROM set to another.
User avatar
zeroone
Posts: 939
Joined: Mon Dec 29, 2014 1:46 pm
Location: New York, NY
Contact:

Re: Vs. DualSystem

Post by zeroone »

Zepper wrote:You should give the option to convert from one ROM set to another.
I'm considering adding that feature. However, unlike NewRisingSun's script, the aforementioned MAME parent-child archive file mechanism would prevent conversion of the variants. NewRisingSun's script works because it acts on the full universe of MAME VS. ROMs as opposed to individual archives. Aside from being incomplete in that regard, there are other things that could be converted, e.g. UNIF to NES 2.0.
User avatar
zeroone
Posts: 939
Joined: Mon Dec 29, 2014 1:46 pm
Location: New York, NY
Contact:

Re: Vs. DualSystem

Post by zeroone »

zeroone wrote: Here are the results (from most interesting to worst):

VS. Wrecking Crew -- High score table is saved

VS. Balloon Fight / VS. Ice Climber (Dual) -- Coin slot distribution saved | High score table is not saved

VS. Baseball / VS. Tennis -- Provides battery tester | Saves nothing (doesn't even provide high score table)

VS. Raid on Bungeling Bay / VS. Mahjong -- Saves nothing
One other minor discovery: If you power cycle VS. Wrecking Crew, your current game will be lost, but you don't lose any remaining credits. In fact, if you insert coins and power cycle before hitting a start button, the machine resumes exactly where it left off, with all your credits intact. None of the other VS. DualSystem games retain credits between power cycles.
User avatar
zeroone
Posts: 939
Joined: Mon Dec 29, 2014 1:46 pm
Location: New York, NY
Contact:

Re: Vs. DualSystem

Post by zeroone »

Regarding the VS. System schematic, I see that the battery in the upper-left is in parallel with power. And the battery and power are protected with diodes. I assume this means that when the cabinet is powered by the mains, the battery is idle and its not losing energy. However, to the very right of that are a few resistors and a transistor. Is that circuit part of the switch-between-power-and-battery mechanism?
lidnariq
Posts: 11430
Joined: Sun Apr 13, 2008 11:12 am

Re: Vs. DualSystem

Post by lidnariq »

Yes.

In A1: D6, W03B ¹
D8, W03B ¹
R121, 100k ²
R77, 3.3k ³
R76, 12k ³
R75, 10k ³
unlabeled NPN transistor ³

In A2: R119, 680Ω ²
D9, 2A953 ²

In C2: LS157 ²

In F1: R3, 10KΩ ³
C3, 10µF ³
R4, 27 ³
PST518A, brownout detection IC ³

In F 1/2: retriggerable one-shot for reset detection ⁴

In G 1/2: retriggerable one-shot for watchdog ⁵

¹ - the actual thing that allows whichever of battery, and +5V, are higher to power the shared RAM
² - diode-OR logic between the multiplexed /SharedRAMCE and brownout signal
³ - the brownout detection circuit, enabling shared RAM as long as the +5V line is high enough
⁴ - ultimately what resets the CPUs, PPUs, and coin counter latch, for roughly 1/3 second
⁵ - ultimately what requires that the secondary CPU read from $4017 every second
Post Reply