mirror of
https://github.com/Gehstock/Mist_FPGA.git
synced 2026-01-21 01:57:28 +00:00
Midway MCR3Mono: add Demolition Derby
This commit is contained in:
parent
2775965d95
commit
45e8bcc703
@ -2,8 +2,8 @@ Midway MCR Monoboard MiST port
|
||||
|
||||
Common controls:
|
||||
ESC - coin for all players
|
||||
5,6,7 - coin for player 1,2,3 (MAME compatible)
|
||||
F1,F2,F3 (or 1,2,3) - player 1,2,3 start
|
||||
5,6,7,8 - coin for player 1,2,3,4 (MAME compatible)
|
||||
F1,F2,F3 (or 1,2,3) - player 1,2,3,4 start
|
||||
Controller 1 and 2 can be substitued with MAME-keys
|
||||
|
||||
Supported games:
|
||||
@ -32,12 +32,19 @@ Buttons 1,2 - Gas
|
||||
Button 3 - Wheelie
|
||||
Button 4 - Shift
|
||||
|
||||
Demolition Derby
|
||||
================
|
||||
4 players support
|
||||
Gas: Button 1
|
||||
Brake: Button 2
|
||||
Steering: Left/Right
|
||||
|
||||
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 -A -z /path/to/mame/roms Rampage.mra
|
||||
Copy the RBF and the ARC files to the same folder.
|
||||
Copy the ROM files to the root of the SD Card.
|
||||
|
||||
MRA utilty: https://github.com/sebdel/mra-tools-c
|
||||
|
||||
@ -219,6 +219,7 @@ set_global_assignment -name SYSTEMVERILOG_FILE rtl/sdram.sv
|
||||
set_global_assignment -name VHDL_FILE rtl/pll_mist.vhd
|
||||
set_global_assignment -name VHDL_FILE rtl/sounds_good.vhd
|
||||
set_global_assignment -name VHDL_FILE rtl/turbo_cheap_squeak.vhd
|
||||
set_global_assignment -name VHDL_FILE rtl/spinner.vhd
|
||||
set_global_assignment -name VHDL_FILE rtl/spy_hunter_control.vhd
|
||||
set_global_assignment -name QIP_FILE ../../common/IO/Z80CTC/z80ctc.qip
|
||||
set_global_assignment -name QIP_FILE ../../common/CPU/68000/FX68k/fx68k.qip
|
||||
|
||||
37
Arcade_MiST/Midway MCR 3 Monoboard/meta/Demolition Derby.mra
Normal file
37
Arcade_MiST/Midway MCR 3 Monoboard/meta/Demolition Derby.mra
Normal file
@ -0,0 +1,37 @@
|
||||
<misterromdescription>
|
||||
<name>Demolition Derby</name>
|
||||
<mameversion>0216</mameversion>
|
||||
<mratimestamp>201912310000</mratimestamp>
|
||||
<year>1984</year>
|
||||
<manufacturer>Bally Midway</manufacturer>
|
||||
<category>Action</category>
|
||||
<rbf>MCR3Mono</rbf>
|
||||
<setname>demoderm</setname>
|
||||
<switches>
|
||||
<dip bits="8" name="Cabinet" ids="2P Upright,4P Cocktail"/>
|
||||
<dip bits="9" name="Difficulty" ids="Normal,Hard"/>
|
||||
<dip bits="10" name="Free Play" ids="Off,On"/>
|
||||
<dip bits="11" name="Reward Screen" ids="Expanded,Limited"/>
|
||||
</switches>
|
||||
<rom index="1">
|
||||
<part>04</part>
|
||||
</rom>
|
||||
<rom index="0" zip="demoderb.zip|demoderm.zip" md5="0063f035348ccdbf21c2566cb4893498" type="merged|nonmerged">
|
||||
<part crc="2e24527b" name="pro0.3b"/>
|
||||
<part crc="034c00fc" name="pro1.5b"/>
|
||||
<part crc="e57a4de6" name="dd_fg-0.a4"/>
|
||||
<part crc="55aa667f" name="dd_fg-4.a3"/>
|
||||
<part crc="70259651" name="dd_fg-1.a6"/>
|
||||
<part crc="5fe99007" name="dd_fg-5.a5"/>
|
||||
<part crc="6cab7b95" name="dd_fg-2.a8"/>
|
||||
<part crc="abfb9a8b" name="dd_fg-6.a7"/>
|
||||
<part crc="801d9b86" name="dd_fg-3.a10"/>
|
||||
<part crc="0ec3f60a" name="dd_fg-7.a9"/>
|
||||
<part crc="a35d13b8" repeat="2" name="bg0.15a"/>
|
||||
<part crc="22ca93f3" repeat="2" name="bg1.14b"/>
|
||||
<part crc="eca33b2c" name="tcs_u5.bin"/>
|
||||
<part crc="3490289a" name="tcs_u4.bin"/>
|
||||
<part crc="eca33b2c" name="tcs_u5.bin"/>
|
||||
<part crc="3490289a" name="tcs_u4.bin"/>
|
||||
</rom>
|
||||
</misterromdescription>
|
||||
@ -79,7 +79,7 @@ reg [7:0] output6;
|
||||
|
||||
// Game specific sound board/DIP/input settings
|
||||
always @(*) begin
|
||||
if (core_mod == 7'h1 || core_mod == 7'h3)
|
||||
if (core_mod == 7'h1 || core_mod == 7'h3 || core_mod == 7'h4)
|
||||
sg = 0;
|
||||
else
|
||||
sg = 1;
|
||||
@ -123,6 +123,14 @@ always @(*) begin
|
||||
input2 = ~{maxrpm_gear1, maxrpm_gear2};
|
||||
input3[0] = ~status[8]; // free play
|
||||
end
|
||||
7'h4: // DEMODERB
|
||||
begin
|
||||
input0 = ~{2'b00, service, 1'b0, m_two_players, m_one_player, m_coin2, m_coin1};
|
||||
input1 = dderby_input_sel ? ~{wheel3, m_fireB, m_fireA} : ~{wheel1, m_fireB, m_fireA};
|
||||
input2 = dderby_input_sel ? ~{wheel4, m_fire2B, m_fire2A} : ~{wheel2, m_fire2B, m_fire2A};
|
||||
input3 = ~{3'b000, status[11], status[10], status[9], status[8]}; // NU, coins/credit, girl, free play, difficulty, 2player
|
||||
input4 = ~{m_fire4B, m_fire4A, m_fire3B, m_fire3A, m_four_players, m_three_players, m_coin4, m_coin3};
|
||||
end
|
||||
default: ;
|
||||
endcase
|
||||
end
|
||||
@ -190,7 +198,7 @@ wire [7:0] ioctl_dout;
|
||||
/*
|
||||
ROM structure:
|
||||
|
||||
Sarge, MaxRPM (Turbo Cheap Squeak board):
|
||||
Sarge, MaxRPM, Demolition Derby (Turbo Cheap Squeak board):
|
||||
00000-0FFFF MAIN CPU 64k
|
||||
10000-2FFFF GFX2 (Sprites) 128k
|
||||
30000-37FFF GFX1 32k
|
||||
@ -359,8 +367,8 @@ mcr3mono mcr3mono (
|
||||
|
||||
wire vs_out;
|
||||
wire hs_out;
|
||||
assign VGA_HS = ((~no_csync & scandoublerD) || ypbpr)? cs : hs_out;
|
||||
assign VGA_VS = ((~no_csync & scandoublerD) || ypbpr)? 1'b1 : vs_out;
|
||||
assign VGA_HS = (~no_csync & scandoublerD & ~ypbpr)? cs : hs_out;
|
||||
assign VGA_VS = (~no_csync & scandoublerD & ~ypbpr)? 1'b1 : vs_out;
|
||||
|
||||
mist_video #(.COLOR_DEPTH(3)) mist_video(
|
||||
.clk_sys ( clk_sys ),
|
||||
@ -513,6 +521,24 @@ always @(posedge clk_sys) begin
|
||||
end
|
||||
end
|
||||
|
||||
// Demolition Derby
|
||||
reg dderby_input_sel;
|
||||
always @(posedge clk_sys) begin
|
||||
if (reset)
|
||||
dderby_input_sel <= 0;
|
||||
else begin
|
||||
if (output6[7]) dderby_input_sel <= 0;
|
||||
else if (output6[6]) dderby_input_sel <= 1;
|
||||
end
|
||||
end
|
||||
|
||||
wire [5:0] wheel1, wheel2, wheel3, wheel4;
|
||||
spinner spinner1 (clk_sys, reset, m_left, m_right, 1'b0, vs, wheel1);
|
||||
spinner spinner2 (clk_sys, reset, m_left2, m_right2, 1'b0, vs, wheel2);
|
||||
spinner spinner3 (clk_sys, reset, m_left3, m_right3, 1'b0, vs, wheel3);
|
||||
spinner spinner4 (clk_sys, reset, m_left4, m_right4, 1'b0, vs, wheel4);
|
||||
|
||||
// Common inputs
|
||||
wire m_up, m_down, m_left, m_right, m_fireA, m_fireB, m_fireC, m_fireD;
|
||||
wire m_up2, m_down2, m_left2, m_right2, m_fire2A, m_fire2B, m_fire2C, m_fire2D;
|
||||
wire m_up3, m_down3, m_left3, m_right3, m_fire3A, m_fire3B, m_fire3C, m_fire3D;
|
||||
|
||||
@ -355,7 +355,7 @@ begin
|
||||
if hcnt = 633 then
|
||||
hcnt <= (others=>'0');
|
||||
vcnt <= vcnt + 1;
|
||||
if (vcnt = 524 and tv15Khz_mode = '0') or (vcnt = 263 and tv15Khz_mode = '1') then
|
||||
if (vcnt = 511 and tv15Khz_mode = '0') or (vcnt = 255 and tv15Khz_mode = '1') then
|
||||
vcnt <= (others=>'0');
|
||||
top_frame <= not top_frame;
|
||||
end if;
|
||||
@ -455,7 +455,7 @@ cpu_di <= cpu_rom_do when cpu_mreq_n = '0' and cpu_addr(15 downto 12) <
|
||||
wram_do when cpu_mreq_n = '0' and (cpu_addr and X"F800") = x"E000" else -- E000-E7FF
|
||||
sp_ram_cache_do_r when cpu_mreq_n = '0' and (cpu_addr and x"FC00") = x"E800" else -- sprite ram E800-E9FF + mirroring 0200
|
||||
bg_ram_do_r when cpu_mreq_n = '0' and (cpu_addr and x"F800") = x"F000" else -- video ram F000-F7FF
|
||||
ctc_do when cpu_int_ack_n = '0' or ctc_ce = '1' else -- ctc (interrupt vector or counter data)
|
||||
ctc_do when cpu_int_ack_n = '0' or ctc_ce = '1' else -- ctc (interrupt vector or counter data)
|
||||
ssio_do when cpu_ioreq_n = '0' and cpu_addr(7 downto 5) = "000" else -- 0x00-0x1F
|
||||
X"FF";
|
||||
|
||||
|
||||
46
Arcade_MiST/Midway MCR 3 Monoboard/rtl/spinner.vhd
Normal file
46
Arcade_MiST/Midway MCR 3 Monoboard/rtl/spinner.vhd
Normal file
@ -0,0 +1,46 @@
|
||||
library ieee;
|
||||
use ieee.std_logic_1164.all;
|
||||
use ieee.std_logic_unsigned.all;
|
||||
use ieee.numeric_std.all;
|
||||
|
||||
entity spinner is
|
||||
port(
|
||||
clock_40 : in std_logic;
|
||||
reset : in std_logic;
|
||||
btn_left : in std_logic;
|
||||
btn_right : in std_logic;
|
||||
btn_acc : in std_logic; -- speed up button
|
||||
ctc_zc_to_2 : in std_logic;
|
||||
spin_angle : out std_logic_vector(6 downto 0)
|
||||
);
|
||||
end spinner;
|
||||
|
||||
architecture rtl of spinner is
|
||||
|
||||
signal ctc_zc_to_2_r : std_logic;
|
||||
signal spin_count : std_logic_vector(9 downto 0);
|
||||
|
||||
begin
|
||||
|
||||
spin_angle <= spin_count(9 downto 3);
|
||||
|
||||
process (clock_40, reset)
|
||||
begin
|
||||
if reset = '1' then
|
||||
spin_count <= (others => '0');
|
||||
elsif rising_edge(clock_40) then
|
||||
ctc_zc_to_2_r <= ctc_zc_to_2;
|
||||
|
||||
if ctc_zc_to_2_r ='0' and ctc_zc_to_2 = '1' then
|
||||
if btn_acc = '0' then -- space -- speed up
|
||||
if btn_left = '1' then spin_count <= spin_count - 40; end if; -- left
|
||||
if btn_right = '1' then spin_count <= spin_count + 40; end if; -- right
|
||||
else
|
||||
if btn_left = '1' then spin_count <= spin_count - 55; end if;
|
||||
if btn_right = '1' then spin_count <= spin_count + 55; end if;
|
||||
end if;
|
||||
end if;
|
||||
end if;
|
||||
end process;
|
||||
|
||||
end rtl;
|
||||
Loading…
x
Reference in New Issue
Block a user