{"action":"created","issue":{"url":"https://api.github.com/repos/MightyPirates/OpenComputers/issues/792","labels_url":"https://api.github.com/repos/MightyPirates/OpenComputers/issues/792/labels{/name}","comments_url":"https://api.github.com/repos/MightyPirates/OpenComputers/issues/792/comments","events_url":"https://api.github.com/repos/MightyPirates/OpenComputers/issues/792/events","html_url":"https://github.com/MightyPirates/OpenComputers/issues/792","id":53755281,"number":792,"title":"More realistic eeprom interface. ","user":{"login":"morlanius","id":4411672,"avatar_url":"https://avatars.githubusercontent.com/u/4411672?v=3","gravatar_id":"","url":"https://api.github.com/users/morlanius","html_url":"https://github.com/morlanius","followers_url":"https://api.github.com/users/morlanius/followers","following_url":"https://api.github.com/users/morlanius/following{/other_user}","gists_url":"https://api.github.com/users/morlanius/gists{/gist_id}","starred_url":"https://api.github.com/users/morlanius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/morlanius/subscriptions","organizations_url":"https://api.github.com/users/morlanius/orgs","repos_url":"https://api.github.com/users/morlanius/repos","events_url":"https://api.github.com/users/morlanius/events{/privacy}","received_events_url":"https://api.github.com/users/morlanius/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/MightyPirates/OpenComputers/labels/change","name":"change","color":"0052cc"},{"url":"https://api.github.com/repos/MightyPirates/OpenComputers/labels/feature","name":"feature","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-01-08T14:22:34Z","updated_at":"2015-01-11T12:03:30Z","closed_at":null,"body":"eeproms need to have a couple more functions to make it more realistic and add more functionality. By 'interface' I am referring only to the software interface only.\r\n\r\nint eeprom.getSize() // returns number of lines of the eeprom array.\r\n\r\nint eeprom.setLine(string data, int line_number) // returns true(1) on success, false(0) on fail, returns 2 if line replaced an existing, non-nil line\r\n\r\nstring data getLine(int line) // returns the string at [line], return false if [line]<eeprom.getSize()\r\n\r\nchar data getChar(int line, int chr) // returns the character on line [line] in potition[chr], returns false if line |or| character is nil\r\n\r\neeprom.chksum // data value self populated after a write operation\r\na simple 16 character hash based on the data being written similar to MD5. Read only value.\r\n\r\nstring data eeprom.getChksum() // return the eeproms' chksum value as a string.\r\n\r\neeprom.protected // Boolean data value. Prevents changes to the eeprom, think blowing protection fuses.\r\n\r\nBoolean eeprom.protect(string chkSum) // returns true on success, requires the chksum of the eeprom in order to prevent idiots from fusing everything.\r\n\r\nChanges to LuaBios\r\nset the protected data value to true and set the chkSum to a known string that does not use the standard chkSum routine to generate eg: \"Official LuaBios\" to assist in preventing a bios virus in a spoofed bios."},"comment":{"url":"https://api.github.com/repos/MightyPirates/OpenComputers/issues/comments/69492118","html_url":"https://github.com/MightyPirates/OpenComputers/issues/792#issuecomment-69492118","issue_url":"https://api.github.com/repos/MightyPirates/OpenComputers/issues/792","id":69492118,"user":{"login":"fnuecke","id":514903,"avatar_url":"https://avatars.githubusercontent.com/u/514903?v=3","gravatar_id":"","url":"https://api.github.com/users/fnuecke","html_url":"https://github.com/fnuecke","followers_url":"https://api.github.com/users/fnuecke/followers","following_url":"https://api.github.com/users/fnuecke/following{/other_user}","gists_url":"https://api.github.com/users/fnuecke/gists{/gist_id}","starred_url":"https://api.github.com/users/fnuecke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fnuecke/subscriptions","organizations_url":"https://api.github.com/users/fnuecke/orgs","repos_url":"https://api.github.com/users/fnuecke/repos","events_url":"https://api.github.com/users/fnuecke/events{/privacy}","received_events_url":"https://api.github.com/users/fnuecke/received_events","type":"User","site_admin":false},"created_at":"2015-01-11T12:03:30Z","updated_at":"2015-01-11T12:03:30Z","body":"Since there's even still `computer.setBootAddress` (and `get`), which is kind of redundant now, and which can be used for arbitrary data, I admit I don't think that random access to the EEPROMs has a high priority.\r\n\r\nGetting the size makes sense though, in particular now that there's a setting for it.\r\n\r\nAs for the `protect` call, that's interesting, and I agree fuses are indeed a good, realistic explanation for it. I'll see if that's as simple to add as I think it is."}}