45 const uint32_t header_offset = 0x7FC0;
48 std::string title =
"YAZE TEST ROM ";
49 std::copy(title.begin(), title.end(),
test_rom_.begin() + header_offset);
73 uint16_t checksum = 0;
74 for (
size_t i = 0; i <
test_rom_.size(); ++i) {
75 if (i != header_offset + 28 && i != header_offset + 29 &&
76 i != header_offset + 30 && i != header_offset + 31) {
81 uint16_t checksum_complement = checksum ^ 0xFFFF;
82 test_rom_[header_offset + 28] = checksum_complement & 0xFF;
83 test_rom_[header_offset + 29] = (checksum_complement >> 8) & 0xFF;
84 test_rom_[header_offset + 30] = checksum & 0xFF;
85 test_rom_[header_offset + 31] = (checksum >> 8) & 0xFF;
88 const uint32_t reset_vector_offset = 0x8000;
90 test_rom_[reset_vector_offset + 1] = 0xFB;
91 test_rom_[reset_vector_offset + 2] = 0x4C;
92 test_rom_[reset_vector_offset + 3] = 0x00;
93 test_rom_[reset_vector_offset + 4] = 0x80;