English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General

 
 
Thread Tools
Old 09 June 2015, 23:35   #1
wilsonsamm
 
Posts: n/a
Amiga hardware reset

How does this work? The 68k reads the values starting from 0x000000000 to initialise SSP and PC, but the amiga has Chip RAM there, which is presumably uninitialised.
 
Old 10 June 2015, 09:24   #2
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 43
Posts: 21,880
Hardware reset overlays KS ROM over chip RAM, initial PC and SP will come from beginning of KS ROM. (Early boot code then disables it with CIA access)
Toni Wilen is online now  
Old 10 June 2015, 11:28   #3
phx
Natteravn

phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 1,185
The official software reset routine is like this:
Code:
        cnop    0,4
        lea     2.l,a0
        reset
        jmp     (a0)
The RESET instruction resets the hardware and makes the ROM appear at $0. The JMP to the reset-vector is prefetched and can be executed even though the code may be in Chip RAM.

Note that this reset routine does currently not work on the Minimig.
phx is offline  
Old 10 June 2015, 13:12   #4
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 2,961
Won't that routine not work, because the RESET instruction isn't longword-aligned?
mark_k is offline  
Old 10 June 2015, 13:18   #5
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 43
Posts: 21,880
It makes no difference, it was never needed.

68000/10 always prefetches next word (prefetch does not care about long alignment, it was simply wrong assumption), 68020+ prefetches at least 1 long word which is always aligned to long but it does not matter, next word is always part of the long fetch anyway.
Toni Wilen is online now  
Old 11 June 2015, 13:48   #6
phx
Natteravn

phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 1,185
Indeed. And I always thought the longword-alignment was needed for 68020+.
phx is offline  
Old 20 June 2015, 10:43   #7
TheDarkCoder
Registered User
 
Join Date: Dec 2007
Location: Dark Kingdom
Posts: 211
Quote:
Originally Posted by phx View Post
The official software reset routine is like this:
Code:
        cnop    0,4
        lea     2.l,a0
        reset
        jmp     (a0)
The RESET instruction resets the hardware and makes the ROM appear at $0. The JMP to the reset-vector is prefetched and can be executed even though the code may be in Chip RAM.

Note that this reset routine does currently not work on the Minimig.
Excuse me, I am not sure: the jmp (a0) then jumps to code in chip RAM or in ROM?
TheDarkCoder is offline  
Old 20 June 2015, 11:18   #8
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 43
Posts: 21,880
Quote:
Originally Posted by TheDarkCoder View Post
Excuse me, I am not sure: the jmp (a0) then jumps to code in chip RAM or in ROM?
It jumps to chip RAM address (2) which was overlayed with ROM mirror (Data comes from f80002). Reset enables ROM overlay.
Toni Wilen is online now  
Old 20 June 2015, 12:32   #9
Retrofan
Ruler of the Universe

Retrofan's Avatar
 
Join Date: Mar 2010
Location: Lanzarote/Spain
Posts: 5,992
Excuse me: I always have to press A-A-Ctrl with my Amiga with a Fast ATA. I've tried all kind of reboot/reset programs without sucess.

Coudn't it be made a better program?
Retrofan is offline  
Old 20 June 2015, 12:43   #10
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 43
Posts: 21,880
Quote:
Originally Posted by Retrofan View Post
Excuse me: I always have to press A-A-Ctrl with my Amiga with a Fast ATA. I've tried all kind of reboot/reset programs without sucess.

Coudn't it be made a better program?
It looks like FastATA (which version?) fails to detect CPU generated reset signal (very short pulse) and only resets itself with hardware reset (long reset signal).

AFAIK you can't generate hardware reset from software, at least without extra hardware.

FastATA probably have some register that can be used to reset it if someone bothers to find out how it works. (I guess I'll have to emulate it some day..)
Toni Wilen is online now  
Old 20 June 2015, 13:18   #11
Retrofan
Ruler of the Universe

Retrofan's Avatar
 
Join Date: Mar 2010
Location: Lanzarote/Spain
Posts: 5,992
I've got a nice program, "Reboot Start" that I use for launching ScummVM AGA, as it doesn't work with CyberbugFixAga. Unfortunately as I can't reboot, Reboot Start can't work. It works on WinUAE, though. You can try it (AmiKit:Games/ScummVM/Reboot-Start).

Reboot Start can also work for example with PT1210, and it's possible that using Reboot Start the authors maybe could reconsider include it on AKReal as long as it woudn't run from WB but from booting so it would have all of the available ram.

But unfortunately the Fast-ATA surely isn't the cause (I shoudn't have mentioned it), as recently I've seen it also happens without it. It's something in my setup that needs a longer reset.
Retrofan is offline  
Old 20 June 2015, 14:41   #12
daxb
Registered User
 
Join Date: Oct 2009
Location: Germany
Posts: 2,041
Yes, FastATA hasn`t problems with reset. Its more or less simple to catch the causer of reset problem. Start without S-S and launch a reset tool and see if it works. If yes, start S-S to some point and try again until you find the place it doesn`t work more. I had a software hardreset freeze what was cause by RemApollo (MuDrap) with mmu.library. Happily THOR fixed it.
daxb is offline  
Old 20 June 2015, 15:48   #13
Retrofan
Ruler of the Universe

Retrofan's Avatar
 
Join Date: Mar 2010
Location: Lanzarote/Spain
Posts: 5,992
Sorry I was telling what I thought. But now I've tried it.

In my A1200/ACA1231-42 (anything else), using AKReal it always reboots with software, but using Reboot-Start always hangs the reboot.

In my A1200/1230-56/Fast ATA MKIV (appart only an unused CD player) using AKReal it never reboots with software.

So I think there are two problems: the way Reboot-Start reboots on real hardware and the Fast ATA.

Last edited by Retrofan; 20 June 2015 at 17:15.
Retrofan is offline  
Old 20 June 2015, 17:13   #14
daxb
Registered User
 
Join Date: Oct 2009
Location: Germany
Posts: 2,041
You just have to find out. Try the way I described (yes it is lazy work). If you think the FastATA is the reason then just "disable" it temporary by comment out ata3.driver in your S-S. If you run acatune then I would check that too.
daxb is offline  
Old 20 June 2015, 17:27   #15
Retrofan
Ruler of the Universe

Retrofan's Avatar
 
Join Date: Mar 2010
Location: Lanzarote/Spain
Posts: 5,992
I've just disabled both from the s-s and it keeps hanging with a reboot (power light blinking). I think anyway that although disabled from the s-s the Fast ATA MKIV has something to be.

Remember the other Amiga is running the same AKReal program, all the same (edit: but the screenmode).

Edit: I've just tried with my amiga/fast ATA with ColdReboot and it doesn't hang, but it takes me to the insert floppy screen of 3.9Rom.

My reset problem may be caused by my screenmode, HighGFX:

"Ever had a problem with a soft reboot program that uses ColdReboot()? Well,
this routine in V39 is broken, and if you reboot from DblPAL or Multiscan,
for example, the machine usually freezes."

Edit2: No, it hangs the same with Pal High Res Laced that I use in the other miggy.

Last edited by Retrofan; 20 June 2015 at 18:45.
Retrofan 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
AmiKit PCMCIA Hardware Reset Fix for A1200 eva Hardware mods 37 15 February 2016 18:48
Vintage Hardware Adverts on the Amiga Hardware Database thals News 4 21 October 2014 18:00
Hardware to fix A1200 PCMCIA reset bug Calgor support.Hardware 13 27 December 2011 14:27
Amiga Reset markpage support.WinUAE 5 09 June 2011 20:00
Cannot soft reset Amiga 1200 KTC support.Hardware 8 17 December 2008 15:18

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 19:22.


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