Print cartridge info when loaded

This commit is contained in:
Fabien Freling 2019-06-07 14:25:10 +02:00
parent f0cab3f1c6
commit e260011665
2 changed files with 22 additions and 21 deletions

View file

@ -114,4 +114,5 @@ let print_info cartridge =
printf "Title: %s\n" cartridge.title;
printf "Mem. type: %s\n" (cartridge.mem_type |> mem_type_name);
printf "ROM size: %iKB\n" cartridge.rom_size;
printf "RAM size: %iKB\n" cartridge.ram_size
printf "RAM size: %iKB\n" cartridge.ram_size;
print_newline ()

View file

@ -12,5 +12,5 @@ let load_cartridge file =
let cartridge = Cartridge.read_cartridge file in
!state.cartridge <- cartridge;
match cartridge with
| Some _ -> true
| Some c -> Cartridge.print_info c; true
| None -> false