Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow Device to load rom data #19

Closed
greenfox1505 opened this issue Apr 2, 2024 · 3 comments
Closed

Allow Device to load rom data #19

greenfox1505 opened this issue Apr 2, 2024 · 3 comments

Comments

@greenfox1505
Copy link
Contributor

Allow Device to load by buffer instead of by rom path.

let data = fs::read(rom_name).unwrap(); //this will come from an external source
let a = Device::new_cgb_from_buffer(data,true);

I'd also like to extract the save data via Device.

I'm using rboy as a library and I want to have more control over where files save, etc.

@mvdnes
Copy link
Owner

mvdnes commented Apr 6, 2024

I think this is a great idea!
I have pushed some changes in 4a05e1e, does this cover your use cases?

@greenfox1505
Copy link
Contributor Author

Oh, cool! That was quick, I was nearly going to do it myself. The first thing I can think of to add though would be a dirty flag like the GPU so I can update only when something's changed.

@mvdnes
Copy link
Owner

mvdnes commented Apr 11, 2024

I am closing this issue as I think the original question is answered.
Feel free to make a pull request for the dirty flag feature.

@mvdnes mvdnes closed this as completed Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants