How input buffering works
🕑 Added 2024-02-29 23:32:40 +0000 UTCHere's a new video where I demonstrate the consequences of not buffering input and demonstrate how a circular buffer works. The end result is buffered, interrupt-driven input for the 6502 computer. It will lead naturally into the next video which will be about flow control.
As always, thanks for your continued support and please let me know if you run into any editing mistakes or overly confusing sections.
Thanks!
-Ben
Comments
NormalLuser
Love the video! Hope you are doing flow control next!
Michael Tedder
Fantastic video! There's one minor optimization that can be made. Since BUFFER_SIZE doesn't modify the X register, you can push/pop X directly around the READ_BUFFER call inside CHRIN, saving the need for the extra plx instruction after the @no_keypressed label.
Paul Heller
It is called. Watch the video again at 14:33
Paul Pluzhnikov
1. Why don't we need to save/restore flags in the IRQ handler? 2. The BUFFER_SIZE is never called, why bother adding it?
George Harris
As you bounce between file edits, it might be better to add a beat and call out those jumps a little more explicitly. I’m not sure what the average skill set is of the viewers and they might get lost trying to follow along.
Kristian Høy Horsberg
Good video. When talking about the circular buffer, I would have wanted a reference to the video you did on the PS/2 keyboard implementing the same thing. I also think it's a little strange to add BIOS code to Wozmon, I would instead have implemented a new reset routine in BIOS that set up the input buffer and called the Wozmon reset routine when it was done. That's more a preference thing, though, as I think of Wozmon as an application, where as you might think of it as part of the BIOS.
Richard
I agree, my instinct would be to solve everything at once. Youre breaking it up into little problems that fit in a neat video. One thing that would improve this video is mentioning the fact that the write pointer can overrun the readpointer while coding the interrupt handler and just say we’ll worry about that later. Right now its an open question that you only adress at the end
tim1724
Great video! I didn't see any problems. It's well paced and waiting for the next one to handle flow control feels right, as there's a lot to absorb here. You don't want to overflow the buffers in any viewers' brains after all!