Page 1 of 1
MLB signal on the WDC 65c02
Posted: Fri May 25, 2007 3:13 am
by lordsteve
The (old) datasheet specified that MLB was active (low) for the last 3 cycles of a RMW instruction. I have found experimentally that this is not the case, at least with the DEC zp opcode. MLB goes low on the dead cycle after the first data (read) cycle, stays low for the next cycle (write data), then goes high for the opcode fetch of the next cycle. That's a total of 2 cycles. According to the datasheet, MLB is supposed to go low when the instruction fetches the data to modify.
Can anyone confirm for me or clue me in?
Re: MLB signal on the WDC 65c02
Posted: Fri May 25, 2007 9:58 pm
by jorge
The (old) datasheet specified that MLB was active (low) for the last 3 cycles of a RMW instruction. I have found experimentally that this is not the case, at least with the DEC zp opcode. MLB goes low on the dead cycle after the first data (read) cycle, stays low for the next cycle (write data), then goes high for the opcode fetch of the next cycle. That's a total of 2 cycles. According to the datasheet, MLB is supposed to go low when the instruction fetches the data to modify.
Can anyone confirm for me or clue me in?
Weird... but, could you use a DEC absolute to $00xx instead ?
(opcode $CE)
--Jorge.
Maybe
Posted: Fri May 25, 2007 10:40 pm
by lordsteve
I could do that, but it still wouldn't explain why DEC zp doesn't bring MLB down low when it fetches the data to modify.
Could someone confirm this on hardware?
Re: Maybe
Posted: Sat May 26, 2007 1:12 am
by jorge
I could do that, but it still wouldn't explain why DEC zp doesn't bring MLB down low when it fetches the data to modify.
Could someone confirm this on hardware?
Does a DEC absolute $00xx do the same ?
--Jorge.
Posted: Sat May 26, 2007 4:58 am
by kc5tja
It does not matter if DEC doesn't drop MLB during the fetch, because it already owns the bus during the fetch. When the CPU relinguishes the bus for its internal operations, then it drops MLB so that no other processor uses the otherwise idle cycle, thus preventing potential changes to the read location.
Posted: Sat May 26, 2007 9:15 am
by jorge
It does not matter if DEC doesn't drop MLB during the fetch, because it already owns the bus during the fetch. When the CPU relinguishes the bus for its internal operations, then it drops MLB so that no other processor uses the otherwise idle cycle, thus preventing potential changes to the read location.
Good point.
Posted: Sat May 26, 2007 3:35 pm
by orac
>The (old) datasheet specified that MLB was active (low) for the last 3 >cycles of a RMW instruction. I have found experimentally that this is not >the case, at least with the DEC zp opcode. MLB goes low on the dead >cycle after the first data (read) cycle, stays low for the next cycle (write >data), then goes high for the opcode fetch of the next cycle. That's a >total of 2 cycles. According to the datasheet, MLB is supposed to go low >when the instruction fetches the data to modify.
Hi Everyone,
This doesn't seem right. MLB should go low during the first data-read.
Cheers,
Paul