Jump to content

Photo

What's the best bank sizes for a bankswitching cartridge?


10 replies to this topic

#1 PkK OFFLINE  

PkK

    Moonsweeper

  • 463 posts
  • Location:Europe

Posted Fri Feb 24, 2017 5:50 AM

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

 



#2 digress OFFLINE  

digress

    Dragonstomper

  • 891 posts
  • Location:Toronto, Ontario, Canada

Posted Fri Feb 24, 2017 8:49 AM

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.



#3 youki OFFLINE  

youki

    River Patroller

  • 2,235 posts

Posted Fri Feb 24, 2017 2:25 PM

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.



#4 JamesD OFFLINE  

JamesD

    Quadrunner

  • 7,460 posts
  • Location:Flyover State

Posted Fri Feb 24, 2017 3:44 PM

I wouldn't have less than 8K banks, there's not really any point in going smaller.



#5 PkK OFFLINE  

PkK

    Moonsweeper

  • Topic Starter
  • 463 posts
  • Location:Europe

Posted Fri Feb 24, 2017 4:12 PM

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.



#6 artrag ONLINE  

artrag

    Dragonstomper

  • 689 posts

Posted Sat Feb 25, 2017 10:12 AM

16KB permanent, 16KB+16KB mapped in banks, 16K of ram

Edited by artrag, Sat Feb 25, 2017 10:13 AM.


#7 PkK OFFLINE  

PkK

    Moonsweeper

  • Topic Starter
  • 463 posts
  • Location:Europe

Posted Sat Feb 25, 2017 3:21 PM

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



#8 Kiwi OFFLINE  

Kiwi

    Stargunner

  • 1,360 posts

Posted Sat Feb 25, 2017 10:01 PM

Currently I am able to build a 128KB ROM using AlekMaul tutorial.  Right now, 16KB fixed and 16KB switchable is my current setup.  



#9 artrag ONLINE  

artrag

    Dragonstomper

  • 689 posts

Posted Mon Feb 27, 2017 3:22 AM

If the window for the coleco cartridges is 32KB maybe it is better to have
16k permanent
8+8k banked
32k ram

#10 artrag ONLINE  

artrag

    Dragonstomper

  • 689 posts

Posted Mon Feb 27, 2017 4:03 AM

Having two mapped banks allows paged code to use paged data.

#11 PkK OFFLINE  

PkK

    Moonsweeper

  • Topic Starter
  • 463 posts
  • Location:Europe

Posted Mon Feb 27, 2017 1:36 PM

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






0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users