From 1610bbd3f68f3e161766ebc366c28961870bf867 Mon Sep 17 00:00:00 2001 From: rej Date: Sun, 10 Nov 2024 16:06:35 +0100 Subject: [PATCH] Macro ROMs: slightly different mapping to make it easier to select macro ROMs with joystick --- src/tt_um_rejunity_atari2600.v | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/src/tt_um_rejunity_atari2600.v b/src/tt_um_rejunity_atari2600.v index 08082bd..43f4ab1 100644 --- a/src/tt_um_rejunity_atari2600.v +++ b/src/tt_um_rejunity_atari2600.v @@ -313,13 +313,9 @@ module tt_um_rejunity_atari2600 ( `ifdef NO_MACRO_ROMS always @(*) - casez ({use_internal_rom, rom_config[3:1]}) - 4'b0zzz: rom_data = external_rom_data; - 4'b10zz: rom_data = internal_rom_data; - 4'b1100: rom_data = internal_rom_data; - 4'b1101: rom_data = internal_rom_data; - 4'b1110: rom_data = internal_rom_data; - 4'b1111: rom_data = internal_rom_data; + casez ({use_internal_rom, rom_config[3:0]}) + 5'b0zzzz: rom_data = external_rom_data; + default: rom_data = internal_rom_data; endcase `else rom_2600_0 rom0_I ( @@ -351,13 +347,13 @@ module tt_um_rejunity_atari2600 ( rom3_data_r <= rom3_data; end always @(*) - casez ({use_internal_rom, rom_config[3:1]}) - 4'b0zzz: rom_data = external_rom_data; - 4'b10zz: rom_data = internal_rom_data; - 4'b1100: rom_data = rom0_data_r; - 4'b1101: rom_data = rom1_data_r; - 4'b1110: rom_data = rom2_data_r; - 4'b1111: rom_data = rom3_data_r; + casez ({use_internal_rom, rom_config[3:0]}) + 5'b0zzzz: rom_data = external_rom_data; + 5'b10001: rom_data = rom0_data_r; + 5'b10010: rom_data = rom1_data_r; + 5'b10100: rom_data = rom2_data_r; + 5'b11000: rom_data = rom3_data_r; + default: rom_data = internal_rom_data; endcase `endif