Jump to content
IGNORED

WUDSN IDE: How to create an bank switched ROM?


JAC!

Recommended Posts

I was asked how to create a 1 MB ROM file directly from MADS so you can test is in emulators and on The!Cart.

There are a number of difficulties in this, so I decided to create an example and post it here for references.

Maybe I'll also create a tutorial out of it. If you have questions, feel free to ask.

 

Atarimax-Maxflash-1MB.asm

Edited by JAC!
  • Like 6
  • Thanks 1
Link to comment
Share on other sites

Cool!

 

For Wudsn and Altirra this executing commandline works fine:

${runnerExecutablePath} /singleinstance ${outputFilePath} /cartmapper 42

The compiletime for this is about 5 seconds on a 4.5 GHz i7 machine. So this can take a bit longer on a netbook :-)

Link to comment
Share on other sites

  • 3 months later...
  • 1 year later...

I'm just trying to understand the code from this.

 

I was wondering... lets say a game is written around this example, how would you for example switch in bank 68?

 

As I have never programmed a cartridge game before, does cartridge programs typically copy a few banks into normal non-cartridge memory at startup?

 

For example, if I have a 12K program which normally starts at say $2000, would I need some code to copy that 12K of normal program into that space?

  • Like 1
Link to comment
Share on other sites

A) how would you for example switch in bank 68?

 

B) does cartridge programs typically copy a few banks into normal non-cartridge memory at startup?

 

C) if I have a 12K program which normally starts at say $2000, would I need some code to copy that 12K of normal program into that space?

ad A) lda $d500+68 ;Activate bank 68, for Atarimax any kind of read access to address $d500-$df75 the $d5xx activates bank $xx. Reading $d580-$d5ff deactivates the cartridge.

 

ad B) If the program requires more than one bank, normally yes. Otherwise (i.e. if you run directly from the cart) you'd have the problem that the moment you a switch the bank, the code continues at the same address in the next/other bank. That's too hard to handle and something you only do on the Atari VCS where RAM (128 bytes) is too precious to put code there.

 

ad C) That depends on if you use the complete module for your own program, or if you use AtariMax MaxFlash Studio and it's menu system. The MaxFlash Studio has a menu and a "loader" in the first few banks. And it can just put multiple regular .XEX/.COM files in the remaining banks. The loader then copies the .XEX segments from the banks to the RAM, just like DOS would copy them from disk to the RAM. Hence if you use that, you can put just any DOS executable on the cart. The menu system even supports autostart for an entry, so you dont even see it if you want.

 

The point is that if you really do massive data transfer from the ROM/have more data that can fit into the RAM, then you would start handling the bankswitching yourself.

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...