Welcome, Guest. Please login or register.

Author Topic: Some lessons learned from my recent A2000 rebuild  (Read 4397 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline Zac67

  • Hero Member
  • *****
  • Join Date: Nov 2004
  • Posts: 2890
    • Show all replies
Re: Some lessons learned from my recent A2000 rebuild
« on: May 03, 2012, 07:34:57 AM »
Quote from: Matt_H;691358
The A2091 driver will use whatever memory has the highest priority. In my case, that's the non-DMA memory on the 2632 board, leading to horrendously slow speeds - even with the full 2MB of RAM on the A2091 itself. Solution?


Everything will you highest priority RAM first. Have you configured the mask value correctly?
 

Offline Zac67

  • Hero Member
  • *****
  • Join Date: Nov 2004
  • Posts: 2890
    • Show all replies
Re: Some lessons learned from my recent A2000 rebuild
« Reply #1 on: May 03, 2012, 07:12:34 PM »
Quote from: Matt_H;691417
Do you know what it should be?


No, but it's not too hard to figure out. If the A2091 memory autoconfigs to $200000 to $3FFFFF and the A2630 (non-DMAable) RAM goes to somewhere beyond that (doesn't really matter if it's $600000, $20000000 or whatever) you can simply use a mask of $3FFFFC. (The two least significant bits set to 0 make sure a buffer is longword aligned, speeding up the '030's access somewhat.).

In a nutshell, you use the highest address DMA works at and set the lowest nibble to $C: $3FFFFC for a 2 Meg RAM board and some below $FFFFFF 32-bit RAM, or $9FFFFC to use any Z2 RAM but no extended memory, or even $FFFFFC if you've got Ranger or slowfast mem.

However, if the A2630 RAM configures before (=below) the A2091 RAM we'll need to get more creative. Post the memory locations and we can work it out.

btw: the A2630 RAM should autoconfig (J303 open)
 

Offline Zac67

  • Hero Member
  • *****
  • Join Date: Nov 2004
  • Posts: 2890
    • Show all replies
Re: Some lessons learned from my recent A2000 rebuild
« Reply #2 on: May 04, 2012, 09:31:20 PM »
Makes sense that the A2630 RAM configures first. So the 'bad' addresses to avoid for the A2091 is $200000-5FFFFF, 'good' mem is $600000-7FFFFF.

Hmm - hate to tell you, but the mask scheme is too simple to solve this:
$20 = %0010 0000
$5F = %0101 1111

$60 = %0110 0000
$7F = %0111 1111

The mask value 'forbids' address bits to be set for allocated buffers. The logic is to clear a mask bit when you don't want it present in the buffer address. But you can't force them set which you'd need here.
Since the very same 3 bits are used to count from 2 through 7 you can't make any use of that. If some more RAM would be present from $800000 that would be easy to address ($8FFFFF or $9FFFFF masks would do that). Since we don't have it here you can either
- not autoconfig the A2630 RAM and AddMem it later on - leaves you with the OS structures in 16-bit RAM
- get yourself some 2 MB RAM board and configure it before the A2091 (closer to CPU)
- restrict A2091 DMA to chipmem only (mask $1FFFFF) - I would try that, it's probably faster than DMA to 32-bit.

:(
« Last Edit: May 04, 2012, 09:33:59 PM by Zac67 »