Schrijver
| how to set the border colour in screen 7?
|
flyguille msx master Berichten: 1223 | Geplaatst: 29 Juni 2004, 19:12   |
when i set the border colour (using the normal procedure of the screens 0 up to 6) in the screen 7, i only can obtain blue, red, and magenta colours, i can't get the white because the green signal not work, or maybe work in a diferent way.
How to do that in screen 7?
|
|
[D-Tail]
 msx guru Berichten: 3019 | Geplaatst: 29 Juni 2004, 19:17   |
AFAIK the color settings in screen 7 are the same compared to other screens... Maybe some hardware is malfunctioning? Did you try to make it work on another MSX (or emu, perhaps)?
|
|
BiFi msx guru Berichten: 3142 | Geplaatst: 29 Juni 2004, 19:59   |
ld a,colorcode
out ($99),a
ld a,128+16
out ($99),a
ld a,%0rrr0bbb ; red and blue palette values
out ($9a),a
ld a,%00000ggg ; green value
out ($9a),a
|
|
Grauw msx professional Berichten: 1006 | Geplaatst: 29 Juni 2004, 20:08   |
I don't understand either, screen 7 should indeed be exactly like screen 5, etc. The only different screen mode is screen 8, which has a pre-set palette iirc.
~Grauw
|
|
[D-Tail]
 msx guru Berichten: 3019 | Geplaatst: 29 Juni 2004, 20:12   |
Yeah, if you meant 'Graphics mode 7', I'd understand  . Try to do something with the color/backdrop register. |
|
flyguille msx master Berichten: 1223 | Geplaatst: 29 Juni 2004, 20:12   |
oh! shit, i mean how to do in the screen 8!!, simply i confuse the numbers.
|
|
flyguille msx master Berichten: 1223 | Geplaatst: 29 Juni 2004, 20:14   |
Quote:
| ld a,colorcode
out ($99),a
ld a,128+16
out ($99),a
ld a,%0rrr0bbb ; red and blue palette values
out ($9a),a
ld a,%00000ggg ; green value
out ($9a),a
|
oh, but this if for set a palette...
i want to set the border colour than is not a pointer to a pallette.
|
|
BiFi msx guru Berichten: 3142 | Geplaatst: 29 Juni 2004, 20:55   |
You can change the back drop color by changing R#7 to the desired color code.
ld a,backdropcolor
out ($99),a
ld a,128+7
out ($99),a
|
|
flyguille msx master Berichten: 1223 | Geplaatst: 29 Juni 2004, 21:46   |
Quote:
| You can change the back drop color by changing R#7 to the desired color code.
ld a,backdropcolor
out ($99),a
ld a,128+7
out ($99),a
|
and that is just that i already do!!.
check the demo of the MNBIOS
in screen 0 (screen 5) (in MNBIOS is screen -m0)
in screen 2 (screen 7) (in MNBIOS is screen -m2)
The border colour work just as you comment here.
But, in (screen 8) (in MNBIOS is screen -m3)
the same routine to set the border colour fail, just one as you wrote here.
test using
COLOR -b&HFF , in MNBIOS
that is white in all other screens mode. and in screen 8 only can set the RED and BLUE value, not the GREEN. why? what's changed?
|
|
flyguille msx master Berichten: 1223 | Geplaatst: 29 Juni 2004, 22:40   |
Well, i see TFM and indeed under (graphics mode 7) on the book page 50, say:
THE register is #7 and the low 4 bits set the colour (i think as a pointer to a palette).
Then, on the book page 52, on the point 3, under the same tittle, say:
IS JUST RGB. +
BUt ins't RGB, because when i do the following
COLOR 0,0,0:SCREEN 8: VDP (7)= &HFF
i got a "magenta" (100% blue + 100% red + 0% green).
and graduating the register number, i obtain all the blues and red graduations like
bits 2-0 = blue setting
bits 6-5 = red setting
bit 3 nothing
bit 7 nothing
and as the openMSX reproduce the same effect, so , how is it?
|
|
Sonic_aka_T
 msx guru Berichten: 2269 | Geplaatst: 30 Juni 2004, 01:27   |
I dunno, but if I check on openMSX it does use RGB. I only tested it in BASIC, but VDP reg #07 seems to change accordingly. If I COLOR ,,255 in BASIC the border turns white and VDP reg #07 contains the value FF. If I COLOR ,,3 in BASIC the border turns light blue and VDP reg #07 contains the value 03. The rest of the color pallette seems to be there too... It seems to use GGGRRRBB instead though...
|
|
[D-Tail]
 msx guru Berichten: 3019 | Geplaatst: 30 Juni 2004, 11:21   |
Which doesn't actually matter if you want to turn the screen white. All RGB values have to be at their maximum then...
|
|
Sonic_aka_T
 msx guru Berichten: 2269 | Geplaatst: 30 Juni 2004, 12:23   |
Well, just to be complete. Normally you'd expect it to be RBG on an MSX. Somehow it's GRB for this register, kind of odd...
|
|
GuyveR800 msx guru Berichten: 3048 | Geplaatst: 30 Juni 2004, 12:52   |
No, it's not odd. Palettes are always GRB!
palette values are written to the palette registers: 0rrr0bbb then 00000ggg
You apparently think that means RBG, but it doesn't. It's a 16 bit number, the first byte is the low-byte, and the second is the high-byte, just like always.
You can define a palette value in 16bit like this: dw GRBh
with G, R and B both being values 0-7.
I've seen people use "db RBh,G" which is probably another source for your confusion, but that's just a weird way of doing things...
|
|
BiFi msx guru Berichten: 3142 | Geplaatst: 30 Juni 2004, 13:15   |
I think some people really need to get their hands on that "no-one-can-do-without" MSX VDP-Bible
In short: the V9938 Application Manual. |
|
|
|
|