Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Help with byte swapping?  (Read 6488 times)

0 Members and 1 Guest are viewing this topic.

Nipedley

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 483
  • Last login:December 30, 2017, 12:22:06 pm
Help with byte swapping?
« on: July 04, 2009, 07:32:01 am »
Hey guys, not 100% if this is the right forum but I couldn't think where else it would be appropriate!

I noticed someone post about a mega-tech and the possibility of using old MD games on them, it was an old project of mine to build a dev cart but I could never figure out how the roms were byte swapped. I decided to have another bash at it today, since I now owned a sonic the hedgehog 2 cart for my mega-tech I decided to see what the differences were between the original and the arcade..

Here is a portion of the original;
SEGA GENESIS    (C)SEGA 1992.SEPSONIC THE             HEDGEHOG 2

and here is the same portion of the mega-tech cart;
ESAGG NESESI    C(S)GE A9129S.PEOSIN CHT E            EHGDHEGO2

I managed to determine the difference, each individual byte needs to flip with its neighbour.

Example; flipping each letter with its neighbour
ESAGG NESESI
SEGA GENESIS

The problem is I don't know how to effect that change on a whole rom dump rather than doing every byte by hand which is obviously impractical!!

Any help or if you could point me in the right direction would be magic. I know a few other people who were also wondering about this so you'd be helping them in effect too :)

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: Help with byte swapping?
« Reply #1 on: July 04, 2009, 07:56:52 am »
Just knocked up this little app for you.

USAGE: SwapEndian <file>

Nipedley

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 483
  • Last login:December 30, 2017, 12:22:06 pm
Re: Help with byte swapping?
« Reply #2 on: July 04, 2009, 08:27:29 am »
Thanks :D For some reason it won't let me download your program but looking into what you mentioned about endians I managed to find a hex editor 'Reverse engineering', I tried out all the byte swap and flips it could perform and found out I needed a 16 bit byte swap. It was only a trial and wouldn't let me save hence, straight into hex workshop and out comes a working rom! Tested the megatech rom swapped and it worked great as a megadrive game, and the megadrive rom swapped works as a megatech game!

Now I just need to find my old plans for the dev cart and this project can get started! ;D

Robbbert

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 205
  • Last login:April 21, 2024, 06:42:46 am
Re: Help with byte swapping?
« Reply #3 on: July 06, 2009, 04:32:55 am »
I agree - that attachment cannot be saved.

If any admins wander by, maybe you can fix it? Clicking on it gives the "server not found or DNS error" message.