Reserving a few bytes in top of MSX memory at startup

ページ 3/3
1 | 2 |

By zeilemaker54

Champion (342)

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 ?

By zeilemaker54

Champion (342)

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....

By brawaga

Resident (55)

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.

By S0urceror

Master (205)

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?

By zeilemaker54

Champion (342)

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.

By S0urceror

Master (205)

S0urceror さんの画像

25-08-2021, 07:27

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

ページ 3/3
1 | 2 |