Register | Login
Views: 19364387
Main | Memberlist | Active users | ACS | Commons | Calendar | Online users
Ranks | FAQ | Color Chart | Photo album | IRC Chat
11-02-05 12:59 PM
1 user currently in Rom Hacking: hukka | 2 guests
Acmlm's Board - I2 Archive - Rom Hacking - F-zero Maximum Velocity & GP legend | |
Pages: 1 2 3 4 5 6 7 8 9 10Add to favorites | "RSS" Feed | Next newer thread | Next older thread
User Post
Heian-794

Red Super Koopa
Level: 44

Posts: 822/896
EXP: 611014
For next: 271

Since: 06-01-04
From: Kyoto, Japan

Since last post: 21 days
Last activity: 10 days
Posted on 08-08-05 04:15 PM Link | Quote
Firemaker, yeah, all those suppositions back then about course structure were correct; actually decompressing it is another matter!

But let's not get ahead of ourselves just yet. Who knows what additional roadblocks might pop up with FZMV still?

I like the physics of this game more than GPL, and it's small enough to be able to make a really good hack. Changing the entire storyline in GPL seems like a lot more work than it's worth.
firemaker

Level: 26

Posts: 160/247
EXP: 94178
For next: 8097

Since: 03-23-04
From: UK berkshire

Since last post: 17 days
Last activity: 11 days
Posted on 08-08-05 06:18 PM Link | Quote
One thing i kind of like about MV legend is the fact that it doesn't feature any of the normal ships or tracks, its unique and thats kinda cool for example rather tenth zone east than something like mute city (though illusion is cool i have to say!!)
Heian-794

Red Super Koopa
Level: 44

Posts: 823/896
EXP: 611014
For next: 271

Since: 06-01-04
From: Kyoto, Japan

Since last post: 21 days
Last activity: 10 days
Posted on 08-09-05 01:55 AM Link | Quote
If you're talking about the racing style of Illusion, where you crash if you veer off the track, I don't think this game will allow for that.

But if you're talking about the look, with the translucent tracks, we might be able to do that. Translucent effects such as the course map in the lower left corner are done by rapidly switching a color from on to off. What if we were to take a clue from course elements that vary in color, such as the flashing barriers and the exhaust flames, and assign the transparent color to some of those, and then somehow get the "plain track" tiles to vary like those other tiles do? Might be doable; might not be.

Did the English manual to this game give any background to the venues in this game? he Japanese one describes the places a little bit -- Bianca City has recently surpassed Mute City as the Earth's largest metropolis, but was once a small village named for the mayor's daughter. Silence is on an uninhabited (then how did those Stonehenge things get there in the first game?), pure silent planet. Tenth Zone East is in a polluted industrial land where the sun can't shine through all the smoke. Cool stuff.
Nestea

Goomba
Level: 8

Posts: 20/20
EXP: 2185
For next: 2

Since: 03-15-04

Since last post: 85 days
Last activity: 53 days
Posted on 08-09-05 02:20 AM Link | Quote
Originally posted by Heian-794
Great work, though; where are all the other F-Zero fans?


Obviously misinformed.
RT-55J

Ninji
Level: 23

Posts: 176/240
EXP: 65287
For next: 2436

Since: 12-29-04

Since last post: 9 hours
Last activity: 9 hours
Posted on 08-09-05 04:38 AM Link | Quote
Originally posted by Heian-794
Did the English manual to this game give any background to the venues in this game? he Japanese one describes the places a little bit -- Bianca City has recently surpassed Mute City as the Earth's largest metropolis, but was once a small village named for the mayor's daughter. Silence is on an uninhabited (then how did those Stonehenge things get there in the first game?), pure silent planet. Tenth Zone East is in a polluted industrial land where the sun can't shine through all the smoke. Cool stuff.

*Pops out US manual*

As far as I can tell it only gives the backstory to Bianca City, Tenth Zone East, and Stark Farm.
BGNG

Snifit
Level: 22

Posts: 221/276
EXP: 56579
For next: 1771

Since: 06-03-05

Since last post: 8 days
Last activity: 3 hours
Posted on 08-09-05 08:18 AM Link | Quote
Heian-794:
The Jet Vermillion can comfortably make the hairpin turn at the end of Stark Farm - First Cirtuit.

firemaker:
Don't get ahead of yourself. Hacking of Maximum Velocity is not yet done. Three known things that need to be found include 1) the venue graphics palette changing, 2) the distance and ability to move of the venue floors, and 3) the location of the course description images in the Rankings menu.

And, as I recall, didn't you speculte that the courses were 4096 bytes?
Heian-794

Red Super Koopa
Level: 44

Posts: 825/896
EXP: 611014
For next: 271

Since: 06-01-04
From: Kyoto, Japan

Since last post: 21 days
Last activity: 10 days
Posted on 08-09-05 03:26 PM Link | Quote
Originally posted by BGNG

firemaker:
Don't get ahead of yourself. Hacking of Maximum Velocity is not yet done. Three known things that need to be found include 1) the venue graphics palette changing, 2) the distance and ability to move of the venue floors, and 3) the location of the course description images in the Rankings menu.

And, as I recall, didn't you speculte that the courses were 4096 bytes?


Half credit for that one!

One more thing I'd like to do is to make the "Kim" cars playable all the time. It should be easy enough to find a code telling which car you're driving in the RAM, and I looked around with the assumption that Hot Violet would be 00 or 01, Fire Ball 01 or 02, etc., but came up empty. I wonder if the game would crash if you completed Master (which brings up a big picture of the driver) with them, though, and tried to ask the game to come up with a nonexistent photo.

On that course, as I understand it, you get to restart if you crash.

Nestea, remember the tileset we were looking at in our efforts to crack F-Zero a while back? This game sets up the "floor" backgrounds separately from the track, so there are 256 tiles available just for the tracks, rather than 256 including floor stuff. Now there are many more exploded mine parts, damaged track graphics, and the like.

More "Venue Background Information" from the Japanese strategy guide:

Laputan Colony (Empyrean Colony) "Before interstellar travel was as developed as it is now [~ AD 2595], the people living on this planet, faced with a population problem, put their hopes in cities in the sky. But as costs piled up, many of the plans stalled, and eventually only one area, the Laputan Colony, was succesfully completed. After that, development of floating cities was seen as being behind the times, and is no longer conducted."

Synobazz [note: "shinobazu" is a Japanese word that means "cannot endure"] "An area on the periphery, covered in swamps. Long ago, some nobles fleeing from a revolution settled themselves here. The strange lights emitted by the bottoms of the swamps have brought about rumors of treasure hidden there; also, supposedly space freighters passing through the area have mysteriously disappeared."

Cloud Carpet "A planet whose entire area is covered in clouds. In order to capture light from above, the people living below the clouds constructed huge towers to carry thee sun's rays down to their cities using fiber optic cables. From the race courses, whose anti-gravity devices use solar power, one can see Mt. Babylon, the highest mountain on the planet."

Fire Field "A traditional venue which has hosted races since the beginning of F-Zero. Explorers who initially surveyed this planet determined that humans would never be able to live here no matter how many centuries pass, and F-Zero machine pilots find the environment to be the harshest. Supposedly, ancient alien people have worshiped this planet in their religions."
firemaker

Level: 26

Posts: 163/247
EXP: 94178
For next: 8097

Since: 03-23-04
From: UK berkshire

Since last post: 17 days
Last activity: 11 days
Posted on 08-09-05 04:41 PM Link | Quote
Originally posted by BGNG
Heian-794:
The Jet Vermillion can comfortably make the hairpin turn at the end of Stark Farm - First Cirtuit.

firemaker:
Don't get ahead of yourself. Hacking of Maximum Velocity is not yet done. Three known things that need to be found include 1) the venue graphics palette changing, 2) the distance and ability to move of the venue floors, and 3) the location of the course description images in the Rankings menu.

And, as I recall, didn't you speculte that the courses were 4096 bytes?

EDIT

something crossed my mind just now. when creating new tracks you will have trouble substituting them with the old ones because the tracks might be larger or smaller so it looks like new tracks would have to go into the space at the end of the rom


(edited by firemaker on 08-09-05 07:44 AM)
BGNG

Snifit
Level: 22

Posts: 222/276
EXP: 56579
For next: 1771

Since: 06-03-05

Since last post: 8 days
Last activity: 3 hours
Posted on 08-10-05 01:21 AM Link | Quote
"You don't want the kids laughing at you because you had a question that was answered in a sticky, now do you? Ho ho ho ho! No you don't." ~Posting And You

According to post #38 in this very thread, the following information has been found:

Well how 'bout them apples? The pointer table for the locations of tracks is at 360AB0. Just change a pointer, and different track data is loaded. How convenient!

This means that we'll be able to use other ROM space for track data. And THAT means that there's virtually no limit to how big the courses can be.

There's 60,336 leftover bytes at the end of the ROM. That's enough for 20, 3000-byte courses... That's plum plenty!

And taking into account the space already in the ROM for track definitions, we get a grand total of 108,673 ready-to-serve bytes. That's enough for... oh... 36 really big courses.
firemaker

Level: 26

Posts: 168/247
EXP: 94178
For next: 8097

Since: 03-23-04
From: UK berkshire

Since last post: 17 days
Last activity: 11 days
Posted on 08-10-05 02:31 AM Link | Quote
Originally posted by BGNG
"You don't want the kids laughing at you because you had a question that was answered in a sticky, now do you? Ho ho ho ho! No you don't." ~Posting And You

According to post #38 in this very thread, the following information has been found:

Well how 'bout them apples? The pointer table for the locations of tracks is at 360AB0. Just change a pointer, and different track data is loaded. How convenient!

This means that we'll be able to use other ROM space for track data. And THAT means that there's virtually no limit to how big the courses can be.

There's 60,336 leftover bytes at the end of the ROM. That's enough for 20, 3000-byte courses... That's plum plenty!

And taking into account the space already in the ROM for track definitions, we get a grand total of 108,673 ready-to-serve bytes. That's enough for... oh... 36 really big courses.




i neverr said that you could't change te pointer i jus stated that you couldn't replace the origanal tracks


(edited by firemaker on 08-09-05 06:19 PM)
Heian-794

Red Super Koopa
Level: 44

Posts: 826/896
EXP: 611014
For next: 271

Since: 06-01-04
From: Kyoto, Japan

Since last post: 21 days
Last activity: 10 days
Posted on 08-10-05 02:59 AM Link | Quote
Firemaker, with 21 courses to overwrite or otherwise replace, the data at the end should be enough even if we leave all the original course data intact.

I imagine it would be really difficult to leave all the original (as in 'put there by Nintendo') courses in, and then add our own original ('made by us') courses, and have all of them available for practice, because there's only so much space in that 78-byte-per-course palette/venue/music pointer table. But the original game controlled which course you were selecting with a single byte, so it was possible to make courses like Fire Field available for practice runs merely by editing this byte in RAM. So I imagine that in a hacked game, it might be possible to keep the old courses using cheats and have new hacked ones in the cups and standings.

But it's really not important that those stay in.

I'll translate a few more of those venue descriptions today or tomorrow. They're pretty interesting.

BGNG

Snifit
Level: 22

Posts: 223/276
EXP: 56579
For next: 1771

Since: 06-03-05

Since last post: 8 days
Last activity: 3 hours
Posted on 08-10-05 09:35 AM Link | Quote
Bumping? No such thing, man.



Documentation on the course compression algorithm is almost complete, though I'm in a quandary... Once I'm done documenting it, what comes next?

Course O' Action #1:
I could program a compressor, then a panel laying program, which would essentially be a rudimentary level editor. Adding functionality to patch new courses to the ROM would be trivial.

Course O' Action #2:
I could go looking for the rest of the data in the ROM that needs to be hacked: description alignment in rankings menu, venue floor/horizon palette changing, and venue floor motion.

Course O' Action #3:
I could sit back for a time and let someone else head the movement. I seem to have taken a de facto role as project manager and I don't want to feel obligated to keep things moving.



Input would be appreciated. It will certainly affect the progression of the Maximum Velocity hacking movement.
Heian-794

Red Super Koopa
Level: 44

Posts: 829/896
EXP: 611014
For next: 271

Since: 06-01-04
From: Kyoto, Japan

Since last post: 21 days
Last activity: 10 days
Posted on 08-10-05 12:03 PM Link | Quote
BGNG, I'd support Course O' Action #1: -- you're the only one who knows how to compress data and create a panel layout editor, and that's the first thing we need to get started with editing courses. Might as well have some people testing it now.

The rest of the data could conceivably be found by someone else, as could other hack-worthy stuff like car data and car palettes, but I think it's safe to admit that only you know how the compression works.
firemaker

Level: 26

Posts: 169/247
EXP: 94178
For next: 8097

Since: 03-23-04
From: UK berkshire

Since last post: 17 days
Last activity: 11 days
Posted on 08-10-05 02:33 PM Link | Quote
I think am going to second heian's motion but when you release the documentation on the compression I am going to try and figure it out for myself
Heian-794

Red Super Koopa
Level: 44

Posts: 832/896
EXP: 611014
For next: 271

Since: 06-01-04
From: Kyoto, Japan

Since last post: 21 days
Last activity: 10 days
Posted on 08-10-05 03:44 PM Link | Quote
More background stuff just for fun:

Ancient Mare: (Ancient Mesa) In ancient times, when people looked out at planets using telescopes, they imagined that the dark spaces might be oceans, and called them "marea" ("seas"). When the pioneers discovered this planet, they named it "Ancient Mare" in honor of them. There is no other human activity here aside from the F-Zero races, and no people live here.

Stark Farm: In the past, this was a huge farming area considered to be the galaxy's food storehouse. When substances thought to be harmful were discovered in the soil, humans left this area behind, but later, others "running away from the troubles of life" and "fed up with modern society" settled here, and the three F-Zero courses they built are slowly garnering attention.

Beacon Port: Interplanetary travel brought about the necessity of beacons, or buoys in space broadcasting coordinates. But some of these buoys began to display mistaken coordinates after being damaged by meteor strikes and ship crashes. Malfunctioning buoys were gathered on this part of the planet for repair. People in the industry call this area "Beacon Port".

Crater Land: A colony for excavating the oil from inside this planet's giant craters. The large amounts of oil buried here indicate that there were once many living organisms on this planet, but now there is no sign of them.



One more hacking tidbit -- At 030031A4 and 31A8 in the IRAM you'll find the code for the car selected for you and the computer, respectively. 00 is the Hot Violet, 01 is Fire Ball, and so on up to 08 Fighting Comet and 09 Jet Vermilion. Attempts to assign 0A or 0B in hopes that the Single-Pak race car "Kim" would be usable were fruitless.

31BC is the computer's level: 00 for beginner up to 03 master and then 04 for no entry.


(edited by Heian-794 on 08-10-05 07:06 AM)
BGNG

Snifit
Level: 22

Posts: 224/276
EXP: 56579
For next: 1771

Since: 06-03-05

Since last post: 8 days
Last activity: 3 hours
Posted on 08-11-05 01:06 AM Link | Quote
Well, Heian-794, now everyone knows... I'm kinda opting for Course O' Action #3, though.

Maximum Velocity Compression

The Game Boy Advance BIOS comes fully equipped with decompressor functionality for Huffman, LZ77 and RLE compression algorithms, but F-Zero Maximum Velocity--The first game for the system--uses a fourth, unique algorithm to store the data for the tracks. I don't know what this algorithm is called, so I'll be calling it "MVC," the "Maximum Velocity Compression" algorithm.

MVC is a simplistic algorithm that basically combines the functionality of Differential Filtering with RLE. The encoded data is structured in a manner of data blocks; each of which are identified by a specific value and their functionality is predefined. These identifiers are pseudo-opcodes, which makes understanding the algorithm quite easy.

Since MVC was designed to compress the level data, it does so fairly well. For the courses in the game, the compression ratio is in the range of 64% to 78% compression for all courses.

The compressed, encoded MVC data is stored as little-endian (least-significant byte first) for the GBA processor, but the decompressed data is stored as big-endian. All values outputted are in 16-bit, unsigned integer values, but the values inputted can vary.



For decoding, one variable needs to remain static between data blocks. This value, LastOut, is the value of the most-recently-outputted value by the decoder. Also, this documentation will make use of three functions to describe what goes on in each of the data blocks' processing. These functions are as follows:

Input8()
The Input8() function returns the next byte in the encoded data.

Input16()
The Input16() function returns the next two bytes in the encoded data in the form of a 16-bit, little-endian, unsigned integer.

Output(Val)
The Output() function outputs the value specified by Val into decoded data. The data outputted is in the form of a 16-bit, big-endian, unsigned integer.

All compression block types are stored as two byte values. The first of these bytes, EC, is the number of values to output that the block describes. The second byte, ID, is an identifier and describes how the block should function. These bytes are stored in the file in the order of EC ID.

The functionality of all data blocks can be determined by examining the ID byte. All possible values for this byte, and thusly all possible functions for data blocks, is described below. Following the descriptions is a BASIC-like programming language showing the operations performed for the given task. These pseudo-code examples are not optimized, but they are written to be as simplistic as possible.

The courses in the game all decompress to 8192 bytes, so stop whenever you have decoded that many.



Copy Raw
Copies a number of values directly from the encoded data to the decoded data. ID must be 0x00 for this block type.

Elements are copied in 16-bit units, so transfer EC * 2 bytes from the encoded data to the decoded data.

Processing:
For I = 1 To EC
    LastOut = Input16()
    Output(LastOut)
Next


Copy Raw Ex
Copies a number of values directly from the encoded data to the decoded data. ID must be 0x10 for this block type and EC must be 0x00.

Read the next 16 bits as the value for the number of bytes to transfer. Elements are copied in 16-bit units, so (assuming the value is read into a variable called Val) transfer (Val + 1) * 2 bytes from the encoded data to the decoded data.

Processing:
For I = 0 To Input16()
    LastOut = Input16()
    Output(LastOut)
Next


Incremental
Outputs a given number of values; adding 1 to the outputted value each time. ID must be 0x40 for this block type.

Output EC + 1 values, adding 1 to the previous value each time. The first value to output will be LastOut + 1.

If the resulting number after incrementation is greater than 0xFFFF, then subtract 0x10000.

Processing:
For I = 0 To EC
    LastOut = LastOut + 1
    If LastOut > 65535 Then LastOut = LastOut - 65536
    Output(LastOut)
Next


Incremental Ex
Outputs a given number of values; adding a given amount to the outputted value each time. ID must be 0x10 for this block type and EC must be greater than 0x00.

Read single bytes as the number to add to the previously-outputted value for the next value to output.

To keep the encoded data on a 2-byte boundary, a zero will be present at the end of the incrementing-value bytes if the number of elements being copied (EC) is an odd number.

If the number of an incrementing-value byte is greater than or equal to 0x80, then subtract 0x100 after adding.

If the resulting number after incrementation is greater than 0xFFFF, then subtract 0x10000. If the resulting number after incrementation is negative, then add 0x10000.

Processing:
For I = 1 To EC
    TB = Input8()
    LastOut = LastOut + TB
    If (TB And 128) Then LastOut = LastOut - 256
    If LastOut > 65535 Then LastOut = LastOut - 65536
    If LastOut < 0 Then LastOut = LastOut + 65536
    Output(LastOut)
Next
If EC Mod 2 = 1 Then Dummy = Input8()


Repetitive
Outputs a given number of the same value. ID must be 0x80 for this data block type.

Read the next 16 bits as the value to output. Output it EC + 1
times.

Processing:
LastOut = Input16()
For I = 0 To EC
    Output(LastOut)
Next


Zero Set
Output a value equal to 0 a given number of times. ID must be in the range of 0xC0 to 0xCF (inclusive) for this data block type.

The value to use for the number of elements to output is a 12-bit number composed of the latter 4 bits of ID for the highest 4 bits and the bits of EC as the lower 8 bits. Assuming the value is stored in a variable called Val, output 0 Val + 1 times.

Processing:
LastOut = 0
For I = 0 To (ID And 15) * 256 + EC
    Output(LastOut)
Next


Others
There are other values of ID that have effects on the output of the decoder, but it's glitchy, unpredictable and undefined. The values documented here are all of the values used by the game and are sufficient for decompressing all the tracks used in the game. If any value other than these is encountered, ignore it and read two more bytes for EC and ID.



Below is an entirely made-up example of data for MVC encoding and decoding. All data is color-coded and corresponds to the data of the same color in each of the three representations.

Compressed Data:
03 C0 01 80 4B 00 07 10 02 05 01 06 07 1B 03 00
03 00 8B 00 32 01 01 00 00 10 01 00 2B 01 4F 00
02 40 03 10 7F 92 04 00


Represented Data:
ZeroSet 4
Repeat 004B, 2
IncrEx 7, +02, +05, +01, +06, +07, +1B, +03
CopyRAW 3
CopyRAWEx 2
Incr 3
IncrEx 3, +7F, +92 -100, +04


Decoded Data:
00 00 00 00 00 00 00 00 00 4B 00 4B 00 4D 00 52
00 53 00 59 00 60 00 7B 00 7E
00 8B 01 32 00 01
01 2B 00 4F 00 50 00 51 00 52 00 D1 00 63 00 67



Aug10 2005, BGNG of Godspeed
Heian-794

Red Super Koopa
Level: 44

Posts: 833/896
EXP: 611014
For next: 271

Since: 06-01-04
From: Kyoto, Japan

Since last post: 21 days
Last activity: 10 days
Posted on 08-11-05 02:15 AM Link | Quote
BGNG, I'm going over the example you posted (not easy!); congratulations on a job well done! It's amazing that you figured all this out.

The CopyRAW Ex 2 in the middle is confusing me a bit; let me think about it a little more.

What exactly is this output? Plain tiles or 8x8 panels? If we have the panel numbers, how do we know what they're composed of? (Or am I forgetting something really basic?)

I'd head the project, but people will want a level editor in application format; something they can click on, and I don't know how to write programs for Windows. I'd probably end up visualizing arrays of panels, writing the decompressed code for them manually, and then working backwards to get compressed code -- something that even a bic level editor would improve upon.

Once a level editor gets started, I'm sure I could add to it, but I don't know how to get an application off the ground.

Thank you and otsukaresama desu on all your hard work!
BGNG

Snifit
Level: 22

Posts: 225/276
EXP: 56579
For next: 1771

Since: 06-03-05

Since last post: 8 days
Last activity: 3 hours
Posted on 08-11-05 04:23 AM Link | Quote
That outputs 16-bit identifiers for panel numbers. The largest panel number used in the game is in Silence - Open Circuit and holds a value of 0x0BFA, which is a whopping 3,066 different panels in decimal.

The panel definitions begin at 1D43FC and are 64-byte blocks defining the 64 tiles in the panel; left to right, top to bottom.

Tiles begin at 360B0C and are 64-byte blocks defining the 64 pixels in the panel; left to right, top to bottom. The colors of the pixels are matched up to a palette. When I generated the image for Silence, I used the data at 360B0C, so the "off by one tile" doesn't seem to apply.

The palette is 16-bit, little-endian ABGR and is pointed to in Track Info Table A. The bit structure is in the form of ABBBBBGG GGGRRRRR.



And "otsukaresama desu" isn't in my Japanese-English-Japanese dictionary... WHAT AM I GONNA DO!??!?!??!?!?5

Oh, and... What's up with "Kim"? That's a weird name for a machine.
RT-55J

Ninji
Level: 23

Posts: 178/240
EXP: 65287
For next: 2436

Since: 12-29-04

Since last post: 9 hours
Last activity: 9 hours
Posted on 08-11-05 04:56 AM Link | Quote
Originally posted by BGNG
Oh, and... What's up with "Kim"? That's a weird name for a machine.

It's the car used in single-pak multiplayer.
BGNG

Snifit
Level: 22

Posts: 226/276
EXP: 56579
For next: 1771

Since: 06-03-05

Since last post: 8 days
Last activity: 3 hours
Posted on 08-11-05 05:01 AM Link | Quote
Yes. That answers the question of WHAT Kim is. In fact, I acknowledged that when I said the sentence immediately following my question, which serves to clarify that I was asking about the name "Kim"... Why not something like "Pseudo Eclipse" or something else that would be better fitting for a machine name?
Pages: 1 2 3 4 5 6 7 8 9 10Add to favorites | "RSS" Feed | Next newer thread | Next older thread
Acmlm's Board - I2 Archive - Rom Hacking - F-zero Maximum Velocity & GP legend | |


ABII


AcmlmBoard vl.ol (11-01-05)
© 2000-2005 Acmlm, Emuz, et al



Page rendered in 0.027 seconds.