Hi, I’m hoping someone can help me read some bytes from files. See i’m kind of making/porting a Chip-8 emulator and I need to read the roms, I thought that I could just take my rom and name it "romname.bytes"but this is not working? I’m reading the bytes but it just is not giving me the results I need, I have tried multiple roms, the results are numbers like “238”, “0”, “106” just to name a few but there are many numbers, this is a snippet of the code:
This is used to load the TextAsset:
public bool LoadProgram(TextAsset rom)
{
//load file
byte[] loadedProgramBytes = rom.bytes;
for(int x = 0; x < loadedProgramBytes.Length; x++)
{
Debug.Log (""+ loadedProgramBytes[x]);
}
}
And this is the code I use to initiate that function:
public CHIPP8 chip82;
public TextAsset game;
void Start ()
{
chip82.LoadProgram(game);
}
Any help would be greatly appreciated ![]()