Reserving a few bytes in top of MSX memory at startup

Page 3/3
1 | 2 |

Par zeilemaker54

Champion (338)

Portrait de zeilemaker54

04-12-2020, 14:37

NYYRIKKI wrote:

Just a thinking out loud... These TPA memory reservation issues for DOS, BASIC & ROM would need own Wiki-page I think.

I am willing to write such a Wiki. But it takes a little time to write a good article and produce some example code. I think the example code will be to large to put on the wiki page itself. Is there already a Git repository somewhere to put the code ? The wiki page could then redirect to the appropriate file in the Git repsitory. Any thoughts on that ?

Par zeilemaker54

Champion (338)

Portrait de zeilemaker54

22-12-2020, 19:46

zeilemaker54 wrote:

I am willing to write such a Wiki. But it takes a little time to write a good article and produce some example code. I think the example code will be to large to put on the wiki page itself. Is there already a Git repository somewhere to put the code ? The wiki page could then redirect to the appropriate file in the Git repsitory. Any thoughts on that ?

I have added some text and links to example code to the "Develop a program in cartridge ROM" wiki, section "Allocate RAM (workarea)". Hope this helps....

Par brawaga

Resident (54)

Portrait de brawaga

01-01-2021, 21:22

Thanks again, this probably makes more sense, hence H.STKE looked weird for me, H.CLEA is more clear for this usage. I will try this one: https://sourceforge.net/p/msxsyssrc/git/ci/master/tree/examp..., for now I used H.READ for postponed initialization without conflicts, but did not try to allocate memory in that phase. Hope your code will work for me.
What's F349h variable by the way? I did not find it in the list of system variables.

Par S0urceror

Master (202)

Portrait de S0urceror

24-08-2021, 19:15

@zeilemaker54, what does the extra H.LOPD code do, involving the mystery YF349 variable? You mentioned old diskrom(s). Which version?

Par zeilemaker54

Champion (338)

Portrait de zeilemaker54

25-08-2021, 07:15

S0urceror wrote:

@zeilemaker54, what does the extra H.LOPD code do, involving the mystery YF349 variable? You mentioned old diskrom(s). Which version?

YF349 or HIMSAV is used to store the value of HIMEM set by the MSX disksystem. It is being used to initialize HIMEM again when DiskBASIC is being started. The first versions of the diskrom (like the Philips YV-0010) did not take into account that an expansion could hook H.CLEA which could reserve some extra BASIC memory and therefor lowering HIMEM. HIMSAV was not updated to reflect this change. Later versions of the diskrom check for a hooked H.CLEA and hook H.LOPD to update HIMSAV to reflect a possible lowering of HIMEM.
Hope this helps.

Par S0urceror

Master (202)

Portrait de S0urceror

25-08-2021, 07:27

I also checked your ROM disassembly and figured this was the case. Thanks for explaining.

Page 3/3
1 | 2 |