English Amiga Board


Go Back   English Amiga Board > Support > support.WinUAE

 
 
Thread Tools
Old 17 May 2019, 00:34   #1
BlankVector
Registered User
 
Join Date: Jun 2012
Location: France
Posts: 171
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 first line is to patch the high word of cd_BoardAddr. That's fine.

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.
BlankVector is offline  
Old 17 May 2019, 16:06   #2
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 44
Posts: 23,112
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..)
Toni Wilen is offline  
Old 17 May 2019, 16:24   #3
BlankVector
Registered User
 
Join Date: Jun 2012
Location: France
Posts: 171
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.
BlankVector is offline  
Old 18 May 2019, 15:06   #4
BlankVector
Registered User
 
Join Date: Jun 2012
Location: France
Posts: 171
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.
BlankVector is offline  
 


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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 05:33.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.
Page generated in 0.05846 seconds with 13 queries