If I remember correctly, it is impossible.
The BASIC uses the font in ROM when using PRINT #1 in SCREEN2.
Bullshit warning! MSX-BASIC will always use system default font, no matter what screen mode you are in. In case you are using PRINT #1 you can even have multiple fonts on screen by changing the font address between print-commands.
sample use alls screen with redef
BLOAD"REDEF.BIN"OKE-1761,(INP(168)AND48)/16
OKE-1760,0/POKE-1759,215:SCREEN2
REDEF.BIN DATAS files with 8 x characters D700H,DAE0H
-1761 F91FH use A8 PORT R/W I 8255A/ULA9RA041 PPI Port A Memory PSLOT Register (RAM/ROM) ?? not remember why
-1760 F920H ROM BFH , RAM 00H
-1759 F921H ROM 1BH , RAM D7H
i can send a dsk sample send me a mail
are : P
Hello Specialist
Thanks for the feedback, let's see if I understand correctly: In that way I would be using 2kb of RAM to define my own characters, and use PEEK and VPOKE to get them onto SCREEN2?
No, you use OPEN"GRP:" and PRINT#1 normally.
My theory is that somewhere in the ROM to RAM copy (at power-up) the characters are put into RAM
This does not happen.
The following code works with cassette-only too, with any address in RAM:
SL = INP(&HA8) \ (2 ^ (AD \ 8192) AND 2):POKE &HF91F, PEEK(&HFCC1 + SL) + PEEK(&HFCC5 + SL) * 4 + SL:POKE &HF920,AD AND 255:POKE &HF921,AD \ 256
Jipe's example is similar but only works with that specific address...
So what you do is put your font somewhere in RAM, put its starting address in the AD variable, use the above code and then BASIC will use your font. That is all.
Okay, this is getting weird.
Per my own reasoning I found the character set in RAM, starting on address 7111 (decimal).
If I PEEK(7111) then it returns the value 60, which is the first byte of the first character (the smile).
If I then POKE 7111,255 and subsequently PEEK(7111) then it still returns 60.
Huh...? What am I missing here?
addess 7111 is the BIOS ROM....
@RSS, the question is, do you need a bitmap mode or a charset mode? What is your application?
If you need charset mode, then using screen 2 as charset mode is way to go.
Then you have
- printing speed like screen 1, not the slow "grp:"
- can forget all problems sourrounding the RAM/ROM font questions
any font is possible and it is in vram
I wanted to mention. screen 2 is a bitmap mode and a charset mode at same time.
And that is in hardware. One single poke to vram can change 8x8 pixels on the screen same way as on screen 1.
With a poke BASIC/bios can be made to believe it is on screen 1 and then PRINT goes like on screen 1.
But all that with a screen 2 font. That can look like Nemesis.
@RSS, another thing, if you need color printing. i.e. same letter in different colors.
Then the mentioned charset mode things don't work, then need "grp:".
I made a mistake in the calculation.
SL = (INP(&HA8) \ 2 ^ ((AD \ 8192) AND 6)) AND 3:POKE &HF91F, PEEK(&HFCC1 + SL) + ((PEEK(&HFCC5 + SL) \ 2 ^ ((AD \ 8192) AND 6)) AND 3 ) * 4 + SL:POKE &HF920,AD AND 255:POKE &HF921,AD \ 256
is correct. As you can see the version that does not work for systems without DiskROM is a lot easier
The downside to MSX-BASIC is that if you want to do things that are not expected by the MSX-BASIC language, the effort required approaches the effort for learning assembly