Load Charset Direct to Correct Memory Location

Basic and Machine Language

Moderator: Moderators

Post Reply
User avatar
hawk
Vic 20 Afficionado
Posts: 342
Joined: Mon Jun 20, 2005 7:32 pm

Load Charset Direct to Correct Memory Location

Post by hawk »

Hi All,

I'm wondering whether it is possible to, when loading a program (from disk or tape) to load the character set data directly to a location that doesn't need moving, when the preogram is first loaded?...ie. when the screen location is set, the character set automatically changes to the remapped character set.

Where would the program be loaded to, and where would the character set reside?

I'm really only interested in >8K memory.

Does this make sense?

Hawk
User avatar
Mike
Herr VC
Posts: 4841
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: Load Charset Direct to Correct Memory Location

Post by Mike »

You probably want to single-file character set and payload with a BASIC stub. Try this: charset.zip
User avatar
hawk
Vic 20 Afficionado
Posts: 342
Joined: Mon Jun 20, 2005 7:32 pm

Re: Load Charset Direct to Correct Memory Location

Post by hawk »

Thanks for the program Mike, but I'm not sure what I'm looking at. From what I can see, this program would load to 0x1201. Is this correct?

It functions like I would expect. Where would the charset reside in memory...and in the file? The file appears to have padding to get the charst to appear in the correct location in memory when it loads. Does this mean that the charset would be at 0x1400?

Thanks,
Hawk
User avatar
Mike
Herr VC
Posts: 4841
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: Load Charset Direct to Correct Memory Location

Post by Mike »

hawk wrote:[...], this program would load to 0x1201. Is this correct?
Yes, that's what you would expect as load address for a BASIC program intended for +8K RAM or more.
[...] The file appears to have padding to get the charst to appear in the correct location in memory when it loads. Does this mean that the charset would be at 0x1400?
Yes. The character set can only be placed in 1K steps, in the internal RAM or the character ROM. That makes $1400 the first usable address under these circumstances (screen kept at $1000, BASIC start at $1201 and no shuffling around in memory), this also implies the necessary padding after the BASIC stub up to $13FF (which can be used though to hold small machine code parts or other data), and the full character set expands up to $1BFF. With the BASIC start now at $1C01, there needs to be a zero byte at $1C00, and then follows the payload, which you see with LIST after RUN.

You surely would want to save the character set along with changes in the payload, issue POKE44,18:SAVE"<filename>",8 in one line for this.
Post Reply