1
0
mirror of https://github.com/mist-devel/mist-board.git synced 2026-02-05 07:34:41 +00:00

C64: [VIC2] fix VIC address out (phi1test.prg)

This commit is contained in:
Gyorgy Szombathelyi
2020-04-23 21:35:59 +02:00
parent 5a6e03ab68
commit 51da86634c
2 changed files with 13 additions and 8 deletions

View File

@@ -509,7 +509,7 @@ begin
vic: entity work.video_vicii_656x
generic map (
registeredAddress => false,
emulateRefresh => false,
emulateRefresh => true,
emulateLightpen => true,
emulateGraphics => true
)

View File

@@ -379,9 +379,6 @@ vicStateMachine: process(clk)
vicAddrLoc <= CB & nextChar(7 downto 0) & rowCounter;
end if;
end if;
if ECM = '1' then
vicAddrLoc(10 downto 9) <= "00";
end if;
case vicCycle is
when cycleRefresh1 | cycleRefresh2 | cycleRefresh3 | cycleRefresh4 | cycleRefresh5 =>
@@ -393,19 +390,27 @@ vicStateMachine: process(clk)
when cycleSpriteBa1 | cycleSpriteBa2 | cycleSpriteBa3 =>
vicAddrLoc <= (others => '1');
when cycleSpriteA =>
vicAddrLoc <= VM & "1111111" & sprite;
if phi = '1' then
vicAddrLoc <= MPtr & MCnt(to_integer(sprite));
if MDMA_Next(to_integer(sprite)) then
vicAddrLoc <= MPtr & MCnt(to_integer(sprite));
end if;
else
vicAddrLoc <= VM & "1111111" & sprite;
end if;
when cycleSpriteB =>
vicAddrLoc <= MPtr & MCnt(to_integer(sprite));
if MDMA_Next(to_integer(sprite)) then
vicAddrLoc <= MPtr & MCnt(to_integer(sprite));
end if;
when others =>
if ECM = '1' then
vicAddrLoc(10 downto 9) <= "00";
end if;
if phi = '1' then
vicAddrLoc <= VM & colCounter;
end if;
end case;
end process;
-- Registered address
process(clk)
begin