COLOR=RESTORE

By PingPong

Prophet (3435)

PingPong's picture

14-07-2008, 20:26

Hi, i know that the color=restore command read palette from vram and feed to the VDP. However i do not remember the address from vram palette is taken. i need this info for screen modes 4-5

Anyone remember ?

Login or register to post comments

By Jipe

Paragon (1366)

Jipe's picture

14-07-2008, 20:55

screen 4 : 1E80H 1E9FH

screen 5 : 7680H 769fH

By PingPong

Prophet (3435)

PingPong's picture

15-07-2008, 00:35

screen 4 : 1E80H 1E9FH

screen 5 : 7680H 769fH

thx

By ro

Guardian (4109)

ro's picture

15-07-2008, 09:33

in Basic there's also the BASE command, not? (which tells you where what is stored in Vram)

By [D-Tail]

Ascended (8232)

[D-Tail]'s picture

15-07-2008, 10:48

ro: I guess reading/writing the VDP registers is more like these guys -- in BASIC you can read VDP register values when needed, so it's easy to compute the location of the color table (SPAT - 512).

By PingPong

Prophet (3435)

PingPong's picture

15-07-2008, 19:44

ro: I guess reading/writing the VDP registers is more like these guys -- in BASIC you can read VDP register values when needed, so it's easy to compute the location of the color table (SPAT - 512).
D-tail. I'm not speaking about sprite att table but instead of the vram region where is stored the palette.
(I know the vdp store it's palette in registers, but there is also a vram region that hold this)

By [D-Tail]

Ascended (8232)

[D-Tail]'s picture

15-07-2008, 19:50

*slaps self*, yes, then the BASE commands would be a viable alternative Wink

By flyguille

Prophet (3029)

flyguille's picture

15-07-2008, 23:02

the palette table is NOT stored in VRAM
it is on a table writable/readable on VDP registers....

The MSXBIOS has the default values of that table stored in ROM

By NYYRIKKI

Enlighted (5365)

NYYRIKKI's picture

15-07-2008, 23:37

for I=4 to 8: ?"SCREEN";I;" Palette: #";HEX$(BASE(I*5+3)+128):next

By k0ga

Expert (77)

k0ga's picture

16-07-2008, 08:35

the palette table is NOT stored in VRAM
it is on a table writable/readable on VDP registers....

The MSXBIOS has the default values of that table stored in ROM

flyguille, two things:

1º VDP palette registers are only writable, non readable.
2º MSX BIOS write a copy of palette in VRAM, so you can restore it with sc5 files (sc5 is only a vram dump) for example.