- Site Admin
- Joined: 19 Oct 1999
- Posts: 14689
- Location: London
|
Behaviour for invalid VDP access sequences
Posted: Wed Jul 15, 2020 8:44 pm
|
I'm just writing my first VDP emulation attempt, albeit one that only tries to emulate the VRAM, no rendering. Reading Charles' doc, I've implemented the address and control registers, and the read buffer. The logical conclusion of the doc is that if I were to have this sequence:
Control port: write 0x12, 0x88
Data port: write 0xff
The first two bytes would be setting VDP register 8 (X scroll) to value 0x12, but would also leave the address register at 0x0812. The third write would then set the contents of VRAM address 0x0812 and increment the address register to 0x813.
Is this correct? Does anything actually rely on this? The doc doesn't actually mention this specific "invalid" sequence.
Also, what's the power-on value of the registers and read buffer contents?
|
- Joined: 05 Sep 2013
- Posts: 3763
- Location: Stockholm, Sweden
|
Posted: Thu Jul 16, 2020 2:57 pm
|
I believe the first write is setting the low part of the address, not sure if the second write affects the high part at all. But I never investigated that.
|
- Site Admin
- Joined: 19 Oct 1999
- Posts: 14689
- Location: London
|
Posted: Thu Jul 16, 2020 8:06 pm
|
I guess I ought to make a test for it...
|
- Joined: 05 Sep 2013
- Posts: 3763
- Location: Stockholm, Sweden
|
Posted: Thu Jul 16, 2020 8:26 pm
|
I read that again now, it seems you're likely right
Quote When the first byte is written, the lower 8 bits of the address register are updated. When the second byte is written, the upper 6 bits of the address register and the code register are updated, and the VDP may carry out additional processing based on the value of the code register
Quote VDP register write
While the address and code register are updated like normal when a VDP register write is done, the ...
|
- Site Admin
- Joined: 19 Oct 1999
- Posts: 14689
- Location: London
|
Posted: Fri Jul 17, 2020 6:55 am
|
Yes, that does seem to cover it. I’m curious if anything depends on it.
|