The MC68000 can address 16 MB of physical memory. Later Amiga models featured higher-speed, full 32-bit CPUs with a larger address space and instruction pipeline facilities. CPU upgrades were offered by both Commodore and third-party manufacturers. Most Amiga models can be upgraded either by direct CPU replacement or through expansion boards.
@Marchie
Hello there, lets see if I can help with your request.
As the A2000 has essentially 3 Memory Ranges I will hope to explain them a little further.
1. CHIP RAM
This as you would expect is for the custom chips to store and process data - you need this for native sound and graphics.
2. 24bit Z2 FAST RAM
This is essentially an 16bit wide 8MB RAM Pool that is used by the CPU (on-board or in the processor slot) - the CHIP set cannot use this area directly and all data must be fetched by the CPU and placed into CHIP RAM
Zorro 2 adaptors that contain memory will be using this space i.e. GVP / CBM DMA SCSI adaptors. Maximum amount of RAM is 8MB
Some CPU's will allocate RAM from this pool and use it as 32bit wide memory - like the A2620 and A2630 - both of these CPU adaptors come with either 2MB or 4MB of 32bit RAM using 2-4MB of the 8MB Z2 reserved space.
3. 32bit CPU FAST RAM
This is usually memory that is on an accelerator for example GVP Combi 030 or 040, some cards are a little trickier - such that of the CBM A2620 or A2630 mentioned earlier.
A2000 CPU Cards
The CBM A2620/30 are limited in speed to 14MHz and 25Mhz respectively (both have an FPU and MMU) - the former will grant you about 3 MIPS (compared to 0.9 MIPS) where as the 25MHz 030 will give you about 4.5 MIPS.
24bit / 32bit Addressing
So the humble Amiga A2000 with its stock 68k CPU can only address up to 24bit (think of it as a memory range) of 16MegaBytes - from this it reserves all the memory and I/O areas of the board that leaves about 8MB available to address (it is a little more but no need to worry about that ).
So if you have an A2620 or 30 with 4MB of RAM this will take 4MB away from the 8MB of RAM addressable - so if you tried to use 8MB of RAM on the SCSI card and 4MB (or any amount) of RAM from the A2620/30 CPU Card you will get a conflict - usually presented with a Yellow Screen (Memory assertion failure) - so in this instance if you have a 4MB A2630 you will need to configure the SCSI card for 4MB as well - giving you a total of 8MB.
Other CPU accelerator cards work differently using a 32bit addressing space - this means they could theoretically have up to 4GB of FAST RAM - although the most I have seen is 128MB of RAM.
Closing Thoughts / Recommendations
I have been fortunate to have owned a wide range of CPU cards for the A2000, so if you are into the A2000 as it is an A2000 - then I would humbly recommend the following.
Hello there, lets see if I can help with your request.
As the A2000 has essentially 3 Memory Ranges I will hope to explain them a little further.
1. CHIP RAM
This as you would expect is for the custom chips to store and process data - you need this for native sound and graphics.
2. 24bit Z2 FAST RAM
This is essentially an 16bit wide 8MB RAM Pool that is used by the CPU (on-board or in the processor slot) - the CHIP set cannot use this area directly and all data must be fetched by the CPU and placed into CHIP RAM
Zorro 2 adaptors that contain memory will be using this space i.e. GVP / CBM DMA SCSI adaptors. Maximum amount of RAM is 8MB
Some CPU's will allocate RAM from this pool and use it as 32bit wide memory - like the A2620 and A2630 - both of these CPU adaptors come with either 2MB or 4MB of 32bit RAM using 2-4MB of the 8MB Z2 reserved space.
3. 32bit CPU FAST RAM
This is usually memory that is on an accelerator for example GVP Combi 030 or 040, some cards are a little trickier - such that of the CBM A2620 or A2630 mentioned earlier.
A2000 CPU Cards
The CBM A2620/30 are limited in speed to 14MHz and 25Mhz respectively (both have an FPU and MMU) - the former will grant you about 3 MIPS (compared to 0.9 MIPS) where as the 25MHz 030 will give you about 4.5 MIPS.
24bit / 32bit Addressing
So the humble Amiga A2000 with its stock 68k CPU can only address up to 24bit (think of it as a memory range) of 16MegaBytes - from this it reserves all the memory and I/O areas of the board that leaves about 8MB available to address (it is a little more but no need to worry about that ).
So if you have an A2620 or 30 with 4MB of RAM this will take 4MB away from the 8MB of RAM addressable - so if you tried to use 8MB of RAM on the SCSI card and 4MB (or any amount) of RAM from the A2620/30 CPU Card you will get a conflict - usually presented with a Yellow Screen (Memory assertion failure) - so in this instance if you have a 4MB A2630 you will need to configure the SCSI card for 4MB as well - giving you a total of 8MB.
Other CPU accelerator cards work differently using a 32bit addressing space - this means they could theoretically have up to 4GB of FAST RAM - although the most I have seen is 128MB of RAM.
Closing Thoughts / Recommendations
I have been fortunate to have owned a wide range of CPU cards for the A2000, so if you are into the A2000 as it is an A2000 - then I would humbly recommend the following.
1. 1MB CHIP RAM UpgradeIf you are planning on taking on more processing work - then I would humbly suggest one waits and orders (when available) the Vampire2 for the A500/A1000 and A2000 - this will considerably spank anything currently available on the market as well as provide at a bare minimum RTG HDMI Graphics card, 64bit CPU capable of 113MIPS (at present)
Plugs into the Agnus and provides an additional 1MB of CHIP RAM for a total of two
2. Masoboshi Master Card MC-702+
This has both IDE and SCSI and can hold upto 8MB of Z2 Memory - it is the ONLY DMA IDE card in the Amiga - when you have one of these configured its truly a delight.
3. CBM A3630 4MB 25MHz (Latest ROM revision)
This is a good card - offers quite a bit under the hood and at 25MHz is a great way to start the system - using this you will have 4MB for the CPU and 4MB as 16bit RAM for the SCSI card' DMA - through put will be about 2.1MB per second with this configuration.
Is there guarantee, that memory for this object will be properly aligned if we create object of this type in stack?
If we create char bytes[4] in stack and then try to cast it to integer there might be alignment problem. We can avoid that problem by creating it in heap, however, is there such guarantee for union objects? Logically there should be, but I would like to confirm.
Thanks.
confuciusconfucius
2 Answers
Well, that depends on what you mean.
If you mean:
Will both the
int
and char[4]
members of the union be properly aligned so that I may use them independently of each other?
![Alignment Alignment](/uploads/1/2/3/9/123914478/558030329.png)
Then yes. If you mean:
Will the
int
and char[4]
members be guaranteed to be aligned to take up the same amount of space, so that I may access individual bytes of the int
through the char[4]
?
Then no. This is because
sizeof(int)
is not guaranteed to be 4. If int
s are 2 bytes, then who knows which two char
elements will correspond to the int
in your union
(the standard doesn't specify)?
If you want to use a union to access the individual bytes of an
int
, use this:
Since each member is the same size, they're guaranteed to occupy the same space. This is what I believe you want to know about, and I hope I've answered it.
Chris LutzChris Lutz
EboMikeEboMike