Amiga.org

Amiga computer related discussion => Amiga Hardware Issues and discussion => Topic started by: Xamiche on July 27, 2004, 12:23:31 PM

Title: Memory Addresing
Post by: Xamiche on July 27, 2004, 12:23:31 PM
Greetings fellow humans.

Oh joy of Joys, I have started the new semester with a wonderful unit called Micro-Processor Fundamentals. Very exciting. We've just learned how a CPU, namely the 8086 in this course, addresses memory. And how segment registers allow a 16-bit IP register to address 1MB. Brilliant stuff. Anywho, it got me thinking about the limits on how much RAM the 68020 processor in my Amiga 1200 can address. Does the 68000 series of processors address memory in the same way as their intel counter-parts, and is it possible to replace the CPU in an Amiga 1200 to one which can address more than 8MB?

Please excuse my ignorance of this subject as it a topic I have just started learning about Micro-Processors, from an engineering point of view anyway. :-P

Xamiche  
Title: Re: Memory Addresing
Post by: Cyberus on July 27, 2004, 12:38:39 PM
Quote
Memory Addresing


"Shall I compare thee to a piece of Si? Thou art more lovely and more temperate!"

You might find some info  here (http://www.amiga-hardware.com/processors.html)

I know 030 accelerators and up can can address more than 8MB...So the answer to your question is 'yes'
Title: Re: Memory Addresing
Post by: Xamiche on July 27, 2004, 01:12:26 PM
So I'd need to use an accelerator of some kind to upgrade the CPU. I was hoping there was a way to replace the CPU only. Accelerators are prohibitively expensive for me. :-(
Does anyone know of a home design/made accelerator project? I have a 68030 CPU here that I could use for such a project.

Xamiche
 
Title: Re: Memory Addresing
Post by: Piru on July 27, 2004, 01:20:05 PM
Quote
...how segment registers allow a 16-bit IP register to address 1MB. Brilliant stuff.

Hell no, horrible stuff. Segmented memory addressing is evil.

Quote
Anywho, it got me thinking about the limits on how much RAM the 68020 processor in my Amiga 1200 can address. Does the 68000 series of processors address memory in the same way as their intel counter-parts

No. x86 has direct and segmented memory adddressing. m68k has only direct memory addressing. 680EC020 can address upto 16MB memory (24-bit addressing).

Quote
is it possible to replace the CPU in an Amiga 1200 to one which can address more than 8MB?

Yes. Add a CPUcard with 68020, 68030, 68040 or 68060 and you get 32-bit addressing.
Title: Re: Memory Addresing
Post by: Karlos on July 27, 2004, 01:27:38 PM
You wont find any of that segmented pointer nastiness on the 680x0 :-) It might look intresting from an engineering point of view, but segmented addressing is a total anachronism that crippled the x86 for years thanks to the need to keep backwards compatibility.

The original 68000 (and IIRC 68010 and 68EC020) had 32-bit address registers but only physically used the lower 24 address lines (so the upper 8-bits of the address registers a0-a7 were ignored) and thus had a total, linear address space of 16MB.

The full 68020 and above use all 32-bits of the address to give a proper 4GB linear address space.

The closest thing to segmented addressing you will ever see in the 680x0 series is MMU remapping, which uses paging to remap the physical 4GB space into whatever order the software expects. Of course, as far as user mode code goes, you never see this - you just fetch a byte from address X, and reality it might come from somewhere totally different, depending on how the MMU was set up.

Building a DIY accelerator? Hmm, intresting. I'm sure it is feasable for someone with sufficient engineering knowledge and understanding of the amiga hardware. In other words, not me :-)
Title: Re: Memory Addresing
Post by: Xamiche on July 27, 2004, 01:34:22 PM
Quote


Quote

    ...how segment registers allow a 16-bit IP register to address 1MB. Brilliant stuff.


Hell no, horrible stuff. Segmented memory addressing is evil.


Oh come now, be fair. Segmented addressing meant that everyone’s code based on the old microprocessors didn't become redundant, which would have meant expensive re-design. I can see why it would be a headache if one had just spent a couple of years developing software only to have Intel release a processor on which the software would not work. Sure segmented memory addressing is a patch-work solution but it works. Mind you I'm new to all this, so in a year I may be agreeing with you. :-P

Xamiche

Title: Re: Memory Addresing
Post by: Xamiche on July 27, 2004, 01:41:27 PM
@Karlos

Quote
Building a DIY accelerator? Hmm, intresting. I'm sure it is feasable for someone with sufficient engineering knowledge and understanding of the amiga hardware. In other words, not me :-)


Me neither. Maybe in a year from now. But I doubt it. :-?

Thanks for the info guys/gals (Who knows, maybe there's some Gals here) ;-)

Xamiche
Title: Re: Memory Addresing
Post by: KennyR on July 27, 2004, 02:14:05 PM
Piru's right - segmented memory addressing was pure evil, and was only in there to keep legacy with the original horribly badly designed 8086! There was no practical reason to include it, apart from to get around the 8086 and 8088's design limitations. Compared to the direct addressing method used by better designed CPUs, it makes assembly so much harder, and adds a totally unwelcome and unnecessary layer of complexity to low level design. For these reasons, modern CPUs and most modern hardware dropped it a long time ago.
Title: Re: Memory Addresing
Post by: Xamiche on July 27, 2004, 02:34:34 PM
Hmm, I wonder why they are bothering to teach us about these microprocessors if the segmented memory addressing is so bad. If todays processors no longer use it, why teach it? Maybe we (the students at my college) should jump up and down and ask to be shown the 68000 series rather than the 8086 and 8088. I guess they'll move past them and onto better MPs later on.

I didn't realise people found the system so horrible. I though it was a clever way to maintain compatibility, whilst increasing the address bus width. I guess that's the difference between knowledge and experience. I guess it's lucky for me there are many experienced people out there to enlighten this Newb. :-)

Xamiche

P.S.

Thanks for bothering to respond to my post. That's what I like about this forum, people actually respond to you.
:-)
Title: Re: Memory Addresing
Post by: KennyR on July 27, 2004, 02:40:37 PM
Quote
Xamiche wrote:
Hmm, I wonder why they are bothering to teach us about these microprocessors if the segmented memory addressing is so bad. If todays processors no longer use it, why teach it?


Hmm, good question. When I did computer tech at uni in '96, we were taught how 6502 and 68000 memory addressing worked. We didn't touch on Intel at all, except to compare. Maybe segmented memory addressing still has some use in devices where bus bandwidth is limited, I don't know.

Quote
I didn't realise people found the system so horrible. I though it was a clever way to maintain compatibility, whilst increasing the address bus width.


Well, it is, very clever. But try doing serious assembler on it and you'll be calling it every bad word under the sun. ;-) Like every workaround it just increased the amount of work and thought you have to expend just to get something done.
Title: Re: Memory Addresing
Post by: lordv on July 27, 2004, 05:31:26 PM
Quote

Xamiche wrote:
Hmm, I wonder why they are bothering to teach us about these microprocessors if the segmented memory addressing is so bad. If todays processors no longer use it, why teach it?

I think, some people are more narrow-mainded than we are. They know only x86 and do not want to learn any other architectures.

Quote

I didn't realise people found the system so horrible. I though it was a clever way to maintain compatibility, whilst increasing the address bus width.

Compatibility with what? x86 isn't compatible with anything else afaik. Maybe compatibility with narrow-minded people that were afraid of new truly 16/32 bit architectures? You know, x86 is very close to older 8bit ones.
Title: Re: Memory Addresing
Post by: FluffyMcDeath on July 27, 2004, 06:03:21 PM
Quote

Xamiche wrote:
Hmm, I wonder why they are bothering to teach us about these microprocessors if the segmented memory addressing is so bad. If todays processors no longer use it, why teach it?


For the same reason we're all taught to type on QWERTY keyboards; not because it's the best, rather because there is a lot of it about.

QWERTY, for those who don't already know, was a layout designed specifically to solve the problem on mechanical typewriters, of people typing so fast that they would jam the keys. Dvorak, for example, is a much better layout and allows faster typing, but you are not likely to come across one of these. Why? Because QWERTY is everywhere. Why? because that's what people know. Why? Because that's what they are taught. Why? because QWERTY is everywhere.


Anyway, x86 based ISAs are massively common on the desktop, so you have to know them, even though the newer ones have contiguous memory addressing. Once you know how to do the segmented addressing, you'll be happy to throw it away and forget about it because you probably won't ever need it.
Title: Re: Memory Addresing
Post by: Xamiche on July 28, 2004, 01:03:37 PM
Quote
Compatibility with what? x86 isn't compatible with anything else afaik.


Not cross platfrom compatibility, but compatibility in terms of everyones source code created on the older Intel MP. If you change the width of the IP register, everyones source code would not work, and people would have been very irrate with that in 1981 (See my earlier post on software developement). The main reason for semented memory addressing is so you don't have to change the IP register's bit width, and you can maintain backwards compatibility. I'm sure Intel considered changing the IP register width, but it would have meant alienating their customers, which in business is just plain dangerous. The Amiga, in it's early stages could get away with it because it was yet to have a customer base.

Quote
Maybe compatibility with narrow-minded people that were afraid of new truly 16/32 bit architectures?


Come on, we're talking about 23 years ago. The 68000 didn't even exist when the x86 series started (8086 -1981, 68000 -1984). No one is suggesting that such addressing is relevant now. Sheesh!

Quote
You know, x86 is very close to older 8bit ones.


You know, that was very much the point. It could do the job of an 8-bit or 16-bit MP.

I dearly love the Amiga and the 680x0 which drives it, but that doesn't mean I'm going to bag every other MPs which exist. Especially considering what Intel did for the world in terms of it's R & D in the 70s.

Xamiche

Title: Re: Memory Addresing
Post by: Steady on July 28, 2004, 01:30:45 PM
@ Xamiche:
Quote
Come on, we're talking about 23 years ago. The 68000 didn't even exist when the x86 series started (8086 -1981, 68000 -1984). No one is suggesting that such addressing is relevant now. Sheesh!


Actually, it was 8086 - 1978, 68000 - 1979. Still, the 8086 was there first.

@General thread
On compatibility, the 8086 wasn't binary compatible with it's predecessors (8080/8085) but was supposed to allow you to easily assemble the 8080 source to run on 8086. I imagine some translation takes place in the assembler and I have never seen it in action, but it was meant to be the idea.

Also, the current x86 architecture still has segmentation, it is just that most people program to the 32-bit flat architecture (ie CS/DS/ES/SS/FS/GS all have the same value). The 8086 could also be programmed in flat mode too, if you wanted to limit everything to 64k and only called the BIOS/DOS routines (ie no direct memory access). That was what the .COM programs were all about.
Title: Re: Memory Addresing
Post by: Xamiche on July 28, 2004, 01:50:33 PM
Quote
Actually, it was 8086 - 1978, 68000 - 1979. Still, the 8086 was there first


Not according to my text book. ;-)

The dates it gives me are 81 and 84. I checked a few references on the web to see if this was correct. I'm not saying you are wrong, just that my references say different. :-)
Pendantic really, but in many ways I am a small, small man. Maybe I need a new text book. :-P

Quote
The 8086 could also be programmed in flat mode too, if you wanted to limit everything to 64k and only called the BIOS/DOS routines (ie no direct memory access). That was what the .COM programs were all about.


I always wondered about the .COM programs, and why you don't seem them much anymore.

Xamiche
:-)

P.S.
I just checked another reference which says the 8086 came out in 1979...oh look, a site which says the 8086 was released in 1879, Wow, the Victorians had personal computers. Clever bunch. :-P
Title: Re: Memory Addresing
Post by: Steady on July 28, 2004, 04:14:09 PM
Quote
...oh look, a site which says the 8086 was released in 1879, Wow, the Victorians had personal computers. Clever bunch.


he he... quality.

Just for a bit more useless information, CP/M used .COM as it's executables. Since DOS was based on CP/M a similar addressing model was provided to ease porting. DOS COM programs start at address 0x0100 and included a PSP between 0x0000 and 0x0100 similar to CP/M. EXE files were the 'proper' format for DOS programs, though.
Title: Re: Memory Addresing
Post by: SamuraiCrow on July 28, 2004, 06:03:36 PM
Quote
Since DOS was based on CP/M a similar addressing model was provided to ease porting.


Actually MS-DOS was based on Q-DOS, a clone of CP/M.
Title: Re: Memory Addresing
Post by: mjg59 on July 28, 2004, 06:50:04 PM
Quote


QWERTY, for those who don't already know, was a layout designed specifically to solve the problem on mechanical typewriters, of people typing so fast that they would jam the keys. Dvorak, for example, is a much better layout and allows faster typing, but you are not likely to come across one of these. Why? Because QWERTY is everywhere. Why? because that's what people know. Why? Because that's what they are taught. Why? because QWERTY is everywhere.



QWERTY was designed to allow typists to type faster without jamming the keyboard. The problem with mechanical typewriters is that the arms swing out and intersect each other. The closer the arms are to each other, the more likely it is that they'll cross each other's paths (and so jam). QWERTY helps with this by making you use arms that are further apart. As a result, you can type faster on QWERTY without jamming it. People who claim that QWERTY reduces jamming by slowing you down are obviously either bad typists or have never used a mechanical typewriter - the first time I used one, I jammed it repeatedly.

Coincidentally, the first time I used a mechanical typewriter was while I was learning Dvorak. Comparing the two, I'm about 10 words per minute faster with Dvorak (85 compared to 75). Almost all of this is because I learned Dvorak properly. My QWERTY style is ad-hoc - I don't use the correct finger positioning. The original study that showed that Dvorak was faster was conducted by Dvorak himself. When people attempted to repeat his results, they found that QWERTY and Dvorak were about the same speed. http://www.independent.org/tii/news/990403Liebowitz.html has more on this.

There's certainly evidence that Dvorak is slightly better, but it's certainly not much better.
Title: Re: Memory Addresing
Post by: FluffyMcDeath on July 29, 2004, 12:00:17 AM
Quote

mjg59 wrote:

QWERTY was designed to allow typists to type faster without jamming the keyboard.


In that slowing the typist down so that the keys don't jam is faster than unjamming the keys all the time.

As a result, you can type faster on QWERTY without jamming it. People who claim that QWERTY reduces jamming by slowing you down are obviously either bad typists or have never used a mechanical typewriter - the first time I used one, I jammed it repeatedly.

Coincidentally, the first time I used a mechanical typewriter was while I was learning Dvorak.
[/quote]

And I jammed the keys on a QWERTY repeatedly. Novice typists will do that. But mechanical devices need time for the hammers to swing in and swing out again. Anything that delays the next keystroke helps avoid those collisions.

As to the Liebowitz article, the conclusions are more based on a desire to believe that the markets are rational and efficient than on whether Dvorak is better than QWERTY. Since they believe that the market knows best, they believe that QWERTY must be the same or better, and they bend the evidence to fit.

One rebuttal here (http://www.mwbrooks.com/dvorak/dissent.html)

Quote


Comparing the two, I'm about 10 words per minute faster with Dvorak (85 compared to 75).


That's more than 10% faster, and thats not a small amount.
Title: Re: Memory Addresing
Post by: mjg59 on July 29, 2004, 12:40:44 PM
Quote

FluffyMcDeath wrote:

In that slowing the typist down so that the keys don't jam is faster than unjamming the keys all the time.



No. If that was true, then it would be impossible to type fast enough on a QWERTY keyboard to jam it. But it's entirely possible to do so.

By your argument, there is a maximum speed that can be typed on a mechanical typewriter without jamming. With an ideal keyboard layout, typists would hit that limit and jam the keyboard, and as a result end up slower overall. QWERTY slows typists down, and so they don't hit that limit.

Now, this is obviously not true. It's possible to type fast enough on QWERTY typewriters to jam them. The only reason QWERTY is useful is that it raises the maximum speed that can be typed without jamming. Seriously. Find an old mechanical typewriter (and we're talking about one from circa 1920 here, more modern ones are less prone to jamming and have a different arrangement between the keys and the hammers) and try typing in QWERTY. You'll notice that normally one hammer will be followed by one a large distance away. Now pretend that the keyboard is layed out in alphabetical order. Hammers will then often be followed by nearby hammers. Dvorak has similar qualities to QWERTY in this respect.

Quote

And I jammed the keys on a QWERTY repeatedly. Novice typists will do that. But mechanical devices need time for the hammers to swing in and swing out again. Anything that delays the next keystroke helps avoid those collisions.


And anything that causes you to use hammers that are further apart (like, say, QWERTY) helps avoid those collisions.

Quote

As to the Liebowitz article, the conclusions are more based on a desire to believe that the markets are rational and efficient than on whether Dvorak is better than QWERTY. Since they believe that the market knows best, they believe that QWERTY must be the same or better, and they bend the evidence to fit.


No, that's entirely not what the article is about. The article is debunking the claim that the prevelance of QWERTY is a market failure. It's not. Dvorak is slightly better than QWERTY, but not massively so. It appeared many years after QWERTY became popular. It offers only a small advantage. The cost of retraining is moderately high. Things that are expensive but offer only a small advantage don't become popular. If you want to take over the market, you need to be either cheaper or much better.

Quote

One rebuttal here (http://www.mwbrooks.com/dvorak/dissent.html)


Which again misses the point (the Liebowitz article isn't about proving that Dvorak is worse or the same as QWERTY. It's about proving that it's not much better), and claims that the Liebowitz article is accusing there of being a coverup on the Navy report. It doesn't. Liebowitz says that it was difficult to get hold of the Navy report. This suggests that most people who talked about it had never got a copy themselves. The entire "rebuttal" is based on misinterpretations, and in the end it admits that there is little or no decent statistical evidence that Dvorak offers large improvements over QWERTY.

Quote

That's more than 10% faster, and thats not a small amount.


I type Dvorak correctly. I use the correct finger positionings. I keep my hands over the correct parts of the home row. I type QWERTY badly. I use whichever fingers happen to be in about the right place. Comparing the two directly without taking that into account is not a fair comparison. I'm glad I learned Dvorak, because it's a lot easier to learn something properly from scratch than it is to unlearn bad habits.
Title: Re: Memory Addresing
Post by: Floid on July 29, 2004, 03:21:53 PM
From another bikeyboardstrous type...

The fun and irrefutable thing about QWERTY is that all the letters to spell "TYPE WRITER" are in the top row.  Myth holds that the first QWERTY implement was, in fact, a TYPE-WRITER brand typewriter, and irrespective of that, it sure has allowed years of speedy demos.
Title: Re: Memory Addresing
Post by: FluffyMcDeath on July 30, 2004, 04:57:29 PM
Quote


And anything that causes you to use hammers that are further apart (like, say, QWERTY) helps avoid those collisions.


Which is relevant for electric typewriters and computer keyboards how? It's no longer an issue so why haven't we switched?

Quote

The article is debunking the claim that the prevelance of QWERTY is a market failure. It's not. Dvorak is slightly better than QWERTY, but not massively so.


If the market works to bring the best to the fore, and Dvorak is better than QWERTY, then it hasn't worked. Dvorak IS better. The differences in opinion are about HOW MUCH better. Bif you believe that the market will always find the optimum solution, this is anathema.


Similarly, the 68000 beat the snot out of the 8086. IBM considered using it in the IBM PC (well, the engineers did, but they are geeky). However, IBM didn't want the PC to be too powerful as they didn't want it to compete with their BIG machines.

The IBM PC was a lowly crappy box that the asian manufactureres found easy to clone. IBM hated the cloners, but between IBM's in with the business world, and the cloners pouring out cheap knock offs so folks could work on their workfiles at home, the PC became the standard. At the time it was becoming the standard, there was far better technology available but the market doesn't favour the better mousetrap, it favours the one made by the biggest player, or the one that is easiest to copy, or both.