🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #2901

Re: Writing to WCS

#2901
From: Hans Ridder
Date: Tue, 23 Jan 1990 05:06
52 lines
2397 bytes
In article <20011@watdragon.waterloo.edu> mwandel@tiger.waterloo.edu (Markus Wandel) writes:
>In article <90012003501244@masnet.uucp> david.evans@canremote.uucp (DAVID EVANS) writes:
>>
>>  I realise this falls into the "weird stuff", and probably "heavy 
>>magic" catagory, but how do you enable the WCS on the A1000 for writing?
>
>Run the following through any assembler and Blink:
>
>		lea     bootcont,a0
>		move.l	a0,$80
                           ^^^-----------Ack! Pounding the autovectors!
>		trap	#0
>bootcont:
>		move.l	$fc0004,a0
                         ^^^^^^----------Cough! Jumping to ROM!
>		jmp	-2(a0)
>		end
>

I'm not trying to flame you, and I know you said it was unsupported,
but there is a supported way to do this.

The *new* Hardware Reference Manual, page 219 says that the only
supported way to reset the Amiga (and thus write enable the KickStart
RAM on the 1000) is:

_ColdReboot:
	MOVE.L	4,(A6)			; Get pointer to ExecBase
	LEA.L	MagicResetCode(PC),A5	; Location of reset code
	JSR	_LVOSupervisor(A6)	; Start code in supervisor mode

; The *only* supported reboot code
	CNOP	0,4		; IMPORTANT: Must be longword aligned
MagicResetCode:
	LEA.L	2,A0		; Point to JMP instruction at start of ROM
	RESET			; All RAM goes away now!
	JMP	(A0)		; Rely on prefetch to execute this instruction

Apparently, you only need the first riff (_ColdReboot) if you are in
user mode.  If you are already in supervisor mode, just use the second
part.

I have never done this.  It's just documented in the book this way!

>Markus Wandel
>mwandel@tiger.waterloo.edu

-hans
========================================================================
  Hans-Gabriel Ridder			Digital Equipment Corporation
  ridder@elvira.enet.dec.com		Customer Support Center
  ...decwrl!elvira.enet!ridder		Colorado Springs, CO
Technical Details
Message-ID: <629@shodha.dec.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!tut.cis.ohio-state.edu!ucbvax!decwrl!shlump.nac.dec.com!shodha.dec.com!elvira!ridder
References: <90012003501244@masnet.uucp> <20011@watdragon.waterloo.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!tut.cis.ohio-state.edu!ucbvax!decwrl!shlump.nac.dec.com!shodha.dec.com!elvira!ridder
From: ridder@elvira.enet.dec.com (Hans Ridder)
Newsgroups: comp.sys.amiga.tech
Subject: Re: Writing to WCS
Message-ID: <629@shodha.dec.com>
Date: 23 Jan 90 05:06:47 GMT
References: <90012003501244@masnet.uucp> <20011@watdragon.waterloo.edu>
Sender: news@shodha.dec.com
Organization: Digital Equipment Corporation, Customer Support Center
Lines: 52