Welcome, Guest. Please login or register.

Author Topic: Is this possible? (make a startup sequence skip something)  (Read 1543 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline Ral-ClanTopic starter

  • Hero Member
  • *****
  • Join Date: Feb 2006
  • Posts: 1979
  • Country: ca
    • Show all replies
    • http://www3.sympatico.ca/clarke-santin/
Is this possible? (make a startup sequence skip something)
« on: March 20, 2008, 03:51:10 PM »
Is it possible to write a startup sequence function so, during a warm re-boot, a command is NOT executed if it already has been during a previous boot?

Here is my problem:

1. The first thing my Startup-Sequence executes upon cold booting is ROMTAGMEM to initialise the 32MB of RAM on my 040 accelerator.  This file MUST be the first thing in the startup sequence to function.  Once executed the Amiga carries out a warm reboot.

2. Upon this warm reboot, the startup sequence executes again.  Next SETPATCH is encountered and installs the "AmigaOS ROM UPDATE" file from OS3.9.  This requires a second warm reboot.

3. Now...during THIS warm re-boot , when my Amiga encounters the ROMTAGMEM command at the top of the startup sequence, I get a crash and hanging grey screen.  I highly suspect that this is because the new exec.library from the "AMIGAOS ROM UPDATE" doesn't like ROMTAGMEM if it's executed AFTER SETPATCH.  

So, I need to prevent ROMTAGMEM from even being acknowledged after SETPATCH is executed.  

The only way I can think of doing this is with some sort of "IF...THEN" statement so that if ROMTAGMEM has already been executed, the Amiga will skip it entirely on a subsequent warm reboot.  Is this possible?  I've never done it before.

I'm thinking that a simple way to do it would be to activate a flag of some sort after ROMTAGMEM is executed the first time.  The flag could be something as simple as writing a small text file to the hard drive right after executing ROMTAGMEM for the first time.  Then in subsequent re-boots, {b]IF[/b] the file "xyz.txt" EXISTS, skip the ROMTAGMEM line in the startup-sequence.  At the very end of the startup sequence, after the Amiga has booted sucessfully, this test file "flag" can be deleted.

Something like this (please excuse my syntax, I know not what I am doing and it's just to give the idea):

STARTUP-SEQUENCE

IF FILE SYS:flag.txt exists THEN SKIP
   ROMTAGMEM 5 10 80000 (parameters here)
   PRINT "ROMTAGMEM ON" >SYS:FLAG.txt
END

C: SETPATCH >QUIET


...and so on....


I have never done anything like this before.  Maybe there is a better way.  I don't even know the proper syntax.
Music I've made using Amigas and other retro-instruments: http://theovoids.bandcamp.com
 

Offline Ral-ClanTopic starter

  • Hero Member
  • *****
  • Join Date: Feb 2006
  • Posts: 1979
  • Country: ca
    • Show all replies
    • http://www3.sympatico.ca/clarke-santin/
Re: Is this possible? (make a startup sequence skip something)
« Reply #1 on: March 20, 2008, 04:33:13 PM »
Thanks!  But what exactly does the "WARN" part of

IF WARN

do?
Music I've made using Amigas and other retro-instruments: http://theovoids.bandcamp.com
 

Offline Ral-ClanTopic starter

  • Hero Member
  • *****
  • Join Date: Feb 2006
  • Posts: 1979
  • Country: ca
    • Show all replies
    • http://www3.sympatico.ca/clarke-santin/
Re: Is this possible? (make a startup sequence skip something)
« Reply #2 on: March 20, 2008, 04:39:54 PM »
Comment removed because I realise you answered it in the previous post.
Music I've made using Amigas and other retro-instruments: http://theovoids.bandcamp.com