summaryrefslogtreecommitdiff
path: root/src/bedrock.rs
Commit message (Collapse)AuthorAge
* Restructure the libraryBen Bridle2024-10-28
| | | | | | | | | | | | | | | | | | The main type of the library is now the BedrockEmulator type, which contains a new BedrockCore type and an instance of a user-implemented DeviceBus trait. This new structure makes it possible to hot-swap a device bus while a BedrockEmulator is running, which keeps the core and the device bus well separated. This was important when bedrock-pc was going to have two graphical emulator types and upgrade from one to the other once the screen device was accessed. The new structure also vastly simplifies the code previously required with the old Bedrock type, which was parametric over 16 device types and so needed each device type to be enumerated in every place the Bedrock type was stored. The new BedrockEmulator type is only parametric over the particular DeviceBus implementation.
* Record total elapsed processor cyclesBen Bridle2024-10-07
|
* Make Bedrock parametric over devicesBen Bridle2024-09-30
The core Bedrock struct is now parametric over individual Device structs, rather than over a single DeviceBus. This change was made so that devices can be implemented separately to one another. The implementation of the evaluate method has also been changed to make it potentially slightly more efficient, by replacing pop-then-push combinations with get operations.