21 lines
513 B
C++
21 lines
513 B
C++
|
#include <iostream>
|
||
|
#include <fstream>
|
||
|
#include <cartridge/cartridge.h>
|
||
|
|
||
|
int main(int argc, char** argv)
|
||
|
{
|
||
|
if(argc < 2) return 1;
|
||
|
|
||
|
std::ifstream file;
|
||
|
file.open(argv[1]);
|
||
|
|
||
|
Cartridge cart(file);
|
||
|
|
||
|
std::cout << std::hex << "Path: " << argv[1] << " (size " << cart.size() << ")" << std::endl;
|
||
|
std::cout << "title: " << cart.title() << std::endl;
|
||
|
std::cout << std::hex << "cgb flag: " << (int)cart[0x143] << std::endl;
|
||
|
std::cout << std::hex << "type: " << (int)cart[0x147] << std::endl;
|
||
|
|
||
|
return 0;
|
||
|
}
|