summaryrefslogtreecommitdiff
path: root/src/emulator.rs
Commit message (Collapse)AuthorAge
* Increase frame time to 8msBen Bridle2024-08-05
| | | | | This is slightly more efficient on the CPU, while not making any visible difference to the user.
* Update cursor callback to latest version of PhosphorBen Bridle2024-08-04
| | | | | The most recent Phosphor commit c141d8f unified the is_cursor_visible and cursor_icon callbacks.
* Implement fullscreen modeBen Bridle2024-07-31
| | | | Pressing F11 toggles emulator fullscreen mode.
* Improve frame-rate stabilityBen Bridle2024-07-31
| | | | | | | | | | | | | | | | | | Some frames would sporadically lag between on_process and on_render, because on_process would bail once one frame had elapsed since the end of the previous on_process, and the processor would not always reach a sleep point in this time. This was really an issue to do with with the time taken between the end of the previous on_process and the start of the current on_process. To fix this, the on_process invocation will run the processor for a full frame, without subtracting the time elapsed between frames. This seems to have no negative effects. It also allows us to remove end_of_process from the emulator. The sleep in the Signal::Sleep handler has also been removed, because it serves no real purpose and will most likely cause issues in the future.
* Expose window title of emulatorBen Bridle2024-07-30
| | | | | | The window title of the emulator can be set when constructing a new instance of the emulator. This is useful when a Bedrock program is baked into the emulator for distribution.
* Rework main loop timingsBen Bridle2024-07-30
| | | | | | | The program is vastly more efficient to run, consuming only 1.5% CPU instead of 13% during testing on Windows 10. Input events are handled four times as frequently now, which makes for smoother lines when drawing in Cobalt.
* Flush stream device before printing debug informationBen Bridle2024-06-01
| | | | | | Without this, text pushed to the stream device before a debug instruction would often display after the output for that debug instruction.
* Flush file contents each frame and when closing the fileBen Bridle2024-04-24
|
* Fix memory deviceBen Bridle2024-04-22
| | | | | | | | | | | There was confusion between the role of the page_limit variable in the memory device, where it was being used to mean both the absolute upper limit of pages that are allowed to be allocated, but also to mean the number of pages that the program would like to be allocated when needed. To fix this, the program is now just told the full number of pages that it is allowed to use, without first requiring that the program request a particular number of pages.
* Fix memory, input, screen, and file devicesBen Bridle2024-04-16
| | | | | | | The memory device was never being allocated any memory, the input device wasn't scrolling correctly, the screen device was rendering sprites incorrectly, and the device ID of the file device had not been changed over from 0xA to 0x9.
* Update devices to match new specificationsBen Bridle2024-04-16
|
* First commitv0.1.0Ben Bridle2023-12-24