Dr Jefyll wrote:
tokafondo, as Chromatix says, the coding limitation can be eliminated with only a small increase in circuit complexity. On the other hand, the difficulties resulting from the coding limitation are also small. That's because...
(a): in regard to an I/O device, it's pretty unlikely you'll want to use an INC DEC ROL ROR ASL or LSR (these are the Read-Modify-Write instructions) in the first place. And,
(b): it's easy to simulate the effect of these instructions anyway. For example, ...Code:
INC DeviceRegister ; a Read-Modify-Write instruction
can be replaced byCode:
LDA DeviceRegister
INC A
STA DeviceRegister
Curious, wikipedia says, citing the
Including the 6502, 65C02, and 65802 book, that
Wikipedia wrote:
When register sizes are set to 16 bits, memory access will access two contiguous bytes of memory, at the cost of one extra clock cycle. Furthermore, a read-modify-write instruction, such as ROR <addr>, when used while the accumulator is set to 16 bits, will affect two contiguous bytes of memory, not one. Similarly, all arithmetic and logical operations will be 16-bit operations.
I can't confirm or deny this as I'm no coder at all, but I just wanted to put it here for you to see.
Dr Jefyll wrote:
I understand your goal is to build a system around the S1D13513 graphics chip, which is a very fancy device indeed! I'm sure it'll present you with some challenges
but this Read-Modify-Write limitation is a minor matter.
To implement the 16-bit bus interface, do you plan to use discrete logic (eg, 74_574 etc) or will you use some sort of PLD? In the latter case a small increase in complexity (to beat the small limitation) may come for free.
-- Jeff
Well, as I have zero experience programming a PLD, it would be easier for me to throw in a bunch of 74 chips in the board at the cost of space... I could try to manage the S1D13781 chip that I currently have this way too, but I already have it working at 8 bits so this 16 bit thing will have to wait until the next project.