Feature Request - HSync timing histogram

The Uzebox now have a fully functional emulator! Download and discuss it here.
Post Reply
CunningFellow
Posts: 1192
Joined: Mon Feb 11, 2013 8:08 am
Location: Brisbane, Australia

Feature Request - HSync timing histogram

Post by CunningFellow » Thu Jul 17, 2014 8:22 am

How hard would it be to add a visualization or a console output to UZEM that shows how many clock cycles there are between HSyncs ?

Ideally they would all be 1820 clocks.

The emulator has to count clock cycles and monitor the port pins anyways, so most the hard work should already be there I guess.

I think it would make life a lot easier for developing new video modes that are a little insane. I know it would have made TempestMode a lot quicker to make if it existed a year ago.

User avatar
uze6666
Site Admin
Posts: 4487
Joined: Tue Aug 12, 2008 9:13 pm
Location: Montreal, Canada
Contact:

Re: Feature Request - HSync timing histogram

Post by uze6666 » Fri Jul 18, 2014 6:00 am

Should not be *that* hard to implement. There's already a way to measure cycles deltas in the emulator using some rarely used instruction. It detects each two occurrences of it and dumps the count in the console. Could this be enough?

CunningFellow
Posts: 1192
Joined: Mon Feb 11, 2013 8:08 am
Location: Brisbane, Australia

Re: Feature Request - HSync timing histogram

Post by CunningFellow » Fri Jul 18, 2014 6:09 am

the watch dog reset thing?

I will see.

if I put a WDR on every HSync hopefully it wont flood the console too much for it to keep up.

CunningFellow
Posts: 1192
Joined: Mon Feb 11, 2013 8:08 am
Location: Brisbane, Australia

Re: Feature Request - HSync timing histogram

Post by CunningFellow » Mon Jul 21, 2014 4:31 am

Can someone point out how to use the WDR functionality.

Using really small words please 'cause I am dumb.

I put WDRs in my code, and I was expecting the output console (DOS) to show some output of clock cycles, but I got nothing.

I am using the precompiled Uzem v1.19.1

User avatar
uze6666
Site Admin
Posts: 4487
Joined: Tue Aug 12, 2008 9:13 pm
Location: Montreal, Canada
Contact:

Re: Feature Request - HSync timing histogram

Post by uze6666 » Wed Jul 23, 2014 4:44 am

Normally you just put a single WDR instruction and each time another one is encountered, it prints the elapsed cycles. But no wonder in does nothing, the actual print command was commented out at some point it seems.

Code: Select all

avr8.cpp, line 1230:
			case 0x95A8:
			    DIS("WDR");
			    //SDemulator.debug(true);
			    // Implement this if/when we need watchdog timer functionality.
			    if(prevWDR){
			       // printf("WDR measured %u cycles\n", cycleCounter - prevWDR);
			        prevWDR = 0;
Are you able compile uzem? Otherwise just let me know, and I'll make you a build.

CunningFellow
Posts: 1192
Joined: Mon Feb 11, 2013 8:08 am
Location: Brisbane, Australia

Re: Feature Request - HSync timing histogram

Post by CunningFellow » Wed Jul 23, 2014 4:52 am

Ah - I should have checked that in the source code.

I am not very good with all this modern fandangled C stuff. More used to good old ASM.

I should be able to compile it myself again though (I did it once when I added the timer interrupt to Uzem)

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest