#garfield Logs
Aug 18 2021
#garfield Calendar
08:11 AM aandrew: yeah this is all NiMH
08:51 AM rue_mohr: polprog, wait whats the new board your playing with
09:28 AM polprog: it's a mainboard from a fiscal printer
09:29 AM polprog: I put my own flash in it and im programming it
09:29 AM polprog: I have to figure out where SRAM lives
09:29 AM rue_mohr: ah
09:29 AM rue_mohr: ask it
09:29 AM rue_mohr: :)
09:29 AM polprog: :P
09:29 AM polprog: for real
09:29 AM polprog: i took some photos, gonna reverse engineer it later
09:30 AM polprog: ill make some notes now and go do other things i should be doing
09:30 AM rue_mohr: yea, set up a spare io pin on the ram CS and have it walk addresses and look for the CS line
09:30 AM rue_mohr: report the start and end address it finds it via a serial port
09:30 AM polprog: hmmm, very clever!
09:30 AM polprog: Serial IO is rather hard with no data available
09:30 AM polprog: i have to make a super position independent code, i cant even use a string
09:30 AM rue_mohr: its 8051 serial is built in
09:30 AM polprog: i know
09:31 AM polprog: but its hard to make it print a legible string
09:31 AM rue_mohr: hmm
09:31 AM rue_mohr: as an 8051, there are a few things you can be sure of
09:31 AM rue_mohr: start vector and some basic io
09:31 AM rue_mohr: the io is built into the instructions
09:31 AM polprog: did you see the video on twitter?
09:32 AM polprog: thats where i am
09:32 AM rue_mohr: video? no
09:32 AM rue_mohr: huh
09:32 AM rue_mohr: I found it amusing that your doing that with that and I'm trying to break into hard drive controllers
09:32 AM polprog: https://twitter.com/polprogpl/status/1427801117405196299
09:32 AM polprog: the code for that is literally
09:33 AM polprog: SBUF = 'H'; while(..); sleep sleep; SBUF = 'a' ....
09:33 AM rue_mohr: twitt is having media issues it seems
09:33 AM rue_mohr: I have to run off to work
09:33 AM polprog: gimme a sec
09:33 AM polprog: https://cdn.discordapp.com/attachments/771800691273760778/877359920847134760/IMG_20210818_031339.jpg
09:34 AM rue_mohr: I saw that
10:12 AM polprog: i tried reversing that on a photo but i think ill try your trick too
04:02 PM polprog: it seems that the only time SRAM's CE# and OE# go low the address is 0x00FF
04:02 PM polprog: it doesnt make sense because i am fetching addresses which are XXX0h
04:05 PM polprog: now ce goes low only at 0xXX21
04:05 PM polprog: wtf
04:09 PM polprog: i was probing the wromg thing maybe? strange
04:12 PM polprog: ok
04:13 PM polprog: im getting closer
04:13 PM polprog: A12 is always high when the SRAM CE# and OE# go low
04:14 PM Tom_L: using a scope?
04:23 PM polprog: yeah
04:23 PM polprog: still doesnt make sense
04:23 PM polprog: i have digital channels 0-7 on A0-A7
04:23 PM polprog: and then im using ch1 as CE# and CH2 to poke the rest of the adddress buss
04:23 PM polprog: ohh now it makes a sensible access pattern
04:23 PM polprog: now that I reset it
04:24 PM polprog: i can see it is making subsequent reads (im making it read subsequent memory cells)
04:25 PM polprog: so the CE# dips show up on the scope for a second
04:25 PM polprog: and then they disappear
04:25 PM polprog: and come back, and so on
04:25 PM polprog: they disappear when it is reading memory that is not mapped to SRAM
04:25 PM polprog: good
04:25 PM polprog: very good
04:27 PM polprog: ok, looks like SRAM is active when accessing addresses with A15=0, rest=X
04:28 PM polprog: which would make sense as its a 32k SRAM, so 0000-7FFF
04:30 PM polprog: and looks like i have to add more delay from reset
05:08 PM polprog: ok, now code memory strings work fine
05:08 PM polprog: gotta make printf run now
05:08 PM polprog: and see how to fix it needing the large delat at boot
05:08 PM polprog: delay*
06:23 PM polprog: gah the flash chip broke
06:23 PM polprog: that sucks, i have no replacements
07:09 PM rue_mohr: wellit looks like your having fun
07:10 PM rue_mohr: the flash chip broke!?!?
07:10 PM rue_mohr: "broke"....
07:10 PM rue_mohr: is there a story there?
08:13 PM rue_mohr: so the cpld went wrong
08:13 PM rue_mohr: came home and the greenhouse pump was just running continious
08:18 PM rue_mohr: my data channeled processor has 35 valid paths
08:19 PM rue_mohr: thats... not a power of 2
08:21 PM Tom_L: bad program or what?
08:21 PM Tom_L: greenhouse a swimming pool?
08:55 PM rue_mohr: no the intake was high
08:57 PM Tom_L: didn't hurt the pump did it?
08:58 PM rue_mohr: not sure
08:58 PM rue_mohr: {later}
08:58 PM rue_mohr: playing with this micro cpu thing
09:28 PM Tom_L: what cpu thing?
09:29 PM rue_mohr: its documented really badly
09:29 PM rue_mohr: https://hackaday.io/project/161251-1-square-inch-ttl-cpu
09:30 PM rue_mohr: its quite interesting tho
09:30 PM rue_mohr: not just from an fpga aspect
09:30 PM rue_mohr: but from its arch.
09:30 PM rue_mohr: its a stupidly simple processor that emulates a more complex cpu
09:31 PM Tom_L: huh
09:31 PM rue_mohr: like taking an 8051 and having it emulate a 8088
09:31 PM rue_mohr: but it brings up an interesting point
09:31 PM rue_mohr: outside of building it on a fpga
09:32 PM rue_mohr: the idea of taking *any* processor and using it as a microcode engine for emulating something else
09:32 PM rue_mohr: because you see, then nonally can you make versions that turn any processor into that cpu your emulating
09:33 PM rue_mohr: but you can emulate something with an available c compiler and basically run it on any processor
09:34 PM rue_mohr: there are nuances that make that more complex to implement, but there is an idea that has my interest
09:34 PM rue_mohr: a 6502 based 386 would be halarious
09:35 PM rue_mohr: "how I ran linux on a 6502"
09:35 PM Tom_L: hah
09:36 PM rue_mohr: so, I have to try option 2, the local shipping company doesn't cross the border, even with their co-companies
09:38 PM rue_mohr: if I was going to emulate a processor, I recon a risc is a good idea, keep the work down writing instructions
09:40 PM rue_shop3: so, when you look into that little processor
09:40 PM rue_shop3: it doesn't look practical to do on an fpga, due to the huge rom he uses
09:40 PM rue_shop3: but when you really take it apart, you find out he's only using 512 bytes of it
10:13 PM rue_mohr: its also interesting looking at is as an almost static instruction seuqnce that works with data to create quite dynamic operation
10:42 PM rue_mohr: the UPS had 44 transfers on it yesterday morning
10:42 PM rue_mohr: today its got 147
10:42 PM rue_mohr: something is wrong
10:42 PM rue_mohr: somewehre
10:42 PM rue_mohr: they are doing power line work tho
10:46 PM Tom_L: that unstable?
10:47 PM rue_mohr: not sure
10:47 PM rue_mohr: its fine now