Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > Memory managment w. cartridge
2015-10-31 14:01
mhindsbo

Registered: Dec 2014
Posts: 51
Memory managment w. cartridge

I am setting up my game on a cartridge and loading levels etc. from the cart.

When looking at all the permutations for banking in RAM & ROM it looks like you always have the kernal in when cart rom is in. Is that the case or am i missing a setting?

http://www.c64-wiki.com/index.php/Bank_Switching

That is annoying since, especially since the kernal's IRQ vectors are then also in which I would like to avoid.
2015-10-31 18:47
AlexC

Registered: Jan 2008
Posts: 302
I believe you misinterpreted table from that page. Here is an excerpt from it: "A cartridge may configure the system to one of the modes 0-23 as one or both of the expansion port latch bits will be logically low (cleared to 0) by grounding the EXROM/GAME lines."
2015-10-31 19:35
Frantic

Registered: Mar 2003
Posts: 1661
mhindsbo: Don't take my word for it, but yes.. I think you're right. I have a vague memory that I came to that conclusion too a few years ago when I was thinking about some cartridge related project. I also seem to remember that I had to re-think things quite a lot precisely because of that thing. Bah..

(Well, there is the ultimax mode as well, but then you have very little RAM available to play with and then the IRQ/NMI vectors have to be fixed in cartridge ROM although they may point elsewhere than the kernal thing...)

One possibility is to have the cartridge switched out, and then switch it in only while the interrupt is executing, and switch cart out again before leaving the interrupt code.
2015-11-01 19:00
mhindsbo

Registered: Dec 2014
Posts: 51
Thanks. Yes I unfortunately think the solution is to switch the cart ROM in and out. I will probably just have the irq vector both in $FFFE as well as in $314 (without the stack push) - that way it will jump to the same place with or without Kernal.

BTW follow up question. It seems cart ROM is different than Basic and Kernal in that you dont write to the RAM below it when it is banked in. Is that correct?
2015-11-01 19:07
chatGPZ

Registered: Dec 2001
Posts: 11523
no, thats only true in ultimax mode (where there is no ram under the rom in the first place)
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
Radiant
Andy/AEG
Medicus
Knobby/Role
The Syndrom/TIA/Pret..
JEZ
Scooby/G★P/Light
Asphodel
Guests online: 262
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Codeboys & Endians  (9.7)
4 Mojo  (9.6)
5 Coma Light 13  (9.6)
6 Edge of Disgrace  (9.6)
7 Signal Carnival  (9.6)
8 Wonderland XIV  (9.5)
9 Uncensored  (9.5)
10 Comaland 100%  (9.5)
Top onefile Demos
1 Nine  (9.7)
2 Layers  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.5)
6 Scan and Spin  (9.5)
7 Onscreen 5k  (9.5)
8 Grey  (9.5)
9 Dawnfall V1.1  (9.5)
10 Rainbow Connection  (9.5)
Top Groups
1 Artline Designs  (9.3)
2 Booze Design  (9.3)
3 Performers  (9.3)
4 Oxyron  (9.3)
5 Censor Design  (9.3)
Top Coders
1 Axis  (9.8)
2 Sailor  (9.8)
3 Lft  (9.8)
4 Graham  (9.8)
5 Crossbow  (9.8)

Home - Disclaimer
Copyright © No Name 2001-2025
Page generated in: 0.068 sec.