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 > How to properly setup $fffe interrupt ?
2006-02-23 21:00
PopMilo

Registered: Mar 2004
Posts: 146
How to properly setup $fffe interrupt ?

Good day to you all, I have a bit of a problem so... :

I found some old code of mine on an old tape and transfered it to PC and want to compile it using tass and try it on CCS64 or VICE. Im sure code worked 15 years ago, but now... :)

So why this happens...

"sei
...
lda #<irqsr
ldx #>irqsr
sta $fffe
stx $ffff
...

cli"

I watched this code in VICEs debbuger and imidiatelly when sta $fffe is done there is NO change in $fffe ?
same with $ffff
So when cli goes, my prg just goes to $ff48 and my interupt routine is never executed...?

So I would be very gratefull if someone can write just some small piece of code that makes my routine go off in regular timed intervals (5-20 times a second...).

I read some other posts but cant get it to work...
thanks...
 
... 22 posts hidden. Click here to view all posts....
 
2006-02-26 18:32
Radiant

Registered: Sep 2004
Posts: 639
Well, by any CS definition, it is an operating system kernel. So I don't see why it would be wrong to call it as such. It's a kernel, named KERNAL. :-)
2006-02-26 19:29
Oswald

Registered: Apr 2002
Posts: 5094
kernAl is the OS itself.

kernel is a system core.

there's some difference ehm ?

check any programming guide, and C= docs, its called kernal, period.
2006-02-26 19:35
Oswald

Registered: Apr 2002
Posts: 5094

sei
lda #$7f
sta $dc0d ;turn off timer irq
lda #$01
sta $d01a ;request raster irq from vic
lda #raster
sta $d012 ;raster position low
lda #rasterhi&$1b
sta $d011 ;raster position hi&char mode
lda #<irq
sta $fffe ;irq routine addy low byte
lda #>irq
sta $ffff ;irq routine addy high byte
lda $dc0d ;ack any pending timer irq
lda $dd0d ;at cia #2 too
lda #$35
sta $01 ;turn off kern_A_l
cli

jmp *

irq pha
txa
pha
tya
pha

lsr $d019

;do stuff

pla
tay
pla
tax
pla
rti



done.
2006-02-26 22:15
PopMilo

Registered: Mar 2004
Posts: 146
OK guys, you have been extremely helpfull, and my prog is now fully functional except it doesnt work just the way it should :)

Interrupts are working great, graphics is ok, I just have some logical mistakes in my code that need to be fixed...

Thanks!
2006-02-27 05:04
Krill

Registered: Apr 2002
Posts: 2980
Quote: kernAl is the OS itself.

kernel is a system core.

there's some difference ehm ?

check any programming guide, and C= docs, its called kernal, period.


IMHO, a modern KERNEL does everything what the C64's KERNAL does, and more. And calling the KERNAL the C64's system core (KERNEL) is appropriate since there's also the BASIC interpreter and user front-end running on top of it.
2006-02-27 07:20
Monte Carlos

Registered: Jun 2004
Posts: 359
This initialisation all lack an lsr $d019 just before the cli.
If you acknowledge any timer irq you have to do it for raster irq, too. You don't know in which rasterline your irq-init routine is executed. In the worst, but most unlikely case you get an irq request just before setting up the new irq.
After the cli the first raster-irq immediately starts in any rasterline which is not good, when using some vic trickery.

Monte
2006-02-27 17:29
Oswald

Registered: Apr 2002
Posts: 5094
monte, good point
2006-02-28 08:32
PopMilo

Registered: Mar 2004
Posts: 146
Quote: I think that HEMA should first-release this game

Why HEMA ? What is HEMA ? :(
Is it demo group ?
is it a joke :) No offence intended... :)

p.s. Monte thanks...
2006-02-28 08:55
TDJ

Registered: Dec 2001
Posts: 1879
Quote: Why HEMA ? What is HEMA ? :(
Is it demo group ?
is it a joke :) No offence intended... :)

p.s. Monte thanks...


Hema is the #1 crack/release group these days. Groups like Onslaught & Triad have nothing on them!
2006-03-01 12:55
PopMilo

Registered: Mar 2004
Posts: 146
Ok :)
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
stephan-a
Guests online: 104
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 X-Mas Demo 2024  (9.5)
7 Dawnfall V1.1  (9.5)
8 Rainbow Connection  (9.5)
9 Onscreen 5k  (9.5)
10 Morph  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Censor Design  (9.3)
5 Triad  (9.3)
Top Logo Graphicians
1 t0m3000  (10)
2 Sander  (9.8)
3 Mermaid  (9.5)
4 Facet  (9.4)
5 Shine  (9.4)

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