summaryrefslogtreecommitdiffstats
path: root/hdl/dpram.vhd
diff options
context:
space:
mode:
Diffstat (limited to 'hdl/dpram.vhd')
-rw-r--r--hdl/dpram.vhd4
1 files changed, 2 insertions, 2 deletions
diff --git a/hdl/dpram.vhd b/hdl/dpram.vhd
index 92b57f2..6cbc338 100644
--- a/hdl/dpram.vhd
+++ b/hdl/dpram.vhd
@@ -164,7 +164,7 @@ begin
if we = '1' then
if addr = "00000000" or
addr = "10000000" then -- 0x00/0x80 INDF: indirect via FSR
- mem(16#03#) <= d_status;
+ mem(16#03#) <= mem(16#03#)(7 downto 3) & d_status(2 downto 0);
mem(to_integer(unsigned(mem(16#04#)))) <= d;
elsif addr = "00000001" then -- 0x01 TMR0: routed to timer0, not RAM
mem(16#03#) <= mem(16#03#)(7 downto 3) & d_status(2 downto 0);
@@ -183,7 +183,7 @@ begin
-- peripheral-mapped addresses: don't write to RAM
mem(16#03#) <= mem(16#03#)(7 downto 3) & d_status(2 downto 0);
else
- mem(16#03#) <= d_status;
+ mem(16#03#) <= mem(16#03#)(7 downto 3) & d_status(2 downto 0);
mem(to_integer(unsigned(addr))) <= d;
end if;
end if;