filling VRAM with a color (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 48 gasten en 3 MSX vrienden online

Je bent een anonieme bezoeker.
 

MSX Fora


MSX Fora

Development - filling VRAM with a color

Ga naar pagina ( Vorige pagina 1 | 2 )
Schrijver

filling VRAM with a color

Pat
msx user
Berichten: 44
Geplaatst: 29 September 2005, 09:07   
100hexadecimal = 256decimal = 100000000 binary = width of 9 bits ! > 8 bit -> doesn't fit in a byte !

use dw instead.
ro
msx guru
Berichten: 2346
Geplaatst: 29 September 2005, 10:09   
I told ya screenwidth=256, didn't I.
The VDP commands CAN be done in DB (define byte) no biggy. Just remember that X,Y,XL,YL are 16 (actually 9) bit values!
so defining XL would be (#0100)

DB #00,#10

it's that! simple. just fill them 15 bytes correct and you'll be enjoying some nice screenfillings
norakomi
msx professional
Berichten: 861
Geplaatst: 29 September 2005, 10:52   
AHA !!!
they are 9 bit values !!!!!

So if I would say:

Sxl: db 0
Sxh: db 1

thats the same as:

Sxl: db 256
Sxh: db 0

allright !!!
learned another thing today.
(I was allways wondering what the SxH (source x High bit)was for !!!

what about this:

sxl: db 40
sxh: db 1
syl: db 6
syh: db 0

is this the same as:

sxl: db 40
sxh: db 0
syl: db 7
syh: db 0

??


ro
msx guru
Berichten: 2346
Geplaatst: 29 September 2005, 12:04   
Quote:

AHA !!!
they are 9 bit values !!!!!

So if I would say:

Sxl: db 0
Sxh: db 1

thats the same as:

Sxl: db 256
Sxh: db 0




euh, not really. a Byte CANNOT be 256 remember. max 255
so it would, atleast, be:

Sxl: db 0
Sxh: db 1
thats the same as:
Sxl: db 255
Sxh: db 0


If (since it's BYTE pixeling) 255 is rounded UP (and it would be logical, not?) then, YEAH it's the same.
ro
msx guru
Berichten: 2346
Geplaatst: 29 September 2005, 12:05   
Quote:

sxl: db 40
sxh: db 1
syl: db 6
syh: db 0

is this the same as:

sxl: db 40
sxh: db 0
syl: db 7
syh: db 0


nope. Only X is byte pixeling (when highspeed commanding the VDP)
GhostwriterP
msx addict
Berichten: 313
Geplaatst: 29 September 2005, 12:11   
Quote:

If (since it's BYTE pixeling) 255 is rounded UP (and it would be logical, not?) then, YEAH it's the same.


It will not be rounded up, you do need to put in 256 in NX wich means setting 9 bit (16bit).
During a HMMV the lowest bit wil be ignored so 255 will become 254.
so:
db 0
db 1
is the same as
dw 256

ro
msx guru
Berichten: 2346
Geplaatst: 29 September 2005, 12:17   
I was wondering about that indeed, thanx for clearing that up Ghost

so:

Sxl: db 0
Sxh: db 1
thats NOT the same as:
Sxl: db 255
Sxh: db 0
norakomi
msx professional
Berichten: 861
Geplaatst: 29 September 2005, 18:32   
Quote:

Quote:

If (since it's BYTE pixeling) 255 is rounded UP (and it would be logical, not?) then, YEAH it's the same.


It will not be rounded up, you do need to put in 256 in NX wich means setting 9 bit (16bit).
During a HMMV the lowest bit wil be ignored so 255 will become 254.
so:
db 0
db 1
is the same as
dw 256

thanx !!!!!!!!
and with that my problem is solved.
 
Ga naar pagina ( Vorige pagina 1 | 2 )
 







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