Quantcast
Channel: stardot.org.uk
Viewing all articles
Browse latest Browse all 2345

programming • Re: Reading / Writing to RTC from BASIC

$
0
0
Thanks folks. I was aware that I couldn't write to FRED directly from the second processor and that is one of the reasons I was looking for a more official way of doing this.

From what I understand the official way of reading and writing to the RTC is via OSBYTE &A1 and &A2 calls, both of which are implemented in IBOS:

https://github.com/kgl2001/IntegraB-OS/ ... 2549-L2562

However, I was also looking for a way to do this when IBOS isn't available.

A bit of background...

Basically my new IntegraB V2 board, where all 16 SWROM banks can be assigned to SWRAM, has a special 'Recovery Mode' feature that is activated with a long break. When activated, and for about 500msecs after BREAK is released, read access to the RAM is disabled. The only banks that are readable during this period are the 4 ROM banks underneath the keyboard. So, on initialisation, the only banks that are visible to the OS are ROM banks 0..3. After the 500msecs period, the RAM banks then become available for normal read / write operations.

The idea is that you have BASIC and a file system ROM installed in these banks, and these only come into play during Recovery Mode. In normal operation, these would be mapped out, and replaced with the RAM banks.

Should the RAM become corrupt, then you can enter Recovery Mode, and wipe the corrupt RAM banks / re-install ROM images. RAM banks 0..3 are treated in a special 'Extended Features' way in Recovery Mode so they can also be accessed, even though ROMs are currently mapped into those banks. The extra banks used for the PALPROMs are also accessed via these 'Extended Features'.

From this Recovery Mode, I would also like to be able to clear / re-initialise the RTC CMOS parameters. As IBOS is not available in Recovery Mode (and I would prefer not to have it installed in one of the ROM banks under the keyboard), I was looking for an alternative way to read and write to the RTC.

I think the simplest thing to do here is add a bit of code to the Recovery utility that I am writing, that will prevent it from running if a Co-Pro is active.

Statistics: Posted by KenLowe — Tue Aug 20, 2024 7:06 pm



Viewing all articles
Browse latest Browse all 2345

Trending Articles