Skip to content

Commit

Permalink
RAM: small refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
rejunity committed Nov 9, 2024
1 parent f1f1427 commit 8fe5dc8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/atari2600.v
Original file line number Diff line number Diff line change
Expand Up @@ -183,11 +183,11 @@ module atari2600 (
always @(posedge clk) begin
// CPU writes
if (cpu_enable && write_enable && ram_cs) ram[address_bus[6:0]] <= data_out;
// if (~write_enable) ram_data <= ram[address_bus[6:0]];
// if (~write_enable && ram_cs) ram_data <= ram[address_bus[6:0]];

// CPU reads
if (~write_enable)
if (ram_cs) data_in <= ram[address_bus[6:0]];
if (~write_enable &&
ram_cs) data_in <= ram[address_bus[6:0]];
if (rom_cs) data_in <= rom_data;
if (tia_cs) data_in <= tia_data_out;
if (pia_cs) data_in <= pia_data_out;
Expand Down

0 comments on commit 8fe5dc8

Please sign in to comment.