Jump to content
  • 0
Sign in to follow this  
JohnGill

loading full ram banks in basic

Question

Hi all,

I'm having a problem with loading completely full ram banks from disk in BASIC. I've got a file that's 8194 bytes (2 location header bytes + 8192 data bytes) and when I try and load it up with:

POKE $9F61,1: load"bank1.prg",8,1,$a000

then it just loads memory with a bank full of zeros, seemingly ignoring the file completely.

If I trim 2 bytes off the "bank1.prg" file size, to exactly 8192 bytes (2 location header bytes +8190 data bytes) then it loads into the bank fine, leaving two empty bytes at the end of the bank.

Am I doing something wrong, or is this an emulator "feature" that needs addressing? 😉 

thanks

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0
Posted (edited)

I think this is more of a Basic or even Kernal problem. It looks like the location header is not taken into account when calculating the actual size. What happens if you load let's say 4k? If then 2 bytes are missing as well, then it's consistent. If not, then there is some error in there.

What happens if you load the 8k into base memory? Let's say at 16k?

Edited by AndyMt
  • Thanks 1

Share this post


Link to post
Share on other sites
  • 0
16 hours ago, AndyMt said:

I think this is more of a Basic or even Kernal problem. It looks like the location header is not taken into account when calculating the actual size. What happens if you load let's say 4k? If then 2 bytes are missing as well, then it's consistent. If not, then there is some error in there.

What happens if you load the 8k into base memory? Let's say at 16k?

Thanks for this Andy, I'll investigate...

Share this post


Link to post
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.

Sign in to follow this  

×
×
  • Create New...

Important Information

Please review our Terms of Use