SNK Ikari Warriors Arcade Core

Vic20-Ian
Posts: 70
Joined: Wed May 27, 2020 9:59 am
Been thanked: 1 time

Re: SNK Ikari Warriors Arcade Core

Unread post by Vic20-Ian »

drmister wrote: Fri Jul 29, 2022 1:33 pm
XtraSmiley wrote: Wed Jul 27, 2022 10:42 pm I've had a few people ask me about these. So bottom line, I'm in no rush to make these, as parts are super hard to get right now. I'll be doing the prototype soon and I'll get some pics, but the final versions will be specifically ordered metal joystick boxes that cost a ton, so the final stick price will be above $500 USD, if not a LOT above $500 USD, so I don't even know if I'll do all 6. I may just do one to see if it sells, then work on the next one etc.

If you're in a rush for LS-30s, I recommend the forums at KLOV as people list them every few months or so, about $200-300 for a pair, that's how I got my six.
Thanks!
Check out these for cheaper / modern options - mechanical, similar tech to the original

https://www.ultimarc.com/arcade-control ... ik-j-stik/

or optical

https://www.ultimarc.com/arcade-control ... k-upgrade/
RndMnkIII
Core Developer
Posts: 90
Joined: Mon May 25, 2020 1:20 pm
Has thanked: 2 times
Been thanked: 47 times

Re: SNK Ikari Warriors Arcade Core

Unread post by RndMnkIII »

I'm only interested in creating a native interface, without using USB. Existing USB solutions, if detected by Linux, there is no problem using them directly in MiSTer.
jca
Top Contributor
Posts: 1911
Joined: Wed May 27, 2020 1:59 pm
Has thanked: 145 times
Been thanked: 454 times

Re: SNK Ikari Warriors Arcade Core

Unread post by jca »

After turning Demo sound on in the DIP settings of Ikari Warriors I get FC04 H ERROR, turning it off and reset to apply does not fix it, I have to delete the DIP config file.
No such problem with Victory Road.
CMR
Posts: 90
Joined: Sun Dec 20, 2020 12:29 am
Has thanked: 33 times
Been thanked: 8 times

Re: SNK Ikari Warriors Arcade Core

Unread post by CMR »

I found this today. It might be useful for some of you.

https://www.youtube.com/watch?v=iELbrBbQspM
RndMnkIII
Core Developer
Posts: 90
Joined: Mon May 25, 2020 1:20 pm
Has thanked: 2 times
Been thanked: 47 times

Re: SNK Ikari Warriors Arcade Core

Unread post by RndMnkIII »

This is a USB HID interface using a Arduino Uno that works as a keyboard, but adds a considerable delay to the signal processing as does software debounce (15-50ms). The solution proposed by me uses a STM32 microcontroller in the Arduino environment (STM32Duino) and does direct port read (read all 12 inputs at the same time: 4 signals for rotary axis using cable grouping to reduce cable count, and the usually arcade inputs up,down,left,right,button A, button B, coin, start buttons) with hardware debounce, with a data capture time of 150us. Interfaces directly with MiSTer using the USERIO port following the NeoGeo DB15 interface (rotary data maps to buttons F,E,D,C). The STM32 microcontroller has schmitt triggers in the GPIOs, so even if you don't build the external RC circuitry to do the hardware debounce, you will still have some basic noise filtering on the input signals.
RndMnkIII
Core Developer
Posts: 90
Joined: Mon May 25, 2020 1:20 pm
Has thanked: 2 times
Been thanked: 47 times

Re: SNK Ikari Warriors Arcade Core

Unread post by RndMnkIII »

https://github.com/RndMnkIII/SNK_LS-30_ ... matico.png

SNK_LS30_SNAC_ADAPTER_esquematico.png
SNK_LS30_SNAC_ADAPTER_esquematico.png (411.03 KiB) Viewed 2726 times
CMR
Posts: 90
Joined: Sun Dec 20, 2020 12:29 am
Has thanked: 33 times
Been thanked: 8 times

Re: SNK Ikari Warriors Arcade Core

Unread post by CMR »

Are you just using four signals to read the direction of the rotation? That's pretty neat. I was thinking of swapping the rotary switch out with a three pin encoder and just wiring it to a demonbite board. One thing I've noticed when using a usb controller with the rotations mapped to L and R is that sometimes an input will get dropped if I press the button multiple times too quickly. Could this be an issue with the original hardware and how it reads the rotary controls?
RndMnkIII
Core Developer
Posts: 90
Joined: Mon May 25, 2020 1:20 pm
Has thanked: 2 times
Been thanked: 47 times

Re: SNK Ikari Warriors Arcade Core

Unread post by RndMnkIII »

I will check this. Which gamepad are you used?
RndMnkIII
Core Developer
Posts: 90
Joined: Mon May 25, 2020 1:20 pm
Has thanked: 2 times
Been thanked: 47 times

Re: SNK Ikari Warriors Arcade Core

Unread post by RndMnkIII »

A USB gamepad is independant of the native LS-30 code
CMR
Posts: 90
Joined: Sun Dec 20, 2020 12:29 am
Has thanked: 33 times
Been thanked: 8 times

Re: SNK Ikari Warriors Arcade Core

Unread post by CMR »

I'm using a snes controller with a demonbite adapter. Yea, I'm not sure if it's how the game code polls for button presses or if it's something else. I was thinking that maybe the game itself just didn't poll for rotational movement that fast. Sometimes it happens when I press the buttons multiple times, and sometimes it doesn't even register the first button press. It seems to happen most with clockwise rotation. I'll give some other controllers a try today or tomorrow to see what happens. I also have this issue with TNK III.
jca
Top Contributor
Posts: 1911
Joined: Wed May 27, 2020 1:59 pm
Has thanked: 145 times
Been thanked: 454 times

Re: SNK Ikari Warriors Arcade Core

Unread post by jca »

Thanks for the updates. No more error when turning on Demo Sounds in Ikari Warriors.
CMR
Posts: 90
Joined: Sun Dec 20, 2020 12:29 am
Has thanked: 33 times
Been thanked: 8 times

Re: SNK Ikari Warriors Arcade Core

Unread post by CMR »

So I've tried a couple other controllers, the ibuffalo SNES controller and a generic chinese arcade controller board. I get the same results from both of them. Holding the button for rotation down works fine, but tapping the button causes dropped inputs. I also updated my mister about two or three days ago with update_all.
RndMnkIII
Core Developer
Posts: 90
Joined: Mon May 25, 2020 1:20 pm
Has thanked: 2 times
Been thanked: 47 times

Re: SNK Ikari Warriors Arcade Core

Unread post by RndMnkIII »

I've added speed settings for simulated rotary controls in Ikari Warriors core. Check latest update. Basically change the polling rate of the rotate left/right gamepad buttons.
Gradius
Posts: 1
Joined: Mon May 25, 2020 3:12 pm

Re: SNK Ikari Warriors Arcade Core

Unread post by Gradius »

Screen flip doesn’t seem to work playing on a pvm.

Love this game btw.
fierman
Posts: 111
Joined: Mon Mar 28, 2022 11:08 pm
Has thanked: 83 times
Been thanked: 23 times

Re: SNK Ikari Warriors Arcade Core

Unread post by fierman »

Is it correct to assume that rotating the screen is not possible in analogue mode? Unlike TNKIII, Ikari Warriors and Victory Road don't have a rotate option in the dipswitch settings. (These games are rotated counterclockwise, instead of cw like most games - making setup a bit more of a chore than usual. )
RndMnkIII
Core Developer
Posts: 90
Joined: Mon May 25, 2020 1:20 pm
Has thanked: 2 times
Been thanked: 47 times

Re: SNK Ikari Warriors Arcade Core

Unread post by RndMnkIII »

yes, because in native resolution mode, it depends on whether that option is explicitly available on the game's DIP switches or whether the ROM can be patched. In this case none of these alternatives are available.
RndMnkIII
Core Developer
Posts: 90
Joined: Mon May 25, 2020 1:20 pm
Has thanked: 2 times
Been thanked: 47 times

Re: SNK Ikari Warriors Arcade Core

Unread post by RndMnkIII »

In the early days of cabinet arcade CRT monitors, the solutuon for this was reverse CRT monitor yoke.
https://forums.arcade-museum.com/thread ... wn.265401/
User avatar
Arcatech
Posts: 61
Joined: Thu Aug 11, 2022 8:47 pm
Has thanked: 8 times
Been thanked: 8 times

Re: SNK Ikari Warriors Arcade Core

Unread post by Arcatech »

Hi I built your LS-30 SNAC Adapter today it took me pretty much all day to do :shock:

SNK LS-30 Snac Adapter.jpg
SNK LS-30 Snac Adapter.jpg (499.01 KiB) Viewed 2549 times

I'm a bit of a newbie when it comes to SNAC adapters so forgive me if my questions seem obvious :oops:

I'm running my Mister with a IRKEN LABS Jamma Expander board with a multi USB hub to allow me to connect to a Jamma arcade cabinet so for me to use your Snac adapter will I need to purchase a MiSTer IO Board v6.1 (see link below)

https://misterfpga.co.uk/product/mister ... -with-fan/

...then connect the SNAC adpater via the USB USER IO connection circled using a male to male Type A USB lead

Mister IO board.PNG
Mister IO board.PNG (223.42 KiB) Viewed 2549 times

...or can I connect the Snac to the Jamma expander in any way?

Also does the STM32 (Blue Pill) module require programming first to correctly read and transmit the user's inputs correctly to Mister, if so where do I find the file?

Thanks,

Arcatech.
XtraSmiley
Posts: 109
Joined: Wed May 27, 2020 11:33 pm
Has thanked: 101 times
Been thanked: 15 times

Re: SNK Ikari Warriors Arcade Core

Unread post by XtraSmiley »

Very cool! I'm not able to build one of these, does anyone want to build one for me so I can test my controller with it? Im willing to pay of course or to knock some money off the eventual controller purchase (and move you to the front of the line) if you prefer.

Let me know!
fierman
Posts: 111
Joined: Mon Mar 28, 2022 11:08 pm
Has thanked: 83 times
Been thanked: 23 times

Re: SNK Ikari Warriors Arcade Core

Unread post by fierman »

Arcatech wrote: Thu Aug 11, 2022 9:28 pm Hi I built your LS-30 SNAC Adapter today it took me pretty much all day to do :shock:
That looks very nice. I ordered some parts, and I am going to build one myself as well. Time permitting.
(and yes, have the same questions as you have :))
User avatar
Arcatech
Posts: 61
Joined: Thu Aug 11, 2022 8:47 pm
Has thanked: 8 times
Been thanked: 8 times

Re: SNK Ikari Warriors Arcade Core

Unread post by Arcatech »

fierman wrote: Fri Aug 12, 2022 9:48 am
Arcatech wrote: Thu Aug 11, 2022 9:28 pm Hi I built your LS-30 SNAC Adapter today it took me pretty much all day to do :shock:
That looks very nice. I ordered some parts, and I am going to build one myself as well. Time permitting.
(and yes, have the same questions as you have :))
I wanted to top side to look nice and neat, unfortunately the consequence of this is that the other side looks like the underside of a pinball machine! :lol: .. anyway I hopefully it helps others on the layout of the parts.

Ideally we need someone experienced in knocking up PCB layouts to produce a gerber file we can then get them produced by PCBWay etc.

Arcatech
FPGA64
Top Contributor
Posts: 750
Joined: Mon Mar 01, 2021 3:10 pm
Has thanked: 44 times
Been thanked: 325 times

Re: SNK Ikari Warriors Arcade Core

Unread post by FPGA64 »

where are people getting Ls-30 rotaries I cant find one at all ?
fierman
Posts: 111
Joined: Mon Mar 28, 2022 11:08 pm
Has thanked: 83 times
Been thanked: 23 times

Re: SNK Ikari Warriors Arcade Core

Unread post by fierman »

FPGA64 wrote: Fri Aug 12, 2022 12:45 pm where are people getting Ls-30 rotaries I cant find one at all ?
I bought a completely beaten up cab a few years ago for 100 euro. It was in such a bad shape it was not worth the time restoring. But it did have two LS-30's - so I did take it home :)
RndMnkIII
Core Developer
Posts: 90
Joined: Mon May 25, 2020 1:20 pm
Has thanked: 2 times
Been thanked: 47 times

Re: SNK Ikari Warriors Arcade Core

Unread post by RndMnkIII »

Hi, I only tested with the MiSTer IOboard (analog and digital), I dont known noje about the JAMMA expander.. The USERIO port is needed because routes the signals usijg very specific port pins.
RndMnkIII
Core Developer
Posts: 90
Joined: Mon May 25, 2020 1:20 pm
Has thanked: 2 times
Been thanked: 47 times

Re: SNK Ikari Warriors Arcade Core

Unread post by RndMnkIII »

Your adapter looks very well. For programming the Bluepill you need to install Arduino IDE with STM32Duino extensions. Search any tutorial on Google to see how to do this. For programming the Blue Pill I used a STLINK V2 programmer, but you have several alternativos. Again use google to search a tutorial to see the process. I provide the. ino file to program the microcontroller. Always double check your circuit before connectijg to power.
User avatar
Arcatech
Posts: 61
Joined: Thu Aug 11, 2022 8:47 pm
Has thanked: 8 times
Been thanked: 8 times

Re: SNK Ikari Warriors Arcade Core

Unread post by Arcatech »

RndMnkIII wrote: Fri Aug 12, 2022 9:12 pm Your adapter looks very well. For programming the Bluepill you need to install Arduino IDE with STM32Duino extensions. Search any tutorial on Google to see how to do this. For programming the Blue Pill I used a STLINK V2 programmer, but you have several alternativos. Again use google to search a tutorial to see the process. I provide the. ino file to program the microcontroller. Always double check your circuit before connectijg to power.
Thanks for info. glad I asked about the programming of the STM32.

I noticed the STLINK V2 in your pics and thought this was just for debugging your core controller inputs to the STM32 but thought I better ask all the same.

I checked everything as I went along that's why it took a day to make ;)
RndMnkIII
Core Developer
Posts: 90
Joined: Mon May 25, 2020 1:20 pm
Has thanked: 2 times
Been thanked: 47 times

Re: SNK Ikari Warriors Arcade Core

Unread post by RndMnkIII »

I used only for programming. For debugging I used a logic analyzer+function generator Digilent Digital Discovery, that can generate inputs signals (CLK, LOAD) for the STM32 and read the DATA and Quartus Signal Probe II for FPGA side debugging while the game core is loaded. But for final users a cheap STLINK V2 programmer is all the needed.
User avatar
Arcatech
Posts: 61
Joined: Thu Aug 11, 2022 8:47 pm
Has thanked: 8 times
Been thanked: 8 times

Re: SNK Ikari Warriors Arcade Core

Unread post by Arcatech »

RndMnkIII wrote: Fri Aug 12, 2022 10:06 pm I used only for programming. For debugging I used a logic analyzer+function generator Digilent Digital Discovery, that can generate inputs signals (CLK, LOAD) for the STM32 and read the DATA and Quartus Signal Probe III for FPGA in debugging. But for final users a cheap STLINK V2 programmer is all the needed.
Understood, thanks for clarifying. I've just purchased a cheap STM32 programming USB dongle.

I've followed the instructions on your provided youtube link on how to program the LS-30_READ.ino file and set out below what I think is the whole process from start to finish, let me know if I have made any mistakes?...

1. Purchase STLINK V2 programmer/debugger
2. Install STLINK V2 drivers and software on PC
3. Connect STM32 to PC via STLINK V2 module Pins 2 (SWCLK) / 4 (SWIO) / 6 (GND) and 8 (3.3v) if using dongle version or official ST programmer
4. Set top yellow BOOT0 jumper on STM32 Blue Pill to "1" position for 'programming mode'
Boot 0.png
Boot 0.png (325.63 KiB) Viewed 2292 times
5. Program bootloader file: generic_boot20_pc13.bin
6. Whilst STLINK is still connected to PC set the yellow BOOT0 back to "0" position to take it out of programming mode
7. Disconnect STM32 Blue Pill from PC
8. Connect STM32 to PC using it's mini USB connection
9. Install Arduino software and then select 'Tool' menu and the STM32F103C series module should now appear in the Board Manager from the down menu allowing you to select it
10. In Arduino software ensure upload method is selected as "STM32duino bootloader" then load your LS30_READ.ino file into the Arduino software and then program the file to the STM32 module and you're done
RndMnkIII
Core Developer
Posts: 90
Joined: Mon May 25, 2020 1:20 pm
Has thanked: 2 times
Been thanked: 47 times

Re: SNK Ikari Warriors Arcade Core

Unread post by RndMnkIII »

For programming with the STLINK V2 you dont need to program a bootloader neither modify boot jumpers (leave in position 0). In Arduino you need to select upload method: STMCubeProgrammer (SWD). Follow this guide for example:
https://github.com/stm32duino/wiki/wiki/Upload-methods
See the section: STM32CubeProgrammer

You need to install (tested on Windows 10):
[*] STLINK v2 drivers: https://www.st.com/en/development-tools ... nk009.html
[*] STM32Cube programmer: https://www.st.com/en/development-tools ... eprog.html
[*] Arduino (tested with 1.8.19)
[*] STM32Duino: https://github.com/stm32duino/wiki/wiki/Getting-Started

Mi Arduino settings for Blue Pill:

Image

It is important that you are clear about all the necessary software and hardware properly installed before you attempt to test the adapter. Take a good look at how it is done in a guide, there are many sources of information where it is explained in detail, I am sorry that I did not include all this information but I do not have time available for this, there are very good resources that already explain it perfectly.

VERY IMPORTANT: DON'T POWER THE BLUE PILL WITH THE MICRO USB AND THE USERIO CONNECTED TO MISTER BOTH AT THE SAME TIME, BOTH SEND 5V TO THE BLUE PILL AND CAN DAMAGE YOUR USB PORT. YOU NEED POWER FOR THE BLUE PILL TO BE ABLE TO PROGRAM IT WITH THE STLINK V2, USE ONLY ONE POWER SOURCE.
WHEN YOU USE THE ADAPTER IN A NORMAL WAY (WITHOUT THE PROGRAMMER CONNECTED TO THE BLUE PILL) THE POWER SUPPLY (5V) COMES FROM MiSTer THROUGH THE USERIO PORT VBUS PIN, THE BLUEPILL ALREADY HAS A BUILT-IN DC REGULATOR TO GET 3.3V FROM THAT POWER SUPPLY.

Based on the STLINK V2 that you own:

Image

or

Image
Attachments
stlink_upload_method.png
stlink_upload_method.png (54.28 KiB) Viewed 2241 times
User avatar
Arcatech
Posts: 61
Joined: Thu Aug 11, 2022 8:47 pm
Has thanked: 8 times
Been thanked: 8 times

Re: SNK Ikari Warriors Arcade Core

Unread post by Arcatech »

RndMnkIII wrote: Sat Aug 13, 2022 7:04 am For programming with the STLINK V2 you dont need to program a bootloader neither modify boot jumpers (leave in position 0). In Arduino you need to select upload method: STMCubeProgrammer (SWD). Follow this guide for example:
https://github.com/stm32duino/wiki/wiki/Upload-methods
See the section: STM32CubeProgrammer

You need to install (tested on Windows 10):
[*] STLINK v2 drivers: https://www.st.com/en/development-tools ... nk009.html
[*] STM32Cube programmer: https://www.st.com/en/development-tools ... eprog.html
[*] Arduino (tested with 1.8.19)
[*] STM32Duino: https://github.com/stm32duino/wiki/wiki/Getting-Started

Mi Arduino settings for Blue Pill:

Image

It is important that you are clear about all the necessary software and hardware properly installed before you attempt to test the adapter. Take a good look at how it is done in a guide, there are many sources of information where it is explained in detail, I am sorry that I did not include all this information but I do not have time available for this, there are very good resources that already explain it perfectly.

VERY IMPORTANT: DON'T POWER THE BLUE PILL WITH THE MICRO USB AND THE USERIO CONNECTED TO MISTER BOTH AT THE SAME TIME, BOTH SEND 5V TO THE BLUE PILL AND CAN DAMAGE YOUR USB PORT. YOU NEED POWER FOR THE BLUE PILL TO BE ABLE TO PROGRAM IT WITH THE STLINK V2, USE ONLY ONE POWER SOURCE.
WHEN YOU USE THE ADAPTER IN A NORMAL WAY (WITHOUT THE PROGRAMMER CONNECTED TO THE BLUE PILL) THE POWER SUPPLY (5V) COMES FROM MiSTer THROUGH THE USERIO PORT VBUS PIN, THE BLUEPILL ALREADY HAS A BUILT-IN DC REGULATOR TO GET 3.3V FROM THAT POWER SUPPLY.

Based on the STLINK V2 that you own:

Image

or

Image

Thanks again for clarification this makes things a bit simpler.

After reading through STCubeProgrammer guide I installed the STCube programmer software onto my PC expecting me to now be able to see in the STMCube now appear in my 'Tools' menu in the Arduino software but it wasn't showing or with the option of Upload method: "STM32Cube Programmer (SWD)"

I then went to 'Tools' / 'Board Manager' and did a search for STM32 devices and installed this driver package but again this didn't work either.

To solve this I ended up going to the 'File' / 'Preferences' and in the Additional Boards Manager URL's I entered the following address to look for additional boards:- https://github.com/stm32duino/BoardMana ... index.json and this brought up additional packages to install.

After installation I went back to 'Tools' then selected Board: "Generic STM32F1 series" then I could select the Upload method: "STM32CubeProgrammer (SWD)"
STM32Cube-SWD.PNG
STM32Cube-SWD.PNG (21.9 KiB) Viewed 2218 times
Post Reply