How MSX limitations affected Dragon Warrior 2's graphics
Moderator: Moderators
How MSX limitations affected Dragon Warrior 2's graphics
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.
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.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
Re: How MSX limitations affected Dragon Warrior 2's graphics
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.
Re: How MSX limitations affected Dragon Warrior 2's graphics
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...
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...
Re: How MSX limitations affected Dragon Warrior 2's graphics
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.
Re: How MSX limitations affected Dragon Warrior 2's graphics
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 :
PS :
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.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.
Last edited by Bregalad on Mon Sep 24, 2018 8:14 am, edited 1 time in total.
Re: How MSX limitations affected Dragon Warrior 2's graphics
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.
Re: How MSX limitations affected Dragon Warrior 2's graphics
Not 2 colors + transparent. Just two colors.Bregalad wrote:How is it possible that MSX limits to 2 colors + transparent per line ?
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.
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.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.
Also, the Sprite Attribute Table is in the same address space as the name table; there's no need to prepare OAM for DMA.
- rainwarrior
- Posts: 8732
- Joined: Sun Jan 22, 2012 12:03 pm
- Location: Canada
- Contact:
Re: How MSX limitations affected Dragon Warrior 2's graphics
The description confused me for a moment too.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 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.
Re: How MSX limitations affected Dragon Warrior 2's graphics
By the way, it turns out it's not a black mask anyway.
- Attachments
-
- dragon-quest-msx-1-layers-animation.gif (11.53 KiB) Viewed 11073 times
Re: How MSX limitations affected Dragon Warrior 2's graphics
So it's black + another color per line on the background, and 2 single-color sprites on top, is that it?
Re: How MSX limitations affected Dragon Warrior 2's graphics
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.lidnariq wrote:By the way, it turns out it's not a black mask anyway.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
Re: How MSX limitations affected Dragon Warrior 2's graphics
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.
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.
I assume you mean five sprites?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.
Re: How MSX limitations affected Dragon Warrior 2's graphics
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!
Re: How MSX limitations affected Dragon Warrior 2's graphics
It is, but that means that the 5th sprite is what drops out...?
Re: How MSX limitations affected Dragon Warrior 2's graphics
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.
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.