Original Post

So you’re supposed to drop “tiles” (organs?) and create a closed system. Once you do, “Tetris-like” your whole closed system explodes and clears that much area.

The problem is when I have just the perfect piece, but it’s one space to the left of where I want it. I give it a brief “right” click.

It moves two spaces.

Noooo, one space left.
It moves TWO spaces left.

No! One right!
It moves two spaces right.

NO, ONE SPACE, YOU STUPID PIECE OF….
It moves two spaces left.

By this time it’s LANDED in the wrong place and is STUCK.

“ARRRRGGGGGHHHHHHH!!!!”

Is it supposed to do that? It seems YELLING at it doesn’t help…

14 Replies

Yes, that’s an annoying flaw in the game. I’ve thought about hacking the ROM to fix this, but the code is such a mess that I can’t promise anything.

EDIT:
If it bothers you that much, play on the lowest speed. The scoring rules are the same anyway.

  • This reply was modified 11 years, 1 month ago by HorvatM.

hehe i think the speeds are mixed up..if i remember..medium was high ??

btw..i luv that game πŸ™‚ classic

HorvatM wrote:
Yes, that’s an annoying flaw in the game. I’ve thought about hacking the ROM to fix this, but the code is such a mess that I can’t promise anything.

That would be kewl!!!

Hey — if you do hack the Rom, maybe it’s possible to replace the Japanese with English??? That’d be kewl-er!!!

If it bothers you that much, play on the lowest speed. The scoring rules are the same anyway.

Oh, I think I’ll live. But I was playing on the lowest speed; that is, it SAID “lowest”. It doesn’t happen all the time — after 3-4 (or so) double-moves, then it would move ONE space.

bigmak wrote:
hehe i think the speeds are mixed up..if i remember..medium was high ??

Really? Hadn’t discovered that yet. 😐

btw..i luv that game πŸ™‚ classic

“Lab” and “Virtual Bowling” are two I’ve never acquired. Now I find I can’t play Bowling very well either; lots of gutter balls. Haven’t figured out the controls.

I never thought I’d get to play those two — way too expensive (when they DO show up at all!)

“Viva FLASHBOY”!!!

πŸ˜€ πŸ˜€ πŸ˜€

vb-fan wrote:
Hey — if you do hack the Rom, maybe it’s possible to replace the Japanese with English??? That’d be kewl-er!!!

According to Google Translate, the Japanese text in all cases says pretty much the same thing as the English text above it.

Seriously, Back in the day I Got Virtual Lab from a small shop in NYC for $120 (!!!!!!!!!) But It was so bad I only played it twice. That game was an unfinished mess. I always wondered if it had a two player option though (it was probably “supposed to”.

At that point I had 20 of the 22 games (unless you count The Japanese version of Baseball as a different game, in which case its 23). Guess which two I did not have.

It was Sooooooo bad that I ended up selling it to pay for a school film project less then a year later ($500 on ebay, not bad for 2004). Now I need to get to the point where I buy Virtual Lab again to complete a collection.

HorvatM wrote:
I’ve thought about hacking the ROM to fix this, but the code is such a mess that I can’t promise anything.

Hey HorvatM, have you found anything in the code of Virtual Lab that lets us know what the purpose of the numbers at the end of each level were supposed to be? Is there evidence in the code that these numbers truly were supposed to be used as a password to save the game?

I was going to try to find that out some day, but, since you asked, I felt obliged to start doing that immediately.

I already knew from previous attempts at hacking the game that the password (note: I’ll call it the password even though I haven’t told you whether it’s a password yet), unlike in eg. Insmouse, does not get stored anywhere into the WRAM, probably because there is nowhere to enter it. So I had to find the function that displays it. That was easy, and fortunately it was a separate function, while most of the gameplay code is in one huge function.

I assumed that the function only displayed the password and was not responsible for calculating it, so I thought I had to go somewhere else to find the calculating function. Common sense dictated that the call to the calculating function had to be close to the call to the displaying function. Well, there is only one place in the code where the displaying function is called and I noticed it was being passed two values. One of them was the current level, the other one was unknown to me. But it was a dead giveaway that the function was not only responsible for displaying the password, but for calculating it as well.

Virtual Lab code is very hard to follow and completely unlike the code in Insmouse: the functions are long, full of redundant instructions, and everything seems to be as complicated as possible; apparently the code was compiled without any optimizations. Since the password function contained both the code to calculate the password and to display it and was very long (much longer than you’d think, considering what it does), I really didn’t want to figure out how it works.

Instead, I decided to play with the two values passed to it. They were both global variables (so I don’t know why they decided to pass them as parameters, but at least it made reverse engineering much easier) and I knew one of them was the level. It shouldn’t be too hard to figure out what the other is, right? It turned out to be the “MAX” value. Amusingly, the game has two MAX-related variables, both of them global: one is incremented each time the on-screen MAX display is incremented, and the other is calculated before the incrementing begins.

Now that I knew what both values were, it was time to try out different combinations of them to see how they influence the generated password. Here are some of them:

Level 1, MAX 0: 0000000
Level 1, MAX 1: 0000016
Level 2, MAX 0: 0032000
Level 2, MAX 1: 0032016

A pattern emerges. We can see that to get the password of a given level and MAX value, we simply use the formula

P = L * 32000 + M * 16

where L is the completed level, starting with 0 for level 1, and M is MAX, which may be no higher than 62, although that value is impossible to get during gameplay. Let me also point out that, according to this formula, some of the passwords listed on this site are invalid because they are odd, while the formula only produces even numbers. All others are valid. I will speak about this later.

This formula works only for values of L up to 7. If you use it for L = 8, you will get 0256xxx, “xxx” depending on MAX. The game, however, gives you 1256xxx for completing level 9. Well, if you look at the password list on this site, you will see that the passwords for L values of 0 to 7 begin with a 0, 8 to 15 with a 1, 16 to 23 with a 0, 24 to 31 with a 1, and so on. So, in programming terms, if the bitwise AND of the level and 8 is nonzero, the password starts with a 1, otherwise it starts with a 0. This extra step appears to exist only to make reverse engineering the passwords slightly harder, as you will see later.

But even that only works up to L = 15. Starting with 16, things get weird. If you use the formula with 16, you get 0512000, but the game says 0002xxx. Long story short, if you look at the password list, you will see that, if you ignore the first digit, the passwords don’t just keep getting higher, but “roll over” to a smaller value periodically.

It was midnight (it was already 7:31 PM for me when you asked the question) and I was tired, so I went to sleep and continued the research in the morning before going to school (it starts at 8:40 AM on certain days). I discovered that the correct encoding algorithm (but not necessarily the one used in the game) is this (presented in an obscure programming language called NewtonScript, which is my favorite programming language and has a syntax similar to Pascal):

P := (L * 32000 + M * 16) mod 510000;
if BAnd(L, 8) <> 0 then P := P + 1000000;

Note: “mod” is the modulo operator, which here is effectively the remainder of division and is responsible for “rolling over” the number. “BAnd” is the bitwise AND function.

As you can see, L = 16 now gives us 0002000, which is a valid password. Now I only had to find a way to decode the level and MAX from any given password. My previous method was

P := P mod 1000000; // ignore the first digit
M := P mod 1000;
L := (P – M) div 32000; // get level
M := M div 16; // get MAX

but that only worked for values of L lower than 16. (Note: “div” represents division whose result is rounded towards zero.)

My classmate Sebastian Čolić (got to give credit where credit is due!) figured out the rest during history class.

For example, if you have the password 0034000, you will see my decoding algorithm fail. 34000 div 32000 is 1, but the correct level is 17. It turns out you have to pay attention to the remainder too. 34000 mod 32000 is 2000. Divide 2000 by 2000, multiply the result by 16, add 1, and you get 17. The correct algorithm, which I then tested against all the passwords listed on this site, except the odd ones, is this:

P := P mod 1000000; // ignore the first digit
M := P mod 1000;
P := P – M; // get rid of the last three digits
M := M div 16; // get MAX
Q := P div 32000;
R := P mod 32000;
L := R div 2000 * 16 + Q; // get level

Here are the rules for determining whether a given password is valid (there may be more):

* If the bitwise AND of the 0-based level and 8 is nonzero, the first digit of the password must be 1, otherwise it is 0.
* The last three digits, taken as a number, must be divisible by 16 and must not be higher than 832, because 52 is the highest possible MAX value (I think).
* The 0-based level must not be higher than 99.

Here is one more interesting fact about the game, which is not related to passwords: the game indeed ends and repeats on level 100, but since the level display is only two digits wide, the number 100 doesn’t display correctly. The programmer[s] accidentally checked for level 99, forgetting that it will be displayed as 100, while they should have checked for 98 instead.

The 17-year old mystery has finally been solved.

  • This reply was modified 11 years, 1 month ago by HorvatM.

Dude… I seriously got chills as I read this. Thank you so much for this!

This truly deserves to go down on the webpages of Virtual Boy history as a momentous occasion!

A big question arises in my head, though:

Why in the world would the password save the max value and not the score? The developers must have had some purpose for the max value, which never made it into the version of the game that got commercially released, unless it was just so that a player could say to his friends, “Hey, check out this max value I got. Here’s the password to prove that I got it,” instead of “hey, check out this score I got, here’s the password to prove that I got it.”

I have no idea. I guess we’ll never know.

EDIT:
The details about the passwords are on the previous page, in case anyone thinks this is my reply to Benjamin’s original question about them.

  • This reply was modified 11 years, 1 month ago by HorvatM.
  • This reply was modified 11 years, 1 month ago by HorvatM.

The story continues!

I was thinking about the significance of MAX while reading Benjamin’s translation of the Virtual Lab manual. I came to the part where it says how many levels up you go depending on your MAX value at the end of the level. I was curious whether this was actually implemented in the game.

After clearing a 38-piece monstrosity on level 1, the game gave me the password 0000098. This was strange to me because it wasn’t divisible by 16. I realized that my encoding and decoding algorithms weren’t entirely correct, so I experimented by trying out large MAX values.

It turns out that the MAX value is encoded with a modulo-based trick similar to the one used for the level. This is the correct encoding algorithm:

P := L * 32000 mod 510000 + M * 16 mod 255;
if BAnd(L, 8) <> 0 then P := P + 1000000;

The correct decoding algorithm is this:

P := P mod 1000000; // ignore the first digit
M := P mod 1000;
P := P – M; // get rid of the last three digits
Q := P div 32000;
R := P mod 32000;
L := R div 2000 * 16 + Q; // get level
Q := M div 16;
R := M mod 16;
M := R * 16 + Q; // get MAX

I tested it against all the odd passwords listed on this site and they are valid. The passwords for levels 44 and 56 are actually for levels 43 and 55, but they are still valid.

So, other then finally figuring out how/why/what of the password mystery was there anything else of interest in the code/on the cart? Unused Graphics or sound? ACTUAL music? Cryptic notes from the mentally unstable programmers?

Hey, don’t be so harsh on the programmers. So far it has been thought that the game was rushed to market because Nintendo was going to cancel the VB soon, and it certainly seems like it.

I’ve made a very complete ROM map of the game, and there are about 13 kilobytes of unidentified data, most of which is probably for music and sound effects. The whole game, for comparison, is 63630 bytes of code and 216640 bytes of data (on a 1 megabyte cartridge!). I know roughly where the title screen music is stored, but I have no clue on the format. Also, 13 kilobytes is quite a lot for a game with so few music tracks (and they aren’t very long), so there could be tons of unused music in there.

I have however discovered some unused content, which I’ve described here:

http://www.planetvb.com/modules/newbb/viewtopic.php?post_id=22312#forumpost22312

BTW, in my previous post I forgot to mention whether MAX has any effect on the level. It works as described in the manual, but it’s ridiculously hard to clear so many pieces at once, probably because the gameplay mechanics weren’t finalized at the time of the game’s release.

HorvatM wrote:
Hey, don’t be so harsh on the programmers. So far it has been thought that the game was rushed to market because Nintendo was going to cancel the VB soon, and it certainly seems like it.

Several of the games were “rushed to market” ostensibly to recover at least some of the development costs. Waterworld certainly was that way. Maybe some day we can have a “remastered Waterworld”.

I really think “Vertical Force” was another; it doesn’t have much of an ending, just some text that gets put up “game over”.

 

Write a reply

You must be logged in to reply to this topic.