ZEsarUX beta 5.1
Re: ZEsarUX beta 5.1
An old request but that I hope to see realized sooner or later (or I'll try myself when I'll complete all debugging and enhancements setup): is possible to have a flag to write a profile dump file?
To explain better:
It would be really useful to understand which part of the program is executed the most in order to optimize it the most. I think this is quite general.
A simple counter of number of instruction fetched at instruction level would be enough. A more elaborate way would be to add (not substitute) also the T-States spent, but this is really not so important since if you look well it's enough clear, even if there are instruction with T-States that depends on operands.
It can be a simple array of 64K long integers, initialized to 0 at the beginning, with cells incremented during instruction fetch, and simply written to a text file at the program exit.
Cesar, what do you think about it?
To explain better:
It would be really useful to understand which part of the program is executed the most in order to optimize it the most. I think this is quite general.
A simple counter of number of instruction fetched at instruction level would be enough. A more elaborate way would be to add (not substitute) also the T-States spent, but this is really not so important since if you look well it's enough clear, even if there are instruction with T-States that depends on operands.
It can be a simple array of 64K long integers, initialized to 0 at the beginning, with cells incremented during instruction fetch, and simply written to a text file at the program exit.
Cesar, what do you think about it?
- chernandezba
- Posts: 206
- Joined: Tue Mar 11, 2014 4:30 pm
Re: ZEsarUX beta 5.1
Try Cpu transaction log (on debug menu)
- chernandezba
- Posts: 206
- Joined: Tue Mar 11, 2014 4:30 pm
Re: ZEsarUX beta 5.1
Sorry I don’t understand what is this trace file about
Re: ZEsarUX beta 5.1
I already did, time ago, but the result was a file of many gigabystes even for a very small computation, and it has to be post-processed to arrive to the identification of the number of execution of each instruction!...
Anyway it is surely a good candidate place for the change!
Re: ZEsarUX beta 5.1
The trace on port $35 / $53 !chernandezba wrote: ↑Sun Oct 22, 2017 12:18 pm Sorry I don’t understand what is this trace file about
- chernandezba
- Posts: 206
- Joined: Tue Mar 11, 2014 4:30 pm
Re: ZEsarUX beta 5.1
Hi
This is an old thread but I want to follow it as I have added ZEsarUX hardware debug ports for ZX80/81
I have chosen these ports 35H/53H for register/value ports, and I have added a new register port (6) to output a byte to a file. The file must be chosen from settings->debug->byte file setting
This is documented here:
https://github.com/chernandezba/zesarux ... isters.txt
And I have created a simple ZX81 test program to do the outs:
https://github.com/chernandezba/zesarux ... xi-ports.p
These two files are (of course) included on the ZEsarUX source code.
To test it, you must compile from sources or wait to the next beta or stable ZEsarUX build.
I hope this will be useful for you (and others)
Regards
Cesar
Re: ZEsarUX beta 5.1
Wow, you really "expanded" the concept, nice!!! )
- chernandezba
- Posts: 206
- Joined: Tue Mar 11, 2014 4:30 pm
Re: ZEsarUX beta 5.1
Ciao Cesar, long time have passed but we are doing retrocomputing for a reason, aren't we?chernandezba wrote: ↑Mon Apr 02, 2018 8:02 pm And I have created a simple ZX81 test program to do the outs:
https://github.com/chernandezba/zesarux ... xi-ports.p
I was trying to use the feature (and took me some time to convert my old logging) but seems not working and your test program doesn't exist anymore.
The code I'm using is:
Code: Select all
ld a,6
out (0x35),a
ld a,"H"
out (0x53),a
Code: Select all
/opt/zesarux/zesarux --hardware-debug-ports --hardware-debug-ports-byte-file ./debug.dump \
--machine ZX81 --zx8081mem 2 myprog.p
For completeness I'm using Linux (Manjaro fully updated) and last version of zesarux available in AUR (9.1).
- chernandezba
- Posts: 206
- Joined: Tue Mar 11, 2014 4:30 pm
Re: ZEsarUX beta 5.1
the example program is here:
https://github.com/chernandezba/zesarux ... xi-ports.p
All the extras folder were moved to another repo some time ago
My example program still works
I think I know your problem, your out can NOT be done as out (n),a, you must use out (c),a , as my ports are exactly 0035h and 0053h, not XX35H nor XX53H
My sample program does:
4082 LD BC,0035
4085 LD A,06
4087 OUT (C),A
4089 LD BC,0053
408C LD A,08 (or whatever the value)
408E OUT (C),A
4090 RET
Cheers
https://github.com/chernandezba/zesarux ... xi-ports.p
All the extras folder were moved to another repo some time ago
My example program still works
I think I know your problem, your out can NOT be done as out (n),a, you must use out (c),a , as my ports are exactly 0035h and 0053h, not XX35H nor XX53H
My sample program does:
4082 LD BC,0035
4085 LD A,06
4087 OUT (C),A
4089 LD BC,0053
408C LD A,08 (or whatever the value)
408E OUT (C),A
4090 RET
Cheers