Post subject: PocketNES, Goomba, Cologne, and SMSAdvance sram and exit pat
Posted: Wed May 21, 2008 9:33 pm
Joined: Sun Mar 09, 2008 10:06 pm Posts: 81
This is an updated collection. The only changes are more information in the included README.txt and the inclusion of a (hopefully properly) patched goombacolor. Feel free to report problems.
You'll probably want all_compile so you can pad any compilation with the "-p" option, just in case (read further down the thread about an EZ-Flash IV quirk that requires it in some circumstances). Read more about and comment about all_compile here or in this thread.
New information in the README.txt:
Quote:
Important Notes ---------------
* Don't use the EZ Flash client to patch an included emulator or a resulting emulator+rom compilation. A major point of this collection is to avoid having to constantly patch. * SRAM patching was done through cory1492's v2 patcher (EZ4-64-2). All the patch does is alter each emulator rom's header to help inform the loader that each emulator uses a 64K SRAM save. * Exit patching was manually done so that the L+R Exit menu option would function in all emulators. To be very clear, the exit patch does *not* enable L+U+A+B. Nor does it attempt to apply a Start+Select+A+B reset patch. It is meant solely to allow the Exit menu option to function properly.
Original Post (mostly):
This is a preliminary go at exit patching the mentioned emulators. It is based partially on code from pogoshell and partially from reading the disassemble of a ez4 client patched rom. Goomba Color isn't included, as it won't exit properly. Hopefully this will be resolved in the future. In the meantime, feel free to download and test the following exit (and sram) patched emulators; DON'T USE THIS unless you know what you're doing. If you having any problems, please try to verify first that it's not repeatable in an sram-only patched emulator; having said that, please *do* report problems, and hopefully I'll be able to fix any issues that arise.
Last edited by kuwanger on Sat Apr 17, 2010 4:10 pm, edited 2 times in total.
Post subject: Re: PocketNES, Goomba, Cologne, and SMSAdvance sram and exit pat
Posted: Thu May 22, 2008 1:27 am
Joined: Sun Mar 09, 2008 10:06 pm Posts: 81
Could you clarify further what steps you took and what you mean exactly by "not working" (ie, is pocketnes not working or is it just the exit not working)? Here's what worked for me:
1. Unpack pnesmmw12a. 2. Copy the included pocketnes.gba to the newly extracted dir. 3. Copy Fester's Quest to the newly extracted dir. 4. Built out.gba containing just Fester's Quest (and pocketnes.gba). 5. Copied out.gba over to the mini-sd card along with a 64K out.sav. 6. Ran out.gba. 7. Played less than a minute of Fester's Quest. 8. Tested out reset (which worked). 9. Tested out exit (which worked).
Btw, I'm using an EZ-Flash IV Phat.
I also performed the same steps again using a compressed copy of Fester's Quest (using Dwedit's nespack7) and it worked fine as well (ie, the game seemed to work and reset and exit seemed to work).
Post subject: Re: PocketNES, Goomba, Cologne, and SMSAdvance sram and exit pat
Posted: Thu May 22, 2008 6:14 pm
Joined: Wed Dec 27, 2006 11:42 pm Posts: 371
Hello kuwanger, it's nice to see you stopped by to tell us what's going on. I'm very appreciative of your work. I've been a big user of your save separator for a while now.
Thanks for this. Now that the exit actually works as it should, I have re-train myself to not use 'exit' as 'restart'. It's nice to see the cheat functions as well.
I'd like to point out that I have had conflicts with using the new pocketNES alongside old .savs. I'm not really surprised, I just wanted everyone to know that you should probably start with a fresh save file.
Multi titles and single titles are working for me. I did have some instablility with a single title rom but I cannot re-create it. It was Donkey Kong Classics. The screen went white, then snowy for 4 seconds then it flashed the emu's menu then went black to white then I heard the gameboy boot sound "ping" and it locked on a scrambled white/black screen. It works fine now after the 2nd attempt.
I haven't tried using the ez_client to flash it over because ez_client crashes each time it opens the .gba. No loss.
Battousai is under the impression that the quick combo reset function is enabled. I don't expect it is since all the trouble you went into was to get the exit function to work and they both result in the same thing. Am I wrong? Do we need so many ways of returning to the EZ menu?
Now here's where I ask a favour, since I did some brown nosing in my first paragraph.
When you get through with this project could you have a look at Dwedit's sleep patch?
Post subject: Re: PocketNES, Goomba, Cologne, and SMSAdvance sram and exit pat
Posted: Thu May 22, 2008 11:08 pm
Joined: Sun Mar 09, 2008 10:06 pm Posts: 81
@bugnot: Funny that you mention Donkey Kong Classics. For me, it's displaying garbled graphics (Donkey Kong Jr. looks like two off-color marios). Perhaps it's an issue with the ROM I'm using?
As for the sleephack, as far as I can tell, trying to sleephack a game/emulator that already has sleep code is what causes it to malfunction. I could be wrong, though. But I had originally looked into altering Dwedit's sleephack so that it'd patch in the exit code (something useful since there are a few games that the ez4 client patches but they don't seem to exit with the key combination). Having gotten my patch code to work now, I'll look further into making an exithack patcher. But, if the problem with sleephack working on the EZ4 has to do with the EZ4 client's changes, I don't think I can manage making it work (at least, not without figuring out a lot more on how the ez4 patch software works).
Post subject: Re: PocketNES, Goomba, Cologne, and SMSAdvance sram and exit pat
Posted: Sun May 25, 2008 12:13 am
Joined: Sun Mar 09, 2008 10:06 pm Posts: 81
@bugnot: Posting on Pocket Heaven on my research on Dwedit's sleephack, I got a reply from zg which indicates that the problem is ez-flash hardware generates spurious gamepak interrupts, at least when going into sleep mode. As a result, it's merely a matter of not enabling the gamepak interrupt when going into sleep mode (and living with the consequences).
To that end, if one doesn't want to go through the bother of recompiling patch.bin, you can simply hexedit it. Note, this applies to Dwedit's v2 patch. Anyways, change offset 0x1A9 to 0x10 (ie, as recommend, change "00 30 FF FF" (0xffff3000) to "00 10 FF FF" (0xffff1000)). It should then work.
Post subject: Re: PocketNES, Goomba, Cologne, and SMSAdvance sram and exit pat
Posted: Sun May 25, 2008 12:33 pm
Joined: Wed Dec 27, 2006 11:42 pm Posts: 371
That's really sweet, Kuwanger.
I did the hex edit and it worked like you said it would. I haven't had full time to test so I applied the sleep patch to an EZ4 pre-patched rom. The loader now says it loads up to 103%. I'm not worried. I'll test more later to see if they work applying the patch before running it through the ez4 client.
I followed your link to the original discussion and found your modified patch that enables resetting to menu. I applied it to some ez4 pre-patched files (ff4, ff5, ff6) because they are notorious for not resetting.
Now they do. And they sleep. Albeit with a different combo but whatever, l+r+start+select is more natural.
Did you get that Battousai? You can reset in Final Fantasy and probably more trouble games.
Just one thing about this hack, what are these "consequences" that you mention?
Another thought occurred to me, would one be able to hex edit a ROM that has sleep already implemented to make it work with the EZ4 natively. I.E. the Super Mario Advance series?
Once again, great work even if it was just asking the proper questions in the right places. I hope the community here takes good advantage of your work.
... and could we modify the EZ4_client to apply these patches instead... but you've done enough. I'm only dreaming now.
i am using the goomba color from some time ago and i have a problem
every time i start playing a game, it saves without problem but when i want to play again days later the same game the save is gone. so i start using the goomba 2.0 because the save state works everytime
another thing is when i use the goomba compilator to create a gba rom, the next time i try to used it, the compilator doesn't work. i tried deleting the configuration but nothing happens. i have to create another user's account on my pc to use on that account the compilator and then it works fine
Post subject: Re: PocketNES, Goomba, Cologne, and SMSAdvance sram and exit pat
Posted: Sun May 25, 2008 2:30 pm
Joined: Sun Mar 09, 2008 10:06 pm Posts: 81
@bugnot:
Quote:
Just one thing about this hack, what are these "consequences" that you mention?
Well, without the gamepak interrupt, pulling out the gamepak when the game is in sleep mode could make the game malfunction. Of course, that might be true anyways so *shrug*.
Quote:
Another thought occurred to me, would one be able to hex edit a ROM that has sleep already implemented to make it work with the EZ4 natively. I.E. the Super Mario Advance series?
@sonicnarutox3: Hmm.. Could you clarify further your problem with goomba color? Is this the first time you've used goomba color with the ez-flash iv or are you taking the same steps with goomba color that you have before? Can you verify that the ez-flash iv is actually saving the results from goomba color (a simple way to check is to make a copy of a save, intentionally do something that causes a save, then comparing the new save with the copy)? I just want to remove some of the possibilities.
As for the "goomba compilator", of what do you speak? Both goomba and goomba color don't require a compilator. I'm not sure if there's an official one made by anyone, but simple concatenating the goomba/goomba color emulator with one or more roms is sufficient to making a compilation. If you are using an official one, which one are you using?
Post subject: Re: PocketNES, Goomba, Cologne, and SMSAdvance sram and exit pat
Posted: Mon May 26, 2008 5:02 pm
Joined: Wed Dec 27, 2006 11:42 pm Posts: 371
Kuwanger, hmm, I wasn't aware that I could remove the gamepak while the unit was asleep. It's probably not so much a feature as it was a precautionary measure.
Now knowing that the EZ4 has this particular flaw perhaps it makes sense now why I was having trouble using chishm's sendsave rom, the one for flashcarts that requires you swap carts during the process.
Ultimately I just built an XBOO cable and used the MB version instead. The program works properly.
I'm very interested in hacking some roms to enable sleep mode but it is a bit of work and I don't understand how to use the VBA disassembler enough to make any progress myself. Otherwise I'm left asking people to find the hex addresses for me.
... if there was a big list out there, you'd tell me. Right?
Post subject: Re: PocketNES, Goomba, Cologne, and SMSAdvance sram and exit pat
Posted: Tue May 27, 2008 12:01 am
Joined: Sun Mar 09, 2008 10:06 pm Posts: 81
There isn't a big list, as far as I'm aware. The issue is, it's possible to set the interrupt flag at any point in the program. In general operation, most game will likely ignore the spurious gamepak interrupts (assuming they're happening more often than just at sleep), so it's possible that a game sets said interrupt anywhere. It just happens that a collection of games happen to set said interrupt right before going to sleep, where it's very trivial to notice and correct for it.
Unfortunately, VBA doesn't seem capable of breaking on writes to the Interrupt Enable Register (not without some rewriting of VBA, at least) and VBA doesn't seem to do the best job in general at breaking instantly on writes. :/ So, it'll probably be a lot of work to find and correct for the ez-flash iv for built-in sleep generically.
Btw, having patched Zelda - A Link to the Past manually for the buil-in sleep and patched using my sleep+reset patch, I've noticed that the built-in sleep will wake up from pressing select, right, l, or r. This isn't that surprising, considering that the sleep+reset patcher will replace any instance of an interrupt handler trying to replace its own interrupt handler, and the handler itself will override the keycombination to interrupt on.
In short, it's probably best to not mix built-in sleep and the sleep+reset patch. Sorry I can't be of more help with your build-in sleep patching, though.
Post subject: Re: PocketNES, Goomba, Cologne, and SMSAdvance sram and exit pat
Posted: Fri Jul 04, 2008 1:43 am
Joined: Sun Mar 09, 2008 10:06 pm Posts: 81
Well, this is a semi-wild guess, but have you tried using merge.bat with option 2 (aka "2 : EZ1, XG1")? From disassembling flash_ez1.sub, it seems the ez1 and the ez-flash 4 use the same effective code to reset to their loader.
Post subject: Re: PocketNES, Goomba, Cologne, and SMSAdvance sram and exit pat
Posted: Fri Jul 04, 2008 3:28 am
Joined: Mon Jun 16, 2008 8:45 pm Posts: 13
Using the second option in merge.bat, I gave Doki Doki Panic (I make a separate HVCA ROM for each game because their save state sizes are staggering) two test runs: one copied directly to storage, and the other through the EZ4 Client. Neither reset to the EZ4 menu when EXIT Emulation is selected, and the one from the client won't do anything with the reset keys pressed.
If it matters, the M3Lite couldn't get HVCA to reset to the M3 Menu either.
Users browsing this forum: Google [Bot] and 2 guests
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum