BIOS calls on MSX2+

Page 1/2
| 2

By Metalion

Paragon (1622)

Metalion's picture

28-08-2012, 14:00

Hi,

I was discussing with someone who is developping a asm game on a MSX2+. He told me that the MSX2+ BIOS calls (CHGMOD / CHGMDP) had not been modified to include the new graphic modes of the VDP 9958.

So for example, to go into SCREEN 10, he goes into SCREEN8 and then changes some VDP registers to switch into SCREEN 10.

Is that really the case ?

Login or register to post comments

By msd

Paragon (1510)

msd's picture

28-08-2012, 18:10

I remember that too.. SC10 until SC12 uses the same memory layout as sc8. The only thing you need to select is the color codec. YJK, YJE or RGB.

By Metalion

Paragon (1622)

Metalion's picture

29-08-2012, 09:01

Thanks for your answer, msd.

I think it's rather strange, because it means that there is no BIOS routine to switch to a perfectly normal screen mode ...

By sd_snatcher

Prophet (3642)

sd_snatcher's picture

31-08-2012, 01:46

I also tought that for quite some time, but then you understand that for the VDP there are no real "scr10" and "scr12". Those two modes are exactly this: two new raster color decoders for the screen-8, and nothing more. The blitter will still work as it does on screen-8: there's no support for the pset or line functions, i.e.

It would have been a lot better if they just added palette support for the screen-8. Easier to program, and a lot more useful.

By NYYRIKKI

Enlighted (6016)

NYYRIKKI's picture

31-08-2012, 09:52

Metalion wrote:

Thanks for your answer, msd.

I think it's rather strange, because it means that there is no BIOS routine to switch to a perfectly normal screen mode ...

I think this has to do with the fact that also BASIC handles these modes a bit differently as other modes:

If you for example switch (in BASIC) from SCREEN 7 to SCREEN 8 the screen will be automatically cleared. How ever if you change from for example SCREEN 12 to SCREEN 10 the picture will be "converted" instead of clearing the screen. This means that the mode change in SCREEN 10-12 has different routine.

I agree that it is still stupid that they have not implemented these screen modes in CHGMOD routine.

By nitrofurano

Champion (301)

nitrofurano's picture

04-10-2012, 16:52

you mean that, in assembly, we just need to set vdp register #25 to 0, 8, 16, or 24 for choosing between screens 8, 10, 11 and 12 ?

By NYYRIKKI

Enlighted (6016)

NYYRIKKI's picture

04-10-2012, 18:13

nitrofurano wrote:

you mean that, in assembly, we just need to set vdp register #25 to 0, 8, 16, or 24 for choosing between screens 8, 10, 11 and 12 ?

Not quite right... SCREEN 10 is actually same mode as SCREEN 11. You can use for example following code to change screen mode in MSX2+:



NCHGMOD:
	CP 10
	JP C,#5F
	LD BC,#899
	CP 12
	JR Z,.SC12
	RET NC
	LD B,24
.SC12:	PUSH BC
	LD A,8
	CALL #5F
	POP BC
	OUT (C),B
	OUT (C),C
	RET

By RetroTechie

Paragon (1563)

RetroTechie's picture

05-10-2012, 10:59

sd_snatcher wrote:

It would have been a lot better if they just added palette support for the screen-8. Easier to program, and a lot more useful.

Depends on what you'd use the new screen modes for. AFAICT screen 10-12 serve to produce photographic-like pictures (16 bit color equivalent), and for that purpose, the new screen modes are perfectly suited. Of course less so if you are targeting game developent, a next-gen desktop environment or something like that.

IIRC screen 10 and 11 are technically the same, but differ in how the VRAM is filled. In one case, with YJK / YJE data, in the other case, with pallette colors mixed in. So choice between screen 10/11 is merely a preference depending on whether you intend to overlay palette colors (text / icons etc) on top of the image.

By sd_snatcher

Prophet (3642)

sd_snatcher's picture

05-10-2012, 15:18

@RetroTechie

If it was a real 16bit mode, you probably would be right. But the fixed palette drastically reduces the number of colors usable on a given scene. If you count the number of colors on the existing images, you see that. Most SCR12 images stay under 1000 colors, and there are many that barely passes the 256 color limit. I'm not sure if the price it did cost (*1) is worth it against a 256 indexed color mode.

*1: The line command become almost inutile on SCR12.

By RetroTechie

Paragon (1563)

RetroTechie's picture

05-10-2012, 16:51

That might be a problem with the encoder(s) used to produce those images, but of course the non-intuitive YJK encoding scheme with 4 interlinked pixels doesn't help. Hannibal Technically it can produce images with colors comparable to a 14 or 15-bit / pixel system (close to "high color"), and if you compare good SC12 pictures to those, that's indeed what you can get.

Personally I regard screen 10-12 more as a "twist" on screen 8 (and suspect it's implemented like that too, inside the chip), which is nice, has its uses but nothing spectular. The marketing materials around MSX2+ introduction time really gave more credit than it deserved IMHO.

I agree that a 256 color palette (with each color free to choose from, say, 24 bit RGB) would have been much more useful. But I guess also more difficult to implement & therefore more costly (at the time) to develop such a videochip. And (V)RAM was still expensive in 1988. LOL! These days with gfx9000 and FPGA systems around (and existing software base), not very relevant anymore...

By PingPong

Prophet (4093)

PingPong's picture

06-10-2012, 09:00

sd_snatcher wrote:

@RetroTechie
... Most SCR12 images stay under 1000 colors, and there are many that barely passes the 256 color limit.

maybe those images do not need more than 1000 colors. nevertheless, those images looks almost like "true color", using only 54K of VRAM.
Of course, those modes are a compromise between hw limitations and the wish of more colors.
I'm also not so sure that yamaha can embed a 256 color palette into V9938 due to chip space limits on 1985.

Remember, also Amiga OCS have similar mode.

Page 1/2
| 2