it’s working! thanks!
and thanks a lot for the OpenMSX command for display switching, i didn’t know that!
and about the "not necessary", they actually were in my case, i was trying to create libraries for ZX-Basic:
example08.bas
#include "library/msxgfx9kvdp.bas"
#include "library/msxgfx9kpalette.bas"
#include "library/msxgfx9kvpoke.bas"
dim i as uinteger at $C000
dim a as uinteger at $C002
dim b as uinteger at $C004
msxgfx9kvdp(6,%10100010)
msxgfx9kvdp(7,%00100110)
msxgfx9kvdp(8,%10000000)
'out $64,6
'out $63,%10100010 ';register 6
'out $64,7
'out $63,%00100110 ';register 7
'out $64,8
'out $63,%10000000 ';register 8, set SCREEN DISPLAY ENABLE
for i=0 to 63
msxgfx9kpalette(i,int(i/2),int(i/2),int(i/2))
'out $64,14
'out $63,i*4
'out $61,int(i/2)
'out $61,int(i/2)
'out $61,int(i/2)
next
for b=0 to 255
for a=0 to 255
msxgfx9kvpoke((b*256)+a,a)
'out $64,0
'out $63,a
'out $63,b
'out $63,0
'out $60,a
asm
halt
end asm
next:next
loop01:
goto loop01
library/msxgfx9kvdp.bas:
sub msxgfx9kvdp(treg as ubyte, tvl as ubyte):
out $64,treg
out $63,tvl
end sub
library/msxgfx9kpalette.bas:
sub msxgfx9kpalette(tidx as ubyte,tpr as ubyte,tpg as ubyte,tpb as ubyte):
out $64,14
out $63,(tidx mod 64)*4
out $61,tpr
out $61,tpg
out $61,tpb
end sub
library/msxgfx9kvpoke.bas:
sub msxgfx9kvpoke(tadr as ulong, tvl as ubyte):
dim tadr2 as ulong at $E600:tadr2=tadr
'- this code seems not acuraced yet
out $64,0
tvou=tadr2 band 255:tadr2=int(tadr2/256)
out $63,tvou
tvou=tadr2 band 255:tadr2=int(tadr2/256)
out $63,tvou
tvou=tadr2 band 255:tadr2=int(tadr2/256)
out $63,tvou
out $60,tvl
end sub