Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
 Welcome to our latest new user Critikill (CK) ! (Registered 2024-09-19) You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > Bank switching and C000 - CFFF
2023-05-11 02:06
El Stocko

Registered: Jul 2006
Posts: 16
Bank switching and C000 - CFFF

Apologies if this is basic knowledge, but this is something that's caught me out and from the info I've seen online, I don't properly understand why it happens..

Existing code that I've been referencing switches off all ROM banks..
LDA #$30
STA $01

Absolutely fine, but when I was replicating this code at C000, my code would crash every time. It took me a long time to figure out that switching off all ROMS seems to work anywhere in memory EXCEPT if your code is running at C000-CFFF. According to the Mode Table outlined at https://www.c64-wiki.com/wiki/Bank_Switching C000-CFFF is always RAM unless there's a cartridge, and the Bank Switching Zones section lists it as RAM or "unmapped", whatever that means.

Maybe I haven't Googled the right thing, but I haven't seen anything that says switching off ROMS should affect C000-CFFF. Can some genius explain this to me please? :)
 
... 10 posts hidden. Click here to view all posts....
 
2023-05-11 17:47
El Stocko

Registered: Jul 2006
Posts: 16
Quote: BTW unmapped means "no internal chips will respond to the address"

so when you are in that mode, accessing C000 will not reference any internal chip, i.e it is "open bus", unless you have something one the expansion port that does react to the address.


Thanks for clarifying. So is it possible for C000 to go into this unmapped state if there is no expansion present? I thought that's what I was seeing, but I might have dreamed it.
2023-05-12 03:56
Martin Piper

Registered: Nov 2007
Posts: 699
Quote: Thanks for clarifying. So is it possible for C000 to go into this unmapped state if there is no expansion present? I thought that's what I was seeing, but I might have dreamed it.

On real hardware?
Something would have to pull the _GAME signal on the expansion port low: https://codebase64.org/doku.php?id=base:memory_management#cart_..

That signal, along with _DMA and _EXROM, have weak pull-ups guarding against that.

That signal goes straight into the PLA, so it could be that the PLA is bad, or the signal has a bad joint.
2023-05-12 12:00
chatGPZ

Registered: Dec 2001
Posts: 11290
If you see a difference in behaviour of that area in emulator vs real hardware - then indeed its either a broken PLA, or broken RAM
2023-05-12 15:30
El Stocko

Registered: Jul 2006
Posts: 16
Quote: On real hardware?
Something would have to pull the _GAME signal on the expansion port low: https://codebase64.org/doku.php?id=base:memory_management#cart_..

That signal, along with _DMA and _EXROM, have weak pull-ups guarding against that.

That signal goes straight into the PLA, so it could be that the PLA is bad, or the signal has a bad joint.


No nothing bad here. My "test" where I thought I'd seen the behaviour was in VICE, with no cart. So it was just a hypothetical question in the end.. are we saying with nothing on the expansion port it's never possible to unmap C000? (that was always what I thought anyway)
2023-05-12 17:58
Martin Piper

Registered: Nov 2007
Posts: 699
Correct. It cannot be unmapped if there is nothing on the port.
Previous - 1 | 2 - Next
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
Martin Piper
Dr. Doom/RAD
Fred/Channel 4
Guests online: 77
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 Mojo  (9.6)
6 Uncensored  (9.6)
7 Comaland 100%  (9.6)
8 Wonderland XIV  (9.6)
9 No Bounds  (9.6)
10 Unboxed  (9.6)
Top onefile Demos
1 Layers  (9.6)
2 Party Elk 2  (9.6)
3 Cubic Dream  (9.6)
4 Copper Booze  (9.6)
5 Rainbow Connection  (9.5)
6 It's More Fun to Com..  (9.5)
7 Morph  (9.5)
8 Dawnfall V1.1  (9.5)
9 Onscreen 5k  (9.5)
10 Daah, Those Acid Pil..  (9.5)
Top Groups
1 Booze Design  (9.3)
2 Oxyron  (9.3)
3 Nostalgia  (9.3)
4 Censor Design  (9.3)
5 Triad  (9.2)
Top Crackers
1 Mr. Z  (9.9)
2 Antitrack  (9.8)
3 OTD  (9.8)
4 Fungus  (9.7)
5 S!R  (9.7)

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