mirror of
https://github.com/Gehstock/Mist_FPGA.git
synced 2026-01-20 01:34:38 +00:00
Crater Raider: add MRA file, adjust spinner speed
This commit is contained in:
parent
704bedbc94
commit
5bf298591d
@ -1,3 +1,10 @@
|
||||
-- Crater Raider MiST port
|
||||
--
|
||||
-- Usage:
|
||||
-- Create ROM file from MRA file and MAME crater.zip file using the MRA utility
|
||||
-- Copy the ROM and the RBF to the SD Card
|
||||
-- MRA utility: https://github.com/sebdel/mra-tools-c
|
||||
--
|
||||
---------------------------------------------------------------------------------
|
||||
-- DE10_lite Top level for Crater Raider (Midway MCR) by Dar (darfpga@aol.fr) (06/12/2019)
|
||||
-- http://darfpga.blogspot.fr
|
||||
|
||||
@ -0,0 +1,36 @@
|
||||
<misterromdescription>
|
||||
<name>Crater Raider</name>
|
||||
<mameversion>0216</mameversion>
|
||||
<mratimestamp>201912310000</mratimestamp>
|
||||
<year>1984</year>
|
||||
<manufacturer>Bally Midway</manufacturer>
|
||||
<category>Action</category>
|
||||
<setname>crater</setname>
|
||||
<rom index="0" zip="crater.zip" md5="a791478c9a65b783be60605fe3fae271" type="merged|nonmerged">
|
||||
<part crc="ad31f127" name="crcpu.6d"/>
|
||||
<part crc="3743c78f" name="crcpu.7d"/>
|
||||
<part crc="c95f9088" name="crcpu.8d"/>
|
||||
<part crc="a03c4b11" name="crcpu.9d"/>
|
||||
<part crc="44ae4cbd" name="crcpu.10d"/>
|
||||
|
||||
<part crc="fd666cb5" name="crsnd4.a7"/>
|
||||
<part crc="90bf2c4c" name="crsnd1.a8"/>
|
||||
<part crc="3b8deef1" name="crsnd2.a9"/>
|
||||
<part crc="05803453" name="crsnd3.a10"/>
|
||||
|
||||
<part crc="579a8e36" name="crvid.a4"/>
|
||||
<part crc="2c2f5b29" name="crvid.a3"/>
|
||||
<part crc="5bf954e0" name="crvid.a6"/>
|
||||
<part crc="9bdec312" name="crvid.a5"/>
|
||||
<part crc="4b913498" name="crvid.a8"/>
|
||||
<part crc="9fa307d5" name="crvid.a7"/>
|
||||
<part crc="7a22d6bc" name="crvid.a10"/>
|
||||
<part crc="811f152d" name="crvid.a9"/>
|
||||
|
||||
<part crc="9d73504a" name="crcpu.3a"/>
|
||||
<part crc="42a47dff" name="crcpu.4a"/>
|
||||
<part crc="2fe4a6e1" name="crcpu.5a"/>
|
||||
<part crc="d0659042" name="crcpu.6a"/>
|
||||
<part crc="6fe53c8d" name="crcpu.10g"/>
|
||||
</rom>
|
||||
</misterromdescription>
|
||||
@ -52,6 +52,7 @@ localparam CONF_STR = {
|
||||
"O2,Rotate Controls,Off,On;",
|
||||
"O5,Blend,Off,On;",
|
||||
"O6,Service,Off,On;",
|
||||
"O7,Spinner Speed,Low,High;",
|
||||
"T0,Reset;",
|
||||
"V,v1.1.",`BUILD_DATE
|
||||
};
|
||||
@ -59,6 +60,7 @@ localparam CONF_STR = {
|
||||
wire rotate = status[2];
|
||||
wire blend = status[5];
|
||||
wire service = status[6];
|
||||
wire spinspd = status[7];
|
||||
|
||||
assign LED = ~ioctl_downl;
|
||||
assign SDRAM_CLK = clk_mem;
|
||||
@ -81,14 +83,33 @@ wire [7:0] joystick_0;
|
||||
wire [7:0] joystick_1;
|
||||
wire scandoublerD;
|
||||
wire ypbpr;
|
||||
wire [15:0] audio_l, audio_r;
|
||||
wire hs, vs, cs;
|
||||
wire blankn;
|
||||
wire [2:0] g, r, b;
|
||||
wire no_csync;
|
||||
wire key_pressed;
|
||||
wire [7:0] key_code;
|
||||
wire key_strobe;
|
||||
|
||||
user_io #(
|
||||
.STRLEN(($size(CONF_STR)>>3)))
|
||||
user_io(
|
||||
.clk_sys (clk_sys ),
|
||||
.conf_str (CONF_STR ),
|
||||
.SPI_CLK (SPI_SCK ),
|
||||
.SPI_SS_IO (CONF_DATA0 ),
|
||||
.SPI_MISO (SPI_DO ),
|
||||
.SPI_MOSI (SPI_DI ),
|
||||
.buttons (buttons ),
|
||||
.switches (switches ),
|
||||
.scandoubler_disable (scandoublerD ),
|
||||
.ypbpr (ypbpr ),
|
||||
.no_csync ( no_csync ),
|
||||
.key_strobe (key_strobe ),
|
||||
.key_pressed (key_pressed ),
|
||||
.key_code (key_code ),
|
||||
.joystick_0 (joystick_0 ),
|
||||
.joystick_1 (joystick_1 ),
|
||||
.status (status )
|
||||
);
|
||||
|
||||
wire [15:0] rom_addr;
|
||||
wire [15:0] rom_do;
|
||||
wire [13:0] snd_addr;
|
||||
@ -185,13 +206,18 @@ wire [7:0] spin_angle;
|
||||
spinner spinner (
|
||||
.clock_40(clk_sys),
|
||||
.reset(reset),
|
||||
.btn_acc(),
|
||||
.btn_acc(spinspd),
|
||||
.btn_left(m_left),
|
||||
.btn_right(m_right),
|
||||
.ctc_zc_to_2(vs),
|
||||
.spin_angle(spin_angle)
|
||||
);
|
||||
|
||||
wire [15:0] audio_l, audio_r;
|
||||
wire hs, vs, cs;
|
||||
wire blankn;
|
||||
wire [2:0] g, r, b;
|
||||
|
||||
Crater_Raider Crater_Raider(
|
||||
.clock_40(clk_sys),
|
||||
.reset(reset),
|
||||
@ -230,8 +256,8 @@ Crater_Raider Crater_Raider(
|
||||
|
||||
wire vs_out;
|
||||
wire hs_out;
|
||||
assign VGA_VS = scandoublerD | vs_out;
|
||||
assign VGA_HS = scandoublerD ? cs : hs_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), .SD_HCNT_WIDTH(10)) mist_video(
|
||||
.clk_sys ( clk_sys ),
|
||||
@ -257,27 +283,6 @@ mist_video #(.COLOR_DEPTH(3), .SD_HCNT_WIDTH(10)) mist_video(
|
||||
.ypbpr ( ypbpr )
|
||||
);
|
||||
|
||||
user_io #(
|
||||
.STRLEN(($size(CONF_STR)>>3)))
|
||||
user_io(
|
||||
.clk_sys (clk_sys ),
|
||||
.conf_str (CONF_STR ),
|
||||
.SPI_CLK (SPI_SCK ),
|
||||
.SPI_SS_IO (CONF_DATA0 ),
|
||||
.SPI_MISO (SPI_DO ),
|
||||
.SPI_MOSI (SPI_DI ),
|
||||
.buttons (buttons ),
|
||||
.switches (switches ),
|
||||
.scandoubler_disable (scandoublerD ),
|
||||
.ypbpr (ypbpr ),
|
||||
.key_strobe (key_strobe ),
|
||||
.key_pressed (key_pressed ),
|
||||
.key_code (key_code ),
|
||||
.joystick_0 (joystick_0 ),
|
||||
.joystick_1 (joystick_1 ),
|
||||
.status (status )
|
||||
);
|
||||
|
||||
dac #(
|
||||
.C_bits(16))
|
||||
dac_l(
|
||||
|
||||
@ -33,11 +33,11 @@ begin
|
||||
|
||||
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 + 10; end if; -- left
|
||||
if btn_right = '1' then spin_count <= spin_count - 10; end if; -- right
|
||||
if btn_left = '1' then spin_count <= spin_count + 5; end if; -- left
|
||||
if btn_right = '1' then spin_count <= spin_count - 5; 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;
|
||||
if btn_left = '1' then spin_count <= spin_count + 10; end if;
|
||||
if btn_right = '1' then spin_count <= spin_count - 10; end if;
|
||||
end if;
|
||||
end if;
|
||||
end if;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user