Page 2 of 4

Re: TF536 Source Code?

Posted: 08 Dec 2022 21:22
by terriblefire
Ok. I havent really got any interesting in hand holding you here if you dont know about how autoconfig works.

If I had interest in supporting 1.3 I would ask/pay/bribe @erique to make the module required to get this to work.

Like i say make it work on WinUAE first.

Re: TF536 Source Code?

Posted: 08 Dec 2022 21:49
by Alex Oughton
It's not so much that I don't know how AutoConfig works. The documentation online is excellent, and has got me as far as fixing the code to get the card itself working. It's just that final step of getting the 536 to let go of the config address so the NEXT card can be configured.

I'm not looking for hand-holding, but was hoping for a little confirmation that my interpretation of the documents is correct and maybe confirmation that the code example may be writing to the wrong address. I do appreciate your responses as they are confirming my suspicions.

As far as WinUAE goes, I'll have to see if I can configure it with a Z2 card AFTER the Z3 RAM to simulate this scenario properly. Will look at that next.

Re: TF536 Source Code?

Posted: 08 Dec 2022 22:23
by terriblefire
Alex Oughton wrote: 08 Dec 2022 21:49 It's not so much that I don't know how AutoConfig works. The documentation online is excellent, and has got me as far as fixing the code to get the card itself working. It's just that final step of getting the 536 to let go of the config address so the NEXT card can be configured.
This is hand holding. You're hitting the wrong addresses so i guess you haven't read the docs properly. Until you hit the right address (Hint: i send a picture with the info you need) it wont let go of the config area.

Like i say i could get this done in about 2 hours if I wanted the additional headache of another OS to support.

EDIT/HINT: There is actually zero.. nil... difference in how a ZII card or ZIII card is finally configured in the ZII area. The only difference is some writes happen which the TF ignores.

Re: TF536 Source Code?

Posted: 08 Dec 2022 22:45
by Alex Oughton
The code which is hitting the wrong addresses is from the example in the PDF. I'm looking at the debug output I added, and I can clearly see that the addresses don't match the documentation (the image you provided is also one I had previously looked at). I'm just surprised that this example code is getting it so wrong, and so this is why I was asking for confirmation. Typically I expect the example to be correct and the problem to be more with my understanding. It's only because I've had to fix other problems in this code that I considered that the code may be wrong and my interpretation of the documentation correct. The biggest problem was in the main register-reading function which was returning garbage until I fixed it.

Anyway. You've confirmed that the addresses which should be written to are the ones I understand and not the ones which this code is hitting. I'm going to keep working on fixing that. Thank you again, I should have all I need here.

Re: TF536 Source Code?

Posted: 08 Dec 2022 22:54
by terriblefire
Alex Oughton wrote: 08 Dec 2022 22:45 The code which is hitting the wrong addresses is from the example in the PDF.
You've got typo's..

https://github.com/alexoughton/configz3 ... gz3.c#L174

Those should be hex offsets not decimal.

Re: TF536 Source Code?

Posted: 08 Dec 2022 22:57
by Alex Oughton
That's how it is in the PDF:
Screenshot 2022-12-08 175638.png
And yes, that was my very first suspicion and why I highlighted that line in my first message today. It just doesn't make sense to me that they're adding a decimal offset.

Update: I changed it to 0x22 and the addresses it's using look correct now although it's still crashing the system. I'll keep experimenting.

Re: TF536 Source Code?

Posted: 08 Dec 2022 23:10
by terriblefire
Well looking at that code i highly doubt it was ever tested. It may cause you more pain than help if you aren't mid level god of C.

Re: TF536 Source Code?

Posted: 08 Dec 2022 23:29
by Alex Oughton
Well I just made a breakthrough. Modifying the code to send SHUTUP to the TF536 is working to then make the Z2 cards (SCSI and RAM) work. I can even still add the TF536's RAM to the memory list manually afterwards without (apparent) issue. I'm running a memory test now to confirm it's working.

Thank you again for pointing me in the right direction (although I really should have just trusted my gut on this). I'll do some clean-up to the code and then publish something which others may want to use as well. I'll make sure it's pointed-out that this is 120% unsupported by everyone (including you).

Re: TF536 Source Code?

Posted: 09 Dec 2022 09:15
by terriblefire
Can I just point out that using an 030 with Kick 1.3 is a really bad idea. The OS has no awareness of Cache and makes some assumptions that the TF536 is not designed to support. Its highly likely you have lots of issues even after you fix this. Especially with Zorro cards.

Re: TF536 Source Code?

Posted: 09 Dec 2022 09:28
by alexh
terriblefire wrote: 09 Dec 2022 09:15 Can I just point out that using an 030 with Kick 1.3 is a really bad idea. The OS has no awareness of Cache and makes some assumptions that the TF536 is not designed to support. Its highly likely you have lots of issues even after you fix this. Especially with Zorro cards.
I thought the A3000/030 shipped with Kickstart 1.3 and Workbench 1.3?