English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Asm / Hardware

 
 
Thread Tools
Old 20 September 2021, 03:47   #41
modrobert
old bearded fool

modrobert's Avatar
 
Join Date: Jan 2010
Location: Bangkok
Age: 54
Posts: 608
Quote:
Originally Posted by saimo View Post
For the details, check out the meticulous comments in the code itself.
And, yes, my routines are used exclusively when the OS is off (that's the whole point: I need the routines precisely because the OS is off/trashed)
Yes, I did check your code, looks professional, easy to follow. I have worked with code to access I2C before, both in hardware (VHDL) and software.

My point was more about the reason C= turns off interrupts completely with Disable() before accessing NVRAM, perhaps there is some conflict which is happening when you run with interrupts enabled?

So far these functions I checked in the library call Disable() in the beginning and Enable() towards the end:

GetCopyNV()
StoreNV()
DeleteNV()
GetNVList()

When you use the term "OS off/trashed" I assume you mean Forbid(), which is not the same as turning off all interrupts, it only disables multitasking.
modrobert is offline  
Old 20 September 2021, 13:21   #42
saimo
Registered User
saimo's Avatar
 
Join Date: Aug 2010
Location: Italy
Posts: 475
Quote:
Originally Posted by modrobert View Post
I have worked with code to access I2C before, both in hardware (VHDL) and software.
That's a great help. This is the first time for me, instead.

Quote:
My point was more about the reason C= turns off interrupts completely with Disable() before accessing NVRAM, perhaps there is some conflict which is happening when you run with interrupts enabled?
The first thing that comes to mind is ensuring that timings don't get disrupted, but in the datasheet there's nothing that suggests that operations should be obligatorily done in a certain amount of time (i.e. stretching the clock isn't an issue, while shortening it is) - so, I'd exclude this.
Maybe it's related to Akiko (seems unlikely to me, though)?
Or it could be just a safety measure to prevent corruption due to misbehaving tasks or even parallel attempts at accessing the NVRAM.

Quote:
When you use the term "OS off/trashed" I assume you mean Forbid(), which is not the same as turning off all interrupts, it only disables multitasking.
Nope, I mean Disable(), no interrupt enabled afterwards and possibly completely trashed OS (due to need of RAM). The only thing my code doesn't do (yet) is executing the routines in supervisor / level 7 interrupts mode to exclude also interference by NMIs potentially generated by add-on hardware.
saimo is offline  
Old 20 September 2021, 14:34   #43
modrobert
old bearded fool

modrobert's Avatar
 
Join Date: Jan 2010
Location: Bangkok
Age: 54
Posts: 608
Quote:
Originally Posted by saimo View Post
Nope, I mean Disable(), no interrupt enabled afterwards and possibly completely trashed OS (due to need of RAM). The only thing my code doesn't do (yet) is executing the routines in supervisor / level 7 interrupts mode to exclude also interference by NMIs potentially generated by add-on hardware.
Aha, OK, my mistake. I thought you used the CIA timer, but noticed now you only read the address to cause a predictable delay.
modrobert is offline  
Old 20 September 2021, 18:54   #44
saimo
Registered User
saimo's Avatar
 
Join Date: Aug 2010
Location: Italy
Posts: 475
No problem!
saimo is offline  
Old 23 September 2021, 17:28   #45
saimo
Registered User
saimo's Avatar
 
Join Date: Aug 2010
Location: Italy
Posts: 475
I have updated the test archive: the executable in this one executes the routines in level 7 interrupt mode, so that nothing could ever interfere - but, honestly, I don't think this changes anything...
saimo is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Extend CD32 NVRAM? Akira Hardware mods 41 16 December 2018 14:59
CD32 NVRAM management Akira support.Hardware 9 20 February 2012 13:27
Access CD32-NVRam from Shell Retro1234 support.Other 3 08 August 2010 11:50
CD32 nvram file...? Christian support.WinUAE 11 13 December 2006 22:25
Cd32 Nvram Phantomz request.Apps 5 16 March 2003 21:09

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 12:18.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.
Page generated in 0.09587 seconds with 14 queries