English Amiga Board


Go Back   English Amiga Board > Support > support.WinUAE

 
 
Thread Tools
Old 11 September 2021, 21:42   #1
Photon
Moderator
 
Photon's Avatar
 
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,602
Does WinUAE clear [Chip]RAM from Ctrl-Amiga-Amiga?

It certainly doesn't on a real A500 and it's in the way of testing right now, so is there a way to turn it off?

If it doesn't, please say so and I can error search elsewhere.
Photon is offline  
Old 11 September 2021, 21:56   #2
ross
Defendit numerus
 
ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
Quote:
Originally Posted by Photon View Post
It certainly doesn't on a real A500 and it's in the way of testing right now, so is there a way to turn it off?

If it doesn't, please say so and I can error search elsewhere.
It depends.

With soft reset (CTRL-A-A or via software), it doesn't clear the memory.
With the GUI and Reset button it clear the memory.
ross is offline  
Old 11 September 2021, 22:01   #3
Photon
Moderator
 
Photon's Avatar
 
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,602
I tested it and Ctrl-Amiga-Amiga definitely clears e.g. $30000, $50000, $7e000, and $c40000. Same with softreset in code. 2.0+ is fine.

I've looked but found no setting for it. I fear this might be a compatibility fix(?) but I've definitely rescued sources and data under 1.3 and this is no longer possible in WinUAE 4.4.0.
Photon is offline  
Old 11 September 2021, 22:01   #4
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,505
KS 1.3 clears Chip RAM if Chip RAM size is larger than 512k (KS bug)
setpatch -r should fix it.

(and not enough information)
Toni Wilen is offline  
Old 11 September 2021, 22:08   #5
Photon
Moderator
 
Photon's Avatar
 
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,602
Quote:
Originally Posted by Toni Wilen View Post
KS 1.3 clears Chip RAM if Chip RAM size is larger than 512k (KS bug)
setpatch -r should fix it.

(and not enough information)
That would explain the differences to 2.0+! Wow, that was a tricky/sneaky bug. Will test at once. Cheers Toni
Photon is offline  
Old 11 September 2021, 22:13   #6
ross
Defendit numerus
 
ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
Quote:
Originally Posted by Photon View Post
That would explain the differences to 2.0+! Wow, that was a tricky/sneaky bug. Will test at once. Cheers Toni
http://eab.abime.net/showpost.php?p=...8&postcount=11
You can also solve the problem of KS1.x and 1MB chip-ram
ross is offline  
Old 11 September 2021, 22:20   #7
Photon
Moderator
 
Photon's Avatar
 
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,602
Ross: Come on, I don't know every bug of every configuration. I leave that to those who have to deal with it like a pro (Toni and you ) Just trying to write correct code here. Sometimes it can't be done it seems!

Tested: Yes, data at $7e000 stays from Ctrl-Amiga-Amiga and code softreset, if <=512KB Chip RAM.

So. Old code is solid for 1.3. Can't do anything about the clear bug.

(Side note: Would be kinda handy to trigger it for a hardreset on 2.0+ tho, since ColdReboot() doesn't )

Anyway thx again for info Toni
Photon is offline  
Old 11 September 2021, 22:27   #8
ross
Defendit numerus
 
ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
This is the relevant code.
I skip all the code that setup ColdCapture vector and check for KS1.x.

Code:
ColdCapture_code
	;fix 1MB chip on Ks1.3
	bchg	#1,$bfe001		;cosmetic
	movea.l	$3e(a6),a3		;read MaxLocMem
	jmp	$1aa-$184(a5)		;and use it
Basically skip ROM code that setup the wrong $80000 as top of chip-mem and use the full chip-memory available.

No idea what setpatch -r does, but this tricky code works
(I simply dissected the KS to see what the problem was)
ross is offline  
Old 11 September 2021, 22:53   #9
Photon
Moderator
 
Photon's Avatar
 
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,602
Cool, is this your fix for 1.3, or what ColdCapture does on 2.0+?
Photon is offline  
Old 11 September 2021, 22:56   #10
ross
Defendit numerus
 
ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
Quote:
Originally Posted by Photon View Post
Cool, is this your fix for 1.3, or what ColdCapture does on 2.0+?
My fix for 1.3.
You need to execute it very early on KS startup (you only can do it at ColdCapture time because after is to late..)

From 2.0+ >=1MB chip-ram and reset-proof code is properly handled.
ross is offline  
Old 11 September 2021, 23:00   #11
Photon
Moderator
 
Photon's Avatar
 
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,602
OK, just what I was looking for. "We're gonna need a bigger Boot" (c) ...

What is a3/a5/a6 (mostly a5 if a6 is execbase)?
Photon is offline  
Old 11 September 2021, 23:08   #12
ross
Defendit numerus
 
ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
Example code to use it:
Code:
		moveq	#0,d2
		cmpi.w	#KS13,lib_Version(a6)
		bne.b	.skip
		move.l	#ColdCapture_code,ColdCapture(a6)
		move.w	d2,LowMemChkSum(a6)
		lea	SoftVer(a6),a0
		moveq	#$18,d0
.loop	        add.w	(a0)+,d2
		dbf	d0,.loop
		not.w	d2
		move.w	d2,LowMemChkSum(a6)	;checksum
This ColdCapture code is a one-shot because from what I remember ROM code clear ColdCapture vector after use.

Actually if I remember correctly the KS1.2 also suffers from the exact same bug, but Amigas with 1MB of chips-RAM and KS1.2 never existed...
ross is offline  
Old 11 September 2021, 23:14   #13
ross
Defendit numerus
 
ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
Quote:
Originally Posted by Photon View Post
OK, just what I was looking for. "We're gonna need a bigger Boot" (c) ...

What is a3/a5/a6 (mostly a5 if a6 is execbase)?
a6= execbase
a3= right top of chip-ram (and not the wrong $80000 hardcoded one)
a5= return code in ROM (the two offset define the faulty code to skip, and I re-enter with a correct a3).

Yes, is a dirty trick
ross is offline  
Old 11 September 2021, 23:16   #14
Photon
Moderator
 
Photon's Avatar
 
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,602
Ah. I thought the first few lines (and even the bchg can be removed) was the fix.

Too experimental for a correct bootblock I feel. If there's no other way, 1.3 users with >512KB chip must accept the KS bug.

And sorry for posting in this forum. I just switched kickstart to test software and got the bug, and knew 1.3 didn't on my real Amiga. Emulator is correct.
Photon is offline  
Old 11 September 2021, 23:27   #15
ross
Defendit numerus
 
ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
Quote:
Originally Posted by Photon View Post
Too experimental for a correct bootblock I feel. If there's no other way, 1.3 users with >512KB chip m
I bet setpatch -r doesn't do much differently than that.
Maybe it will use a lot of overbloated checks but I don't think there are many ways to fix a similar bug that happens in the very initial stages of the kickstart startup.
ross 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
Amiga 2000 No Chip Ram Detected stephenfalken support.Hardware 0 26 March 2019 09:12
Amiga 500 and 1 MB on chip RAM caiusfabricius Hardware mods 41 11 April 2018 01:16
Amiga A600 - 20K of chip RAM Toryglen-boy support.Hardware 49 09 June 2017 11:03
Amiga 1000 Chip RAM dansalvato support.Hardware 3 27 April 2010 07:43
[WANTED] 1 MB Chip Ram for Amiga 3000 666pinhead MarketPlace 8 11 December 2006 12:40

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 04:33.

Top

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