Original Post

Hello all,

I’m reading over the VB Programming Guide, and one of the first things I’m having trouble with is how to interpret the column table and what it accomplishes when drawing an image on the screen.

First, let me explain how I understand the Virtual Boy, and perhaps someone can correct my misunderstandings and answer my questions.
From what I understand, the Virtual Boy only has a single row of 224 state-of-the-art LEDs in a single column that points toward the middle of a rectangular mirror.

By default (i.e. resting position), this mirror will reflect the LED light at a 90 degree angle. That is, the mirror by default sits 45 degrees from the perpendicular and the parallel to the direction of light emanation. The mirror vibrates about an axis which is perpendicular to both the mirror and the light emanating from the LED.

When the mirror moves (only consider one mirror for now- which one doesn’t matter), the angle of incidence for the LED changes. The angle of reflection will change correspondingly, and the light will reach a different position of the eye. Repeat 384 times, and a full frame is created.

The extra time it takes for light to reach a person’s eye when the mirror is at one extreme angle should be negligible compared to the amount of time it takes light to reach a person’s eye when the mirror is at the other angle. Why is it necessary to increase or decrease the duration of time that an LED remains on depending on at what angle the light is reflected by the mirror? Additionally, what does the repeat value actually do when drawing an image? Does it make sure the light for a given LED stays on the same amount of time as the next “repeat number” columns are drawn.

This begs for a diagram. I wonder if Nintendo’s official programmer’s manual had one that explained the timings.

3 Replies

You’re understanding the mechanics correctly. The column table is not for compensating for the speed of light 🙂

However, the mirrors don’t move at a constant speed. Think of it as how the Y coordinate moves on a sine wave. At the extreme angles the mirror is moving slower, and as it sweeps over the middle it moves faster. So without compensation for that, the columns at the edges of the image would be thinner and closer together. The leds need to stay lit longer for those columns, or you’d get a squished image at the left/right edges.

Hope I didn’t make it more confusing 🙂

  • This reply was modified 10 years, 2 months ago by DanB.

Actually, that cleared up A LOT of things. In an ideal world, the mirrors would likely vibrate at a constant speed and change direction instantaneously. But alas, we do not live in such an ideal world.

When viewed from the top down, the mirrors probably do follow a sinusoidal pattern. A single column of pixels doesn’t actually have a well-defined width because the mirrors do not reflect light at discrete intervals.

A follow up question: I remember reading that the VB will emit 4 or so LEDs out of the 224 at a time. Since the mirrors are always in motion, doesn’t this mean that even the angle of incidence for a single column of a frame will vary as each consecutive pack of 4 LEDs is lit?

I suppose it’s not noticable in practice (I mean, a straight vertical line looks pretty straight on the VB to me :P)… I’m just wondering.

cr1901 wrote:
Additionally, what does the repeat value actually do when drawing an image? Does it make sure the light for a given LED stays on the same amount of time as the next “repeat number” columns are drawn.

The LEDs turn off after the duration specified by their brightness registers. The system has a fourth brightness register ([font=Courier]0x0005F82A[/font]) that is used as the duration of the “rest” period between transmissions. That is to say, after an LED shuts off, it won’t turn back on until the idle period elapses. The repeat value in the column table causes the whole LED cycle to happen again for the specified number of times.

Due to the way the eye processes photons, the effective result of repeating an emission is that it gets brighter and brighter each time. Over the course of a single column’s emission, the greater the proportion of time spent on to time spent off directly correlates to the perceived brightness. Therefore, repeating a column’s emission once will double the brightness, repeating it twice will triple it, etc.

The intro cinematic to Wario Land kind of fades out on the edges. This was done by manipulating the repeat values in the column table.

cr1901 wrote:
I remember reading that the VB will emit 4 or so LEDs out of the 224 at a time. Since the mirrors are always in motion, doesn’t this mean that even the angle of incidence for a single column of a frame will vary as each consecutive pack of 4 LEDs is lit?

All 224 LEDs will emit light provided the video memory specifies non-black color values for each of them. The 4-column figure comes into play by the fact that each entry in the column table specifies the total time to draw 4 columns, rather than one entry for each horizontal pixel. That is to say, even if you configure the repeat value for each sequential table entry, the brightness will only apply to every group of 4 pixels horizontally.

I’ve yet to see an emulator that properly emulates the column table’s repeat values, and even that Wario Land screenshot came from a fudged hack in Mednafen, so I can’t point at it as an example of exactly how the repeat value affects the fade-out effect.

 

Write a reply

You must be logged in to reply to this topic.