Login
Back to forumSee the full topicGo to last reply

Posted By

TLC
on 2021-06-04
04:54:01
 Re: Let’s JoyTest! :)

@BSZ I still merely talked about digital logic, not electronics grin

@Mad your assumption is correct. Yes, the borders are all idle fetches in single clock mode, except for 5 memory refresh out of every 57 cycles of a line. (Pretty easy to hit a suitable "place" on a line once in single clock mode, no need for cycle exact timing whatsoever. Roughly speaking, memory refresh cycles are always performed around the first columns of the right sideborder. The rest of the line is all fine). Writing the selector byte to both $ffff and $ff08, and performing the read from $ff08 on/after a TED idle fetch cycle, should do the trick for both normal and damaged TEDs. (...I haven't yet tested that in practice, you might want to wait for BSZ to share his experiences). Saving and restoring the high byte of the IRQ vector in $ffff is an added requirement, of course, if interrupts are to be used in your code. On a related note: you can avoid the joysticks to interfere with keyboard scan even on damaged TEDs in a similar fashion. (That one is actually even easier than reading the joysticks on a bad TED. The trick is, that, in double clock mode, the bus cycles are used solely by the CPU, and, an lda $ff08 actually looks like "ad 08 ff *value read from $ff08*" on the data bus. As you can see, the value on the bus before the $ff08 read cycle, which is, in our case, also the "selector byte" for the joysticks on damaged TEDs, will be ultimately always $ff, regardless to any other circumstances. That means, if you perform the read from $ff08 on double clock cycles, the joysticks would uniformly never play a role. Writing $ff to $ff08 is still needed to avoid interference on regular/non-damaged TEDs, of course).



Back to top


Copyright © Plus/4 World Team, 2001-2024