[HELP ME 2] MSX Coulour Table not matching the VRAM

Page 1/2
| 2

By tsMKG

Resident (41)

tsMKG's picture

12-02-2018, 05:02

Yeah, I set the colour table at $0000 Tongue

But that's not the problem, the problem is that, you know that a value of "DE" should give you a gray/purple picture?
Well, that doesn't seems to be the case, where I still have the yellow, cyan from the previous colours Sad

And strangely, THIS HAPPENS WHEN I CALL A FILVRM AT ADDRESS $1800 (NOT THE COLOUR'S TABLE) TO CLEAR THE TILE MAP
OR is that each tile has its own colour no matter where you map them? :-? oO

Like, I'd like to know how the colour table works, thanks.

Login or register to post comments

By tsMKG

Resident (41)

tsMKG's picture

12-02-2018, 05:11

By Grauw

Enlighted (7132)

Grauw's picture

12-02-2018, 20:55

I can’t really immediately see a cause from what I’m seeing, so I’m just going to shoot some blanks of random thoughts; maybe it will trigger some thought in you.

Normally in screen 2 there are three pattern groups (with one colour / pattern / name table each), only when you configure the colour/pattern table address in a certain way it can mirror them to a single tile set.

Note also that when setting a table base address, you need to mask some bits as 1, otherwise it will mirror those tables. But I think this looks correct in the code.

(I assume you’ve read the TMS9918 and/or V9938 application manuals? They’ve got quite extensive descriptions.)

Maybe vpoke around in Basic a little to test the waters… to confirm if the setup in assembly is correct.

p.s. How is djnz broken? Smile

By tsMKG

Resident (41)

tsMKG's picture

12-02-2018, 20:57

Grauw wrote:

p.s. How is djnz broken? Smile

0==256

but that doesn't matters because it's for the keyboard routine Tongue

By TomH

Master (191)

TomH's picture

12-02-2018, 21:06

tsMKG wrote:
Grauw wrote:

p.s. How is djnz broken? Smile

0==256

If it were to check for zero before decrementing (and conditionally jumping), wouldn't it need to be nzdj?

By Grauw

Enlighted (7132)

Grauw's picture

12-02-2018, 21:35

You can count one more! What a great feature! Smile

By tsMKG

Resident (41)

tsMKG's picture

19-02-2018, 14:29

Ok, anyways, I think weeks have passed since I solved this, and I have to say that as dumb I was, I thought the colors of the colors of the color table were FOR THE PATTERNS, NOT THE SCREEN. So, no, it's not like the ZX Spectrum, where you had the color table for the screen, in MSX, the colors go for each pattern, which I find that quite good! Big smile Though, that will be a shame for not having different colors for the same pattern (Specially for the text).

So you guys can close this.

nzdj? I'll check on that

and an additional note: MSX doesn't friggin' have ld b,(nn) which is listed in z80 Heaven oO (I know that z80 Heaven is for Ti-83 Calculators but most of it is also valid for other devices such as the Sega Master System and the ZX Spectrum). This got to me to ask what version of the z80 does the MSX use?

By tsMKG

Resident (41)

tsMKG's picture

19-02-2018, 14:48

No, in neither instruction set does NZDJ show up.
http://z80-heaven.wikidot.com/instructions-set
http://map.grauw.nl/resources/z80instr.php

So consider it an non-existing instruction.

By jltursan

Prophet (2100)

jltursan's picture

19-02-2018, 19:28

NZDJ, LD B,(NN)?, what are you talking about guys? Big smile

About "LD" mnemonic, double-check Z80 Heaven, B register has not "(NN)" operator allowed Wink

By ToriHino

Master (190)

ToriHino's picture

19-02-2018, 22:42

tsMKG wrote:

No, in neither instruction set does NZDJ show up.
http://z80-heaven.wikidot.com/instructions-set
http://map.grauw.nl/resources/z80instr.php

So consider it an non-existing instruction.

I don't think TomH meant this is actually an instruction :D He was just explaining why it is called DJNZ in the first place

By tsMKG

Resident (41)

tsMKG's picture

20-02-2018, 13:34

jltursan wrote:

NZDJ, LD B,(NN)?, what are you talking about guys? Big smile

About "LD" mnemonic, double-check Z80 Heaven, B register has not "(NN)" operator allowed Wink



It has an X which means that ,by z80Heaven, is allowed.

Page 1/2
| 2
My MSX profile