MSX FUSION-C, Talking about bugs, errors, mistakes

Pagina 2/24
1 | | 3 | 4 | 5 | 6 | 7

Van ToriHino

Paladin (731)

afbeelding van ToriHino

01-02-2019, 00:57

It looks like the mapper functions only support working with the primary mapper. According the description in the book slotAddress 0 must be set to 0 for automatic installation, which is true indeed for the primary mapper. However when using another value (like 0x20 for 'try to allocate specified slot and, if it failed, try another slot (if any)') this correctly returns also pages from other mappers but using the Put_PN function this does not work. I think an additional call to ENASLT is needed in Put_PN to also select the correct memory slot.

Van ericb59

Paragon (1048)

afbeelding van ericb59

01-02-2019, 17:54

I'm not able to answer you, I will let Fernando take this problem and try to fix it.

Van Grauw

Ascended (10154)

afbeelding van Grauw

01-02-2019, 18:11

Although it is really good to not exclusively allocate from the primary mapper and I very much recommend this to everyone, I think you should call ENASLT yourself, like you have to do in assembly. If done automatically, it would unnecessarily slow down PUT_Pn when the slot doesn't change, because it can not cheaply determine the current selected slot and omit the ENASLT if unchanged. Though it could be abstracted away in a higher level library.

Van ToriHino

Paladin (731)

afbeelding van ToriHino

01-02-2019, 19:30

Fair point Grauw. The current abstraction of the library is on a level that indeed ENASLT should not be in there by default (perhaps as an option a PUT_Pn_EX or something witch takes an additional parameter for the slot).
With a higher abstraction (so including keeping of the administration) this could (or even should) be part of the library and even totally hidden from the user.

Van Pencioner

Scribe (1478)

afbeelding van Pencioner

01-02-2019, 20:00

I vote for having two functions, one which takes an additional slot parameter and perform ENASLT and other which do not. You have to select yourself which one you would be using

Van Francisco Gálvez

Resident (36)

afbeelding van Francisco Gálvez

09-02-2019, 15:00

Hi everybody...
I bought the book and I'm enjoying a lot.
I'm practising and trying to paint a circle in screen 2. It's easy but it doesn't seem to work below screen 5. I'll show you and example to explain myself better...

#include "fusion-c/header/msx_fusion.h"
#include "fusion-c/header/vdp_graph1.h"
#include "fusion-c/header/vdp_sprites.h"
#include "fusion-c/header/vdp_circle.h"

void main(void) 
	int j;
    	CircleFilled(50, 50,50, 15, 0);

It only shows a circle in screen 5 and above. I don't know if it is a bug or I'm doing something wrong.
Could someone give me a hand?

Thanks in advantage.

PS: I also found some written errors like Sprite16 and Sprites16 (It's mispelled in the book)

Van mi-chi

Scribe (11)

afbeelding van mi-chi

18-02-2019, 21:23

Your book is terrific, it contains a lot of information in very compact form. I was a promoter of the C language on MSX since the late 80's (Ascii-C, back then), and still using it after my comeback last year Tongue

I'm sure your book is doing a great job to give beginners of the language a jump-start not only on C, but on MSX at all. Let me please share my feedback list in this thread, to hopefully make it even better.

Pg 161-165:
There is some mixing and shuffling of wordings, e.g. screen 0 uses "Char Tiles", while screen 1 uses "BG Tiles" and screen 4 uses "Character patterns". I would like to suggest to harmonize the words in all modes that are similar, preferably use the wording from the Yamaha V9938 Technical Data Book (Char Tiles -> Pattern Generator Table, Char Map -> Pattern Name Table, ...) to make it easier to use the books side-by-side, and (given that the Japanese naming are not the best either), maybe do a small "glossary" in the introduction of the chapter to make it easier for beginners to understand the similarities.
For the readability of the code, adding a header file with enums for all of the constants would be good addition (and mentioning the enum-name in the book). I can share mine if there is some interest.

Pg. 161, Screen 2:
The color table says "2000 - 201F" -> must be "2000 - 37FF" (save size as pattern generator table)

Pg. 165, Screen 8:
Text says "Bits 2&4" and "5&7" -> "2-4", "5-7".

Pg. 178-179:
All end-addresses have one "F" too much (e.g. 0000 - 3FFFF).

Pg. 181 + 182: right table:
"Page 2, 0x8000 - 0xBFFFF" -> one "F" too much.
"Page 2, 0x4000 - 0x7BFF" -> ".. - 0x7FFF".
Pg. 182:
Text says: "...conecting page 2 (0x8000 - 0xBFFFF)..." -> one "F" too much.

That's it for now, will post more when I find any.

Keep up the good work!

Van Anata

Supporter (1)

afbeelding van Anata

18-02-2019, 23:42


In the sample code, I see that you are loading an SC8 file, but this file does not exist, and I do not know how to create one.
How do you create this type of file and with which software ?

Van ericb59

Paragon (1048)

afbeelding van ericb59

19-02-2019, 08:29

@Fransisco Galvez: Sorry I missed some posts !
The Circle functions was not done for MSX1 screen modes. But you can modify it
Just load Fusion-c/source/lib/circlefilled.c

Copy the CircleFilled function and paste it into your own program code. Rename it as : SC2CircleFille
Also, rename all the "Pset" instructions used in the function by "SC2Pset"

That's all. It must draw circle in screen2 mode

Van ericb59

Paragon (1048)

afbeelding van ericb59

19-02-2019, 08:33

@mi-chi : Thank you for pointing error and for your suggestions. I will make corrections.

Pagina 2/24
1 | | 3 | 4 | 5 | 6 | 7