6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Fri Nov 22, 2024 6:31 am

All times are UTC




Post new topic Reply to topic  [ 24 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Wed Nov 04, 2009 10:14 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10985
Location: England
Hadn't heard of this before:

Quote:
A Turbo second processor is in fact a 256 KByte 6502 second processor which uses page 03 as extra indirection bytes, so that indirect and indirect,Y opcodes take an extra cycle to fetch a byte from &0301 + zp_offset to yield a 24-bit address, of which only the bottom 18 bits is used. The extra memory cannot be accessed using any other addressing modes.

Turbo processors never really got outside of Acorn.


(slightly edited from http://www.chiark.greenend.org.uk/~theo ... late65.txt describing the reason for the 65Turbo emulator)

So what was this? A real 6502 with some banking hardware mapped to page 3 and some parallel instruction decoding, or a variant 6502?


Top
 Profile  
Reply with quote  
PostPosted: Wed Nov 04, 2009 10:55 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8505
Location: Midwestern USA
I never heard of such a thing. Guess those Brits have been up to some strange things. :)

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Nov 05, 2009 9:16 am 
Offline
User avatar

Joined: Tue Mar 02, 2004 8:55 am
Posts: 996
Location: Berkshire, UK
Its in a section relating to emulation rather than real hardware.

The BBC's 65C02 second processor was standard device with 64K of RAM and a 4K boot EPROM that is copied to RAM on reset then disabled. The only other device in the box was a set of buffers for communicating with the host computer.

_________________
Andrew Jacobs
6502 & PIC Stuff - http://www.obelisk.me.uk/
Cross-Platform 6502/65C02/65816 Macro Assembler - http://www.obelisk.me.uk/dev65/
Open Source Projects - https://github.com/andrew-jacobs


Top
 Profile  
Reply with quote  
PostPosted: Fri Nov 06, 2009 5:32 am 
Offline

Joined: Sat Jan 04, 2003 10:03 pm
Posts: 1706
BigDumbDinosaur wrote:
I never heard of such a thing. Guess those Brits have been up to some strange things. :)


Brits? You think this is a British innovation?

One word: 6509. http://www.commodore.ca/manuals/6509/mos_6509.htm :)


Top
 Profile  
Reply with quote  
PostPosted: Fri Nov 06, 2009 11:21 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10985
Location: England
kc5tja wrote:
One word: 6509.


(6509 datasheet)

That's interesting: there's a 4-bit address extension port, with an on-chip register for normal accesses and another for indexed,Y accesses. (So it is an explicit banked approach, and there's no mention of page 3 for extended pointers - sounds slightly different...)

From the datasheet:
Quote:
Memory Management Control (P0-P3)

The four extended address pins, P0-P3, enable the
processor to align to one of sixteen banks of 64K memory
space. The use of the instructions; Load A indirect Y
(&B1) and Store A indirect Y (&91), transfers the
processor from the normal execute mode to the indirect
mode. In the execute mode, the processor is aligned to a
particular memory bank. The indirect mode aligns the
processor to a predetermined memory block. The
contents of the extended address registers is controlled
by software with the execute register at location 0000 and
indirect register at 0001.

During fetch and execution of the indirect mode
instructions, the processor remains in execute mode until
data transfer is to occur. At this time the processor
switches to the indirect mode aligning itself to the new
memory block. After one cycle the processor returns to
the execute mode.

The extended address pins are not under control of
AEC and are not tri-statable


Top
 Profile  
Reply with quote  
PostPosted: Sat Nov 07, 2009 6:10 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8505
Location: Midwestern USA
BigEd wrote:
kc5tja wrote:
One word: 6509.

(6509 datasheet)

I seem to recall that the 6509 was used in the Commodore B128, which was easily the most annoying thing to program in M/L ever! The B128 had a sort of wedge-shaped case, making it the perfect door stop.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat Nov 07, 2009 4:06 pm 
Offline

Joined: Sat Jan 04, 2003 10:03 pm
Posts: 1706
The 6509 would have been overwhelmingly easier to code for than the C128's MMU. The C128 was also wedge-shaped, as was the C64c.

Despite the inadequacies, I still loved the C128.

Of course, nothing can beat the 65816 at what people are genuinely looking for though -- true 6502 compatibility and 16MB address space with linear addressing for data (modulo data alignment issues).

Though, considering the contemporary pricing for FPGAs, I'd just burn my own CPU right into the FPGA and hang my desired logic off the CPU bus internally. Personally, I'd use a 32-bit stack architecture now-a-days.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat Nov 07, 2009 8:00 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8505
Location: Midwestern USA
kc5tja wrote:
The 6509 would have been overwhelmingly easier to code for than the C128's MMU. The C128 was also wedge-shaped, as was the C64c.

True, although they sported color and good-for-the-time sound, which the B128 didn't.

Quote:
Despite the inadequacies, I still loved the C128.

I never found the MMU at all difficult to work with. In pure M/L applications, I'd read out and store the contents of the four preconfig registers and load my own values. I'd also define a small common area at the top of RAM to facilitate cross-bank transfers. When the program terminated I'd restore the default memory map, reload the original preconfig values and BASIC would be none the wiser.

The reality is that any banked architecture is going to pose a certain set of challenges. That's what separates the men (women) from the boys (girls) in assembly language development. :)

Quote:
Of course, nothing can beat the 65816 at what people are genuinely looking for though -- true 6502 compatibility and 16MB address space with linear addressing for data (modulo data alignment issues).

To me, the main selling points of the '816 are the ability to move direct (zero) page to a convenient location if desired, as well as having 16 bit registers and stack pointer available if needed. The business of MUXing the A16-A23 address component on D0-D7 is, to me, a nuisance feature requiring special hardware logic to correctly implement. I would rather see an '816 package where A16-A23 are present on separate pins and valid any time A0-A15 are valid. Of course, the result would not be truly 65Cxx hardware compatible, but, then, the '816 isn't pin compatible with any eight bit 65xx MPU.

Quote:
Though, considering the contemporary pricing for FPGAs, I'd just burn my own CPU right into the FPGA and hang my desired logic off the CPU bus internally. Personally, I'd use a 32-bit stack architecture now-a-days.

Yes, but could you call it a 65xxx something with a clear conscience? :D

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat Nov 07, 2009 10:26 pm 
Offline

Joined: Sat Jan 04, 2003 10:03 pm
Posts: 1706
BigDumbDinosaur wrote:
Yes, but could you call it a 65xxx something with a clear conscience? :D


Nope -- nor would I want to. The 6502/65816 are great CPUs, but they're some 12x to 24x slower than a dedicated Forth CPU of comparable logic density. A stack architecture CPU would be a very different beast.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Dec 11, 2009 9:30 pm 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3367
Location: Ontario, Canada
Just entering the discussion... 24-bit addressing certainly is intriguing. I strongly feel that linear access to the memory space is almost mandatory if you want to do any "real" computing. It's not an idle comment: I got to put my notions to the test by building a 16-MByte 65C02 computer WITH NO MMU (assuming I'm using the term MMU properly). See what I'm talking about at
http://LaughtonElectronics.com/arcana/B ... onPg1.html
Obviously there were decisions to be made... the same decisions that were faced by the makers of the commercial computers you mentioned. And I had a go at the problem myself.
Unfortunately my only commercial 6502 machine was a KIM-1. I know almost nothing about how the other commercial computer makers managed extra memory, so I'll be grateful for comments or comparisons any of you may offer.

ps- forestalling any criticism on this point, let me admit straightaway that the computer I built is not wedge shaped.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Dec 11, 2009 9:43 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10985
Location: England
BitWise wrote:
It's in a section relating to emulation rather than real hardware.

Strictly, yes, it's about emulation. But in this case, it is emulating real hardware - the turbo second processor was a real in-house machine, running code which could assemble large source files. The memory controller fetches the 3rd byte from page 3. (I don't know whether it needed any extra cycles. Edit: one extra cycle, I forgot that even though I quoted it)

The nearby section on 65Tube describes an emulator with features not found in hardware: using the x3 instructions to special effect. A little like Dr Jefyll's machine, which is found in hardware... and very interesting it looks too.

Edit: linkified the link, to minimise the impoliteness of submerging the previous post.


Last edited by BigEd on Mon Apr 23, 2018 7:04 pm, edited 2 times in total.

Top
 Profile  
Reply with quote  
PostPosted: Sat Dec 12, 2009 11:15 am 
Offline

Joined: Tue Sep 24, 2002 4:56 pm
Posts: 50
Location: Essex, UK
BigEd wrote:
Hadn't heard of this before:

Quote:
A Turbo second processor is in fact a 256 KByte 6502 second processor which uses page 03 as extra indirection bytes, so that indirect and indirect,Y opcodes take an extra cycle to fetch a byte from &0301 + zp_offset to yield a 24-bit address, of which only the bottom 18 bits is used. The extra memory cannot be accessed using any other addressing modes.

Turbo processors never really got outside of Acorn.


(slightly edited from http://www.chiark.greenend.org.uk/~theo ... late65.txt describing the reason for the 65Turbo emulator)

So what was this? A real 6502 with some banking hardware mapped to page 3 and some parallel instruction decoding, or a variant 6502?


Hmm - I've just "caught up" on this thread, and have had a look at the article; from what I know of Acorn and its computers [*1], I'd guess that the "Turbo 6502" instruction set either (a) "filled in" then-unassigned opcodes with the 3-byte address instructions, or (b) relied on external logic to "extend" standard instructions, this logic then reading the additional byte, and generating the relevant "address bus" signals.

([*1] I've never been employed by Acorn, or any of its successors; I've only ever used their machines, supplemented by delving into documentation, and what others have written.)

--Martin

_________________
Martin Penny

.sig in beta - full release to follow.


Top
 Profile  
Reply with quote  
PostPosted: Sat Dec 12, 2009 11:29 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10985
Location: England
mdpenny wrote:
I'd guess that the "Turbo 6502" instruction set either (a) "filled in" then-unassigned opcodes with the 3-byte address instructions, or (b) relied on external logic to "extend" standard instructions, this logic then reading the additional byte, and generating the relevant "address bus" signals.


I'm now convinced it is (b) - standard opcodes, external hardware, an extra cycle taken to read the additional byte. You can get away with this if you can initialise the machine without needing the tweaked opcodes.

The nice thing about extended pointers is that you can have lots of them: one or two bank registers isn't so convenient. Also, you can do pointer arithmetic, so long as your macros know where to find all 3 bytes.

Dr Jefyll's machine is a splendid example of how far you can take the approach: that SYNC output (and the RDY input) show their value here. The VPA and VDA of the 65816 even more so, although that CPU is in less need of extension. Which is fortunate, because it doesn't have many spare opcodes!


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat Dec 12, 2009 5:07 pm 
Offline

Joined: Sat Jan 04, 2003 10:03 pm
Posts: 1706
No, but, the 65816 has two opcodes explicitly reserved for extension purposes. COP is intended explicitly for user-supplied extensions. WDM for WDC-supplied extensions.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat Dec 12, 2009 5:51 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10985
Location: England
True. WDM is fast but reserved, and COP is available but costs many cycles (itself, and for the RTI)

(In fact, half the available values for the "operand" of COP are reserved too.)


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 24 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 10 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: