Forums

Sega Master System / Mark III / Game Gear
SG-1000 / SC-3000 / SF-7000 / OMV
Home - Forums - Games - Scans - Maps - Cheats - Credits
Music - Videos - Development - Hacks - Translations - Homebrew

View topic - ram read/write

Reply to topic
Author Message
etienne
  • Guest
Reply with quote
ram read/write
Post 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
  • Guest
Reply with quote
Post 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
Reply with quote
Post 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.)


  View user's profile Send private message Visit poster's website
Reply to topic



Back to the top of this page

Back to SMS Power!