Jump to content
  • 0

saving a ram bank in assembly


JohnGill
 Share

Question

Hi all, I'm afraid it's the assembled blunderer here again,

I've written a routine that's supposed to save a specified ram bank to disk, in this case, ram bank 2.

The routine compiles and runs fine, and outputs a file of the correct size (8194 bytes: 2 header bytes + 8192 data bytes), the header bytes even show the correct $00 $0A.

Hurrah thinks I - my assembly skills are finally improving. But apparently not - the data in the written file is just some random junk, not what was in memory at $A000-$BFFF.

It should be $09 and $06 alternating, as shown in the third screenshot.

*Sigh*   

 

I'm hoping a kind person can spot a stupid mistake in my code....

please and thank you.

Bitmap in Untitled-1.png

Untitled-1.png

Untitled-2.png

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

I've run into the same issue before. It appears that, at least with R37, that the kernal does not support saving from banked RAM. I have had to copy data to low RAM prior to saving, by reserving the space needed for the saved file. I have posted that as an issue on GitHub, and hopefully that gets addressed with the next release.

  • Thanks 1
Link to comment
Share on other sites

  • 0
16 hours ago, SlithyMatt said:

I've run into the same issue before. It appears that, at least with R37, that the kernal does not support saving from banked RAM. I have had to copy data to low RAM prior to saving, by reserving the space needed for the saved file. I have posted that as an issue on GitHub, and hopefully that gets addressed with the next release.

Thanks Matt - great to know it's not just me being a doofus again!!! 😄  😄

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

Please review our Terms of Use