What's new

about chip8 rom?

HAT39

New member
hello,
the address from 200 until the end is the game program but the address from0 to 199 What does it contain?
 

CHR15x94

Local nut
Chip8 isn't a real system, it is an interpreted machine/bytecode, sorta like Java. In order to run Chip8 games, a computer had to use a Chip8 emulator, there was no hardware that natively executed Chip8 code.

So, $0 - $1FF (not 199, this is hexadecimal, not decimal ;) ) is where the machine code for the emulator would go. If you're curious, the Chip8 emulator was run on an 1802 based machine. You don't need to worry about this while creating your Chip8 emulator*, though.


Anyway, good luck with your emulator. If you need any pointers, I'm happy to help.


- CHR15x94


* Chip8 programs are allowed to execute 1802 machine code, BUT very few actually do. I would stay away from emulating the 1802 until you at least have most, if not all Chip8 games that don't use 1802 code executing correctly. You're just looking to give yourself a headache if you plan to emulate the 1802 as well.
 
Last edited:
OP
H

HAT39

New member
thank you CHR15x94 for your help

that's mean the addresses $0 - $1FF contain the 1802 machine code! but i think it is a OS of CHIP8 like windows :blush:

BTW you said that 'Chip8 isn't a real system, it is an interpreted machine/bytecode'

is there another way to make a chip8 emulator?
 

CHR15x94

Local nut
When I said it's a interpreted machine/bytecode, I just mean there were no processors that ran the CHIP8 instruction set. If you wanted to run a CHIP8 program, it HAD TO be run through an emulator. CHIP8 is a virtual machine (probably should have used that term to begin with, sorry :p ).

Don't worry about this for your emulator. Just load the ROM at $200 and emulate the CHIP8 code as you normally would.


- CHR15x94
 
OP
H

HAT39

New member
i know it is a virtual machine but what i want to know is what does the addresses $0 - $1FF contain?
it is a boot for 1802 CPU?
 

Toasty

Sony battery
$0-$1FF is reserved for the interpreter. That basically means ROMs aren't to mess around with that space's contents, and it's up to the interpreter (your emulator in this case) what the space is used for. Logical uses are the font sprites and the stack.
 
OP
H

HAT39

New member
thank you very much for your helps

what i understood is the address memory $0-$1FF is reserved for the font sprites and the stack(subroutines)
is there a OS inside the memory to start the chip8
 

Top