ChuckyGang / DiagROM

The Amiga Diagnostic tool
Other
153 stars 30 forks source link

Autoconfig: Revert next-address when PIC not configured #10

Closed LIV2 closed 3 years ago

LIV2 commented 3 years ago

Hi Again @ChuckyGang :)

Problem: Now that shutup is working I found that the address variable is incremented anyway, this happens before the board is assigned or told to shut up

Why this is a problem: If we tell a board to shut up (or there is not sufficient space for the board) the address gets increased by 'AutoConfSize' anyway causing premature exhaustion of zorro space

Example: Say you have a config chain that looks like this:

  1. 2MB Z2 board
  2. 8MB Z2 board (no space, shut up!)
  3. 4MB Z2 board

Kickstart will Assign space to boards 1&3 but Diagrom thinks there is no more space when it gets to board 3.

This is a bit of an edge case, not many people are going to have configurations like this because card 2 can never work but for a Z2 ram I'm working on it will attempt to offer smaller memory blocks if told to shut up, and this was preventing me from testing it properly.

I somehow feel like the fix I've done isn't ideal but couldn't think of a better way without reworking large parts of the autoconfig code as the address is incremented early on, but I welcome any feedback if there's a better/easier way to fix this :)

ChuckyGang commented 3 years ago

I am working on 1.3 that will contain quite some bigfixes. will see if I can have this issue fixed there aswell

LIV2 commented 3 years ago

Ok great I will close this PR then :)