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 > Switch out C64 Kernal ROM when running code from RR Cart ROM
2012-04-26 16:31
Frantic

Registered: Mar 2003
Posts: 1648
Switch out C64 Kernal ROM when running code from RR Cart ROM

Hi!

I think I have actually asked this once before, but can't really find that thread (if I did). Furthermore, I can't accept what I think is the truth in this case, so I'll ask again. ;)

Is there really no way to switch out C64 Kernal ROM when executing code running from a Retro Replay ROM?

(I don't want to go into Ultimax mode, because that has all sorts of consequences, like hiding large amounts of the C64 RAM etc. Also, I am not thinking about tricks like temporarily disabling the cart as a whole, and such.)

What I want to achieve is basically to use code which (a) executes from retro replay rom, and (b) does not jump through the "indirect" IRQ/NMI vectors, but is rather handled directly through the vectors at $fffa/fffb etc.

//FTC
2012-04-26 17:06
chatGPZ

Registered: Dec 2001
Posts: 11386
you can use the rom mirrors in i/o area for this, they are always visible (if enabled via cart regs) regardless of $01
2012-04-26 18:22
Frantic

Registered: Mar 2003
Posts: 1648
Uhm... How do you mean? What does the IO area have to do with the fact that the hardware NMI/IRQ vectors are covered by the Kernal ROM? I guess you may be saying something obvious, but I think I am precisely missing something obvious.

Or.. uh.. you mean.. only having one page of ROM code available at a time, and use $01 settings more freely? Not exactly desirable, but I suppose it is possible. Anyway, I would have preferred the "main loop" of the program to also be running from the cart ROM.

I must say that I haven't fully understood how that banking in the IO area works, although I think I've understood fairly well how to use RR ROM banking more generally, apart from the IO area trickery..
2012-04-27 16:31
chatGPZ

Registered: Dec 2001
Posts: 11386
"What does the IO area have to do with the fact that the hardware NMI/IRQ vectors are covered by the Kernal ROM?"
nothing :) but ....
"Or.. uh.. you mean.. only having one page of ROM code available at a time, and use $01 settings more freely?"
... if you want to have the hardware vectors in ram, ie have the kernal disabled, then the only place where cart rom is visible at the same time is (can be) the i/o area. typically in the i/o area there will be stub functions that bank in/out the cart rom and then call into them.
2012-04-27 18:29
Frantic

Registered: Mar 2003
Posts: 1648
Yeah, thanks.. I get it! Then of course the banking stuff will waste a few cycles anyway, but.. yeah.. I see what you mean: that this is the only option under the conditions I specified.
2012-04-28 18:09
Count Zero

Registered: Jan 2003
Posts: 1932
as groepaz said.

Though untested for details currently there seems to be a special situation when calling especially the BASIC ROM from banks 2 or 3 and above. Counting 0 to 7 as it should be I'd say it was bank 2. JMP/JSR to basic interpreter routines didn't properly work on RR - not sure about AR.

Someone may want to dig into it :)
2012-05-25 13:46
Frantic

Registered: Mar 2003
Posts: 1648
Just a follow up question... does this limitation (my concern in the original question) apply to all carts on C64? That is, does it have anything to do with the way RR works specifically, or is this rather a limitation in the way C64 carts work in general?
2012-05-25 15:04
chatGPZ

Registered: Dec 2001
Posts: 11386
its just how the mapping works, so yes it will be like that with every cartridge =)
2012-05-25 17:05
Count Zero

Registered: Jan 2003
Posts: 1932
Followup thought/question: what is the code purpose here? Ultimax might be a bitter way indeed but there likely are other easy "memory hook" solutions I could think of.
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
Brittle/Dentifrice^(?)
Guests online: 81
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 No Listen  (9.6)
2 Layers  (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 Swappers
1 Derbyshire Ram  (10)
2 Jerry  (9.8)
3 Violator  (9.7)
4 Acidchild  (9.7)
5 Cash  (9.6)

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