1 //-------------------------------------------------------------------
3 // PLAYSTATION CONTROLLER-FPGA ARCADE GAME INTERFACE TOP
7 // Copyright(c) 2003 - 2004 Katsumi Degawa , All rights reserved
11 // This program is freeware for non-commercial use.
12 // An author does no guarantee about this program.
13 // You can use this under your own risk.
15 // 2004-4-29 fpga mooncrst use k .degawa
16 //-------------------------------------------------------------------
19 `include "src/mc_conf.v"
21 module fpga_arcade_if(
34 input CLK_18M432,I_RSTn;
37 output psCLK,psSEL,psTXD;
43 assign CLK_288K = clk_reg[5];
44 always@(posedge CLK_18M432) clk_reg <= clk_reg+1;
46 wire [7:0]RX_DATA_1,RX_DATA_2;
47 wire [7:0]RX_DATA_3,RX_DATA_4;
48 //wire [7:0]RX_DATA_5,RX_DATA_6;
52 assign ps_PSW[0] = 1'b1; // UP
53 assign ps_PSW[1] = 1'b1; // DOWN
54 assign ps_PSW[2] = XY_pos[0]; // LEFT
55 assign ps_PSW[3] = XY_pos[1]; // RIGHT
56 assign ps_PSW[4] = RX_DATA_2[5]; // CREDIT1 (MARU-BOTAN)
57 assign ps_PSW[5] = RX_DATA_2[4]; // CREDIT2 (SANKAKU-BOTAN)
58 assign ps_PSW[6] = RX_DATA_1[3]; // START 1P (START-BOTAN)
59 assign ps_PSW[7] = RX_DATA_1[0]; // START 2P (SELCT-BOTAN)
60 assign ps_PSW[8] = RX_DATA_1[6];
62 always@(posedge CLK_288K)
64 if(RX_DATA_3<=8'h5F&&RX_DATA_3>=8'h00)
66 else if(RX_DATA_3<=8'hFF&&RX_DATA_3>=8'hA0)
78 .I_VIB_SW({I_VIB_SW,1'b0}),