how do I PRINT on SCREEN 8?

Page 1/2
| 2

By minus_signs

Rookie (17)

minus_signs's picture

26-12-2003, 17:34

When in screen mode 8, the PRINT command does not work. It does not give any errors but it doesn't display anything either. I remember reading an article about how to make it work (something with OPEN) but i lost my bookmarks and i forgot the file name Sad
Can anyone tell me how to do this?

Oh, and by the way, does anybody know how to draw graphics with PEEK?

Login or register to post comments

By BiFi

Enlighted (4348)

BiFi's picture

26-12-2003, 18:05

You should open a file to the GRP: device to be able to print text on a graphical screen.

OPEN "GRP:" AS #1

You can then use PRINT #1,"MSX Resouce Center" to write the text to the graphical screen.

By Arjan

Paladin (775)

Arjan's picture

26-12-2003, 18:07

For printing in screen 8 use something like this:

10 SCREEN 8
20 OPEN "GRP:" AS #1
30 PSET(80,128),0
40 PRINT #1,"MERRY XMAS!"
50 A$=INPUT$(1)

With OPEN you create erm a graphics stream (dunno what it's actually called). After that you can use PRINT #1,"Fsdsd" to print something. Use something like PSET, PRESET to set the location where you want the text.

By wolf_

Ambassador_ (9987)

wolf_'s picture

26-12-2003, 22:04

Is there any logic in this open"grp:" thing anyway ? I always thought this command was a real ugly pile o' poo. Evil

By BiFi

Enlighted (4348)

BiFi's picture

27-12-2003, 09:43

Ahwell, I hope you remember who developed it? Wink

By DarQ

Paragon (1038)

DarQ's picture

27-12-2003, 14:13

open "grp" sux! does not work with kun-compiler and it's quite ugly. i prefer a drawn font

EDIT
with PEEK??? not at all, peek is for retrieving data from RAM. VPEEK is retrieving data from VRAM. use POKE to put something in the RAM and VPOKE to put something in the VRAM.

By jr

Champion (377)

jr's picture

30-12-2003, 15:00

Yes I always wondered why they changed that in MSX BASIC compared to SVI-BASIC... in SVI-BASIC you could just use locate & print commands like in screen 0 in graphics modes as well without the open #1 & pset.

By anonymous

incognito ergo sum (116)

anonymous's picture

30-12-2003, 17:36

Perhaps because it makes PRINT unneccessarily complex, and the operation on a graphic screen is VERY different from that of a textscreen? I suppose there's a good way to HOOK these GRP: device calls so you can use your own routines for graphic printing.

Besides, LOCATE is limited to 8x8 boundaries. The way it is now, there is no such limit.

By jr

Champion (377)

jr's picture

31-12-2003, 06:39

Hmm... perhaps I remember wrong but I think that in SVI-BASIC LOCATE was not limited to 8x8 boundaries in graphic modes but instead it accepted coordinates on pixel accuracy. The difference to MSX BASIC in printing text in graphic modes was also that the text was drawn exactly like in screen 0 so each character was not 8 pixels wide but narrower. So limiting LOCATE to 8x8 boundaries sounds a bit strange if the characters are not 8x8...

But you are most probably right in that the GRP: device can be hooked and handled separately. However I still think that a small screen mode check in the beginning of PRINT would not hurt the performance too much and then branch to the correct routine depending on the screen mode Smile

By nftaDaedalus

Resident (44)

nftaDaedalus's picture

01-01-2004, 04:39

(...) like in screen 0 so each character was not 8 pixels wide but narrower.
Only if your width is set higher than 40. Below that, characters are 8x8 px.

By jr

Champion (377)

jr's picture

01-01-2004, 12:05

In screen 0 the character generator uses 8 pixel wide characters yes, but it does not draw all 8 pixels on the screen. Only 6 pixels for each character are drawn and the two right most pixels are ignored.

Page 1/2
| 2