It is currently Sun Apr 22, 2018 7:50 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 10 posts ] 
Author Message
PostPosted: Mon Nov 27, 2017 10:15 pm 
Offline

Joined: Sat Oct 28, 2017 10:18 am
Posts: 27
I have a raw Cheat Code and I want to make it permanent for my game, but I searched everywhere and tried everything I could think of and can't find a way to Patch my game with it.

the code is
0402:0A

This is not a game genie code I know they claim a program Called CCCGP works with Raw codes but all it does for the Nes is patch Game Genie Codes into a game not Raw Codes. I do know how to apply game genie codes manually by hand with a hex editor, and I tried the same method with this Raw Code but can't find the area "Hex Value that it effects" in the game where I can make a permanent change.

Can Raw Codes even be applied to a NES Game? Or are they only for emulators?

_________________
Don't buy FamicomNes games WillyNilly Check the Mapper first
https://wiki.nesdev.com/w/index.php/Category:Discrete_logic_mappers
https://wiki.nesdev.com/w/index.php/Category:INES_Mappers
https://wiki.nesdev.com/w/index.php/Category:Bad_iNES_Mappers


Top
 Profile  
 
PostPosted: Mon Nov 27, 2017 10:19 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19935
Location: NE Indiana, USA (NTSC)
It's more common on NES to make ROM codes (which affect $8000-$FFFF) than RAM codes (which affect $0000-$07FF or $6000-$7FFF). ROM codes can be turned into Game Genie codes.


Top
 Profile  
 
PostPosted: Tue Nov 28, 2017 5:36 am 
Offline
User avatar

Joined: Fri May 08, 2015 7:17 pm
Posts: 2039
Location: DIGDUG
A skilled person could patch it into the game. It's far more complicated than you think.

402 isn't the 0x402nd byte in the ROM. It's a RAM address that might be written to by hundreds of places in the ROM...or only 1 or 2. Depending on the game.

It's much much easier to do it an emulator, and use a cheat tool to freeze that RAM address at $0a.

It's possible(unlikely), that the game explicitly sets this RAM value during initialization, and setting it once would do what you want. In which patching it would be replacing only 1 byte. But it takes a lot to know which 1 byte.

_________________
nesdoug.com -- blog/tutorial on programming for the NES


Top
 Profile  
 
PostPosted: Tue Nov 28, 2017 7:36 am 
Offline

Joined: Sat Oct 28, 2017 10:18 am
Posts: 27
dougeff wrote:
A skilled person could patch it into the game. It's far more complicated than you think.

402 isn't the 0x402nd byte in the ROM. It's a RAM address that might be written to by hundreds of places in the ROM...or only 1 or 2. Depending on the game.

It's much much easier to do it an emulator, and use a cheat tool to freeze that RAM address at $0a.

It's possible(unlikely), that the game explicitly sets this RAM value during initialization, and setting it once would do what you want. In which patching it would be replacing only 1 byte. But it takes a lot to know which 1 byte.


tepples wrote:
It's more common on NES to make ROM codes (which affect $8000-$FFFF) than RAM codes (which affect $0000-$07FF or $6000-$7FFF). ROM codes can be turned into Game Genie codes.


Thank you..

I guess I was on the right track I just hadn't narrowed down the right 1 byte in the game, and I don't have the Ram Address.

I'll just have to try finding it with FCEUX, is a long Process I had to chose a large game. I had thought it only Effected 1 Byte, right now I'm running a comparison on another game that is a Hack of it as it uses a Similar effect as what the code does only is slightly different is a Japan only Pirate version, and am writing down all the area's were it changed by only 1 byte. There are a lot of them though..

_________________
Don't buy FamicomNes games WillyNilly Check the Mapper first
https://wiki.nesdev.com/w/index.php/Category:Discrete_logic_mappers
https://wiki.nesdev.com/w/index.php/Category:INES_Mappers
https://wiki.nesdev.com/w/index.php/Category:Bad_iNES_Mappers


Top
 Profile  
 
PostPosted: Tue Nov 28, 2017 8:09 am 
Offline
User avatar

Joined: Thu Aug 13, 2015 4:40 pm
Posts: 191
Location: Rio de Janeiro - Brazil
Set a breakpoint on the debugger for writes to that address, do a hard reset and start playing the game. If you're really lucky it's simply set a few times (new game, etc), and you can change the value in the ROM. If you're not lucky it may take a bit more time until you understand what exactly changes it.

For example, if there is a code that decreases the value, and you never want it decreased, you can replace the decrease instruction with NOP instructions ($EA).

_________________
http://nesrocks.com/blog/superpitfall30th/


Top
 Profile  
 
PostPosted: Tue Nov 28, 2017 3:33 pm 
Offline

Joined: Sat Oct 28, 2017 10:18 am
Posts: 27
Thanks for the Info, I tried everything I could but still couldn't locate the Ram Address that it effected.
I found that an effect I wanted existed as a game genie code and was able to Patch my game with it.. After having racked my brain for a day and a half.

I did find this helpful doc on cheating with FCUEX http://www.fceux.com/web/help/fceux.html?NESRAMMappingFindingValues.html I'll look over it more carefully later and maybe find away to work with RAM codes after some further study..

I tried the debugger but as far as that goes I don't know much about using it yet. It did show that the Value the code changes is x00, but there are just too many x00 Bytes in the game. The area that the code effects seems as far as I can tell to be between $0000-$07FF but there are a lot single bytes in that range that are 00.. after about 40 or so I gave up.. I wrote down the values FCEUX claimed the code effected and tried those but yielded no result and I even tried adding 10 to them but still nothing.. It was really a frustrating ordeal.

I made a new Game Genie code after modifying the existing one I found online, and well it gives an Effect that is like what I wanted.
So my problem is mostly solved. Thanks Again.

Note: I just realized I should added 16, not 10.. Later..

_________________
Don't buy FamicomNes games WillyNilly Check the Mapper first
https://wiki.nesdev.com/w/index.php/Category:Discrete_logic_mappers
https://wiki.nesdev.com/w/index.php/Category:INES_Mappers
https://wiki.nesdev.com/w/index.php/Category:Bad_iNES_Mappers


Top
 Profile  
 
PostPosted: Tue Nov 28, 2017 4:16 pm 
Offline
Site Admin
User avatar

Joined: Mon Sep 20, 2004 6:04 am
Posts: 3509
Location: Indianapolis
There are some generic ways to freeze RAM, though it probably won't work in every case (most cases would be fine though). You could find some free space in ROM (needs maybe 10 bytes?). Change the NMI vector to point to that free space, then insert some code there that does this:
Code:
 PHA
 LDA #$0A
 STA $0402
 PLA
 JMP original_NMI


Top
 Profile  
 
PostPosted: Tue Nov 28, 2017 5:06 pm 
Offline
User avatar

Joined: Fri May 08, 2015 7:17 pm
Posts: 2039
Location: DIGDUG
Quote:
the code is
0402:0A


Quote:
I could but still couldn't locate the Ram Address that it effected.


The RAM address is 402 (hexadecimal). The cheat code forces it to be 0a.

Quote:
show that the Value the code changes is x00


Probably an initial code to zero the RAM. You should have kept playing until some other code wrote to 402.

_________________
nesdoug.com -- blog/tutorial on programming for the NES


Top
 Profile  
 
PostPosted: Tue Nov 28, 2017 5:42 pm 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 6206
Location: Canada
Is there a reason you haven't named the game in question, or described what this code is supposed to do in it?

We can't share ROMs here, but there's no problem with talking about them, and I'm not volunteering anybody but there's a good chance someone here could figure out whatever it is in a matter of minutes.


Top
 Profile  
 
PostPosted: Thu Nov 30, 2017 6:55 pm 
Offline

Joined: Sat Oct 28, 2017 10:18 am
Posts: 27
rainwarrior wrote:
Is there a reason you haven't named the game in question, or described what this code is supposed to do in it?

We can't share ROMs here, but there's no problem with talking about them, and I'm not volunteering anybody but there's a good chance someone here could figure out whatever it is in a matter of minutes.



I'm sorry it took me awhile to get back on. I had some difficulty with my computer.

I found a Game Genie code and altered it to get an effect I wanted.. Problem solved..

I'm sorry the BSFree website was down, and I thought the guy who made the codes had gotten mad and removed his codes, but it turns out I just hadn't clicked the right button for weapon codes on Gamehacking.org after running a fresh install of windows 7 on my computer, I don't even have an emulator at the moment.. I took down their names this time so if I do use their codes or a modification of them I can give them proper credit.. I'm making a full hack the game not just adding a cheat code I've already got a New Title Screen and Replace two Huge Blocks of Text, and I plan on changing the full Palette, and all text of the game as well as making some graphical changes.

The Code is for 1943 - The Battle of Midway (USA) and changes the default Special Weapon, which is what appears to have been done in the Game 1944 that came out in Japan as a Pirate original or hacked version of 1943 Japan.. But 1944 probably used a different code, and that was the game I was comparing 1943 with trying to find what was used for it.

The Game Genie code LEEPXLAE does the same thing except it enables the Normal Weapon to act as the Special Weapon.

_________________
Don't buy FamicomNes games WillyNilly Check the Mapper first
https://wiki.nesdev.com/w/index.php/Category:Discrete_logic_mappers
https://wiki.nesdev.com/w/index.php/Category:INES_Mappers
https://wiki.nesdev.com/w/index.php/Category:Bad_iNES_Mappers


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 5 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

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group