Jump to content
IGNORED

Example on using MADS to create a cartridge image?


Recommended Posts

Recently I decided to try to get my 39 year old Atari computer up and running again, and to write some original assembly language programs for it.  A few years ago I did some Atari 2600 programming using the p65 assembler and stella, but this time I decided to go ahead and use MADS.  I have been able to generate appropriate XEX images, but it isn't clear to me how to generate the appropriate binary cartridge images for the Atari 400.  I know I need to set the origin to $A000 and setup the appropriate jump addresses and the like at the end of the 8K, but what ORG magic is required to keep it from generating the segmented load files, and instead just generate a flat bin memory dump of the 8k?

  • Like 1
Link to comment
Share on other sites

I don't believe I have had the Atari 400 on in over 25 years, but less than 30 years.  I also have a 130XE that was last used about the same time.  Both work.   I've been unable to get my Atari 810 to work so far, but I did construct a SIO2USB cable and have been using RespeQt to load code onto it and run.  https://brainwagon.org/2019/09/29/bringing-back-my-atari-400/

Link to comment
Share on other sites

The OS manual has an explanation of cartridge processing in the coldstart/warmstart description.

 

The operative things to worry about with a left cartridge:

- flag at $BFFC should be 00 which siginfies a cartridge (Ram will usually have random data there and the OS does other checks to ensure it's Rom)

- flag at $BFFD describes if the cart is a diag mode (high bit set) and whether it should allow a disk boot to take place (bit 0 set)

- INIT vector is at $BFFE, RUN vector is at $BFFA

 

Exception is diag cart where RUN is through $BFFE and no return is expected.

Generally you'd want to create a non-diag cart and not allow disk booting in games.

The problem with using diag mode is you get an indeterminite system environment where no Ram is cleared or OS initialization has taken place and have to do these things yourself, using up valuable space.

 

A trick that some later games use is to operate as a normal cart, disable disk boot and just take control from the INIT process and don't return.

That way you get an initialized system (though no screen is yet opened)

  • Like 2
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...