Page 2 of 2

Re: problem with my repro

Posted: Wed Oct 22, 2014 4:01 pm
by rainwarrior
If you need to know the layout of an .NES ROM file, you can find the information here: http://wiki.nesdev.com/w/index.php/INES

If you can't figure out how to use a hex editor, that's a different problem, but a hex editor is not a complicated or obscure tool. There should be an "address" somewhere that indicates the location in the file where your selection starts or ends. Try to use this to determine how many bytes you have selected.

Re: problem with my repro

Posted: Wed Oct 22, 2014 4:37 pm
by tokumaru
mario wrote:I can select bytes, but I have not find a way to select a quantity of data. What is the secret? :O
Math is the secret.

All hex editors I know of show the address of each row on the right. First you need to get rid of the header, which is 16 bytes. If you don't know hex, you can go to the Windows calculator, switch to the programmer layout and convert 16 from decimal to hex, and you get $10. So start by selecting and deleting everything between (and including) addresses $0 and $F ($10 -1). Then you want to remove the 128KB of PRG-ROM. 128KB is 131072 bytes, which converted to hex is $20000. Select and delete everything between $0 and $1FFFF ($20000 - 1). If the ROM is correct, the remaining 262144 ($40000) bytes will be the CHR-ROM data, which you can save and burn to an EPROM.

Re: problem with my repro

Posted: Sat Oct 25, 2014 11:05 am
by mario
It looks like you just select the bytes you want to get rid of using the mouse/keyboard and press Delete. It works this way in HxD as well: http://mh-nexus.de/en/hxd/

I think my question has been badly interpreted. I know how to select and delete; I meant, how can I select a 128 kb of data? What indicates me when I selected 128kb? :wink:

Re: problem with my repro

Posted: Sat Oct 25, 2014 11:16 am
by tokumaru
Look at the addresses on the left! I gave you all the math.

Re: problem with my repro

Posted: Sat Oct 25, 2014 11:39 am
by Joe
mario wrote:What indicates me when I selected 128kb? :wink:
Look at the status bar. HxD will show the length of your selection in that status bar.

Manually selecting all that data is too much work, though. Check out "select block" in the edit menu.

Re: problem with my repro

Posted: Sun Oct 26, 2014 1:17 pm
by mario
[quote="tokumaru"]

Sorry if I made you repeat, but when I wrote my last message, I was looking at the admin's message, thinking that no one replied. After my post, I saw that there had now 2 page (Yeah, I know, double face palm!).

Thanks for the info my friend (they were perfectly explicated)! I just modificated the rom and I'll program it tonight to see if it works. :D

Re: problem with my repro

Posted: Sun Oct 26, 2014 7:51 pm
by 3gengames
Why would anyone recommend using a hex editor over my ReadNES3? Is there anything wrong? I'll go back, tidy up the code some more, make it better, and git it so anyone can fix/change to their liking.

Re: problem with my repro

Posted: Sun Oct 26, 2014 9:18 pm
by tokumaru
3gengames wrote:Why would anyone recommend using a hex editor over my ReadNES3?
In this particular case, a wrong header appears to be causing the CHR to be smaller than it should. Messing with bitfields just to use the splitter again may be more trouble than just getting the bytes with an hex editor. Anyway, a good feature for a NES ROM splitter is a warning in case the sizes in the header conflict with the size of the ROM file, so at least the user knows that something is wrong BEFORE he goes through the trouble of burning and soldering chips.

Also, if it's just a one time thing and you already have an hex editor you're used to, using it may be quicker than looking online for a tool to do this simple job. If you're doing this to a lot of files though, then sure, a specialized program will probably help get the job done faster.

Re: problem with my repro

Posted: Sun Oct 26, 2014 10:07 pm
by 3gengames
Ah, I thought it was just difficulties in general splitting it, not because of a bad head. I'll que up the "File should be X size" for commit before I make a git for ReadNES3, I'll probably wait to git it until I'm done with my assembler. Should be here shortly! :)