1
0
mirror of https://github.com/sehugg/8bitworkshop.git synced 2024-11-29 14:51:17 +00:00

state.mem for c64

This commit is contained in:
Steven Hugg 2019-12-28 11:07:01 -06:00
parent e1b19b8119
commit 2d921e68e6
2 changed files with 6 additions and 5 deletions

4
.github/FUNDING.yml vendored
View File

@ -1,4 +0,0 @@
# These are supported funding model platforms
#github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: 8bitworkshop

View File

@ -1288,9 +1288,14 @@ export class WASMMachine implements Machine {
} }
saveState() { saveState() {
this.exports.machine_save_state(this.sys, this.stateptr); this.exports.machine_save_state(this.sys, this.stateptr);
/*
for (var i=0; i<this.statearr.length; i++)
if (this.statearr[i] == 0xa0 && this.statearr[i+1] == 0x4d && this.statearr[i+2] == 0xe2) console.log(hex(i));
*/
return { return {
c:this.getCPUState(), c:this.getCPUState(),
state:this.statearr.slice(0) state:this.statearr.slice(0),
ram:this.statearr.slice(18640, 18640+0x200), // ZP and stack
}; };
} }
loadState(state) : void { loadState(state) : void {