Jump to content
IGNORED

Hex -> Bin


Jedd

Recommended Posts

I finally got a disassembler working on my Mac and decided I wanted to hack Pitfall by changing some sprites and stuff. The thing that sucks is that when I disassemble it, all the sprites are in hex. Does anyone know of a site or some software that can convert a bunch of .byte's into binary? Thanks!

 

-J

Link to comment
Share on other sites

You can force the disassembler to do this for you. What you need to do is create a .cfg file that is used in the process. Try this...

 

ORG F000

CODE F000 F3EE

GFX F3EF F3FE

CODE F3FF FAFC

GFX FAFD FCA8

CODE FCA9 FCD6

GFX FCD7 FEAC

CODE FEAD FEC1

GFX FEC2 FFFF

 

 

Copy/paste that into notepad, and name it pitfall.cfg

Now do this when you disassemble...

 

distella -pafscpitfall.cfg pitfall.bin > pitfall.asm

 

The values will still be shown in Hex, but each one will be on a seperate line, with the bitpattern commented off to the side :)

 

And Hex->bitpattern isn't really hard to understand. There are only 16 different variations of the arrangement of the bits for each of the 2 hex digits...

 

---- = 0

---x = 1

--x- = 2

--xx = 3

-x-- = 4

-x-x = 5

-xx- = 6

-xxx = 7

x--- = 8

x--x = 9

x-x- = A

x-xx = B

xx-- = C

xx-x = D

xxx- = E

xxxx = F

 

So a value like $86 would translate to the bitpattern x--- for the 8 and -xx- for the 6

...i.e. x----xx-

Link to comment
Share on other sites

I'm running on Mac OSX, and to assemble code I use Dasm and macro.h and vcs.h. It took me about a week to get the darn thing working, so contact me if you have trouble and I'll help you out. As for disassembling code, I use the Mac version of Distella and the file above^ from nukey. Some trickery was necessary to get that up and running, too. To emulate I use Stella 1.2. Is that what you were asking?

 

-J

 

Btw I managed to change some of the sprites in Pitfall. So far, the scorpion is the robot from Berzerk, the logs are PacMan, and the gators are mutated ducks (they don't fit in very well, but they look funny :D). If you guys have ideas for any of the other sprites, let me know, because I'm running out of ideas.

 

K I'm done with this hack and I want to try and make my own game now. Here's a screenshot of what I produced in my long hard hour of hacking Pitfall:

post-5021-1083019971_thumb.jpg

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...