v-blank interrupt

Discussion in 'Sega Saturn Programming and Development' started by DamageX, Feb 10, 2011.

  1. DamageX

    DamageX Member

    Joined:
    Dec 24, 2010
    Messages:
    11
    Likes Received:
    0
    I set the SCU interrupt mask register ($25FE00A0) to $0000BFFE, wrote the address of a routine at $6000100, and cleared the CPU`s status register interrupt mask bits. In Yabause I can use the interrupt for timing an animation. On Saturn my program shows one frame and stops, there is no interrupt.
     
  2. Piratero

    Piratero Peppy Member

    Joined:
    Feb 28, 2009
    Messages:
    347
    Likes Received:
    0
    Location:
    United States
    Just writing to that register won't do much. It probably works on Yabause because the registers might of have been (properly) set by the BIOS after loading your binary.

    I would suggest you just use the BIOS functions. Really, it'll make your life a lot easier.

    I have working code for (any) interrupt without the use of BIOS functions. Though, I'd have to go through my backups... :rolleyes:

    Also, no one can deduce what the problem is without giving us all the information. Show us code, provide us with debugging info!
     
  3. DamageX

    DamageX Member

    Joined:
    Dec 24, 2010
    Messages:
    11
    Likes Received:
    0
    Is that not it`s purpose? Which register should be written?
    Surely you mean before loading my binary, or...?
    I don`t know how to use BIOS functions.
    Knock yourself out... http://www.hyakushiki.net/misc/sat3d3.zip
     
  4. Piratero

    Piratero Peppy Member

    Joined:
    Feb 28, 2009
    Messages:
    347
    Likes Received:
    0
    Location:
    United States
    Yes, I meant before.

    As for the BIOS functions, I might have some for you to use here.

    I found the code. Use it and please respect the licensing. That's all I ask.
     
  5. DamageX

    DamageX Member

    Joined:
    Dec 24, 2010
    Messages:
    11
    Likes Received:
    0
    Um, licensing? You`ve got to be fucking kidding me. You put a 25-line copyright notice ahead of 3 instructions? Not only does this not answer my question, but now I`m sorry that I asked. Thanks, but no thanks.
     
  6. Piratero

    Piratero Peppy Member

    Joined:
    Feb 28, 2009
    Messages:
    347
    Likes Received:
    0
    Location:
    United States
    Yes. I took the time to RTFM and debug. I'm entitled to put a license.

    I hope you've at least read the license.
     
  7. retro

    retro Administrator Staff Member

    Joined:
    Mar 13, 2004
    Messages:
    10,335
    Likes Received:
    311
    Location:
    UK
    I'm not even going to bother picking up my manuals or disks for you now. Don't be so damn rude. And to think I was about to welcome you and comment on how it's nice to get a proper coding question in this section for once. Seriously, there's no need for the swearing or being disrespectful.

    Yes, of course someone is entitled to put a copyright notice on his code. It is his copy right, so you have to respect it. Don't use it if you can't do that.

    *EDIT*

    The code is 164 lines, including the copyright notice. Learn to count.
     
    Last edited: Feb 13, 2011
  8. DamageX

    DamageX Member

    Joined:
    Dec 24, 2010
    Messages:
    11
    Likes Received:
    0
    I apologize for blowing up. I should have stated simply that I am not interested in using any code in Saturn homebrew that someone else is asserting control over.

    By looking at the disassembly of the BIOS` own interrupt service routine, I noticed that the register $25FE00A0 is being written during the routine, and that bits 16-31 were also set. So now I write $FFFFBFFE at the beginning of the program and during the interrupt service routine. Problem solved.
     

Share This Page