Question screen 1 + 2 name table (Development MSX Fora)MSX Resource Center            
            
English Nederlands Espa�ol Portugu�s Russian         
 Nieuws
   Voorpagina
  Nieuws archief
  Nieuws onderwerpen

 Informatie
   MSX Fora
  Artikelen
  Recensies
  Beursverslagen
  Fotoreportages
  Beurzen en meetings
  Enquêtes
  Links
  Zoek

 Software
   Downloads
  Webshop

 MRC
   Wie we zijn
  Kom bij ons team
  Doneren
  Policies
  Contact met het MRC
  Link naar Ons
  Statistieken

 Zoek
 
  

  

 Login
 

Gebruikersnaam

Wachtwoord




Ben je nog niet lid? Klik hier en word MSX vriend!


 Statistieken
 

Er zijn 67 gasten en 3 MSX vrienden online

Je bent een anonieme bezoeker.
 

MSX Fora


MSX Fora

Development - Question screen 1 + 2 name table

Schrijver

Question screen 1 + 2 name table

MsXgAmEs
msx friend
Berichten: 3
Geplaatst: 11 Augustus 2004, 14:28   
In screen 1 and 2 there is a difference that I don't understand. In screen 1 I put a character on the screen like this:
10 KEY OFF: SCREEN 1
20 VPOKE BASE(5)+&H0,97
30 IF INKEY$="" THEN 30

This puts the letter "a" at the top-left side of the screen. When I change to screen 2 in line 10 and replace BASE(5) with BASE(10) in line 20, I get a blank screen. Where my letter "a" in this case?

I succeeded in making a letter in screen 2 by using BASE(12) for making a character pattern and BASE(11) for the colors. The location of the character in the character pattern base (BASE(12)) determines the location of the character on the screen. Why is that?
[D-Tail]

msx guru
Berichten: 3019
Geplaatst: 11 Augustus 2004, 15:06   
The Pattern name table isn't defined by default in screen 2. Well, it's defined, but it doesn't contain a default character set. So you should first draw your own, and put it on the location designated by BASE(10). But if you just want to put a text line on screen 2, I suggest you use the following:
OPEN "GRP:" FOR OUTPUT AS #1: PRINT #1,"Screen 2 try thing ^^;";

I also suggest you get some information about the VDP registers, cos the BASE() function is a HELL in BASIC. For example, the V9938 Technical Data Manual (Yamaha corp/ASCII corp) would be a nice start.
GuyveR800
msx guru
Berichten: 3048
Geplaatst: 11 Augustus 2004, 15:33   
Basically: In MSX-BASIC, SCREEN 2 is configured as a bitmap screen, not a pattern screen like SCREEN 1.
MsXgAmEs
msx friend
Berichten: 3
Geplaatst: 11 Augustus 2004, 15:59   
Thanks for the answers. Programming in MSX basic has been a long time ago.

I took this information from portar.txt:
SCREEN 1 (coloured text mode, 32 column):
Character patterns (font) 0000-07FF
Name table (char positions) 1800-1AFF
Sprite attribute table 1B00-1B7F
Characters colour table (8/byte) 2000-201F
Sprite character patterns 3800-3FFF

SCREEN 2 (256*192 Graphics mode):
Character patterns 0000-17FF
Name table (char positions) 1800-1AFF
Sprite attribute table 1B00-1B7F
PixelByte colour table 2000-37FF
Sprite character patterns 3800-3FFF

So my understanding was that screen 1 and 2 would behave the same except for the colors. I know that screen 2 is a bitmap screen, but because I saw the nice name table (character positions) at address 1800 for screen 2 I thought that it was possible (LIKE PRINT#1,"a" to VPOKE characters on screen 2 like screen 1.

Question: Can anyone explain why a character is printed on screen 2, when making a character at address 0000? This is a character pattern and not a Name table. In screen 1 you first make a character in the character pattern and with the Name table you put the character on the screen.
BiFi
msx guru
Berichten: 3142
Geplaatst: 11 Augustus 2004, 17:02   
Since SCREEN 2 was set up by BASIC to be a bitmap screen, the name table is filled with 3 times the full character set.
GuyveR800
msx guru
Berichten: 3048
Geplaatst: 11 Augustus 2004, 17:47   
thanks for repeating what I said Bifi and here goes for the 3rd time.

MsXgAmEs, you should understand that there is a difference between the specifications of the screenmode for the VDP and the way BASIC handles them.

MSX-BASIC configures SCREEN2 to be a bitmap screenmode. That means a couple of things:
1. there's no character set
2. the nametable is already filled with values 0-255 (repeated 3 times), in stead of it being all 0's. In other words, all characters available are on the screen at the same time.

So if you write to the pattern table in pattern 0, it's the top-left pattern of the screen. If you write to pattern 1 it's the pattern next to the first, etc...

Having said that, it's possible to configure screen 2 to be similar to screen 1 (and in fact that's the most useful for games, because bitmapped screenmodes are often slower for games), but you will have to fill the pattern table with a characterset (3 times) and fill the name table with 0's (to clear the screen).

 
 







(c) 1994 - 2008 Stichting MSX Resource Center. MSX is een trademark van MSX Licensing Corporation.