raphnet.net banner

Modding a NES to run Unisystem VS arcade games (10/14)

Step 8: Dip switches

The Unisystem motherboard has dip switches to configure some parameters of the game. The game can read those switches using addresses $4016 and $4017, one bit per switch. Here is a table showing which bit and address is used by each switch, where we can connect them in a NES and what they do in Super Mario VS:

DipAddressBitConnection pointFonction
Dip 1$4016Bit 3 P4, pin #7 Sets the Coin/Credits ratio:
3/1, 2/1, 1/1, 1/2, 1/3, 1/4, 1/5 or free play.
Dip 2$4016Bit 4 P4, pin #6
Dip 3$4017Bit 2 U8, pin #10
Dip 4$4017Bit 3 P5, pin #6 New game lives. 2 or 3.
Dip 5$4017Bit 4 P5, pin #7 Number of coins required to obtain a new life. 100, 150, 200 or 250
Dip 6$4017Bit 5 Use a buffer which will be in tri-state when CPU pin #35 is not low and connect outputs to CPU pins D5, D6 and D7. I used a 74ls125 but a 74ls244, 74ls240 or 74hc368 from another NES would work too.
Dip 7$4017Bit 6 Timer speed. Fast or slow.
Dip 8$4017Bit 7 Lives after a continue. 3 or 4.

For parameters which use more than one switch, I used rotary switches. Simple diode circuits convert the rotary switch output to binary. In order to have enough space for all those switches on the front panel, I had to cut some plastic:
casing rework button connections connections 74ls125 connections

goto top

Next: Palette fix patch < 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 >

Any trademarks used on this site are the property of their respective owners.
Copyright © 2002-2021, Raphaël Assenat
Website coded withWebsite coded with vimLast update: January 7, 2020 (Tuesday)