2

I have been working on a CHIP8 emulator and am using the hex-editor in notepad++ to view the hex values. I happened to notice that some of the games like "Blitz" by David Winter have an odd number of bytes.

Blitx properties window

Blitz hex data

In CHIP8, each opcode is 2 bytes long, so there should be an even number of bytes, right?

zubergu
  • 3,646
  • 3
  • 25
  • 38
Hele
  • 1,558
  • 4
  • 23
  • 39

1 Answers1

6

As you can see in the hex dump, the author has embedded the string BLITZ By David WINTER into the ROM. Maybe this string is shown somewhere in the game, or maybe it's just his little way of signing his creation.

The string is 21 characters long, which is why you end up with an odd file size.
The game begins with the instruction 0x1217, which is a jump to address 0x217. That corresponds to the first byte following the string, since games are loaded into memory at address 0x200.

Michael
  • 57,169
  • 9
  • 80
  • 125
  • 1
    To add to this, CHIP-8 games can include all kinds of data, including sprites. These can also be an odd number of bytes. – tobiasvl Nov 04 '19 at 22:29