Question about vdp  non 'linear' addressing... (Development MSX Fora)MSX Resource Center MSXdev 2008 - MSX1 development bonanza!           
            
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 112 gasten en 5 MSX vrienden online

Je bent een anonieme bezoeker.
 

MSX Fora


MSX Fora

Development - Question about vdp non 'linear' addressing...

Schrijver

Question about vdp non 'linear' addressing...

PingPong
msx professional
Berichten: 885
Geplaatst: 12 November 2006, 18:21   
Hi all,

i need to access the vram in a 256 byte aligned fashion. So my addresses are always on 256 boundary.

Once i've selected a 256 aligned block address to access i need to write about 50 bytes on this block, randomly.

actually i have this code (well known) (supposing hl=pointing to vram)

ld a,l
out(0x99),a
ld a,h
or 64
out (0x99),a

; write the byte
out (0x98),a

My guess is: because in my routine i never change the H part of HL can i set once the full 14 bit address then only the
low 8 bits of vram ptr as shown below?

; first set the full 14 bit address

ld a,l
out (0x99),a
ld a,h
or 64
out (0x99),a

then, after the first setup do only the setting of address of the least significant byte

ld c,0x99
; set only lsb
out (c),l
; send data
out (0x98),a

does this works on the real machine? (in bluemsx does)
does this works on the v9938 and tms?

mth
msx freak
Berichten: 189
Geplaatst: 12 November 2006, 19:17   
As far as I know, it will not work: the first byte written to 0x99 is put into an internal VDP buffer and only when the second byte is written it will know what to do with the first byte: it could be an address selection (bit7=0) or a register write (bit7=1).

PingPong
msx professional
Berichten: 885
Geplaatst: 12 November 2006, 19:53   
Quote:

As far as I know, it will not work: the first byte written to 0x99 is put into an internal VDP buffer and only when the second byte is written it will know what to do with the first byte: it could be an address selection (bit7=0) or a register write (bit7=1).



so, this tech works only on sega master system VDP that is derived from original...

ARTRAG
online
msx master
Berichten: 1594
Geplaatst: 12 November 2006, 23:46   
you cannot set the vram address with only one out on port 99h,
but, if you do not need to change h, store the bit 6 in h itself, try
something like this

ld c,0x99
set 6,h
out (c),l
out (c),h
out (0x98),a

the first time and

out (c),l
out (c),h
out (0x98),a

the other times, the cost is only one extra out (c),h
pitpan
msx master
Berichten: 1368
Geplaatst: 13 November 2006, 00:49   
I'll test it in the real thing, but it doesn't seem to be feasible.
 
 







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