Palm-Studios/sh3redux

Weird input into vfile

Quaker762 opened this issue · 3 comments

I'm getting weird values in the color palette of sys_konami.tex (section pic.arc, directory offset 0xE10, file offset 0x56C3E80). For some reason it's adding a few values of 0x0D in there? I'm not sure if this is due to the vfile buffer, or whether the problem lies in sh3_arc::LoadFile

Here's the problem, I'm stumped as to why this is happening..

I can confirm that Dump2Disk() isn't the issue, as the palette I'm dumping also contains the rogue values.

z33ky commented

Are you certain it's not Dump2Disk()? It looks like out_file should be opened in binary mode (std::ios_base::binary).
How are you dumping the palette?

It looks like out_file should be opened in binary mode (std::ios_base::binary).

It looks like that was what was causing the bytes to be inserted in both the palette and Dump2Disk(). What causes the ofstream to insert these bytes when it isn't opened as binary??

z33ky commented