MSX1: printing changed characters on Screen2?

Página 2/3
1 | | 3

Por NYYRIKKI

Enlighted (6067)

Imagen del NYYRIKKI

24-04-2014, 14:16

Metalion wrote:

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.

Por Jipe

Paragon (1614)

Imagen del Jipe

24-04-2014, 15:31

sample use alls screen with redef

BLOAD"REDEF.BIN"TongueOKE-1761,(INP(168)AND48)/16TongueOKE-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

Por Jipe

Paragon (1614)

Imagen del Jipe

24-04-2014, 15:32

Tongue are : P

Por TheSpecialist

Expert (113)

Imagen del TheSpecialist

24-04-2014, 15:58

RSS wrote:

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.

Quote:

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.

Por RSS

Rookie (17)

Imagen del RSS

24-04-2014, 17:24

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?

Por Manuel

Ascended (19463)

Imagen del Manuel

24-04-2014, 17:28

addess 7111 is the BIOS ROM....

Por hit9918

Prophet (2932)

Imagen del hit9918

24-04-2014, 17:52

@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

Por hit9918

Prophet (2932)

Imagen del hit9918

24-04-2014, 18:07

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.

Por hit9918

Prophet (2932)

Imagen del hit9918

24-04-2014, 18:10

@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:".

Por TheSpecialist

Expert (113)

Imagen del TheSpecialist

24-04-2014, 19:39

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 Wink

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 Tongue

Página 2/3
1 | | 3