Jump to content
IGNORED

Trapping the RESET key while 16k cartridge is inserted


ndary

Recommended Posts

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

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

 

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...