N64Wasm icon indicating copy to clipboard operation
N64Wasm copied to clipboard

Different way for saving states.

Open BeezBumba opened this issue 1 year ago • 7 comments

Instead of clicking two save and load state buttons, I could use the game instead. All of the games have a built in save option like OOT or SM64. How would you go by saving that way. I feel like it could help with accidentally clicking save state when loading a game so your progress is not erased.

BeezBumba avatar Jan 31 '24 02:01 BeezBumba

It already does that. Whenever you see the emulator saying "Saving Sram..." it is saving the Save File into the browser. Later if you come back and use the same rom file it will load that Save.

nbarkhina avatar Jan 31 '24 02:01 nbarkhina

Sorry for my part. I am still a little new to coding.

BeezBumba avatar Feb 01 '24 01:02 BeezBumba

Another question, I'm having a hard time finding where the canvas is given the width and height, I would like to have the canvas fill up the screen after you selected the rom. I don't like full screen, mainly on mobile, because when you go in full screen, the keyboard just does not work? It's a problem with safari I'm pretty sure.

BeezBumba avatar Feb 01 '24 01:02 BeezBumba

there's two places, if you are on mobile then it gets it from the window.innerWidth via the setupMobileMode() method in script.js

image

Then it calls resizeCanvas which actually sets the size.

image

in desktop mode it's based on the zoom setting. basically just set this.canvasSize to whatever you want and then call this.resizeCanvas()

nbarkhina avatar Feb 01 '24 02:02 nbarkhina

Thanks, but when i tried that out it will just fill the whole screen, but since its N64, the screen is more square. is there a way to unlock it so it can stretch based off screen width?

BeezBumba avatar Feb 01 '24 03:02 BeezBumba

that's what it already does it stretches based on screen width. the function resizeCanvas() maintains the correct aspect ratio. what's probably happening is that when the phone is in landscape the square is past the bottom of youre screen.

nbarkhina avatar Feb 01 '24 14:02 nbarkhina

Well how do I unlock aspect ratio. Another person already did it, https://lrusso.github.io/Nintendo64/Nintendo64.htm , but when you try to import the game, it only allows .n64 types. So changing the file extension might work.

BeezBumba avatar Feb 01 '24 21:02 BeezBumba