PkK Posted February 24, 2017 Share Posted February 24, 2017 I'm working on a bank-switching cartridge (originally intended for Tunnels & Trolls). It has 512 KB of Flash ROM. I've decided to use a layout like this: Common area 0: Directly mapped to the lower part of the cartridge. Meant for frequently-used code and data, standard library, etc. Bank area: Mapped to a selectable location on the cartridge Common area 1: Mapped to a selectable location on the cartridge Having two mappable areas allows e.g. for code from one bank to read data from another bank. This layout and the names are inspired by the Z180. How big should these areas be? Personally, I prefer a large common area 0, allowing large parts of the code to be placed there. Therefore the current prototype firmware used a 24 KB common area 0, a 4 KB bank area, a 4 KB common area 1. On the other hand, having larger mappabe areas would allow for larger arrays in mapped memory, and would allow more efficient use of mapped memroy for code (since objects in mapped memory are difficult to handle if they cross bank boundaries). What's do you think? Philipp Quote Link to comment Share on other sites More sharing options...
digress Posted February 24, 2017 Share Posted February 24, 2017 my current project is 16kb permanent and 16kb bankable as far as i know all the current bigger than 32kb roms use this method so it would be most compatible and useful to use that standard. i see your point as it would be nice to have a larger 24kb permanent area but you get used to it. 1 Quote Link to comment Share on other sites More sharing options...
youki Posted February 24, 2017 Share Posted February 24, 2017 for me the important thing is to have an emulator that support the format. Currently BlueMSX (and i think coolCV) support the mega cart format. Which is i think 16k permanent , 16kb switchable. But indeed i think it would be better to have 24k permanant and 8k switchable. But if no emulator support it , i could not use it. Quote Link to comment Share on other sites More sharing options...
JamesD Posted February 24, 2017 Share Posted February 24, 2017 I wouldn't have less than 8K banks, there's not really any point in going smaller. Quote Link to comment Share on other sites More sharing options...
PkK Posted February 24, 2017 Author Share Posted February 24, 2017 I wouldn't have less than 8K banks, there's not really any point in going smaller. But for accessing banked data from banked code, one wants two areas. If each is 8KB, that leaves only 16KB for the common area 0. Philipp P.S.: The bank sizes are not hardwired; I intended to offer the kit with different firmware for different bank sizes. Maybe I should even look into allowing to change the bank size at runtime. Quote Link to comment Share on other sites More sharing options...
artrag Posted February 25, 2017 Share Posted February 25, 2017 (edited) 16KB permanent, 16KB+16KB mapped in banks, 16K of ram Edited February 25, 2017 by artrag Quote Link to comment Share on other sites More sharing options...
PkK Posted February 25, 2017 Author Share Posted February 25, 2017 16KB permanent, 16KB+16KB mapped in banks, 16K of ram Can't do that in a CV cartridge (would be possibleusing the expansion port though). Philipp Quote Link to comment Share on other sites More sharing options...
Kiwi Posted February 26, 2017 Share Posted February 26, 2017 Currently I am able to build a 128KB ROM using AlekMaul tutorial. Right now, 16KB fixed and 16KB switchable is my current setup. Quote Link to comment Share on other sites More sharing options...
artrag Posted February 27, 2017 Share Posted February 27, 2017 If the window for the coleco cartridges is 32KB maybe it is better to have 16k permanent 8+8k banked 32k ram Quote Link to comment Share on other sites More sharing options...
artrag Posted February 27, 2017 Share Posted February 27, 2017 Having two mapped banks allows paged code to use paged data. Quote Link to comment Share on other sites More sharing options...
PkK Posted February 27, 2017 Author Share Posted February 27, 2017 If the window for the coleco cartridges is 32KB maybe it is better to have 16k permanent 8+8k banked 32k ram RAM is not that easy either. The cartridge slot doesn't have a read or write line. There is no easy way to distinguish between read and write accesses. If one really wanted to add RAM, I guess one could use one of the address lines for that, i.e. map 8 KB of RAM into a 16 KB window. Then e.g. the value written at address x could be read from address x + 16384. I guess compiler support for such an architecture would be unlikely though. Again, the expansion port makes it easy to add RAM. Philipp 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.