News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: River City Ransom (NES) - editing shop items, etc.  (Read 2618 times)

RetroGameFan

  • Full Member
  • ***
  • Posts: 112
    • View Profile
River City Ransom (NES) - editing shop items, etc.
« on: January 05, 2020, 02:27:12 pm »
I'm interested in hacking the NES game River City Ransom for editing and adding shop items, their prices, and how much money you get from defeating your enemies.

I tried a couple of things. First, I downloaded BARF!, the only editor available for this game on this site, found here: http://www.romhacking.net/utilities/1481/. However, I had some issues with getting the program to run, as it entailed a little bit of instructions about downloading at least another program, and I didn't know what the hell I was doing, as I didn't know how to find the precise program and/or package for download. So I eventually gave up on that attempt.

Second, I played the game on FCEUX up to the point where I'm at one of the shops. Then I used the built-in PPU viewer, hex editor, and another tool (I think it was called a "name table viewer" or something like that). I tried finding where the price values were located, but I was unsuccessful. Furthermore, whatever I tried by myself in hex editing changed nothing in regards to how much particular items cost.

I'm going to conclude this post with a few questions. (1) Is there a way around downloading extra things for opening the BARF! utility? (2) Is there another kind of utility that is more up to date and can do the same as what I'm looking to do? (3) If the previous two questions turn up negative, is there any other advice you could provide that could help me in my search?

Cyneprepou4uk

  • Hero Member
  • *****
  • Posts: 594
  • I am the baldest romhacker
    • View Profile
Re: River City Ransom (NES) - editing shop items, etc.
« Reply #1 on: January 05, 2020, 04:21:22 pm »
Never used that barf thing.

To find prices you need built-in hex editor, debugger, trace logger, and assembly knowledge.

Find an address(es) in ram that holds your current money value. Set a read breakpoint to it and try to buy something from the shop. Item price would be substracted from your money, that's how you find it. Write breakpoint can also be useful.

Another option it to find prices through background data, if you find out how prices are displayed on the screen. But this is harder, and there is no guarantee that displaying prices and the actual values of the prices are connected, it could be just graphics for all we know.

RetroGameFan

  • Full Member
  • ***
  • Posts: 112
    • View Profile
Re: River City Ransom (NES) - editing shop items, etc.
« Reply #2 on: January 05, 2020, 05:52:41 pm »
@Cyneprepou4uk - Thanks for your input! You guys can negate my first question, because thanks to Googie (as seen here, http://www.romhacking.net/forum/index.php?topic=29821.msg387594#msg387594), I was able to get BARF! up and running on my PC. Now I'm just wondering, is there another utility out there that can perform the tasks I need to make it easier for a newbie hacker like myself?

Edit with Note: BARF! may be up and running on my PC, but whenever I edit the shop item prices in my ROM (update and save them to the ROM), the ROM keeps reverting everything back to its original price. Am I doing something wrong here, or is there something wrong with the utility?
« Last Edit: January 05, 2020, 07:11:12 pm by RetroGameFan »

Cyneprepou4uk

  • Hero Member
  • *****
  • Posts: 594
  • I am the baldest romhacker
    • View Profile
Re: River City Ransom (NES) - editing shop items, etc.
« Reply #3 on: January 05, 2020, 10:10:35 pm »
Need more details on what steps you perform and about your problem in general

RetroGameFan

  • Full Member
  • ***
  • Posts: 112
    • View Profile
Re: River City Ransom (NES) - editing shop items, etc.
« Reply #4 on: January 06, 2020, 07:13:12 pm »
I would have shown you images from my flash drive of the steps I performed, but I don't know how to attach these images to this post, so I'm going to summarize the steps for you here.

First, I opened BARF! and brought up the list of shop items for editing. Next, I changed the price of a donut from $0.80 to $0.04 (I "updated" it). Then, I supposedly saved my change to the ROM. And finally, I opened BARF! and brought up the shop item list again, but the price for a donut still reads "$0.80".

This forum has such limited features! :banghead:

Cyneprepou4uk

  • Hero Member
  • *****
  • Posts: 594
  • I am the baldest romhacker
    • View Profile
Re: River City Ransom (NES) - editing shop items, etc.
« Reply #5 on: January 06, 2020, 07:40:45 pm »
Ok, and when you open this rom in emulator and buy a donut, how much does it subsctract from your current money?

RetroGameFan

  • Full Member
  • ***
  • Posts: 112
    • View Profile
Re: River City Ransom (NES) - editing shop items, etc.
« Reply #6 on: January 07, 2020, 09:51:16 am »
I don't know for sure, as I didn't exactly try this, and I'm away from home at the moment. But I strongly assume it still displays $0.80, and subtracts that amount as well. My strong assumption is due to the fact that I tried editing all the prices in the game to be considerably lower, and when I opened the ROM in the emulator, all the prices were unchanged. And when I bought a coffee, it still subtracted the unchanged price.

Does this help?

Cyneprepou4uk

  • Hero Member
  • *****
  • Posts: 594
  • I am the baldest romhacker
    • View Profile
Re: River City Ransom (NES) - editing shop items, etc.
« Reply #7 on: January 07, 2020, 11:24:56 am »
Not really, since you can't say for sure.

I wouldn't be surprised if displayed price was different from the actual value. Like I said before, they might not be connected. I've encountered that before in another nekketsu game (nkd).

And if nothing at all changed in the end when you try this rom in the emulator, perhaps that editor is not working. You should compare "before" and "after" files.

Or maybe something silly like you don't know what you are doing  >:D

RetroGameFan

  • Full Member
  • ***
  • Posts: 112
    • View Profile
Re: River City Ransom (NES) - editing shop items, etc.
« Reply #8 on: January 07, 2020, 11:28:10 am »
I'm pretty sure I certainly know what I'm doing. I'm thinking the editor isn't working properly in this case.

Have any other suggestions?

Cyneprepou4uk

  • Hero Member
  • *****
  • Posts: 594
  • I am the baldest romhacker
    • View Profile
Re: River City Ransom (NES) - editing shop items, etc.
« Reply #9 on: January 07, 2020, 11:30:46 am »
Only what I've said in my first post. Nothing more to add

RetroGameFan

  • Full Member
  • ***
  • Posts: 112
    • View Profile
Re: River City Ransom (NES) - editing shop items, etc.
« Reply #10 on: January 07, 2020, 01:14:37 pm »
OK. I might go ahead and do some research on my own, in case no one else cares to bother to post anything here.

Tony H

  • Full Member
  • ***
  • Posts: 128
    • View Profile
    • The Code Hut
Re: River City Ransom (NES) - editing shop items, etc.
« Reply #11 on: January 15, 2020, 05:18:01 pm »
I wrote this 20 years ago, and it's pretty bad, but it might help you...  https://codehut.gshi.org/GGTips.txt

Also, completely ignore the first section about removing the graphics.
The Code Hut: http://codehut.gshi.org/

Game Genie codes and ROM hacking guides

RetroGameFan

  • Full Member
  • ***
  • Posts: 112
    • View Profile
Re: River City Ransom (NES) - editing shop items, etc.
« Reply #12 on: January 16, 2020, 07:55:21 am »
I wrote this 20 years ago, and it's pretty bad, but it might help you...  https://codehut.gshi.org/GGTips.txt

Also, completely ignore the first section about removing the graphics.
Thanks for the link! I'll check it out sometime. :)