[04:10] *** DFJustin has quit IRC (Remote host closed the connection) [04:13] *** DFJustin has joined #jsmess [04:16] People have suggested I use Chrome headless. That will mostly stop the hellish console messages exploding out of firefox as I see them [04:17] And I can always use the old trick I was using of ingesting the colors along one edge to determine where the screen is [04:18] But otherwise the same. [04:18] So we'll see if hitsthings sees something [04:21] nah, you can grab a png or jpg directly from the canvas [04:21] you don't need all that phantomjs mumbo jumbo at all [04:21] just canvas.toDataURI('image/png') [04:23] Need help understanding. [04:24] Like, right now I do an Imagemagick [04:24] How do I yell that at Firefox [04:27] well, this would be for chrome headless. so what I do for my screenshotter is, I load a special screenshotter.html in my headless chrome, and that runs whatever normal stuff, in this case it would create the emulator and add canvas to the document, etc [04:28] then at any point, like on timers or whatever like you have it now, you can call var imgbase64 = canvas.toDataURL('image/png'); [04:29] then the next question is what you do with the base64 image, from there you can either make the browser download it as a file, or you can send it directly to an API [04:30] This sounds.... involved [04:31] sure. so's wht you're doing now :D [04:31] You got me into the restaurant with "simple" and then here we are cooking the souffle ourselves [04:31] It's all horrible [04:32] basically, extracting the image data is the easy part. it's the pipeline around that that's hard [04:32] I can run post-processing on a bunch of grabbed images [04:32] you have a pipeline for one method but this is a bit different [04:32] We're all going to die, aren't we [04:32] you, me, a pile of malformed screenshots [04:32] oh, definitely [04:33] It all comes down to who eats other first [04:33] * SketchCow gets fork [04:34] I mean I can basically give you a function that you could call which would dump a screenshot into the browser's download directory [04:34] and from there you could do whatever kind of things [04:35] Well, let's at least ask why I couldn't make chromium-browser headless [04:36] not sure I understand the question [04:36] you can [04:37] I tried chromium-browser --headless [04:37] Was there other magic [04:37] well, it's a relatively new feature so I'm not quite clear on exactly which version you need to be running to use it [04:38] but I think from there, I think yes, either there's a little bit of magic needed to script it if you want to do a bunch of phantomjs-style puppeteering, or you can just fire it at a page which does what you want as a regular old javascript script [04:44] chromium-browser --headless --remote-debugging-port=9222 https://chromium.org [04:44] [18796:18796:0312/044314:ERROR:browser_main_loop.cc(261)] Gtk: cannot open display: [05:49] Meanwhile: I am going through a pile of 1,000 floppy images to add them to a collection [05:52] Oh, speaking of "Jason wastes time on insane scripts" [05:53] I did prelim work on a terrible idea that I'll do anyway [06:07] I can spend a little time right now on trying phantomjs 2.5 if you'd like [07:03] looks like the macos beta is broken [07:03] I'll try on Windows in a bit [08:05] everything is broken forever [08:31] okay uh [08:31] I think phantomjs still sucks [08:31] I'm injecting ES5 and ES6 shims and it's still barfing on that React thing [08:32] best bet is to file a bug with the phantomjs folks [09:05] https://gist.github.com/vitorio/52cf78c6b28423994434d728ac0eb4f9 [09:05] that's the modified pacman.js I was using, it still doesn't work [09:05] best bet is to file a bug with the phantomjs folks [11:22] Oh PhantomJS, why do you suck [13:49] WebAssembly now supported in Chrome [13:54] What kind of machine do we want as the "official" machine for Emularity? [14:13] I'm starting to really gear towards the idea of we just get an AWS instance and use that. [14:14] Document it up, write scripts to maintain it, etc. [14:14] Share credentials [15:51] I think loading pages from archive.org to screenshot is making things too complicated [15:51] just load the emularity scripts, and then run this: [15:51] var emulator = new IALoader(document.querySelector("#canvas"), [15:51] "Pitfall_Activision_1982"); [15:51] emulator.start({ waitAfterDownloading: false }); [15:52] where, of course, you put in any item name you want instead of Pitfall [15:53] then you grab the image out of the canvas and save it to a file, as usual [19:34] hm [19:34] IA scripts do support embeds right [19:34] maybe that [19:34] let me try it real quick [19:48] well this works http://assets.metacade.com/emulators/win311-wasm.html [19:48] loads nice and quickly in chrome and ff [19:49] like damn near instantly, once the data's loaded [19:51] the IA embeds still include react and jquery and stuff [19:51] so they are still broken [19:55] runs noticably faster on mobile. too bad it isn't emulating touch events properly [19:55] if I could use netscape 1.0 on my phone I would be so happy [20:18] *** webmirc has joined #jsmess [20:20] *** webmirc has quit IRC (Client Quit) [20:31] db48x: I'm getting "failed to download IA item metadata" [20:32] ah [20:32] okay so db48x's idea might work maybe [20:33] but it'd require having those pages served up by an actual http server [20:33] phantomjs's local-to-remote parameters aren't enough [21:02] nor is specifying a base href [21:03] it redirects to IA properly then, but the screenshots say it failed to configure emulator [21:03] maybe you need to point it to the cors address directly if it's not running on ia's servers? [21:04] the emularity loader seems to be doing that for me [21:05] but I can't really tell [21:06] if you see any requests in the network tab for cors_get.php then we're cool [21:18] yeah [21:21] even loading the IA loader example page from a localhost server doesn't work [21:23] works fine in a browser [21:24] 2017-03-12T16:20:14 [DEBUG] Network - Redirecting to "http://ia801906.us.archive.org/cors_get.php?path=%2F7%2Fitems%2Femularity_engine_v1%2Fa2600.json" [21:24] that's where phantomjs stops [21:24] in a browser it loads a bin and a cfg after that [21:27] hmm, localhost server as in a real webserver you mean, right? as opposed to just loading from files? [21:27] there are extra security restrictions when loading from files [21:28] yeah I turned those off and set a base href to archive.org [21:28] but it doesn't matter, it's the same behavior as with a localhost webserver [21:29] it stops/breaks on that json file [21:31] hm [21:32] different URLs break differently [21:32] the Oregon trail is saying access denied [21:32] service unavailable [21:32] yeah, what response does it get for the json, and are there any errors abing not being able to access its content? [21:32] another msdos app is saying remote host closed the connection [21:33] is IA blocking phantom? [21:33] 2017-03-12T16:33:45 [DEBUG] Network - Resource request error: QNetworkReply::NetworkError(ServiceUnavailableError) ( "Error transferring http://cors.archive.org/cors/msdos_Oregon_Trail_Deluxe_The_1992 - server replied: Service Unavailable" ) URL: "http://cors.archive.org/cors/msdos_Oregon_Trail_Deluxe_The_1992" [21:34] 2017-03-12T16:29:41 [DEBUG] Network - Resource request error: QNetworkReply::NetworkError(RemoteHostClosedError) ( "Connection closed" ) URL: "http://ia801502.us.archive.org/cors_get.php?path=%2F7%2Fitems%2Fmsdos_shareware_fb_PCM350" [21:37] oh hm [21:37] both of those seem to be broken in the emularity loader in a browser also [21:38] looks like there might be multiple points of failure here [21:38] db48x: if you can provide HTML that provides a simple, working embed for all types of IA resources, I can try again [21:39] but right now it looks like either emularity or IA are breaking [21:39] not only phantomjs [21:40] hmm. do those games work if you load them up directly on IA? [21:41] maybe IA is having server issues, it happened to me the other night when I was trying to prep slides the night before my talk [21:49] yeah both load up fine directly from IA [22:58] *** phe has joined #jsmess