Convert image to V9990 P1 mode

Pagina 3/4
1 | 2 | | 4

Van aoineko

Paladin (899)

afbeelding van aoineko

16-11-2022, 08:36

I'm not sure if the question is addressed at me, but just in case: I use sdaz80, the default assembler for SDCC.

Van albs_br

Champion (468)

afbeelding van albs_br

16-11-2022, 13:55

assembler wrote:

Which assembler are you using?

TNIasm.
As MSXimg generates data on other asm dialect, I have to do a couple of replaces to fix. No big deal.

Van aoineko

Paladin (899)

afbeelding van aoineko

16-11-2022, 21:18

You can choose the format of numbers in the output assembler file with this option:

   -data ?         Text format for numbers
      dec          Decimal data (c & asm)
      hexa         Default hexadecimal data (depend on langage; default)
      hexa0x       Hexadecimal data (0xFF; c & asm)
      hexaH        Hexadecimal data (0FFh; asm only)
      hexa$        Hexadecimal data ($FF; asm only)
      hexa#        Hexadecimal data (#FF; asm only)
      bin          Binary data (11001100b; asm only)

If your assembler has other syntax constraints, don't hesitate to tell me; I could add them as an option.

Van albs_br

Champion (468)

afbeelding van albs_br

16-11-2022, 23:37

The tniasm uses the format
db 1, 2, 3
instead of
.db 1 2 3

That's the only differences I noted, it accepts all the format numbers above.

Van aoineko

Paladin (899)

afbeelding van aoineko

17-11-2022, 08:27

Is the comma mandatory?

Van albs_br

Champion (468)

afbeelding van albs_br

17-11-2022, 11:42

aoineko wrote:

Is the comma mandatory?

To my knowledge, it is. Maybe for making possible spaces inside binary numbers, as in 1110 0111 b.

You can check the tniasm.txt file with all documentation here: http://www.tni.nl/products/tniasm.html (v.0.45)

Van aoineko

Paladin (899)

afbeelding van aoineko

17-11-2022, 14:03

With the latest version of MSXimg (1.15.1), you can add the option "-asm tniasm" to get the data directly in the right format.
Let's me know if final comma is a problem or not.

Van albs_br

Champion (468)

afbeelding van albs_br

18-11-2022, 01:18

Thank you. It worked fine, just a small inconvenience: it leaves a comma after the last value and tniasm won't accept (most high level languages accept it).

Van Grauw

Ascended (10711)

afbeelding van Grauw

18-11-2022, 02:30

albs_br wrote:

The tniasm uses the format
db 1, 2, 3
instead of
.db 1 2 3

The former syntax is used by most Z80 assemblers… It’s standard Z80 assembly notation.

Van aoineko

Paladin (899)

afbeelding van aoineko

18-11-2022, 09:39

I know that. But I hope you won't mind me supporting sdasz80 first in my tools, since it is the assembler of SDCC and the heart of MSXgl. ^^

That said, I'd be happy to add support for all the other assemblers used by the MSX community, but I really don't have the courage to read the documentation for each of them.

db and dw seems standard; what about 32-bit integers?
Do they all support hexadecimal in the 0xFF format?
I had tried to ask for information a few years ago, but I had no answers.

Pagina 3/4
1 | 2 | | 4