Path: utzoo!utgpu!watserv1!watdragon!tiger!mwandel From: mwandel@tiger.waterloo.edu (Markus Wandel) Newsgroups: comp.sys.amiga.tech Subject: Re: Writing to WCS Summary: Trivial Message-ID: <20011@watdragon.waterloo.edu> Date: 20 Jan 90 20:01:49 GMT References: <90012003501244@masnet.uucp> Sender: daemon@watdragon.waterloo.edu Reply-To: mwandel@tiger.waterloo.edu (Markus Wandel) Organization: U. of Waterloo, Ontario Lines: 44 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 trap #0 bootcont: move.l $fc0004,a0 jmp -2(a0) end Then wait for all disk updates to complete and run it. Poof, Amiga reboots with WCS accessible for writing. Works by kicking the CPU into supervisor mode (using the TRAP instruction), then fetching the address where the CPU would normally begin running the kickstart code at. Like magic, in both 1.2 and 1.3 there is a "RESET" instruction directly before this code, so that's where we jump to. What happens is that all hardware in the machine gets reset except the CPU. Autoconfigured memory vanishes, chip memory goes poof, but the WCS stays around and so the 68000 goes on running. It goes through a standard boot up, reconfiguring autoconfig memory and all other hardware, but *not* write-protecting the WCS, as this apparently gets done by the ROMs which do powerup diagnostics and load the Kickstart disk, which have been bypassed in this case. If you boot from floppy anyway, just find someone who has AMAX and get them to run the "BootBlockRestore" program on your boot disk. This creates a boot block which does the same thing, so your machine *always* has the WCS enabled when booted from that disk. Disclaimer: The above is not BY ANY MEANS a supported standard programming practice on the Amiga. It works now. It depends on the "RESET" instruction in Kickstart. If it goes away with 1.4, it won't work any more. Markus Wandel mwandel@tiger.waterloo.edu (519) 884-9547