wire [11:0] tileaddr_in = vraminuse ? tileaddr : addr[12:1];
always @(negedge clk)
- if ((vraminuse && ((posx == 1) || ((posx > 2) && (vxpos[2:0] == 3'b110)))) || decode_bgmap1) begin
+ if ((vraminuse && ((posx == 1) || (vxpos[2:0] == 3'b110))) || decode_bgmap1) begin
tileno <= bgmap1[bgmapaddr_in];
if (wr && decode_bgmap1 && ~vraminuse)
bgmap1[bgmapaddr_in] <= data;
end
always @(negedge clk)
- if ((vraminuse && ((posx == 2) || ((posx > 2) && (vxpos[2:0] == 3'b111)))) || decode_tiledata) begin
+ if ((vraminuse && ((posx == 2) || (vxpos[2:0] == 3'b111))) || decode_tiledata) begin
tilehigh <= tiledatahigh[tileaddr_in];
tilelow <= tiledatalow[tileaddr_in];
if (wr && addr[0] && decode_tiledata && ~vraminuse)