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: 299
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: 1648
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: 11386
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
algorithm
B.A./QUANTUM
Alakran_64
Abynx/Wavefx
Airwolf/F4CG
Wayne/Art Ravers
iceout/Avatar/HF
Steffan/BOOM!
E$G/HF ⭐ 7
Holy Moses/Role
Didi/Laxity
lA-sTYLe/Quantum
zscs
Freeze/Blazon
Guests online: 94
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.6)
5 Edge of Disgrace  (9.6)
6 What Is The Matrix 2  (9.6)
7 The Demo Coder  (9.6)
8 Uncensored  (9.6)
9 Comaland 100%  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 Layers  (9.6)
2 No Listen  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.6)
6 Dawnfall V1.1  (9.5)
7 Rainbow Connection  (9.5)
8 Onscreen 5k  (9.5)
9 Morph  (9.5)
10 Libertongo  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Triad  (9.3)
5 Censor Design  (9.3)
Top Graphicians
1 Mirage  (9.8)
2 Archmage  (9.7)
3 Pal  (9.6)
4 Carrion  (9.6)
5 Sulevi  (9.6)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.052 sec.