English Amiga Board


Go Back   English Amiga Board > Support > support.WinUAE

 
 
Thread Tools
Old 06 August 2017, 12:42   #1
StoneOakvalley
Registered User
 
Join Date: Jan 2009
Location: Norway
Age: 49
Posts: 105
$BFE400 / $BFE500 from Winuae 3.3.0 and forwards responds with 0

My friend created a program many years ago called "FunWordGenerator" for Amiga 2.04 kick and beyond, and he use the following code to get random seed out.

PROC rnd(max)
DEF a[3]:ARRAY OF LONG,b,r=0

-> Delay(3)
DateStamp(a)
Delay(Rnd(3))
b:=Char($BFE400)*Char($BFE500)
b:=b*a[2]
-> b:=b OR %10000000000000000000000000000000
b:=b-(b*8)
->WriteF('\n\nInit value = \d\n',b*1000)
Rnd(RndQ(b*10000))
r:=Rnd(max)

ENDPROC r

Prior to Winuae 3.3.0 the numbers responded something, but from 3.3.0 it always returns 0 and our program fails. Even in 3.5.0

On a real Amiga 500, with 2.0 kick and 0.5 extra ram, it responds back something other than 0, even if date on that Amiga was set to 1992 or 2017.

What has happen since 3.3.0 that would cause this? I've tried a number of options in WinUAE but nothing happens...

edit: added links to photo of real amiga and the software "FWGEN.adf"
http://www.stone-oakvalley-studios.com/winuae/

Last edited by StoneOakvalley; 06 August 2017 at 12:52.
StoneOakvalley is offline  
Old 06 August 2017, 13:04   #2
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,503
It is depending on undefined behavior (reading "bus noise", it does not read CIA registers) and it is only emulated if more compatible is checked.
Toni Wilen is online now  
Old 06 August 2017, 14:17   #3
StoneOakvalley
Registered User
 
Join Date: Jan 2009
Location: Norway
Age: 49
Posts: 105
I played with all the "More Compatible" settings in WinUAE 3.5.0 along trying different combos within CPU, JIT, Compatible Settings (Advanced Settings), Clock Source and bunch of other menus/checkmarks (reset winuae every time), but the BFE4000/BFE500 always responds back 0.

Right now, Winuae 3.2.0 acts as real hardware Amiga, but 3.3.0 and above does not. What setting can I check in WinUAE to make it as WinUAE 3.2.0, clearly something has happen in the code for 3.3.0 ?
StoneOakvalley is offline  
Old 06 August 2017, 17:35   #4
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,503
No, it has never acted as real hardware (without accurate A500 mode), only difference was that previously "default" was FF, not 00 as a side-effect of memory related change (but neither are correct)

I don't usually add workarounds for system friendly programs that do bad things and this is quite bad thing (What you get isn't even random, at least when having 68000 CPU you get whatever CPU prefetched previously = static values!). It would have been much better idea to read the actual CIA timer register. (Accessing BFExyz where z bit 0 is clear: Enable CIA-A, CIA-A drives bits 8 to 15 of data bus but code reads bits 0 to 7 which is not driven by any chip)

I can change it back to FF but there probably is another bad program that don't like it..
Toni Wilen is online now  
Old 06 August 2017, 18:51   #5
StoneOakvalley
Registered User
 
Join Date: Jan 2009
Location: Norway
Age: 49
Posts: 105
No, its fine. Just want to check if it was intentionally changed from FF to 00 recently, the original programmer can naturally tweak his code to get random that works as intended hopefully on both real hardware and WinUAE :-)

Just leave it as it is, no probb for us!
StoneOakvalley is offline  
Old 06 August 2017, 23:05   #6
StoneOakvalley
Registered User
 
Join Date: Jan 2009
Location: Norway
Age: 49
Posts: 105
Just want to add that I changed the BFE400 and BFE500 to BFE401 and BFE501, and it routine works now, even in both 3.2.0 and 3.5.0. Haven't tested on real Amiga yet.
StoneOakvalley is offline  
Old 06 August 2017, 23:18   #7
StoneOakvalley
Registered User
 
Join Date: Jan 2009
Location: Norway
Age: 49
Posts: 105
By the way, Winuae 3.5.0 has a GUI bug.

Inside Chipset and click "Cycle-Exact (Full)", the "Wait for Blitter" is unchecked and available. But if you try to click "Wait for Blitter" to check it on, the button dont get checked and instead goes disabled/grey and then the "Video port display hardware:" pulldown becomes active and first item selected.
StoneOakvalley 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
Recently changed WinUAE folder, now getting Arabuusimiehet.WinUAE error Foebane support.WinUAE 9 09 September 2016 20:03
WinUAE 3.1.0 with other WinUAE 3.1.0 Serial TCP F.Art support.WinUAE 2 23 April 2015 22:04
WinUAE 2.2.0 responds to F12 w/o focus Sigma support.WinUAE 4 08 July 2010 13:19
WinUAE 0.9.92 "WinUAE 1.0 public beta #3" Released! Jim News 2 23 December 2004 11:29
WinUAE 0817r3-GUI dissappears/ WinUAE freezes. 7-Zark-7 support.WinUAE 2 23 December 2001 14:19

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 18:25.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.08263 seconds with 15 queries