Z80 timing

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

Van aoineko

Paladin (809)

afbeelding van aoineko

12-02-2022, 11:37

Thanks for the tip.
In my case I need to compare different source files compiled with SDCC and it is much easier to do it in a text editor without having to generate the final program.
The extension for VSCode seems to work just fine.
Thanks ! \o/

Van Bengalack

Paladin (714)

afbeelding van Bengalack

12-02-2022, 12:37

aoineko wrote:

The extension for VSCode seems to work just fine.
Thanks ! \o/

That extension is great - I've been using it all the time! The only thing I miss is to be able to add my own macros. It would have been great if it could have understood macros Smile

ARTRAG wrote:

This is the best
http://msx.jannone.org/bit/

It's just that it does not add the extra MSX-wait states. That is a bit annoying.

Grauw wrote:

It is documented on the MSX Assembly Page

And then there is even more to it. When you work with the VDP, depending on the MSX Engine used, the I/O delay varies. 0, 1 or 2 extra wait states: https://www.msx.org/wiki/Toshiba_T9769#Differences_between_r...

Soo, all in all, a bit complex thing.

Van theNestruo

Champion (398)

afbeelding van theNestruo

12-02-2022, 12:40

jltursan wrote:

No idea if it fully works with sdasz80; but you can try with VSCode and its plugin Z80 Assembly Meter. It has some nice tuning parameters and I'm sure theNestruo can help you to make it work :)

aoineko wrote:

SDCC is listed on the description page, I guess it is supported.
Thanks, I'll give it a try.

Thankyou!
I'm not an SDCC user myself, so please let me know if you find any problem (either here, a github issue, twitter, etc.); I'll be happy to help!

Van theNestruo

Champion (398)

afbeelding van theNestruo

12-02-2022, 12:54

Bengalack wrote:
aoineko wrote:

The extension for VSCode seems to work just fine.
Thanks ! \o/

That extension is great - I've been using it all the time! The only thing I miss is to be able to add my own macros. It would have been great if it could have understood macros Smile

Hi, Bengalack!
Instruction detection is line-based, and symbols and expression are not actually evaluated so adding proper macro support would require a complete rewrite (it would be a complete assembler rather than the simple parser it is now into)...
However, I did some internal improvements to support SjASMPlus alternative syntax and fake instructions, and I think that code can be used to support simple user-defined macros.
If re-defining those macros in your settings.json is acceptable (like this line, for example), please open a github issue (or this thread, or an email, etc.) with a couple example macros and I'll take a look at it!
I'm afraid that reading the macros from the actual sources is beyond my VSCode-extension-coder-newbie skills :_D

Van aoineko

Paladin (809)

afbeelding van aoineko

12-02-2022, 14:48

@theNestruo Do you think it would be easy to extract your evaluator tool to make it a command line tool ?
I would love to have some numbers while playing with compile parameters to see the impact on the overall performance.

Van theNestruo

Champion (398)

afbeelding van theNestruo

12-02-2022, 15:14

aoineko wrote:

@theNestruo Do you think it would be easy to extract your evaluator tool to make it a command line tool ?
I would love to have some numbers while playing with compile parameters to see the impact on the overall performance.

This extension is the first thing I coded something in TypeScript and, to be honest, I even don't know if TypeScript can be used to create command line utilities :_D.
Beside selecting the text and reading the configuration from settings, the code its pretty straightforward so it should be easy extract the relevant parts (to create a TypeScript cli tool) or migrate it to another language (such as Java). Code is here, btw.
Please take a look at Reidrac's z80count and Santi Ontañon's mdlz80optimizer as they may suit better this particular scenario (z80count may be easier to convert to cli, and mdlz80optimizar maybe already have a "report" on the original source code time/size).

Van Grauw

Ascended (10683)

afbeelding van Grauw

12-02-2022, 15:44

jltursan wrote:

No idea if it fully works with sdasz80; but you can try with VSCode and its plugin Z80 Assembly Meter. It has some nice tuning parameters and I'm sure theNestruo can help you to make it work :)

I’m also a happy user, props to theNestruo :).

Van aoineko

Paladin (809)

afbeelding van aoineko

12-02-2022, 16:38

theNestruo wrote:

Please take a look at Reidrac's z80count and Santi Ontañon's mdlz80optimizer as they may suit better this particular scenario (z80count may be easier to convert to cli, and mdlz80optimizar maybe already have a "report" on the original source code time/size).

I tried MDL (I am already trying to include it into the MSXgl build chain) but I didn't found a way to get global statistics. With -asm+ I can get line by line timing and size but not global ones.

I'll try z80count.

Van santiontanon

Paragon (1734)

afbeelding van santiontanon

12-02-2022, 18:32

@aoineko, happy to add any functionality that might be helpful to MDL! For timing of individual instructions and small functions, I think theNestruo's plugin might be best. But if you want to measure larger blocks of code, I would be happy to add some quick functionality for that, e.g., passing in as parameters the start and end labels to count (or just count the whole thing), and then print the stats. Should not be hard at all. What would be the most useful?

Van aoineko

Paladin (809)

afbeelding van aoineko

12-02-2022, 18:49

Being able to generate a report on timing and code size per function and per file, would be really great. Smile

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