It is currently Tue Jan 23, 2018 2:53 am

All times are UTC - 5 hours




 Page 1 of 1 [ 4 posts ] 
Author Message
 Post subject: Turn the cart off
PostPosted: Mon Feb 06, 2006 9:45 pm 

Joined: Sat Sep 13, 2003 12:21 am
Posts: 251
Hi Steve,

I ran into a small problem, that I think would be easy to fix. Basically using the following command-line (for flashing a cartridge for use with MyIDE that doesn't run UNLESS you press option):

perl maxflash.pl -EXEPACKER -MYIDE -REVERSE -FLASHER <directory of exes>

When you boot the computer, the cartridge loads and goes to leave_now, but the cartridge is still on (causing havoc to programs that try to use the $A000 memory.)

We could fix it like so:

leave_now       lda cartoff
         rts


but that might cause problems when we don't use the -REVERSE option. Maybe something like this:

leave_now
#IFDEF REVERSE
      lda cartoff
#ENDIF
      rts


I don't know if we then need to make any other changes to memtop, ramtop, or any of those.... but these changes above allow my program that uses the $A000 space to work.


Offline
 Profile  
 
 Post subject:
PostPosted: Tue Feb 07, 2006 3:07 am 
ERROR AT LINE 0
User avatar

Joined: Tue Aug 05, 2003 9:55 am
Posts: 1035
Location: Cleveland, Ohio
Its terrible to go back and look at stuff I've written years ago. It takes forever just to remember what everything does. :)

Wouldn't this crash the Atari, since you are executing out of cartridge rom when you turn the cartridge off?

Steve


Offline
 Profile  
 
 Post subject:
PostPosted: Wed Feb 08, 2006 8:34 pm 

Joined: Sat Sep 13, 2003 12:21 am
Posts: 251
Hmmm, yeah it should. However it seemed to work for me.

I'll make a better patch that jumps to code in RAM then. Do you agree that the cart should be turned off at this point?

What about the normal behaviour of the option key, would turning the cart off here interfere with the flash program?


Offline
 Profile  
 
 Post subject:
PostPosted: Thu Feb 09, 2006 12:27 am 
ERROR AT LINE 0
User avatar

Joined: Tue Aug 05, 2003 9:55 am
Posts: 1035
Location: Cleveland, Ohio
Yeah strange that it works, also strange that it doesnt lock up the computer when it sees the cartridge is missing. Are you testing in the emulator?

The flashing should still work fine as long as control is finally passes back to the OS by rts.

You would need to do all this before returning control to the OS by rts:

disable vbi
cart off
update memory size in various places (you will be 8k short because rom was detected at initialization)
update trig shadow
enable vbi
rts

Steve


Offline
 Profile  
 
Display posts from previous:  Sort by  
 Page 1 of 1 [ 4 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

cron