Run Rygar CPU at 6MHz

This commit is contained in:
Joshua Bassett
2020-06-30 18:21:38 +10:00
parent d6812bf5ce
commit c63e2014f3
3 changed files with 1 additions and 12 deletions

View File

@@ -234,21 +234,18 @@ package config is
);
constant RYGAR_GAME_CONFIG : game_config_t := (
cpu_freq => 4,
mem_map => RYGAR_MEM_MAP,
snd_map => RYGAR_SND_MAP,
gpu_config => (DEFAULT_TILE_CONFIG, DEFAULT_TILE_CONFIG, DEFAULT_TILE_CONFIG, DEFAULT_SPRITE_CONFIG)
);
constant GEMINI_GAME_CONFIG : game_config_t := (
cpu_freq => 6,
mem_map => GEMINI_MEM_MAP,
snd_map => GEMINI_SND_MAP,
gpu_config => (DEFAULT_TILE_CONFIG, GEMINI_TILE_CONFIG, GEMINI_TILE_CONFIG, GEMINI_SPRITE_CONFIG)
);
constant SILKWORM_GAME_CONFIG : game_config_t := (
cpu_freq => 6,
mem_map => SILKWORM_MEM_MAP,
snd_map => GEMINI_SND_MAP,
gpu_config => (DEFAULT_TILE_CONFIG, DEFAULT_TILE_CONFIG, DEFAULT_TILE_CONFIG, GEMINI_SPRITE_CONFIG)

View File

@@ -119,7 +119,6 @@ architecture arch of tecmo is
signal game_config : game_config_t;
-- CPU signals
signal cpu_cen : std_logic;
signal cpu_addr : unsigned(CPU_ADDR_WIDTH-1 downto 0);
signal cpu_din : byte_t;
signal cpu_dout : byte_t;
@@ -332,7 +331,7 @@ begin
port map (
RESET_n => not reset,
CLK => clk,
CEN => cpu_cen,
CEN => cen_6,
WAIT_n => not (gpu_busy or pause_reg),
INT_n => cpu_int_n,
M1_n => cpu_m1_n,
@@ -523,12 +522,6 @@ begin
-- set game config
game_config <= select_game_config(to_integer(game_index));
-- Set CPU clock enable
--
-- Different games run the CPU clock at different frequencies (i.e. 4Mhz or
-- 6Mhz).
cpu_cen <= cen_6 when game_config.cpu_freq = 6 else cen_4;
-- set chip select signals
prog_rom_1_cs <= '1' when addr_in_range(cpu_addr, game_config.mem_map.prog_rom_1) else '0';
prog_rom_2_cs <= '1' when addr_in_range(cpu_addr, game_config.mem_map.prog_rom_2) else '0';

View File

@@ -192,7 +192,6 @@ package types is
-- game configuration
type game_config_t is record
cpu_freq : natural;
mem_map : mem_map_t;
snd_map : snd_map_t;
gpu_config : gpu_config_t;