MSXgl – A new C game library for MSX

ページ 25/27
18 | 19 | 20 | 21 | 22 | 23 | 24 | | 26 | 27

By retro69

Resident (47)

retro69 さんの画像

19-06-2023, 19:30

Thank you all for your feedback.

I guess I missed to point out in my original posting that I have added the dimX++ error deliberately to provoke contradicting error messages.

I understand now that

  • the value a const variable in C may not necessarily be known at compile time
  • SDCC does not check if in a specific case the value can be determined at compile time

I also understand that the C11 standard regards variable length arrays as optional only. However, this is not quite was I was looking for. In my case, it would have been already sufficient if the compiler would check if the value of the const variable can be determined at compile time. As it does not perform this check, it can consequently only throw an error.

As discussed, I will now use preprocessor directives instead.

By ToriHino

Paladin (925)

ToriHino さんの画像

09-07-2023, 11:58

Another question about the mapper segment compiling: is it possible to let the build script look in additional folders for the _s?_b? files? It looks like for the .c files they only work now in the root project folder, adding them to AddSources does not help.

The reason behind this is because I want to generate both the _s?_b? header and source files into a subfolder called 'generated', to keep them out of the other source files.

By aoineko

Paragon (1134)

aoineko さんの画像

09-07-2023, 13:49

I think you can use ProjSegments option in your project config to use segment in another directory.
ProjSegments = "subdir/segname" should search for segname_s?_b? files in /subdir/ folder.
I say 'should' because I can't test right now.
But all segments have to be in the same directory.

By retro69

Resident (47)

retro69 さんの画像

16-07-2023, 16:47

I have created a simple hello world program for DOS. However, I had to start this manually in openMSX as MSXgl always seems to start the C-BIOS generic MSX configurations which do not support disk drives. I have already tried to add manually a floppy interface extension but all I get is an error message in the emulator saying that C-BIOS can not execute BASIC. Is it possible to select a specific MSX computer for the emulator ? This way I could pick a model which includes a disk drive.

Thank you very much.

By Manuel

Ascended (19677)

Manuel さんの画像

16-07-2023, 17:25

By aoineko

Paragon (1134)

aoineko さんの画像

16-07-2023, 19:37

Just set EmulMachine = false; in your project config and the Build tool will stop setting the machine at startup.

With openMSX we have no way to set the MSX generation (1, 2, 2+ and turbo R) except by forcing a specific machine (and as the vanilla version only include C-BIOS, this is the only available default option).

By retro69

Resident (47)

retro69 さんの画像

16-07-2023, 20:31

This did the trick, thank you very much !

By ToriHino

Paladin (925)

ToriHino さんの画像

18-07-2023, 08:42

aoineko wrote:

I think you can use ProjSegments option in your project config to use segment in another directory.
ProjSegments = "subdir/segname" should search for segname_s?_b? files in /subdir/ folder.
I say 'should' because I can't test right now.
But all segments have to be in the same directory.

That almost works. The files source files are indeed also generated in the subdir folder, however the linker can't find the .rel file because it is looking in that same subdir as well (while the .rel files are generated in the out folder). Tried as a workaround to generate the files to the out folder as well, but then the linker looks in the out/out/ folder for the .rel files.

By aoineko

Paragon (1134)

aoineko さんの画像

18-07-2023, 09:13

I made a clean fix (using ProjSegments to set directory and base name).
I have many changes in my pending list so I'll make more test tonight before pushing a new version on GitHub.
I'll let you know when it's ready.

By aoineko

Paragon (1134)

aoineko さんの画像

19-07-2023, 01:36

@ToriHino ProjSegments="subdir/segname"; should works fine with the last version on GitHub (v0.9.8).
It is used now for s_arkos and s_vgm samples.

BTW, MSXgl got an official logo Smile

ページ 25/27
18 | 19 | 20 | 21 | 22 | 23 | 24 | | 26 | 27