atarionline.pl How to detect DOS - Forum Atarum

Jeśli chcesz wziąć udział w dyskusjach na forum - zaloguj się. Jeżeli nie masz loginu - poproś o członkostwo.

  • :
  • :

Vanilla 1.1.4 jest produktem Lussumo. Więcej informacji: Dokumentacja, Forum.

    • 1: CommentAuthorrudla
    • CommentTime2 Mar 2010
     
    How can I detect, that an application was loaded from DOS?

    I would like an application to return to DOS, when there is a DOS, but end in infinite loop, if there is no DOS (for example if it was started in emulator by loading XEX directly).
    • 2:
       
      CommentAuthorjhusak
    • CommentTime2 Mar 2010 zmieniony
     
    The simple solution is to check BOOT?
    register ($09). 1 - drive boot succeed, 2 - cas boot succeed, 3 - both.

    The more elegant solution is to check hatabs table ($31a) for "D" entry. After bare boot there is only P, C, E, S, K handlers. After booting dos, the device "D" appears.

    Sometimes game was booted using some kind of disk loader, or game boots directly from disk (whole-disc game) - I'd prefer then check BOOT? register. It depends what do you want to check.
    • 3: CommentAuthorrudla
    • CommentTime2 Mar 2010
     
    Basically, I need to know, whether last RTS in application will start DUP.SYS or reboot the machine.

    When I load XEX in emulator, there is 1 in $09.
    • 4: CommentAuthormono
    • CommentTime3 Mar 2010
     
    Correct return from application is the jmp (dosvec) - not rts. You can't worry about dos then.
    By default OS set dosvec to $e471 (self test jump at system jump table).