etienne
|
ram read/write
Posted: Tue Mar 06, 2001 6:08 pm
|
Hello,
see this exemple : in vdp, address 0x0000 -> 0x3FFF are Read and others are Written.
What happens if programmer try to read "write-only" area or write in 0x0000-> 0x3FFF area ? If These operation are impossible I guess I must emulate it
Thanks
Etienne Baudin
|
Guangling_san
|
Posted: Tue Mar 06, 2001 6:26 pm
|
Or else stated, what happens if you load a 'write command word' into VDP and then do a read operation?
Yeah, what would happen? Would it crash your program? Or would it just give a "junk byte"(worthless data)
without crashing?
|
- Joined: 28 Sep 1999
- Posts: 1197
|
Posted: Wed Mar 07, 2001 12:11 am
|
Quote > Or else stated, what happens if you load a 'write command word' into VDP and then do a read operation?
> Yeah, what would happen? Would it crash your program? Or would it just give a "junk byte"(worthless data)
> without crashing?
You get a garbage value returned, which is usually 0x00 or 0xFF on power-up, or it will be the value loaded from the last read after a reset.
So it's entirely possible to do reads in read mode and writes in write mode too. The only thing you have to remember is to discard the first read (and therefore set the VDP address to one byte lower than the one you really want to read, like using 3FFF to read from 0000, and so on.)
|