Author
|
Topic: NES Horizontal/Vertical mirroring (Read 2190 times)
|
Kitsune Sniper
Guest
|
|
« Reply #15 on: October 15, 2006, 04:30:30 pm » |
|
Isn't that already in the spec in one way or another? I remember D mentioning that it's possible for patches to apply changes to several files at once.
|
|
|
|
Aerdan
Guest
|
|
« Reply #16 on: October 15, 2006, 05:54:55 pm » |
|
That's NINJA applied to a directory, not multiple NINJA patches applied to one file.
|
|
|
|
D
Guest
|
|
« Reply #17 on: October 15, 2006, 07:17:37 pm » |
|
Well, there's really not much difference. You would just need to open file twice.
The only issue is the way single-file patches. Right now a filename length of 0 signals a single file patch. I could do it where you can have two patches for the target file executed one after another.
The problem is this: even if you do that, it defeats the purpose of NINJA, because that second patch will be in RAW format. This means it would be applied to ALL formats of the NES ROM: iNES, UNIF and Famtasia. I cannot think of any way to flag it to only one of those file types without changing the spec.
|
|
|
|
Disch
Guest
|
|
« Reply #18 on: October 15, 2006, 09:31:57 pm » |
|
My question is, does this make a difference when it comes to emulation? The game seemed fine in emulators with the old mirroring (Vertical). For this paticular game? No. That game is MMC3 (mapper 4) so the mirroring is mapper controlled anyway -- making the H/V mirroring bit in the header totally worthless. For other games? Absolutely. Header changes can have a great effect on how the ROM will be interpreted. .... NINJA of course ignore headers dude. That's kind of the point. *slaps forehead* This is exactly what was wrong with goodNES for so many years. Don't make the same mistake. I'm not familiar with the specifics of NINJA, but if you're not allowing the patch to change the header at all, then you're effectively making NINJA 100% useless for any sort of halfway advanced NES ROM hack. Even something as basic as CHR expansion will be lost .. something which is pretty common among "good" ROM hacks and is only becoming more and more common as hackers are realizing how easy it is. Mapper hacks... PRG expansion... mirroring fixes/changes... SRAM capabilities... you're essentially forbidding all of it. EDIT: Though again -- maybe I am just misunderstanding. The way it was worded, it made it sound like NINJA is incapable of changing the header-- but if that is possible and it just doesn't check the header for MD5 calculations, that's something else -- in which case ignore my ramblings. EDIT AGAIN: Bah -- now that I actually read the thread instead of just skimming it, I see that making 'raw' patches instead of 'nes' patches will work around said problem. Blah... I should learn to read before blabbing -- sorry ;P
|
|
« Last Edit: October 15, 2006, 09:48:21 pm by Disch »
|
|
|
|
Kitsune Sniper
Guest
|
|
« Reply #19 on: October 15, 2006, 10:33:54 pm » |
|
The point of NINJA patches is that they modify the game data -only-. They extract all header information and patch the data directly. Unfortunately this approach sucks when it comes to header modifications. RAW patches are just fancy IPS patches... which makes the point of making a Ninja patch... moot. I still think there should be a way to modify the header, at least with NES games, but my bitching isn't going to be enough to convince D.
|
|
|
|
Disch
Guest
|
|
« Reply #20 on: October 16, 2006, 12:04:01 am » |
|
The point of NINJA patches is that they modify the game data -only-. They extract all header information and patch the data directly. Unfortunately this approach sucks when it comes to header modifications. I can't say I'm happy with that approach in the least. I can understand for systems where the header does so much/anything (SNES) -- but it's extremely vital to NES games. Sort of a CRC or hash database, there's simply no way for the emulator to run an NES ROM without its header. And due to hacks being what they are, they're not likely to have an entry in whatever emulators CRC database. Separating header data and ROM data is a good idea. This day in age, if you really want to make a better mousetrap patching system... there's no excuse for it to not be "smart". IE: something that recognizes and can work with common formats in full. Skimming over header data is almost a step in the right direction -- but it falls short. Rather than have the patch apply to ROM data only -- break it into sections. Have a block for PRG changes, a block for CHR changes, and a block for header/other data changes. Keep it as format independent as possible... so that the same patch can be applied to either the UNIF or iNES or whatever version of the ROM. In that same vein -- keep the hash checks independent of the original file format as well. A patch made to be applied to an iNES ROM should not have a hash check failure when someone tries to apply it to the equivalent UNIF ROM. RAW patches are just fancy IPS patches... which makes the point of making a Ninja patch... moot. From what I can tell so far... the only difference between 'raw' and 'nes' modes is that nes mode skips the first 16 bytes. If that and hash checks are really the only benefits Ninja offers over IPS, I don't really see any reason to switch.
|
|
|
|
D
Guest
|
|
« Reply #21 on: October 16, 2006, 02:42:03 am » |
|
Disch: Then just make a RAW patch. I really am failing to further see the issue here.
The point of selecting NES format is it can be applied to any version of that NES ROM whereas IPS can only be applied to the source file. First off, headers do not exist in the ROM, this is data added to the file by dumpers. If you need to patch data that doesn't exist in a ROM, you are then talking about patching one specific file, and in that case you should be using RAW. You are talking about patching ONLY ONE FILE: the exact matching iNES ROM to the one you hacked, since only that one stores the mapper data that way.
Look, it was hard enough to translate the ROM into and out of UNIF form to get patching working as it does, but unless someone else wants to write a routine to parse an entire UNIF ROM and extract its chunks however necessary, to form an iNES equivalent header, and then repeat this for Famtasia ROMS, this is not going to happen. You will have to settle for using RAW or NES plus a second patch to fix the header.
If you think that's the only difference between NINJA and IPS, you are on crack. Sure, on an iNES ROM it only skips the first 16, but it will pull out all the PRG and CHR blocks from a UNIF to match the iNES form, patch those blocks, and then re-insert them into the UNIF ROM. It does this on virtually every game platform where things like headers or multiple formats exist to prevent failed patching. NINJA's patches are also XOR based to allow for unpatching of ROMs. What's that matter you say? Everyone soft patches? Not people playing the games on their X-BOX or Dreamcast with a NES emulator or people playing patches on any of NINJA's other systems. It's especially important for directory patches. NINJA is also th only format out there in the ROM hack world to support creating binary patches between directories which is useful for people hacking PC games. Do you really want to reinstall a new 3GB PC game every time you need to update your patch? NO. You want to unpatch it, slap the new one on,a nd go back to playing.
If you have a hack like the kind you are describing and have written yourself into this situation, you really have no choice except to bite the bullet and use RAW format which is basically an XOR based IPS with MD5 file validation, or use a NES format one and then a second patch in any format to fix the header (hell, use fc /bunfixed.nes fixed.net >headerfix.pat, NINJA will even use that).
I do not want to make NINJA even more complex than it is because the more complex a patch format gets, the fewer people will support it by writing more patchers for it or writing support into emulators. I'm sure I could write a whole assload of stupid tweaks to support specific cases like this on every system imaginable and a whole if/else logic system within the patch--but no one will fucking write support for NINJA patches then.
What you advocate is almost exactly what I want to avoid. You are nearly talking about entirely different, specialized patch engines for every system to patch twisted shit that doesn't even exist in the ROM. Such patchers exist already:
Look at XRIF. This was written for NES. Its only extension is for NES. How many XRIF patches exist? Zero. How many PATCHERS to apply XRIF patches exist? Zero. Patch creators? Guess.
How about for SNES? Well, you can go use UPS format by Byuu and Nach for that, because even though they have a byte to let them add future types to it, the only one they thought about while creating the format is SNES. I'm sure UPS is the greatest SNES patcher ever made and kicks the shit out of NINJA, because patching SNES was the idea it was designed around.
|
|
« Last Edit: October 16, 2006, 02:59:30 am by D »
|
|
|
|
olaf
Guest
|
|
« Reply #22 on: October 16, 2006, 02:58:44 am » |
|
the altering of 16 (well... more like 12 bytes) is too complex?
|
|
|
|
D
Guest
|
|
« Reply #23 on: October 16, 2006, 03:01:36 am » |
|
...
Please re-read the above post and pay more attention.
|
|
|
|
olaf
Guest
|
|
« Reply #24 on: October 16, 2006, 03:07:04 am » |
|
It wasn't a serious post. I see where the dilemma is, but I don't see why you wouldn't just provide additional and optional support for select supported file formats, even if it is just for a header or the likes.
|
|
|
|
D
Guest
|
|
« Reply #25 on: October 16, 2006, 03:26:14 am » |
|
Figure out a way to do this within the existing patch framework, make it work on every format of NES ROM (at least interNES, Famtasia and UNIF), and not require more than 8 lines of code.
If you do, I will add it.
|
|
|
|
Disch
Guest
|
|
« Reply #26 on: October 16, 2006, 04:03:28 am » |
|
Disch: Then just make a RAW patch. I really am failing to further see the issue here. I suppose that would really be the only option then. The point of selecting NES format is it can be applied to any version of that NES ROM whereas IPS can only be applied to the source file. First off, headers do not exist in the ROM, this is data added to the file by dumpers. I really don't see the logic behind this. I think of .nes files as more like "cartridge snapshots". Having the ROM is only part of the story, and ultimately isn't enough to emulate the game. The layout of the hardware which contains the ROM must also be present (ie: the header). So while it's true that while the header is not software which is physically stored on a ROM chip -- it is still information about the hardware, and thus could be considered part of the ROM image. iNES headers are not like SNES headers -- it's not simply a tag slapped on by the dumper like your above paragraph implies -- it's a guideline which spells out information on the board used. It's kind of like running a game with MAME -- just the ROM isn't enough -- you need to know what board is used so MAME knows how to emulate it. NES mappers are the same thing to a lesser extent -- a chip and various jumper settings on the cartridge can change how the same ROM will run on the system. If you need to patch data that doesn't exist in a ROM, you are then talking about patching one specific file, and in that case you should be using RAW. You are talking about patching ONLY ONE FILE: the exact matching iNES ROM to the one you hacked, since only that one stores the mapper data that way. I suppose this does become an issue if you are patching with a XOR key rather than copying absolute values. If you think that's the only difference between NINJA and IPS, you are on crack. I think I've said a few times that I'm not familiar with NINJA at all -- in fact all I know of it is what I've read in this thread. I do not want to make NINJA even more complex than it is because the more complex a patch format gets, the fewer people will support it by writing more patchers for it or writing support into emulators. It doesn't have to be simple to have support... it just has to be easily implemented. Look at 2xSai, Hq2x, etc -- I wouldn't for a second consider them simple algorithms... in fact the code is a downright nightmare. That doesn't stop them from being implemented in every major emulator out there, though. If patching support is a concern -- write a code library and distribute it. If an emu author wants to support it, all they have to do is plug in your code. As for your comments on XRIF, I agree. I've actually told the author before that I thought it was too complicated -- especially when he didn't even write a patcher himself (at least not yet?) -- he couldnt've expected it to get off the ground. Anyway... I guess my confusion keeps coming back to this 'nes' mode. You just made a big speech about how you don't want to get into nitty gritty details of individual file formats... then why bother with a system specific format at all? Wouldn't the end result just be similar (or equivalent) to that of a raw patch anyway? But whatever -- I have a clearer vision of what you're trying to accomplish and how you're going about it, so it makes more sense to me now. So with that I'll duck out of this and stop hassling you. ;P
|
|
|
|
D
Guest
|
|
« Reply #27 on: October 16, 2006, 04:35:12 am » |
|
I understand totally what you are saying about NES headers. That's what prompted me to rewrite NINJA to preserve headers on all ROMS. Before it just dropped them on SNES images. Systems like NES and Lynx have critical data in that header and I understand it can't be emulated correctly without it.
This really comes down to an issue of the few people out there who have the hacking skills to be rewriting NES mappers. But these games are a minority. I really don't see the issue with just including a second patch then to fix the mapper. Or of course, going with RAW. The MD5 validation and XOR alone should make it worth using RAW over IPS or PPF. Besides, you'd need a separate patch anyway to fix the mapper for a UNIF version of the ROM, so you really want to authenticate the entire interNES file.
Yes, my NES mode is a bit of a nightmare. That and SNES make up the bulk of NINJA's complexity. I would write a library, but I am not a C programmer. My whole implementation of NINJA is written in PHP as a console scripting language. I just wrote a frontend to it. It's still quite fast, and it should be fairly easy to port to C since it relies on no PHP specific libraries, but I just don't know enough C to do the port and I really don't have time to learn C just for this.
MKendora was working on a DLL for NINJA, but I think he's at a standstill right now due to other things like real life.
|
|
|
|
Nightcrawler
Guest
|
|
« Reply #28 on: October 16, 2006, 09:16:45 am » |
|
Here's my take on this issue: I would start bitching *IF* RAW mode was not present. Because RAW mode is present, what's the problem? You can still make your patch and and it will cover your headers and you get the added benefit of it STILL only being able to be applied to the CORRECT ROM and unpatching if you need it. If NINJA offered NOTHING else, the md5 check is still a WORLD of improvement. Anyone who sells that simple feature short obviously has never made a successful patch or you'd quickly notice how only 50% of your audience can successfully patch a ROM even with it spelled out in the readme! 9 times out of 10, they don't have the correct ROM or it is corrupt. I think D has a better grasp on the larger scope of things. We're not playing NES patcher or SNES patcher here. We're playing the game of UNIVERSAL console(and PC) patcher. You can use NINJA and receive a whole host of benefits on virtually ALL consoles. If you start implementing NES header specifics like those described here, you may as well start writing custom handling like that for the rest of them as well which will undoubtedly create a complex mess of software that nobody will support anymore. I don't want to rehash all of D's argument, but I generally agree with them. How many people create hacks with modified NES headers? For those dozens and dozens of people, they can create a RAW mode patch. What's the drawback? Hardly any except the patch won't work on a ROM in a different NES format with a different header format. Oh.. wait.. you can't do that NOW without NINJA either. This seems like hardly a point worth arguing. If you as patch author expect your patching format to actually go somewhere, you need to have something that can be used by MANY consoles, and something that can actually be ported and/or understood by someone other than the patch creator. Hell, the patching format specs and framework itself needs to be simple enough to be understood by a normal person. Making too many specific platform support changes, modules etc.. will quickly make it a mess that nobody is going to bother with. Take some of the 'other' alternatives for examples. If you think next generation patching formats should have all these specific 'smart' features, then why do all of these 'smart' formats have ZERO patches available or even a patch creator itself? Why do you think IPS succeeded? Why do you think it lasted a decade? If you ask me, it's because it's simple and works on most platforms. Yes, we want to make something a bit 'smarter', but at the same time we need to KEEP those two simple goals if we have hope to have a replacement take off. Anything else will just never leave the starting gate. Quite frankly, I think that's exactly what we're seeing. Many 'smart 'paper' launch competitive formats have fallen flat on their face. NINJA is the ONLY IPS replacement that has at least gotten a small handful of patches out there NOT made by the format creator. It's the only one that has taken a step out of the starting gate.
|
|
|
|
byuu
Guest
|
|
« Reply #29 on: October 17, 2006, 12:33:47 pm » |
|
How about for SNES? Well, you can go use UPS format by Byuu and Nach for that, because even though they have a byte to let them add future types to it, the only one they thought about while creating the format is SNES. I'm sure UPS is the greatest SNES patcher ever made and kicks the shit out of NINJA, because patching SNES was the idea it was designed around. Pretty much. And while we haven't worked on any formats (including SNES) yet excluding raw, we have an XML section that will basically be used to store header information in XML tags. Thusly, it will store information about the headers of both ROMs, so that whatever header you need can be generated from that info. We haven't gotten to NES so there are no details mapped out. Essentially, I'd like the XML data to be auto-generated by the patcher at creation time, but also allow for manual insertion of header data, eg in case you need additional info for UNIF, but you're patching against two iNES ROMs that lack the additional info. Now, as far as you're thinking ... "ok, well who the hell is going to support XML parsing in their applications?", well, we're both c++ programmers, and we're both writing 100% compatible libraries. Two just for the sake of coding styles and such (Myself, I like OO, but don't believe everything should be objects; can't speak for Nach's style). The libraries will handle all of these details. They can easily be compiled into DLLs or SOs for use with other programming languages. Also, there is now a header flag for embedding a small amount of info (~1.5k worth) with authoring information and such, so that parsers don't have to parse the XML data to get this info. I kind of like the consistency of having it all in the XML data, but I don't expect many to support that, even with the XML lib. But, we'll see how well my XML parser works. Perhaps I'll change my mind and go back to Nach's plan to have it all in the XML section. Anything else will just never leave the starting gate. Quite frankly, I think that's exactly what we're seeing. Many 'smart 'paper' launch competitive formats have fallen flat on their face. NINJA is the ONLY IPS replacement that has at least gotten a small handful of patches out there NOT made by the format creator. It's the only one that has taken a step out of the starting gate. It's easier when you're the only one designing a format. But collaboration and well planned ideas take time. Not to mention we're both very busy. We shouldn't be rushing a format that's supposed to supercede IPS patches for the next ~10 years. But yeah, NINJA's way ahead of us and does a lot more, and does it now. Use whatever you want, they both roughly accomplish the same goals anyway.
|
|
|
|
|