Allegedly, if you didn't do this, Nintendo would reject your game outright.
Allegedly, if you didn't do this, Nintendo would reject your game outright.
[1]: https://en.wikipedia.org/wiki/HLT_(x86_instruction)#History_...
For embedded software without an os it is not uncommon when not explicitly doing something to enter a spin table.
So there's not much difference between a Game Boy and a modern computer in that particular regard, other than the many thick abstraction layers between the system call invocation and the halt instruction.
Just type "ps ax" into your shell, most processes will be in state "S", sleeping because of a system call.
My point is, you kind of have to go out of your way to spin CPU without actually having any work in front of you.
So it's normal to just enter a little loop in your code, often one that waits for a flag that's set by an interrupt routine that runs in response to vertical blank or a timer or something. So your loop is literally just waiting for time to pass. Load flag, is flag zero, repeat loop if zero, that sort of thing, over and over again.
But with the gameboy's halt functionality, you can add a halt in there, I guess: halt, load flag, is flag zero, repeat loop if zero. Then the CPU can go dormant until the next interrupt, rather than spending its time running that loop. (It might wake up needlessly, if some other interrupt occurs, but it'll still be no more expensive than the loop.)