Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Zinc Tutorial for Maximus  (Read 24776 times)

0 Members and 1 Guest are viewing this topic.

DeLuSioNal29

  • Global Moderator
  • Trade Count: (+6)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 4778
  • Last login:July 17, 2024, 07:00:54 pm
  • Build the impossible -"There is no Spoon"
    • DeLuSioNaL's YouTube Videos
Zinc Tutorial for Maximus
« on: July 12, 2010, 04:22:22 pm »
Quick shout out goes to Nickynooch for reviving this post...  :)

**  UPDATED FOR ZN1 and S11 GAME SUPPORT!  **

This is a detailed guide (step by step) on how to get Zinc configured (command line version for use in any Frontend).  Once you get Zinc itself configured, you can simply set up your favorite frontend to point to the zinc.exe and roms, etc.

Download Zinc 1.1 and the plug-ins here:
http://www.emulator-zone.com/doc.php/arcade/zinc.html

Grab the following plug-ins at the bottom of the page:
-  OpenGL and D3D renderers 1.2
-  Winterblast's Input Plugin 1.6

Installation:
-  Unzip Zinc 1.1 into a directory called "Zinc"
-  Unzip the Winterblast Input Plugin into the Zinc directory (if it asks, overwrite any files)
-  Unzip the OpenGL and D3D renderers into the Zinc directory.  It should make it's own folders within Zinc.(if it asks, overwrite any files)
-  Copy the renderer.znc file from the OpenGL or D3D folder to the main Zinc folder (you need to choose whichever one you would like to use for your system.  I chose the OpenGL one for mine.)
-  Place your roms and bios files (zipped) in the "roms" directory.

Roms:
Can't post links for that here.. sorry!
However, you can use the same roms that you use for MAME (they don't work well in MAME but work great in Zinc).  See the link above for games that are compatible with Zinc and what filenames you need to look for (and bioses for each system).

Important!  Bios Files:
Each rom needs it's own BIOS file for the system that it emulates.  For example:  Plasma Sword (US) requires the plsmaswd.zip (rom file) along with the cpzn2.zip (bios file).  Coolboarders need it's rom along with the tps.zip bios, etc.  Many games use the same bioses. For example Street Fighter EX 2 also uses the cpzn2 bios that the Plasma Sword game uses.  Games will not run without their bios files!

Setting up the Controls:
This is the toughest part of Zinc!  Be prepared!  It is a tedious process of manually editing text files with the proper key assignment codes.

However, for those who want to use the standard MAME keys (player 1 - up, down, left, right, CTRL, ALT, SPACE, LSHIFT, Z, X and player 2 - R, F, D, G, A, S, Q, W, I, K) I've included the controller.cfg file below already assigned for the standard MAME key layout.  Simply copy it to your Zinc directory overwriting the default one from Winterblast's plugin.  :)

*****************************************************************************************************
This section is only for those wanting to assign their own custom keys to inputs.
*****************************************************************************************************

Basically, there are two files you will be working with.  The controller.cfg file and the dik_codes.txt file.  The controller.cfg file is what Zinc looks at to map each keyboard/joystick inputs to the buttons.  This is where you will be assigning the keys.  The dik_codes.txt file is the reference file which tells you what hex digits corresponds to the keyboard key you are looking to assign.  You simply look up the key you want to assign and you will see a hex value next to it.  The hex value is then entered into the controller.cfg file.  Follow me so far?

For example:  Let's say you want to assign the button # 1 for player 1 to the letter "F".

You would look in the dik_codes.txt file for the following line:
Code: [Select]
#define DIK_F               0x21

This line tells you that for the keyboard letter F, hex value is 0x21.  So in the controller.cfg file you would input:
Code: [Select]
btn1=k21

In this example above, next to button # 1 (btn1) you would put a value of k21 next to it.  The "k" stands for the keyboard input and the "0x" portion from the dik_codes.txt file is ignored.

Note:  If you are assigning a joystick it would have a "j" instead followed by the joystick number and button number.  For Joystick # 1 button # 1 you would assign is as:
Code: [Select]
btn1=j1b1

Note:  The majority of the games work with the ZN1 and S11 controller layouts.  That is what I have assigned below in the sample controller.cfg file.  It is the 6 button layout found on most control panels.

********************************************************************
End of custom key input section
********************************************************************


Config Files:
**Renderer.cfg** (cut and paste the following over your existing code in the file - Make sure FullScreen is set to 1 and ShowFPS is set to 0)
Code: [Select]
; ogl/d3d renderer settings

XSize            = 640    ; Window/fullscreen X size
YSize            = 480    ; Window/fullscreen Y size
FullScreen        = 1       ; Fullscreen mode: 0/1
ColorDepth        = 32    ; Fullscreen color depth: 16/32
ScanLines        = 0       ; Scanlines: 0=none, 1=black, 2=bright
Filtering        = 0       ; Texture filtering: 0-3 (filtering causes glitches!)
Blending        = 1     ; Enhanced color blend: ogl: 0/1; D3D: 0-2
Dithering        = 0     ; Dithering: 0/1 (only needed in 16 bit color depths)
ShowFPS            = 0     ; FPS display on startup: 0/1
FrameLimitation         = 1     ; Frame limit: 0/1
FrameSkipping        = 0     ; Frame skip: 0/1
FramerateDetection    = 1     ; Auto framerate detection: 0/1
FramerateManual        = 100     ; Manual framerate: 0-1000
TextureType        = 3     ; Textures: 0=card's default, 1=4 bit, 2=5bit, 3=8bit
TextureCaching          = 2     ; Caching type: 0-3, def=2, mode 3 is not available on most cards
EnableKeys              = 1     ; Enable renderer keys: 0/1, def=1 (enables keys for the fps menu/pause)
FastExcel               = 0     ; Speed hack for SF 'excel' modes. Will cause glitches if enabled!

**Controller.cfg DEFAULTED for MAME standard input settings** (cut and paste the following over your existing code in the file)
Code: [Select]
[general]
;file to output controller messages and errors
output="c:\wbout.txt"
;indicate if controller will fail or not if a config error occured
noerror=1

;the order of controls :

; ZN1 : 6 btns
; S11 : 11 btns + 2 special btn (see below)
; KN1 : 2 btns
; RZ : 3 btns

; codes are :
; k'hexcode' for keyboard (see dik_code.txt for a list of keys)
; j'joystick number' followed by b'button number' for button or 'up', 'down', 'left, 'right' for pad
; examples :
; k1f  for key S
; j2b3 for joy 2 button 3
; k0   for no key


; combos :
; you can define up to 32 combos
; combos are available for every player
; syntax is :
;    d   down
;    u   up
;    r   right
;    l   left
;    s   start
;    b1  button 1
;    ....
;    bn  button n
; , is the separator for each frame
;
; to map an input key for a combo, put
;c'combo number in combo list'=code
; see below for examples
[combos]
;hadoken from left
1=d,,dr,,rb3
;hadoken from right
2=d,,dl,,lb3


[all]
;F3
test=k3d
;F2
services=k3c


; for S11 works well with tekken2, souledge
; seems btn1 to btn8 do nothing
;[player1]
;coin=k02
;start=k06
;right=kcd
;left=kcb
;down=kd0
;up=kc8
;btn9=k20
;btn10=k21
;btn11=k22
;btn12=k2e
;btn13=k2f

; S11 keys are :
; 1
; 5
; rightarrow
; leftarrow
; downarrow
; uparrow
; btn 1 to 8 : none
; D
; F
; G
; C  -> tekken 2 kick 1
; V  -> tekken 2 kick 2 / souledge block


[player1]
;example for ZN1 player 1 with keyboard
;useMM=1  ;allow player 1 to use WinMM joystick instead of DirectX
coin=k06
start=k02
right=kCD
left=kCB
down=kD0
up=kC8
btn1=k1D
btn2=k38
btn3=k39
btn4=k2A
btn5=k2C
btn6=k2D
btn9=k1D
btn10=k38
btn11=k39
btn12=k2A
btn13=k2C
c1=k0
c2=k0

[player2]
;example for ZN1 player 2 with keyboard
coin=k07
start=k03
right=k22
left=k20
down=k21
up=k13
btn1=k1E
btn2=k1F
btn3=k10
btn4=k11
btn5=k17
btn6=k25
btn9=k1E
btn10=k1F
btn11=k10
btn12=k11
btn13=k17
c1=k0
c2=k0


;example for KN1 with joy1
;[player1]
;coin=k02
;start=k06
;right=j1right
;left=j1left
;down=j1down
;up=j1up
;btn1=j1b1
;btn2=j1b2

;example for RZ with joy1
;[player1]
;coin=k02
;start=k06
;right=j1right
;left=j1left
;down=j1down
;up=j1up
;btn1=j1b1
;btn2=j1b2
;btn3=j1b3

**dik_codes.txt** (this is where you get the key input values when you are manually editing the controller.cfg file.
These are codes for keys config:
Code: [Select]
#define DIK_ESCAPE          0x01
#define DIK_1               0x02
#define DIK_2               0x03
#define DIK_3               0x04
#define DIK_4               0x05
#define DIK_5               0x06
#define DIK_6               0x07
#define DIK_7               0x08
#define DIK_8               0x09
#define DIK_9               0x0A
#define DIK_0               0x0B
#define DIK_MINUS           0x0C    /* - on main keyboard */
#define DIK_EQUALS          0x0D
#define DIK_BACK            0x0E    /* backspace */
#define DIK_TAB             0x0F
#define DIK_Q               0x10
#define DIK_W               0x11
#define DIK_E               0x12
#define DIK_R               0x13
#define DIK_T               0x14
#define DIK_Y               0x15
#define DIK_U               0x16
#define DIK_I               0x17
#define DIK_O               0x18
#define DIK_P               0x19
#define DIK_LBRACKET        0x1A
#define DIK_RBRACKET        0x1B
#define DIK_RETURN          0x1C    /* Enter on main keyboard */
#define DIK_LCONTROL        0x1D
#define DIK_A               0x1E
#define DIK_S               0x1F
#define DIK_D               0x20
#define DIK_F               0x21
#define DIK_G               0x22
#define DIK_H               0x23
#define DIK_J               0x24
#define DIK_K               0x25
#define DIK_L               0x26
#define DIK_SEMICOLON       0x27
#define DIK_APOSTROPHE      0x28
#define DIK_GRAVE           0x29    /* accent grave */
#define DIK_LSHIFT          0x2A
#define DIK_BACKSLASH       0x2B
#define DIK_Z               0x2C
#define DIK_X               0x2D
#define DIK_C               0x2E
#define DIK_V               0x2F
#define DIK_B               0x30
#define DIK_N               0x31
#define DIK_M               0x32
#define DIK_COMMA           0x33
#define DIK_PERIOD          0x34    /* . on main keyboard */
#define DIK_SLASH           0x35    /* / on main keyboard */
#define DIK_RSHIFT          0x36
#define DIK_MULTIPLY        0x37    /* * on numeric keypad */
#define DIK_LMENU           0x38    /* left Alt */
#define DIK_SPACE           0x39
#define DIK_CAPITAL         0x3A
#define DIK_F1              0x3B
#define DIK_F2              0x3C
#define DIK_F3              0x3D
#define DIK_F4              0x3E
#define DIK_F5              0x3F
#define DIK_F6              0x40
#define DIK_F7              0x41
#define DIK_F8              0x42
#define DIK_F9              0x43
#define DIK_F10             0x44
#define DIK_NUMLOCK         0x45
#define DIK_SCROLL          0x46    /* Scroll Lock */
#define DIK_NUMPAD7         0x47
#define DIK_NUMPAD8         0x48
#define DIK_NUMPAD9         0x49
#define DIK_SUBTRACT        0x4A    /* - on numeric keypad */
#define DIK_NUMPAD4         0x4B
#define DIK_NUMPAD5         0x4C
#define DIK_NUMPAD6         0x4D
#define DIK_ADD             0x4E    /* + on numeric keypad */
#define DIK_NUMPAD1         0x4F
#define DIK_NUMPAD2         0x50
#define DIK_NUMPAD3         0x51
#define DIK_NUMPAD0         0x52
#define DIK_DECIMAL         0x53    /* . on numeric keypad */
#define DIK_OEM_102         0x56    /* <> or \| on RT 102-key keyboard (Non-U.S.) */
#define DIK_F11             0x57
#define DIK_F12             0x58
#define DIK_F13             0x64    /*                     (NEC PC98) */
#define DIK_F14             0x65    /*                     (NEC PC98) */
#define DIK_F15             0x66    /*                     (NEC PC98) */
#define DIK_KANA            0x70    /* (Japanese keyboard)            */
#define DIK_ABNT_C1         0x73    /* /? on Brazilian keyboard */
#define DIK_CONVERT         0x79    /* (Japanese keyboard)            */
#define DIK_NOCONVERT       0x7B    /* (Japanese keyboard)            */
#define DIK_YEN             0x7D    /* (Japanese keyboard)            */
#define DIK_ABNT_C2         0x7E    /* Numpad . on Brazilian keyboard */
#define DIK_NUMPADEQUALS    0x8D    /* = on numeric keypad (NEC PC98) */
#define DIK_PREVTRACK       0x90    /* Previous Track (DIK_CIRCUMFLEX on Japanese keyboard) */
#define DIK_AT              0x91    /*                     (NEC PC98) */
#define DIK_COLON           0x92    /*                     (NEC PC98) */
#define DIK_UNDERLINE       0x93    /*                     (NEC PC98) */
#define DIK_KANJI           0x94    /* (Japanese keyboard)            */
#define DIK_STOP            0x95    /*                     (NEC PC98) */
#define DIK_AX              0x96    /*                     (Japan AX) */
#define DIK_UNLABELED       0x97    /*                        (J3100) */
#define DIK_NEXTTRACK       0x99    /* Next Track */
#define DIK_NUMPADENTER     0x9C    /* Enter on numeric keypad */
#define DIK_RCONTROL        0x9D
#define DIK_MUTE            0xA0    /* Mute */
#define DIK_CALCULATOR      0xA1    /* Calculator */
#define DIK_PLAYPAUSE       0xA2    /* Play / Pause */
#define DIK_MEDIASTOP       0xA4    /* Media Stop */
#define DIK_VOLUMEDOWN      0xAE    /* Volume - */
#define DIK_VOLUMEUP        0xB0    /* Volume + */
#define DIK_WEBHOME         0xB2    /* Web home */
#define DIK_NUMPADCOMMA     0xB3    /* , on numeric keypad (NEC PC98) */
#define DIK_DIVIDE          0xB5    /* / on numeric keypad */
#define DIK_SYSRQ           0xB7
#define DIK_RMENU           0xB8    /* right Alt */
#define DIK_PAUSE           0xC5    /* Pause */
#define DIK_HOME            0xC7    /* Home on arrow keypad */
#define DIK_UP              0xC8    /* UpArrow on arrow keypad */
#define DIK_PRIOR           0xC9    /* PgUp on arrow keypad */
#define DIK_LEFT            0xCB    /* LeftArrow on arrow keypad */
#define DIK_RIGHT           0xCD    /* RightArrow on arrow keypad */
#define DIK_END             0xCF    /* End on arrow keypad */
#define DIK_DOWN            0xD0    /* DownArrow on arrow keypad */
#define DIK_NEXT            0xD1    /* PgDn on arrow keypad */
#define DIK_INSERT          0xD2    /* Insert on arrow keypad */
#define DIK_DELETE          0xD3    /* Delete on arrow keypad */
#define DIK_LWIN            0xDB    /* Left Windows key */
#define DIK_RWIN            0xDC    /* Right Windows key */
#define DIK_APPS            0xDD    /* AppMenu key */
#define DIK_POWER           0xDE    /* System Power */
#define DIK_SLEEP           0xDF    /* System Sleep */
#define DIK_WAKE            0xE3    /* System Wake */
#define DIK_WEBSEARCH       0xE5    /* Web Search */
#define DIK_WEBFAVORITES    0xE6    /* Web Favorites */
#define DIK_WEBREFRESH      0xE7    /* Web Refresh */
#define DIK_WEBSTOP         0xE8    /* Web Stop */
#define DIK_WEBFORWARD      0xE9    /* Web Forward */
#define DIK_WEBBACK         0xEA    /* Web Back */
#define DIK_MYCOMPUTER      0xEB    /* My Computer */
#define DIK_MAIL            0xEC    /* Mail */
#define DIK_MEDIASELECT     0xED    /* Media Select */

I really hope this tutorial for Zinc helps.  It was inspired by "evilhoshi's" guide (from the Maximus Arcade forums) that he started a while back.  Thanks goes to evilhoshi for the idea!  This one is a bit more detailed and I tried to explain it so that it is easy to understand.

Enjoy!

~ DeLuSioNaL
« Last Edit: July 12, 2010, 04:34:35 pm by DeLuSioNal29 »
Stop by my Youtube channel and leave a comment:

DeLuSioNal29

  • Global Moderator
  • Trade Count: (+6)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 4778
  • Last login:July 17, 2024, 07:00:54 pm
  • Build the impossible -"There is no Spoon"
    • DeLuSioNaL's YouTube Videos
Re: Zinc Tutorial for Maximus
« Reply #1 on: July 12, 2010, 04:24:54 pm »
Additional info:

According to the BYOAC Wiki, there is a utility out there that is available to aid in configuring controls for Zinc.

Here is an excerpt from the BYOAC Wiki Page:
http://wiki.arcadecontrols.com/wiki/Zinc

"How to remap the controls?

The controls can be hard to configure to get it working on a arcadecab.

Howard_Casto of the BYOAC community has developed a utility program to aid in configuring controls for Zinc easier.

This utility can be downloaded from http://www.oscarcontrols.com/lazarus/files/zincconfig1.5.zip "

Here is a link to Aldo's Zinc Front end which helps set up controls (thanks to Headkaze)

http://www.aldostools.com/frontends.html

More stuff: (thanks to Zebidee)
Some time ago I posted a complete set of files on this forum for installing ZiNc (including the plugins) and running it under MameWAH, and it is easily adaptable to other Front Ends:

http://forum.arcadecontrols.com/index.php?topic=73330.0

The ZincWAH files themselves:
http://forum.arcadecontrols.com/index.php?action=dlattach;topic=73330.0;attach=89446

This setup pre-sets all the controls for Mame defaults, so that you shouldn't have to reprogram your IPAC/keyboard interface to play the games.  It avoids the need to use a Zinc GUI such as Aldo's or ZincGUI, which all have some problems/limitations.  By referring to the files themselves and Delusional's tutorial, it is easy to see how to edit the config files directly to change video and control options.

~ D
« Last Edit: July 12, 2010, 04:28:10 pm by DeLuSioNal29 »
Stop by my Youtube channel and leave a comment:

omnivorism

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 45
  • Last login:September 22, 2010, 12:32:04 pm
Re: Zinc Tutorial for Maximus
« Reply #2 on: August 27, 2010, 08:04:55 pm »
I have closely followed this tutorial and have never been able to get Zinc to load in MA.

It runs just fine with the GUI

...but in in MA it will only get a black screen for each game.

I have uninstalled it and reinstalled and tried it on 3 different PCs and on two operating systems.

What is with the black screen of death? I am selecting the zinc.exe and the roms correctly.

bluntmasterflash

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 8
  • Last login:March 05, 2011, 02:13:51 am
    • bluntmasterflash.com
Re: Zinc Tutorial for Maximus
« Reply #3 on: November 20, 2010, 09:48:55 am »
Delusional....i don't know who you are, but I would be lost without you. Your MA knowledge is endless. 1000 thank yous...no 1337 thank yous..u R the Man!
Always forgive your enemies, nothing will annoy them more.

betopica

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 1
  • Last login:November 04, 2015, 01:40:07 pm
  • I want to build my own arcade controls!
Re: Zinc Tutorial for Maximus
« Reply #4 on: November 04, 2015, 01:40:07 pm »
Regarding the MAME controller.cfg for keyboard, the player two layout doesn't match exactly with the player one. There is a fix for the player
2:

Code: [Select]
btn1=k1E
btn2=k1F
btn3=k25
btn4=k10
btn5=k11
btn6=k17
btn9=k1E
btn10=k10
btn11=k11
btn12=k17
btn13=k1F

I hope help (this post is pretty old)