Schrijver
| how do I PRINT on SCREEN 8?
|
------ msx novice Berichten: 18 | Geplaatst: 26 December 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 
Can anyone tell me how to do this?
Oh, and by the way, does anybody know how to draw graphics with PEEK? |
|
BiFi msx guru Berichten: 3142 | Geplaatst: 26 December 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.
|
|
Arjan msx addict Berichten: 454 | Geplaatst: 26 December 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.
|
|
wolf_
 msx legend Berichten: 4629 | Geplaatst: 26 December 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. |
|
BiFi msx guru Berichten: 3142 | Geplaatst: 27 December 2003, 09:43   |
Ahwell, I hope you remember who developed it?  |
|
DarQ msx professional Berichten: 836 | Geplaatst: 27 December 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.
|
|
jr msx addict Berichten: 310 | Geplaatst: 30 December 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.
|
|
GuyveR800 msx guru Berichten: 3048 | Geplaatst: 30 December 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.
|
|
jr msx addict Berichten: 310 | Geplaatst: 31 December 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
|
|
nftaDaedalus msx user Berichten: 42 | Geplaatst: 01 Januari 2004, 04:39   |
Quote:
| (...) 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. |
|
jr msx addict Berichten: 310 | Geplaatst: 01 Januari 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.
|
|
BiFi msx guru Berichten: 3142 | Geplaatst: 01 Januari 2004, 13:47   |
You can print text on a graphic screen in KUN Basic as well. You need to make a small routine for that using a piece of asm. There's a BIOS call for that on address 8dh and it requires the character to print on the graphical screen in register A.
And PEEK can also read data from ROM.
|
|
|
|
|