whitequark changed the topic of #glasgow to: glasgow debug tool · code https://github.com/GlasgowEmbedded/Glasgow · logs https://freenode.irclog.whitequark.org/glasgow
<ZirconiumX> whitequark: your OPL2 server has me tempted to write something similar for the OPNA, if only I could acquire one.
<whitequark> ZirconiumX: i will have OPNAs
<whitequark> i will have all yamaha chips i have found on ebay
<whitequark> once they arrive
<whitequark> in fact OPNAs are already on their way
<whitequark> OPNBs not yet ordered
<ZirconiumX> A guy on eBay wants £19 plus shipping for one
<ZirconiumX> I also kinda want to bus snoop a PS2, though the chips are sadly too modern for a hobbyist decapper
<ZirconiumX> Still gotta laugh at how terrible Sony's region locking was on the 1 and 2 though.
<whitequark> you want me to delayer PS2 and put it under SEM?
<whitequark> i can just use a commercial SEM service, it would cost me something like uhhh
<whitequark> around $100 for five samples?
<whitequark> i'll need to work out a schedule with the lab
<ZirconiumX> My PS2 is kinda dead, so it's not really a loss to me if it goes to science
<ZirconiumX> There are a lot of chips on the PS2, and I am *quite poor*
<ZirconiumX> Still though
<ZirconiumX> You have my attention
<ZirconiumX> Shipping is going to be interesting though.
<whitequark> can you desolder them?
<whitequark> i mean, i'm sure you can, a gas stove works in a pinch
<ZirconiumX> They're BGA surface mount
<ZirconiumX> By the way, whitequark, when you say "sample", do you mean silicon layer or chip?
<whitequark> i think the lab normally wants you to ship them five different things to image
<whitequark> to batch setup cost
<whitequark> but i want to image one thing five times
<whitequark> so i would have to work it out with them
<ZirconiumX> If I ship the chips/board to you and then whenever I have the free cash throw $100 at you, would that work?
<ZirconiumX> So you can do it a chip at a time
<ZirconiumX> I'm curious about the chips, but not enough to starve myself :P
<whitequark> a chip is not a sample
<whitequark> you need to SEM it at least two times plus the number of metal layers
<whitequark> i'm not sure which process PS2 uses
<whitequark> i *think* it would be most efficient to parallelize all chips
<whitequark> ie image MZ, MY, MX... poly, active
<whitequark> n samples * m layers
<ZirconiumX> I *believe* my chips are the 250nm era
<whitequark> the important question is how much metal
<whitequark> can you give me some part number
<ZirconiumX> The chip I'm most curious about is a CXP103049-203GG MECHACON
<ZirconiumX> I can read out all the part numbers I'm interested in if you want
<whitequark> five metal
<whitequark> so, that's seven trips to the SEM
<whitequark> unsure if i could delayer it on site
<ZirconiumX> I'm too poor to read it :(
<whitequark> you don't need to
<whitequark> it says five metal right in the abstract
<ZirconiumX> Mmm.
<ZirconiumX> So that's a quote of $700 for this chip?
<ZirconiumX> Or did I mess up the math?
<whitequark> going from their ad on $craigslist, yes
<whitequark> but i will need to talk to them
<whitequark> maybe i can delayer it on site, then it'd be much cheaper
<ZirconiumX> It'd probably help if I had $700, too.
<whitequark> there's also two labs, so i could call the other one
<ZirconiumX> We have a saying of "window shopping costs nothing" here
<ZirconiumX> $700 for something the width of my thumb square
<davidc__> I'm willing to image stuff, but I currently have no way to do sample prep; so it'd probably be a lot of time in the mail
<ZirconiumX> I have six/seven chips that we need to understand to fully emulate the PS2
<whitequark> ZirconiumX: so that means the same $700 for all of them
<whitequark> going off the sticker price
<ZirconiumX> $4900.
<whitequark> no
<whitequark> oh
<whitequark> you mean for all layers
jevinskie has joined #glasgow
<whitequark> well yeah i suppose
<whitequark> but it's highly likely i can talk them down
<ZirconiumX> And this is where I feel incredibly, mind-numbingly poor
<ZirconiumX> Because that's two thirds of a year's student loan
<whitequark> i mean yeah
<whitequark> i normally subsidize preservation projects but you gotta make it interesting for me to do that
<ZirconiumX> Well, PS2 emulation at the moment sucks
<ZirconiumX> You need cycle-accuracy to get something that resembles actual hardware
<whitequark> i mean sure but how do i start giving a fuck about ps2
<ZirconiumX> Apparently one guy managed to decap all the chips and extract the data
<whitequark> it's just another obsolete platform
<whitequark> i have never* owned a game console
<whitequark> * i had a gameboy color for like one month. gameboys suck
<ZirconiumX> Have you ever spoken to byuu?
<whitequark> i think we had one conversation on twitter and then we blocked each other
<ZirconiumX> ... Okay, bad example
<whitequark> i think both of us independently decided that was dumb and reverted things back
<whitequark> i have no recollection of what the conversation was about
<ZirconiumX> Truthfully I didn't really give a damn about the PS2 for quite a while, growing up on the GameCube
<ZirconiumX> But the PS2 is dirt cheap at the moment, and I think it's a fun thing to dick about with
<whitequark> i'll likely need more than one set of chips
<ZirconiumX> If you don't want to spend your money, then *don't*. I'm just a person on the internet.
<whitequark> it's more that well, i'm building a lab to do delayers anyway
<ZirconiumX> But the hardware will eventually die; mine is not in the greatest of shape anyway
<ZirconiumX> Sony will eternally not give a fuck about their users
<ZirconiumX> So either somebody steps up, or we have to live with PCSX2 and its many, many bugs.
<whitequark> ok fine i guess that works
<whitequark> i can pay for at least part of SEM work
<whitequark> but i don't wanna buy consoles
<ZirconiumX> (most of which are due to lack of information on the system)
<whitequark> i guess you can throw ebay links to dead ps2s to me
<ZirconiumX> Presumably eBay US?
<whitequark> i am not in the US
<whitequark> first, because it's a fascist hellhole. second, because it criminalizes chemistry
<whitequark> i live in RU currently, which fares much better on the second issue but not so much on the first
<whitequark> thankfully we are interested in chemistry here
<whitequark> also, it is waaaay cheaper to rent SEM time in RU.
<ZirconiumX> ...UK it is then
<whitequark> in the US you'd be looking not at 4k$ but at 40k$
<whitequark> as for which ebay: any.
<whitequark> it's all international delivery via ems
<whitequark> costs about the same
<ZirconiumX> Would have been nice if Sony didn't make 5 different revisions of the PS2 all with different internals, but oh well
<whitequark> "Fat Unit Only"?
<ZirconiumX> This is actually the exact same model as the one I have
<ZirconiumX> Well, I figured you didn't want one of the combination boxes with games and controllers
<whitequark> oh it's more that "fat unit" sounds like it's describing a raccoon
<ZirconiumX> But if you skip along you'll see there's a picture of the model number: SCPH-39003
<ZirconiumX> It's the second of the three fat PS2 models
<ZirconiumX> But that gave me a laugh
<ZirconiumX> So I can ship you my board/dead console, that gives you two sets of the same chips
<ZirconiumX> Need more?
<whitequark> two is enough to start
<ZirconiumX> So, do you want me to buy it and have them ship it to you, or?
<whitequark> yeah that works
<ZirconiumX> Wonder how much shipping to Moscow is
<ZirconiumX> Or Russia in general
<ZirconiumX> (sorry, it's 2am and my brain is *fucked*)
<ZirconiumX> Oh, and whitequark, would you mind putting the die shots under a creative commons license?
<whitequark> it's usually around $20-$30
<whitequark> creative commons, sure
<whitequark> i normally do public domain equivalent
<whitequark> but i have no horse in ps2 race so whatever you want
<ZirconiumX> Public domain also works
<whitequark> glasgow is under 0-clause BSD which is as close to public domain as you can get
<ZirconiumX> CC0 is probably fine
<whitequark> yeah, CC0 for imagery
<ZirconiumX> Anyway, thanks for this, now I'm going to hit the hay.
<whitequark> night
jevinskie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jevinskie has joined #glasgow
<marcan> PS2 sounds like a huge target
<marcan> my "baby's first SEM netlist extraction" project is going to be the GBA, and that already looks pretty daunting
<marcan> ZirconiumX: ^
<marcan> CXP103049 is the mechacon, right? why is that so important for emulation? it's just the drive controller
<marcan> I figure for making PCSX2 suck less you'd be interested in EE/GS
<marcan> but those are going to be huge
_whitelogger has joined #glasgow
_whitelogger has joined #glasgow
_whitelogger has joined #glasgow
_whitelogger has joined #glasgow
ali-as has quit [Remote host closed the connection]
ali-as has joined #glasgow
<whitequark> marcan: ok, i had another horrible night
<whitequark> probably going to review stuff now
<whitequark> marcan: hmmm, so i've read your JED parser
<whitequark> have you looked at what i did for SVF?
<whitequark> i'm not sure if i'm trying to have a standard that's high or that's *too* high
<_whitenotifier> [GlasgowEmbedded/Glasgow] whitequark pushed 1 commit to master [+1/-0/±1] https://git.io/fhhS0
<_whitenotifier> [GlasgowEmbedded/Glasgow] whitequark ab9dc16 - protocol.jesd3: new protocol.
<whitequark> marcan: ok, so i ... i guess the word is "rewrote" your JED parser
<whitequark> to be clear, there wasn't anything wrong with it per se. i could (and maybe should) have merged it as-is.
<whitequark> i modified it for two reasons: a) i wanted to demonstrate, by example, the preferred way of writing parsers in Glasgow, and b) i had a horrible night and i find writing defensive parsers for awful formats fairly relaxing
<whitequark> anyway, now i'm going to comment on my changes
<whitequark> i added proper support for a bunch of features (all field formats, plus design spec with an explicit quirk flag) mostly because it was very easy.
<whitequark> i separated the bare grammar, concerned with specifying exact character sets, repetition counts, field separators, etc, from the parser actions
<whitequark> as a side effect, the grammar recognized by this parser is now very close to JESD3C spec. it's very slightly more permissive.
<whitequark> i made parser errors report the exact line and column where the error was encountered.
<whitequark> i made the parser explicitly error out on fields specified in wrong order (as per spec; the F field is the main offender here) as well as too many times (not in the spec, but the spec would be uselessly ambiguous if it implicitly permitted that)
<Jasjar> Sounds good
<whitequark> i specified explicit base in all numeric conversions, to make it easier to follow.
<whitequark> also cleaned up a bit checksum handling code, it was a bit too stringy
<whitequark> i added code to check for the case where F is not specified and not all fuse bits are set, as per the spec.
<_whitenotifier> [GlasgowEmbedded/Glasgow] whitequark pushed 1 commit to master [+1/-0/±1] https://git.io/fhhSz
<_whitenotifier> [GlasgowEmbedded/Glasgow] whitequark a573321 - protocol.jesd3: new protocol.
<whitequark> i tidied up the public interface (i.e. fields) a bit, to make it less redundant and to not export features we don't explicitly support. this is just opinion land.
<whitequark> oh and i renamed it to jesd3, since that's how the protocol is called. i think the standard doesn't mention .jed anywhere
<whitequark> it refers to S-files and P-files i think
jevinskie has quit [Read error: Connection reset by peer]
jevinskie has joined #glasgow
<_whitenotifier> [GlasgowEmbedded/Glasgow] whitequark pushed 2 commits to master [+0/-0/±4] https://git.io/fhh9G
<_whitenotifier> [GlasgowEmbedded/Glasgow] marcan 9912286 - applet.program.xc9500xl: refactor, XC9536XL support, JED file support.
<_whitenotifier> [GlasgowEmbedded/Glasgow] whitequark afd0a89 - cli: gracefully handle tool errors.
<whitequark> marcan: ok, so i made only three changes to the applet itself.
<whitequark> first, i made some logging code easier to read. you can specify padding width explicitly with "{:0{}b}", which sounds dumb but is the correct way to do it, apparently.
<whitequark> second, i made the jed-to-bit converter handle parser errors gracefully.
<whitequark> third, i made identify() return the xc95xx_iface right away, so that the code above it doesn't have to care about private members of the interfaces.
<whitequark> going to test it on real hardware now
<_whitenotifier> [Glasgow] whitequark commented on pull request #112: xc9500xl improvements - https://git.io/fhh98
<_whitenotifier> [Glasgow] whitequark closed pull request #112: xc9500xl improvements - https://git.io/fhhnT
<_whitenotifier> [Glasgow] whitequark deleted branch xc9500xl-improvements - https://git.io/fhhGp
<_whitenotifier> [GlasgowEmbedded/Glasgow] whitequark deleted branch xc9500xl-improvements
<ZirconiumX> marcan: the MECHACON is a SoC with embedded ROM and DSP; we know barely enough to HLE the MECHACON, because it's entirely undocumented. The EE and GS are documented, although not all of its secrets are given away.
<whitequark> marcan: ohhhhh
<whitequark> the USERCODE was reversed and that's why my PCI debug card has been showing USERCODE=_IPC
<whitequark> er, _ICP
<whitequark> which doesn't make sense
<_whitenotifier> [GlasgowEmbedded/Glasgow] whitequark pushed 2 commits to master [+0/-0/±2] https://git.io/fhhHZ
<_whitenotifier> [GlasgowEmbedded/Glasgow] whitequark a1d26ba - applet.program.xc9500xl: fix typos introduced in commit 9912286.
<_whitenotifier> [GlasgowEmbedded/Glasgow] whitequark 6184d6d - applet.program.xc9500xl: clarify note on programming failures.
<_whitenotifier> [Glasgow] whitequark closed issue #108: Verify XC9572XL programming on revC - https://git.io/fhhHc
<_whitenotifier> [Glasgow] whitequark commented on issue #108: Verify XC9572XL programming on revC - https://git.io/fhhHC
<whitequark> marcan: the applet still works well on my XC9572XL, and bit files match my reference files from many months ago
<whitequark> can you double check that JED conversion still works correctly? it should be fine, but still.
<whitequark> oh and any comment on my changes are welcome of course.
<ZirconiumX> Anyway, morning
<ZirconiumX> Late, but whatever
_whitelogger has joined #glasgow
_whitelogger has joined #glasgow
<marcan> whitequark: I saw what you did for SVF, but after looking at the JED spec I considered that to be overkill
<marcan> clearly you considered otherwise :p
<marcan> fwiw, if we're doing "real" parsers, have you considered PLY? it's what I've used for that in python, several times
<marcan> I was wondering about that padding thing, thanks for finding the right way to do it
<marcan> I looked and failed
<marcan> I *figured* there had to be a better way but I must've overlooked it
<marcan> ZirconiumX: yeah but does anything about the mechacon matter for games that isn't already HLE'd?
<marcan> I imagine most of the PCSX2 emulation problems don't have to do with the mechacon, but I might be wrong
<marcan> whitequark: re: review, busy for the rest of the day today but I can at least smoke test it, will comment later when I have some time
<ZirconiumX> marcan: timings are quite important, though you are probably correct in that decapping the EE/GS/IOP will be more immediately useful
<marcan> whitequark: btw, re: recycled CPLDs... one batch of XC9536XL we got from china had half of them popcorned
<marcan> no idea if they were pulled, one guess I had was that they were improperly stored and soldered without baking and then they pulled them from that
<marcan> like 30% didn't work
<marcan> whitequark: validated jed-to-bit and xc9536xl programming again
<marcan> whitequark: btw, should the default jtag freq for this applet be 1MHz? that's what impact seems to use for me
plaes has joined #glasgow
<plaes> wondering whether readme should include a link to https://github.com/SymbiFlow/prjtrellis (regarding the revE comment)
<ZirconiumX> whitequark: assuming you're still serious about the decapping, I'm gonna need a shipping address
<whitequark> ZirconiumX: give me a moment
<whitequark> marcan: i'm not a fan of the lex-yacc pipeline
<whitequark> marcan: but more importantly, PLY seems to heavily rely on globals
<whitequark> *can* it even work with multiple files?
<whitequark> you call "lex.lex()" to generate.
jevinskie has quit [Ping timeout: 250 seconds]
jevinski_ has joined #glasgow
<whitequark> marcan: re: not being a fan
<whitequark> e.g. look at how you'd handle STX and ETX with PLY
<whitequark> it's not pretty
<whitequark> i think using parsing tools like PLY is a perfectly fine approach when they fit well, and i'm open to adding one as a dependency
<whitequark> maybe not literally PLY, it just seems quite baroque to me, but maybe even literally it
<whitequark> would need to look closer at how it works
<whitequark> but it's also perfectly fine to *not* use them and handroll something like what i did for svf and jed
<whitequark> marcan: re impact: "It is recommended to use TCK frequency between 100 and 250 kHz for programming."
<whitequark> this is from the datasheet i think
<whitequark> feel free to change, i have no real opinion
<gruetzkopf> i'm poking at a maxim max6675 thermocouple DAC
<gruetzkopf> it seems to not mind being accessed with 2*8bit SPI reads instead of 1*16
<whitequark> is there a difference if you don't raise CS?
<gruetzkopf> haven't tested, output from spi-master applet looks plausible
<whitequark> i mean no there isn't
<whitequark> the spi-master applet will stop clock if the FIFO becomes full
jevinski_ has quit [Ping timeout: 250 seconds]
<_whitenotifier> [GlasgowEmbedded/Glasgow] whitequark pushed 1 commit to master [+0/-0/±1] https://git.io/fhje8
<_whitenotifier> [GlasgowEmbedded/Glasgow] whitequark 9449456 - applet.audio.yamaha_opl: allow proxying applet not in host root.
<_whitenotifier> [GlasgowEmbedded/Glasgow] whitequark pushed 1 commit to master [+0/-0/±1] https://git.io/fhjep
<_whitenotifier> [GlasgowEmbedded/Glasgow] whitequark e938924 - applet.audio.yamaha_opl: log X-Forwarded-For (if any).
<_whitenotifier> [GlasgowEmbedded/Glasgow] whitequark pushed 1 commit to master [+0/-0/±1] https://git.io/fhjv3
<_whitenotifier> [GlasgowEmbedded/Glasgow] whitequark 1db255d - applet.audio.yamaha_opl: use X-Forwarded-For in serve_vgm logs as well.