Skip to content

Change the text to use the VBL interrupt from the start #112

@AntonioND

Description

@AntonioND

vid_vsync() is a really bad hack that shouldn't be used in any serious project. However, Tonc uses that function all the time up to chapter 16. Hardware interrupts.

This is done because Cearn wanted to explain things step by step and not use anything that hadn't been explained, but it's very unlikely that anyone will reach chapter 16 after learning how to do graphics, input, etc, especially if the chapter name is "Hardware interrupts", which sounds boring.

I think teaching people from the start to use:

irq_init(NULL);
irq_add(II_VBLANK, NULL);

and:

VBlankIntrWait();

Is reasonable, and they can keep using them even if they never reach chapter 16.

Personally, when I started with NDS development, I used interrupts from the start without understanding them at all, and I only started to understand them months after starting. It was fine. I just knew that the "wait for VBL interrupt" function waited for the next frame.

Opinions?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions