libretro / beetle-ngp-libretro

Standalone port of Mednafen NGP to the libretro API, itself a fork of Neopop.
GNU General Public License v2.0
11 stars 43 forks source link

new irq handler #63

Closed ghost closed 5 years ago

ghost commented 5 years ago

Fix IFF level on new IRQ firing

ghost commented 5 years ago

Some explaining:

  1. On an IRQ, the IFF is set to firing level + 1. Before it would just IFF+1 which is incorrect.
    • Remove Ogre Battle hack
  2. Most IRQ priority levels can be changed at runtime by software. So we pass those along.
  3. BIOS SWI are always run. So those must be 6 or 7 level.
  4. DMA stops now obey IRQ masking. Before they always fired regardless of irq priority levels.
  5. Add RTC IRQ. Because likely a game will use it for alarms and clocks.

TODO: See if this fixes timer2 T1 kludge.

ghost commented 5 years ago

I think we need to keep timer2 T1 kludge. Although I wonder if it's a documentation error and that actually is the real rate.