youki Posted April 14, 2014 Share Posted April 14, 2014 Hi, Related to my post here : http://atariage.com/forums/topic/216354-colecovision-megacart-faq/?p=2951137 Does somebody could give me a working example / tutorial , how i can produce a ROM for colecovision that use Bank Switching using Daniel librairies? As i said in the post, i managed to compile the Rom now , but it is not usable on a C.V. I guess it is due to some addressing configuration , or may be something to modify in the Daniel's libraries. Even a example using other libraries would be good. I plan may be exceptionaly to use a megacart for Ghost'n Zombie 2 , but as i have really not lot free time to make it, i would prefer invest the few time i have in Making the game, instead of figure out how to set up the development environment. thanks in advance! 1 Quote Link to comment Share on other sites More sharing options...
Kiwi Posted April 28, 2014 Share Posted April 28, 2014 One thing I may experiment with is making 16KB chuck of compiled codes and then combine it together using hexedit to make 128KB of ROM. Only thing I may have to built in assembly is pointer to the area of the memory that holds the label information that refer to the data I need to get. So I can use that in C to refer memory or run program on the other bank. I may experiment with that once I finish off some of the projects. Once I figure it out, I'll share it with the forums. Quote Link to comment Share on other sites More sharing options...
youki Posted April 29, 2014 Author Share Posted April 29, 2014 One thing I may experiment with is making 16KB chuck of compiled codes and then combine it together using hexedit to make 128KB of ROM. Only thing I may have to built in assembly is pointer to the area of the memory that holds the label information that refer to the data I need to get. So I can use that in C to refer memory or run program on the other bank. I may experiment with that once I finish off some of the projects. Once I figure it out, I'll share it with the forums. Yes, that's a good idea. I didn't not have time on my side to go further with my experiment. Real Life takes too much time... Another idea i had , but just a rough idea , Is to take the .ASM file generated by SDCC and analyse it and modify it by hand to put things at the right place. Then assemble it. Anyway if i find a solution , i will share also it on the forums. 1 Quote Link to comment Share on other sites More sharing options...
youki Posted September 8, 2014 Author Share Posted September 8, 2014 UP! Does somebody managed to use MegaCart with Daniel's Dev Kit? 1 Quote Link to comment Share on other sites More sharing options...
digress Posted September 8, 2014 Share Posted September 8, 2014 yes please. I would love to know how to break the 32Kb barrier as well using c language... of course we'll still need a supply of megacart or similar tech. I'd just like to get it working even if just to run it through the sd colecovision cart for my own personal amusement. UP! Does somebody managed to use MegaCart with Daniel's Dev Kit? Quote Link to comment Share on other sites More sharing options...
Kiwi Posted September 8, 2014 Share Posted September 8, 2014 Metoo. I keep finding ways to cut down on space. I need to work on getting Megacart working. I know the concept but don't know how to origin the data in C. Also, pointing the data in the new bank. I do need to experiment with the information provided by PpK. If I get Megacart stuff solve, then I'm good. Quote Link to comment Share on other sites More sharing options...
youki Posted September 8, 2014 Author Share Posted September 8, 2014 I tried with information provided by PKK . (see the referenced thread) , i can compile , all seems ok, but the ROM header is not at the right place in the rom binary, so it does not start Quote Link to comment Share on other sites More sharing options...
+nanochess Posted September 8, 2014 Share Posted September 8, 2014 I tried with information provided by PKK . (see the referenced thread) , i can compile , all seems ok, but the ROM header is not at the right place in the rom binary, so it does not start I don't have used SDCC, but there is a chance to insert assembly code in C? This way you could select each bank. In tniASM there is a feature where there are two directives ORG and FORG, ORG selects the location in 64K address space and FORG selects the location in file space. For a 128K megacart, the offsets from file are mapped this way: 0x0000-0x3fff - Bank 0. FORG $0000, ORG $C000 0x4000-0x7fff - Bank 1. FORG $4000, ORG $C000 0x8000-0xbfff - Bank 2, FORG $8000, ORG $C000 0xc000-0xffff - Bank 3, FORG $C000, ORG $C000 0x10000-0x13fff - Bank 4, FORG $10000, ORG $C000 0x14000-0x17fff - Bank 5, FORG $14000, ORG $C000 0x18000-0x1bfff - Bank 6, FORG $18000, ORG $C000 0x1c000-0x1cfff - Bank 7, FORG $1C000, ORG $8000 The bank 7 is always mapped at $8000-$BFFF and the switchable bank is always located at $c000-$ffff So your ROM header must be located at 0x1c000-0x1ffff in order to BlueMSX to map it correctly when you select Megacart mapper. Check the Pac-Man collection ROM for a sample. After ending my code section, I usually finish it with DS $10000-$,$FF (for segments starting in $c000) or DS $C000-$,$FF (for the segment starting in $8000) to fill the 16K block 1 Quote Link to comment Share on other sites More sharing options...
hardhat Posted September 8, 2014 Share Posted September 8, 2014 (edited) Thanks nanochess. That makes it much clearer. I do have a future project where this would be useful, so that gives me some motivation. I will definitely work with Daniel on a sample, and make sure I test it on the SD cart. The basic part is to get the code and objects all in the right places in the address space, and then in the right order in the image. So to make all of that work well, I'd have to change CCI3 to provide all of the link information for the type of megacart that you are making. I will reread what PKK posted in his original thread but I think I understand what needs to be done now. I don't currently have a megacart to try it on the real hardware. But if it works on the SD cart and in BlueMSX, it shouldn't be that hard to try it on the real cart. I do have a GAL programmer at least. There is more than one way to do everything, so perhaps someone else will come up with a sample before me. Edited September 8, 2014 by hardhat 2 Quote Link to comment Share on other sites More sharing options...
+nanochess Posted September 8, 2014 Share Posted September 8, 2014 I don't currently have a megacart to try it on the real hardware. But if it works on the SD cart, it shouldn't be that bad. But there is more than one way to do everything, so perhaps someone else will come up with a sample before me. Yep, the SD cart can handle the Megacart mapper upto 512 KB, but 128 KB should be enough to start. Quote Link to comment Share on other sites More sharing options...
digress Posted September 8, 2014 Share Posted September 8, 2014 you can always send me a test rom and I can run it on the Ultimate colecovision SD cart that I have. Thanks nanochess. That makes it much clearer.I do have a future project where this would be useful, so that gives me some motivation.I will definitely work with Daniel on a sample, and make sure I test it on the SD cart. The basic part is to get the code and objects all in the right places in the address space, and then in the right order in the image.So to make all of that work well, I'd have to change CCI3 to provide all of the link information for the type of megacart that you are making. I will reread what PKK posted in his original thread but I think I understand what needs to be done now.I don't currently have a megacart to try it on the real hardware. But if it works on the SD cart and in BlueMSX, it shouldn't be that hard to try it on the real cart. I do have a GAL programmer at least.There is more than one way to do everything, so perhaps someone else will come up with a sample before me. 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.