Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
 Welcome to our latest new user Werner ! (Registered 2024-05-30) 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: 145
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: 5029
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: 5029

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: 145
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: 2855
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: 351
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: 5029
monte, good point
2006-02-28 08:32
PopMilo

Registered: Mar 2004
Posts: 145
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: 145
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
cba
Higgie/Kraze/Slackers
CA$H/TRiAD
psych
Knut Clausen/SHAPE/F..
lA-sTYLe/Quantum
Guests online: 98
Top Demos
1 Next Level  (9.8)
2 13:37  (9.7)
3 Coma Light 13  (9.7)
4 Mojo  (9.7)
5 Aliens in Wonderland  (9.6)
6 Edge of Disgrace  (9.6)
7 No Bounds  (9.6)
8 Comaland 100%  (9.6)
9 Uncensored  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 Happy Birthday Dr.J  (9.7)
2 Layers  (9.6)
3 It's More Fun to Com..  (9.6)
4 Cubic Dream  (9.6)
5 Party Elk 2  (9.6)
6 Copper Booze  (9.6)
7 TRSAC, Gabber & Pebe..  (9.5)
8 Rainbow Connection  (9.5)
9 Dawnfall V1.1  (9.5)
10 Daah, Those Acid Pil..  (9.5)
Top Groups
1 Nostalgia  (9.4)
2 Oxyron  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 SHAPE  (9.3)
Top Logo Graphicians
1 Sander  (9.9)
2 Facet  (9.6)
3 Mermaid  (9.4)
4 Pal  (9.4)
5 Shine  (9.3)

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