1
0
mirror of https://github.com/mist-devel/mist-board.git synced 2026-02-05 07:34:41 +00:00

[Gameboy] Fix CGB cart detection

This commit is contained in:
Gyorgy Szombathelyi
2019-07-17 18:12:47 +02:00
parent 979de62a11
commit ddd7239bf7

View File

@@ -328,9 +328,9 @@ always @(posedge clk64) begin
if(dio_download && dio_write) begin
// cart is stored in 16 bit wide sdram, so addresses are shifted right
case(dio_addr)
24'h142: cart_cgb_flag <= dio_data[15:8];
24'ha3: cart_mbc_type <= dio_data[7:0]; // $147
24'ha4: { cart_rom_size, cart_ram_size } <= dio_data; // $148/$149
24'ha1: cart_cgb_flag <= dio_data[7:0]; // $143
24'ha3: cart_mbc_type <= dio_data[7:0]; // $147
24'ha4: { cart_rom_size, cart_ram_size } <= dio_data; // $148/$149
endcase
end
end