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

Author Topic: Expanding a NES ROM on a Mac?  (Read 7023 times)

kurtwalker

  • Guest
Expanding a NES ROM on a Mac?
« on: January 04, 2012, 08:57:44 pm »
Hey everyone!

I'm trying to play Takeshi Kitano's videogame Takeshi No Chousenjou. I have the english translation patch (.ips file), but I'm stumped on how to properly apply the patch in that I can't find a way to expand the file on a Mac (OS X). Is there an expanding program out there that I can use (without crossover, preferably)? Or am I better off expanding it/patching it on a PC then transfer it back to my Mac (can I even dot his?)?

Thanks guys, and happy new years!

KingMike

  • Forum Moderator
  • Hero Member
  • *****
  • Posts: 7086
  • *sigh* A changed avatar. Big deal.
    • View Profile
Re: Expanding a NES ROM on a Mac?
« Reply #1 on: January 04, 2012, 11:58:40 pm »
Until someone writes an expander for Mac, the only other way is to do it manually with a hex editor.
I don't use a Mac so I can't recommend any, sorry.
Use a hex editor, copy the original ROM data from 0 to 0x1C000F, then add 0x20000 bytes of zeroes (so it's up to 0x3C00F), then add 0x1C010-2000F from the original ROM.
Then change the byte at address 0x04 (PRG size) from 8 to 0x10 (8 banks of 16KB to 16 banks).
"My watch says 30 chickens" Google, 2018

Gemini

  • Hero Member
  • *****
  • Posts: 2026
  • 時を越えよう、そして彼女の元に戻ろう
    • View Profile
    • Apple of Eden
Re: Expanding a NES ROM on a Mac?
« Reply #2 on: January 05, 2012, 02:08:46 am »
Why not simply using xdelta patches? :huh:
I am the lord, you all know my name, now. I got it all: cash, money, and fame.

kurtwalker

  • Guest
Re: Expanding a NES ROM on a Mac?
« Reply #3 on: January 05, 2012, 02:52:02 am »
Mike: I'm using HexEdit and can't seem to find 0x3C00F, the closest I can find 0001C0F0...

Gemini: I'm a little new to the rom world-- What are xdelta patches?

thanks guys.

Mauron

  • Submission Reviewer
  • Hero Member
  • *****
  • Posts: 551
    • View Profile
Re: Expanding a NES ROM on a Mac?
« Reply #4 on: January 05, 2012, 03:21:37 am »
Mike: I'm using HexEdit and can't seem to find 0x3C00F, the closest I can find 0001C0F0...

Gemini: I'm a little new to the rom world-- What are xdelta patches?

thanks guys.

That offset won't exist at first. You need to add bytes of 00s until you get there.

xdelta is another patch format, and if I'm thinking of the right one, it can move data from one part of the ROM to another. In this case, it would avoid the need to expand beforehand.
Mauron wuz here.

Pennywise

  • Hero Member
  • *****
  • Posts: 2357
  • I'm curious
    • View Profile
    • Yojimbo's Translations
Re: Expanding a NES ROM on a Mac?
« Reply #5 on: January 05, 2012, 01:01:15 pm »
Wouldn't an xdelta front end need to be compatible with a Mac though?

Mauron

  • Submission Reviewer
  • Hero Member
  • *****
  • Posts: 551
    • View Profile
Re: Expanding a NES ROM on a Mac?
« Reply #6 on: January 05, 2012, 02:56:56 pm »
MultiPatch can apply them on a Mac.
Mauron wuz here.

Karatorian

  • Sr. Member
  • ****
  • Posts: 381
  • "Gotta get get ... 6502"
    • View Profile
    • Studio Karatorian
Re: Expanding a NES ROM on a Mac?
« Reply #7 on: January 05, 2012, 10:49:56 pm »
The mac should have dd, which works great for expanding ROMs. Based on KingMike's instructions, these dd commands ought to do it:

Code: [Select]
dd if=orig.rom of=new.rom bs=1 count=1835023
dd if=/dev/zero of=new.rom bs=1 count=131072 seek=1835023
dd if=orig.rom of=new.rom bs=1 seek=1966095 skip=1835023

Then just hex edit the header, as Mike said.

Edit

Why not simply using xdelta patches?

There's severe resistance to any new patch format. If it's not IPS, it's anathema. So instead, we get proprietary win32 only patching programs instead. Somehow this is considered a better solution. I can't understand it either.

Wouldn't an xdelta front end need to be compatible with a Mac though?

Thanks to Mac's shiny new un*x internals (and they're not that new anymore), xdelta ought to work just fine.
« Last Edit: January 06, 2012, 06:08:57 pm by Karatorian »
Current ProjectsFinal Fantasy EngineSMB Special for NESStudio Karatorian
@loop: lda (src),y — sta (dst),y — iny — bne @loop — inc src+1 — inc dst+1 — dex — bne @loop

meunierd

  • RHDN Patreon Supporter!
  • Jr. Member
  • *****
  • Posts: 74
    • View Profile
Re: Expanding a NES ROM on a Mac?
« Reply #8 on: January 24, 2012, 12:47:57 am »
Here is kingmike's nflate patched to build for mac, nix etc. Just g++ nflate.cpp -o nflate

EDIT: http://hastebin.com/yicalenide Just save the file as nflate.cpp

Xenesis

  • Jr. Member
  • **
  • Posts: 90
  • Syogun Changer
    • View Profile
    • Wars World News
Re: Expanding a NES ROM on a Mac?
« Reply #9 on: January 24, 2012, 03:00:05 am »
I don't use a Mac so I can't recommend any (hex editors), sorry.

The aptly named HexEdit does a pretty fantastic job. Rather barebones, but it works a treat.

creeperton

  • Hero Member
  • *****
  • Posts: 604
    • View Profile
.
« Reply #10 on: January 24, 2012, 05:53:11 pm »
.
« Last Edit: November 16, 2015, 12:59:20 am by creeperton »

BRPXQZME

  • Hero Member
  • *****
  • Posts: 4572
  • じー
    • View Profile
    • The BRPXQZME Network
Re: Expanding a NES ROM on a Mac?
« Reply #11 on: January 24, 2012, 05:58:41 pm »
For a flexible definition of work.
we are in a horrible and deadly danger

trudatman

  • Jr. Member
  • **
  • Posts: 58
    • View Profile
    • trudatman games
Re: Expanding a NES ROM on a Mac?
« Reply #12 on: January 24, 2012, 06:05:08 pm »
yes.  I use DarWine (so much easier to get running) on my 10.4.11, so I can run Windows programs like the SNES NHL '94 Editor.  you may need a few Windows system files for referencing, but it should all work out.  here is a list of the hacking gear in my applications folder:
-0xED
-DarWine
-DosBox (not sure if this works -- it didn't do what I hoped and doubted it would)
-Hex Fiend
-IpsAndSum
-SNES Checksum Fixer
-SNES NHL '94 Editor
-Tile Layer Pro
some of those are for the Mac and other use DarWine to emulate Windows.

"excuse me for having enormous flaws that I don't work on." "I'm not not licking toads." -HJ Simpson