===============================================
VS Unisystem information version 1.0
Started on July 9th 1999 (fx3rnes@hotmail.com)
Last update, June, 27th 2000 -= Fx3 =-
===============================================

Warning!

- This document brings NES VS Unisystem information. Most of this information
is ok. I cannot be reponsible by your actions. Use at your own risk.

* INDEX *

1. ROM file format description
2. Registers
3. VS Mappers description
4. DIP switches 
5. Palettes
6. Game bootup

===============================================

1. ROM file format description
------------------------------

Games can be found in both .NES and original arcade formats (split), which
generally consists of PRGs/CHRs files:

1d,1c,1b,1a (PRG ROMs)
2b,2a       (CHR ROMs)

6d,6c,6b,6a (PRG ROMs)
8b,8a       (CHR ROMs)

There are games with the first set (1x & 2x), games with the second (6x & 8x)
and games with *both* the sets (no idea how to load / run these double sets).

2. Registers
------------

   NOTICE: (R) = Read, (W) = Write, (RW) = Read and Write.
   Underlines (_) are unused bits.
   "?" are unknown bits.

Ŀ
  REGISTER    BINARY   DESCRIPTION                       
Ĵ
 $4016 (RW)  __CBAV__  C: Coin detection (R)             
            #76543210     0: No coin                     
                          1: Coin present                
                                                         
                       V: VROM swapping (Mapper #99) (W) 
                          0: 1st 8K bank on PPU $0000    
                          1: 2nd 8K bank on PPU $0000    
                                                         
                       A: DIP Switch #1  (R)             
                       B: DIP Switch #2  (R)             
                          0: Disabled                    
                          1: Enabled                     
Ĵ
 $4017 (R)   FECBDA__  A: DIP Switch #3                  
                       B: DIP Switch #4                  
                       C: DIP Switch #5                  
                       D: DIP Switch #6                  
                       E: DIP Switch #7                  
                       F: DIP Switch #8                  
                          0: Disabled                    
                          1: Enabled                     
                       

NOTE:
If coin detect is pressed, bit 5 of $4016 will be on during reads.
For good work, keep set this bit while you are inserting a coin.

3. VS Mappers
-------------
Ŀ
 Mapper #99    Used by VS Super Mario Bros, VS Ice Climber and others.

  - See "Registers".
  - Notes: I believe only mapper #0 games (from NES videogame to VS) will use
mapper #99 on VS system.
  - Most of these games use 4-screen mirroring.

Ŀ
 Mapper #151   Used by VS Gradius and VS Goonies.
Ŀ
  REGISTER     BINARY   DESCRIPTION                       
Ĵ
  $8000       ????????  Switch 8K ROM bank at $8000.      
Ĵ
  $A000       ????????  Switch 8K ROM bank at $A000.      
Ĵ
  $C000       ????????  Switch 8K ROM bank at $C000.      
Ĵ
  $E000       ????????  Switch 4K VROM bank at PPU $0000. 
Ĵ
  $F000       ????????  Switch 4K VROM bank at PPU $1000. 
                       

4. DIP Switches
---------------

Please, check "Registers" to clarify this stuff.

It's possible to change some aspects of a VS game by DIP switches, like a
FREE PLAY. There are 8 switches. This stuff appears at $4016 and $4017 
registers on reading, like follow:

 1 - 0x08 bit of $4016
 2 - 0x10 bit of $4016
 3 - 0x04 bit of $4017
 4 - 0x10 bit of $4017
 5 - 0x20 bit of $4017
 6 - 0x08 bit of $4017
 7 - 0x40 bit of $4017
 8 - 0x80 bit of $4017

* VS Dr.Mario - Switch #7 enabled gives FREE PLAY.

Quote from Loopy:

"There are 3 bits for credit input in $4016. Bit 2 is for service credit
(manual switch) and bits 5,6 are for the left/right coin slots.
There is an audible difference between the normal coin slots and service
switch in some games. Also, bits 5,6 have a timeout, bit 2 does not.
Try holding the ~ key down in my emulator a little longer to see what I mean.
I suspect this is to prevent kids from dangling quarters on a string.. :)"

5. VS Palettes
--------------

Because VS Unisystem PPUs are not the same of a NES console, games output
wrong colors. Here's a palette table for some games, provided by Loopy:

Note: color $0f in VS CastleVania -> color $00 in NES palette.

;nes
        db 00h,01h,02h,03h,04h,05h,06h,07h,08h,09h,0ah,0bh,0ch,0dh,0eh,0fh
        db 10h,11h,12h,13h,14h,15h,16h,17h,18h,19h,1ah,1bh,1ch,1dh,1eh,1fh
        db 20h,21h,22h,23h,24h,25h,26h,27h,28h,29h,2ah,2bh,2ch,2dh,2eh,2fh
        db 30h,31h,32h,33h,34h,35h,36h,37h,38h,39h,3ah,3bh,3ch,3dh,3eh,3fh
            0               4               8               c
;castlevania
        db 0fh,27h,18h,3fh,3fh,25h,3fh,34h,16h,13h,3fh,3fh,20h,23h,3fh,0bh
        db 3fh,3fh,06h,3fh,1bh,3fh,3fh,22h,3fh,24h,3fh,3fh,32h,3fh,3fh,03h
        db 3fh,37h,26h,33h,11h,3fh,10h,3fh,14h,3fh,00h,09h,12h,0fh,3fh,30h
        db 3fh,3fh,2ah,17h,0ch,01h,15h,19h,3fh,3fh,07h,37h,3fh,05h,3fh,3fh
;           0               4               8               c
;excitebike
        db 3fh,3fh,3fh,3fh,1ah,30h,3ch,09h,0fh,0fh,3fh,0fh,3fh,3fh,3fh,30h
        db 32h,1ch,3fh,12h,3fh,18h,17h,3fh,0ch,3fh,3fh,02h,16h,3fh,3fh,3fh
        db 3fh,3fh,0fh,37h,3fh,28h,27h,3fh,29h,3fh,21h,3fh,11h,3fh,0fh,3fh
        db 31h,3fh,3fh,3fh,0fh,2ah,28h,3fh,3fh,3fh,3fh,3fh,13h,3fh,3fh,3fh
;           0               4               8               c
;mario
        db 18h,3fh,1ch,3fh,3fh,3fh,0bh,17h,10h,3fh,14h,3fh,36h,37h,1ah,3fh
        db 25h,3fh,12h,3fh,0fh,3fh,3fh,3fh,3fh,3fh,22h,19h,3fh,3fh,3ah,21h
        db 3fh,3fh,07h,3fh,3fh,3fh,00h,15h,0ch,3fh,3fh,3fh,3fh,3fh,3fh,3fh
        db 3fh,3fh,07h,16h,3fh,3fh,30h,3ch,3fh,27h,3fh,3fh,29h,3fh,1bh,09h
;           0               4               8               c
;goonies
        db 0fh,3fh,3fh,10h,3fh,30h,31h,3fh,01h,0fh,36h,3fh,3fh,3fh,3fh,3ch
        db 3fh,3fh,3fh,12h,19h,3fh,17h,3fh,00h,3fh,3fh,02h,16h,3fh,3fh,3fh
        db 3fh,3fh,3fh,37h,3fh,27h,26h,20h,3fh,04h,22h,3fh,11h,3fh,3fh,3fh
        db 2ch,3fh,3fh,3fh,07h,2ah,3fh,3fh,3fh,3fh,3fh,38h,13h,3fh,3fh,0ch
;           0               4               8               c
;iceclimber
        db 18h,3fh,1ch,3fh,3fh,3fh,01h,17h,10h,3fh,2ah,3fh,36h,37h,1ah,39h
        db 25h,3fh,12h,3fh,0fh,3fh,3fh,26h,3fh,3fh,22h,19h,3fh,0fh,3ah,21h
        db 3fh,0ah,07h,06h,13h,3fh,00h,15h,0ch,3fh,11h,3fh,3fh,38h,3fh,3fh
        db 3fh,3fh,07h,16h,3fh,3fh,30h,3ch,0fh,27h,3fh,31h,29h,3fh,11h,09h
           0               4               8               c
;gradius
        db 35h,3fh,16h,3fh,1ch,3fh,3fh,15h,3fh,3fh,27h,05h,04h,3fh,3fh,30h
        db 21h,3fh,3fh,3fh,3fh,3fh,36h,12h,3fh,2bh,3fh,3fh,3fh,3fh,3fh,3fh
        db 3fh,31h,3fh,2ah,2ch,0ch,3fh,3fh,3fh,07h,34h,06h,3fh,25h,26h,0fh
        db 3fh,19h,10h,3fh,3fh,3fh,3fh,17h,3fh,11h,3fh,3fh,3fh,3fh,18h,3fh
           0               4               8               c

;hogans alley
        db 35h,3fh,16h,22h,1ch,3fh,3fh,15h,3fh,00h,27h,05h,04h,3fh,3fh,30h
        db 21h,3fh,3fh,29h,3ch,3fh,36h,12h,3fh,2bh,3fh,3fh,3fh,3fh,3fh,01h
        db 3fh,31h,3fh,2ah,2ch,0ch,3fh,3fh,3fh,07h,34h,06h,3fh,25h,26h,0fh
        db 3fh,19h,10h,3fh,3fh,3fh,3fh,17h,3fh,11h,3fh,3fh,3fh,25h,18h,3fh
           0               4               8               c

6. Game bootup
--------------

Splited ROMs must to be loaded following this order: 
PRGs: 1d, 1c, 1b, 1a (6d, 6c, 6b, 6a)
CHRs: 2b, 2a         (8b, 8a)

You must to set manually some basics of each game, like Mirroring and
PRG/CHR pages.

Notes:
1) VS Goonies and VS Gradius uses Vertical Mirroring (hard-wired).
2) VS Excitebike uses 4-screen mirroring.
3) VS Dr.Mario is a MMC1 game (iNES Mapper #1)
4) VS Platoon uses Mapper #68 (SunSoft Mapper #4) with 4-screen mirroring.
5) VS Castlevania is a Mapper #2 game.
================================================================================================

*EOF
