17 May 2019, 00:34 | #1 |
Registered User
Join Date: Jun 2012
Location: France
Posts: 183
|
Bug in expamemz3_map() with cd_SlotAddr
Hi, I suspect a bug in WinUAE's expamemz3_map() function.
https://github.com/tonioni/WinUAE/bl...nsion.cpp#L629 The goal of that function is to patch the ConfigDev structure (referenced by A3 register) when the option below is selected in WinUAE settings: Hardware > RAM > Z3 mapping mode > UAE (0x10000000) Current code is like this: Code:
put_word (regs.regs[11] + 0x20, expamem_board_pointer >> 16); put_word (regs.regs[11] + 0x28, expamem_board_pointer >> 16); Purpose of second line is to patch cd_SlotAddr. And we can see that WinUAE puts the same value there. As far as I understand, in case of Zorro III board cd_SlotAddr is supposed to be equal to the high byte of the board address. If this is correct, then the second line should be changed to "... 0x28, expamem_board_pointer >> 24". This could easily be checked with an AmigaOS program which dumps the ConfigDev list from expansion library. I don't know such program. |
17 May 2019, 16:06 | #2 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,519
|
Both addresses originally contain 0x4000 before being modified. I can't see anything wrong. (Except that it is horrible hack but there is no other way..)
|
17 May 2019, 16:24 | #3 |
Registered User
Join Date: Jun 2012
Location: France
Posts: 183
|
Ah, in that case there may be a bug in the AROS AUTOCONFIG routines I borrowed for EmuTOS. I added some traces before and after WriteExpansionWord(). cd_SlotAddr was 0x0040 before WinUAE patching, then 0x1000 after patching. Maybe AROS is wrong when computing the value of cd_SlotAddr. Unfortunately I can't find any documentation about its value.
|
18 May 2019, 15:06 | #4 |
Registered User
Join Date: Jun 2012
Location: France
Posts: 183
|
I found a sample program which dumps all the ConfigDev from expansion.library:
https://wiki.amigaos.net/wiki/Expans...ibrary_Example I added a dump for the cd_SlotAddr field, and I cross-compiled the program with vbcc. It works like a charm. I ran it with WinUAE and Kickstart 3.1. In any configuration, it shows that cd_SlotAddr is always equal to the high word of cd_BoardAddr. So the issue discussed here actually comes from a bug in AROS Zorro III routine, which wrongly initializes the cd_SlotAddr field. WinUAE is correct. Sorry for the noise. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Bug I think... | NLS | support.WinUAE | 8 | 24 July 2017 22:09 |
Bug in x64 file requester and bug in Blizzard PPC ROM filesize | headkase | support.WinUAE | 5 | 26 June 2016 14:17 |
Got A Bug | Error | support.WinUAE | 0 | 11 July 2004 16:48 |
Got a bug | Error | support.WinUAE | 2 | 17 March 2004 13:36 |
|
|