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

Keep memory dump sparse #3

Open
kitlith opened this issue Dec 9, 2019 · 0 comments
Open

Keep memory dump sparse #3

kitlith opened this issue Dec 9, 2019 · 0 comments

Comments

@kitlith
Copy link
Owner

kitlith commented Dec 9, 2019

// cpu.memory is a sparse js 'array', let's convert it to a full 64KiB array before downloading
var memory = new Uint8Array(0x10000);
for (key in cpu.memory) {
memory[key] = cpu.memory[key];
}

Currently, I am converting the sparse array into a full 64KiB array before creating an ELF with it. instead, we can create a section for each set of consecutive addresses and save on filesize.

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

1 participant