English Amiga Board


Go Back   English Amiga Board > Support > support.Games

 
 
Thread Tools
Old 17 May 2020, 12:24   #1
BarryB
Amigaholic

 
Join Date: Dec 2009
Location: UK
Posts: 3,319
A1200 Early Startup Control vs CPU to disable caches!

This is using WinUAE 4.2.1

What's the difference between using the A1200's 'Early Startup Control > Boot Options... > Disable CPU Caches' as opposed to using the cli command 'CPU nocache'?

I found an interesting issue with a game called Mousetrap! If I run it on the standard A1200 config in WinUAE the graphics are screwed up! if I use the A1200 Early Startup Control and use the 'Disable CPU Caches' option and boot, the game has no screwed up graphics!

However, if I add 'CPU nocache' as the first line of the startup-sequence and copy the CPU command to the ADF then boot, it doesn't work, graphics are still srcewed up?

So what is the difference? What does disabling the cpu caches in the Early Startup Control do that disabling via the CPU command doesn't?
BarryB is offline  
Old 17 May 2020, 20:17   #2
Nobby_UK
Registered User
Nobby_UK's Avatar
 
Join Date: Jul 2013
Location: Liverpool
Posts: 1,440
I would guess CPU (with that command)
does not disable ALL caches (Burst) but Early StartUp does ?
Nobby_UK is offline  
Old 17 May 2020, 20:59   #3
BarryB
Amigaholic

 
Join Date: Dec 2009
Location: UK
Posts: 3,319
Quote:
Originally Posted by Nobby_UK View Post
I would guess CPU (with that command)
does not disable ALL caches (Burst) but Early StartUp does ?
That's contradicting what the AmigaDOS manual says about the CPU command: NOCACHE | Turns off all caches.

And besides, I think the 68020 in the A1200 only has 1 cache, a 256 byte instruction cache, so maybe the CPU command isn't disabling the cache at all?

So I noticed there is something really strange going on with the Early Startup!! If I go into the Early Startup and boot with no startup-sequence then type in 'mousetrap' and hit enter, the game loads without screwed up graphics? The CPU command says the Instruction Cache is ENABLED? Just what the hell is going on here? Why does booting with no startup-sequence suddenly make the game work and suggests it's nothing to do with cpu caches at all?

Last edited by BarryB; 17 May 2020 at 21:20.
BarryB is offline  
Old 17 May 2020, 21:22   #4
BarryB
Amigaholic

 
Join Date: Dec 2009
Location: UK
Posts: 3,319
See my post above yours, was still testing when you replied!
BarryB is offline  
Old 17 May 2020, 21:27   #5
duga
Registered User
 
Join Date: Nov 2010
Location: Sweden
Posts: 415
Quote:
Originally Posted by Nobby_UK View Post
Here's what my emulated 1200 looks like to SysInfo
With CPU NoCache and without it and with Startup Disable:
Uhm, Burst shouldn't be enabled.

Try this on a real A1200 instead for real figures.
duga is offline  
Old 18 May 2020, 02:36   #6
Nobby_UK
Registered User
Nobby_UK's Avatar
 
Join Date: Jul 2013
Location: Liverpool
Posts: 1,440
Could not get it to Jump --- So useless

Going to try the WHD-load version

#Edit#
That works...

Last edited by Nobby_UK; 18 May 2020 at 02:42.
Nobby_UK is offline  
Old 18 May 2020, 08:54   #7
meynaf
son of 68k
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 47
Posts: 3,862
Quote:
Originally Posted by BarryB View Post
This is using WinUAE 4.2.1
That alone says it all : it has absolutely nothing to do with caches. As Winuae does not emulate 68020 caches.
It looks like merely calling the early startup control is enough. Perhaps the game needs some initial screen setup.
meynaf is offline  
Old 18 May 2020, 10:46   #8
hooverphonique
ex. demoscener "Bigmama"

 
Join Date: Jun 2012
Location: Fyn / Denmark
Posts: 1,102
What else do you have in your startup-sequence? Could be something related to AGA screen modes/registers.
hooverphonique is offline  
Old 18 May 2020, 11:20   #9
ross
Per aspera ad astra

ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 50
Posts: 2,628
Quote:
Originally Posted by meynaf View Post
Perhaps the game needs some initial screen setup.
This.
Game disable copper DMA and then setup chipset registers for the display with CPU.
Unfortunately it 'forgets' to set some that KS>3.0 has changed the way of use (in particular BLPxMODs).
Just by chance some BPLxMOD/FMODE combos make the screen configuration good on AGA..

There is really a need for a game fix? It's quite simple, if you want I can do it.
ross is offline  
Old 18 May 2020, 11:32   #10
BarryB
Amigaholic

 
Join Date: Dec 2009
Location: UK
Posts: 3,319
Quote:
Originally Posted by meynaf View Post
That alone says it all : it has absolutely nothing to do with caches. As Winuae does not emulate 68020 caches.
It looks like merely calling the early startup control is enough. Perhaps the game needs some initial screen setup.
Yes, I don't have my A1200 setup so have to use WinUAE, took the opportunity to update to 4.3.0 though! But, as I found out it doesn't appear to be a cache issue anyway, so does disabling caches stop them being used on the host CPU? The other question is, just WHAT is Early Startup doing that allows the game to work as just going into it and clicking 'Boot' without adjusting anything gets the game working, I just don't understand what Early Startup is doing?

Quote:
Originally Posted by hooverphonique View Post
What else do you have in your startup-sequence? Could be something related to AGA screen modes/registers.
This is what is in the original startup-sequence:

echo "MOUSETRAP is loading..."
echo "V1.0"
mousetrap

So nothing that would screw it up, but just doesn't work unless you go into Early startup and boot from there? Even tried using 'killaga' to run the mousetrap program but still screws up the graphics? Ah well, it's Amiga, so what do you expect

Quote:
Originally Posted by ross View Post
This.
Game disable copper DMA and then setup chipset registers for the display with CPU.
Unfortunately it 'forgets' to set some that KS>3.0 has changed the way of use (in particular BLPxMODs).
Just by chance some BPLxMOD/FMODE combos make the screen configuration good on AGA..

There is really a need for a game fix? It's quite simple, if you want I can do it.
You posted while I was still replying So like meynaf said, it does some initialising that booting normally doesn't do then? It's the same issue on A500+/A600 but no Early Startup on them, if you want to fix it please do, ADF in the Zone

Last edited by BarryB; 18 May 2020 at 11:45.
BarryB is offline  
Old 18 May 2020, 12:36   #11
meynaf
son of 68k
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 47
Posts: 3,862
Quote:
Originally Posted by BarryB View Post
Yes, I don't have my A1200 setup so have to use WinUAE, took the opportunity to update to 4.3.0 though! But, as I found out it doesn't appear to be a cache issue anyway, so does disabling caches stop them being used on the host CPU?
Disabling caches on the emulated machine has absolutely no effect on the host cpu's caches. This would only slow it down to a crawl anyway.


Quote:
Originally Posted by BarryB View Post
The other question is, just WHAT is Early Startup doing that allows the game to work as just going into it and clicking 'Boot' without adjusting anything gets the game working, I just don't understand what Early Startup is doing?
It is displaying something, i.e. doing some proper initialization of the display hardware.


Quote:
Originally Posted by BarryB View Post
It's the same issue on A500+/A600 but no Early Startup on them
Unless my memory betrays me, A600 has kick 2.05 and thus it does have Early Startup Control.
meynaf is offline  
Old 18 May 2020, 13:06   #12
Fastdruid
Registered User
 
Join Date: Apr 2020
Location: UK
Posts: 144
A500+ has Early Startup Control, although no cache option, it's merely an option where to boot from.
Fastdruid is offline  
Old 18 May 2020, 13:33   #13
BarryB
Amigaholic

 
Join Date: Dec 2009
Location: UK
Posts: 3,319
Quote:
meynaf: Disabling caches on the emulated machine has absolutely no effect on the host cpu's caches. This would only slow it down to a crawl anyway.
OK, if WinUAE has no cache emulation (I just read a post where Toni says it would actually slow emulation down) I guess any cache issues just won't show up in WinUAE?
Quote:
meynaf: It is displaying something, i.e. doing some proper initialization of the display hardware.
Yeah, strange that it doesn't do this 'initialising' when you first power on the A1200 and have to go into the Early Startup!
Quote:
meynaf: Unless my memory betrays me, A600 has kick 2.05 and thus it does have Early Startup Control.
Yes, A500+ and A600 have a some form of the A1200 Early Startup but going into them still won't allow Mousetrap to work like it does on the A1200! So as ross explained, it's doing some setup that just happens to let this game run!
BarryB is offline  
Old 18 May 2020, 14:32   #14
meynaf
son of 68k
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 47
Posts: 3,862
Quote:
Originally Posted by BarryB View Post
OK, if WinUAE has no cache emulation (I just read a post where Toni says it would actually slow emulation down) I guess any cache issues just won't show up in WinUAE?
That depends why caches had to be disabled at first place. If it's because it makes the cpu too fast, then issues can show up in winuae too.


Quote:
Originally Posted by BarryB View Post
Yeah, strange that it doesn't do this 'initialising' when you first power on the A1200 and have to go into the Early Startup!
I see no reason to do this explicitly : any correctly made screen setup is enough.
meynaf is offline  
Old 18 May 2020, 18:27   #15
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 45
Posts: 23,905
68020 cache is emulated in more accurate modes. ("more compatible" must be ticked and also memory cycle-exact to emulate chipset DMA slowing down CPU memory accesses). Even 68040+ caches are emulated but it is mainly meant for making (for example) self-modifying code work mostly identically on real hardware and emulation.

Even if 68020 internal timing is unknown (can't be perfect and there is still lots of work to do), it can make a huge difference in speed when system is chip ram only.
Toni Wilen is online now  
Old 18 May 2020, 19:33   #16
ross
Per aspera ad astra

ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 50
Posts: 2,628
Quote:
Originally Posted by BarryB View Post
.. if you want to fix it please do, ADF in the Zone
Ok, I'll take a look.
ross is offline  
Old 18 May 2020, 20:15   #17
BarryB
Amigaholic

 
Join Date: Dec 2009
Location: UK
Posts: 3,319
Quote:
Originally Posted by Toni Wilen View Post
68020 cache is emulated in more accurate modes. ("more compatible" must be ticked and also memory cycle-exact to emulate chipset DMA slowing down CPU memory accesses). Even 68040+ caches are emulated but it is mainly meant for making (for example) self-modifying code work mostly identically on real hardware and emulation.

Even if 68020 internal timing is unknown (can't be perfect and there is still lots of work to do), it can make a huge difference in speed when system is chip ram only.
I always use Cycle Exact and have the slider all the way to to the left on Best Compatibility in Quickstart, nice to know the 68020 cache is emulated with those settings, thanks Toni!

Quote:
Originally Posted by ross View Post
Ok, I'll take a look.
When you get a moment ross, no rush!
BarryB is offline  
Old 19 May 2020, 16:24   #18
ross
Per aspera ad astra

ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 50
Posts: 2,628
Done.

To make things a little more interesting I added a trainer, fixed the display glitches and packed the game into a single file.

Attached. Yes, 71.6 KB for the full game
Works in every Amiga (tested in different configurations and processors with WinUAE).

Joy button/spacebar to start game, mouse button to start in trainer mode.

Cheers.
Attached Files
File Type: 68k mousetrap.68k (71.6 KB, 16 views)
ross is offline  
Old 19 May 2020, 17:37   #19
indigolemon
Bit Copying Bard

indigolemon's Avatar
 
Join Date: Jan 2017
Location: Kelty, Fife, Scotland
Age: 37
Posts: 871
Confirmed working on my 060 1200 - nice work
indigolemon is online now  
Old 19 May 2020, 19:40   #20
BarryB
Amigaholic

 
Join Date: Dec 2009
Location: UK
Posts: 3,319
Quote:
Originally Posted by ross View Post
Done.

To make things a little more interesting I added a trainer, fixed the display glitches and packed the game into a single file.

Attached. Yes, 71.6 KB for the full game
Works in every Amiga (tested in different configurations and processors with WinUAE).

Joy button/spacebar to start game, mouse button to start in trainer mode.

Cheers.
Single filed, trained and works on ALL cpu's, that's just freakin' AWESOME, thanks

So what packer did you use?
BarryB 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
How to disable caches using MOVEC => CACR jotd Coders. Asm / Hardware 12 07 November 2017 20:45
WinUAE 3.0 Amiga Early Startup Control Issue Steve support.WinUAE 5 04 January 2015 00:59
Mediator early-startup screen Bamiga2002 support.Hardware 33 11 November 2011 19:33
how to disable Blizzard MK III at startup klx300r support.Hardware 9 17 September 2008 05:36
WinUAE 0.99: how to disable rom scanning at startup ? Leo42 support.WinUAE 6 07 August 2004 14:45

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 21:47.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Page generated in 0.14963 seconds with 16 queries