How MSX limitations affected Dragon Warrior 2's graphics

A place for your artistic side. Discuss techniques and tools for pixel art on the NES, GBC, or similar platforms.

Moderator: Moderators

User avatar
Dwedit
Posts: 4924
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

How MSX limitations affected Dragon Warrior 2's graphics

Post by Dwedit »

I was just watching some gameplay footage of the MSX version of Dragon Quest 2, and was surprised about how they did a great job of getting colorful character graphics on the screen despite the hardware limitations of the MSX.

Let's review the capabilties of the TMS9918 graphics chip (also found in the ColecoVision):
* 1bpp background tiles
* 1bpp sprites, up to 16x16 pixels large
* Each 8x1 pixel chunk of a background tile can pick two different colors.

So the game is drawing big 16x16 black/transparent sprites to black out the characters' shapes, then for the colors of the characters, it is using background tiles with 2 colors per 8x1 chunk. This allows the system to create graphics that look somewhat like a NES, only with two different colors per scanline instead of 3.

You can clearly see this when you look closely at the game's graphics, and count how many colors appear in a 8x1 area.

And amazingly enough, the NES graphics match the MSX graphics very closely. So you can see how hardware restrictions from the MSX affected how the NES version's graphics turned out. Especially look for things like flat horizontal lines.
dq2_msx.png
dq2_msx.png (836 Bytes) Viewed 11234 times
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: How MSX limitations affected Dragon Warrior 2's graphics

Post by tepples »

In theory, if graphics use the common subset of MSX and NES capabilities (2 colors per 8x1 pixel sliver, 4 colors per sprite or 16x16 pixel tile), one could compress them to 11 bits per sliver, saving about one-third compared to raw 2bpp.
User avatar
Bregalad
Posts: 8056
Joined: Fri Nov 12, 2004 2:49 pm
Location: Divonne-les-bains, France

Re: How MSX limitations affected Dragon Warrior 2's graphics

Post by Bregalad »

So basically the game uses background to draw sprites ? This sounds like it should have been a major hassle to code, I know what I'm talking about. Also wouldn't a huge black box appears behind the moveable characters if it was done that way ?

There was many variants of the MSX and they had different graphical limitations. I suspect most MSX games, especially ports from NES games, didn't run on the lowest-end earlier released MSX with the TMS9918, but were designed for later versions of the computer with a better chip. Considering how much NES games were ported to MSX I'd be surprised if all of them were running on the very limited TMS9918.

As for Dragon Quest II, it is far from even approaching to using NES graphics to it's limits...
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: How MSX limitations affected Dragon Warrior 2's graphics

Post by lidnariq »

It's only a problem if you try to do fine scrolling. But if everything just moves 8 pixels at a time (and it does), then you just move the sprite overlay at the same time as you update the tiles in the background.
User avatar
Bregalad
Posts: 8056
Joined: Fri Nov 12, 2004 2:49 pm
Location: Divonne-les-bains, France

Re: How MSX limitations affected Dragon Warrior 2's graphics

Post by Bregalad »

How is it possible that MSX limits to 2 colors + transparent per line ? This makes few sense, as the total amount of possibilities is 3, not a power of two number, which makes it impossible to store efficiently (without ressorting to major hacks). On the other hand, 3 colours + transparent or single colour + transparent makes perfect sense.

PS :
It's only a problem if you try to do fine scrolling. But if everything just moves 8 pixels at a time (and it does), then you just move the sprite overlay at the same time as you update the tiles in the background.
I know it might be less a hassle to code, but it's still going to be a hassle to code compared to just moving sprites around.
Last edited by Bregalad on Mon Sep 24, 2018 8:14 am, edited 1 time in total.
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: How MSX limitations affected Dragon Warrior 2's graphics

Post by tepples »

For background tiles, it's two colors per 8x1-pixel area. For sprites, it's two 1-color sprites overlaid, where the 1-color sprite may specify a different color for each 8x1-pixel area.
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: How MSX limitations affected Dragon Warrior 2's graphics

Post by lidnariq »

Bregalad wrote:How is it possible that MSX limits to 2 colors + transparent per line ?
Not 2 colors + transparent. Just two colors.

The datasheet for the TMS9918A explains Graphics 2 mode, which is honestly pretty weird to me, but whatever.

Basically
1- Unlike the NES, the "color tables" apply to the pattern tables, not the name tables. (Regardless of video mode.)
2- In Graphics 2, the color table specifies a unique pair of colors per 8x1 sliver of pattern.
Bregalad wrote:I know it might be less a hassle to code, but it's still going to be a hassle to code compared to just moving sprites around.
There's no hardware support for scrolling. If you're going to implement any scrolling at all, you have to move all the data in the name table. At that point updating a single X,Y coordinate for a masking sprite is incrementally negligible.

Also, the Sprite Attribute Table is in the same address space as the name table; there's no need to prepare OAM for DMA.
User avatar
rainwarrior
Posts: 8732
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: How MSX limitations affected Dragon Warrior 2's graphics

Post by rainwarrior »

Bregalad wrote:How is it possible that MSX limits to 2 colors + transparent per line ? This makes few sense, as the total amount of possibilities is 3, not a power of two number, which makes it impossible to store efficiently (without ressorting to major hacks). On the other hand, 3 colours + transparent or single colour + transparent makes perfect sense.
The description confused me for a moment too.

The two colours per line is all in the underlying background tiles. Then there is a rectangular black masking sprite on top to "cut out" the shape. (So underneath the black parts, the background is still just 2 colours per line.)

1 bpp solid + 1 bpp transparent = 3 colours?

Might have been good for the illustration to show what the backgrounds look like under the sprites, maybe blinking on and off with an animated GIF.
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: How MSX limitations affected Dragon Warrior 2's graphics

Post by lidnariq »

By the way, it turns out it's not a black mask anyway.
Attachments
dragon-quest-msx-1-layers-animation.gif
dragon-quest-msx-1-layers-animation.gif (11.53 KiB) Viewed 11073 times
User avatar
tokumaru
Posts: 12427
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: How MSX limitations affected Dragon Warrior 2's graphics

Post by tokumaru »

So it's black + another color per line on the background, and 2 single-color sprites on top, is that it?
User avatar
Dwedit
Posts: 4924
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Re: How MSX limitations affected Dragon Warrior 2's graphics

Post by Dwedit »

lidnariq wrote:By the way, it turns out it's not a black mask anyway.
You're right, and while either solution can achieve the same 3 colors, this means that when 4 16x16 sprites meet in a single scanline, the large solid color is what will flicker, not the mask.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: How MSX limitations affected Dragon Warrior 2's graphics

Post by lidnariq »

A single single-color sprite. Sprites on the TMS9928A are globally 8x8 or 16x16, unlike the 2C02.

And it could be two arbitrary colors per 8x1 sliver in the background, but all the ones I saw used black for one of the two colors.
Dwedit wrote:this means that when 4 16x16 sprites meet in a single scanline, the large solid color is what will flicker, not the mask.
I assume you mean five sprites?
User avatar
Dwedit
Posts: 4924
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Re: How MSX limitations affected Dragon Warrior 2's graphics

Post by Dwedit »

Must have misread the documentation, thought it was 4 sprites per scanline.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: How MSX limitations affected Dragon Warrior 2's graphics

Post by lidnariq »

It is, but that means that the 5th sprite is what drops out...?
User avatar
Bregalad
Posts: 8056
Joined: Fri Nov 12, 2004 2:49 pm
Location: Divonne-les-bains, France

Re: How MSX limitations affected Dragon Warrior 2's graphics

Post by Bregalad »

So this is even more complicated than I feared.
So backgrounds are not shown under sprites, and are used instead to draw sprites with 2 colours per line (black + another customizable colour). Then a single-colour sprite is used on top of that to add another colour, which makes a total of 2 colours per line + black. Is that correct ?

What looks particularly awful is not the fact there's one less colour per line than on the NES, but the fact the background is solid black behind sprites. This is ugly.

There is many NES games ported to MSX, I wonder how others managed to do this. I think of Gradius, Double Dragon, Vampire Hunter (clone of Castlevania), etc.... Did those have the same limitations as Dragon Warrior II, or were they ported to a superior version of the MSX ?

Final Fantasy in particular has very colorful graphics on MSX; which definitely added colours as opposed to the NES version. Even though the scrolling is still shitty.
Post Reply