Search found 6 matches

by theelf
Sat Aug 07, 2010 8:02 pm
Forum: Megadrive/Genesis
Topic: Help with some programming problems - collision
Replies: 11
Views: 7115

you must write $00 to VDP register $0A to make HINT occurs every line ($01 every 2 lines, etc) and $14 to VDP register $00 to enable HINT.

you must also program a proper HINT callback in your code (interrupt level 4) and set the CPU interrut mask properly
Thanks for your reply and time
by theelf
Sat Aug 07, 2010 3:33 pm
Forum: Megadrive/Genesis
Topic: Help with some programming problems - collision
Replies: 11
Views: 7115

With that said, by using sleep(1), it's very unlikely you will fall exactly in the short period where the flag is being set, you should probably program an horizontal interrupt on each line and check the flag here, if it is set, you would know that collision occured on the previous line.

Hi ...
by theelf
Fri Aug 06, 2010 6:52 pm
Forum: Megadrive/Genesis
Topic: Help with some programming problems - collision
Replies: 11
Views: 7115

I meant how to avoid using the bit


Ah ok, well i want to use it, thanxs anyway for your help, and good tutorial, i use my own method for collisions but i take notes of yours! ! :) thanks for your work


Still i´m keep looking for solution to the collision flag... hope, someone have some idea ...
by theelf
Fri Aug 06, 2010 3:38 pm
Forum: Megadrive/Genesis
Topic: Help with some programming problems - collision
Replies: 11
Views: 7115

There is also a note in Charles McDonald's doc you may need to take into account:

Quote:
This bit is most likely cleared at the end of the frame.


Yes, i know this line of this Doc. Because i don't understand to much what he say, when i read, i try to put the collision code, before sleep, after ...
by theelf
Fri Aug 06, 2010 2:39 pm
Forum: Megadrive/Genesis
Topic: Help with some programming problems - collision
Replies: 11
Views: 7115

Probably read aligment problem, similar to one which was in BEX TFD player. Try to use assembly inline instead of peekint.

Hi, thanks for the reply. I make the function in assembler, but same problem. Works in gens, not in Fusion...



a=addsprite(1,1)
b=addsprite(1,1)
propsprite a,1,1 ...
by theelf
Fri Aug 06, 2010 1:16 pm
Forum: Megadrive/Genesis
Topic: Help with some programming problems - collision
Replies: 11
Views: 7115

Help with some programming problems - collision

Hi! im new here, thanks for this great forum, and sorry my english


I´m programming in Basiegaxorz, and i have a problem with collision between sprites

I use this code to check the collision flag of the vdp

peekint(&hC00004).5

The problem is that the code works OK in some emulators, like Gens ...