Jump to content
Banner by ~ Wizard

request Assembly Tinkerer Wanted


LodeStar

Recommended Posts

Hi.

I am in the process of making an MLP themed program, and have smacked into a dev wall.

Currently, I am looking for someone who has experience with assembly language, preferably Z80 assembly. If you or someone you know (who would be comfortable with being pestered about it) have experience with assembly, message me here.

Thanks for your time.

LodeStar

Link to comment
Share on other sites

Last time I touched assembly *was* on the Z80, but that was thirty years ago in passing before moving on to Fortran. I doubt I remember anything useful.

 

But I'm dead curious, why the heck are you programming on a Z80? Last I checked, that chip's only used in PLCs and Breathalyzers now.


ConsoleSig4.png

Link to comment
Share on other sites

Z80? Why not some more modern processor? Or maybe 6502 for example? It was used in Nintendo Entertainment System, for which there are plenty of emulators out there.

 

I know some 6502 assembly and several years ago, when I was around 12..15 years old, I programmed in assembly for my old faithful Atari 65 XE (because BASIC turned out to be too slow for my game-programming needs). I don't know how much programming for Z80 differs from 6502, but if you tell us some more, maybe I'll be even able to help.

 

I also know Intel x86 assembly, and C/C++, if it's anyhow relevant to your problem.

 

Maybe just tell us some more about the actual problem, and we'll see how can we help you. I'll take a look at the Z80 assembly when I'll find some idle time later.

Edited by SasQ
Link to comment
Share on other sites

Thanks for the replies.

 

Looked through the rules and it doesn't look like it will hurt to be more detailed here. Although I admittedly like to keep projects (drawings, stories, etc) on the DL until they are done.

I'm essentially doing a rom hack of a program made for Game Boy. Most everything is going to be changed. like graphics, and storyline. I can handle graphics and have a fun non-canon storyline involving the Mane 6 in the works. I am having the darnest time trying to figure out where the "text data" is stored within the rom image itself (I've been using BGB's very nice debugging tools). Figuring out how the rom stores information will be vital to editing the in game text and dialogue as well as sprite palatte information.

I've learned a lot about assembly so far, but it's not enough yet, and I am ready for this project to happen. I need someone who can participate as the project's coder (although I will also participate in coding on a limited basis); this position would involve using a debugger and breakpoints in order to find out where certain data lies within the rom image and assist me in editing it. It would also be nice to have someone who can give me feedback on the ideas I will present in terms of storyline and such.

Sorry about the lengthy post, but it's hard to put what I need in a nut shell.

Thanks again.

LodeStar

Link to comment
Share on other sites

Actually the more details the better.

I don't know anything yet about GameBoy roms, but as to the text strings:

What character encoding they use? Some flavor of ASCII, or something custom?

Once I was analyzing a disassembly of some disassembler for 6502 and I couldn't find out how do they store the opcode names (mnemonics) in the program code. The computer (Apple II) has been using ASCII encoding, but I couldn't found any ASCII strings there. So I started to follow the code step by step and finally I cracked it: They were compressing the strings by taking only 5 important bits of the ASCII code and packing those 5-bit sequences inside longer byte sequences. This way they could fit 3 characters (15 bits)  into one two-byte word (16-bits). When they needed to display it, they shifted these bits into accumulator, five at a time, and added the '?' character code to it to get back the full ASCII code. Similar tricks are often used in games for olden time computers with very restricted memory capacities. So maybe this technique (or similar) is used in your ROMs too, and that's why you can't find any string data there?

Edited by SasQ
Link to comment
Share on other sites

Actually the more details the better.

I don't know anything yet about GameBoy roms, but as to the text strings:

What character encoding they use? Some flavor of ASCII, or something custom?

Once I was analyzing a disassembly of some disassembler for 6502 and I couldn't find out how do they store the opcode names (mnemonics) in the program code. The computer (Apple II) has been using ASCII encoding, but I couldn't found any ASCII strings there. So I started to follow the code step by step and finally I cracked it: They were compressing the strings by taking only 5 important bits of the ASCII code and packing those 5-bit sequences inside longer byte sequences. This way they could fit 3 characters (15 bits)  into one two-byte word (16-bits). When they needed to display it, they shifted these bits into accumulator, five at a time, and added the '?' character code to it to get back the full ASCII code. Similar tricks are often used in games for olden time computers with very restricted memory capacities. So maybe this technique (or similar) is used in your ROMs too, and that's why you can't find any string data there?

I haven't managed to ascertain whether or not the game has compressed text, but I don't recall finding ASCII text strings when I searched. I tried using breakpoints in vram to let the debugger take me to other portions of the rom, which I suspect store the "text", but in all honesty I can't figure out how to even begin searching for it even there. It is very possible that I am facing something similar to your example above, but I seem to recall a dev member telling me the rom was not compressed. But you sound like you understand this material far greater than me. If you want a bit of a primer on how GB assembly is laid out, take a look at "Pan Docs". 

Link to comment
Share on other sites

Maybe this will help?:

http://www.romhacking.net/start/#text

 

As the description says:

"Tables are another essential piece of ROMhacking knowledge you'll need if you ever hope to do any sort of text editing in your game and move beyond the cookie cutter graphics only hacks many have done. Tables are also absolutely required for doing any sort of Translation effort. [...] So, what exactly is a table? A table is a simple text file that lists all the font characters the game uses, and what hexadecimal (or binary) code represents them in the ROM. Why do you need one? Because you can't just open up a ROM and see the text (except in rare cases where the text is stored in ASCII such as the text you're reading now)."

 

This hints me that there could be one more possible encoding: similar to how tiles are encoded in a tile map. Or bitmap fonts in a text mode. There is one table which contains all the tiles/bitmaps with letters' graphics, and the other table which stores the indexes in that first table to choose particular letters. When the game needs to display some text, it has the subsequent numbers of letters stored somewhere (you can treat is as a string, just not encoded in ASCII). Then, for each letter to display, it takes its number from the tile map and peeks into the font table (tileset) to get the actual pixel data to copy into the framebuffer.

 

If you know already where it stores the sprites for the game, take a look if there are some bitmap fonts. If there are, then you can try to ascribe them numbers in order. Then take some text message from the game, translate its letters into a string of numbers, and scan the ROM for this number sequence. If these strings aren't encoded in some more fancy way, maybe this will help you find them.

 

Edit: What tools are you using for this? Can you link to the ROM dumps you're hacking? It'd be better if we could take a look ourselves into the actual data, instead of just speaking about some foggy concepts.

 

I cannot promise I can help you with the actual coding, since it would require learning some Z80 assembly myself and some more about the GameBoy architecture, which is beyond my free time resources for now, because I have some other programming project to do for a while (a program to convert pony puppets from the proprietary FLA files into some more open and convenient format: SVG, to make them available for people not using Adobe Flash, like me).

Edited by SasQ
Link to comment
Share on other sites

(edited)

The rom is called "Dragon Ball Z: Legendary Super Warriors". I am unable to provide a link, however.

The tools I have been using are BGB emulator\debugger and Windhex.

http://bgb.bircd.org/

http://www.zophar.net/utilities/hexutil/windhex.html

Also, the fonts can be found in windhex starting at address $0005FB00. I would assume that hex values represent the font at some level, but I am not sure how to find out what those hex values are so I can start searching for strings.

Edit:

As for ascribing numbers to the fonts in the bitmap, am I just taking shots in the dark or is there a way to determine these numbers?

Edited by LodeStar
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Join the herd!

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...