+JAC! Posted September 19, 2014 Share Posted September 19, 2014 (edited) 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 September 19, 2014 by JAC! 6 1 Quote Link to comment Share on other sites More sharing options...
1NG Posted September 19, 2014 Share Posted September 19, 2014 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 :-) Quote Link to comment Share on other sites More sharing options...
+JAC! Posted September 19, 2014 Author Share Posted September 19, 2014 Played around a bit - Update that takes <1s to compile by replacing ":8192 .byte $00" by ".SAV 8192". MADS rulez :-) 1 Quote Link to comment Share on other sites More sharing options...
8Bitjunkie Posted January 6, 2015 Share Posted January 6, 2015 Fan-fan-fantastic!Thanx a lot for this :-) so, it is possible to fill this one with the big version :-) Quote Link to comment Share on other sites More sharing options...
snicklin Posted November 20, 2016 Share Posted November 20, 2016 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? 1 Quote Link to comment Share on other sites More sharing options...
+JAC! Posted November 22, 2016 Author Share Posted November 22, 2016 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. Quote Link to comment Share on other sites More sharing options...
snicklin Posted November 27, 2016 Share Posted November 27, 2016 Super, you've been really helpful here. I'm just trying to get my ahead around cartridge programming as I've never seen a really good resource with this kind of information, especially with all the new cartridge formats that exist. 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.