Topic List

LurkerFAQs, Active Database ( 12.01.2023-present ), DB1, DB2, DB3, DB4, DB5, DB6, DB7, DB8, DB9, DB10, DB11, DB12, Clear

Yellow

Topics: 351
Last Topic: 6:47:43pm, 03/28/2024
Writing an NES emulator ama

Posts: 170
Last Post: 6:47:43pm, 03/28/2024
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


Manual Topics: 0
Last Topic:
[none]

Manual Posts: 0
Last Post:
[none]
---