Page 2 of 2

Re: 65816 nuances

Posted: Tue Apr 23, 2019 4:17 am
by whartung
Regarding page wrapping behavior of "new" vs "old" instructions in emulation mode.

Does this occur only for new instructions, or old instructions with new addressing modes as well?

i.e. does it happen with LDA depending on the addressing mode? or simply not at all?

Re: 65816 nuances

Posted: Tue Apr 23, 2019 7:34 am
by Dr Jefyll
I think it's safe to assume the designers created the big, shiny "full power" processor first; with 16-bit everything, and free of any page-wrapping behavior. Then they went to work implementing Emulation Mode, which selectively cripples certain stuff in order to reproduce 6502 behaviors. Crippling stuff takes extra effort, so they would minimize that. As Chromatix remarked upthread, it's the minimum hobbling they could do to ensure backwards compatibility.

In cases where the '816 has a new address mode, or even a whole new instruction, these new functions will never be invoked in code intended for a 6502. Thus the specification for Emulation Mode has no applicability. It's alright if some or all of the new functions are affected, and it's also alright if they aren't.

So, the designers wouldn't deliberately try make Emulation Mode affect the new functions. If there's any effect, it would be unintended -- an accidental and harmless side effect. That's not impossible, but it seems unlikely.

Hope that helps -- it's a fairly general observation.

-- Jeff

Re: 65816 nuances

Posted: Tue Apr 30, 2019 2:48 am
by Chromatix
When you encounter questions like that, possibly the best answer is to obtain a real '816 and run some test code.

Re: 65816 nuances

Posted: Tue Apr 30, 2019 4:03 am
by whartung
Chromatix wrote:
When you encounter questions like that, possibly the best answer is to obtain a real '816 and run some test code.
For sure, but that's far away. I don't have one. And the only one I can honestly think of that would qualify for all the situations is a Apple II GS, as I don't know of any other off the shelf '816 that has more than 64K of RAM (so you can test all of the banking and other shenanigans).

Uplifting one of the WDC boards is a larger project for someone like me.

If I had a logic analyzer, I wouldn't necessarily need all that RAM. That's an even larger project.

Re: 65816 nuances

Posted: Tue Apr 30, 2019 7:50 am
by BitWise
whartung wrote:
Uplifting one of the WDC boards is a larger project for someone like me.
I have some spare PCBs for my W65C265SXB 1MB SRAM expansion card (somewhere). I think I have the 512Kx8 and GAL chips as well.

Re: 65816 nuances

Posted: Tue Apr 30, 2019 4:19 pm
by whartung
BitWise wrote:
whartung wrote:
Uplifting one of the WDC boards is a larger project for someone like me.
I have some spare PCBs for my W65C265SXB 1MB SRAM expansion card (somewhere). I think I have the 512Kx8 and GAL chips as well.
Thanks, I'll keep that in mind.

Getting a new house, so my next six months are "indeterminate" right now as to what gets time.

Re: 65816 nuances

Posted: Wed May 01, 2019 2:08 am
by Chromatix
You don't need a whole computer for this. Just an '816 CPU, a logic analyser to watch how it responds, some switches to set the data bus manually and toggle the Phi2 clock, some resistors to avoid short-circuiting the bus, and a reset controller (which could also be manual). Stick all that in a decent breadboard.