Interrupts trouble.

Ask anything your want about Megadrive/Genesis programming.

Moderator: BigEvilCorporation

Post Reply
Jpg3D
Interested
Posts: 20
Joined: Mon Mar 03, 2014 9:19 pm

Interrupts trouble.

Post by Jpg3D » Mon Mar 03, 2014 9:46 pm

Hi everybody, i greet you all. After some days coding for the megadrive, someone told that i may find help around here so i dediced to register.

I edit this post because after setting carefully again the registers, interrupts finally worked. The code seems to work fine, because it stills process the main loop.

The problem now is that when i set interrupts on, the screen turns to background color. At this point im really confused and dont know what i'm doing wrong

[code]
HSync
ADD.L #1,$00FF0000
RTE

VSync
ADD.L #1,$00FF0004
RTE
[/code]


This are the registers that i'm setting to get verticals and horizontals interrupts.

[code] MOVE.W #$8014,$C00004
MOVE.W #$8174,$C00004
MOVE.W #$8A80,$C00004
MOVE.W #$8B08,$C00004[/code]

reg0 value $14
reg1 value $74
reg10 value $80
reg11 value $08

Any ideas would be appreciated. this only occurs when i move $2000 to SR
so i'm not deactivating screen by error.

Hopefully you can help me.

Jpg3D
Interested
Posts: 20
Joined: Mon Mar 03, 2014 9:19 pm

Solution

Post by Jpg3D » Wed Mar 05, 2014 10:46 am

Hi, after a divine appearing tonight and debugging the whole code, i found an instruction that was unabling the interrupts to execute properly.

Also, i was not disabling INTS at a function when handling vdp. There were the bugs. Finally my code worked again.

Thanks for your time anyway.

Post Reply