V & H interrupt problem
Posted: Sat Mar 20, 2010 3:27 pm
This is my first post here, hiya.
Ive been writing a rom and reading reference for a while.
Im pritty used to the VDP now, but i cant seem get the V and H interrupts working.
After setting the video up, writing patterns to vram...
The program loop moves a sprite from left to right by updating the attribute table.
At the start of the loop i waste some processes.
at the end it branches back to the start.
I added this code to the V & H interrupts, which should disable the display and just show the background. The only way i got it to work, was by using an "rte" at the end of the program loop, then jumping to the beginning from the Main Entrypoint.
Ive been reading the gen tech bulletins for a few days, everything i try doesnt work :/
In the gen techs, it states the H interrupt may cancel the V interrupt, that had 2 solutions, 1 of them confused the hell outta of me.
Know any reasons why this may happen?.. Tanks in advance :L
Ive been writing a rom and reading reference for a while.
Im pritty used to the VDP now, but i cant seem get the V and H interrupts working.
Code: Select all
video_setup:
lea ($C00000).l,a0 ;// set a0 to vdata
lea ($C00004).l,a1 ;// set a1 to vctrl
move.w #$8014,(a1) ;// : mode set #1: [0][0][0][IE1][0][1][M3][0]
move.w #$8164,(a1) ;// : mode set #2: [0][DIS][IE0][M1][M2][1][0][0]
....
The program loop moves a sprite from left to right by updating the attribute table.
At the start of the loop i waste some processes.
Code: Select all
scene_ac:
move.w #$1000,d0 ;// $1000 to d2
scene_ac_aa:
dbf d0,scene_ac_aa
Code: Select all
bra scene_ac
Code: Select all
Horizontal:
nop
nop
nop
move.w #$8124,(a1)
rte
Vertical:
nop
nop
nop
move.w #$8124,(a1)
rte
In the gen techs, it states the H interrupt may cancel the V interrupt, that had 2 solutions, 1 of them confused the hell outta of me.
Know any reasons why this may happen?.. Tanks in advance :L