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

Merge pull request #113 from gyurco/gameboy

[Gameboy] Fix CGB cart detection
This commit is contained in:
gyurco
2019-07-18 16:31:23 +02:00
committed by GitHub

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