[MSX-C] Q&A official thread

Page 57/68
50 | 51 | 52 | 53 | 54 | 55 | 56 | | 58 | 59 | 60 | 61 | 62

By ~mk~

Champion (328)

~mk~'s picture

10-04-2021, 02:00

By rolandve

Champion (358)

rolandve's picture

10-04-2021, 09:56

Ok, that explains a lot. Thanks.

By rolandve

Champion (358)

rolandve's picture

10-04-2021, 10:23

That would at least tell me whether it is MSX 1 or Two. Not MSX2+ or Turbo. I just scanned the MSX-C library and found that the documentation talks about a wrtslt() function but it has no rdslt() function. Weird.

By ToriHino

Paladin (855)

ToriHino's picture

10-04-2021, 12:32

For MSX-C it is mentioned on page 63, but my Japanese is a bit rusty ;)

By AxelStone

Prophet (3199)

AxelStone's picture

19-04-2021, 12:21

Hello, the translated documentation doesn't provide so much info:

https://www.fvue.nl/wiki/MSX-C_manual

By CodeIndigo

Supporter (16)

CodeIndigo's picture

16-08-2021, 22:47

I asked this in the Fusion-C thread but figured I'd ask here, too-- my understanding of the docs indicates that I should be able to change the palette used in Screen 4, but I'm having trouble figuring out how to do it in C. Is this going to have to be a wrapper for an asm call or is this already solved?

By AxelStone

Prophet (3199)

AxelStone's picture

17-08-2021, 07:59

CodeIndigo wrote:

I asked this in the Fusion-C thread but figured I'd ask here, too-- my understanding of the docs indicates that I should be able to change the palette used in Screen 4, but I'm having trouble figuring out how to do it in C. Is this going to have to be a wrapper for an asm call or is this already solved?

Hello, in SC4 the address where palete is stored is different from SC5, you only need to write the new palette in the right address. Here goes a sample function in MSX-C to change palette in SC4 and SC5:

/* Carga la paleta a partir de un fichero de paleta. Parametros:
	- char *pal: nombre del fichero de paleta */
VOID ldpltf(pal) 
char *pal;
{
	FILE *fp;
	NAT paladr,palori[16];
	if(c_screen==(BYTE)4) {
		 paladr = 0x1B80;
	 } else if(c_screen==(BYTE)5) {
		 paladr = 0x7680;
	 } else {
		 screen(SCREEN0);
		 printf("Screen %d no soportado para paleta",(int)c_screen);
		 exit(0);
	 }
	 fp=fopen(pal,"rb");
	 if(fp!=NULL) {
		 fread(palori,sizeof(char),7,fp);
		 fread(palori,sizeof(NAT),16,fp);
		 ldirvm(paladr,palori,sizeof(NAT)*16);
		 fclose(fp);
		 rstplt();
	 } else {
		 screen(SCREEN0);
		 printf("Error restaurando el archivo de paleta %s\n",pal);
	 }
}

By CodeIndigo

Supporter (16)

CodeIndigo's picture

25-08-2021, 16:20

Thank you for the help. I ended up realizing that MSX-C is significantly different from Fusion-C, but this did spur me to write an implementation in Fusion-C.

By rolandve

Champion (358)

rolandve's picture

09-01-2023, 22:16

Hi all,
while compiling tiny.c with msxc, I get a symbol overflow

pool                   7490/9256
symbol table      4275/4266
hash.                  2220/2848

I can see that symbol table is 9 bigger then 4266. So that might explain the overflow.

I can use -r for the ratios, but I dont understand how it works. When I use -r with any ration (ex -r4:3:3) then all other values (in both columns) also change. Anyone got an idea? Thanks!

By Sylvester

Hero (589)

Sylvester's picture

09-01-2023, 23:20

Did you check https://www.lavandeira.net/2015/02/relearning-msx-13-msx-c-c... ? it contains some info about the ratio param of the CF executable.

Page 57/68
50 | 51 | 52 | 53 | 54 | 55 | 56 | | 58 | 59 | 60 | 61 | 62