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 > $01 register
2010-09-10 01:25
Kickback

Registered: Apr 2004
Posts: 97
$01 register

I know this was asked most-likely 1000 times already but my mind isn't as it use to be because of age and all LOL!!!

If I swap out all of the rom (store $34 into $01) do I need to have some sort of interrupt enabled? I seem to remember if you have the ROM off to long the system will crash? Is this the case or is it just plain ol bad programming LOL!!!

So basically I have my exomizer decrunch and I do the following....

lda #$34
sta $01

jsr decrunch

lda #$37
sta $01

Which I know the decrunch can take some time and not sure is this is why the system is getting hosed out!

 
... 24 posts hidden. Click here to view all posts....
 
2010-09-10 11:18
Ninja

Registered: Jan 2002
Posts: 408
Quoting Frantic
By the way, I don't remember by heart exactly which state that is caused by $34,[...]


http://unusedino.de/ec64/technical/aay/c64/zp01.htm

leads to

http://unusedino.de/ec64/technical/aay/c64/memcfg.htm

2010-09-10 12:51
Devia

Registered: Oct 2004
Posts: 401
which reminds me that I made this a while back: http://www.harries.dk/files/C64MemoryMaps.pdf
2010-09-10 12:59
Graham
Account closed

Registered: Dec 2002
Posts: 990
Quoting TWW

and why not:

lda $01
sta mem+1
and #%11111100 /removes ROM (of the top of my head)
sta $01

[call music player]

mem: lda #$00
sta $01

AND #$FC will also disable the I/O area -> no SID registers -> no music.
2010-09-10 16:23
SIDWAVE
Account closed

Registered: Apr 2002
Posts: 2238
Quote: which reminds me that I made this a while back: http://www.harries.dk/files/C64MemoryMaps.pdf


You need to gather all the things you have done, and put them in 1 place.

Random links in random threads, dont do much for preservation.. :)
2010-09-10 19:51
AlexC

Registered: Jan 2008
Posts: 293
One thing you have to remember is that SEI only blocks IRQ interrupts. BRK and NMI will not be affected so if you switch out kernel while not providing correct interrupt handler routines for those interrupts your code will crash. This could explain why you remember that at some point after SEI you can expect problems.
2010-09-10 20:45
Kickback

Registered: Apr 2004
Posts: 97
Quote: One thing you have to remember is that SEI only blocks IRQ interrupts. BRK and NMI will not be affected so if you switch out kernel while not providing correct interrupt handler routines for those interrupts your code will crash. This could explain why you remember that at some point after SEI you can expect problems.

Ahhhhhh!!! So I wasn't crazy after all? So if I do not set anything up (interrupt wise) and so something like this:


lda #$02
sta $02a8
jsr $e544

sei
lda #$34
sta $01

ldx
ldy
jsr decrunch

lda #$37
sta $01
cli

if my decruncher takes too long the system will hault? If that's the case how do I get around it?
2010-09-10 20:55
Pantaloon

Registered: Aug 2003
Posts: 124
if thats your problem and you are decrunching to IO memory then you could perhaps just decrunch a portion of the data every frame.

if it's not IO area you shouldnt have to worry about this since you wouldn't need to bank out any crucical parts (unless you are doing a basic demo or something ofcoz).
2010-09-10 21:24
Kickback

Registered: Apr 2004
Posts: 97
Quote: if thats your problem and you are decrunching to IO memory then you could perhaps just decrunch a portion of the data every frame.

if it's not IO area you shouldnt have to worry about this since you wouldn't need to bank out any crucical parts (unless you are doing a basic demo or something ofcoz).


Oh yes it most definitely IO area under $d000 area?
I want to use that area for decrunching if possible.
2010-09-10 21:38
AlexC

Registered: Jan 2008
Posts: 293
Quote: Oh yes it most definitely IO area under $d000 area?
I want to use that area for decrunching if possible.


Unless you really understand how memory management and hardware registers work on c64 it's not a good idea to use d000-dfff memory for decrunch. Take a look at one of C=Hacking issues where you will find necessary code for swapping in/out d000-dfff area for code.

Also when using IO area for memory you can forget about sound and screen affects and communication with floppy drive.

Coming back to your question: you can mask NMI despite it's name. There is a code example on codebase. Anyway you can also install one handler for all interupts using rti. This will make all your interrupt problems go away. Keep in mind that when you have no external peripherals connected you might almost never see NMI. BRK can be hit if there is a bug in your code and you address some unused memory or data before/after decrunch for example.
2010-09-11 09:31
enthusi

Registered: May 2004
Posts: 675
also some folks start viewing demos by hitting RESTORE to hunt for 'bugs'... :)
Previous - 1 | 2 | 3 | 4 - 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
Radd Maxx/SWIM
Guests online: 70
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.7)
5 Edge of Disgrace  (9.6)
6 Comaland 100%  (9.6)
7 Uncensored  (9.6)
8 No Bounds  (9.6)
9 Aliens in Wonderland  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 Layers  (9.6)
2 Cubic Dream  (9.6)
3 Party Elk 2  (9.6)
4 Copper Booze  (9.6)
5 Rainbow Connection  (9.5)
6 It's More Fun to Com..  (9.5)
7 Dawnfall V1.1  (9.5)
8 Birth of a Flower  (9.5)
9 Daah, Those Acid Pil..  (9.5)
10 Quadrants  (9.5)
Top Groups
1 Nostalgia  (9.4)
2 Oxyron  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 Offence  (9.3)
Top Logo Graphicians
1 Sander  (9.9)
2 Facet  (9.5)
3 Mermaid  (9.4)
4 Pal  (9.4)
5 Shine  (9.3)

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