Skip to content

Commit

Permalink
QSPI: rom_config now addresses in 64KB blocks. Base address is 1MB (0…
Browse files Browse the repository at this point in the history
…x10_0000) and up.

iCEBreaker: don't set ui_in[7] during the reset cycle since it is mapped onto the button that causes the reset.
  • Loading branch information
rejunity committed Nov 10, 2024
1 parent 4f13f82 commit 26c8daa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion fpga/icebreaker.v
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ module top (
tt_um_rejunity_atari2600 atari2600(
// localparam UP = 3, RIGHT = 6, LEFT = 5, DOWN = 4, SELECT = 2, RESET = 0, FIRE = 1;
// .ui_in({BTN3, BTN2, BTN3, BTN2, 1'b0, BTN1, BTN_N}),
.ui_in({~BTN_N, 1'b0, 1'b0, BTN1, BTN3, BTN2, BTN3, BTN2}),
.ui_in({reset ? 1'b0 : ~BTN_N, 1'b0, 1'b0, BTN1, BTN3, BTN2, BTN3, BTN2}),
.uo_out(pmod1_out),
.uio_in(pmod2_in),
.uio_out(pmod2_out),
Expand Down
4 changes: 2 additions & 2 deletions src/tt_um_rejunity_atari2600.v
Original file line number Diff line number Diff line change
Expand Up @@ -315,8 +315,8 @@ module tt_um_rejunity_atari2600 (

`ifdef QSPI_ROM
reg spi_restart;
wire [23:0] spi_address = {4'b0001, rom_config[7:0], address_bus[11:0]}; // iceprog -o1024k
// wire [23:0] spi_address = address_bus[11:0] + 24'h10_00_00; // iceprog -o1024k
// wire [23:0] spi_address = {4'b0001, rom_config[7:0], address_bus[11:0]}; // iceprog -o1024k
wire [23:0] spi_address = {rom_config[7:5], 1'b1, rom_config[3:0], 4'b0000, address_bus[11:0]}; // iceprog -o1024k
wire need_new_rom_data = valid_rom_address_on_bus && (rom_data_pending == 0) && !rom_addr_in_cache;
wire spi_start_read = !spi_busy && (need_new_rom_data || spi_restart);
wire spi_stop_read = spi_busy && need_new_rom_data;
Expand Down

0 comments on commit 26c8daa

Please sign in to comment.