cr1901 changed the topic of ##yamahasynths to: Channel dedicated to questions and discussion of Yamaha FM Synthesizer internals and corresponding REing. Discussion of synthesis methods similar to the Yamaha line of chips, Sound Blasters + clones, PCM chips like RF5C68, and CD theory of operation are also on-topic. Channel logs: https://libera.irclog.whitequark.org/~h~yamahasynths
<NiGHTS>
William D. Jones sur Twitter : "Okay, I give up. How was the underwater effect done in the Pokemon Gold/Silver intro? It's not obvious to me that GB CPU has enough time to calculate how much the background should stretch at a given y-offset _and_ copy to the tiles in memory? https://t.co/sXE4rOM5Hv"
<tpw_rules>
the gameboy has a scanline interrupt
<tpw_rules>
that's ultra classic per-scanline scrolling. the color even has HDMA
<tpw_rules>
like snes
<tpw_rules>
although i don't recall if it's used the same way or it just has the same name
<cr1901>
every scanline can be interrupted?
<tpw_rules>
yes
<tpw_rules>
well you can set an interrupt at a specific scanline
<tpw_rules>
so when that fires, the game just updates the y scroll to the appropriate value and requests an interrupt at the next scanline
<tpw_rules>
(looks like the gbc hdma doesn't operate the same as snes)
<cr1901>
This is why I'm not a game programmer
<tpw_rules>
iirc the docs call it the "coincidence interrupt"
<cr1901>
tpw_rules: Of course the "Wario on fire" theme is playing in my head again now
<tpw_rules>
looks like pokemon actually uses the STAT interrupt to listen for the start of hblank, instead of the coincidence interrupt
<cr1901>
oh right, I also forgot I could look at the source
<cr1901>
I'm not having a good week (tbf, I'm not sure most of us are)
Degi has quit [Ping timeout: 272 seconds]
Degi has joined ##yamahasynths
<endrift>
this is called a "raster effect"
<endrift>
it's extremely common on tile-based raster renderers like the NES, GB, SNES and GBA.
<fseidel>
MD has my favorite variation on this, you set a tables in VRAM with X per-scanline and Y per-16px-column scroll values. It lets you do all sorts of lovely effects without burning CPU time to service IRQs
andlabs has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]