mirror of
https://github.com/mist-devel/mist-board.git
synced 2026-01-27 20:27:12 +00:00
[SPECTRUM] Video top left pixels fix and NMI on F11
This commit is contained in:
@@ -52,6 +52,7 @@ always @(posedge clk) begin
|
||||
m1_trigger <= 1'b0;
|
||||
paged_in <= 1'b0;
|
||||
ctrl <= 8'h00;
|
||||
sd_cs <= 1'b1;
|
||||
end else begin
|
||||
spi_rx_strobe = 1'b0;
|
||||
spi_tx_strobe = 1'b0;
|
||||
|
||||
@@ -52,7 +52,9 @@ port (
|
||||
-- CPU address bus (row)
|
||||
A : in std_logic_vector(15 downto 0);
|
||||
-- Column outputs to ULA
|
||||
KEYB : out std_logic_vector(4 downto 0)
|
||||
KEYB : out std_logic_vector(4 downto 0);
|
||||
|
||||
F11 : out std_logic
|
||||
);
|
||||
end keyboard;
|
||||
|
||||
@@ -204,6 +206,8 @@ begin
|
||||
when X"76" => keys(0)(0) <= release; -- Escape (CAPS SPACE)
|
||||
keys(7)(0) <= release;
|
||||
|
||||
when X"78" => F11 <= release; -- F11 key
|
||||
|
||||
when others =>
|
||||
null;
|
||||
end case;
|
||||
|
||||
@@ -450,7 +450,9 @@ port (
|
||||
-- CPU address bus (row)
|
||||
A : in std_logic_vector(15 downto 0);
|
||||
-- Column outputs to ULA
|
||||
KEYB : out std_logic_vector(4 downto 0)
|
||||
KEYB : out std_logic_vector(4 downto 0);
|
||||
|
||||
F11 : out std_logic
|
||||
);
|
||||
end component;
|
||||
|
||||
@@ -601,6 +603,7 @@ signal divmmc_paged_in : std_logic;
|
||||
signal divmmc_sram_page: std_logic_vector(3 downto 0);
|
||||
signal divmmc_mapram : std_logic;
|
||||
signal divmmc_conmem : std_logic;
|
||||
signal key_f11 : std_logic;
|
||||
|
||||
-- Master clock - 28 MHz
|
||||
signal clk112 : std_logic;
|
||||
@@ -822,7 +825,8 @@ begin
|
||||
d => sdram_do
|
||||
);
|
||||
|
||||
LED <= '0';
|
||||
-- use led as the sd card access led
|
||||
LED <= divmmc_cs;
|
||||
|
||||
process(clock)
|
||||
begin
|
||||
@@ -928,15 +932,15 @@ begin
|
||||
cpu_irq_n <= vid_irq_n;
|
||||
-- Unused CPU input signals
|
||||
cpu_wait_n <= '1';
|
||||
-- trigger nmi either with the OSD or with the joystick
|
||||
cpu_nmi_n <= '0' when status(2) = '1' or joystickA(7) = '1' or joystickB(7) = '1' else '1';
|
||||
-- trigger nmi either with F11, the OSD or with the joystick
|
||||
cpu_nmi_n <= '0' when key_f11 = '1' or status(2) = '1' or joystickA(7) = '1' or joystickB(7) = '1' else '1';
|
||||
cpu_busreq_n <= '1';
|
||||
|
||||
-- Keyboard
|
||||
kb: keyboard port map (
|
||||
clock, reset_n,
|
||||
ps2_clk, ps2_data,
|
||||
cpu_a, keyb
|
||||
cpu_a, keyb, key_f11
|
||||
);
|
||||
|
||||
-- ULA port
|
||||
@@ -952,7 +956,7 @@ begin
|
||||
|
||||
-- ULA video
|
||||
vid: video port map (
|
||||
clock, vid_clken, reset_n,
|
||||
clock, vid_clken, pll_locked, -- reset_n,
|
||||
not scandoubler_disable,
|
||||
vid_a, sdram_do, vid_rd_n, vid_wait_n,
|
||||
ula_border,
|
||||
|
||||
@@ -356,7 +356,7 @@ begin
|
||||
vblanking <= '1';
|
||||
vsync <= '1';
|
||||
-- Assert vsync interrupt
|
||||
nIRQ <= '0';
|
||||
nIRQ <= '0';
|
||||
when "0111111" =>
|
||||
-- End of vsync after 4 lines (line 252)
|
||||
vsync <= '0';
|
||||
@@ -364,7 +364,7 @@ begin
|
||||
-- End of blanking and start of top border (line 256)
|
||||
-- Should be line 264 but this is simpler and doesn't really make
|
||||
-- any difference
|
||||
vblanking <= '0';
|
||||
vblanking <= '0';
|
||||
when others =>
|
||||
null;
|
||||
end case;
|
||||
@@ -372,7 +372,8 @@ begin
|
||||
-- Wrap vertical counter at line 312-1,
|
||||
-- Top counter value is 623 for VGA, 622 for PAL
|
||||
if vcounter(9 downto 1) = "100110111" then
|
||||
if (VGA = '1' and vcounter(0) = '1') or VGA = '0' then
|
||||
if ((VGA = '1' and vcounter(0) = '1' and hcounter = "1101111110") or
|
||||
(VGA = '0' and hcounter = "1101111111")) then
|
||||
-- Start of picture area
|
||||
vcounter <= (others => '0');
|
||||
-- Increment the flash counter once per frame
|
||||
|
||||
Reference in New Issue
Block a user