Page 47 of 60

Re: TF CD32 Riser Revision 2 Design Complete

Posted: 23 Nov 2020 22:31
by 8 Bit Dreams
01.01.78 is the point to start to count from if no RTC was detected..🤔

Re: TF CD32 Riser Revision 2 Design Complete

Posted: 23 Nov 2020 22:39
by matt020
On every boot, or just cold start?

Re: TF CD32 Riser Revision 2 Design Complete

Posted: 23 Nov 2020 22:42
by arkadiusz.makarenko
matt020 wrote: 23 Nov 2020 22:39 On every boot, or just cold start?
Cold start only.

Re: TF CD32 Riser Revision 2 Design Complete

Posted: 23 Nov 2020 22:43
by arkadiusz.makarenko
8 Bit Dreams wrote: 23 Nov 2020 22:31 01.01.78 is the point to start to count from if no RTC was detected..🤔
Amiga is looking for values in control registers.
I don't know what it is expecting to see there to detect it.

With ATK I did see source code, here I am blind.

Re: TF CD32 Riser Revision 2 Design Complete

Posted: 24 Nov 2020 12:00
by arkadiusz.makarenko
Some progress update.

RTC still is not detected by system correctly, this causes OS to set up default datetime. To be fair I don't emulate control registers at all, except one entry to pass test in ATK.
I can see that system is setting up 24h format and few other settings before deciding to bail off and refresh values.
In the worst case scenario I will disable writes to RTC, and will write separate tool to set date/time, which would not be the end of the world. :)

Issue with mouse controls in games like Transarctica was caused by something I was not aware of.
There is register called JOYTEST which allows writes to Joy0dat and joy1dat registers. This game resets the counters after each read, this way they simply ready values as deltas. One less issue on my list. :)

I made some progress on tool to set up sensitivity (and maybe some more settings in the future), values need to be 2 to the power n to make mouse work smoothly, so just need to add validation and expand comments in Usage.

Re: TF CD32 Riser Revision 2 Design Complete

Posted: 24 Nov 2020 12:06
by matt020
Can I please just say (again), that I am watching your posts with amazement and admiration for what you are doing. I am really looking forward to the final product. Keep up the good work, I think you it would be fair to say you probably have quite a fan base watching :D

Re: TF CD32 Riser Revision 2 Design Complete

Posted: 24 Nov 2020 22:33
by arkadiusz.makarenko
And another mystery solved :)

My RTC was being reset for very obvious reason when you think about it.
I do not persist control registers, so system after reboot checked if register 0xF has 24h time format, and I did provide reset value, instead of 24h format set. By simply hardcoding this to control register at boot i can fool Amiga to think that RTC has valid value.

I think I might be loosing like a second on each boot, but I might be able to do something about it. (It is not on boot, it is general slow clock - calibration needed)

PS.
I just realised that I have 4k battery backed up SRAM, and 32 - 32bit battery backed up registers. I might use it to persist settings like mouse sensitivity setting.

EDIT:
Next step is to find out how can I calibrate LSE.

EDIT2:
TIme is off far beyond calibration... need to check few things.
After I checked few things it is loosing a lot of time :D, I will order new crystals with different parameters (if available)

Re: TF CD32 Riser Revision 2 Design Complete

Posted: 26 Nov 2020 20:56
by arkadiusz.makarenko
OK Another progress.
I have replaced crystal temporarily to classical round one (waiting for order of other smd). I think I was unlucky, and this one was simply damaged.

Now clock keeps time OK. Still need to do overnight test to see how it keeps, but is is noticeable better.

My last issue is that during stm32 restart, due to initialization clock stopps and restarts again, this causes some delay. I did find some workarounds, but non of them are 100%. But now question is how accurate do we need to have RTC, what is practical. After like 10-15 reboot clock lost like 1sec. I think this is good enough. I don't want to spend days fighting for 100ms. I must say that this bit of development is getting dull, and honestly I would prefer to move on :D

Re: TF CD32 Riser Revision 2 Design Complete

Posted: 27 Nov 2020 08:52
by terriblefire
arkadiusz.makarenko wrote: 26 Nov 2020 20:56 OK Another progress.
I have replaced crystal temporarily to classical round one (waiting for order of other smd). I think I was unlucky, and this one was simply damaged.

Now clock keeps time OK. Still need to do overnight test to see how it keeps, but is is noticeable better.

My last issue is that during stm32 restart, due to initialization clock stopps and restarts again, this causes some delay. I did find some workarounds, but non of them are 100%. But now question is how accurate do we need to have RTC, what is practical. After like 10-15 reboot clock lost like 1sec. I think this is good enough. I don't want to spend days fighting for 100ms. I must say that this bit of development is getting dull, and honestly I would prefer to move on :D
Meh thats good enough.. For me if the time is kept to the right year its fine.

Re: TF CD32 Riser Revision 2 Design Complete

Posted: 28 Nov 2020 15:36
by arkadiusz.makarenko
terriblefire wrote: 27 Nov 2020 08:52
arkadiusz.makarenko wrote: 26 Nov 2020 20:56 OK Another progress.
I have replaced crystal temporarily to classical round one (waiting for order of other smd). I think I was unlucky, and this one was simply damaged.

Now clock keeps time OK. Still need to do overnight test to see how it keeps, but is is noticeable better.

My last issue is that during stm32 restart, due to initialization clock stopps and restarts again, this causes some delay. I did find some workarounds, but non of them are 100%. But now question is how accurate do we need to have RTC, what is practical. After like 10-15 reboot clock lost like 1sec. I think this is good enough. I don't want to spend days fighting for 100ms. I must say that this bit of development is getting dull, and honestly I would prefer to move on :D
Meh thats good enough.. For me if the time is kept to the right year its fine.
I am planning to update comments, tidy up the code and it is time to wrap it up for release this weekend.

The only thing is that current battery holder is a little bit clashing with DB23
2020-11-28 l.png
It is really pain to install battery, but with a little bit of patience still possible.
But battery draw like 1uA, so battery like this should last years.
2020-11-28 14_51_18-CR-1220_HFN Panasonic, Battery, Coin Cell, Single Cell _ Farnell.png
There is yet another type CR1220 SMD holder, need to check dimensions if it would change anything or make it worse.
2020-11-28 15_36_57-SMD Coin Cell - 12mm x 1 Battery Holder _ CH291-1220LF Farnell UK.png