Skip to content

Commit

Permalink
Merge pull request #6 from MEGA65/m65pcb-ports
Browse files Browse the repository at this point in the history
write to chipram and shadow ram when writing to colour RAM via $1F800…
  • Loading branch information
frehwagen authored Nov 18, 2017
2 parents aac9447 + 1db9174 commit 07cacee
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions src/vhdl/gs4510.vhdl
Original file line number Diff line number Diff line change
Expand Up @@ -2107,9 +2107,23 @@ begin


if real_long_address(27 downto 12) = x"001F" and real_long_address(11)='1' then
-- colour ram access: remap to $FF80000 - $FF807FF
-- Colour RAM writing is complex! we have to write also to chip and
-- shadow RAM.

-- Write to shadow RAM
shadow_write <= '1';
rom_write <= '0';
shadow_write_flags(3) <= '1';

-- Write to CHIP RAM
chipram_address <= long_address(16 downto 0);
chipram_we <= '1';
chipram_datain <= value;
report "writing to chipram..." severity note;

-- Then remap to colour ram access: remap to $FF80000 - $FF807FF
long_address := x"FF80"&'0'&real_long_address(10 downto 0);

elsif real_long_address(27 downto 16) = x"7F4" then
long_address := x"FF80"&'0'&real_long_address(10 downto 0);
else
Expand Down

0 comments on commit 07cacee

Please sign in to comment.