| |
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.... |
| |
Ninja
Registered: Jan 2002 Posts: 408 |
Quoting FranticBy 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
|
| |
Devia
Registered: Oct 2004 Posts: 401 |
which reminds me that I made this a while back: http://www.harries.dk/files/C64MemoryMaps.pdf
|
| |
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.
|
| |
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.. :) |
| |
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. |
| |
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?
|
| |
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). |
| |
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. |
| |
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. |
| |
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 |