Skip to content

va7deo/SNK68

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SNK M68000 (Ikari III) FPGA Implementation

FPGA compatible core of SNK M68000 (Ikari III based) arcade hardware for MiSTerFPGA written by Darren Olafson. FPGA implementation has been verified against schematics for Ikari III (A7007). PCB measurements taken from Datsugoku: Prisoners of War (A7008), Street Smart (A8007), and Ikari III: The Rescue (A7007).

Ikari III PCB donated by atrac17 / DJ Hard Rich and verified by Darren Olafson. Other SNK68K PCB verification done by atrac17. The intent is for this core to be a 1:1 playable implementation of SNK M68000 (Ikari III) arcade hardware. Currently in beta state, this core is in active development with assistance from atrac17.


Supported Games

Title PCB
Number
Status Released ROM Set
脱獄: Prisoners of War
P.O.W.: Prisoners of War
A7008 Implemented Yes .245 merged
怒III
Ikari III: The Rescue
A7007 Implemented Yes .245 merged
Street Smart A7008 / A8007 Implemented Yes .245 merged
SAR: Search and Rescue A8007 Implemented Yes .245 merged

External Modules

Name Purpose Author
fx68k Motorola 68000 CPU Jorge Cwik
t80 Zilog Z80 CPU Daniel Wallner
jtopl2 Yamaha OPL 2 Jose Tejada
jt7759 NEC uPD7759 Jose Tejada
yc_out Y/C Video Module Mike Simone

Known Issues / Tasks

  • GFX toggles for sprite layers [Task - Low Priority]
  • Measure full timings from PCB(s) for analog output [Task - Low Priority]

  • Minor screen tearing present in Ikari III, sprites updating midscreen / check int and memory access [Issue]
  • Correct colour palette in P.O.W. - Prisoners of War (US Version 1); dependent on sprite location / action [Issue]
  • Correct text layer in 脱獄 / P.O.W. - Prisoners of War (US Version 1, Mask ROM Sprites) [Issue]
  • Correct missing pixels during scrolling transitions for 脱獄 / P.O.W. - Prisoners of War (US Version 1, Mask ROM Sprites) [Issue]
  • Audio issues known, may be an issue with the jtopl2 core or the current usage [Issue]

PCB Check List


FPGA implementation has been verified against schematics schematics for Ikari III. PCB measurements taken from Datsugoku: Prisoners of War (A7008), Street Smart (A8007), and Ikari III: The Resucue (A7007).

Clock Information

H-Sync V-Sync Source PCB
Number
15.625kHz 59.185606Hz DSLogic+ A7008 (P.O.W.)
15.625kHz 59.185606Hz ADALM2000 A7007 (IK3)
15.625kHz 59.185606Hz DSLogic+ A8007 (SS)

Crystal Oscillators

Location PCB
Number
Freq (MHz) Use
X-4 (4MHZ) A7008 (P.O.W.) / A8007 (SS) 4.000 Z80 / YM3812 / uPD7759
X-2 (18MHZ) A7008 (P.O.W.) / A8007 (SS) 18.000 M68000
X-1 (24MHz) A7008 (P.O.W.) / A8007 (SS) 24.000 Video / Pixel Clock

Location PCB
Number
Freq (MHz) Use
F-18 (4MHZ) A7007 (IK3) / A8007 (SAR) 4.000 Z80 / YM3812 / uPD7759
H-17 (18MHZ) A7007 (IK3) / A8007 (SAR) 18.000 M68000
E-9 (24MHz) A7007 (IK3) / A8007 (SAR) 24.000 Video / Pixel Clock

Pixel clock: 6.00 MHz

Estimated geometry:

383 pixels/line

263 pixels/line

Main Components

Location PCB
Number
Chip Use
68000 A7008 (P.O.W.) / A8007 (SS) Motorola 68000 CPU Main CPU
Z-80A A7008 (P.O.W.) / A8007 (SS) Zilog Z80 CPU Sound CPU
YM3812 A7008 (P.O.W.) / A8007 (SS) Yamaha YM3812 OPL2
7759 A7008 (P.O.W.) / A8007 (SS) NEC uPD7759 ADPCM Decoder
Location PCB
Number
Chip Use
H-11/12 A7007 (IK3) / A8007 (SAR) Motorola 68000 CPU Main CPU
Z80 A7007 (IK3) / A8007 (SAR) Zilog Z80 CPU Sound CPU
YM3812 A7007 (IK3) / A8007 (SAR) Yamaha YM3812 OPL2
C-18 A7007 (IK3) / A8007 (SAR) NEC uPD7759 ADPCM Decoder

Custom Components

Location PCB
Number
Chip Use
SNKCLK A7007 (IK3) / A8007 (SAR) SNK CLK Counter
SNKI/O A7007 (IK3) / A8007 (SAR) SNK I/O Rotary

Core Features

Rotary Joystick Support


Model Device Connection USB Polling
Interval
Sample
Number
Frame
Probability
Average
Latency
Joystick ID
LS-30 Rotary Encoder RP2040 Wired USB 1ms 2241 95.52% 0.747 ms 2e8a:000a

Native Y/C Output

H/V Adjustments

  • There are two H/V toggles, H/V-sync positioning adjust and H/V-sync width adjust. Positioning will move the display for centering on CRT display. The sync width adjust can be used to for sync issues (rolling) without modifying the video timings.

Scandoubler Options

  • Additional toggle to enable the scandoubler without changing ini settings and new scanline option for 100% is available, this draws a black line every other frame. Below is an example.
Scandoubler FxScanlines 25%Scanlines 50%Scanlines 75%Scanlines 100%





Controls


  • Service menu is accessed by holding the F2 key on boot. Service dip is functional for Ikari III. P.O.W. and SAR: Search and Rescue require holding the F2 key on boot. Street Smarts requires the service dip to be toggled before resetting the core and holding F2.

GameJoystickService MenuControl Type

P.O.W.

8-Way


Co-Op

Street Smart

8-Way


Co-Op

Ikari III

8-Way or Rotary


Co-Op

SAR

8-Way or Rotary


Co-Op


Rotary Joystick Support

  • Rotary control is supported via gamepad or firmware written by atrac17 / DJ Hard Rich for LS-30 functionality using an RP2040. There are toggles in the OSD under Debug Settings to select the rotary controller type per player.

    When using a gamepad, enabling autofire and setting to 160ms for Rotate CW/CCW in the MiSTer framework allows for smooth rotation; adjust the rate to fit your preference. LS-30 firmware requires no mapping and is plug and play; it is player dependent and connected over USB to the DE10-Nano.

Keyboard Handler

  • Keyboard inputs mapped to mame defaults for the following functions.

Services Coin/Start
FunctionsKeymap
TestF2
ResetF3
Service9
PauseP
FunctionsKeymap
P1 Start1
P2 Start2
P1 Coin5
P2 Coin6
Player 1 Player 2
FunctionsKeymap
P1 UpUp
P1 DownDown
P1 LeftLeft
P1 RightRight
P1 Bttn 1L-Ctrl
P1 Bttn 2L-Alt
P1 Bttn 3Space
FunctionsKeymap
P2 UpR
P2 DownF
P2 LeftD
P2 RightG
P2 Bttn 1A
P2 Bttn 2S
P2 Bttn 3Q
Debug
FunctionsKeymap
Text Layer (TXT)F7
Sprite Layer (FG)F8
Sprite Layer (BG)F9
Sprite Layer (OBJ)F10

  • Custom keyboard inputs mapped for LS-30 RP2040 firmware functionality. The mapping is player dependent for the RP2040 firmware.

LS-30 Player 1 LS-30 Player 2
FunctionsKeymap
P1 Rotary 1Y
P1 Rotary 2U
P1 Rotary 3I
P1 Rotary 4O
P1 Rotary 5H
P1 Rotary 6J
P1 Rotary 7K
P1 Rotary 8L
P1 Rotary 9N
P1 Rotary 10M
P1 Rotary 11,
P1 Rotary 12.
FunctionsKeymap
P2 Rotary 1Z
P2 Rotary 2X
P2 Rotary 3C
P2 Rotary 4V
P2 Rotary 5B
P2 Rotary 6W
P2 Rotary 7E
P2 Rotary 8T
P2 Rotary 93
P2 Rotary 104
P2 Rotary 117
P2 Rotary 128

Support

Please consider showing support for this and future projects via Darren's Ko-fi and atrac17's Patreon. While it isn't necessary, it's greatly appreciated.

Licensing

Contact the author for special licensing needs. Otherwise follow the GPLv2 license attached.