06 August 2017, 12:42 | #1 |
Registered User
Join Date: Jan 2009
Location: Norway
Age: 49
Posts: 107
|
$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. |
06 August 2017, 13:04 | #2 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,534
|
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.
|
06 August 2017, 14:17 | #3 |
Registered User
Join Date: Jan 2009
Location: Norway
Age: 49
Posts: 107
|
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 ? |
06 August 2017, 17:35 | #4 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,534
|
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.. |
06 August 2017, 18:51 | #5 |
Registered User
Join Date: Jan 2009
Location: Norway
Age: 49
Posts: 107
|
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! |
06 August 2017, 23:05 | #6 |
Registered User
Join Date: Jan 2009
Location: Norway
Age: 49
Posts: 107
|
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.
|
06 August 2017, 23:18 | #7 |
Registered User
Join Date: Jan 2009
Location: Norway
Age: 49
Posts: 107
|
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. |
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 |
|
|