LogFAQs > #979614483

LurkerFAQs, Active Database ( 12.01.2023-present ), DB1, DB2, DB3, DB4, DB5, DB6, DB7, DB8, DB9, DB10, DB11, DB12, Clear
Topic List
Page List: 1
TopicWriting an NES emulator ama
Yellow
03/28/24 6:47:43 PM
#27:


So how does an antiquated CPU like the NES realize when it needs to handle drawing another frame? Does it carefully count to 30,000 and insert the PPU (Picture Processing Unit) interaction code? Does it check the state of the PPU every now and then?

No, it defines a method at a certain location to handle communication with the PPU (the PPU can't communicate while it's drawing, it's too busy of course). When the PPU is ready, it will set a flag to true. Before the CPU executes any instruction, it checks for that flag, and if the flag is set, it will jump to PPU code, and then return when it's done, and that's what a CPU interrupt is.

---
https://www.youtube.com/watch?v=5C_Wrt6pNSw
... Copied to Clipboard!
Topic List
Page List: 1