![]() There’s no vertical synchronization, so I just restarted the board whenever I wanted to start a new stream. Because an entire row requires 18 operations ( set vertical address, set horizontal address, 16 times: write 16 pixels), and we display 64 rows per frame, a frame should take 64*18*41 µs =~ 47 ms, yielding around 21 fps Notes and limitations ![]() If my math is correct, the code is producing using 41 µs display operation time ( 50,000,000 MHz clock rate / 2048 divider per tick = 24,414 Hz ~= 41 µs). This should allow for around 100 frames per second (of 128*64 bits framebuffer). ![]() I got an acceptable result when using 1 MBaud transmit rate. The final thing remaining was to wire the UART receiver’s signals and continuously write to the dualported RAM, which gets read by my controller and fed to the display’s ST7920 chip. Then I extended the memory-mapped LCD controller I already prepared previously (for a text-mode) to have a larger buffer and use the graphic mode commands. I added a simple state machine around this reset mechanism. The UART receiver emits a signal rxReady when a byte ( rxData) is ready to be consumed, which needs to be cleared with rxReset. It works fine with baudrates up to 3 MBaud, which seems to be the maximum supported data rate for the CH340G USB-to-serial chip on my board. This time I didn’t roll my own, but I used an implementation from an article by sudonull The only required changes were adjusting the output framebuffer size to 1024 (128 * 64 bits) bits and experimenting with the baud rate until the frame rate was high enough. I already had a DOOM port with serial output handy from the previous article Recently I’ve been playing with displaying DOOM on various devices (a smart watch and a smallish IoT stick), and previously I also played with a 128圆4px LCD screenĪfter an afternoon of tinkering I got DOOM to display on my LCD screen, see the result for yourself: Modding DOOM ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |