MSX Application Templates for MS Visual Studio

Pagina 4/5
1 | 2 | 3 | | 5

Van ToriHino

Champion (493)

afbeelding van ToriHino

27-02-2020, 20:32

DId some more testing and still found problems with the variables used in the make script.

As an example, when I set in TargetConfig_Release.txt:

MSX_FILE_NAME		TEST
MSX_FILE_EXTENSION 	COM
MSX_BIN_PATH		..\..\[PROFILE]\bin
MSX_OBJ_PATH		..\..\[PROFILE]\objs\[MSX_FILE_NAME]
MSX_DEV_PATH		..\..\..\..
MSX_LIB_PATH		[MSX_DEV_PATH]\libs

In the make output i see the following:

1>Filesystem settings:
1>MSX_FILE_NAME=TEST
1>MSX_OBJ_PATH=..\..\Release\objs\MSXAPP
1>MSX_BIN_PATH=..\..\Release\bin
1>MSX_DEV_PATH=..\..\..\..
1>MSX_LIB_PATH=..\..\..\libs

So it looks like all settings are filled in using the initial default settings of the make file itself, in stead of starting to use the already new defined values.

Van DamnedAngel

Master (184)

afbeelding van DamnedAngel

20-03-2020, 06:54

Hi ToriHino,

I am sorry for the delay.

I am not being able ro reproduce the behaviour you are reporting.

Using templates version 00.03.03, when I set TargetConfig_Release.txt to:

MSX_FILE_NAME		TEST
MSX_FILE_EXTENSION  COM
MSX_BIN_PATH		..\..\[PROFILE]\bin
MSX_OBJ_PATH		..\..\[PROFILE]\objs\[MSX_FILE_NAME]
MSX_DEV_PATH		..\..\..\..
MSX_LIB_PATH		[MSX_DEV_PATH]\libs

I get

1>Filesystem settings:
1>MSX_FILE_NAME=TEST
1>MSX_OBJ_PATH=..\..\Release\objs\TEST
1>MSX_BIN_PATH=..\..\Release\bin
1>MSX_DEV_PATH=..\..\..\..
1>MSX_LIB_PATH=..\..\..\..\libs

Would you please check that your compilation log starts with this header:

1>-----------------------------------------------------------------------------------
1>MSX SDCC MAKEFILE by Danilo Angelo, 2020
1>version 00.03.03 - Codename ISA
1>-----------------------------------------------------------------------------------

best,

Van ToriHino

Champion (493)

afbeelding van ToriHino

20-03-2020, 16:55

I started all over with 'version 00.03.03 - Codename ISA', and now indeed it works as expected. So for me the issue is resolved as well Smile Maybe there was still some mix up with the previous version.

Van DamnedAngel

Master (184)

afbeelding van DamnedAngel

20-03-2020, 17:22

Great!

Thanks for reporting back.

Let me know if you encounter any other issues.

best,

Van Bengalack

Expert (118)

afbeelding van Bengalack

22-04-2020, 20:01

Is it possible to make a .com-file that loads into page 1 / 0x4000 and onwards? From your scripts I tried to change the code_loc to 0x4000, but that only makes the file becomes ~16k bigger, ie. the contents from around 0x0100-0x4000 is random data (I reckon).

Van ducasp

Champion (273)

afbeelding van ducasp

22-04-2020, 21:27

Bengalack wrote:

Is it possible to make a .com-file that loads into page 1 / 0x4000 and onwards? From your scripts I tried to change the code_loc to 0x4000, but that only makes the file becomes ~16k bigger, ie. the contents from around 0x0100-0x4000 is random data (I reckon).

Yeah, because the program start is @ 0x0100 in MSX DOS no matter what, so SDCC will need to at least put a jump to 0x4000 there, also if you are using one of the MSX DOS CRTs, those sit in 0x100 to 0x1something... Then you will have the CRT at 0x0100 doing initializations, passed parameters, etc, and a jump/call to 0x4000 where your code starts.

So, it is not possible to load data only @0x4000 for a .COM file, it has to at least in the bare minimum have a JP 0x4000 @0x0100 if you use no CRT and do all C initialization by yourself. The space between the end of CRT and 0x4000 is filled with data to allow the program to load @0x4000, not sure but I guess MSX DOS doesn't have provision to have a COM file that loads only to certain bits of memory, it probably just dump the whole COM file starting @ 0x0100 and then CALL 0x0100.

Van Bengalack

Expert (118)

afbeelding van Bengalack

22-04-2020, 21:34

Ok. I was afraid of that :/

But ok!

Thanks.

Van DamnedAngel

Master (184)

afbeelding van DamnedAngel

22-05-2020, 01:40

Bengalack wrote:

Is it possible to make a .com-file that loads into page 1 / 0x4000 and onwards? .

No, BUT...

You could easily have an entry code at 0100h that moves the rest of your binary to 4000h. For that you have to write a very simple LDIR entry routine to your program, and append your 4000h-based compiled application after the entry routine.

It loads, moves your application to 4000h and the executes it from there. Would that be a viable solution?

Why do you need your program to sit at 4000h?

- BTW, be sure to check the MSX Template Pack v00.04.00. Now it has ROM support.

Van Grauw

Ascended (8914)

afbeelding van Grauw

22-05-2020, 03:16

Use LDDR actually probably unless your application stays under 4000H bytes Smile.

Van Bengalack

Expert (118)

afbeelding van Bengalack

22-05-2020, 10:03

4000h was just an example using another page than 0. The real issue is to move to page 3 or C000h, for scanning all mapped memory segments as fallback-code when MSX-DOS2 isn't there to help you. Page 3 remains "static" in place, and your code will run from there. My code is currently a mix of C and asm. In my current setup it seems like there can only be one ".org"-statement in the code. Seems like I need to move more and more into asm and split up the make-file to something more complex.

Pagina 4/5
1 | 2 | 3 | | 5