Author Topic: investigating port $2F  (Read 846 times)

0 Members and 1 Guest are viewing this topic.

Offline Eeems

  • Mr. Dictator
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6211
  • Rating: +318/-36
  • little oof
    • View Profile
    • Eeems
Re: investigating port $2F
« Reply #15 on: October 01, 2020, 06:25:37 pm »
My 84+ SE gave 21845, 21845, 21845, 21845
What hardware revision?
/e

Offline the_mad_joob

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 317
  • Rating: +45/-0
    • View Profile
Re: investigating port $2F
« Reply #16 on: October 01, 2020, 07:05:04 pm »
My 84+ SE gave 21845, 21845, 21845, 21845
Thanks !
Pretty fixed delays so far, except for Eeems' haunted calc.

What if TI hardcoded higher default delays on models with the infamous Novatek display driver ?
That would make sense, considering the OS only polls port $02, and port $2F setting for CPU speed 1 is already maxed for the 84+ & 84+SE.
« Last Edit: October 01, 2020, 07:26:15 pm by the_mad_joob »

Offline the_mad_joob

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 317
  • Rating: +45/-0
    • View Profile
Re: investigating port $2F
« Reply #17 on: October 02, 2020, 03:32:14 am »
Happy to run whatever you need to test :)
Cool.
This first program checks delays up to +16 cycles from what i originally posted, and only between IN A,($10) and IN A,($02) for now.
I hope that will be enough.
If everything goes well, you should get numbers in the form (2^n)-1.
« Last Edit: October 02, 2020, 03:55:18 am by the_mad_joob »

Offline Eeems

  • Mr. Dictator
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6211
  • Rating: +318/-36
  • little oof
    • View Profile
    • Eeems
Re: investigating port $2F
« Reply #18 on: October 02, 2020, 09:41:56 am »
Happy to run whatever you need to test :)
Cool.
This first program checks delays up to +16 cycles from what i originally posted, and only between IN A,($10) and IN A,($02) for now.
I hope that will be enough.
If everything goes well, you should get numbers in the form (2^n)-1.
65535, 65535, 65535, 65535
/e

Offline the_mad_joob

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 317
  • Rating: +45/-0
    • View Profile
Re: investigating port $2F
« Reply #19 on: October 02, 2020, 11:40:57 am »
65535, 65535, 65535, 65535
Thanks.
Those numbers mean that your port $02 uses exactly 1 more clock cycle for its delays, which sounds weird, but isn't impossible.
EEEMS3.8xp should confirm it anyway (basically my original program but with +1 cycle on all 64 checks).

Offline Eeems

  • Mr. Dictator
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6211
  • Rating: +318/-36
  • little oof
    • View Profile
    • Eeems
Re: investigating port $2F
« Reply #20 on: October 02, 2020, 11:43:57 am »
65535, 65535, 65535, 65535
Thanks.
Those numbers mean that your port $02 uses exactly 1 more clock cycle for its delays, which sounds weird, but isn't impossible.
EEEMS3.8xp should confirm it anyway (basically my original program but with +1 cycle on all 64 checks).
65535, 30583, 65535, 65535
/e

Offline the_mad_joob

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 317
  • Rating: +45/-0
    • View Profile
Re: investigating port $2F
« Reply #21 on: October 02, 2020, 12:16:25 pm »
65535, 30583, 65535, 65535
Those numbers suck, because they contradict the ones you got earlier =[
I mean, they are the numbers you're supposed to get if you got four 21845 on P2FTEST, but definitely not if you got four 0 from it.
Could you please (re-)run P2FTEST1 just in case ?
It now includes a check that kicks you if port $2A is unusual, which actually could have been the case if ALCDFIX was installed when you tested P2FTEST, and if you performed a RAM clear before testing EEEMS1.

Offline Eeems

  • Mr. Dictator
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6211
  • Rating: +318/-36
  • little oof
    • View Profile
    • Eeems
Re: investigating port $2F
« Reply #22 on: October 02, 2020, 12:48:25 pm »
65535, 30583, 65535, 65535
Those numbers suck, because they contradict the ones you got earlier =[
I mean, they are the numbers you're supposed to get if you got four 21845 on P2FTEST, but definitely not if you got four 0 from it.
Could you please (re-)run P2FTEST1 just in case ?
It now includes a check that kicks you if port $2A is unusual, which actually could have been the case if ALCDFIX was installed when you tested P2FTEST, and if you performed a RAM clear before testing EEEMS1.
I reran P2FTEST1 and I'm now getting 21845, 21845, 21845, 21845. I did have a ram clear happen that I forgot about. After launching DCS7 and then running it again I'm getting 0, 0, 0, 0 in both P2FTEST1 and EEEMS3.

EEEMS2 now returns 32767, 255, 7, 0
/e

Offline the_mad_joob

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 317
  • Rating: +45/-0
    • View Profile
Re: investigating port $2F
« Reply #23 on: October 02, 2020, 01:17:05 pm »
I reran P2FTEST1 and I'm now getting 21845, 21845, 21845, 21845.
Great news.

After launching DCS7 and then running it again I'm getting 0, 0, 0, 0 in both P2FTEST1 and EEEMS3.

EEEMS2 now returns 32767, 255, 7, 0
DCS might include some code similar to what ALCDFIX does.
However, it makes little sense, now that the updated P2FTEST1 kicks you if that's the case (instant return to TI-OS, you shouldn't see any number at all).

Anyway, i came with a more reliable algorithm idea for my project, that won't rely on reference delays.
And making it compatible will ALCDFIX or similar will add to the challenge.

You've been of great help, sir !

Offline the_mad_joob

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 317
  • Rating: +45/-0
    • View Profile
Re: investigating port $2F
« Reply #24 on: October 04, 2020, 07:23:02 am »
Holy moly...
Looks like i figured out most of the inconsistencies.
It appears some of the opcodes i used in my test programs take longer to process than i thought.
More specifically, EX (SP),HL actually lasts 20 cycles instead of 19, and PUSH AF lasts 12 instead of 11.
The culprit is port $2E, which by default adds 1 cycle to every write in memory.
With that in mind, i'm gonna write a new delay tester, hoping not to find more surprises.

EDIT :

Post#1 updated with the new delay values, which are way more consistent.
I also added a few more details on the inconsistencies i discovered, code examples soon to come.
« Last Edit: October 05, 2020, 08:04:20 am by the_mad_joob »