Here a piece of code you can use to change palette when running your MSX1 game on an MSX2:

Código:

lda,($2d); read MSX versionora; is it MSX1?retz; then there's no need to use it anywaylda,(7); get first VDP write portldc,aincc; prepare to write register datadi; interrupts could screw things upxora; from color 0out(c),alda,128+16; write R#16out(c),aeiincc; prepare to write palette dataldb,32; 16 color * 2 bytes for palette dataldhl,paletteotirret;; the format of the palette is like $GRB; and R, G and B must be between 0-7; currently it's the default MSX2 palette; but you set up your own in these dw's;palette:dw$000,$000,$611,$733,$117,$327,$151,$627dw$171,$373,$661,$664,$411,$265,$555,$777