1
0
mirror of https://github.com/Gehstock/Mist_FPGA.git synced 2026-01-19 17:27:59 +00:00

Midway MCR3 Mono: Sarge one joystick mode

This commit is contained in:
Gyorgy Szombathelyi 2020-02-15 19:51:48 +01:00
parent 7cb65adc4b
commit e590671819
3 changed files with 50 additions and 20 deletions

View File

@ -11,11 +11,8 @@ Supported games:
Sarge
=====
Controls:
Player 1: joystick 1 and joystick 2
Player 2: joystick 3 and joystick 4
Creating SARGE.ROM on Linux:
cat cpu_3b.bin cpu_5b.bin spr_8e.bin spr_6e.bin spr_5e.bin spr_4e.bin til_15a.bin til_15a.bin til_14b.bin til_14b.bin tcs_u5.bin tcs_u4.bin tcs_u5.bin tcs_u4.bin > SARGE.ROM
Player 1: joystick 1 and joystick 2 (two sticks mode), joystick1 only(one stick mode)
Player 2: joystick 3 and joystick 4 (two sticks mode), joystick2 only(one stick mode)
Max RPM
=======
@ -24,19 +21,10 @@ Gear : Button1/Button2
Steering: Left/Right
Throttle/Brake: Up/Down
Creating MAXRPM.ROM on Linux:
cat pro.0 pro.1 fg-0 fg-1 fg-2 fg-3 bg-0 bg-1 turbskwk.u5 turbskwk.u4 > MAXRPM.ROM
Rampage
=======
Normal controls for maximum of 3 players.
Creating RAMPAGE.ROM on Linux:
cat pro-0_3b_rev_3_8-27-86.3b pro-1_5b_rev_3_8-27-86.5b \
fg-0_8e_6-30-86.8e fg-1_6e_6-30-86.6e fg-2_5e_6-30-86.5e fg-3_4e_6-30-86.4e \
bg-0_u15_7-23-86.15a bg-1_u14_7-23-86.14b \
u-17_rev.2_8-14-86.u17 u-18_rev.2_8-14-86.u18 u-7_rev.2_8-14-86.u7 u-8_rev.2_8-14-86.u8 > RAMPAGE.ROM
Power Drive
===========
3 players support
@ -44,10 +32,15 @@ Buttons 1,2 - Gas
Button 3 - Wheelie
Button 4 - Shift
Creating POWERDRV.ROM on Linux:
cat pdrv3b.bin pdrv5b.bin pdrv8e.bin pdrv6e.bin pdrv5e.bin pdrv4e.bin \
pdrv15a.bin pdrv14b.bin \
power_drive_snd_u17.u17 power_drive_snd_u18.u18 power_drive_snd_u7.u7 power_drive_snd_u8.u8 > POWERDRV.ROM
Usage:
======
Create ROM and ARC files from MAME ROM zip files using the mra utility and the MRA files.
Copy the RBF and the ARC files to the same folder.
Example: mra -z /path/to/mame/roms Tron.mra
Copy the ROM files to the root of the SD Card.
MRA utilty: https://github.com/sebdel/mra-tools-c
Based on Darfpga's work:
---------------------------------------------------------------------------------

View File

@ -8,6 +8,7 @@
<rbf>MCR3Mono</rbf>
<setname>sarge</setname>
<switches>
<dip bits="9" name="Controls" ids="2 sticks, 1 stick"/>
<dip bits="8" name="Free Play" ids="On,Off"/>
</switches>
<rom index="1">

View File

@ -104,8 +104,8 @@ always @(*) begin
begin
// Two stick/player like the original
input0 = ~{2'b00, service, 1'b0, m_two_players, m_one_player, m_coin2, m_coin1};
input1 = ~{m_fireA | m_fireB, m_fireA | m_fireB, m_fire2A | m_fire2B, m_fire2A | m_fire2B, m_down, m_up, m_down, m_up};
input2 = ~{m_fire3A | m_fire3B, m_fire3A | m_fire3B, m_fire4A | m_fire4B, m_fire4A | m_fire4B, m_down3, m_up3, m_down4, m_up4};
input1 = ~{{2{sarge_fire1B}}, {2{sarge_fire1A}}, sarge_down2, sarge_up2, sarge_down1, sarge_up1};
input2 = ~{{2{sarge_fire2B}}, {2{sarge_fire2A}}, sarge_down3, sarge_up3, sarge_down4, sarge_up4};
input3 = ~{2'b00, /*coinage*/2'b00, /*free play*/status[8], 3'b000};
end
7'h2: //POWERDRV
@ -393,6 +393,42 @@ dac #(10) dac(
);
assign AUDIO_R = AUDIO_L;
// Sarge controls
wire onestick = status[9];
wire sarge_up1, sarge_up2, sarge_up3, sarge_up4;
wire sarge_down1, sarge_down2, sarge_down3, sarge_down4;
wire sarge_fire1A, sarge_fire1B, sarge_fire2A, sarge_fire2B;
always @(*) begin
if (~onestick) begin
sarge_up1 = m_up;
sarge_up2 = m_up2;
sarge_up3 = m_up3;
sarge_up4 = m_up4;
sarge_down1 = m_down;
sarge_down2 = m_down2;
sarge_down3 = m_down3;
sarge_down4 = m_down4;
sarge_fire1A = m_fireA | m_fire2A;
sarge_fire1B = m_fireB | m_fire2B;
sarge_fire2A = m_fire3A | m_fire4A;
sarge_fire2B = m_fire3B | m_fire4B;
end else begin
sarge_up1 = (m_up & ~m_left) | (m_right & ~m_down);
sarge_up2 = (m_up & ~m_right) | (m_left & ~m_down);
sarge_down1 = (m_down & ~m_right) | (m_left & ~m_up);
sarge_down2 = (m_down & ~m_left) | (m_right & ~m_up);
sarge_up3 = (m_up2 & ~m_left2) | (m_right2 & ~m_down2);
sarge_up4 = (m_up2 & ~m_right2) | (m_left2 & ~m_down2);
sarge_down3 = (m_down2 & ~m_right2) | (m_left2 & ~m_up2);
sarge_down4 = (m_down2 & ~m_left2) | (m_right2 & ~m_up2);
sarge_fire1A = m_fireA;
sarge_fire1B = m_fireB;
sarge_fire2A = m_fire2A;
sarge_fire2B = m_fire2B;
end
end
// Power Drive gear
reg [2:0] powerdrv_gear;
always @(posedge clk_sys) begin