ndary Posted April 7, 2023 Share Posted April 7, 2023 What is the best method of trapping the RESET key press while a 16k/8K cartridge is inserted. (So that pressing the reset button will not go through the cartridge initialisation procedure while it still inserted)? without modifying the Atari OS Quote Link to comment Share on other sites More sharing options...
Rybags Posted April 7, 2023 Share Posted April 7, 2023 Can't be done in most game circumstances. CASINI and DOSINI will be called if their flags are set before the cartridge is run but after it has been initialised. But the problem you could face is that an inserted cartridge can prevent tape and disk boot. Generally, language cartridges allow boot to take place. For your own purposes you can steal the CASINI or DOSINI vector, probably best to preserve the existing value and indirect JSR to it if the relevant flag is already set. The OS manual describes system initialization and the order in which such vectors are called. You can't prevent the cart init vector being called but if your tape/disk init routine doesn't return then you can prevent the cartridge run from occurring. Quote Link to comment Share on other sites More sharing options...
Wrathchild Posted April 7, 2023 Share Posted April 7, 2023 This shouldn't be an issue as RAM is not wiped. So most code will set a memory location as a flag that initialisation of the cartridge has taken place and so the init code checks this and bypasses accordingly. E.g. CartInit: BIT IsInitDone BMI InitDone ... // init code here ... SEC ROR IsInitDone InitDone: RTS Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.