+  RHDN Forum Archive
|-+  Romhacking
| |-+  General Romhacking
| | |-+  The New Romhacker's Bible (King Gideon Edition)
Pages: 1 [2] 3 4
Author Topic: The New Romhacker's Bible (King Gideon Edition)  (Read 1 times)
Cyberman
Guest
« Reply #15 on: March 03, 2007, 11:21:13 am »

Quote from: KaioShin on March 03, 2007, 06:08:14 am
Book 2 - Fonts and tables

-Bitplane font storage
-Japanese table files

Book 3 - The Door to Serious Hacking

-Headers
-Addressing modes
-Pointers

Book 4 - Handling scripts

-Text dumping
-Text insertion

Book 5 - Assembly

-Assembly
You forgot
Book 6 - Compression Encryption and Bank Switching

You need to have subtitles too
Book 2 (A Few bits to play with)
Book 3 (Where am I looking at now?)
Book 4 (Data Data everywhere but not one bit to byte)
Book 5 (Dismemberment of a program)
Book 6 (Insanity is a state of programming)

Smiley

Cyb
Nightcrawler
Guest
« Reply #16 on: March 03, 2007, 01:30:02 pm »

Quote from: Gideon Zhi on March 03, 2007, 02:46:51 am
Honestly, I don't deal much with compression. I'm familiar with LZ and its derivatives on some level and Huffman to a lesser extent, but I generally speaking don't bother with recompression. Instead, I just break the damn stuff and implement my own routines to read uncompressed data from the rom :p

That's a bit of an ignorant mentality to have and very close minded when approaching a general ROMhacker's 'Bible'. Depending on the system and the game, it's not always possible to allocate additional ROM space to load uncompressed data. Not to mention in ALL cases, if you did use the compression, you could make better and more efficient use of the space you do have.

My point is, ignoring the subject altogether is a poor idea for something called a 'Bible'. Compression information of sort is an absolute must.

Look at all the people on this board alone who run into the compression stumbling block and have no clue what to do.
RedComet
Guest
« Reply #17 on: March 03, 2007, 01:32:05 pm »

Quote from: Nightcrawler on March 03, 2007, 01:30:02 pm
My point is, ignoring the subject altogether is a poor idea for something called a 'Bible'. Compression information of sort is an absolute must.

Maybe compression schemes are the dinosaurs of the rom hacking world? *zing*
Nightcrawler
Guest
« Reply #18 on: March 03, 2007, 01:42:41 pm »

Quote from: RedComet on March 03, 2007, 01:32:05 pm
Quote from: Nightcrawler on March 03, 2007, 01:30:02 pm
My point is, ignoring the subject altogether is a poor idea for something called a 'Bible'. Compression information of sort is an absolute must.

Maybe compression schemes are the dinosaurs of the rom hacking world? *zing*

How do you figure? I'd like to hear this one. Roll Eyes
RedComet
Guest
« Reply #19 on: March 03, 2007, 02:00:24 pm »

I just meant that I can't recall Noah herding T-Rexs onto the ark. Tongue Maybe they've changed something since the last time I read the Bible.
Cyberman
Guest
« Reply #20 on: March 03, 2007, 06:52:16 pm »

Well if compression schemes are used then it's something one should learn about.

It's not a matter weather it's obsolete.

For example FF7 uses 2 different compression schemes GZIP for some files (SCENE.BIN) and LZS for all the battle models and battle scene information.  GZIP gives higher compression however it's very slow. LZS is fast to decompress.

Currently new ROM images use compression as well.  If you have data that uses vast qauntities of space and you can save money by using smaller amounts of space. You compress the data. That's as simple as it gets.  Maybe Noah used compression on the T-rexs Wink

Cyb
Gideon Zhi
Guest
« Reply #21 on: March 03, 2007, 07:00:02 pm »

Covering every compression scheme would be completely impossible. I can maybe go over the general details of how the typical ones work, but honestly they're probably better explained at Wikipedia, and by the time someone's at a compression-capable level they ought to be able to figure out implementations and the like themselves.
Aerdan
Guest
« Reply #22 on: March 03, 2007, 10:00:52 pm »

I'd think the romhacking bible would show how to deal with compression in games, and would refer the reader to documentation to read if they want more details. It doesn't need an entire book to cover it, unless you want to briefly cover the more common compression formats. [like DTE, for example]
DaMarsMan
Guest
« Reply #23 on: March 03, 2007, 10:06:30 pm »

It should show a little about compression but not go too in depth. Perhaps provide a sample of decompressing a script and relocating it to an uncompressed form. This is the best way to do it if you have the room for it. I read my scripts straight from the ROM uncompressed.

You should also note that if the person has reached the level of assembly and read through that tutorial they should have the skills required to understand any compression scheme and can refer to outside documents for that stuff.
Spikeman
Guest
« Reply #24 on: March 04, 2007, 12:12:02 am »

Quote from: DaMarsMan on March 03, 2007, 10:06:30 pm
It should show a little about compression but not go too in depth. Perhaps provide a sample of decompressing a script and relocating it to an uncompressed form.

That is exactly what I was hoping for. And maybe an example of how to recompress it and still fit it in. Or how to add compression, such as DTE or Huffman, to a game to save space. I for one, prefer adding compression to expanding a ROM. Why increase the file size? Anyways, of course you don't have to go over every example. Just one or two examples would be enough to give someone at that level enough knowledge to figure out another one their self.
Neil
Guest
« Reply #25 on: March 04, 2007, 11:48:51 am »

Quote from: Gideon Zhi on March 03, 2007, 07:00:02 pm
Covering every compression scheme would be completely impossible. I can maybe go over the general details of how the typical ones work, but honestly they're probably better explained at Wikipedia, and by the time someone's at a compression-capable level they ought to be able to figure out implementations and the like themselves.

jay's doc does a fairly good primer. all it really needs is some real world examples.
Nightcrawler
Guest
« Reply #26 on: March 04, 2007, 04:00:16 pm »

Quote from: Gideon Zhi on March 03, 2007, 07:00:02 pm
Covering every compression scheme would be completely impossible. I can maybe go over the general details of how the typical ones work, but honestly they're probably better explained at Wikipedia, and by the time someone's at a compression-capable level they ought to be able to figure out implementations and the like themselves.

The goal in my opinion would be to bridge the gap so someone CAN get to a compression capable level. Right now, people left and right hit that block and have NO IDEA how to get over it. You don't need to make a data compression bible. However, something on the topic should be there to help bridge that cap so people can utilize the information that is out there.
Spikeman
Guest
« Reply #27 on: March 04, 2007, 05:30:32 pm »

I agree, I would say I'm a fairly capable ROM hacker, I can do ASM stuff, etc. But one thing I've never been able to beat is compression. A good "bridging the gap" document would REALLY help me, and I'm sure others of my level. Smiley
Cyberman
Guest
« Reply #28 on: March 04, 2007, 10:19:34 pm »

Lets revisit FF7 again? FF7 uses LZS compression (with all of the little tricks) however, the animations in the battle models for example are compressed also. (This drove everyone nuts including me as I was SO dang close I could taste it to having models that looked right.)  They delta compression with it that changes the delta size ocassionally with a special code size.  Simple things like this to RECOGNIZE for some poor Soul.

My Suggestion is to give a nice method for determining if compression was used.  Then maybe tips on guessing types. GZIP is easy to find because it uses magic bytes (can't miss those).  LZS is a bit different.  Delta compression ussually starts with a full set of data then has a weird byte indicating the delta bit width and then gives the delta data.  Things like these are priceless to give someone a decent perspective on getting a clue.

Giving every known compression scheme is exchausting and really not for a hackers bible. Instead it should defer to compression descriptions.  It should also give an idea of different compression schemes and where they are likely to be implemented.  Huffman is for example popular with JPEG and compression of the DCT data and YUV data.  Shanno Fano is used in ZIP.  Although there are a myriad of schemes only certain ones are good for particular applications.  RLE sucks for natural images, but is excelent for bit map fonts and things with large numbers of repeating pixels.  JPEG is bad for this type of data. Etc.    Simple clues like that give someone a starting place. Cheesy

LZS is a fairly good general purpose compression technique.  It appears good for both graphics (all the MIM files are compressed using it) text and other data (scripts conversation XYZ camera information, walkmap etc. are all compressed this way).  I'm surprised it's not in FF8 or FF9 (they are not compressed at all turns out), though would have fit on fewer disks if they had used compression <like 3 or less like FF7>).

I suppose I could give you the C code for LZS decompression if you would like it.  Not terribly exciting I'm afraid.

Anyhow I think ignoring compression would be a bit of a sin. Really one could at least say MANY games use compression common ones for SNES blah blah blah.  Actually descriptions could be left to already available documentation maybe?

Cyb
KaioShin
Guest
« Reply #29 on: March 05, 2007, 05:17:05 am »

I agree with Gideon, if you're getting so far to understand a document about compression you can do it yourself as well. Anything beyond a short section about which types there are would be wasted time.

People who stumble on compression often do the mistake of jumping right in without much other experience and wonder why the learning curve is too steep. I haven't dealt with compression myself before, so this might seem a bit hypocritical, but I know it's no big deal if you really understand ASM. Trace the routine, see how it works, emulate that in a programming language of your choice - voila, decompressor. What do we need for this? The ability to trace a routine, being able to make sense of ASM code and general programing skills. (Cyberman: I know it's a bit different for PC since you don't have so easy debugging options, but pretty much everyone interested in that document will want to hack console games)

This gets me to the idea that the ASM chapter in the book should have a dedicated section for debugging, using breakpoints efficiently and the like. That will be most helpful for many.

Back to topic, tracing and reading asm are dealt with in the ASM chapter. And teaching programming is beyond the scope of Gideons doc. So what should he write about? I think people overestimate the importance of compressions. They seem magically to beginners, but I think they are just another piece of the puzzle. Just make a few links to wikipedia articles on the most common compression algorithms, so people can recognize them when I they see the ASM code (and are truly good enough to understand it). You can't explain it better than that.
And re-compression, now that's really completely not within the scope of the document. It has almost nothing to do with hacking, all that matters there is being able to program and a very good grasp on algorithms. What should Gideon write about here? In this case it's really - who is able to do this doesn't need a document. There is nothing in between, you can't teach this stuff through a tutorial.


Pages: 1 [2] 3 4  


Powered by SMF 1.1.4 | SMF © 2006-2007, Simple Machines LLC