At 12:38 22-1-01 +0100, you wrote:
> > > Now I'm working in a new mapping routine which uses VRAM to store ROM 
> page= s
> > > there. Thus, 128KB machines will be able to run some MegaROM games.
> >
> > You could also use the extended VRAM, some people have 192kB of VRAM in 
> their
> > MSX2, like me. Then it would be finally used!
>
>Hmmm. It's not a bad idea. Some megaroms (like Kenpelen Chess) use
>all the 128KB VRAM, so there is no room to allocate any ROM page there.
>... except if you have 192KB :)
>
>I'll study how the extended VRAM works :)

Here's how the V9938 technical databook describes it which is already coded 
to assembly here:

setExp: ld      a,64            ; Set expansion ram
                 out     ($99),a
                 ld      a,128+45
                 out     ($99),a

                 ld      a,h             ; Write address bits 14 and 15
                 rlca
                 rlca
                 and     3
                 out     ($99),a
                 ld      a,128+14
                 out     ($99),a
                 ld      a,l             ; Write address LSB
                 out     ($99),a
                 ld      a,h             ; Write remaining bits with access 
specification
                 and     63
                 or      b
                 out     ($99),a
                 ret

resExp: ld      a,0             ; Reset expansion ram
                 out     ($99),a
                 ld      a,128+45
                 out     ($99),a
                 ret


I never found a suitable use for the expansion ram (as it is called 
formally), so it could be useful now.

HL = Address (16-bits, bit 17 ignored), B = 0 for read, B = 64 for write. 
You can read and write using port #0 ($98) and if you want to use vram 
again then you should call resExp.


GreeTz, BiFi

Visit my Home Page at www.bifi.msxnet.org
mail me at: [EMAIL PROTECTED]
FTP: ftp.bifi.msxnet.org
ICQ #36126979

--
For info, see http://www.stack.nl/~wynke/MSX/listinfo.html

Reply via email to