|
Post by Pyrofer on Jun 22, 2016 19:05:24 GMT
So I just found out there is a single chip that has an RTC and battery backed up 32k sram. It also has 5v operation and JEDEC standard pinout. This chip seems meant to go into the 128. The clock information gets mapped into the last few bytes of it's 32k of ram.
So the plan is this. Place the chip in U36. Find a way to write to the chip while it is in U36 (some kind of shadow write by connecting the WR enable via a jumper wire to the write pin on the actual ram?). Then write some U36 option rom code that takes control of the 128 on boot, copies the RTC data from the bytes in that ram and puts them in the correct ToD locations then maps the memory back to normal (getting rid of the option rom mapping) and continues normal boot process.
This means the 128 will automatically load it's RTC into the ToD on power up with no special software at all. A real RTC that is compatible with almost all software.
Now I don't know enough about the U36 and the boot process so would appreciate input from people more clever than me. I have 2 of the chips on order but they seem a bit "end of life"ish. So who knows on future availability.
|
|
|
Post by cthulhu on Jun 23, 2016 9:28:14 GMT
I tried to do the same using a DS1216E ROM Smartwatch, but with zero success. Could be faulty component or bad programming on my side. I can dig up and share the code here if someone is interested.
|
|
|
Post by Pyrofer on Jun 23, 2016 12:39:13 GMT
That chip says it uses a funky "Pattern match register" to access the RTC data. The chip I picked just maps the RTC into a few bytes of the ram itself.
When you say zero success, what did you try and what failed?
Did you put it in U36? You had the "ROM" version? was it blank? Did you bank in the U36? I would be very interested in hearing more about what you tried.
|
|
|
Post by nonefornow on Jun 23, 2016 17:44:33 GMT
|
|
|
Post by Pyrofer on Jun 23, 2016 19:01:26 GMT
Thanks. I will read that. Just waiting for the chip to turn up.
|
|
|
Post by cthulhu on Jun 24, 2016 12:33:16 GMT
That chip says it uses a funky "Pattern match register" to access the RTC data. The chip I picked just maps the RTC into a few bytes of the ram itself. When you say zero success, what did you try and what failed? Did you put it in U36? You had the "ROM" version? was it blank? Did you bank in the U36? I would be very interested in hearing more about what you tried. Yes, I had the ROM version, put in the U36 socket. I tried with and without adding a ROM chip with some (working) utility software on top of it and wrote some assembler code to set and read time from the RTC, following the official documentation I found on-line, but it never worked for me. Again, it could be just me: I'm not an expert at 6502 assembler programming at all!
|
|
|
Post by cthulhu on Jun 24, 2016 12:38:04 GMT
|
|
|
Post by Pyrofer on Jun 24, 2016 15:08:12 GMT
So looking at the docs for my chip, which by the way is quite different from the ones mentioned here that require funky access to get to the RTC data (mine just puts it in the ram) I noticed the only real difference is A14 has moved because of the Vpp and R/W pins.
So I will need to either make a PCB adapter or just lift those 3 pins before inserting the chip and solder jumper wires onto them.
My only question is this, how does the system know to map in the U36 ROM space? Does it look for code in the rom like a cartridge or is there a keycheck in the boot sequence?
I will obviously need to bank in the U36 space in order to read the RTC ram locations. The plan is to put this code in the non-volatile ram itself but for initial testing I just want to manually bank it in and see if I can see the contents of those memory locations.
Now, I assume as when it's active writes are sent only to the "shadow" ram underneath that anything written will come back as 00 (or ff? Not sure what fills the ram to start with!) rather than what I write, which is hidden in the real ram?
So I can test if it's banked in correctly simply by writing and reading from the those memory locations?
Anyway, rambling. Will update when I have some tests in the bank.
|
|
|
Post by VDC 8x2 on Jun 24, 2016 18:19:36 GMT
If it is ram it should be r/w able
|
|
|
Post by Pyrofer on Jun 24, 2016 18:26:21 GMT
Yeah, but there is no R/W pin on the socket. So without a jumper wire to the R/W pin elsewhere on the PCB I won't be able to write to it. I might see if I can get away with bending the pins, worried I will break them though.
|
|